Program: 23415
Project: 23415
Buggy source:
private TypeDetails analyseTransform(TransformContext context,StructureMap map,StructureMapGroupRuleTargetComponent tgt,VariableForProfiling var,VariablesForProfiling vars) throws FHIRException {
switch (tgt.getTransform()) {
case CREATE:
    String p=getParamString(vars,tgt.getParameter().get(0));
  return new TypeDetails(CollectionStatus.SINGLETON,p);
case COPY:
return getParam(vars,tgt.getParameter().get(0));
case EVALUATE:
ExpressionNode expr=(ExpressionNode)tgt.getUserData(MAP_EXPRESSION);
if (expr == null) {
expr=fpe.parse(getParamString(vars,tgt.getParameter().get(tgt.getParameter().size() - 1)));
tgt.setUserData(MAP_WHERE_EXPRESSION,expr);
}
return fpe.check(vars,null,null,expr);
case TRANSLATE:
return new TypeDetails(CollectionStatus.SINGLETON,"String_Node_Str");
case CC:
ProfiledType res=new ProfiledType("String_Node_Str");
if (tgt.getParameter().size() >= 2 && isParamId(vars,tgt.getParameter().get(1))) {
TypeDetails td=vars.get(null,getParamId(vars,tgt.getParameter().get(1))).property.types;
if (td != null && td.hasBinding()) res.addBinding(td.getBinding());
}
return new TypeDetails(CollectionStatus.SINGLETON,res);
case C:
return new TypeDetails(CollectionStatus.SINGLETON,"String_Node_Str");
case REFERENCE:
String profile=vars.get(VariableMode.OUTPUT,getParamId(vars,tgt.getParameterFirstRep())).property.getProfileProperty().getStructure().getUrl();
TypeDetails td=new TypeDetails(CollectionStatus.SINGLETON);
td.addType("String_Node_Str",profile);
return td;
default :
throw new Error("String_Node_Str" + tgt.getTransform().toCode());
}
}

Fixed version (ground truth):
private TypeDetails analyseTransform(TransformContext context,StructureMap map,StructureMapGroupRuleTargetComponent tgt,VariableForProfiling var,VariablesForProfiling vars) throws FHIRException {
switch (tgt.getTransform()) {
case CREATE:
    String p=getParamString(vars,tgt.getParameter().get(0));
  return new TypeDetails(CollectionStatus.SINGLETON,p);
case COPY:
return getParam(vars,tgt.getParameter().get(0));
case EVALUATE:
ExpressionNode expr=(ExpressionNode)tgt.getUserData(MAP_EXPRESSION);
if (expr == null) {
expr=fpe.parse(getParamString(vars,tgt.getParameter().get(tgt.getParameter().size() - 1)));
tgt.setUserData(MAP_WHERE_EXPRESSION,expr);
}
return fpe.check(vars,null,expr);
case TRANSLATE:
return new TypeDetails(CollectionStatus.SINGLETON,"String_Node_Str");
case CC:
ProfiledType res=new ProfiledType("String_Node_Str");
if (tgt.getParameter().size() >= 2 && isParamId(vars,tgt.getParameter().get(1))) {
TypeDetails td=vars.get(null,getParamId(vars,tgt.getParameter().get(1))).property.types;
if (td != null && td.hasBinding()) res.addBinding(td.getBinding());
}
return new TypeDetails(CollectionStatus.SINGLETON,res);
case C:
return new TypeDetails(CollectionStatus.SINGLETON,"String_Node_Str");
case REFERENCE:
String profile=vars.get(VariableMode.OUTPUT,getParamId(vars,tgt.getParameterFirstRep())).property.getProfileProperty().getStructure().getUrl();
TypeDetails td=new TypeDetails(CollectionStatus.SINGLETON);
td.addType("String_Node_Str",profile);
return td;
default :
throw new Error("String_Node_Str" + tgt.getTransform().toCode());
}
}