Buggy code:
public class Javac extends MatchingTask { private static final int MODERN_COMPILER_SUCCESS = 0 ; private Path src ; private File destDir ; private Path compileClasspath ; private Vector classpathReferences = new Vector ( ) ; private boolean debug = false ; private boolean optimize = false ; private boolean deprecation = false ; private String target ; private Path bootclasspath ; private Vector bootClasspathReferences = new Vector ( ) ; private Path extdirs ; private static String lSep = System . getProperty ( "line.separator" ) ; protected Vector compileList = new Vector ( ) ; public Path createSrc ( ) { } public void setSrcdir ( Path srcDir ) { } public void setDestdir ( File destDir ) { } public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void addClasspathRef ( Reference r ) { } public void setClasspathRef ( Reference r ) { } public void setBootclasspath ( Path bootclasspath ) { } public Path createBootclasspath ( ) { } public void addBootClasspathRef ( Reference r ) { } public void setBootClasspathRef ( Reference r ) { } public void setExtdirs ( Path extdirs ) { } public Path createExtdirs ( ) { } public void setDeprecation ( boolean deprecation ) { } public void setDebug ( boolean debug ) { } public void setOptimize ( boolean optimize ) { } public void setTarget ( String target ) { } public void execute ( ) throws BuildException { } protected void resetFileLists ( ) { } protected void scanDir ( File srcDir , File destDir , String [ ] files ) { } private Path getCompileClasspath ( boolean addRuntime ) { } private void addExistingToClasspath ( Path target , Path source ) { } private void doClassicCompile ( ) throws BuildException { } private void doModernCompile ( ) throws BuildException { try { Class . forName ( "com.sun.tools.javac.Main" ) ; } catch ( ClassNotFoundException cnfe ) { doClassicCompile ( ) ; return ; } log ( "Using<seq2seq4repair_space>modern<seq2seq4repair_space>compiler" , MSG_VERBOSE ) ; Commandline cmd = setupJavacCommand ( ) ; try { Class c = Class . forName ( "com.sun.tools.javac.Main" ) ; Object compiler = c . newInstance ( ) ; Method compile = c . getMethod ( "compile" , new Class [ ] { new String [ ] { } . getClass ( ) } ) ; <START_BUG> int result = ( ( Integer ) ( compile . invoke ( compiler , cmd . getArguments ( ) ) ) ) . intValue ( ) ; <END_BUG> if ( result != ( Javac . MODERN_COMPILER_SUCCESS ) ) { String msg = "Compile<seq2seq4repair_space>failed,<seq2seq4repair_space>messages<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>provided." ; throw new BuildException ( msg ) ; } } catch ( Exception ex ) { throw new BuildException ( ex ) ; } } private Commandline setupJavacCommand ( ) { } private void logAndAddFilesToCompile ( Commandline cmd ) { } private void doJikesCompile ( ) throws BuildException { } private int executeJikesCompile ( String [ ] args , int firstFileName ) { } private void addExtdirsToClasspath ( Path classpath ) { } private void addReferencesToPath ( Vector v , Path p ) { } }

Fix:
int result = ( ( Integer ) ( compile . invoke ( compiler , new Object [ ] { cmd . getArguments ( ) } ) ) ) . intValue ( ) ;