Buggy code:
public boolean visit ( DoStatement node ) { } public boolean visit ( EmptyStatement node ) { } public boolean visit ( ExpressionStatement node ) { } public boolean visit ( FieldAccess node ) { } public boolean visit ( FieldDeclaration node ) { } public boolean visit ( ForStatement node ) { } public boolean visit ( IfStatement node ) { } public boolean visit ( ImportDeclaration node ) { } public boolean visit ( InfixExpression node ) { } public boolean visit ( Initializer node ) { } public boolean visit ( InstanceofExpression node ) { } public boolean visit ( Javadoc node ) { } public boolean visit ( LabeledStatement node ) { } public boolean visit ( MethodInvocation node ) { } public boolean visit ( NullLiteral node ) { } public boolean visit ( NumberLiteral node ) { } public boolean visit ( PackageDeclaration node ) { } public boolean visit ( ParenthesizedExpression node ) { } public boolean visit ( PostfixExpression node ) { } public boolean visit ( PrefixExpression node ) { } public boolean visit ( PrimitiveType node ) { } public boolean visit ( QualifiedName node ) { } public boolean visit ( SimpleName node ) { } public boolean visit ( SimpleType node ) { } public boolean visit ( SingleVariableDeclaration node ) { } public boolean visit ( StringLiteral node ) { } public boolean visit ( SuperConstructorInvocation node ) { } public boolean visit ( SuperFieldAccess node ) { } public boolean visit ( SuperMethodInvocation node ) { } public boolean visit ( SwitchCase node ) { } private class SwitchListRewriter extends ASTRewriteAnalyzer . ParagraphListRewriter { public SwitchListRewriter ( int initialIndent ) { } protected int getNodeIndent ( int nodeIndex ) { } } public boolean visit ( SwitchStatement node ) { } public boolean visit ( SynchronizedStatement node ) { } public boolean visit ( ThisExpression node ) { } public boolean visit ( ThrowStatement node ) { } public boolean visit ( TryStatement node ) { } public boolean visit ( TypeDeclarationStatement node ) { } public boolean visit ( TypeLiteral node ) { } public boolean visit ( VariableDeclarationExpression node ) { } public boolean visit ( VariableDeclarationFragment node ) { } public boolean visit ( VariableDeclarationStatement node ) { } public boolean visit ( WhileStatement node ) { } public boolean visit ( MemberRef node ) { } public boolean visit ( MethodRef node ) { } public boolean visit ( MethodRefParameter node ) { } public boolean visit ( TagElement node ) { } private int findTagNameEnd ( TagElement tagNode ) { } public boolean visit ( TextElement node ) { } public boolean visit ( AnnotationTypeDeclaration node ) { } public boolean visit ( AnnotationTypeMemberDeclaration node ) { } public boolean visit ( EnhancedForStatement node ) { } public boolean visit ( EnumConstantDeclaration node ) { if ( ! ( hasChildrenChanges ( node ) ) ) { return doVisitUnchangedChildren ( node ) ; } int pos = rewriteJavadoc ( node , EnumConstantDeclaration . JAVADOC_PROPERTY ) ; rewriteModifiers2 ( node , EnumConstantDeclaration . MODIFIERS2_PROPERTY , pos ) ; pos = rewriteRequiredNode ( node , EnumConstantDeclaration . NAME_PROPERTY ) ; RewriteEvent argsEvent = getEvent ( node , EnumConstantDeclaration . ARGUMENTS_PROPERTY ) ; if ( ( argsEvent != null ) && ( ( argsEvent . getChangeKind ( ) ) != ( RewriteEvent . UNCHANGED ) ) ) { RewriteEvent [ ] children = argsEvent . getChildren ( ) ; try { int nextTok = getScanner ( ) . readNext ( pos , true ) ; boolean hasParents = nextTok == ( ITerminalSymbols . TokenNameLPAREN ) ; boolean isAllRemoved = hasParents && ( isAllOfKind ( children , RewriteEvent . REMOVED ) ) ; String prefix = "" ; if ( ! hasParents ) { prefix = "(" ; } else if ( ! isAllRemoved ) { pos = getScanner ( ) . getCurrentEndOffset ( ) ; } pos = rewriteNodeList ( node , EnumConstantDeclaration . ARGUMENTS_PROPERTY , pos , prefix , ",<seq2seq4repair_space>" ) ; if ( ! hasParents ) { doTextInsert ( pos , ")" , getEditGroup ( children [ ( ( children . length ) - 1 ) ] ) ) ; } else if ( isAllRemoved ) { int afterClosing = getScanner ( ) . getNextEndOffset ( pos , true ) ; doTextRemove ( pos , ( afterClosing - pos ) , getEditGroup ( children [ ( ( children . length ) - 1 ) ] ) ) ; pos = afterClosing ; } } catch ( CoreException e ) { handleException ( e ) ; } } else { <START_BUG> pos = doVisit ( node , EnumConstantDeclaration . ARGUMENTS_PROPERTY , 0 ) ; <END_BUG> } if ( isChanged ( node , EnumConstantDeclaration . ANONYMOUS_CLASS_DECLARATION_PROPERTY ) ) { int kind = getChangeKind ( node , EnumConstantDeclaration . ANONYMOUS_CLASS_DECLARATION_PROPERTY ) ; if ( kind == ( RewriteEvent . REMOVED ) ) { try { pos = getScanner ( ) . getPreviousTokenEndOffset ( ITerminalSymbols . TokenNameLBRACE , pos ) ; } catch ( CoreException e ) { handleException ( e ) ; } } else { pos = ( node . getStartPosition ( ) ) + ( node . getLength ( ) ) ; } rewriteNode ( node , EnumConstantDeclaration . ANONYMOUS_CLASS_DECLARATION_PROPERTY , pos , ASTRewriteFormatter . SPACE ) ; } return false ; } public boolean visit ( EnumDeclaration node ) { } public boolean visit ( MarkerAnnotation node ) { } public boolean visit ( MemberValuePair node ) { } public boolean visit ( Modifier node ) { } public boolean visit ( NormalAnnotation node ) { } public boolean visit ( ParameterizedType node ) { } public boolean visit ( QualifiedType node ) { } public boolean visit ( SingleMemberAnnotation node ) { } public boolean visit ( TypeParameter node ) { } public boolean visit ( WildcardType node ) { } final void handleException ( Throwable e ) { } }

Fix:
pos = doVisit ( node , EnumConstantDeclaration . ARGUMENTS_PROPERTY , pos ) ;