Program: 23950
Project: 23950
Buggy source:
private List<PropertyWrapper> splitExtensions(StructureDefinition profile,List<PropertyWrapper> children) throws UnsupportedEncodingException, IOException, FHIRException {
  List<PropertyWrapper> results=new ArrayList<PropertyWrapper>();
  Map<String,PropertyWrapper> map=new HashMap<String,PropertyWrapper>();
  for (  PropertyWrapper p : children)   if (p.getName().equals("String_Node_Str") || p.getName().equals("String_Node_Str")) {
    if (p.hasValues()) {
      for (      BaseWrapper v : p.getValues()) {
        Extension ex=(Extension)v.getBase();
        String url=ex.getUrl();
        StructureDefinition ed=context.fetchResource(StructureDefinition.class,url);
        if (p.getName().equals("String_Node_Str") && ed == null)         throw new DefinitionException("String_Node_Str" + url);
        PropertyWrapper pe=map.get(p.getName() + "String_Node_Str" + url+ "String_Node_Str");
        if (pe == null) {
          if (ed == null) {
            if (url.startsWith("String_Node_Str"))             throw new DefinitionException("String_Node_Str" + url);
            System.out.println("String_Node_Str" + url);
            pe=new PropertyWrapperDirect(new Property(p.getName() + "String_Node_Str" + url+ "String_Node_Str",p.getTypeCode(),p.getDefinition(),p.getMinCardinality(),p.getMaxCardinality(),ex));
          }
 else {
            ElementDefinition def=ed.getSnapshot().getElement().get(0);
            pe=new PropertyWrapperDirect(new Property(p.getName() + "String_Node_Str" + url+ "String_Node_Str","String_Node_Str",def.getDefinition(),def.getMin(),def.getMax().equals("String_Node_Str") ? Integer.MAX_VALUE : Integer.parseInt(def.getMax()),ex));
            ((PropertyWrapperDirect)pe).wrapped.setStructure(ed);
          }
          results.add(pe);
        }
 else         pe.getValues().add(v);
      }
    }
  }
 else   results.add(p);
  return results;
}

Fixed version (ground truth):
private List<PropertyWrapper> splitExtensions(StructureDefinition profile,List<PropertyWrapper> children) throws UnsupportedEncodingException, IOException, FHIRException {
  List<PropertyWrapper> results=new ArrayList<PropertyWrapper>();
  Map<String,PropertyWrapper> map=new HashMap<String,PropertyWrapper>();
  for (  PropertyWrapper p : children)   if (p.getName().equals("String_Node_Str") || p.getName().equals("String_Node_Str")) {
    if (p.hasValues()) {
      for (      BaseWrapper v : p.getValues()) {
        Extension ex=(Extension)v.getBase();
        String url=ex.getUrl();
        StructureDefinition ed=context.fetchResource(StructureDefinition.class,url);
        if (p.getName().equals("String_Node_Str") && ed == null)         throw new DefinitionException("String_Node_Str" + url);
        PropertyWrapper pe=map.get(p.getName() + "String_Node_Str" + url+ "String_Node_Str");
        if (pe == null) {
          if (ed == null) {
            if (url.startsWith("String_Node_Str"))             throw new DefinitionException("String_Node_Str" + url);
            pe=new PropertyWrapperDirect(new Property(p.getName() + "String_Node_Str" + url+ "String_Node_Str",p.getTypeCode(),p.getDefinition(),p.getMinCardinality(),p.getMaxCardinality(),ex));
          }
 else {
            ElementDefinition def=ed.getSnapshot().getElement().get(0);
            pe=new PropertyWrapperDirect(new Property(p.getName() + "String_Node_Str" + url+ "String_Node_Str","String_Node_Str",def.getDefinition(),def.getMin(),def.getMax().equals("String_Node_Str") ? Integer.MAX_VALUE : Integer.parseInt(def.getMax()),ex));
            ((PropertyWrapperDirect)pe).wrapped.setStructure(ed);
          }
          results.add(pe);
        }
 else         pe.getValues().add(v);
      }
    }
  }
 else   results.add(p);
  return results;
}