Program: 24121
Project: 24121
Buggy source:
public void write(int lvl,StringBuilder s,ValueSet vs,List<ConceptDefinitionComponent> list,ConceptDefinitionComponent owner,Map<String,ConceptDefinitionComponent> handled) throws Exception {
  if (!select && children.size() == 0)   return;
  if (handled.containsKey(code)) {
    if (owner == null)     throw new Exception("String_Node_Str");
    ToolingExtensions.addSubsumes(owner,code);
    s.append("String_Node_Str" + Integer.toString(lvl) + "String_Node_Str");
    for (int i=1; i < lvl; i++)     s.append("String_Node_Str");
    s.append("String_Node_Str" + Utilities.escapeXml(Utilities.nmtokenize(code)) + "String_Node_Str"+ Utilities.escapeXml(code)+ "String_Node_Str");
  }
 else {
    ConceptDefinitionComponent concept=new ValueSet.ConceptDefinitionComponent();
    handled.put(code,concept);
    concept.setCode(code);
    concept.setDisplay(display);
    concept.setDefinition(textDefinition);
    concept.setAbstract(!select);
    String d="String_Node_Str";
    if (deprecated) {
      ToolingExtensions.markDeprecated(concept);
      d="String_Node_Str";
    }
    list.add(concept);
    s.append("String_Node_Str" + (deprecated ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Integer.toString(lvl)+ "String_Node_Str");
    for (int i=1; i < lvl; i++)     s.append("String_Node_Str");
    if (select) {
      s.append(Utilities.escapeXml(code) + "String_Node_Str" + Utilities.escapeXml(Utilities.nmtokenize(code))+ "String_Node_Str"+ d+ "String_Node_Str"+ Utilities.escapeXml(display)+ "String_Node_Str");
    }
 else     s.append("String_Node_Str" + Utilities.escapeXml(code) + "String_Node_Str"+ d+ "String_Node_Str"+ Utilities.escapeXml(Utilities.nmtokenize(code))+ "String_Node_Str");
    if (definition != null)     s.append(definition);
    s.append("String_Node_Str");
    for (    CodeInfo child : children) {
      child.write(lvl + 1,s,vs,concept.getConcept(),concept,handled);
    }
  }
}

Fixed version (ground truth):
public void write(int lvl,StringBuilder s,ValueSet vs,List<ConceptDefinitionComponent> list,ConceptDefinitionComponent owner,Map<String,ConceptDefinitionComponent> handled) throws Exception {
  if (!select && children.size() == 0)   return;
  if (handled.containsKey(code)) {
    if (owner == null)     throw new Exception("String_Node_Str");
    ToolingExtensions.addSubsumes(owner,code);
    s.append("String_Node_Str").append(Integer.toString(lvl)).append("String_Node_Str");
    for (int i=1; i < lvl; i++)     s.append("String_Node_Str");
    s.append("String_Node_Str").append(Utilities.escapeXml(Utilities.nmtokenize(code))).append("String_Node_Str").append(Utilities.escapeXml(code)).append("String_Node_Str");
  }
 else {
    ConceptDefinitionComponent concept=new ValueSet.ConceptDefinitionComponent();
    handled.put(code,concept);
    concept.setCode(code);
    concept.setDisplay(display);
    concept.setDefinition(textDefinition);
    concept.setAbstract(!select);
    String d="String_Node_Str";
    if (deprecated) {
      ToolingExtensions.markDeprecated(concept);
      d="String_Node_Str";
    }
    list.add(concept);
    s.append("String_Node_Str" + (deprecated ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Integer.toString(lvl)+ "String_Node_Str");
    for (int i=1; i < lvl; i++)     s.append("String_Node_Str");
    if (select) {
      s.append(Utilities.escapeXml(code) + "String_Node_Str" + Utilities.escapeXml(Utilities.nmtokenize(code))+ "String_Node_Str"+ d+ "String_Node_Str"+ Utilities.escapeXml(display)+ "String_Node_Str");
    }
 else     s.append("String_Node_Str" + Utilities.escapeXml(code) + "String_Node_Str"+ d+ "String_Node_Str"+ Utilities.escapeXml(Utilities.nmtokenize(code))+ "String_Node_Str");
    if (definition != null)     s.append(definition);
    s.append("String_Node_Str");
    for (    CodeInfo child : children) {
      child.write(lvl + 1,s,vs,concept.getConcept(),concept,handled);
    }
  }
}