Program: 124474
Project: 124474
Buggy source:
private String generateJsCode(int depth,Writer writer) throws IOException {
  Log.getLogger().debug(getIndent(depth) + this);
  if (getData() != null) {
    writer.write(getData());
  }
 else {
    throw new RuntimeException("String_Node_Str" + getName());
  }
  Set<MemberUnit> notImplementedMethods=getNotImplementedMethods();
  if (interfaces.size() > 0) {
    String extendOperator="String_Node_Str";
    if (isInterface)     extendOperator="String_Node_Str";
    writer.write(extendOperator + "String_Node_Str");
    int i=0;
    for (    ClassUnit interFace : interfaces) {
      if (i++ > 0)       writer.write("String_Node_Str");
      writer.write(DragomeJavaScriptGenerator.normalizeExpression(interFace.getSignature().toString()));
    }
    writer.write("String_Node_Str");
  }
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  MemberUnit clinitMethod=null;
  List<MemberUnit> staticMethods=new ArrayList<MemberUnit>();
  boolean first=true;
  for (  MemberUnit member : getDeclaredMembers()) {
    if (member.getData() != null && member.getData().startsWith(STATIC_MEMBER)) {
      staticMethods.add(member);
    }
 else     if (member.getData() != null && member.getData().contains("String_Node_Str")) {
      stringInits.add(member);
    }
 else {
      if (member.getData() != null && member.getData().trim().length() > 0) {
        if (!first)         writer.write("String_Node_Str");
        first=false;
        writeMethodAlternative(depth,writer,member);
        if (member instanceof ProcedureUnit) {
          project.currentGeneratedMethods++;
          writer.flush();
        }
      }
    }
    if (isClinit(member))     clinitMethod=member;
  }
  for (  MemberUnit member : notImplementedMethods) {
    if (!first)     writer.write("String_Node_Str");
    first=false;
    String methodData=member.getData().replace(STATIC_MEMBER,"String_Node_Str");
    methodData=methodData.substring(0,methodData.indexOf("String_Node_Str"));
    writer.write(methodData);
    writer.write("String_Node_Str");
    writer.write(member.getDeclaringClass().toString().replace("String_Node_Str","String_Node_Str"));
    writer.write("String_Node_Str");
    writer.write(methodData.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"));
    writer.write("String_Node_Str");
    if (member instanceof ProcedureUnit) {
      project.currentGeneratedMethods++;
      writer.flush();
    }
  }
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  if (clinitMethod != null) {
    String name=DragomeJavaScriptGenerator.normalizeExpression(clinitMethod.getDeclaringClass().getName());
    String replace=clinitMethod.getData().replace("String_Node_Str",name + "String_Node_Str");
    replace=replace.replace("String_Node_Str","String_Node_Str");
    replace=replace.substring(0,replace.length() - 2) + "String_Node_Str";
    String memberData=clinitMethod.getData();
    clinitMethod.setData(replace.replace(STATIC_MEMBER,"String_Node_Str"));
    clinitMethod.write(depth,writer);
    clinitMethod.setData(memberData);
    String modifyMethodName=DragomeJavaScriptGenerator.normalizeExpression(clinitMethod.getSignature());
    project.getClinits().add("String_Node_Str" + name + "String_Node_Str");
  }
 else {
    String replace="String_Node_Str";
    writer.write(replace);
  }
  boolean hasStaticMembers=staticMethods.size() > 0;
  if (hasStaticMembers)   writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  first=true;
  for (  MemberUnit member : staticMethods) {
    if (member != clinitMethod) {
      if (!first)       writer.write("String_Node_Str");
      first=false;
      String memberData=member.getData();
      member.setData(member.getData().replace(STATIC_MEMBER,"String_Node_Str"));
      writeMethodAlternative(depth,writer,member);
      member.setData(memberData);
      if (member instanceof ProcedureUnit || member instanceof FieldUnit) {
        if (member instanceof ProcedureUnit)         project.currentGeneratedMethods++;
        writer.flush();
      }
    }
  }
  first=addSuperStaticMethods(writer,!hasStaticMembers ^ first);
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  return writer.toString();
}

Fixed version (ground truth):
private String generateJsCode(int depth,Writer writer) throws IOException {
  Log.getLogger().debug(getIndent(depth) + this);
  if (getData() != null) {
    writer.write(getData());
  }
 else {
    throw new RuntimeException("String_Node_Str" + getName());
  }
  Set<MemberUnit> notImplementedMethods=getNotImplementedMethods();
  if (interfaces.size() > 0) {
    String extendOperator="String_Node_Str";
    if (isInterface)     extendOperator="String_Node_Str";
    writer.write(extendOperator + "String_Node_Str");
    int i=0;
    for (    ClassUnit interFace : interfaces) {
      if (i++ > 0)       writer.write("String_Node_Str");
      writer.write(DragomeJavaScriptGenerator.normalizeExpression(interFace.getSignature().toString()));
    }
    writer.write("String_Node_Str");
  }
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  MemberUnit clinitMethod=null;
  List<MemberUnit> staticMethods=new ArrayList<MemberUnit>();
  boolean first=true;
  for (  MemberUnit member : getDeclaredMembers()) {
    if (member.getData() != null && member.getData().startsWith(STATIC_MEMBER)) {
      staticMethods.add(member);
    }
 else     if (member.getData() != null && member.getData().contains("String_Node_Str")) {
      stringInits.add(member);
    }
 else {
      if (member.getData() != null && member.getData().trim().length() > 0) {
        if (!first)         writer.write("String_Node_Str");
        first=false;
        writeMethodAlternative(depth,writer,member);
        if (member instanceof ProcedureUnit) {
          project.currentGeneratedMethods++;
          writer.flush();
        }
      }
    }
    if (isClinit(member))     clinitMethod=member;
  }
  for (  MemberUnit member : notImplementedMethods) {
    if (!first)     writer.write("String_Node_Str");
    first=false;
    String methodData=member.getData().replace(STATIC_MEMBER,"String_Node_Str");
    methodData=methodData.substring(0,methodData.indexOf("String_Node_Str"));
    writer.write(methodData);
    writer.write("String_Node_Str");
    writer.write(member.getDeclaringClass().toString().replace("String_Node_Str","String_Node_Str"));
    writer.write("String_Node_Str");
    writer.write(methodData.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"));
    writer.write("String_Node_Str");
    if (member instanceof ProcedureUnit) {
      project.currentGeneratedMethods++;
      writer.flush();
    }
  }
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  writeClinit(depth,writer,clinitMethod,staticMethods);
  boolean hasStaticMembers=staticMethods.size() > 0;
  if (hasStaticMembers)   writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  first=true;
  for (  MemberUnit member : staticMethods) {
    if (member != clinitMethod) {
      if (!first)       writer.write("String_Node_Str");
      first=false;
      String memberData=member.getData();
      member.setData(member.getData().replace(STATIC_MEMBER,"String_Node_Str"));
      writeMethodAlternative(depth,writer,member);
      member.setData(memberData);
      if (member instanceof ProcedureUnit || member instanceof FieldUnit) {
        if (member instanceof ProcedureUnit)         project.currentGeneratedMethods++;
        writer.flush();
      }
    }
  }
  first=addSuperStaticMethods(writer,!hasStaticMembers ^ first,staticMethods);
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  return writer.toString();
}