Program: 23419
Project: 23419
Buggy source:
public Base translate(TransformContext context,StructureMap map,Base source,String conceptMapUrl,String fieldToReturn) throws FHIRException {
  Coding src=new Coding();
  if (source.isPrimitive()) {
    src.setCode(source.primitiveValue());
  }
 else   if ("String_Node_Str".equals(source.fhirType())) {
    Base[] b=source.getProperty("String_Node_Str".hashCode(),"String_Node_Str",true);
    if (b.length == 1)     src.setSystem(b[0].primitiveValue());
    b=source.getProperty("String_Node_Str".hashCode(),"String_Node_Str",true);
    if (b.length == 1)     src.setCode(b[0].primitiveValue());
  }
 else   if ("String_Node_Str".equals(source.fhirType())) {
    Base[] b=source.getProperty("String_Node_Str".hashCode(),"String_Node_Str",true);
    if (b.length == 1)     src.setSystem(b[0].primitiveValue());
    b=source.getProperty("String_Node_Str".hashCode(),"String_Node_Str",true);
    if (b.length == 1)     src.setCode(b[0].primitiveValue());
  }
 else   throw new FHIRException("String_Node_Str" + source.fhirType());
  if (conceptMapUrl.equals("String_Node_Str")) {
    String uri=worker.oid2Uri(src.getCode());
    if (uri == null)     uri="String_Node_Str" + src.getCode();
    if ("String_Node_Str".equals(fieldToReturn))     return new UriType(uri);
 else     throw new FHIRException("String_Node_Str");
  }
 else {
    ConceptMap cmap=null;
    if (conceptMapUrl.startsWith("String_Node_Str")) {
      for (      Resource r : map.getContained()) {
        if (r instanceof ConceptMap && ((ConceptMap)r).getId().equals(conceptMapUrl.substring(1)))         cmap=(ConceptMap)r;
      }
    }
 else     cmap=worker.fetchResource(ConceptMap.class,conceptMapUrl);
    Coding outcome=null;
    boolean done=false;
    String message=null;
    if (cmap == null) {
      if (services == null)       message="String_Node_Str" + conceptMapUrl;
 else {
        outcome=services.translate(context.appInfo,src,conceptMapUrl);
        done=true;
      }
    }
 else {
      List<SourceElementComponentWrapper> list=new ArrayList<SourceElementComponentWrapper>();
      for (      ConceptMapGroupComponent g : cmap.getGroup()) {
        for (        SourceElementComponent e : g.getElement()) {
          if (!src.hasSystem() && src.getCode().equals(e.getCode()))           list.add(new SourceElementComponentWrapper(g,e));
 else           if (src.hasSystem() && src.getSystem().equals(g.getSource()) && src.getCode().equals(e.getCode()))           list.add(new SourceElementComponentWrapper(g,e));
        }
      }
      if (list.size() == 0)       done=true;
 else       if (list.get(0).comp.getTarget().size() == 0)       message="String_Node_Str" + conceptMapUrl + "String_Node_Str"+ src.getCode();
 else {
        for (        TargetElementComponent tgt : list.get(0).comp.getTarget()) {
          if (tgt.getEquivalence() == ConceptMapEquivalence.EQUAL || tgt.getEquivalence() == ConceptMapEquivalence.EQUIVALENT || tgt.getEquivalence() == ConceptMapEquivalence.WIDER) {
            if (done) {
              message="String_Node_Str" + conceptMapUrl + "String_Node_Str"+ src.getCode();
              done=false;
            }
 else {
              done=true;
              outcome=new Coding().setCode(tgt.getCode()).setSystem(list.get(0).group.getTarget());
            }
          }
 else           if (tgt.getEquivalence() == ConceptMapEquivalence.UNMATCHED) {
            done=true;
          }
        }
        if (!done)         message="String_Node_Str" + conceptMapUrl + "String_Node_Str"+ src.getCode();
      }
    }
    if (!done)     throw new FHIRException(message);
    if (outcome == null)     return null;
    if ("String_Node_Str".equals(fieldToReturn))     return new CodeType(outcome.getCode());
 else     return outcome;
  }
}

