Bug 24025 Quick fix create method gets wrong parameters if parameters are arrays
Steps: 1)type somewhere: Object[] test1= new Object[]{}; Object[] test2= new Object[]{}; if(compareTheseArrays(test1,test2)){ System.out.println("they are the same"); } 2)A Quick fix icon will appear and ask you to create Method compareTheseArrays, select this. 3)note that the method created takes Object as parameters and not Object[]. Should this be? version. 20020920. JRT.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java
* @return CompilationUnit
	 */
	public static ASTNode findParentType(ASTNode node) {
		while ((node != null) && (node.getNodeType() != ASTNode.TYPE_DECLARATION) && (node.getNodeType() != ASTNode.ANONYMOUS_CLASS_DECLARATION)) {
			node= node.getParent();
		}
		return node;
	}		
	
	
	public static Statement findParentStatement(ASTNode node) {
		while ((node != null) && (!(node instanceof Statement))) {
			node= node.getParent();
		}
		return (Statement) node;
	}
	
	public static boolean isInStaticContext(ASTNode selectedNode) {
		BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(selectedNode);
		if (decl instanceof MethodDeclaration) {
			return Modifier.isStatic(((MethodDeclaration)decl).getModifiers());
		} else if (decl instanceof Initializer) {
			return Modifier.isStatic(((Initializer)decl).getModifiers());
		} else if (decl instanceof FieldDeclaration) {
			return Modifier.isStatic(((FieldDeclaration)decl).getModifiers());
		}
		return false;
	}