Program: 24138
Project: 24138
Buggy source:
private boolean addDefineRowToTable(XhtmlNode t,ConceptDefinitionComponent c,int i,boolean comment,boolean deprecated,Map<ConceptMap,String> maps){
  boolean hasExtensions=false;
  XhtmlNode tr=t.addTag("String_Node_Str");
  XhtmlNode td=tr.addTag("String_Node_Str");
  String s=Utilities.padLeft("String_Node_Str",'.',i * 2);
  td.addText(s);
  td.addText(c.getCode());
  if (c.getCode() != null) {
    XhtmlNode a=td.addTag("String_Node_Str");
    a.setAttribute("String_Node_Str",Utilities.nmtokenize(c.getCode()));
    a.addText("String_Node_Str");
  }
  td=tr.addTag("String_Node_Str");
  if (c.getDisplay() != null)   td.addText(c.getDisplay());
  td=tr.addTag("String_Node_Str");
  if (c.getDefinition() != null)   smartAddText(td,c.getDefinition());
  if (deprecated) {
    td=tr.addTag("String_Node_Str");
    s=ToolingExtensions.getDeprecated(c);
    if (s != null) {
      smartAddText(td,s);
      hasExtensions=true;
    }
  }
  if (comment) {
    td=tr.addTag("String_Node_Str");
    s=ToolingExtensions.getComment(c);
    if (s != null) {
      smartAddText(td,s);
      hasExtensions=true;
    }
  }
  for (  ConceptMap m : maps.keySet()) {
    td=tr.addTag("String_Node_Str");
    List<ConceptMapElementMapComponent> mappings=findMappingsForCode(c.getCode(),m);
    boolean first=true;
    for (    ConceptMapElementMapComponent mapping : mappings) {
      if (!first)       td.addTag("String_Node_Str");
      first=false;
      XhtmlNode span=td.addTag("String_Node_Str");
      span.setAttribute("String_Node_Str",mapping.getEquivalence() == null ? "String_Node_Str" : mapping.getEquivalence().toString());
      span.addText(getCharForEquivalence(mapping));
      a=td.addTag("String_Node_Str");
      a.setAttribute("String_Node_Str",prefix + maps.get(m) + "String_Node_Str"+ mapping.getCode());
      a.addText(mapping.getCode());
      if (!Utilities.noString(mapping.getComments()))       td.addTag("String_Node_Str").addText("String_Node_Str" + mapping.getComments() + "String_Node_Str");
    }
  }
  for (  CodeType e : ToolingExtensions.getSubsumes(c)) {
    hasExtensions=true;
    tr=t.addTag("String_Node_Str");
    td=tr.addTag("String_Node_Str");
    s=Utilities.padLeft("String_Node_Str",'.',i * 2);
    td.addText(s);
    a=td.addTag("String_Node_Str");
    a.setAttribute("String_Node_Str","String_Node_Str" + Utilities.nmtokenize(e.getValue()));
    a.addText(c.getCode());
  }
  for (  ConceptDefinitionComponent cc : c.getConcept()) {
    hasExtensions=addDefineRowToTable(t,cc,i + 1,comment,deprecated,maps) || hasExtensions;
  }
  return hasExtensions;
}

Fixed version (ground truth):
private boolean addDefineRowToTable(XhtmlNode t,ConceptDefinitionComponent c,int i,boolean comment,boolean deprecated,Map<ConceptMap,String> maps){
  boolean hasExtensions=false;
  XhtmlNode tr=t.addTag("String_Node_Str");
  XhtmlNode td=tr.addTag("String_Node_Str");
  String s=Utilities.padLeft("String_Node_Str",'.',i * 2);
  td.addText(s);
  td.addText(c.getCode());
  XhtmlNode a;
  if (c.getCode() != null) {
    a=td.addTag("String_Node_Str");
    a.setAttribute("String_Node_Str",Utilities.nmtokenize(c.getCode()));
    a.addText("String_Node_Str");
  }
  td=tr.addTag("String_Node_Str");
  if (c.getDisplay() != null)   td.addText(c.getDisplay());
  td=tr.addTag("String_Node_Str");
  if (c.getDefinition() != null)   smartAddText(td,c.getDefinition());
  if (deprecated) {
    td=tr.addTag("String_Node_Str");
    s=ToolingExtensions.getDeprecated(c);
    if (s != null) {
      smartAddText(td,s);
      hasExtensions=true;
    }
  }
  if (comment) {
    td=tr.addTag("String_Node_Str");
    s=ToolingExtensions.getComment(c);
    if (s != null) {
      smartAddText(td,s);
      hasExtensions=true;
    }
  }
  for (  ConceptMap m : maps.keySet()) {
    td=tr.addTag("String_Node_Str");
    List<ConceptMapElementMapComponent> mappings=findMappingsForCode(c.getCode(),m);
    boolean first=true;
    for (    ConceptMapElementMapComponent mapping : mappings) {
      if (!first)       td.addTag("String_Node_Str");
      first=false;
      XhtmlNode span=td.addTag("String_Node_Str");
      span.setAttribute("String_Node_Str",mapping.getEquivalence() == null ? "String_Node_Str" : mapping.getEquivalence().toString());
      span.addText(getCharForEquivalence(mapping));
      a=td.addTag("String_Node_Str");
      a.setAttribute("String_Node_Str",prefix + maps.get(m) + "String_Node_Str"+ mapping.getCode());
      a.addText(mapping.getCode());
      if (!Utilities.noString(mapping.getComments()))       td.addTag("String_Node_Str").addText("String_Node_Str" + mapping.getComments() + "String_Node_Str");
    }
  }
  for (  CodeType e : ToolingExtensions.getSubsumes(c)) {
    hasExtensions=true;
    tr=t.addTag("String_Node_Str");
    td=tr.addTag("String_Node_Str");
    s=Utilities.padLeft("String_Node_Str",'.',i * 2);
    td.addText(s);
    a=td.addTag("String_Node_Str");
    a.setAttribute("String_Node_Str","String_Node_Str" + Utilities.nmtokenize(e.getValue()));
    a.addText(c.getCode());
  }
  for (  ConceptDefinitionComponent cc : c.getConcept()) {
    hasExtensions=addDefineRowToTable(t,cc,i + 1,comment,deprecated,maps) || hasExtensions;
  }
  return hasExtensions;
}