Fixed version (ground truth):
public Base translate(TransformContext context,StructureMap map,Base source,String conceptMapUrl,String fieldToReturn) throws FHIRException {
  Coding src=new Coding();
  if (source.isPrimitive()) {
    src.setCode(source.primitiveValue());
  }
 else   if ("String_Node_Str".equals(source.fhirType())) {
    Base[] b=source.getProperty("String_Node_Str".hashCode(),"String_Node_Str",true);
    if (b.length == 1)     src.setSystem(b[0].primitiveValue());
    b=source.getProperty("String_Node_Str".hashCode(),"String_Node_Str",true);
    if (b.length == 1)     src.setCode(b[0].primitiveValue());
  }
 else   if ("String_Node_Str".equals(source.fhirType())) {
    Base[] b=source.getProperty("String_Node_Str".hashCode(),"String_Node_Str",true);
    if (b.length == 1)     src.setSystem(b[0].primitiveValue());
    b=source.getProperty("String_Node_Str".hashCode(),"String_Node_Str",true);
    if (b.length == 1)     src.setCode(b[0].primitiveValue());
  }
 else   throw new FHIRException("String_Node_Str" + source.fhirType());
  String su=conceptMapUrl;
  if (conceptMapUrl.equals("String_Node_Str")) {
    String uri=worker.oid2Uri(src.getCode());
    if (uri == null)     uri="String_Node_Str" + src.getCode();
    if ("String_Node_Str".equals(fieldToReturn))     return new UriType(uri);
 else     throw new FHIRException("String_Node_Str");
  }
 else {
    ConceptMap cmap=null;
    if (conceptMapUrl.startsWith("String_Node_Str")) {
      for (      Resource r : map.getContained()) {
        if (r instanceof ConceptMap && ((ConceptMap)r).getId().equals(conceptMapUrl.substring(1))) {
          cmap=(ConceptMap)r;
          su=map.getUrl() + conceptMapUrl;
        }
      }
    }
 else     cmap=worker.fetchResource(ConceptMap.class,conceptMapUrl);
    Coding outcome=null;
    boolean done=false;
    String message=null;
    if (cmap == null) {
      if (services == null)       message="String_Node_Str" + conceptMapUrl;
 else {
        outcome=services.translate(context.appInfo,src,conceptMapUrl);
        done=true;
      }
    }
 else {
      List<SourceElementComponentWrapper> list=new ArrayList<SourceElementComponentWrapper>();
      for (      ConceptMapGroupComponent g : cmap.getGroup()) {
        for (        SourceElementComponent e : g.getElement()) {
          if (!src.hasSystem() && src.getCode().equals(e.getCode()))           list.add(new SourceElementComponentWrapper(g,e));
 else           if (src.hasSystem() && src.getSystem().equals(g.getSource()) && src.getCode().equals(e.getCode()))           list.add(new SourceElementComponentWrapper(g,e));
        }
      }
      if (list.size() == 0)       done=true;
 else       if (list.get(0).comp.getTarget().size() == 0)       message="String_Node_Str" + su + "String_Node_Str"+ src.getCode();
 else {
        for (        TargetElementComponent tgt : list.get(0).comp.getTarget()) {
          if (tgt.getEquivalence() == null || tgt.getEquivalence() == ConceptMapEquivalence.EQUAL || tgt.getEquivalence() == ConceptMapEquivalence.EQUIVALENT || tgt.getEquivalence() == ConceptMapEquivalence.WIDER) {
            if (done) {
              message="String_Node_Str" + su + "String_Node_Str"+ src.getCode();
              done=false;
            }
 else {
              done=true;
              outcome=new Coding().setCode(tgt.getCode()).setSystem(list.get(0).group.getTarget());
            }
          }
 else           if (tgt.getEquivalence() == ConceptMapEquivalence.UNMATCHED) {
            done=true;
          }
        }
        if (!done)         message="String_Node_Str" + su + "String_Node_Str"+ src.getCode();
      }
    }
    if (!done)     throw new FHIRException(message);
    if (outcome == null)     return null;
    if ("String_Node_Str".equals(fieldToReturn))     return new CodeType(outcome.getCode());
 else     return outcome;
  }
}