nus-yam/ex-repair huggingface dataset:
Program: 23918
Project: 23918
Buggy source:
public String getType(String elementName){
  if (!definition.getPath().contains("String_Node_Str"))   return definition.getPath();
  ElementDefinition ed=definition;
  if (definition.hasContentReference()) {
    if (!definition.getContentReference().startsWith("String_Node_Str"))     throw new Error("String_Node_Str");
    boolean found=false;
    for (    ElementDefinition d : structure.getSnapshot().getElement()) {
      if (d.getPath().equals(definition.getContentReference().substring(1))) {
        found=true;
        ed=d;
      }
    }
    if (!found)     throw new Error("String_Node_Str" + definition.getContentReference());
  }
  if (ed.getType().size() == 0)   return null;
 else   if (ed.getType().size() > 1) {
    String t=ed.getType().get(0).getCode();
    boolean all=true;
    for (    TypeRefComponent tr : ed.getType()) {
      if (!t.equals(tr.getCode()))       all=false;
    }
    if (all)     return t;
    String tail=ed.getPath().substring(ed.getPath().lastIndexOf("String_Node_Str") + 1);
    if (tail.endsWith("String_Node_Str") && elementName != null && elementName.startsWith(tail.substring(0,tail.length() - 3))) {
      String name=elementName.substring(tail.length() - 3);
      return isPrimitive(lowFirst(name)) ? lowFirst(name) : name;
    }
 else     throw new Error("String_Node_Str" + elementName + "String_Node_Str"+ ed.getPath());
  }
 else   if (ed.getType().get(0).getCode() == null) {
    return structure.getId();
  }
 else   return ed.getType().get(0).getCode();
}

Fixed version (ground truth):
public String getType(String elementName){
  if (!definition.getPath().contains("String_Node_Str"))   return definition.getPath();
  ElementDefinition ed=definition;
  if (definition.hasContentReference()) {
    if (!definition.getContentReference().startsWith("String_Node_Str"))     throw new Error("String_Node_Str");
    boolean found=false;
    for (    ElementDefinition d : structure.getSnapshot().getElement()) {
      if (d.hasId() && d.getId().equals(definition.getContentReference().substring(1))) {
        found=true;
        ed=d;
      }
    }
    if (!found)     throw new Error("String_Node_Str" + definition.getContentReference() + "String_Node_Str"+ definition.getPath()+ "String_Node_Str"+ structure.getUrl());
  }
  if (ed.getType().size() == 0)   return null;
 else   if (ed.getType().size() > 1) {
    String t=ed.getType().get(0).getCode();
    boolean all=true;
    for (    TypeRefComponent tr : ed.getType()) {
      if (!t.equals(tr.getCode()))       all=false;
    }
    if (all)     return t;
    String tail=ed.getPath().substring(ed.getPath().lastIndexOf("String_Node_Str") + 1);
    if (tail.endsWith("String_Node_Str") && elementName != null && elementName.startsWith(tail.substring(0,tail.length() - 3))) {
      String name=elementName.substring(tail.length() - 3);
      return isPrimitive(lowFirst(name)) ? lowFirst(name) : name;
    }
 else     throw new Error("String_Node_Str" + elementName + "String_Node_Str"+ ed.getPath());
  }
 else   if (ed.getType().get(0).getCode() == null) {
    return structure.getId();
  }
 else   return ed.getType().get(0).getCode();
}
Program: 23919
Project: 23919
Buggy source:
public void populateLogicalSnapshot(StructureDefinition sd) throws FHIRException {
  sd.getSnapshot().getElement().add(sd.getDifferential().getElementFirstRep().copy());
  StructureDefinition base=context.fetchResource(StructureDefinition.class,sd.getBaseDefinition());
  if (base == null)   throw new FHIRException("String_Node_Str" + sd.getBaseDefinition());
  copyElements(sd,base.getSnapshot().getElement());
  copyElements(sd,sd.getDifferential().getElement());
}

Fixed version (ground truth):
public void populateLogicalSnapshot(StructureDefinition sd) throws FHIRException {
  sd.getSnapshot().getElement().add(sd.getDifferential().getElementFirstRep().copy());
  StructureDefinition base=context.fetchResource(StructureDefinition.class,sd.getBaseDefinition());
  if (base == null)   throw new FHIRException("String_Node_Str" + sd.getBaseDefinition() + "String_Node_Str"+ sd.getUrl());
  copyElements(sd,base.getSnapshot().getElement());
  copyElements(sd,sd.getDifferential().getElement());
}
Program: 23920
Project: 23920
Buggy source:
public int totalCount(){
  return valueSets.size() + maps.size() + structures.size();
}

Fixed version (ground truth):
public int totalCount(){
  return valueSets.size() + maps.size() + structures.size()+ transforms.size();
}
Program: 23921
Project: 23921
Buggy source:
@Override public List<BaseConformance> allConformanceResources(){
  List<BaseConformance> result=new ArrayList<BaseConformance>();
  result.addAll(structures.values());
  result.addAll(codeSystems.values());
  result.addAll(valueSets.values());
  result.addAll(maps.values());
  return result;
}

Fixed version (ground truth):
@Override public List<BaseConformance> allConformanceResources(){
  List<BaseConformance> result=new ArrayList<BaseConformance>();
  result.addAll(structures.values());
  result.addAll(codeSystems.values());
  result.addAll(valueSets.values());
  result.addAll(maps.values());
  result.addAll(transforms.values());
  return result;
}
Program: 23922
Project: 23922
Buggy source:
private void seeProfile(String url,StructureDefinition p) throws FHIRException {
  if (Utilities.noString(url))   url=p.getUrl();
  if (p.getKind() == StructureDefinitionKind.LOGICAL)   return;
  if (!p.hasSnapshot()) {
    if (!p.hasBaseDefinition())     throw new DefinitionException("String_Node_Str" + p.getName() + "String_Node_Str"+ p.getUrl()+ "String_Node_Str");
    StructureDefinition sd=fetchResource(StructureDefinition.class,p.getBaseDefinition());
    if (sd == null)     throw new DefinitionException("String_Node_Str" + p.getName() + "String_Node_Str"+ p.getUrl()+ "String_Node_Str"+ p.getBaseDefinition()+ "String_Node_Str");
    List<ValidationMessage> msgs=new ArrayList<ValidationMessage>();
    ProfileUtilities pu=new ProfileUtilities(this,msgs,this);
    pu.generateSnapshot(sd,p,p.getUrl(),p.getName());
    for (    ValidationMessage msg : msgs) {
      if (msg.getLevel() == IssueSeverity.ERROR || msg.getLevel() == IssueSeverity.FATAL)       throw new DefinitionException("String_Node_Str" + p.getName() + "String_Node_Str"+ p.getUrl()+ "String_Node_Str"+ msg.getMessage());
    }
    if (!p.hasSnapshot())     throw new DefinitionException("String_Node_Str" + p.getName() + "String_Node_Str"+ p.getUrl()+ "String_Node_Str");
    pu=null;
  }
  if (structures.containsKey(p.getUrl()) && !allowLoadingDuplicates)   throw new DefinitionException("String_Node_Str" + p.getUrl());
  structures.put(p.getId(),p);
  structures.put(p.getUrl(),p);
  if (!p.getUrl().equals(url))   structures.put(url,p);
}

