ASTNode[] referenceNodes= getReferenceNodes(methods, pm); for (int i= 0; i < referenceNodes.length; i++) { if (! isReferenceUpdatable(referenceNodes[i], nodesToRemove)){ nodesToRemove.addAll(getAllReturnTypeNodes(methods)); return true; } }
	private boolean hasIndirectProblems(ASTNode node, Collection nodesToRemove, IProgressMonitor pm) throws JavaModelException {		ASTNode parentNode= node.getParent();		if (parentNode instanceof VariableDeclarationStatement){			VariableDeclarationStatement vds= (VariableDeclarationStatement)parentNode;			if (vds.getType() != node)				return false; 			VariableDeclarationFragment[] vdfs= getVariableDeclarationFragments(vds);				for (int i= 0; i < vdfs.length; i++) {				if (hasIndirectProblems(vdfs[i], nodesToRemove, new SubProgressMonitor(pm, 1)))					return true;				}		} else if (parentNode instanceof FieldDeclaration){			FieldDeclaration fd= (FieldDeclaration)parentNode;			if (fd.getType() != node)				return false; 			VariableDeclarationFragment[] vdfs= getVariableDeclarationFragments(fd);				for (int i= 0; i < vdfs.length; i++) {				if (hasIndirectProblems(vdfs[i], nodesToRemove, new SubProgressMonitor(pm, 1)))					return true;				}						} else if (parentNode instanceof VariableDeclaration){			if (isMethodParameter(parentNode)){				MethodDeclaration methodDeclaration= (MethodDeclaration)parentNode.getParent();					int parameterIndex= methodDeclaration.parameters().indexOf(parentNode);				IMethod[] methods= getAllRippleMethods(methodDeclaration, new SubProgressMonitor(pm, 1));				if (methods == null){ //XXX this can be null because of bug 22883					SingleVariableDeclaration svd= (SingleVariableDeclaration)methodDeclaration.parameters().get(parameterIndex);					nodesToRemove.add(svd.getType());					addToBadVarSet(svd);					return true;				}				if (isAnyParameterDeclarationExcluded(methods, parameterIndex, nodesToRemove)){					for (int i= 0; i < methods.length; i++) {						SingleVariableDeclaration svd= getParameterDeclarationNode(parameterIndex, methods[i]);						nodesToRemove.add(svd.getType());						addToBadVarSet(svd);						return true;					}				}			} 			if (hasIndirectProblems((VariableDeclaration)parentNode, nodesToRemove, new SubProgressMonitor(pm, 1)))				return true;		} else if (parentNode instanceof CastExpression){			if (! isReferenceUpdatable(parentNode, nodesToRemove))				return true;			} else if (parentNode instanceof MethodDeclaration){			MethodDeclaration methodDeclaration= (MethodDeclaration)parentNode;			if (methodDeclaration.getReturnType() == node){				IMethod[] methods= getAllRippleMethods(methodDeclaration, new SubProgressMonitor(pm, 1));				if (methods == null){ //XXX this can be null because of bug 22883					nodesToRemove.add(methodDeclaration.getReturnType());					return true;				}					if (isAnyMethodReturnTypeNodeExcluded(methods, nodesToRemove)){					nodesToRemove.addAll(getAllReturnTypeNodes(methods));					return true;				}				}				}		return false;	}