Buggy code:
private String name ; private String description ; private Hashtable properties = new Hashtable ( ) ; private Hashtable userProperties = new Hashtable ( ) ; private Hashtable references = new Hashtable ( ) ; private String defaultTarget ; private Hashtable dataClassDefinitions = new Hashtable ( ) ; private Hashtable taskClassDefinitions = new Hashtable ( ) ; private Hashtable targets = new Hashtable ( ) ; private FilterSet globalFilterSet = new FilterSet ( ) ; private FilterSetCollection globalFilters = new FilterSetCollection ( globalFilterSet ) ; private File baseDir ; private Vector listeners = new Vector ( ) ; private ClassLoader coreLoader = null ; private Hashtable threadTasks = new Hashtable ( ) ; private FileUtils fileUtils ; public Project ( ) { } public void init ( ) throws BuildException { } public void setCoreLoader ( ClassLoader coreLoader ) { } public ClassLoader getCoreLoader ( ) { } public void addBuildListener ( BuildListener listener ) { } public void removeBuildListener ( BuildListener listener ) { } public Vector getBuildListeners ( ) { } public void log ( String msg ) { } public void log ( String msg , int msgLevel ) { } public void log ( Task task , String msg , int msgLevel ) { } public void log ( Target target , String msg , int msgLevel ) { } public FilterSet getGlobalFilterSet ( ) { } public void setProperty ( String name , String value ) { } public void setNewProperty ( String name , String value ) { } public void setUserProperty ( String name , String value ) { } private void setPropertyInternal ( String name , String value ) { } public String getProperty ( String name ) { } public String getUserProperty ( String name ) { } public Hashtable getProperties ( ) { } public Hashtable getUserProperties ( ) { } public void setDefaultTarget ( String defaultTarget ) { } public String getDefaultTarget ( ) { } public void setDefault ( String defaultTarget ) { } public void setName ( String name ) { } public String getName ( ) { } public void setDescription ( String description ) { } public String getDescription ( ) { } public void addFilter ( String token , String value ) { } public Hashtable getFilters ( ) { } public void setBasedir ( String baseD ) throws BuildException { } public void setBaseDir ( File baseDir ) throws BuildException { } public File getBaseDir ( ) { } public static String getJavaVersion ( ) { } public void setJavaVersionProperty ( ) throws BuildException { } public void setSystemProperties ( ) { } public void addTaskDefinition ( String taskName , Class taskClass ) throws BuildException { } public void checkTaskClass ( final Class taskClass ) throws BuildException { } public Hashtable getTaskDefinitions ( ) { } public void addDataTypeDefinition ( String typeName , Class typeClass ) { } public Hashtable getDataTypeDefinitions ( ) { } public void addTarget ( Target target ) { } public void addTarget ( String targetName , Target target ) throws BuildException { } public void addOrReplaceTarget ( Target target ) { } public void addOrReplaceTarget ( String targetName , Target target ) { } public Hashtable getTargets ( ) { } public Task createTask ( String taskType ) throws BuildException { } public Object createDataType ( String typeName ) throws BuildException { Class c = ( ( Class ) ( dataClassDefinitions . get ( typeName ) ) ) ; if ( c == null ) return null ; try { Constructor ctor = null ; boolean noArg = false ; try { ctor = c . getConstructor ( new Class [ 0 ] ) ; noArg = true ; } catch ( NoSuchMethodException nse ) { <START_BUG> ctor = c . getConstructor ( new Class [ ] { getClass ( ) } ) ; <END_BUG> noArg = false ; } Object o = null ; if ( noArg ) { o = ctor . newInstance ( new Object [ 0 ] ) ; } else { o = ctor . newInstance ( new Object [ ] { this } ) ; } if ( o instanceof ProjectComponent ) { ( ( ProjectComponent ) ( o ) ) . setProject ( this ) ; } String msg = "<seq2seq4repair_space>+DataType:<seq2seq4repair_space>" + typeName ; log ( msg , Project . MSG_DEBUG ) ; return o ; } catch ( InvocationTargetException ite ) { Throwable t = ite . getTargetException ( ) ; String msg = ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>datatype<seq2seq4repair_space>of<seq2seq4repair_space>type:<seq2seq4repair_space>" + typeName ) + "<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>" ) + t ; throw new BuildException ( msg , t ) ; } catch ( Throwable t ) { String msg = ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>datatype<seq2seq4repair_space>of<seq2seq4repair_space>type:<seq2seq4repair_space>" + typeName ) + "<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>" ) + t ; throw new BuildException ( msg , t ) ; } } public void executeTargets ( Vector targetNames ) throws BuildException { } public void demuxOutput ( String line , boolean isError ) { } public void executeTarget ( String targetName ) throws BuildException { } public File resolveFile ( String fileName , File rootDir ) { } public File resolveFile ( String fileName ) { } public static String translatePath ( String to_process ) { } public void copyFile ( String sourceFile , String destFile ) throws IOException { } public void copyFile ( String sourceFile , String destFile , boolean filtering ) throws IOException { } public void copyFile ( String sourceFile , String destFile , boolean filtering , boolean overwrite ) throws IOException { } public void copyFile ( String sourceFile , String destFile , boolean filtering , boolean overwrite , boolean preserveLastModified ) throws IOException { } public void copyFile ( File sourceFile , File destFile ) throws IOException { } public void copyFile ( File sourceFile , File destFile , boolean filtering ) throws IOException { } public void copyFile ( File sourceFile , File destFile , boolean filtering , boolean overwrite ) throws IOException { }

Fix:
ctor = c . getConstructor ( new Class [ ] { Project . class } ) ;