Buggy code:
public class propertyconfig { public static String header = "########<seq2seq4repair_space>This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>generated<seq2seq4repair_space>file,<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>edit.\n" + ( "#\n#<seq2seq4repair_space>This<seq2seq4repair_space>file<seq2seq4repair_space>is<seq2seq4repair_space>generated<seq2seq4repair_space>as<seq2seq4repair_space>by<seq2seq4repair_space>propertyConfig\n" + "#\n" ) ; public static String footer = "\n########<seq2seq4repair_space>This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>generated<seq2seq4repair_space>file,<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>edit.\n" ; public static void main ( String [ ] args ) throws IOException { } private static void process ( Properties moduleList , String config , File outputfile ) throws IOException { Properties outputProp = new Properties ( ) ; for ( Enumeration e = moduleList . propertyNames ( ) ; e . hasMoreElements ( ) ; ) { String key = ( ( String ) ( e . nextElement ( ) ) ) ; if ( key . startsWith ( "derby.module." ) ) { String tag = key . substring ( "derby.module." . length ( ) ) ; String configKey = "cloudscape.config." . concat ( tag ) ; String configProp = moduleList . getProperty ( configKey ) ; boolean match = false ; if ( configProp != null ) { StringTokenizer st = new StringTokenizer ( configProp , "," ) ; while ( st . hasMoreTokens ( ) ) { String s = st . nextToken ( ) . trim ( ) ; if ( ( s . equalsIgnoreCase ( "all" ) ) && ( ! ( configProp . trim ( ) . equals ( "all" ) ) ) ) { System . out . println ( ( "illegal<seq2seq4repair_space>config<seq2seq4repair_space>specification<seq2seq4repair_space>" + key ) ) ; System . exit ( 3 ) ; } if ( ( s . equalsIgnoreCase ( "none" ) ) && ( ! ( configProp . trim ( ) . equals ( "none" ) ) ) ) { System . out . println ( ( "illegal<seq2seq4repair_space>config<seq2seq4repair_space>specification<seq2seq4repair_space>" + key ) ) ; System . exit ( 4 ) ; } if ( ( s . equalsIgnoreCase ( config ) ) || ( s . equalsIgnoreCase ( "all" ) ) ) { match = true ; break ; } } } else { System . out . println ( ( "Need<seq2seq4repair_space>config<seq2seq4repair_space>specification<seq2seq4repair_space>for<seq2seq4repair_space>" + key ) ) ; System . exit ( 2 ) ; } if ( match ) { outputProp . put ( key , moduleList . getProperty ( key ) ) ; String envKey = "derby.env.classes." . concat ( tag ) ; if ( ( moduleList . getProperty ( envKey ) ) != null ) outputProp . put ( envKey , moduleList . getProperty ( envKey ) ) ; envKey = "derby.env.jdk." . concat ( tag ) ; if ( ( moduleList . getProperty ( envKey ) ) != null ) { boolean saveEnvKey = true ; if ( ( tag . endsWith ( "J1" ) ) || ( tag . endsWith ( "J2" ) ) ) { int length = ( tag . length ( ) ) - 2 ; String alternateTag = tag . substring ( 0 , length ) ; if ( tag . endsWith ( "J1" ) ) alternateTag += "J2" ; else alternateTag += "J1" ; String alternateImplKey = "derby.module." + alternateTag ; String alternateJDKEnv = "derby.env.jdk." + alternateTag ; String alternateImplConfigKey = "cloudscape.config." + alternateTag ; if ( ( ( ( moduleList . getProperty ( alternateImplKey ) ) != null ) && ( ( moduleList . getProperty ( alternateJDKEnv ) ) != null ) ) && ( ( moduleList . getProperty ( alternateImplConfigKey ) ) != null ) ) { String alternateConfigProp = moduleList . getProperty ( alternateImplConfigKey ) ; StringTokenizer st2 = new StringTokenizer ( alternateConfigProp , "," ) ; boolean ok = false ; while ( st2 . hasMoreTokens ( ) ) { String s = st2 . nextToken ( ) . trim ( ) ; if ( ( s . equalsIgnoreCase ( config ) ) || ( s . equalsIgnoreCase ( "all" ) ) ) { ok = true ; break ; } } if ( ! ok ) saveEnvKey = false ; } } if ( saveEnvKey ) outputProp . put ( envKey , moduleList . getProperty ( envKey ) ) ; } } } } FileOutputStream os = new FileOutputStream ( outputfile ) ; try { <START_BUG> outputProp . save ( os , propertyconfig . header . concat ( "#<seq2seq4repair_space>config<seq2seq4repair_space>is<seq2seq4repair_space>" ) . concat ( config ) . concat ( propertyconfig . footer ) ) ; <END_BUG> } finally { if ( os != null ) os . close ( ) ; } } private static void printUsageAndExit ( ) { } }

Fix:
outputProp . store ( os , propertyconfig . header . concat ( "#<seq2seq4repair_space>config<seq2seq4repair_space>is<seq2seq4repair_space>" ) . concat ( config ) . concat ( propertyconfig . footer ) ) ;