Program: 23096
Project: 23096
Buggy source:
public List<TypeRefComponent> convert(IWorkerContext context,String path,List<TypeRef> types,boolean resource,ElementDefinition ed) throws Exception {
  List<TypeRefComponent> list=new ArrayList<TypeRefComponent>();
  for (  TypeRef t : types) {
    if (t.hasParams() && !"String_Node_Str".equals(t.getName())) {
      throw new Exception("String_Node_Str" + path);
    }
    if (t.getParams().size() > 0) {
      if (t.getProfile() != null && t.getParams().size() != 1) {
        throw new Exception("String_Node_Str" + path);
      }
      if (t.getProfile() != null) {
        TypeRefComponent childType=getTypeComponent(list,t.getName());
        if (t.getVersioning() != null)         childType.setVersioning(t.getVersioning());
        if (t.getName().equals("String_Node_Str"))         childType.addTargetProfile(t.getProfile());
 else         childType.addProfile(t.getProfile());
      }
 else       for (      String param : t.getParams()) {
        TypeRefComponent childType=getTypeComponent(list,t.getName());
        if (t.getVersioning() != null)         childType.setVersioning(t.getVersioning());
        if (t.getName().equals("String_Node_Str") || t.getName().equals("String_Node_Str"))         childType.addTargetProfile("String_Node_Str" + param);
 else         childType.addProfile("String_Node_Str" + param);
      }
    }
 else     if (t.isWildcardType()) {
      for (      String n : TypesUtilities.wildcardTypes()) {
        TypeRefComponent tc=new TypeRefComponent().setCode(n);
        if (t.getVersioning() != null)         tc.setVersioning(t.getVersioning());
        list.add(tc);
      }
    }
 else     if (Utilities.noString(t.getName()) && t.getProfile() != null) {
      StructureDefinition sd=context.fetchResource(StructureDefinition.class,t.getProfile());
      TypeRefComponent tc=getTypeComponent(list,sd != null ? sd.getType() : t.getName());
      if (t.getVersioning() != null)       tc.setVersioning(t.getVersioning());
      if (t.getName().equals("String_Node_Str"))       tc.addTargetProfile(t.getProfile());
 else       tc.addProfile(t.getProfile());
      list.add(tc);
    }
 else     if (t.getName().startsWith("String_Node_Str")) {
      if (resource)       list.add(new TypeRefComponent().setCode("String_Node_Str"));
 else       list.add(new TypeRefComponent().setCode("String_Node_Str"));
      ToolingExtensions.addStringExtension(ed,"String_Node_Str",t.getName().substring(1));
    }
 else {
      StructureDefinition sd=context.fetchResource(StructureDefinition.class,"String_Node_Str" + t.getName());
      if (sd == null)       throw new Exception("String_Node_Str" + t.getName() + "String_Node_Str");
      TypeRefComponent tc=getTypeComponent(list,sd.getType());
      if (t.getVersioning() != null)       tc.setVersioning(t.getVersioning());
      if (t.getName().equals("String_Node_Str")) {
        if (t.hasProfile())         tc.addTargetProfile(t.getProfile());
      }
 else       tc.addProfile(t.getProfile());
    }
  }
  return list;
}

Fixed version (ground truth):
public List<TypeRefComponent> convert(IWorkerContext context,String path,List<TypeRef> types,boolean resource,ElementDefinition ed) throws Exception {
  List<TypeRefComponent> list=new ArrayList<TypeRefComponent>();
  for (  TypeRef t : types) {
    if (t.hasParams() && !"String_Node_Str".equals(t.getName())) {
      throw new Exception("String_Node_Str" + path);
    }
    if (t.getParams().size() > 0) {
      if (t.getProfile() != null && t.getParams().size() != 1) {
        throw new Exception("String_Node_Str" + path);
      }
      if (t.getProfile() != null) {
        TypeRefComponent childType=getTypeComponent(list,t.getName());
        if (t.getVersioning() != null)         childType.setVersioning(t.getVersioning());
        if (t.getName().equals("String_Node_Str"))         childType.addTargetProfile(t.getProfile());
 else         childType.addProfile(t.getProfile());
      }
 else       for (      String param : t.getParams()) {
        TypeRefComponent childType=getTypeComponent(list,t.getName());
        if (t.getVersioning() != null)         childType.setVersioning(t.getVersioning());
        if (t.getName().equals("String_Node_Str") || t.getName().equals("String_Node_Str"))         childType.addTargetProfile("String_Node_Str" + param);
 else         childType.addProfile("String_Node_Str" + param);
      }
    }
 else     if (t.isWildcardType()) {
      for (      String n : TypesUtilities.wildcardTypes()) {
        TypeRefComponent tc=new TypeRefComponent().setCode(n);
        if (t.getVersioning() != null)         tc.setVersioning(t.getVersioning());
        list.add(tc);
      }
    }
 else     if (Utilities.noString(t.getName()) && t.getProfile() != null) {
      StructureDefinition sd=context.fetchResource(StructureDefinition.class,t.getProfile());
      TypeRefComponent tc=getTypeComponent(list,sd != null ? sd.getType() : t.getName());
      if (t.getVersioning() != null)       tc.setVersioning(t.getVersioning());
      if (t.getName().equals("String_Node_Str"))       tc.addTargetProfile(t.getProfile());
 else       tc.addProfile(t.getProfile());
    }
 else     if (t.getName().startsWith("String_Node_Str")) {
      if (resource)       list.add(new TypeRefComponent().setCode("String_Node_Str"));
 else       list.add(new TypeRefComponent().setCode("String_Node_Str"));
      ToolingExtensions.addStringExtension(ed,"String_Node_Str",t.getName().substring(1));
    }
 else {
      StructureDefinition sd=context.fetchResource(StructureDefinition.class,"String_Node_Str" + t.getName());
      if (sd == null)       throw new Exception("String_Node_Str" + t.getName() + "String_Node_Str");
      TypeRefComponent tc=getTypeComponent(list,sd.getType());
      if (t.getVersioning() != null)       tc.setVersioning(t.getVersioning());
      if (t.getName().equals("String_Node_Str")) {
        if (t.hasProfile())         tc.addTargetProfile(t.getProfile());
      }
 else       tc.addProfile(t.getProfile());
    }
  }
  for (  TypeRefComponent tr1 : list) {
    for (    TypeRefComponent tr2 : list) {
      if (tr1 != tr2) {
        if (!tr1.getCode().equals(tr2.getCode()))         throw new Exception("String_Node_Str" + tr1.getCode() + "String_Node_Str"+ list.toString());
      }
    }
  }
  return list;
}