List<VariableDeclaration> astParameters = ((MethodDeclaration) methods.get(0).getInternal()).parameters();
method.parameters().clear();
for (VariableDeclaration declaration : astParameters)
{
VariableDeclaration copy = (VariableDeclaration) ASTNode.copySubtree(method.getAST(), declaration);
method.parameters().add(copy);
}
return this;
}