Program: 134734
Project: 134734
Buggy source:
/** 
 * @throws IOException 
 * @see StructType#printStructClass(String,PrintWriter)
 */
public void printStructClass() throws IOException {
  String idlName=struct.full_name();
  String className=namingExpert.getClassNameForStruct(struct);
  String fullName=struct.full_name();
  String jpackage=fullName.substring(0,fullName.lastIndexOf('.'));
  File f=XmlIdlCompiler.createFile(jpackage,className);
  if (!GlobalInputStream.isMoreRecentThan(f)) {
    return;
  }
  PrintWriter ps=new PrintWriter(new java.io.FileWriter(f));
  if (!jpackage.equals("String_Node_Str")) {
    ps.println("String_Node_Str" + jpackage + "String_Node_Str");
    ps.println();
  }
  ps.println("String_Node_Str");
  ps.println("String_Node_Str" + idlName);
  ps.println("String_Node_Str");
  ps.println("String_Node_Str");
  ps.println("String_Node_Str");
  ps.println("String_Node_Str" + parser.getFinalString() + "String_Node_Str"+ className);
  ps.println("String_Node_Str");
  if (struct.memberlist != null) {
class StructMember {
      String typeName;
      String memberName;
      public StructMember(      String typeName,      String memberName){
        this.typeName=typeName;
        this.memberName=memberName;
      }
    }
    List<StructMember> memberList=new ArrayList<StructMember>();
    for (Enumeration e=struct.memberlist.v.elements(); e.hasMoreElements(); ) {
      Member m=(Member)e.nextElement();
      TypeSpec tspec=m.type_spec;
      String acsTypeName=null;
      if (tspec instanceof AliasTypeSpec && xmlTypedefs.contains(tspec)) {
        acsTypeName=namingExpert.getJavaTypeForXmlTypedef((AliasTypeSpec)tspec);
      }
 else       if (tspec instanceof ConstrTypeSpec && xmlAwareStructs.contains(((ConstrTypeSpec)tspec).c_type_spec)) {
        acsTypeName=namingExpert.getJavaTypeForXmlStruct(struct);
      }
 else {
        acsTypeName=tspec.toString();
      }
      memberList.add(new StructMember(acsTypeName,m.declarator.name()));
    }
    for (    StructMember structMember : memberList) {
      ps.print("String_Node_Str" + structMember.typeName + "String_Node_Str"+ structMember.memberName+ "String_Node_Str");
      ps.println();
    }
    ps.println();
    ps.print("String_Node_Str" + className + "String_Node_Str");
    for (Iterator<StructMember> iterator=memberList.iterator(); iterator.hasNext(); ) {
      StructMember structMember=iterator.next();
      ps.print(structMember.typeName + "String_Node_Str" + structMember.memberName);
      if (iterator.hasNext()) {
        ps.print("String_Node_Str");
      }
    }
    ps.println("String_Node_Str");
    ps.println("String_Node_Str");
    for (Iterator<StructMember> iterator=memberList.iterator(); iterator.hasNext(); ) {
      StructMember structMember=iterator.next();
      ps.print("String_Node_Str");
      ps.print(structMember.memberName);
      ps.print("String_Node_Str");
      ps.println(structMember.memberName + "String_Node_Str");
    }
    ps.println("String_Node_Str");
  }
  ps.println("String_Node_Str");
  ps.close();
}

Fixed version (ground truth):
/** 
 * @throws IOException 
 * @see StructType#printStructClass(String,PrintWriter)
 */
public void printStructClass() throws IOException {
  String idlName=struct.full_name();
  String className=namingExpert.getClassNameForStruct(struct);
  String fullName=struct.full_name();
  String jpackage=fullName.substring(0,fullName.lastIndexOf('.'));
  File f=XmlIdlCompiler.createFile(jpackage,className);
  if (!GlobalInputStream.isMoreRecentThan(f)) {
    return;
  }
  PrintWriter ps=new PrintWriter(new java.io.FileWriter(f));
  if (!jpackage.equals("String_Node_Str")) {
    ps.println("String_Node_Str" + jpackage + "String_Node_Str");
    ps.println();
  }
  ps.println("String_Node_Str");
  ps.println("String_Node_Str" + idlName);
  ps.println("String_Node_Str");
  ps.println("String_Node_Str");
  ps.println("String_Node_Str");
  ps.println("String_Node_Str" + parser.getFinalString() + "String_Node_Str"+ className);
  ps.println("String_Node_Str");
  if (struct.memberlist != null) {
class StructMember {
      String typeName;
      String memberName;
      public StructMember(      String typeName,      String memberName){
        this.typeName=typeName;
        this.memberName=memberName;
      }
    }
    List<StructMember> memberList=new ArrayList<StructMember>();
    for (Enumeration e=struct.memberlist.v.elements(); e.hasMoreElements(); ) {
      Member m=(Member)e.nextElement();
      TypeSpec tspec=m.type_spec;
      String acsTypeName=null;
      if (tspec instanceof AliasTypeSpec && xmlTypedefs.contains(tspec)) {
        acsTypeName=namingExpert.getJavaTypeForXmlTypedef((AliasTypeSpec)tspec);
      }
 else       if (tspec instanceof ConstrTypeSpec && xmlAwareStructs.contains(((ConstrTypeSpec)tspec).c_type_spec)) {
        acsTypeName=namingExpert.getJavaTypeForXmlStruct(struct);
      }
 else {
        acsTypeName=tspec.toString();
      }
      memberList.add(new StructMember(acsTypeName,m.declarator.name()));
    }
    for (    StructMember structMember : memberList) {
      ps.print("String_Node_Str" + structMember.typeName + "String_Node_Str"+ structMember.memberName+ "String_Node_Str");
      ps.println();
    }
    ps.println();
    ps.println("String_Node_Str" + className + "String_Node_Str");
    ps.print("String_Node_Str" + className + "String_Node_Str");
    for (Iterator<StructMember> iterator=memberList.iterator(); iterator.hasNext(); ) {
      StructMember structMember=iterator.next();
      ps.print(structMember.typeName + "String_Node_Str" + structMember.memberName);
      if (iterator.hasNext()) {
        ps.print("String_Node_Str");
      }
    }
    ps.println("String_Node_Str");
    ps.println("String_Node_Str");
    for (Iterator<StructMember> iterator=memberList.iterator(); iterator.hasNext(); ) {
      StructMember structMember=iterator.next();
      ps.print("String_Node_Str");
      ps.print(structMember.memberName);
      ps.print("String_Node_Str");
      ps.println(structMember.memberName + "String_Node_Str");
    }
    ps.println("String_Node_Str");
  }
  ps.println("String_Node_Str");
  ps.close();
}