Fixed version (ground truth):
private void seeProfile(String url,StructureDefinition p) throws FHIRException {
  if (Utilities.noString(url))   url=p.getUrl();
  if (!p.hasSnapshot() && p.getKind() != StructureDefinitionKind.LOGICAL) {
    if (!p.hasBaseDefinition())     throw new DefinitionException("String_Node_Str" + p.getName() + "String_Node_Str"+ p.getUrl()+ "String_Node_Str");
    StructureDefinition sd=fetchResource(StructureDefinition.class,p.getBaseDefinition());
    if (sd == null)     throw new DefinitionException("String_Node_Str" + p.getName() + "String_Node_Str"+ p.getUrl()+ "String_Node_Str"+ p.getBaseDefinition()+ "String_Node_Str");
    List<ValidationMessage> msgs=new ArrayList<ValidationMessage>();
    ProfileUtilities pu=new ProfileUtilities(this,msgs,this);
    pu.generateSnapshot(sd,p,p.getUrl(),p.getName());
    for (    ValidationMessage msg : msgs) {
      if (msg.getLevel() == IssueSeverity.ERROR || msg.getLevel() == IssueSeverity.FATAL)       throw new DefinitionException("String_Node_Str" + p.getName() + "String_Node_Str"+ p.getUrl()+ "String_Node_Str"+ msg.getMessage());
    }
    if (!p.hasSnapshot())     throw new DefinitionException("String_Node_Str" + p.getName() + "String_Node_Str"+ p.getUrl()+ "String_Node_Str");
    pu=null;
  }
  if (structures.containsKey(p.getUrl()) && !allowLoadingDuplicates)   throw new DefinitionException("String_Node_Str" + p.getUrl());
  structures.put(p.getId(),p);
  structures.put(p.getUrl(),p);
  if (!p.getUrl().equals(url))   structures.put(url,p);
}
Program: 23923
Project: 23923
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public <T extends Resource>T fetchResource(Class<T> class_,String uri){
  if (class_ == Questionnaire.class)   return (T)questionnaire;
  if (class_ == StructureDefinition.class && !uri.contains("String_Node_Str"))   uri="String_Node_Str" + uri;
  if (uri.startsWith("String_Node_Str")) {
    if (uri.contains("String_Node_Str"))     uri=uri.substring(0,uri.indexOf("String_Node_Str"));
    if (class_ == StructureDefinition.class) {
      if (structures.containsKey(uri))       return (T)structures.get(uri);
 else       return null;
    }
 else     if (class_ == ValueSet.class) {
      if (valueSets.containsKey(uri))       return (T)valueSets.get(uri);
 else       return null;
    }
 else     if (class_ == CodeSystem.class) {
      if (codeSystems.containsKey(uri))       return (T)codeSystems.get(uri);
 else       return null;
    }
 else     if (class_ == ConceptMap.class) {
      if (maps.containsKey(uri))       return (T)maps.get(uri);
 else       return null;
    }
  }
  if (class_ == null && uri.contains("String_Node_Str")) {
    return null;
  }
  throw new Error("String_Node_Str" + class_.getName() + "String_Node_Str"+ uri);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public <T extends Resource>T fetchResource(Class<T> class_,String uri){
  if (class_ == Questionnaire.class)   return (T)questionnaire;
  if (class_ == StructureDefinition.class && !uri.contains("String_Node_Str"))   uri="String_Node_Str" + uri;
  if (uri.startsWith("String_Node_Str")) {
    if (uri.contains("String_Node_Str"))     uri=uri.substring(0,uri.indexOf("String_Node_Str"));
    if (class_ == StructureDefinition.class) {
      if (structures.containsKey(uri))       return (T)structures.get(uri);
 else       return null;
    }
 else     if (class_ == ValueSet.class) {
      if (valueSets.containsKey(uri))       return (T)valueSets.get(uri);
 else       return null;
    }
 else     if (class_ == CodeSystem.class) {
      if (codeSystems.containsKey(uri))       return (T)codeSystems.get(uri);
 else       return null;
    }
 else     if (class_ == ConceptMap.class) {
      if (maps.containsKey(uri))       return (T)maps.get(uri);
 else       return null;
    }
 else     if (class_ == StructureMap.class) {
      if (transforms.containsKey(uri))       return (T)transforms.get(uri);
 else       return null;
    }
  }
  if (class_ == null && uri.contains("String_Node_Str")) {
    return null;
  }
  throw new Error("String_Node_Str" + class_.getName() + "String_Node_Str"+ uri);
}
Program: 23924
Project: 23924
Buggy source:
public void seeResource(String url,Resource r) throws FHIRException {
  if (r instanceof StructureDefinition)   seeProfile(url,(StructureDefinition)r);
 else   if (r instanceof ValueSet)   seeValueSet(url,(ValueSet)r);
 else   if (r instanceof CodeSystem)   seeCodeSystem(url,(CodeSystem)r);
 else   if (r instanceof ConceptMap)   maps.put(((ConceptMap)r).getUrl(),(ConceptMap)r);
 else   if (r instanceof NamingSystem)   systems.add((NamingSystem)r);
}

Fixed version (ground truth):
public void seeResource(String url,Resource r) throws FHIRException {
  if (r instanceof StructureDefinition)   seeProfile(url,(StructureDefinition)r);
 else   if (r instanceof ValueSet)   seeValueSet(url,(ValueSet)r);
 else   if (r instanceof CodeSystem)   seeCodeSystem(url,(CodeSystem)r);
 else   if (r instanceof ConceptMap)   maps.put(((ConceptMap)r).getUrl(),(ConceptMap)r);
 else   if (r instanceof StructureMap)   transforms.put(((StructureMap)r).getUrl(),(StructureMap)r);
 else   if (r instanceof NamingSystem)   systems.add((NamingSystem)r);
}
Program: 23925
Project: 23925
Buggy source:
/** 
 * @param element - the candidate that might be in the slice
 * @param path - for reporting any errors. the XPath for the element
 * @param slice - the definition of how slicing is determined
 * @param ed - the slice for which to test membership
 * @return
 * @throws DefinitionException 
 * @throws DefinitionException 
 * @throws Exception
 */
private boolean sliceMatches(Element element,String path,ElementDefinition slice,ElementDefinition ed,StructureDefinition profile) throws DefinitionException, FHIRException {
  if (!slice.getSlicing().hasDiscriminator())   return false;
  for (  StringType s : slice.getSlicing().getDiscriminator()) {
    String discriminator=s.getValue();
    ElementDefinition criteria=getCriteriaForDiscriminator(path,ed,discriminator,profile);
    if (discriminator.equals("String_Node_Str") && criteria.getPath().equals("String_Node_Str")) {
      if (criteria.getFixed() == null)       return false;
 else       if (!element.getNamedChildValue("String_Node_Str").equals(((UriType)criteria.getFixed()).asStringValue()))       return false;
    }
 else {
      Element value=getValueForDiscriminator(element,discriminator,criteria);
      if (!valueMatchesCriteria(value,criteria))       return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param element - the candidate that might be in the slice
 * @param path - for reporting any errors. the XPath for the element
 * @param slice - the definition of how slicing is determined
 * @param ed - the slice for which to test membership
 * @return
 * @throws DefinitionException 
 * @throws DefinitionException 
 * @throws Exception
 */
private boolean sliceMatches(Element element,String path,ElementDefinition slice,ElementDefinition ed,StructureDefinition profile) throws DefinitionException, FHIRException {
  if (!slice.getSlicing().hasDiscriminator())   return false;
  for (  StringType s : slice.getSlicing().getDiscriminator()) {
    String discriminator=s.getValue();
    ElementDefinition criteria=getCriteriaForDiscriminator(path,ed,discriminator,profile);
    if (discriminator.equals("String_Node_Str") && criteria.getPath().endsWith("String_Node_Str")) {
      if (criteria.getFixed() == null)       return false;
 else       if (!element.getNamedChildValue("String_Node_Str").equals(((UriType)criteria.getFixed()).asStringValue()))       return false;
    }
 else {
      Element value=getValueForDiscriminator(element,discriminator,criteria);
      if (!valueMatchesCriteria(value,criteria))       return false;
    }
  }
  return true;
}
Program: 23926
Project: 23926
Buggy source:
private boolean loadBundle(JsonPrimitive be,boolean needToBuild,FetchedFile igf) throws Exception {
  FetchedFile f=fetcher.fetch(new Reference().setReference("String_Node_Str" + be.getAsString()),igf);
  boolean changed=noteFile("String_Node_Str" + be.getAsString(),f);
  if (changed) {
    f.setBundle((Bundle)parse(f));
    for (    BundleEntryComponent b : f.getBundle().getEntry()) {
      FetchedResource r=f.addResource();
      r.setResource(b.getResource());
      r.setId(b.getResource().getId());
      r.setElement(new ObjectConverter(context).convert(r.getResource()));
      for (      UriType p : b.getResource().getMeta().getProfile())       r.getProfiles().add(p.asStringValue());
      r.setTitle(r.getElement().getChildValue("String_Node_Str"));
      igpkp.findConfiguration(f,r);
    }
  }
 else   f=altMap.get("String_Node_Str" + be.getAsString());
  ImplementationGuidePackageComponent pck=pubIg.addPackage().setName(f.getTitle());
  for (  FetchedResource r : f.getResources()) {
    bndIds.add(r.getElement().fhirType() + "String_Node_Str" + r.getId());
    ImplementationGuidePackageResourceComponent res=pck.addResource();
    res.setExample(false).setName(r.getId()).setSource(new Reference().setReference(r.getElement().fhirType() + "String_Node_Str" + r.getId()));
  }
  return changed || needToBuild;
}

Fixed version (ground truth):
private boolean loadBundle(JsonPrimitive be,boolean needToBuild,FetchedFile igf) throws Exception {
  FetchedFile f=fetcher.fetch(new Reference().setReference("String_Node_Str" + be.getAsString()),igf);
  boolean changed=noteFile("String_Node_Str" + be.getAsString(),f);
  if (changed) {
    f.setBundle((Bundle)parse(f));
    for (    BundleEntryComponent b : f.getBundle().getEntry()) {
      FetchedResource r=f.addResource();
      r.setResource(b.getResource());
      r.setId(b.getResource().getId());
      r.setElement(convertToElement(r.getResource()));
      for (      UriType p : b.getResource().getMeta().getProfile())       r.getProfiles().add(p.asStringValue());
      r.setTitle(r.getElement().getChildValue("String_Node_Str"));
      igpkp.findConfiguration(f,r);
    }
  }
 else   f=altMap.get("String_Node_Str" + be.getAsString());
  ImplementationGuidePackageComponent pck=pubIg.addPackage().setName(f.getTitle());
  for (  FetchedResource r : f.getResources()) {
    bndIds.add(r.getElement().fhirType() + "String_Node_Str" + r.getId());
    ImplementationGuidePackageResourceComponent res=pck.addResource();
    res.setExample(false).setName(r.getId()).setSource(new Reference().setReference(r.getElement().fhirType() + "String_Node_Str" + r.getId()));
  }
  return changed || needToBuild;
}
Program: 23927
Project: 23927
Buggy source:
private void regenerate(String uri) throws Exception {
  Resource res;
  if (uri.contains("String_Node_Str"))   res=context.fetchResource(StructureDefinition.class,uri);
 else   throw new Exception("String_Node_Str" + uri);
  if (res == null)   throw new Exception("String_Node_Str" + uri);
  BaseConformance bc=(BaseConformance)res;
  FetchedFile f=new FetchedFile();
  FetchedResource r=f.addResource();
  r.setResource(res);
  r.setId(bc.getId());
  r.setTitle(bc.getName());
  r.setValidated(true);
  r.setElement(new ObjectConverter(context).convert(bc));
  igpkp.findConfiguration(f,r);
  bc.setUserData("String_Node_Str",r.getConfig());
  generateOutputs(f,true);
}

Fixed version (ground truth):
private void regenerate(String uri) throws Exception {
  Resource res;
  if (uri.contains("String_Node_Str"))   res=context.fetchResource(StructureDefinition.class,uri);
 else   throw new Exception("String_Node_Str" + uri);
  if (res == null)   throw new Exception("String_Node_Str" + uri);
  BaseConformance bc=(BaseConformance)res;
  FetchedFile f=new FetchedFile();
  FetchedResource r=f.addResource();
  r.setResource(res);
  r.setId(bc.getId());
  r.setTitle(bc.getName());
  r.setValidated(true);
  r.setElement(convertToElement(bc));
  igpkp.findConfiguration(f,r);
  bc.setUserData("String_Node_Str",r.getConfig());
  generateOutputs(f,true);
}
Program: 23931
Project: 23931
Buggy source:
private void generateLogicalMaps() throws Exception {
  StructureMapUtilities mu=new StructureMapUtilities(context,null,null);
  for (  FetchedFile f : fileList) {
    List<StructureMap> maps=new ArrayList<StructureMap>();
    for (    FetchedResource r : f.getResources()) {
      if (r.getResource() instanceof StructureDefinition) {
        StructureMap map=mu.generateMapFromMappings((StructureDefinition)r.getResource());
        if (map != null) {
          maps.add(map);
        }
      }
    }
    for (    StructureMap map : maps) {
      FetchedResource nr=f.addResource();
      nr.setResource(map);
      nr.setElement(new ObjectConverter(context).convert(map));
      nr.setId(map.getId());
      nr.setTitle(map.getName());
      igpkp.findConfiguration(f,nr);
    }
  }
}

Fixed version (ground truth):
private void generateLogicalMaps() throws Exception {
  StructureMapUtilities mu=new StructureMapUtilities(context,null,null);
  for (  FetchedFile f : fileList) {
    List<StructureMap> maps=new ArrayList<StructureMap>();
    for (    FetchedResource r : f.getResources()) {
      if (r.getResource() instanceof StructureDefinition) {
        StructureMap map=mu.generateMapFromMappings((StructureDefinition)r.getResource());
        if (map != null) {
          maps.add(map);
        }
      }
    }
    for (    StructureMap map : maps) {
      FetchedResource nr=f.addResource();
      nr.setResource(map);
      nr.setElement(convertToElement(map));
      nr.setId(map.getId());
      nr.setTitle(map.getName());
      igpkp.findConfiguration(f,nr);
    }
  }
}
Program: 23933
Project: 23933
Buggy source:
private void load(String type) throws Exception {
  dlog("String_Node_Str" + type);
  for (  FetchedFile f : fileList) {
    for (    FetchedResource r : f.getResources()) {
      if (r.getElement().fhirType().equals(type)) {
        dlog("String_Node_Str" + r.getId());
        if (!r.isValidated())         validate(f,r);
        if (r.getResource() == null)         try {
          r.setResource(parse(f));
        }
 catch (        Exception e) {
          throw new Exception("String_Node_Str" + f.getName() + "String_Node_Str"+ e.getMessage(),e);
        }
        BaseConformance bc=(BaseConformance)r.getResource();
        boolean altered=false;
        if (!bc.hasDate()) {
          altered=true;
          bc.setDateElement(new DateTimeType(execTime));
        }
        if (!bc.hasStatus()) {
          altered=true;
          bc.setStatus(ConformanceResourceStatus.DRAFT);
        }
        if (altered)         r.setElement(new ObjectConverter(context).convert(bc));
        igpkp.checkForPath(f,r,bc);
        try {
          if (!(bc instanceof StructureDefinition))           context.seeResource(bc.getUrl(),bc);
        }
 catch (        Exception e) {
          throw new Exception("String_Node_Str" + bc.getUrl() + "String_Node_Str"+ e.getMessage(),e);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void load(String type) throws Exception {
  dlog("String_Node_Str" + type);
  for (  FetchedFile f : fileList) {
    for (    FetchedResource r : f.getResources()) {
      if (r.getElement().fhirType().equals(type)) {
        dlog("String_Node_Str" + r.getId());
        if (!r.isValidated())         validate(f,r);
        if (r.getResource() == null)         try {
          r.setResource(parse(f));
        }
 catch (        Exception e) {
          throw new Exception("String_Node_Str" + f.getName() + "String_Node_Str"+ e.getMessage(),e);
        }
        BaseConformance bc=(BaseConformance)r.getResource();
        boolean altered=false;
        if (!bc.hasDate()) {
          altered=true;
          bc.setDateElement(new DateTimeType(execTime));
        }
        if (!bc.hasStatus()) {
          altered=true;
          bc.setStatus(ConformanceResourceStatus.DRAFT);
        }
        if (altered)         r.setElement(convertToElement(bc));
        igpkp.checkForPath(f,r,bc);
        try {
          if (!(bc instanceof StructureDefinition))           context.seeResource(bc.getUrl(),bc);
        }
 catch (        Exception e) {
          throw new Exception("String_Node_Str" + bc.getUrl() + "String_Node_Str"+ e.getMessage(),e);
        }
      }
    }
  }
}
Program: 23934
Project: 23934
Buggy source:
private void updateImplementationGuide() throws Exception {
  for (  ImplementationGuidePackageComponent pck : pubIg.getPackage()) {
    for (    ImplementationGuidePackageResourceComponent res : pck.getResource()) {
      FetchedFile f=null;
      FetchedResource r=null;
      for (      FetchedFile tf : fileList) {
        for (        FetchedResource tr : tf.getResources()) {
          if (tr.getLocalRef().equals(res.getSourceReference().getReference())) {
            r=tr;
            f=tf;
          }
        }
      }
      if (r != null) {
        String path=igpkp.doReplacements(igpkp.getLinkFor(f,r),r,null,null);
        res.addExtension().setUrl("String_Node_Str").setValue(new UriType(path));
        inspector.addLinkToCheck("String_Node_Str",path);
      }
    }
  }
  FetchedResource r=altMap.get(IG_NAME).getResources().get(0);
  r.setResource(pubIg);
  r.setElement(new ObjectConverter(context).convert(pubIg));
}

Fixed version (ground truth):
private void updateImplementationGuide() throws Exception {
  for (  ImplementationGuidePackageComponent pck : pubIg.getPackage()) {
    for (    ImplementationGuidePackageResourceComponent res : pck.getResource()) {
      FetchedFile f=null;
      FetchedResource r=null;
      for (      FetchedFile tf : fileList) {
        for (        FetchedResource tr : tf.getResources()) {
          if (tr.getLocalRef().equals(res.getSourceReference().getReference())) {
            r=tr;
            f=tf;
          }
        }
      }
      if (r != null) {
        String path=igpkp.doReplacements(igpkp.getLinkFor(f,r),r,null,null);
        res.addExtension().setUrl("String_Node_Str").setValue(new UriType(path));
        inspector.addLinkToCheck("String_Node_Str",path);
      }
    }
  }
  FetchedResource r=altMap.get(IG_NAME).getResources().get(0);
  r.setResource(pubIg);
  r.setElement(convertToElement(pubIg));
}
Program: 23938
Project: 23938
Buggy source:
private void generate() throws Exception {
  forceDir(tempDir);
  forceDir(Utilities.path(tempDir,"String_Node_Str"));
  forceDir(Utilities.path(tempDir,"String_Node_Str"));
  otherFilesRun.clear();
  for (  String rg : regenList)   regenerate(rg);
  updateImplementationGuide();
  for (  FetchedFile f : changeList)   generateOutputs(f);
  if (!changeList.isEmpty())   generateSummaryOutputs();
  cleanOutput(tempDir);
  if (runTool())   if (!changeList.isEmpty())   generateZips();
  log("String_Node_Str");
  List<ValidationMessage> linkmsgs=inspector.check();
  int bl=0;
  int lf=0;
  for (  ValidationMessage m : linkmsgs) {
    if (m.getLevel() == IssueSeverity.ERROR) {
      if (m.getType() == IssueType.NOTFOUND)       bl++;
 else       lf++;
    }
 else     if (m.getLevel() == IssueSeverity.FATAL) {
      throw new Exception(m.getMessage());
    }
  }
  log("String_Node_Str" + Integer.toString(inspector.total()) + "String_Node_Str"+ checkPlural("String_Node_Str",inspector.total())+ "String_Node_Str"+ Integer.toString(lf)+ "String_Node_Str"+ checkPlural("String_Node_Str",lf)+ "String_Node_Str"+ Integer.toString((lf * 100) / inspector.total())+ "String_Node_Str");
  log("String_Node_Str" + Integer.toString(inspector.links()) + "String_Node_Str"+ checkPlural("String_Node_Str",inspector.links())+ "String_Node_Str"+ Integer.toString(bl)+ "String_Node_Str"+ checkPlural("String_Node_Str",lf)+ "String_Node_Str"+ Integer.toString((bl * 100) / inspector.links())+ "String_Node_Str");
  errors.addAll(linkmsgs);
}

Fixed version (ground truth):
private void generate() throws Exception {
  forceDir(tempDir);
  forceDir(Utilities.path(tempDir,"String_Node_Str"));
  forceDir(Utilities.path(tempDir,"String_Node_Str"));
  otherFilesRun.clear();
  for (  String rg : regenList)   regenerate(rg);
  updateImplementationGuide();
  for (  FetchedFile f : changeList)   generateOutputs(f);
  if (!changeList.isEmpty())   generateSummaryOutputs();
  cleanOutput(tempDir);
  if (runTool())   if (!changeList.isEmpty())   generateZips();
  log("String_Node_Str");
  List<ValidationMessage> linkmsgs=inspector.check();
  int bl=0;
  int lf=0;
  for (  ValidationMessage m : linkmsgs) {
    if (m.getLevel() == IssueSeverity.ERROR) {
      if (m.getType() == IssueType.NOTFOUND)       bl++;
 else       lf++;
    }
 else     if (m.getLevel() == IssueSeverity.FATAL) {
      throw new Exception(m.getMessage());
    }
  }
  log("String_Node_Str" + Integer.toString(inspector.total()) + "String_Node_Str"+ checkPlural("String_Node_Str",inspector.total())+ "String_Node_Str"+ Integer.toString(lf)+ "String_Node_Str"+ checkPlural("String_Node_Str",lf)+ "String_Node_Str"+ Integer.toString((lf * 100) / (inspector.total() == 0 ? 1 : inspector.total()))+ "String_Node_Str");
  log("String_Node_Str" + Integer.toString(inspector.links()) + "String_Node_Str"+ checkPlural("String_Node_Str",inspector.links())+ "String_Node_Str"+ Integer.toString(bl)+ "String_Node_Str"+ checkPlural("String_Node_Str",lf)+ "String_Node_Str"+ Integer.toString((bl * 100) / (inspector.links() == 0 ? 1 : inspector.links()))+ "String_Node_Str");
  errors.addAll(linkmsgs);
}
Program: 23939
Project: 23939
Buggy source:
private void checkInvariants(List<ValidationMessage> errors,String path,StructureDefinition profile,ElementDefinition ed,String typename,String typeProfile,Element resource,Element element) throws FHIRException, FHIRException {
  for (  ElementDefinitionConstraintComponent inv : ed.getConstraint()) {
    if (inv.hasExpression()) {
      ExpressionNode n=(ExpressionNode)inv.getUserData("String_Node_Str");
      if (n == null) {
        long t=System.nanoTime();
        n=fpe.parse(inv.getExpression());
        fpeTime=fpeTime + (System.nanoTime() - t);
        inv.setUserData("String_Node_Str",n);
      }
      String msg;
      boolean ok;
      try {
        long t=System.nanoTime();
        ok=fpe.evaluateToBoolean(resource,element,n);
        fpeTime=fpeTime + (System.nanoTime() - t);
        msg=fpe.forLog();
      }
 catch (      Exception ex) {
        ok=false;
        msg=ex.getMessage();
      }
      if (!ok) {
        ok=fpe.evaluateToBoolean(resource,element,n);
        if (inv.getSeverity() == ConstraintSeverity.ERROR)         rule(errors,IssueType.INVARIANT,element.line(),element.col(),path,ok,inv.getHuman() + "String_Node_Str" + msg+ "String_Node_Str"+ inv.getExpression()+ "String_Node_Str");
 else         if (inv.getSeverity() == ConstraintSeverity.WARNING)         warning(errors,IssueType.INVARIANT,element.line(),element.line(),path,ok,inv.getHuman() + "String_Node_Str" + msg+ "String_Node_Str"+ inv.getExpression()+ "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
private void checkInvariants(List<ValidationMessage> errors,String path,StructureDefinition profile,ElementDefinition ed,String typename,String typeProfile,Element resource,Element element) throws FHIRException, FHIRException {
  for (  ElementDefinitionConstraintComponent inv : ed.getConstraint()) {
    if (inv.hasExpression()) {
      ExpressionNode n=(ExpressionNode)inv.getUserData("String_Node_Str");
      if (n == null) {
        long t=System.nanoTime();
        n=fpe.parse(inv.getExpression());
        fpeTime=fpeTime + (System.nanoTime() - t);
        inv.setUserData("String_Node_Str",n);
      }
      String msg;
      boolean ok;
      try {
        long t=System.nanoTime();
        ok=fpe.evaluateToBoolean(resource,element,n);
        fpeTime=fpeTime + (System.nanoTime() - t);
        msg=fpe.forLog();
      }
 catch (      Exception ex) {
        ok=false;
        msg=ex.getMessage();
      }
      if (!ok) {
        ok=fpe.evaluateToBoolean(resource,element,n);
        if (!Utilities.noString(msg))         msg="String_Node_Str" + msg + "String_Node_Str";
        if (inv.getSeverity() == ConstraintSeverity.ERROR)         rule(errors,IssueType.INVARIANT,element.line(),element.col(),path,ok,inv.getHuman() + msg + "String_Node_Str"+ inv.getExpression()+ "String_Node_Str");
 else         if (inv.getSeverity() == ConstraintSeverity.WARNING)         warning(errors,IssueType.INVARIANT,element.line(),element.line(),path,ok,inv.getHuman() + msg + "String_Node_Str"+ inv.getExpression()+ "String_Node_Str");
      }
    }
  }
}
Program: 23940
Project: 23940
Buggy source:
private void determineType(FetchedFile file) throws Exception {
  if (file.getResources().isEmpty()) {
    file.getErrors().clear();
    Element e=null;
    try {
      if (file.getContentType().contains("String_Node_Str"))       e=loadFromJson(file);
 else       if (file.getContentType().contains("String_Node_Str"))       e=loadFromXml(file);
 else       throw new Exception("String_Node_Str" + file.getName());
    }
 catch (    Exception ex) {
      throw new Exception("String_Node_Str" + file.getName() + "String_Node_Str"+ ex.getMessage(),ex);
    }
    FetchedResource r=file.addResource();
    String id=e.getChildValue("String_Node_Str");
    if (Utilities.noString(id))     throw new Exception("String_Node_Str" + file.getName());
    r.setElement(e).setId(id).setTitle(e.getChildValue("String_Node_Str"));
    Element m=e.getNamedChild("String_Node_Str");
    if (m != null) {
      List<Element> profiles=m.getChildrenByName("String_Node_Str");
      for (      Element p : profiles)       r.getProfiles().add(p.getValue());
    }
    igpkp.findConfiguration(file,r);
  }
}

Fixed version (ground truth):
private void determineType(FetchedFile file) throws Exception {
  if (file.getResources().isEmpty()) {
    file.getErrors().clear();
    Element e=null;
    try {
      if (file.getContentType().contains("String_Node_Str"))       e=loadFromJson(file);
 else       if (file.getContentType().contains("String_Node_Str"))       e=loadFromXml(file);
 else       throw new Exception("String_Node_Str" + file.getName());
    }
 catch (    Exception ex) {
      throw new Exception("String_Node_Str" + file.getName() + "String_Node_Str"+ ex.getMessage(),ex);
    }
    FetchedResource r=file.addResource();
    String id=e.getChildValue("String_Node_Str");
    if (Utilities.noString(id))     throw new Exception("String_Node_Str" + file.getPath());
    r.setElement(e).setId(id).setTitle(e.getChildValue("String_Node_Str"));
    Element m=e.getNamedChild("String_Node_Str");
    if (m != null) {
      List<Element> profiles=m.getChildrenByName("String_Node_Str");
      for (      Element p : profiles)       r.getProfiles().add(p.getValue());
    }
    igpkp.findConfiguration(file,r);
  }
}
Program: 23941
Project: 23941
Buggy source:
private void validate(FetchedFile file,FetchedResource r) throws Exception {
  validator.validate(file.getErrors(),r.getElement());
  r.setValidated(true);
  if (r.getConfig() == null)   igpkp.findConfiguration(file,r);
}

Fixed version (ground truth):
private void validate(FetchedFile file,FetchedResource r) throws Exception {
  List<ValidationMessage> errs=new ArrayList<ValidationMessage>();
  validator.validate(errs,r.getElement());
  for (  ValidationMessage vm : errs) {
    file.getErrors().add(vm.setLocation(r.getElement().fhirType() + "String_Node_Str" + r.getId()+ "String_Node_Str"+ vm.getLocation()));
  }
  r.setValidated(true);
  if (r.getConfig() == null)   igpkp.findConfiguration(file,r);
}
Program: 23944
Project: 23944
Buggy source:
private boolean baseWalksInto(List<ElementDefinition> elements,int cursor,String cpath){
  if (cursor >= elements.size())   return false;
  String path=elements.get(cursor).getPath();
  return path.startsWith(cpath);
}

Fixed version (ground truth):
private boolean baseWalksInto(List<ElementDefinition> elements,int cursor){
  if (cursor >= elements.size())   return false;
  String path=elements.get(cursor).getPath();
  String prevPath=elements.get(cursor - 1).getPath();
  return path.startsWith(prevPath + "String_Node_Str");
}
Program: 23945
Project: 23945
Buggy source:
public void compose(Element e,Turtle ttl,String base) throws Exception {
  ttl.prefix("String_Node_Str",FHIR_URI_BASE);
  ttl.prefix("String_Node_Str","String_Node_Str");
  ttl.prefix("String_Node_Str","String_Node_Str");
  ttl.prefix("String_Node_Str","String_Node_Str");
  Section section=ttl.section("String_Node_Str");
  Subject subject;
  String id=e.getChildValue("String_Node_Str");
  if (base != null && id != null)   subject=section.triple("String_Node_Str" + base + e.getType()+ ((base.endsWith("String_Node_Str") || base.endsWith("String_Node_Str")) ? "String_Node_Str" : "String_Node_Str")+ id+ "String_Node_Str","String_Node_Str","String_Node_Str" + e.getType());
 else   subject=section.triple("String_Node_Str","String_Node_Str","String_Node_Str" + e.getType());
  subject.linkedPredicate("String_Node_Str","String_Node_Str",linkResolver == null ? null : linkResolver.resolvePage("String_Node_Str"));
  for (  Element child : e.getChildren()) {
    composeElement(section,subject,child,null);
    if ("String_Node_Str".equals(child.getType())) {
      String refURI=getReferenceURI(child.getChildValue("String_Node_Str"));
      if (refURI != null) {
        String uriType=getURIType(refURI);
        if (uriType != null)         section.triple(refURI,"String_Node_Str","String_Node_Str" + uriType);
      }
    }
  }
}

Fixed version (ground truth):
public void compose(Element e,Turtle ttl,String base) throws Exception {
  ttl.prefix("String_Node_Str",FHIR_URI_BASE);
  ttl.prefix("String_Node_Str","String_Node_Str");
  ttl.prefix("String_Node_Str","String_Node_Str");
  ttl.prefix("String_Node_Str","String_Node_Str");
  Section section=ttl.section("String_Node_Str");
  Subject subject;
  String id=e.getChildValue("String_Node_Str");
  if (base == null || id == null)   subject=section.triple("String_Node_Str","String_Node_Str","String_Node_Str" + e.getType());
 else   if (base.endsWith("String_Node_Str"))   subject=section.triple("String_Node_Str" + base + e.getType()+ "String_Node_Str"+ id+ "String_Node_Str","String_Node_Str","String_Node_Str" + e.getType());
 else   subject=section.triple("String_Node_Str" + Utilities.pathReverse(base,e.getType(),id) + "String_Node_Str","String_Node_Str","String_Node_Str" + e.getType());
  subject.linkedPredicate("String_Node_Str","String_Node_Str",linkResolver == null ? null : linkResolver.resolvePage("String_Node_Str"));
  for (  Element child : e.getChildren()) {
    composeElement(section,subject,child,null);
    if ("String_Node_Str".equals(child.getType())) {
      String refURI=getReferenceURI(child.getChildValue("String_Node_Str"));
      if (refURI != null) {
        String uriType=getURIType(refURI);
        if (uriType != null)         section.triple(refURI,"String_Node_Str","String_Node_Str" + uriType);
      }
    }
  }
}
Program: 23946
Project: 23946
Buggy source:
@Override public String toString(){
  return fhirType() + "String_Node_Str" + (children == null || hasValue() ? value : Integer.toString(children.size()) + "String_Node_Str")+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return name + "String_Node_Str" + fhirType()+ "String_Node_Str"+ (children == null || hasValue() ? value : Integer.toString(children.size()) + "String_Node_Str")+ "String_Node_Str";
}
Program: 23949
Project: 23949
Buggy source:
private String cacheValue(CodeSystem cs) throws IOException {
  CodeSystem csid=new CodeSystem();
  csid.setId(cs.getId());
  csid.setVersion(cs.getVersion());
  csid.setContent(cs.getContent());
  for (  ConceptDefinitionComponent cc : cs.getConcept())   csid.getConcept().add(processCSConcept(cc));
  JsonParser parser=new JsonParser();
  parser.setOutputStyle(OutputStyle.NORMAL);
  ByteArrayOutputStream b=new ByteArrayOutputStream();
  parser.compose(b,csid);
  b.close();
  return new String(b.toByteArray());
}

Fixed version (ground truth):
private String cacheValue(CodeSystem cs) throws IOException {
  CodeSystem csid=new CodeSystem();
  csid.setId(cs.getId());
  csid.setVersion(cs.getVersion());
  csid.setContent(cs.getContent());
  csid.setHierarchyMeaning(CodeSystemHierarchyMeaning.GROUPEDBY);
  for (  ConceptDefinitionComponent cc : cs.getConcept())   csid.getConcept().add(processCSConcept(cc));
  JsonParser parser=new JsonParser();
  parser.setOutputStyle(OutputStyle.NORMAL);
  ByteArrayOutputStream b=new ByteArrayOutputStream();
  parser.compose(b,csid);
  b.close();
  return new String(b.toByteArray());
}
Program: 23951
Project: 23951
Buggy source:
private String checkPrepend(String corePath,String path){
  if (pkp.prependLinks())   return corePath + path;
 else   return path;
}

Fixed version (ground truth):
private String checkPrepend(String corePath,String path){
  if (pkp.prependLinks() && !(path.startsWith("String_Node_Str") || path.startsWith("String_Node_Str")))   return corePath + path;
 else   return path;
}
Program: 23954
Project: 23954
Buggy source:
public String makelink(){
  if (link == null)   return predicate;
 else   return "String_Node_Str" + link + "String_Node_Str"+ predicate+ "String_Node_Str";
}

Fixed version (ground truth):
public String makelink(){
  if (link == null)   return predicate;
 else   return "String_Node_Str" + link + "String_Node_Str"+ Utilities.escapeXml(predicate)+ "String_Node_Str";
}
Program: 23955
Project: 23955
Buggy source:
private void commitSection(StringBuilder b,Section section) throws Exception {
  b.append("String_Node_Str" + section.name + "String_Node_Str"+ Utilities.padLeft("String_Node_Str",'-',75 - section.name.length())+ "String_Node_Str");
  b.append("String_Node_Str");
  for (  Subject sbj : section.subjects) {
    b.append(sbj.id);
    b.append("String_Node_Str");
    int i=0;
    for (    Predicate p : sbj.predicates) {
      b.append(p.makelink());
      b.append("String_Node_Str");
      boolean first=true;
      for (      Triple o : p.getObjects()) {
        if (first)         first=false;
 else         b.append("String_Node_Str");
        if (o instanceof StringType)         b.append(Utilities.escapeXml(((StringType)o).value));
 else {
          b.append("String_Node_Str");
          if (write((Complex)o,b,4))           b.append("String_Node_Str");
 else           b.append("String_Node_Str");
        }
      }
      String comment=p.comment == null ? "String_Node_Str" : "String_Node_Str" + p.comment;
      i++;
      if (i < sbj.predicates.size())       b.append("String_Node_Str" + Utilities.escapeXml(comment) + "String_Node_Str");
 else       b.append("String_Node_Str" + Utilities.escapeXml(comment) + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void commitSection(StringBuilder b,Section section) throws Exception {
  b.append("String_Node_Str" + section.name + "String_Node_Str"+ Utilities.padLeft("String_Node_Str",'-',75 - section.name.length())+ "String_Node_Str");
  b.append("String_Node_Str");
  for (  Subject sbj : section.subjects) {
    b.append(Utilities.escapeXml(sbj.id));
    b.append("String_Node_Str");
    int i=0;
    for (    Predicate p : sbj.predicates) {
      b.append(p.makelink());
      b.append("String_Node_Str");
      boolean first=true;
      for (      Triple o : p.getObjects()) {
        if (first)         first=false;
 else         b.append("String_Node_Str");
        if (o instanceof StringType)         b.append(Utilities.escapeXml(((StringType)o).value));
 else {
          b.append("String_Node_Str");
          if (write((Complex)o,b,4))           b.append("String_Node_Str");
 else           b.append("String_Node_Str");
        }
      }
      String comment=p.comment == null ? "String_Node_Str" : "String_Node_Str" + p.comment;
      i++;
      if (i < sbj.predicates.size())       b.append("String_Node_Str" + Utilities.escapeXml(comment) + "String_Node_Str");
 else       b.append("String_Node_Str" + Utilities.escapeXml(comment) + "String_Node_Str");
    }
  }
}
Program: 23956
Project: 23956
Buggy source:
private void cleanOutput(String folder) throws IOException {
  for (  File f : new File(folder).listFiles()) {
    if (!isValidFile(f.getAbsolutePath())) {
      if (f.isDirectory())       Utilities.clearDirectory(f.getAbsolutePath());
      f.delete();
    }
  }
}

Fixed version (ground truth):
private void cleanOutput(String folder) throws IOException {
  for (  File f : new File(folder).listFiles()) {
    if (!isValidFile(f.getAbsolutePath())) {
      if (!f.isDirectory()) {
        f.delete();
      }
    }
  }
}
Program: 23958
Project: 23958
Buggy source:
private void genWrapperBase(FetchedResource r,String template,Set<String> outputTracker,Map<String,String> vars) throws FileNotFoundException, IOException {
  if (template != null) {
    template=TextFile.fileToString(Utilities.path(Utilities.getDirectoryForFile(configFile),template));
    template=template.replace("String_Node_Str",r.getTitle());
    template=template.replace("String_Node_Str",r.getElement().fhirType());
    template=template.replace("String_Node_Str",r.getId());
    template=template.replace("String_Node_Str",r.getId() + "String_Node_Str");
    String path=Utilities.path(tempDir,r.getElement().fhirType() + "String_Node_Str" + r.getId()+ "String_Node_Str");
    TextFile.stringToFile(template,path,false);
    outputTracker.add(path);
  }
}

Fixed version (ground truth):
private void genWrapperBase(FetchedResource r,String template,Set<String> outputTracker,Map<String,String> vars) throws FileNotFoundException, IOException {
  if (template != null) {
    template=TextFile.fileToString(Utilities.path(Utilities.getDirectoryForFile(configFile),template));
    template=template.replace("String_Node_Str",r.getTitle());
    template=template.replace("String_Node_Str",r.getElement().fhirType());
    template=template.replace("String_Node_Str",r.getId());
    template=template.replace("String_Node_Str",r.getId() + "String_Node_Str");
    template=template.replace("String_Node_Str",r.getElement().fhirType() + "String_Node_Str" + r.getId());
    String path=Utilities.path(tempDir,r.getElement().fhirType() + "String_Node_Str" + r.getId()+ "String_Node_Str");
    TextFile.stringToFile(template,path,false);
    outputTracker.add(path);
  }
}
Program: 23959
Project: 23959
Buggy source:
private void genWrapperFmt(FetchedResource r,String template,String format,Set<String> outputTracker,Map<String,String> vars) throws FileNotFoundException, IOException {
  if (template != null) {
    template=TextFile.fileToString(Utilities.path(Utilities.getDirectoryForFile(configFile),template));
    template=template.replace("String_Node_Str",r.getTitle() == null ? "String_Node_Str" : r.getTitle());
    template=template.replace("String_Node_Str",r.getId() + "String_Node_Str" + format+ "String_Node_Str");
    template=template.replace("String_Node_Str",r.getId());
    template=template.replace("String_Node_Str",r.getElement().fhirType());
    if (vars != null) {
      for (      String n : vars.keySet())       template=template.replace("String_Node_Str" + n + "String_Node_Str",vars.get(n));
    }
    String path=Utilities.path(tempDir,r.getElement().fhirType() + "String_Node_Str" + r.getId()+ "String_Node_Str"+ format+ "String_Node_Str");
    TextFile.stringToFile(template,path,false);
    outputTracker.add(path);
  }
}

Fixed version (ground truth):
private void genWrapperFmt(FetchedResource r,String template,String format,Set<String> outputTracker,Map<String,String> vars) throws FileNotFoundException, IOException {
  if (template != null) {
    template=TextFile.fileToString(Utilities.path(Utilities.getDirectoryForFile(configFile),template));
    template=template.replace("String_Node_Str",r.getTitle() == null ? "String_Node_Str" : r.getTitle());
    template=template.replace("String_Node_Str",r.getId() + "String_Node_Str" + format+ "String_Node_Str");
    template=template.replace("String_Node_Str",r.getId());
    template=template.replace("String_Node_Str",r.getElement().fhirType());
    template=template.replace("String_Node_Str",r.getElement().fhirType() + "String_Node_Str" + r.getId());
    if (vars != null) {
      for (      String n : vars.keySet())       template=template.replace("String_Node_Str" + n + "String_Node_Str",vars.get(n));
    }
    String path=Utilities.path(tempDir,r.getElement().fhirType() + "String_Node_Str" + r.getId()+ "String_Node_Str"+ format+ "String_Node_Str");
    TextFile.stringToFile(template,path,false);
    outputTracker.add(path);
  }
}
Program: 23960
Project: 23960
Buggy source:
private boolean loadPage(FetchedFile file){
  FetchedFile existing=altMap.get("String_Node_Str" + file.getPath());
  if (existing == null || existing.getTime() != file.getTime() || existing.getHash() != file.getHash()) {
    file.setNoProcess(true);
    changeList.add(file);
    altMap.put("String_Node_Str" + file.getPath(),file);
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean loadPage(FetchedFile file){
  FetchedFile existing=altMap.get("String_Node_Str" + file.getPath());
  if (existing == null || existing.getTime() != file.getTime() || existing.getHash() != file.getHash()) {
    file.setProcessMode(FetchedFile.PROCESS_NONE);
    changeList.add(file);
    altMap.put("String_Node_Str" + file.getPath(),file);
    return true;
  }
 else {
    return false;
  }
}