Buggy code:
public class ComponentHelper { private Hashtable dataClassDefinitions ; private Hashtable taskClassDefinitions ; private Hashtable createdTasks = new Hashtable ( ) ; protected ComponentHelper next ; protected Project project ; public static ComponentHelper getComponentHelper ( Project project ) { } protected ComponentHelper ( ) { } public void setNext ( ComponentHelper next ) { } public ComponentHelper getNext ( ) { } public void setProject ( Project project ) { } public Object createComponent ( String ns , String taskName ) throws BuildException { } public Object createComponent ( UnknownElement ue , String ns , String taskName ) throws BuildException { } public void initDefaultDefinitions ( ) throws BuildException { } 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 Task createTask ( String taskType ) throws BuildException { } private Task createNewTask ( String taskType ) throws BuildException { } private void addCreatedTask ( String type , Task task ) { } private void invalidateCreatedTasks ( String type ) { } 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 ) { ctor = c . getConstructor ( new Class [ ] { Project . class } ) ; noArg = false ; } Object o = null ; if ( noArg ) { o = ctor . newInstance ( new Object [ 0 ] ) ; } else { <START_BUG> o = ctor . newInstance ( new Object [ ] { this } ) ; <END_BUG> } if ( ( project ) != null ) { project . setProjectReference ( o ) ; } String msg = "<seq2seq4repair_space>+DataType:<seq2seq4repair_space>" + typeName ; project . log ( msg , 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 String getElementName ( Object element ) { } private static class AntTaskTable extends LazyHashtable { Project project ; Properties props ; boolean tasks = false ; public AntTaskTable ( Project p , boolean tasks ) { } public void addDefinitions ( Properties props ) { } protected void initAll ( ) { } protected Class getTask ( String key ) { } public Object get ( Object key ) { } public boolean contains ( Object key ) { } } }

Fix:
o = ctor . newInstance ( new Object [ ] { project } ) ;