nus-yam/ex-repair huggingface dataset:
Program: 24130
Project: 24130
Buggy source:
private String getCharForEquivalence(ConceptMapElementMapComponent mapping){
switch (mapping.getEquivalence()) {
case EQUAL:
    return "String_Node_Str";
case EQUIVALENT:
  return "String_Node_Str";
case WIDER:
return "String_Node_Str";
case NARROWER:
return "String_Node_Str";
case INEXACT:
return "String_Node_Str";
case UNMATCHED:
return "String_Node_Str";
case DISJOINT:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
private String getCharForEquivalence(ConceptMapElementMapComponent mapping){
  if (mapping.getEquivalence() == null)   return "String_Node_Str";
switch (mapping.getEquivalence()) {
case EQUAL:
    return "String_Node_Str";
case EQUIVALENT:
  return "String_Node_Str";
case WIDER:
return "String_Node_Str";
case NARROWER:
return "String_Node_Str";
case INEXACT:
return "String_Node_Str";
case UNMATCHED:
return "String_Node_Str";
case DISJOINT:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}
Program: 24141
Project: 24141
Buggy source:
public String describeSlice(ElementSlicingComponent slicing){
  return (slicing.getOrdered() ? "String_Node_Str" : "String_Node_Str") + describe(slicing.getRules()) + "String_Node_Str"+ slicing.getDiscriminator().toString();
}

Fixed version (ground truth):
public String describeSlice(ElementSlicingComponent slicing){
  return (slicing.getOrdered() ? "String_Node_Str" : "String_Node_Str") + describe(slicing.getRules()) + "String_Node_Str"+ commas(slicing.getDiscriminator());
}
Program: 24143
Project: 24143
Buggy source:
public static Coding makeCoding(String code) throws Exception {
  String[] parts=code.split("String_Node_Str");
  Coding c=new Coding();
  if (parts.length == 2) {
    c.setSystem(parts[0]);
    c.setCode(parts[1]);
  }
 else   if (parts.length == 3) {
    c.setSystem(parts[0]);
    c.setCode(parts[1]);
    c.setDisplay(parts[2]);
  }
 else   throw new Exception("String_Node_Str");
  return c;
}

Fixed version (ground truth):
public static Coding makeCoding(String code) throws Exception {
  String[] parts=code.split("String_Node_Str");
  Coding c=new Coding();
  if (parts.length == 2) {
    c.setSystem(parts[0]);
    c.setCode(parts[1]);
  }
 else   if (parts.length == 3) {
    c.setSystem(parts[0]);
    c.setCode(parts[1]);
    c.setDisplay(parts[2]);
  }
 else   throw new Exception("String_Node_Str" + code + "String_Node_Str");
  return c;
}
Program: 24146
Project: 24146
Buggy source:
private ValueSet makeTypeList(Profile profile,List<TypeRefComponent> types,String path){
  ValueSet vs=new ValueSet();
  vs.setIdentifierSimple(Utilities.makeUuidUrn());
  vs.setNameSimple("String_Node_Str" + path);
  vs.setDescriptionSimple(vs.getNameSimple());
  vs.setStatusSimple(ValuesetStatus.active);
  vs.setExpansion(new ValueSetExpansionComponent());
  vs.getExpansion().setTimestampSimple(DateAndTime.now());
  for (  TypeRefComponent t : types) {
    ValueSetExpansionContainsComponent cc=vs.getExpansion().addContains();
    if (t.getCodeSimple().equals("String_Node_Str") && (t.getProfileSimple() != null && t.getProfileSimple().startsWith("String_Node_Str"))) {
      cc.setCodeSimple(t.getProfileSimple().substring(28));
      cc.setSystemSimple("String_Node_Str");
      cc.setDisplaySimple(cc.getCodeSimple());
    }
 else {
      ProfileUtilities pu=new ProfileUtilities(context);
      StrucResult ps=null;
      if (!Utilities.noString(t.getProfileSimple()))       ps=pu.getStructure(profile,t.getProfileSimple());
      if (ps != null && ps.getStructure() != null) {
        cc.setCodeSimple(t.getProfileSimple());
        cc.setDisplaySimple(structure.getNameSimple());
        cc.setSystemSimple("String_Node_Str");
      }
 else {
        cc.setCodeSimple(t.getCodeSimple());
        cc.setDisplaySimple(t.getCodeSimple());
        cc.setSystemSimple("String_Node_Str");
      }
    }
    t.setTag("String_Node_Str",cc.getCodeSimple());
  }
  return vs;
}

Fixed version (ground truth):
private ValueSet makeTypeList(Profile profile,List<TypeRefComponent> types,String path) throws Exception {
  ValueSet vs=new ValueSet();
  vs.setIdentifierSimple(Utilities.makeUuidUrn());
  vs.setNameSimple("String_Node_Str" + path);
  vs.setDescriptionSimple(vs.getNameSimple());
  vs.setStatusSimple(ValuesetStatus.active);
  vs.setExpansion(new ValueSetExpansionComponent());
  vs.getExpansion().setTimestampSimple(DateAndTime.now());
  for (  TypeRefComponent t : types) {
    ValueSetExpansionContainsComponent cc=vs.getExpansion().addContains();
    if (t.getCodeSimple().equals("String_Node_Str") && (t.getProfileSimple() != null && t.getProfileSimple().startsWith("String_Node_Str"))) {
      cc.setCodeSimple(t.getProfileSimple().substring(28));
      cc.setSystemSimple("String_Node_Str");
      cc.setDisplaySimple(cc.getCodeSimple());
    }
 else {
      ProfileUtilities pu=new ProfileUtilities(context);
      StrucResult ps=null;
      if (!Utilities.noString(t.getProfileSimple()))       ps=pu.getStructure(profile,t.getProfileSimple());
      if (ps != null && ps.getStructure() != null) {
        cc.setCodeSimple(t.getProfileSimple());
        cc.setDisplaySimple(structure.getNameSimple());
        cc.setSystemSimple("String_Node_Str");
      }
 else {
        cc.setCodeSimple(t.getCodeSimple());
        cc.setDisplaySimple(t.getCodeSimple());
        cc.setSystemSimple("String_Node_Str");
      }
    }
    t.setTag("String_Node_Str",cc.getCodeSimple());
  }
  return vs;
}
Program: 24147
Project: 24147
Buggy source:
private void writeText(XhtmlNode node) throws Exception {
  for (  char c : node.getContent().toCharArray()) {
    if (c == '&')     dst.append("String_Node_Str");
 else     if (c == '<')     dst.append("String_Node_Str");
 else     if (c == '>')     dst.append("String_Node_Str");
 else     if (c == '"')     dst.append("String_Node_Str");
 else     if (c == XhtmlNode.NBSP.charAt(0))     dst.append("String_Node_Str");
 else     if (c == (char)0xA7)     dst.append("String_Node_Str");
 else     if (c == (char)169)     dst.append("String_Node_Str");
 else     if (c == (char)8482)     dst.append("String_Node_Str");
 else     if (c == (char)956)     dst.append("String_Node_Str");
 else     if (c == (char)174)     dst.append("String_Node_Str");
 else     dst.append(c);
  }
}

Fixed version (ground truth):
private void writeText(XhtmlNode node) throws Exception {
  for (  char c : node.getContent().toCharArray()) {
    if (c == '&')     dst.append("String_Node_Str");
 else     if (c == '<')     dst.append("String_Node_Str");
 else     if (c == '>')     dst.append("String_Node_Str");
 else     if (c == '"')     dst.append("String_Node_Str");
 else     if (!xmlOnly) {
      dst.append(c);
    }
 else {
      if (c == XhtmlNode.NBSP.charAt(0))       dst.append("String_Node_Str");
 else       if (c == (char)0xA7)       dst.append("String_Node_Str");
 else       if (c == (char)169)       dst.append("String_Node_Str");
 else       if (c == (char)8482)       dst.append("String_Node_Str");
 else       if (c == (char)956)       dst.append("String_Node_Str");
 else       if (c == (char)174)       dst.append("String_Node_Str");
 else       dst.append(c);
    }
  }
}
Program: 24149
Project: 24149
Buggy source:
public void process() throws Exception {
  byte[] defn=loadDefinitions();
  readDefinitions(engine,defn);
  engine.setProfile(readProfile(loadProfile()));
  engine.setSource(loadSource());
  engine.process();
}

Fixed version (ground truth):
public void process() throws Exception {
  byte[] defn=loadDefinitions();
  readDefinitions(engine,defn);
  if (!Utilities.noString(profile))   engine.setProfile(readProfile(loadProfile()));
  engine.setSource(loadSource());
  engine.process();
}
Program: 24151
Project: 24151
Buggy source:
private void genTypes(HeirarchicalTableGenerator gen,ProfileKnowledgeProvider pkp,Row r,ElementComponent e,String profileBaseFileName) throws Exception {
  Cell c=gen.new Cell();
  r.getCells().add(c);
  boolean first=true;
  for (  TypeRefComponent t : e.getDefinition().getType()) {
    if (first)     first=false;
 else     c.addPiece(gen.new Piece(null,"String_Node_Str",null));
    if (t.getCodeSimple().equals("String_Node_Str")) {
      if (t.getProfileSimple().startsWith("String_Node_Str")) {
        String rn=t.getProfileSimple().substring(28);
        c.addPiece(gen.new Piece(pkp.getLinkFor(rn),rn,null));
      }
 else       if (t.getProfileSimple().startsWith("String_Node_Str"))       c.addPiece(gen.new Piece(profileBaseFileName + "String_Node_Str" + t.getProfileSimple().substring(1).toLowerCase()+ "String_Node_Str",t.getProfileSimple(),null));
 else       c.addPiece(gen.new Piece(t.getProfileSimple(),t.getProfileSimple(),null));
    }
 else     if (pkp.hasLinkFor(t.getCodeSimple())) {
      c.addPiece(gen.new Piece(pkp.getLinkFor(t.getCodeSimple()),t.getCodeSimple(),null));
    }
 else     c.addPiece(gen.new Piece(null,t.getCodeSimple(),null));
  }
}

Fixed version (ground truth):
private void genTypes(HeirarchicalTableGenerator gen,ProfileKnowledgeProvider pkp,Row r,ElementComponent e,String profileBaseFileName,Profile profile) throws Exception {
  Cell c=gen.new Cell();
  r.getCells().add(c);
  boolean first=true;
  for (  TypeRefComponent t : e.getDefinition().getType()) {
    if (first)     first=false;
 else     c.addPiece(gen.new Piece(null,"String_Node_Str",null));
    if (t.getCodeSimple().equals("String_Node_Str") || (t.getCodeSimple().equals("String_Node_Str") && t.getProfile() != null)) {
      if (t.getProfileSimple().startsWith("String_Node_Str")) {
        String rn=t.getProfileSimple().substring(28);
        c.addPiece(gen.new Piece(pkp.getLinkFor(rn),rn,null));
      }
 else       if (t.getProfileSimple().startsWith("String_Node_Str"))       c.addPiece(gen.new Piece(profileBaseFileName + "String_Node_Str" + t.getProfileSimple().substring(1).toLowerCase()+ "String_Node_Str",t.getProfileSimple(),null));
 else       c.addPiece(gen.new Piece(t.getProfileSimple(),t.getProfileSimple(),null));
    }
 else     if (t.getProfile() != null) {
      String ref;
      ref=pkp.getLinkForProfile(profile,t.getProfileSimple());
      if (ref != null) {
        String[] parts=ref.split("String_Node_Str");
        c.addPiece(gen.new Piece(parts[0],parts[1],t.getCodeSimple()));
      }
 else       c.addPiece(gen.new Piece(ref,t.getCodeSimple(),null));
    }
 else     if (pkp.hasLinkFor(t.getCodeSimple())) {
      c.addPiece(gen.new Piece(pkp.getLinkFor(t.getCodeSimple()),t.getCodeSimple(),null));
    }
 else     c.addPiece(gen.new Piece(null,t.getCodeSimple(),null));
  }
}
Program: 24152
Project: 24152
Buggy source:
private void genExtension(String defFile,HeirarchicalTableGenerator gen,List<Row> rows,ProfileExtensionDefnComponent ext,Profile profile,ProfileKnowledgeProvider pkp,String profileBaseFileName) throws Exception {
  Row r=gen.new Row();
  rows.add(r);
  r.setAnchor(ext.getCodeSimple());
  ElementComponent e=ext.getElement().get(0);
  r.getCells().add(gen.new Cell(null,defFile == null ? "String_Node_Str" : defFile + "String_Node_Str" + ext.getCodeSimple(),ext.getCodeSimple(),e.getDefinition().getFormalSimple(),null));
  r.getCells().add(gen.new Cell(null,null,describeCardinality(e.getDefinition(),null,new UnusedTracker()),null,null));
  if (ext.getElement().size() == 1) {
    r.setIcon("String_Node_Str");
    genTypes(gen,pkp,r,e,profileBaseFileName);
  }
 else {
    r.setIcon("String_Node_Str");
    r.getCells().add(gen.new Cell());
  }
  Cell c=generateDescription(gen,r,e,null,true,profile.getUrlSimple(),null,pkp,profile);
  c.addPiece(gen.new Piece("String_Node_Str")).addPiece(gen.new Piece(null,describeExtensionContext(ext),null));
  List<ElementComponent> children=getChildren(ext.getElement(),e);
  for (  ElementComponent child : children)   genElement(defFile == null ? "String_Node_Str" : defFile + "String_Node_Str",gen,r.getSubRows(),child,ext.getElement(),profile,pkp,true,profileBaseFileName);
}

Fixed version (ground truth):
private void genExtension(String defFile,HeirarchicalTableGenerator gen,List<Row> rows,ProfileExtensionDefnComponent ext,Profile profile,ProfileKnowledgeProvider pkp,String profileBaseFileName) throws Exception {
  Row r=gen.new Row();
  rows.add(r);
  r.setAnchor(ext.getCodeSimple());
  ElementComponent e=ext.getElement().get(0);
  r.getCells().add(gen.new Cell(null,defFile == null ? "String_Node_Str" : defFile + "String_Node_Str" + ext.getCodeSimple(),ext.getCodeSimple(),e.getDefinition().getFormalSimple(),null));
  r.getCells().add(gen.new Cell(null,null,describeCardinality(e.getDefinition(),null,new UnusedTracker()),null,null));
  if (ext.getElement().size() == 1) {
    r.setIcon("String_Node_Str");
    genTypes(gen,pkp,r,e,profileBaseFileName,profile);
  }
 else {
    r.setIcon("String_Node_Str");
    r.getCells().add(gen.new Cell());
  }
  Cell c=generateDescription(gen,r,e,null,true,profile.getUrlSimple(),null,pkp,profile);
  c.addPiece(gen.new Piece("String_Node_Str")).addPiece(gen.new Piece(null,describeExtensionContext(ext),null));
  List<ElementComponent> children=getChildren(ext.getElement(),e);
  for (  ElementComponent child : children)   genElement(defFile == null ? "String_Node_Str" : defFile + "String_Node_Str",gen,r.getSubRows(),child,ext.getElement(),profile,pkp,true,profileBaseFileName);
}
Program: 24153
Project: 24153
Buggy source:
public List<String> validate(Profile profile){
  List<String> errors=new ArrayList<String>();
  for (  ProfileStructureComponent sc : profile.getStructure()) {
    for (    ElementComponent ec : sc.getDifferential().getElement()) {
      checkExtensions(profile,errors,sc,"String_Node_Str",ec);
    }
    for (    ElementComponent ec : sc.getSnapshot().getElement()) {
      checkExtensions(profile,errors,sc,"String_Node_Str",ec);
    }
  }
  return errors;
}

Fixed version (ground truth):
public List<String> validate(Profile profile){
  List<String> errors=new ArrayList<String>();
  for (  ProfileStructureComponent sc : profile.getStructure()) {
    for (    ElementComponent ec : sc.getDifferential().getElement()) {
      checkExtensions(profile,errors,sc,"String_Node_Str",ec);
    }
    if (sc.getSnapshot() == null)     errors.add("String_Node_Str" + profile.getNameSimple() + "String_Node_Str"+ sc.getNameSimple());
 else     for (    ElementComponent ec : sc.getSnapshot().getElement()) {
      checkExtensions(profile,errors,sc,"String_Node_Str",ec);
    }
  }
  return errors;
}
Program: 24154
Project: 24154
Buggy source:
private ElementDefinitionBindingComponent generateBinding(String bn,Profile p) throws Exception {
  BindingSpecification src=definitions.getBindingByName(bn);
  if (src == null)   return null;
  ElementDefinitionBindingComponent dst=new Profile.ElementDefinitionBindingComponent();
  dst.setName(Factory.newString_(src.getName()));
  dst.setConformanceSimple(convert(src.getBindingStrength()));
  dst.setIsExtensibleSimple(src.getExtensibility() == BindingExtensibility.Extensible);
  dst.setDescription(Factory.newString_(src.getDefinition()));
  if (src.getBinding() != Binding.Unbound)   dst.setReference(buildReference(src));
  return dst;
}

Fixed version (ground truth):
private ElementDefinitionBindingComponent generateBinding(String bn,Profile p) throws Exception {
  BindingSpecification src=definitions.getBindingByName(bn);
  if (src == null)   return null;
  ElementDefinitionBindingComponent dst=new Profile.ElementDefinitionBindingComponent();
  dst.setName(Factory.newString_(src.getName()));
  if (src.getBindingStrength() != null) {
    dst.setConformanceSimple(convert(src.getBindingStrength()));
    dst.setIsExtensibleSimple(src.getExtensibility() == BindingExtensibility.Extensible);
  }
 else {
    if (src.getElementType() == ElementType.Simple) {
      dst.setConformanceSimple(convert(BindingStrength.Required));
      dst.setIsExtensibleSimple(false);
    }
 else     if (src.getElementType() == ElementType.Complex) {
      dst.setIsExtensibleSimple(true);
      if (src.isExample()) {
        dst.setConformanceSimple(convert(BindingStrength.Example));
      }
 else {
        dst.setConformanceSimple(convert(BindingStrength.Preferred));
      }
    }
 else {
      dst.setConformanceSimple(convert(BindingStrength.Unstated));
      dst.setIsExtensibleSimple(true);
    }
  }
  dst.setDescription(Factory.newString_(src.getDefinition()));
  if (src.getBinding() != Binding.Unbound)   dst.setReference(buildReference(src));
  return dst;
}
Program: 24156
Project: 24156
Buggy source:
private void loadIG() throws FileNotFoundException, Exception {
  for (  String folder : page.getIg().getInputFolders()) {
    File[] files=new File(folder).listFiles();
    if (files != null) {
      for (      File f : files) {
        if (f.getName().endsWith("String_Node_Str")) {
          ResourceOrFeed rf=new XmlParser().parseGeneral(new FileInputStream(f));
          if (rf.getFeed() != null) {
            for (            AtomEntry<? extends org.hl7.fhir.instance.model.Resource> ae : rf.getFeed().getEntryList()) {
              loadIgResource(ae);
            }
          }
 else {
            AtomEntry<org.hl7.fhir.instance.model.Resource> ae=new AtomEntry<org.hl7.fhir.instance.model.Resource>();
            ae.setId(page.getIg().getBaseUri() + rf.getResource().getResourceType().toString() + "String_Node_Str"+ Utilities.fileTitle(f.getAbsolutePath()));
            ae.setResource(rf.getResource());
            ae.getLinks().put("String_Node_Str",page.getIg().getFilePrefix() + f.getName());
            ae.getResource().setTag("String_Node_Str",ae.getLinks().get("String_Node_Str"));
            loadIgResource(ae);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void loadIG() throws FileNotFoundException, Exception {
  for (  String folder : page.getIg().getInputFolders()) {
    File[] files=new File(folder).listFiles();
    if (files != null) {
      for (      File f : files) {
        if (f.getName().endsWith("String_Node_Str")) {
          ResourceOrFeed rf=new XmlParser().parseGeneral(new FileInputStream(f));
          if (rf.getFeed() != null) {
            for (            AtomEntry<? extends org.hl7.fhir.instance.model.Resource> ae : rf.getFeed().getEntryList()) {
              loadIgResource(ae);
            }
          }
 else {
            AtomEntry<org.hl7.fhir.instance.model.Resource> ae=new AtomEntry<org.hl7.fhir.instance.model.Resource>();
            ae.setId(page.getIg().getBaseUri() + rf.getResource().getResourceType().toString() + "String_Node_Str"+ Utilities.fileTitle(f.getAbsolutePath()));
            ae.setResource(rf.getResource());
            ae.setTitle(f.getName());
            ae.getLinks().put("String_Node_Str",page.getIg().getFilePrefix() + f.getName());
            ae.getResource().setTag("String_Node_Str",ae.getLinks().get("String_Node_Str"));
            loadIgResource(ae);
          }
        }
      }
    }
  }
}
Program: 24159
Project: 24159
Buggy source:
/** 
 * @param value
 * @param unit
 */
public Canonical(Decimal value,Term unit){
  super();
  this.value=value;
  this.unit=unit;
}

Fixed version (ground truth):
/** 
 * @param value
 * @param unit
 */
public Canonical(Decimal value){
  super();
  this.value=value;
}
Program: 24160
Project: 24160
Buggy source:
public void divideValue(Decimal divisor) throws Exception {
  value=value.divide(divisor);
}

Fixed version (ground truth):
public void divideValue(int divisor) throws Exception {
  value=value.divide(new Decimal(divisor));
}
Program: 24162
Project: 24162
Buggy source:
public CCDAConverter(UcumService ucumSvc){
  super();
  this.ucumSvc=ucumSvc;
}

Fixed version (ground truth):
public CCDAConverter(UcumService ucumSvc,WorkerContext context){
  super();
  this.ucumSvc=ucumSvc;
  this.context=context;
}
Program: 24163
Project: 24163
Buggy source:
private String addResource(Resource r,String title,String id) throws Exception {
  if (r.getText() == null)   r.setText(new Narrative());
  if (r.getText().getDiv() == null) {
    r.getText().setStatusSimple(NarrativeStatus.generated);
    new NarrativeGenerator("String_Node_Str",null,null,null,null,profiles,null).generate(r);
  }
  AtomEntry<Resource> e=new AtomEntry<Resource>();
  e.setUpdated(DateAndTime.now());
  e.setResource(r);
  e.setTitle(title);
  e.setId(id);
  feed.getEntryList().add(e);
  return id;
}

Fixed version (ground truth):
private String addResource(Resource r,String title,String id) throws Exception {
  if (r.getText() == null)   r.setText(new Narrative());
  if (r.getText().getDiv() == null) {
    r.getText().setStatusSimple(NarrativeStatus.generated);
    new NarrativeGenerator("String_Node_Str",context).generate(r);
  }
  AtomEntry<Resource> e=new AtomEntry<Resource>();
  e.setUpdated(DateAndTime.now());
  e.setResource(r);
  e.setTitle(title);
  e.setId(id);
  feed.getEntryList().add(e);
  return id;
}
Program: 24164
Project: 24164
Buggy source:
public static void main(String[] args){
  try {
    CCDAConverter c=new CCDAConverter(new UcumEssenceService(UCUM_PATH));
    c.initialize(SRC_PATH);
    AtomFeed a=c.convert(new FileInputStream(DEF_PATH + "String_Node_Str"));
    String fx=DEF_PATH + "String_Node_Str";
    XmlComposer x=new XmlComposer();
    x.compose(new FileOutputStream(fx),a,true);
    String fj=DEF_PATH + "String_Node_Str";
    JsonComposer j=new JsonComposer();
    j.compose(new FileOutputStream(fj),a,true);
    System.out.println("String_Node_Str" + fx + "String_Node_Str"+ fj);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  try {
    CCDAConverter c=new CCDAConverter(new UcumEssenceService(UCUM_PATH),WorkerContext.fromPack(Utilities.path(SRC_PATH,"String_Node_Str")));
    AtomFeed a=c.convert(new FileInputStream(DEF_PATH + "String_Node_Str"));
    String fx=DEF_PATH + "String_Node_Str";
    XmlComposer x=new XmlComposer();
    x.compose(new FileOutputStream(fx),a,true);
    String fj=DEF_PATH + "String_Node_Str";
    JsonComposer j=new JsonComposer();
    j.compose(new FileOutputStream(fj),a,true);
    System.out.println("String_Node_Str" + fx + "String_Node_Str"+ fj);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 24167
Project: 24167
Buggy source:
private void updateFromDefinition(ElementComponent dest,ElementComponent source){
  if (dest.getDefinition() == null)   dest.setDefinition(new ElementDefinitionComponent());
  ElementDefinitionComponent dst=dest.getDefinition();
  ElementDefinitionComponent src=source.getDefinition();
  if (src != null) {
    if (src.getShort() != null)     dst.setShort(src.getShort().copy());
    if (src.getFormal() != null)     dst.setFormal(src.getFormal().copy());
    if (src.getComments() != null)     dst.setComments(src.getComments().copy());
    if (src.getRequirements() != null)     dst.setRequirements(src.getRequirements().copy());
    for (    String_ s : src.getSynonym()) {
      if (!dst.hasSynonymSimple(s.getValue()))       dst.getSynonym().add(s.copy());
    }
    if (src.getMin() != null)     dst.setMin(src.getMin().copy());
    if (src.getMax() != null)     dst.setMax(src.getMax().copy());
    if (src.getValue() != null)     dst.setValue(src.getValue().copy());
    if (src.getExample() != null)     dst.setExample(src.getExample().copy());
    if (src.getMaxLength() != null)     dst.setMaxLength(src.getMaxLength().copy());
    if (src.getMustSupport() != null)     dst.setMustSupport(src.getMustSupport().copy());
    if (src.getBinding() != null)     dst.setBinding(src.getBinding().copy());
    src.getType().clear();
    src.getType().addAll(dst.getType());
    dst.getMapping().addAll(src.getMapping());
    dst.getConstraint().addAll(src.getConstraint());
  }
}

Fixed version (ground truth):
private void updateFromDefinition(ElementComponent dest,ElementComponent source){
  if (dest.getDefinition() == null)   dest.setDefinition(new ElementDefinitionComponent());
  ElementDefinitionComponent dst=dest.getDefinition();
  ElementDefinitionComponent src=source.getDefinition();
  if (src != null) {
    if (src.getShort() != null)     dst.setShort(src.getShort().copy());
    if (src.getFormal() != null)     dst.setFormal(src.getFormal().copy());
    if (src.getComments() != null)     dst.setComments(src.getComments().copy());
    if (src.getRequirements() != null)     dst.setRequirements(src.getRequirements().copy());
    for (    String_ s : src.getSynonym()) {
      if (!dst.hasSynonymSimple(s.getValue()))       dst.getSynonym().add(s.copy());
    }
    if (src.getMin() != null)     dst.setMin(src.getMin().copy());
    if (src.getMax() != null)     dst.setMax(src.getMax().copy());
    if (src.getValue() != null)     dst.setValue(src.getValue().copy());
    if (src.getExample() != null)     dst.setExample(src.getExample().copy());
    if (src.getMaxLength() != null)     dst.setMaxLength(src.getMaxLength().copy());
    if (src.getMustSupport() != null)     dst.setMustSupport(src.getMustSupport().copy());
    if (src.getBinding() != null)     dst.setBinding(src.getBinding().copy());
    dst.getType().clear();
    for (    TypeRefComponent t : src.getType())     dst.getType().add(t.copy());
    dst.getMapping().addAll(src.getMapping());
    dst.getConstraint().addAll(src.getConstraint());
  }
}
Program: 24168
Project: 24168
Buggy source:
private void composeProfileProfileStructureComponent(String name,Profile.ProfileStructureComponent element) throws Exception {
  if (element != null) {
    open(name);
    composeBackbone(element);
    composeCodeCore("String_Node_Str",element.getType(),false);
    composeCodeExtras("String_Node_Str",element.getType(),false);
    composeUriCore("String_Node_Str",element.getBase(),false);
    composeUriExtras("String_Node_Str",element.getBase(),false);
    composeStringCore("String_Node_Str",element.getName(),false);
    composeStringExtras("String_Node_Str",element.getName(),false);
    composeBooleanCore("String_Node_Str",element.getPublish(),false);
    composeBooleanExtras("String_Node_Str",element.getPublish(),false);
    composeStringCore("String_Node_Str",element.getPurpose(),false);
    composeStringExtras("String_Node_Str",element.getPurpose(),false);
    composeProfileConstraintComponent("String_Node_Str",element.getSnapshot());
    composeProfileConstraintComponent("String_Node_Str",element.getDifferential());
    if (element.getSearchParam().size() > 0) {
      openArray("String_Node_Str");
      for (      Profile.ProfileStructureSearchParamComponent e : element.getSearchParam())       composeProfileProfileStructureSearchParamComponent(null,e);
      closeArray();
    }
    ;
    close();
  }
}

Fixed version (ground truth):
private void composeProfileProfileStructureComponent(String name,Profile.ProfileStructureComponent element) throws Exception {
  if (element != null) {
    open(name);
    composeBackbone(element);
    composeCodeCore("String_Node_Str",element.getType(),false);
    composeCodeExtras("String_Node_Str",element.getType(),false);
    composeUriCore("String_Node_Str",element.getBase(),false);
    composeUriExtras("String_Node_Str",element.getBase(),false);
    composeIdCore("String_Node_Str",element.getName(),false);
    composeIdExtras("String_Node_Str",element.getName(),false);
    composeBooleanCore("String_Node_Str",element.getPublish(),false);
    composeBooleanExtras("String_Node_Str",element.getPublish(),false);
    composeStringCore("String_Node_Str",element.getPurpose(),false);
    composeStringExtras("String_Node_Str",element.getPurpose(),false);
    composeProfileConstraintComponent("String_Node_Str",element.getSnapshot());
    composeProfileConstraintComponent("String_Node_Str",element.getDifferential());
    if (element.getSearchParam().size() > 0) {
      openArray("String_Node_Str");
      for (      Profile.ProfileStructureSearchParamComponent e : element.getSearchParam())       composeProfileProfileStructureSearchParamComponent(null,e);
      closeArray();
    }
    ;
    close();
  }
}
Program: 24172
Project: 24172
Buggy source:
private void composeProfileProfileStructureComponent(String name,Profile.ProfileStructureComponent element) throws Exception {
  if (element != null) {
    composeElementAttributes(element);
    xml.open(FHIR_NS,name);
    composeBackboneElements(element);
    composeCode("String_Node_Str",element.getType());
    composeUri("String_Node_Str",element.getBase());
    composeString("String_Node_Str",element.getName());
    composeBoolean("String_Node_Str",element.getPublish());
    composeString("String_Node_Str",element.getPurpose());
    composeProfileConstraintComponent("String_Node_Str",element.getSnapshot());
    composeProfileConstraintComponent("String_Node_Str",element.getDifferential());
    for (    Profile.ProfileStructureSearchParamComponent e : element.getSearchParam())     composeProfileProfileStructureSearchParamComponent("String_Node_Str",e);
    xml.close(FHIR_NS,name);
  }
}

Fixed version (ground truth):
private void composeProfileProfileStructureComponent(String name,Profile.ProfileStructureComponent element) throws Exception {
  if (element != null) {
    composeElementAttributes(element);
    xml.open(FHIR_NS,name);
    composeBackboneElements(element);
    composeCode("String_Node_Str",element.getType());
    composeUri("String_Node_Str",element.getBase());
    composeId("String_Node_Str",element.getName());
    composeBoolean("String_Node_Str",element.getPublish());
    composeString("String_Node_Str",element.getPurpose());
    composeProfileConstraintComponent("String_Node_Str",element.getSnapshot());
    composeProfileConstraintComponent("String_Node_Str",element.getDifferential());
    for (    Profile.ProfileStructureSearchParamComponent e : element.getSearchParam())     composeProfileProfileStructureSearchParamComponent("String_Node_Str",e);
    xml.close(FHIR_NS,name);
  }
}
Program: 24177
Project: 24177
Buggy source:
private static int readField(String date,int i,int j){
  String s=date.substring(i,i + j);
  return java.lang.Integer.parseInt(s);
}

Fixed version (ground truth):
private static int readField(String date,int i,int j){
  String s=date.substring(i,i + j);
  if (s.startsWith("String_Node_Str"))   s=s.substring(1);
  return java.lang.Integer.parseInt(s);
}
Program: 24178
Project: 24178
Buggy source:
/** 
 * Parse content that may be either a resource or a bundle
 */
@Override public ResourceOrFeed parseGeneral(InputStream input) throws Exception {
  XmlPullParser xpp=loadXml(input);
  ResourceOrFeed r=new ResourceOrFeed();
  if (xpp.getNamespace().equals(FHIR_NS) && !xpp.getName().equalsIgnoreCase("String_Node_Str"))   r.resource=parseResource(xpp);
 else   if (xpp.getNamespace().equals(ATOM_NS) || (xpp.getNamespace().equals(FHIR_NS) && xpp.getName().equalsIgnoreCase("String_Node_Str")))   r.feed=parseFeed(xpp);
 else   if (xpp.getNamespace().equals(FHIR_NS) && xpp.getName().equals("String_Node_Str"))   r.taglist=parseTagList(xpp);
 else   throw new Exception("String_Node_Str" + xpp.getNamespace() + "String_Node_Str");
  return r;
}

Fixed version (ground truth):
/** 
 * Parse content that may be either a resource or a bundle
 */
@Override public ResourceOrFeed parseGeneral(InputStream input) throws Exception {
  XmlPullParser xpp=loadXml(input);
  ResourceOrFeed r=new ResourceOrFeed();
  if (xpp.getNamespace().equals(FHIR_NS) && !xpp.getName().equalsIgnoreCase("String_Node_Str"))   r.resource=parseResource(xpp);
 else   if (xpp.getNamespace().equals(ATOM_NS) || (xpp.getNamespace().equals(FHIR_NS) && xpp.getName().equalsIgnoreCase("String_Node_Str")))   r.feed=parseFeed(xpp);
 else   if (xpp.getNamespace().equals(FHIR_NS) && xpp.getName().equalsIgnoreCase("String_Node_Str"))   r.taglist=parseTagList(xpp);
 else   throw new Exception("String_Node_Str" + xpp.getNamespace() + "String_Node_Str");
  return r;
}
Program: 24180
Project: 24180
Buggy source:
public GenBlock generateEnum(BindingDefn binding) throws Exception {
  begin();
  ln("String_Node_Str");
  ln("String_Node_Str" + binding.getDefinition());
  ln("String_Node_Str");
  ln("String_Node_Str" + binding.getName() + "String_Node_Str");
  ln("String_Node_Str" + GeneratorUtils.generateCSharpTypeName(binding.getName()));
  bs("String_Node_Str");
  for (  DefinedCode code : binding.getCode()) {
    String definition=code.getDefinition();
    if (definition != null) {
      ln("String_Node_Str");
      ln("String_Node_Str" + code.getDefinition());
      ln("String_Node_Str");
    }
    ln("String_Node_Str" + "String_Node_Str" + code.getCode() + "String_Node_Str"+ "String_Node_Str");
    ln(GeneratorUtils.generateCSharpEnumMemberName(code.getCode()) + "String_Node_Str");
  }
  es("String_Node_Str");
  return end();
}

Fixed version (ground truth):
public GenBlock generateEnum(BindingDefn binding) throws Exception {
  begin();
  generateDocComment(binding.getDefinition());
  ln("String_Node_Str" + binding.getName() + "String_Node_Str");
  ln("String_Node_Str" + GeneratorUtils.generateCSharpTypeName(binding.getName()));
  bs("String_Node_Str");
  for (  DefinedCode code : binding.getCode()) {
    String definition=code.getDefinition();
    if (definition != null) {
      generateDocComment(code.getDefinition());
    }
    ln("String_Node_Str" + "String_Node_Str" + code.getCode() + "String_Node_Str"+ "String_Node_Str");
    ln(GeneratorUtils.generateCSharpEnumMemberName(code.getCode()) + "String_Node_Str");
  }
  es("String_Node_Str");
  return end();
}
Program: 24182
Project: 24182
Buggy source:
public GenBlock compositeClass(CompositeTypeDefn composite) throws Exception {
  begin();
  ln("String_Node_Str");
  ln("String_Node_Str" + composite.getAnnotations().getShortDefinition());
  ln("String_Node_Str");
  compositeClassHeader(composite);
  bs("String_Node_Str");
  if (composite.getBinding().size() > 0)   enums(composite.getBinding());
  if (composite.getLocalCompositeTypes().size() > 0)   nestedLocalTypes(composite.getLocalCompositeTypes());
  if (hasPrimitiveValueElement(composite)) {
    PrimitiveDefn prim=definitions.findPrimitive(composite.getName());
    generateExtraPrimitiveMembers(prim,GeneratorUtils.generateCSharpTypeName(composite.getName()));
  }
  generateMembers(composite);
  String derivation=composite.getName();
  if (derivation.compareTo("String_Node_Str") == 0 || derivation.compareTo("String_Node_Str") == 0) {
    ln("String_Node_Str");
    ln("String_Node_Str");
    bs("String_Node_Str");
    ln("String_Node_Str");
    ln("String_Node_Str");
    es("String_Node_Str");
  }
  es("String_Node_Str");
  ln();
  return end();
}

Fixed version (ground truth):
public GenBlock compositeClass(CompositeTypeDefn composite) throws Exception {
  begin();
  generateDocComment(composite.getAnnotations().getShortDefinition());
  compositeClassHeader(composite);
  bs("String_Node_Str");
  if (composite.getBinding().size() > 0)   enums(composite.getBinding());
  if (composite.getLocalCompositeTypes().size() > 0)   nestedLocalTypes(composite.getLocalCompositeTypes());
  if (hasPrimitiveValueElement(composite)) {
    PrimitiveDefn prim=definitions.findPrimitive(composite.getName());
    generateExtraPrimitiveMembers(prim,GeneratorUtils.generateCSharpTypeName(composite.getName()));
  }
  generateMembers(composite);
  String derivation=composite.getName();
  if (derivation.compareTo("String_Node_Str") == 0 || derivation.compareTo("String_Node_Str") == 0) {
    ln("String_Node_Str");
    ln("String_Node_Str");
    bs("String_Node_Str");
    ln("String_Node_Str");
    ln("String_Node_Str");
    es("String_Node_Str");
  }
  es("String_Node_Str");
  ln();
  return end();
}
Program: 24184
Project: 24184
Buggy source:
public GenBlock generateConstrained(ConstrainedTypeDefn constrained) throws Exception {
  begin();
  header(definitions.getDate(),definitions.getVersion());
  ln("String_Node_Str");
  bs("String_Node_Str");
  ln("String_Node_Str");
  ln("String_Node_Str" + constrained.getAnnotations().getShortDefinition());
  ln("String_Node_Str");
  ln("String_Node_Str");
  nl("String_Node_Str" + constrained.getName() + "String_Node_Str");
  nl("String_Node_Str");
  ln("String_Node_Str" + GeneratorUtils.generateCSharpTypeName(constrained.getName()));
  nl("String_Node_Str");
  nl(GeneratorUtils.generateCSharpTypeName(constrained.getConstrainedBaseType().getName()));
  bs("String_Node_Str");
  ln("String_Node_Str");
  for (  Invariant inv : constrained.getDetail())   ln("String_Node_Str" + inv.getHuman());
  es("String_Node_Str");
  es("String_Node_Str");
  return end();
}

Fixed version (ground truth):
public GenBlock generateConstrained(ConstrainedTypeDefn constrained) throws Exception {
  begin();
  header(definitions.getDate(),definitions.getVersion());
  ln("String_Node_Str");
  bs("String_Node_Str");
  generateDocComment(constrained.getAnnotations().getShortDefinition());
  ln("String_Node_Str");
  nl("String_Node_Str" + constrained.getName() + "String_Node_Str");
  nl("String_Node_Str");
  ln("String_Node_Str" + GeneratorUtils.generateCSharpTypeName(constrained.getName()));
  nl("String_Node_Str");
  nl(GeneratorUtils.generateCSharpTypeName(constrained.getConstrainedBaseType().getName()));
  bs("String_Node_Str");
  ln("String_Node_Str");
  for (  Invariant inv : constrained.getDetail())   ln("String_Node_Str" + inv.getHuman());
  es("String_Node_Str");
  es("String_Node_Str");
  return end();
}
Program: 24186
Project: 24186
Buggy source:
private void doTestRedelivery(String destinationName) throws Exception {
  ActiveMQConnectionFactory connectionFactory=new ActiveMQConnectionFactory(url);
  ObjectMapper objectMapper=new ObjectMapper();
  ActiveMQReceiverHandler<String> h=new ActiveMQReceiverHandler<>(destinationName,connectionFactory,(m) -> receiveMessage(m),String.class,objectMapper,(m,e) -> exceptionHandler(m,e),1);
  h.start();
  ActiveMQSender sender=new ActiveMQSenderImpl(connectionFactory,objectMapper,destinationName,Optional.<Integer>empty(),false);
  sender.sendJson("String_Node_Str");
  sender.sendJson("String_Node_Str");
  sender.sendJson("String_Node_Str");
  Thread.sleep(1000);
  assertEquals(3 + 1,errorCount);
  assertEquals(2,okCount);
}

Fixed version (ground truth):
private void doTestRedelivery(String destinationName) throws Exception {
  ActiveMQConnectionFactory realConnectionFactory=new ActiveMQConnectionFactory(url);
  PooledConnectionFactory connectionFactory=new PooledConnectionFactory();
  connectionFactory.setConnectionFactory(realConnectionFactory);
  ObjectMapper objectMapper=new ObjectMapper();
  ActiveMQReceiverHandler<String> h=new ActiveMQReceiverHandler<>(destinationName,connectionFactory,(m) -> receiveMessage(m),String.class,objectMapper,(m,e) -> exceptionHandler(m,e),1);
  h.start();
  ActiveMQSender sender=new ActiveMQSenderImpl(connectionFactory,objectMapper,destinationName,Optional.<Integer>empty(),false);
  sender.sendJson("String_Node_Str");
  sender.sendJson("String_Node_Str");
  sender.sendJson("String_Node_Str");
  Thread.sleep(1000);
  assertEquals(3 + 1,errorCount);
  assertEquals(2,okCount);
}
Program: 24187
Project: 24187
Buggy source:
private static String getSide(){
  return FMLCommonHandler.instance().getSide().toString().toLowerCase();
}

Fixed version (ground truth):
private static String getSide(){
  return FMLCommonHandler.instance().getSide().toString().toLowerCase(Locale.ENGLISH);
}
Program: 24188
Project: 24188
Buggy source:
@Override protected void shutdownOutputRequested(ChannelPipeline pipeline,ShutdownOutputEvent evt) throws Exception {
  TlsChildChannel httpChildChannel=(TlsChildChannel)pipeline.getChannel();
  ChannelFuture httpFuture=evt.getFuture();
  closeRequested(httpChildChannel,httpFuture);
}

Fixed version (ground truth):
@Override protected void shutdownOutputRequested(ChannelPipeline pipeline,ShutdownOutputEvent evt) throws Exception {
  TlsChildChannel tlsChildChannel=(TlsChildChannel)pipeline.getChannel();
  ChannelFuture tlsFuture=evt.getFuture();
  closeRequested(tlsChildChannel,tlsFuture);
}
Program: 24189
Project: 24189
Buggy source:
@Override public void closeRequested(final ChannelHandlerContext ctx,final ChannelStateEvent e) throws Exception {
  childChannels.close().addListener(new ChannelGroupFutureListener(){
    @Override public void operationComplete(    ChannelGroupFuture future) throws Exception {
      ctx.sendDownstream(e);
    }
  }
);
}

Fixed version (ground truth):
@Override protected void closeRequested(ChannelPipeline pipeline,ChannelStateEvent evt) throws Exception {
  final TlsServerChannel tlsCloseChannel=(TlsServerChannel)evt.getChannel();
  final ChannelFuture tlsCloseFuture=evt.getFuture();
  boolean wasBound=tlsCloseChannel.isBound();
  if (!tlsCloseFuture.isDone()) {
    if (wasBound) {
      unbindRequested(pipeline,evt);
    }
    Channel transport=tlsCloseChannel.getTransport();
    if (transport != null) {
      ChannelFuture closeFuture=transport.close();
      if (closeFuture.isDone()) {
        handleTlsTransportCloseComplete(tlsCloseChannel,tlsCloseFuture,closeFuture);
      }
 else {
        closeFuture.addListener(new ChannelFutureListener(){
          @Override public void operationComplete(          ChannelFuture closeFuture) throws Exception {
            handleTlsTransportCloseComplete(tlsCloseChannel,tlsCloseFuture,closeFuture);
          }
        }
);
      }
    }
  }
}
Program: 24190
Project: 24190
Buggy source:
private ChannelHandler createParentHandler(TlsServerChannel channel,final ChannelAddress address){
  return new SimpleChannelHandler(){
    private final ChannelGroup childChannels=new DefaultChannelGroup();
    @Override public void childChannelOpen(    ChannelHandlerContext ctx,    ChildChannelStateEvent e) throws Exception {
      e.getChannel().setAttachment(address);
      childChannels.add(e.getChildChannel());
      super.childChannelOpen(ctx,e);
    }
    @Override public void childChannelClosed(    ChannelHandlerContext ctx,    ChildChannelStateEvent e) throws Exception {
      childChannels.remove(e.getChildChannel());
      super.childChannelClosed(ctx,e);
    }
    @Override public void closeRequested(    final ChannelHandlerContext ctx,    final ChannelStateEvent e) throws Exception {
      childChannels.close().addListener(new ChannelGroupFutureListener(){
        @Override public void operationComplete(        ChannelGroupFuture future) throws Exception {
          ctx.sendDownstream(e);
        }
      }
);
    }
  }
;
}

Fixed version (ground truth):
private ChannelHandler createParentHandler(TlsServerChannel channel,final ChannelAddress address){
  return new SimpleChannelHandler(){
    @Override public void childChannelOpen(    ChannelHandlerContext ctx,    ChildChannelStateEvent e) throws Exception {
      e.getChannel().setAttachment(address);
      super.childChannelOpen(ctx,e);
    }
  }
;
}
Program: 24191
Project: 24191
Buggy source:
@Override public void childChannelOpen(ChannelHandlerContext ctx,ChildChannelStateEvent e) throws Exception {
  e.getChannel().setAttachment(address);
  childChannels.add(e.getChildChannel());
  super.childChannelOpen(ctx,e);
}

Fixed version (ground truth):
@Override public void childChannelOpen(ChannelHandlerContext ctx,ChildChannelStateEvent e) throws Exception {
  e.getChannel().setAttachment(address);
  super.childChannelOpen(ctx,e);
}
Program: 24192
Project: 24192
Buggy source:
@Override public void operationComplete(ChannelGroupFuture future) throws Exception {
  ctx.sendDownstream(e);
}

Fixed version (ground truth):
@Override public void operationComplete(ChannelFuture closeFuture) throws Exception {
  handleTlsTransportCloseComplete(tlsCloseChannel,tlsCloseFuture,closeFuture);
}
Program: 24193
Project: 24193
Buggy source:
@Override public void channelClosed(final ChannelHandlerContext ctx,final ChannelStateEvent e) throws Exception {
  if (robot != null) {
    robot.dispose().addListener(new ChannelFutureListener(){
      @Override public void operationComplete(      ChannelFuture future) throws Exception {
        channelClosedFuture.setSuccess();
        ctx.sendUpstream(e);
        initialize();
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void channelClosed(final ChannelHandlerContext ctx,final ChannelStateEvent e) throws Exception {
  if (robot != null) {
    robot.dispose().addListener(new ChannelFutureListener(){
      @Override public void operationComplete(      ChannelFuture future) throws Exception {
        channelClosedFuture.setSuccess();
        ctx.sendUpstream(e);
      }
    }
);
  }
}
Program: 24194
Project: 24194
Buggy source:
@Override public void disposeReceived(final ChannelHandlerContext ctx,MessageEvent evt) throws Exception {
  if (robot == null || robot.getPreparedFuture() == null) {
    sendErrorMessage(ctx,ERROR_MSG_NOT_PREPARED);
    return;
  }
  try {
    robot.dispose().addListener(new ChannelFutureListener(){
      @Override public void operationComplete(      ChannelFuture future) throws Exception {
        writeDisposed(ctx);
        initialize();
      }
    }
);
  }
 catch (  Exception e) {
    sendErrorMessage(ctx,e);
    return;
  }
}

Fixed version (ground truth):
@Override public void disposeReceived(final ChannelHandlerContext ctx,MessageEvent evt) throws Exception {
  if (robot == null || robot.getPreparedFuture() == null) {
    sendErrorMessage(ctx,ERROR_MSG_NOT_PREPARED);
    return;
  }
  try {
    robot.dispose().addListener(new ChannelFutureListener(){
      @Override public void operationComplete(      ChannelFuture future) throws Exception {
        writeDisposed(ctx);
      }
    }
);
  }
 catch (  Exception e) {
    sendErrorMessage(ctx,e);
    return;
  }
}
Program: 24195
Project: 24195
Buggy source:
void notifyException(Exception exception){
  this.exception=exception;
  if (testThread != null) {
    testThread.interrupt();
  }
}

Fixed version (ground truth):
void notifyException(Exception exception){
  this.exception=exception;
  if (testThread != null) {
    testThread.interrupt();
    if (testThread != Thread.currentThread())     testThread.interrupt();
  }
}
Program: 24196
Project: 24196
Buggy source:
void notifyFinished(){
switch (state) {
case INIT:
    notifyPrepared();
  break;
case PREPARED:
case STARTABLE:
state=State.FINISHED;
finished.countDown();
break;
default :
throw new IllegalStateException(state.name());
}
}

Fixed version (ground truth):
void notifyFinished(){
switch (state) {
case INIT:
    notifyPrepared();
case PREPARED:
case STARTABLE:
  state=State.FINISHED;
finished.countDown();
break;
default :
throw new IllegalStateException(state.name());
}
}
Program: 24199
Project: 24199
Buggy source:
void notifyException(Exception exception){
  this.exception=exception;
  prepared.countDown();
  startable.countDown();
  finished.countDown();
  if (testThread != null) {
    testThread.interrupt();
  }
}

Fixed version (ground truth):
void notifyException(Exception exception){
  this.exception=exception;
  if (testThread != null) {
    testThread.interrupt();
  }
}
Program: 24200
Project: 24200
Buggy source:
public void abort(){
  System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  this.abortScheduled=true;
  latch.notifyAbort();
}

Fixed version (ground truth):
public void abort(){
  System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  this.abortScheduled=true;
  latch.notifyAbort();
}
Program: 24201
Project: 24201
Buggy source:
private void writeNotifiedOnBarrier(final String barrier,final ChannelHandlerContext ctx) throws Exception {
  robot.awaitBarrier(barrier).addListener(new ChannelFutureListener(){
    @Override public void operationComplete(    ChannelFuture future) throws Exception {
      if (future.isSuccess()) {
        logger.debug("String_Node_Str" + barrier);
        final NotifiedMessage notified=new NotifiedMessage();
        notified.setBarrier(barrier);
        Channels.write(ctx,Channels.future(null),notified);
      }
    }
  }
);
}

Fixed version (ground truth):
private void writeNotifiedOnBarrier(final String barrier,final ChannelHandlerContext ctx) throws Exception {
  final CountDownLatch latch=new CountDownLatch(1);
  notifiedLatches.add(latch);
  robot.awaitBarrier(barrier).addListener(new ChannelFutureListener(){
    @Override public void operationComplete(    ChannelFuture future) throws Exception {
      try {
        if (future.isSuccess()) {
          logger.debug("String_Node_Str" + barrier);
          final NotifiedMessage notified=new NotifiedMessage();
          notified.setBarrier(barrier);
          Channels.write(ctx,Channels.future(null),notified);
        }
      }
  finally {
        latch.countDown();
      }
    }
  }
);
}