Buggy code:
public class GeneratorPHP extends Generator implements FileGenerator , PluggableNotation { public static boolean VERBOSE = false ; private static Section sect ; private static GeneratorPHP SINGLETON = new GeneratorPHP ( ) ; public static GeneratorPHP getInstance ( ) { } public GeneratorPHP ( ) { } public static String Generate ( Object o ) { } public String GenerateFile ( MClassifier cls , String path ) { GeneratorPHP . sect = new Section ( ) ; String name = cls . getName ( ) ; if ( ( name == null ) || ( ( name . length ( ) ) == 0 ) ) return null ; String filename = name + ".php" ; if ( ! ( path . endsWith ( FILE_SEPARATOR ) ) ) path += FILE_SEPARATOR ; String packagePath = cls . getNamespace ( ) . getName ( ) ; MNamespace parent = cls . getNamespace ( ) . getNamespace ( ) ; while ( parent != null ) { if ( ( parent . getNamespace ( ) ) != null ) packagePath = ( ( parent . getName ( ) ) + "." ) + packagePath ; parent = parent . getNamespace ( ) ; } int lastIndex = - 1 ; do { File f = new File ( path ) ; if ( ! ( f . isDirectory ( ) ) ) { if ( ! ( f . mkdir ( ) ) ) { System . out . println ( ( "<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>make<seq2seq4repair_space>directory<seq2seq4repair_space>" + path ) ) ; return null ; } } if ( lastIndex == ( packagePath . length ( ) ) ) break ; int index = packagePath . indexOf ( "." , ( lastIndex + 1 ) ) ; if ( index == ( - 1 ) ) index = packagePath . length ( ) ; path += ( packagePath . substring ( ( lastIndex + 1 ) , index ) ) + ( FILE_SEPARATOR ) ; lastIndex = index ; } while ( true ) ; String pathname = path + filename ; System . out . println ( ( ( "-----" + pathname ) + "-----" ) ) ; File f = new File ( pathname ) ; if ( f . exists ( ) ) { System . out . println ( ( "Generating<seq2seq4repair_space>(updated)<seq2seq4repair_space>" + ( f . getPath ( ) ) ) ) ; GeneratorPHP . sect . read ( pathname ) ; } else { System . out . println ( ( "Generating<seq2seq4repair_space>(new)<seq2seq4repair_space>" + ( f . getPath ( ) ) ) ) ; } String header = GeneratorPHP . SINGLETON . generateHeader ( cls , pathname , packagePath ) ; String src = GeneratorPHP . SINGLETON . generate ( cls ) ; BufferedWriter fos = null ; try { fos = new BufferedWriter ( new FileWriter ( f ) ) ; fos . write ( header ) ; fos . write ( src ) ; } catch ( IOException exp ) { } finally { try { if ( fos != null ) fos . close ( ) ; } catch ( IOException exp ) { System . out . println ( ( "FAILED:<seq2seq4repair_space>" + ( f . getPath ( ) ) ) ) ; } } <START_BUG> GeneratorPHP . sect . write ( pathname , INDENT ) ; <END_BUG> System . out . println ( ( "written:<seq2seq4repair_space>" + pathname ) ) ; File f1 = new File ( ( pathname + ".bak" ) ) ; if ( f1 . exists ( ) ) { f1 . delete ( ) ; } File f2 = new File ( pathname ) ; if ( f2 . exists ( ) ) { f2 . renameTo ( new File ( ( pathname + ".bak" ) ) ) ; } File f3 = new File ( ( pathname + ".out" ) ) ; if ( f3 . exists ( ) ) { f3 . renameTo ( new File ( pathname ) ) ; } System . out . println ( "-----<seq2seq4repair_space>end<seq2seq4repair_space>updating<seq2seq4repair_space>-----" ) ; return pathname ; } public String generateHeader ( MClassifier cls , String pathname , String packagePath ) { } public String generateExtensionPoint ( MExtensionPoint ep ) { } public String generateOperation ( MOperation op , boolean documented ) { } public String generateAttribute ( MAttribute attr , boolean documented ) { } public String generateParameter ( MParameter param ) { } public String generatePackage ( MPackage p ) { } public String generateClassifier ( MClassifier cls ) { } public String generateMethodBody ( MOperation op ) { } public String generateDefaultReturnStatement ( MClassifier cls ) { } public String generateTaggedValues ( MModelElement e ) { } public String generateTaggedValue ( MTaggedValue tv ) { } public String generateConstraintEnrichedDocComment ( MModelElement me , MAssociationEnd ae ) { } public String generateConstraintEnrichedDocComment ( MModelElement me ) { } public String generateConstraints ( MModelElement me ) { } public String generateConstraint ( MConstraint c ) { } public String generateAssociationFrom ( MAssociation a , MAssociationEnd ae ) { } public String generateAssociation ( MAssociation a ) { } public String generateAssociationRole ( MAssociationRole m ) { } public String generateAssociationEnd ( MAssociationEnd ae ) { } public Collection generateGeneralzationCollection ( Collection generalizations ) { } public String generateGeneralzation ( Collection generalizations ) { } public String generateRequireStatements ( Collection generalizations ) { } public String generateSpecification ( MClass cls ) { } public String generateClassList ( Collection classifiers ) { } public String generateRequireStatementList ( Collection classifiers ) { } public String generateVisibility ( MVisibilityKind vis ) { } public String generateVisibility ( MFeature f ) { } public String generateScope ( MFeature f ) { } public String generateAbstractness ( MOperation op ) { } public String generateChangeability ( MOperation op ) { } public String generateChangability ( MStructuralFeature sf ) { } public String generateMultiplicity ( MMultiplicity m ) { } public static final String ANY_RANGE = "0..*" ;

Fix:
GeneratorPHP . sect . write ( pathname , INDENT , true ) ;