}
	public final boolean isApplicable() {		if (JavaModelUtil.is50OrHigher(getCompilationUnit().getJavaProject())) {			for (final Iterator outer= fStatement.initializers().iterator(); outer.hasNext();) {				final Expression initializer= (Expression) outer.next();				if (initializer instanceof VariableDeclarationExpression) {					final VariableDeclarationExpression declaration= (VariableDeclarationExpression) initializer;					for (Iterator inner= declaration.fragments().iterator(); inner.hasNext();) {						final VariableDeclarationFragment fragment= (VariableDeclarationFragment) inner.next();						fragment.accept(new ASTVisitor() {							public final boolean visit(final MethodInvocation node) {								final IMethodBinding binding= node.resolveMethodBinding();								if (binding != null) {									final ITypeBinding type= binding.getReturnType();									if (type != null) {									final String qualified= type.getQualifiedName();									if (qualified.startsWith("java.util.Enumeration<") || qualified.startsWith("java.util.Iterator<")) { //$NON-NLS-1$ //$NON-NLS-2$										final Expression qualifier= node.getExpression();										if (qualifier != null) {											final ITypeBinding resolved= qualifier.resolveTypeBinding();											if (resolved != null) {												final ITypeBinding iterable= getSuperType(resolved, "java.lang.Iterable"); //$NON-NLS-1$												if (iterable != null) {													fExpression= qualifier;													if (qualifier instanceof Name) {														final Name name= (Name) qualifier;														fIterable= name.resolveBinding();													} else if (qualifier instanceof MethodInvocation) {														final MethodInvocation invocation= (MethodInvocation) qualifier;														fIterable= invocation.resolveMethodBinding();													} else if (qualifier instanceof FieldAccess) {														final FieldAccess access= (FieldAccess) qualifier;														fIterable= access.resolveFieldBinding();													}												}											}										}									}									}								}								return true;							}							public final boolean visit(final VariableDeclarationFragment node) {								final IVariableBinding binding= node.resolveBinding();								if (binding != null) {									final ITypeBinding type= binding.getType();									if (type != null) {										ITypeBinding iterator= getSuperType(type, "java.util.Iterator"); //$NON-NLS-1$										if (iterator != null)											fIterator= binding;										else {											iterator= getSuperType(type, "java.util.Enumeration"); //$NON-NLS-1$											if (iterator != null)												fIterator= binding;										}									}								}								return true;							}						});					}				}			}			final Statement statement= fStatement.getBody();			if (statement != null && fIterator != null) {				final ITypeBinding iterable= getIterableType(fIterator.getType());				statement.accept(new ASTVisitor() {					public final boolean visit(final Assignment node) {						return visit(node.getLeftHandSide(), node.getRightHandSide());					}					private boolean visit(final Expression node) {						if (node != null) {							final ITypeBinding binding= node.resolveTypeBinding();							if (binding != null && iterable.equals(binding)) {								if (node instanceof Name) {									final Name name= (Name) node;									final IBinding result= name.resolveBinding();									if (result != null) {										fOccurrences.add(node);										fElement= result;										return false;									}								} else if (node instanceof FieldAccess) {									final FieldAccess access= (FieldAccess) node;									final IBinding result= access.resolveFieldBinding();									if (result != null) {										fOccurrences.add(node);										fElement= result;										return false;									}								}							}						}						return true;					}					private boolean visit(final Expression left, final Expression right) {						if (right instanceof MethodInvocation) {							final MethodInvocation invocation= (MethodInvocation) right;							final IMethodBinding binding= invocation.resolveMethodBinding();							if (binding != null && (binding.getName().equals("next") || binding.getName().equals("nextElement"))) { //$NON-NLS-1$ //$NON-NLS-2$								final Expression expression= invocation.getExpression();								if (expression instanceof Name) {									final Name qualifier= (Name) expression;									final IBinding result= qualifier.resolveBinding();									if (result != null && result.equals(fIterator))										return visit(left);								} else if (expression instanceof MethodInvocation) {									final MethodInvocation qualifier= (MethodInvocation) expression;									final IBinding result= qualifier.resolveMethodBinding();									if (result != null && result.equals(fIterator))										return visit(left);								} else if (expression instanceof FieldAccess) {									final FieldAccess qualifier= (FieldAccess) expression;									final IBinding result= qualifier.resolveFieldBinding();									if (result != null && result.equals(fIterator))										return visit(left);								}							}						} else if (right instanceof NullLiteral)							return visit(left);						return true;					}					public final boolean visit(final VariableDeclarationFragment node) {						return visit(node.getName(), node.getInitializer());					}				});			}			final ASTNode root= fStatement.getRoot();			if (root != null) {				root.accept(new ASTVisitor() {					public final boolean visit(final ForStatement node) {						return false;					}					public final boolean visit(final SimpleName node) {						final IBinding binding= node.resolveBinding();						if (binding != null && binding.equals(fElement))							fAssigned= true;						return false;					}				});			}		}		return fExpression != null && fIterable != null && fIterator != null && !fAssigned;	}