Buggy code:
public class ScriptDef extends DefBase { private ScriptRunner runner = new ScriptRunner ( ) ; private String name ; private List attributes = new ArrayList ( ) ; private List nestedElements = new ArrayList ( ) ; private Set attributeSet ; private Map nestedElementMap ; public void setName ( String name ) { } public boolean isAttributeSupported ( String attributeName ) { } public static class Attribute { private String name ; public void setName ( String name ) { } } public void addAttribute ( ScriptDef . Attribute attribute ) { } public static class NestedElement { private String name ; private String type ; private String className ; public void setName ( String name ) { } public void setType ( String type ) { } public void setClassName ( String className ) { } } public void addElement ( ScriptDef . NestedElement nestedElement ) { } public void execute ( ) { if ( ( name ) == null ) { throw new BuildException ( ( "scriptdef<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>name<seq2seq4repair_space>attribute<seq2seq4repair_space>to<seq2seq4repair_space>" + "name<seq2seq4repair_space>the<seq2seq4repair_space>script" ) ) ; } if ( ( runner . getLanguage ( ) ) == null ) { throw new BuildException ( ( "<scriptdef><seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>language<seq2seq4repair_space>attribute<seq2seq4repair_space>" + "to<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>script<seq2seq4repair_space>language" ) ) ; } attributeSet = new HashSet ( ) ; for ( Iterator i = attributes . iterator ( ) ; i . hasNext ( ) ; ) { ScriptDef . Attribute attribute = ( ( ScriptDef . Attribute ) ( i . next ( ) ) ) ; if ( ( attribute . name ) == null ) { throw new BuildException ( ( "scriptdef<seq2seq4repair_space><attribute><seq2seq4repair_space>elements<seq2seq4repair_space>" + "must<seq2seq4repair_space>specify<seq2seq4repair_space>an<seq2seq4repair_space>attribute<seq2seq4repair_space>name" ) ) ; } if ( attributeSet . contains ( attribute . name ) ) { throw new BuildException ( ( ( ( ( ( "scriptdef<seq2seq4repair_space><" + ( name ) ) + "><seq2seq4repair_space>declares<seq2seq4repair_space>" ) + "the<seq2seq4repair_space>" ) + ( attribute . name ) ) + "<seq2seq4repair_space>attribute<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>once" ) ) ; } attributeSet . add ( attribute . name ) ; } nestedElementMap = new HashMap ( ) ; for ( Iterator i = nestedElements . iterator ( ) ; i . hasNext ( ) ; ) { ScriptDef . NestedElement nestedElement = ( ( ScriptDef . NestedElement ) ( i . next ( ) ) ) ; if ( ( nestedElement . name ) == null ) { throw new BuildException ( ( "scriptdef<seq2seq4repair_space><element><seq2seq4repair_space>elements<seq2seq4repair_space>" + "must<seq2seq4repair_space>specify<seq2seq4repair_space>an<seq2seq4repair_space>element<seq2seq4repair_space>name" ) ) ; } if ( nestedElementMap . containsKey ( nestedElement . name ) ) { throw new BuildException ( ( ( ( ( ( ( "scriptdef<seq2seq4repair_space><" + ( name ) ) + "><seq2seq4repair_space>declares<seq2seq4repair_space>" ) + "the<seq2seq4repair_space>" ) + ( nestedElement . name ) ) + "<seq2seq4repair_space>nested<seq2seq4repair_space>element<seq2seq4repair_space>more<seq2seq4repair_space>" ) + "than<seq2seq4repair_space>once" ) ) ; } if ( ( ( nestedElement . className ) == null ) && ( ( nestedElement . type ) == null ) ) { throw new BuildException ( ( "scriptdef<seq2seq4repair_space><element><seq2seq4repair_space>elements<seq2seq4repair_space>" + "must<seq2seq4repair_space>specify<seq2seq4repair_space>either<seq2seq4repair_space>a<seq2seq4repair_space>classname<seq2seq4repair_space>or<seq2seq4repair_space>type<seq2seq4repair_space>attribute" ) ) ; } if ( ( ( nestedElement . className ) != null ) && ( ( nestedElement . type ) != null ) ) { throw new BuildException ( ( "scriptdef<seq2seq4repair_space><element><seq2seq4repair_space>elements<seq2seq4repair_space>" + ( "must<seq2seq4repair_space>specify<seq2seq4repair_space>only<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>classname<seq2seq4repair_space>and<seq2seq4repair_space>type<seq2seq4repair_space>" + "attributes" ) ) ) ; } nestedElementMap . put ( nestedElement . name , nestedElement ) ; } Map scriptRepository = null ; Project project = getProject ( ) ; synchronized ( project ) { scriptRepository = ( ( Map ) ( project . getReference ( SCRIPT_REPOSITORY ) ) ) ; if ( scriptRepository == null ) { scriptRepository = new HashMap ( ) ; project . addReference ( SCRIPT_REPOSITORY , scriptRepository ) ; } } <START_BUG> name = ProjectHelper . genComponentName ( getUri ( ) , name ) ; <END_BUG> scriptRepository . put ( name , this ) ; AntTypeDefinition def = new AntTypeDefinition ( ) ; def . setName ( name ) ; def . setClass ( ScriptDefBase . class ) ; ComponentHelper . getComponentHelper ( getProject ( ) ) . addDataTypeDefinition ( def ) ; } public Object createNestedElement ( String elementName ) { } public void executeScript ( Map attributes , Map elements ) { } public void setLanguage ( String language ) { } public void setSrc ( File file ) { } public void addText ( String text ) { } }

Fix:
name = ProjectHelper . genComponentName ( getURI ( ) , name ) ;