Program: 23935
Project: 23935
Buggy source:
private void executeTransforms() throws FHIRException, Exception {
  if ("String_Node_Str".equals(ostr(configuration,"String_Node_Str"))) {
    MappingServices services=new MappingServices(context,igpkp.getCanonical());
    StructureMapUtilities utils=new StructureMapUtilities(context,context.getTransforms(),services);
    for (    FetchedFile f : changeList) {
      Map<FetchedResource,List<StructureMap>> worklist=new HashMap<FetchedResource,List<StructureMap>>();
      for (      FetchedResource r : f.getResources()) {
        List<StructureMap> transforms=context.findTransformsforSource(r.getElement().getProperty().getStructure().getUrl());
        if (transforms.size() > 0) {
          worklist.put(r,transforms);
        }
      }
      for (      Entry<FetchedResource,List<StructureMap>> t : worklist.entrySet()) {
        int i=0;
        for (        StructureMap map : t.getValue()) {
          boolean ok=true;
          String tgturl=null;
          for (          StructureMapStructureComponent st : map.getStructure()) {
            if (st.getMode() == StructureMapModelMode.TARGET) {
              if (tgturl == null)               tgturl=st.getUrl();
 else               ok=false;
            }
          }
          if (ok && tgturl != null) {
            StructureDefinition tsd=context.fetchResource(StructureDefinition.class,tgturl);
            if (tsd != null) {
              Resource target=ResourceFactory.createResource(tsd.getId());
              if (t.getValue().size() > 1)               target.setId(t.getKey().getId() + "String_Node_Str" + Integer.toString(i));
 else               target.setId(t.getKey().getId() + "String_Node_Str");
              i++;
              services.reset();
              utils.transform(target,t.getKey().getElement(),map,target);
              FetchedResource nr=new FetchedResource();
              nr.setElement(new ObjectConverter(context).convert(target));
              nr.setId(target.getId());
              nr.setResource(target);
              nr.setTitle("String_Node_Str");
              f.getResources().add(nr);
              igpkp.findConfiguration(f,nr);
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void executeTransforms() throws FHIRException, Exception {
  if ("String_Node_Str".equals(ostr(configuration,"String_Node_Str"))) {
    MappingServices services=new MappingServices(context,igpkp.getCanonical());
    StructureMapUtilities utils=new StructureMapUtilities(context,context.getTransforms(),services);
    for (    FetchedFile f : changeList) {
      Map<FetchedResource,List<StructureMap>> worklist=new HashMap<FetchedResource,List<StructureMap>>();
      for (      FetchedResource r : f.getResources()) {
        List<StructureMap> transforms=context.findTransformsforSource(r.getElement().getProperty().getStructure().getUrl());
        if (transforms.size() > 0) {
          worklist.put(r,transforms);
        }
      }
      for (      Entry<FetchedResource,List<StructureMap>> t : worklist.entrySet()) {
        int i=0;
        for (        StructureMap map : t.getValue()) {
          boolean ok=true;
          String tgturl=null;
          for (          StructureMapStructureComponent st : map.getStructure()) {
            if (st.getMode() == StructureMapModelMode.TARGET) {
              if (tgturl == null)               tgturl=st.getUrl();
 else               ok=false;
            }
          }
          if (ok && tgturl != null) {
            StructureDefinition tsd=context.fetchResource(StructureDefinition.class,tgturl);
            if (tsd != null) {
              Resource target=ResourceFactory.createResource(tsd.getId());
              if (t.getValue().size() > 1)               target.setId(t.getKey().getId() + "String_Node_Str" + Integer.toString(i));
 else               target.setId(t.getKey().getId() + "String_Node_Str");
              i++;
              services.reset();
              utils.transform(target,t.getKey().getElement(),map,target);
              FetchedResource nr=new FetchedResource();
              nr.setElement(convertToElement(target));
              nr.setId(target.getId());
              nr.setResource(target);
              nr.setTitle("String_Node_Str");
              f.getResources().add(nr);
              igpkp.findConfiguration(f,nr);
            }
          }
        }
      }
    }
  }
}