Buggy code:
public class JJTree extends Task { private static final String BUILD_NODE_FILES = "BUILD_NODE_FILES" ; private static final String MULTI = "MULTI" ; private static final String NODE_DEFAULT_VOID = "NODE_DEFAULT_VOID" ; private static final String NODE_FACTORY = "NODE_FACTORY" ; private static final String NODE_SCOPE_HOOK = "NODE_SCOPE_HOOK" ; private static final String NODE_USES_PARSER = "NODE_USES_PARSER" ; private static final String STATIC = "STATIC" ; private static final String VISITOR = "VISITOR" ; private static final String NODE_PACKAGE = "NODE_PACKAGE" ; private static final String VISITOR_EXCEPTION = "VISITOR_EXCEPTION" ; private static final String NODE_PREFIX = "NODE_PREFIX" ; private final Hashtable optionalAttrs = new Hashtable ( ) ; private File outputDirectory = null ; private File target = null ; private File javaccHome = null ; private CommandlineJava cmdl = new CommandlineJava ( ) ; public JJTree ( ) { } public void setBuildnodefiles ( boolean buildNodeFiles ) { } public void setJavacchome ( File javaccHome ) { } public void setMulti ( boolean multi ) { } public void setNodedefaultvoid ( boolean nodeDefaultVoid ) { } public void setNodefactory ( boolean nodeFactory ) { } public void setNodepackage ( String nodePackage ) { } public void setNodeprefix ( String nodePrefix ) { } public void setNodescopehook ( boolean nodeScopeHook ) { } public void setNodeusesparser ( boolean nodeUsesParser ) { } public void setOutputdirectory ( File outputDirectory ) { } public void setStatic ( boolean staticParser ) { } public void setTarget ( File target ) { } public void setVisitor ( boolean visitor ) { } public void setVisitorException ( String visitorException ) { } public void execute ( ) throws TaskException { Enumeration iter = optionalAttrs . keys ( ) ; while ( iter . hasMoreElements ( ) ) { String name = ( ( String ) ( iter . nextElement ( ) ) ) ; Object value = optionalAttrs . get ( name ) ; cmdl . createArgument ( ) . setValue ( ( ( ( "-" + name ) + ":" ) + ( value . toString ( ) ) ) ) ; } if ( ( ( target ) == null ) || ( ! ( target . isFile ( ) ) ) ) { throw new TaskException ( ( "Invalid<seq2seq4repair_space>target:<seq2seq4repair_space>" + ( target ) ) ) ; } if ( ( outputDirectory ) == null ) { outputDirectory = new File ( target . getParent ( ) ) ; } if ( ! ( outputDirectory . isDirectory ( ) ) ) { throw new TaskException ( ( ( "'outputdirectory'<seq2seq4repair_space>" + ( outputDirectory ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>directory." ) ) ; } cmdl . createArgument ( ) . setValue ( ( "-OUTPUT_DIRECTORY:" + ( outputDirectory . getAbsolutePath ( ) . replace ( '\\' , '//' ) ) ) ) ; String targetName = target . getName ( ) ; final File javaFile = new File ( outputDirectory , ( ( targetName . substring ( 0 , targetName . indexOf ( ".jjt" ) ) ) + ".jj" ) ) ; if ( ( javaFile . exists ( ) ) && ( ( target . lastModified ( ) ) < ( javaFile . lastModified ( ) ) ) ) { getLogger ( ) . info ( ( ( "Target<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>built<seq2seq4repair_space>-<seq2seq4repair_space>skipping<seq2seq4repair_space>(" + ( target ) ) + ")" ) ) ; return ; } cmdl . createArgument ( ) . setValue ( target . getAbsolutePath ( ) ) ; if ( ( ( javaccHome ) == null ) || ( ! ( javaccHome . isDirectory ( ) ) ) ) { throw new TaskException ( "Javacchome<seq2seq4repair_space>not<seq2seq4repair_space>set." ) ; } <START_BUG> final Path classpath = cmdl . createClasspath ( project ) ; <END_BUG> classpath . createPathElement ( ) . setPath ( ( ( javaccHome . getAbsolutePath ( ) ) + "//JavaCC.zip" ) ) ; classpath . addJavaRuntime ( ) ; final Commandline . Argument arg = cmdl . createVmArgument ( ) ; arg . setValue ( "-mx140M" ) ; arg . setValue ( ( "-Dinstall.root=" + ( javaccHome . getAbsolutePath ( ) ) ) ) ; final Execute process = new Execute ( new org . apache . tools . ant . taskdefs . exec . LogStreamHandler ( this , Project . MSG_INFO , Project . MSG_INFO ) , null ) ; log ( cmdl . toString ( ) , MSG_VERBOSE ) ; process . setCommandline ( cmdl . getCommandline ( ) ) ; try { if ( ( process . execute ( ) ) != 0 ) { throw new TaskException ( "JJTree<seq2seq4repair_space>failed." ) ; } } catch ( IOException e ) { throw new TaskException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>launch<seq2seq4repair_space>JJTree:<seq2seq4repair_space>" + e ) ) ; } } }

Fix:
final Path classpath = cmdl . createClasspath ( getProject ( ) ) ;