Buggy code:
public class Main implements AntMain { private static final Set LAUNCH_COMMANDS = new HashSet ( ) ; public static final String DEFAULT_BUILD_FILENAME = "build.xml" ; private int msgOutputLevel = Project . MSG_INFO ; private File buildFile ; private static PrintStream out = System . out ; private static PrintStream err = System . err ; private Vector targets = new Vector ( ) ; private Properties definedProps = new Properties ( ) ; private Vector listeners = new Vector ( 1 ) ; private Vector propertyFiles = new Vector ( 1 ) ; private boolean allowInput = true ; private boolean keepGoingMode = false ; private String loggerClassname = null ; private String inputHandlerClassname = null ; private boolean emacsMode = false ; private boolean readyToRun = false ; private boolean projectHelp = false ; private static boolean isLogFileUsed = false ; private Integer threadPriority = null ; private boolean proxy = false ; private static void printMessage ( Throwable t ) { } public static void start ( String [ ] args , Properties additionalUserProperties , ClassLoader coreLoader ) { } public void startAnt ( String [ ] args , Properties additionalUserProperties , ClassLoader coreLoader ) { } protected void exit ( int exitCode ) { } private static void handleLogfile ( ) { } public static void main ( String [ ] args ) { } public Main ( ) { } protected Main ( String [ ] args ) throws BuildException { } private void processArgs ( String [ ] args ) { } private int handleArgBuildFile ( String [ ] args , int pos ) { } private int handleArgListener ( String [ ] args , int pos ) { } private int handleArgDefine ( String [ ] args , int argPos ) { } private int handleArgLogger ( String [ ] args , int pos ) { } private int handleArgInputHandler ( String [ ] args , int pos ) { } private int handleArgPropertyFile ( String [ ] args , int pos ) { } private int handleArgNice ( String [ ] args , int pos ) { } private void loadPropertyFiles ( ) { } private File getParentFile ( File file ) { } private File findBuildFile ( String start , String suffix ) { } private void runBuild ( ClassLoader coreLoader ) throws BuildException { if ( ! ( readyToRun ) ) { return ; } final Project project = new Project ( ) ; project . setCoreLoader ( coreLoader ) ; Throwable error = null ; try { addBuildListeners ( project ) ; addInputHandler ( project ) ; PrintStream savedErr = System . err ; PrintStream savedOut = System . out ; InputStream savedIn = System . in ; SecurityManager oldsm = null ; oldsm = System . getSecurityManager ( ) ; try { if ( allowInput ) { project . setDefaultInputStream ( System . in ) ; } System . setIn ( new DemuxInputStream ( project ) ) ; System . setOut ( new PrintStream ( new DemuxOutputStream ( project , false ) ) ) ; System . setErr ( new PrintStream ( new DemuxOutputStream ( project , true ) ) ) ; if ( ! ( projectHelp ) ) { project . fireBuildStarted ( ) ; } if ( ( threadPriority ) != null ) { try { project . log ( ( "Setting<seq2seq4repair_space>Ant's<seq2seq4repair_space>thread<seq2seq4repair_space>priority<seq2seq4repair_space>to<seq2seq4repair_space>" + ( threadPriority ) ) , MSG_VERBOSE ) ; Thread . currentThread ( ) . setPriority ( threadPriority . intValue ( ) ) ; } catch ( SecurityException swallowed ) { project . log ( "A<seq2seq4repair_space>security<seq2seq4repair_space>manager<seq2seq4repair_space>refused<seq2seq4repair_space>to<seq2seq4repair_space>set<seq2seq4repair_space>the<seq2seq4repair_space>-nice<seq2seq4repair_space>value" ) ; } } project . init ( ) ; PropertyHelper propertyHelper = ( ( PropertyHelper ) ( PropertyHelper . getPropertyHelper ( project ) ) ) ; HashMap props = new HashMap ( definedProps ) ; <START_BUG> new org . apache . tools . ant . property . ResolvePropertyMap ( project , propertyHelper , propertyHelper . getExpanders ( ) ) . resolveAllProperties ( props , null ) ; <END_BUG> for ( Iterator e = props . entrySet ( ) . iterator ( ) ; e . hasNext ( ) ; ) { Map . Entry ent = ( ( Map . Entry ) ( e . next ( ) ) ) ; String arg = ( ( String ) ( ent . getKey ( ) ) ) ; Object value = ent . getValue ( ) ; project . setUserProperty ( arg , String . valueOf ( value ) ) ; } project . setUserProperty ( ANT_FILE , buildFile . getAbsolutePath ( ) ) ; project . setUserProperty ( ANT_FILE_TYPE , ANT_FILE_TYPE_FILE ) ; project . setKeepGoingMode ( keepGoingMode ) ; if ( proxy ) { ProxySetup proxySetup = new ProxySetup ( project ) ; proxySetup . enableProxies ( ) ; } ProjectHelper . configureProject ( project , buildFile ) ; if ( projectHelp ) { Main . printDescription ( project ) ; Main . printTargets ( project , ( ( msgOutputLevel ) > ( Project . MSG_INFO ) ) ) ; return ; } if ( ( targets . size ( ) ) == 0 ) { if ( ( project . getDefaultTarget ( ) ) != null ) { targets . addElement ( project . getDefaultTarget ( ) ) ; } } project . executeTargets ( targets ) ; } finally { if ( oldsm != null ) { System . setSecurityManager ( oldsm ) ; } System . setOut ( savedOut ) ; System . setErr ( savedErr ) ; System . setIn ( savedIn ) ; } } catch ( RuntimeException exc ) { error = exc ; throw exc ; } catch ( Error e ) { error = e ; throw e ; } finally { if ( ! ( projectHelp ) ) { try { project . fireBuildFinished ( error ) ; } catch ( Throwable t ) { System . err . println ( ( "Caught<seq2seq4repair_space>an<seq2seq4repair_space>exception<seq2seq4repair_space>while<seq2seq4repair_space>logging<seq2seq4repair_space>the" + "<seq2seq4repair_space>end<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>build.<seq2seq4repair_space>Exception<seq2seq4repair_space>was:" ) ) ;

Fix:
new org . apache . tools . ant . property . ResolvePropertyMap ( project , propertyHelper , propertyHelper . getExpanders ( ) ) . resolveAllProperties ( props , null , false ) ;