private boolean getInvertEqualsProposal(IInvocationContext context, ASTNode node, Collection resultingCollections) {
private static boolean getInvertEqualsProposal(IInvocationContext context, ASTNode node, Collection resultingCollections) {
	private boolean getInvertEqualsProposal(IInvocationContext context, ASTNode node, Collection resultingCollections) {		ASTNode parent= node.getParent();		if (!(parent instanceof MethodInvocation)) {			return false;		}		MethodInvocation method= (MethodInvocation) parent;		if (!"equals".equals(method.getName().getIdentifier())) { //$NON-NLS-1$			return false;		}		List arguments= method.arguments();		if (arguments.size() != 1) { //overloaded equals w/ more than 1 arg			return false;		}		Expression right= (Expression) arguments.get(0);		ITypeBinding binding = right.resolveTypeBinding();		if (binding != null && !(binding.isClass() || binding.isInterface())) { //overloaded equals w/ non-class/interface arg or null			return false;		}		if (resultingCollections == null) {			return true;		}		Expression left= method.getExpression();		AST ast= method.getAST();		ASTRewrite rewrite= ASTRewrite.create(ast);		if (left == null) { // equals(x) -> x.equals(this)			MethodInvocation replacement= ast.newMethodInvocation();			replacement.setName((SimpleName) rewrite.createCopyTarget(method.getName()));			replacement.arguments().add(ast.newThisExpression());			replacement.setExpression((Expression) rewrite.createCopyTarget(right));			rewrite.replace(method, replacement, null);		} else if (right instanceof ThisExpression) { // x.equals(this) -> equals(x)			MethodInvocation replacement= ast.newMethodInvocation();			replacement.setName((SimpleName) rewrite.createCopyTarget(method.getName()));			replacement.arguments().add(rewrite.createCopyTarget(left));			rewrite.replace(method, replacement, null);		} else {			ASTNode leftExpression= left;			while (leftExpression instanceof ParenthesizedExpression) {				leftExpression= ((ParenthesizedExpression) left).getExpression();			}			rewrite.replace(right, rewrite.createCopyTarget(leftExpression), null);			if ((right instanceof CastExpression)				|| (right instanceof Assignment)				|| (right instanceof ConditionalExpression)				|| (right instanceof InfixExpression)) {				ParenthesizedExpression paren= ast.newParenthesizedExpression();				paren.setExpression((Expression) rewrite.createCopyTarget(right));				rewrite.replace(left, paren, null);			} else {				rewrite.replace(left, rewrite.createCopyTarget(right), null);			}		}		String label= CorrectionMessages.QuickAssistProcessor_invertequals_description;		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);		LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, context.getCompilationUnit(), rewrite, 1, image);		resultingCollections.add(proposal);		return true;	}