Program: 29634
Project: 29634
Buggy source:
public Parameter parameter(ObjectNode obj,String location,ParseResult result){
  if (obj == null) {
    return null;
  }
  Parameter output=null;
  JsonNode ref=obj.get("String_Node_Str");
  if (ref != null) {
    if (ref.getNodeType().equals(JsonNodeType.STRING)) {
      String mungedRef=mungedRef(ref.textValue());
      if (mungedRef != null) {
        obj.put("String_Node_Str",mungedRef);
        ref=obj.get("String_Node_Str");
      }
      return refParameter((TextNode)ref,location,result);
    }
 else {
      result.invalidType(location,"String_Node_Str","String_Node_Str",obj);
      return null;
    }
  }
  String l=null;
  JsonNode ln=obj.get("String_Node_Str");
  if (ln != null) {
    l=ln.asText();
  }
 else {
    l="String_Node_Str";
  }
  location+="String_Node_Str" + l + "String_Node_Str";
  String value=getString("String_Node_Str",obj,true,location,result);
  if (value != null) {
    String type=getString("String_Node_Str",obj,false,location,result);
    String format=getString("String_Node_Str",obj,false,location,result);
    AbstractSerializableParameter<?> sp=null;
    if ("String_Node_Str".equals(value)) {
      sp=new QueryParameter();
    }
 else     if ("String_Node_Str".equals(value)) {
      sp=new HeaderParameter();
    }
 else     if ("String_Node_Str".equals(value)) {
      sp=new PathParameter();
    }
 else     if ("String_Node_Str".equals(value)) {
      sp=new FormParameter();
    }
    if (sp != null) {
      getString("String_Node_Str",obj,true,location,result);
      Map<PropertyBuilder.PropertyId,Object> map=new LinkedHashMap<PropertyBuilder.PropertyId,Object>();
      map.put(TYPE,type);
      map.put(FORMAT,format);
      String defaultValue=getString("String_Node_Str",obj,false,location,result);
      map.put(DEFAULT,defaultValue);
      sp.setDefault(defaultValue);
      BigDecimal bd=getBigDecimal("String_Node_Str",obj,false,location,result);
      if (bd != null) {
        map.put(MAXIMUM,bd);
        sp.setMaximum(bd);
      }
      Boolean bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        map.put(EXCLUSIVE_MAXIMUM,bl);
        sp.setExclusiveMaximum(bl);
      }
      bd=getBigDecimal("String_Node_Str",obj,false,location,result);
      if (bd != null) {
        map.put(MINIMUM,bd);
        sp.setMinimum(bd);
      }
      bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        map.put(EXCLUSIVE_MINIMUM,bl);
        sp.setExclusiveMinimum(bl);
      }
      Integer maxLength=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MAX_LENGTH,maxLength);
      sp.setMaxLength(maxLength);
      Integer minLength=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MIN_LENGTH,minLength);
      sp.setMinLength(minLength);
      String pat=getString("String_Node_Str",obj,false,location,result);
      map.put(PATTERN,pat);
      sp.setPattern(pat);
      Integer iv=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MAX_ITEMS,iv);
      sp.setMaxItems(iv);
      iv=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MIN_ITEMS,iv);
      sp.setMinItems(iv);
      iv=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MIN_LENGTH,iv);
      sp.setMinLength(iv);
      iv=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MAX_LENGTH,iv);
      sp.setMaxLength(iv);
      bd=getBigDecimal("String_Node_Str",obj,false,location,result);
      if (bd != null) {
        map.put(MULTIPLE_OF,bd);
        sp.setMultipleOf(bd.doubleValue());
      }
      Boolean uniqueItems=getBoolean("String_Node_Str",obj,false,location,result);
      map.put(UNIQUE_ITEMS,uniqueItems);
      sp.setUniqueItems(uniqueItems);
      ArrayNode an=getArray("String_Node_Str",obj,false,location,result);
      if (an != null) {
        List<String> _enum=new ArrayList<String>();
        for (        JsonNode n : an) {
          if (n.isValueNode()) {
            _enum.add(n.asText());
          }
 else {
            result.invalidType(location,"String_Node_Str","String_Node_Str",n);
          }
        }
        sp.setEnum(_enum);
        map.put(ENUM,_enum);
      }
      bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        map.put(READ_ONLY,bl);
        sp.setReadOnly(bl);
      }
      bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        map.put(ALLOW_EMPTY_VALUE,bl);
        sp.setAllowEmptyValue(bl);
      }
      Property prop=PropertyBuilder.build(type,format,map);
      if (prop != null) {
        sp.setProperty(prop);
        ObjectNode items=getObject("String_Node_Str",obj,false,location,result);
        if (items != null) {
          Property inner=schema(null,items,location,result);
          sp.setItems(inner);
        }
      }
      Set<String> keys=getKeys(obj);
      for (      String key : keys) {
        if (key.startsWith("String_Node_Str")) {
          sp.setVendorExtension(key,extension(obj.get(key)));
        }
 else         if (!PARAMETER_KEYS.contains(key)) {
          result.extra(location,key,obj.get(key));
        }
      }
      String collectionFormat=getString("String_Node_Str",obj,false,location,result);
      sp.setCollectionFormat(collectionFormat);
      output=sp;
    }
 else     if ("String_Node_Str".equals(value)) {
      BodyParameter bp=new BodyParameter();
      JsonNode node=obj.get("String_Node_Str");
      if (node != null && node instanceof ObjectNode) {
        bp.setSchema(this.definition((ObjectNode)node,location,result));
      }
      ObjectNode examplesNode=getObject("String_Node_Str",obj,false,location,result);
      if (examplesNode != null) {
        Map<String,String> examples=Json.mapper().convertValue(examplesNode,Json.mapper().getTypeFactory().constructMapType(Map.class,String.class,Object.class));
        bp.setExamples(examples);
      }
      String pat=getString("String_Node_Str",obj,false,location,result);
      if (pat != null) {
        bp.setPattern(pat);
      }
      Boolean bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        bp.setReadOnly(bl);
      }
      Set<String> keys=getKeys(obj);
      for (      String key : keys) {
        if (key.startsWith("String_Node_Str")) {
          bp.setVendorExtension(key,extension(obj.get(key)));
        }
 else         if (!BODY_PARAMETER_KEYS.contains(key)) {
          result.extra(location,key,obj.get(key));
        }
      }
      output=bp;
    }
    if (output != null) {
      value=getString("String_Node_Str",obj,true,location,result);
      output.setName(value);
      value=getString("String_Node_Str",obj,false,location,result);
      output.setDescription(value);
      Boolean required=getBoolean("String_Node_Str",obj,false,location,result);
      if (required != null) {
        output.setRequired(required);
      }
    }
  }
  return output;
}

Fixed version (ground truth):
public Parameter parameter(ObjectNode obj,String location,ParseResult result){
  if (obj == null) {
    return null;
  }
  Parameter output=null;
  JsonNode ref=obj.get("String_Node_Str");
  if (ref != null) {
    if (ref.getNodeType().equals(JsonNodeType.STRING)) {
      return refParameter((TextNode)ref,location,result);
    }
 else {
      result.invalidType(location,"String_Node_Str","String_Node_Str",obj);
      return null;
    }
  }
  String l=null;
  JsonNode ln=obj.get("String_Node_Str");
  if (ln != null) {
    l=ln.asText();
  }
 else {
    l="String_Node_Str";
  }
  location+="String_Node_Str" + l + "String_Node_Str";
  String value=getString("String_Node_Str",obj,true,location,result);
  if (value != null) {
    String type=getString("String_Node_Str",obj,false,location,result);
    String format=getString("String_Node_Str",obj,false,location,result);
    AbstractSerializableParameter<?> sp=null;
    if ("String_Node_Str".equals(value)) {
      sp=new QueryParameter();
    }
 else     if ("String_Node_Str".equals(value)) {
      sp=new HeaderParameter();
    }
 else     if ("String_Node_Str".equals(value)) {
      sp=new PathParameter();
    }
 else     if ("String_Node_Str".equals(value)) {
      sp=new FormParameter();
    }
    if (sp != null) {
      getString("String_Node_Str",obj,true,location,result);
      Map<PropertyBuilder.PropertyId,Object> map=new LinkedHashMap<PropertyBuilder.PropertyId,Object>();
      map.put(TYPE,type);
      map.put(FORMAT,format);
      String defaultValue=getString("String_Node_Str",obj,false,location,result);
      map.put(DEFAULT,defaultValue);
      sp.setDefault(defaultValue);
      BigDecimal bd=getBigDecimal("String_Node_Str",obj,false,location,result);
      if (bd != null) {
        map.put(MAXIMUM,bd);
        sp.setMaximum(bd);
      }
      Boolean bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        map.put(EXCLUSIVE_MAXIMUM,bl);
        sp.setExclusiveMaximum(bl);
      }
      bd=getBigDecimal("String_Node_Str",obj,false,location,result);
      if (bd != null) {
        map.put(MINIMUM,bd);
        sp.setMinimum(bd);
      }
      bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        map.put(EXCLUSIVE_MINIMUM,bl);
        sp.setExclusiveMinimum(bl);
      }
      Integer maxLength=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MAX_LENGTH,maxLength);
      sp.setMaxLength(maxLength);
      Integer minLength=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MIN_LENGTH,minLength);
      sp.setMinLength(minLength);
      String pat=getString("String_Node_Str",obj,false,location,result);
      map.put(PATTERN,pat);
      sp.setPattern(pat);
      Integer iv=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MAX_ITEMS,iv);
      sp.setMaxItems(iv);
      iv=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MIN_ITEMS,iv);
      sp.setMinItems(iv);
      iv=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MIN_LENGTH,iv);
      sp.setMinLength(iv);
      iv=getInteger("String_Node_Str",obj,false,location,result);
      map.put(MAX_LENGTH,iv);
      sp.setMaxLength(iv);
      bd=getBigDecimal("String_Node_Str",obj,false,location,result);
      if (bd != null) {
        map.put(MULTIPLE_OF,bd);
        sp.setMultipleOf(bd.doubleValue());
      }
      Boolean uniqueItems=getBoolean("String_Node_Str",obj,false,location,result);
      map.put(UNIQUE_ITEMS,uniqueItems);
      sp.setUniqueItems(uniqueItems);
      ArrayNode an=getArray("String_Node_Str",obj,false,location,result);
      if (an != null) {
        List<String> _enum=new ArrayList<String>();
        for (        JsonNode n : an) {
          if (n.isValueNode()) {
            _enum.add(n.asText());
          }
 else {
            result.invalidType(location,"String_Node_Str","String_Node_Str",n);
          }
        }
        sp.setEnum(_enum);
        map.put(ENUM,_enum);
      }
      bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        map.put(READ_ONLY,bl);
        sp.setReadOnly(bl);
      }
      bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        map.put(ALLOW_EMPTY_VALUE,bl);
        sp.setAllowEmptyValue(bl);
      }
      Property prop=PropertyBuilder.build(type,format,map);
      if (prop != null) {
        sp.setProperty(prop);
        ObjectNode items=getObject("String_Node_Str",obj,false,location,result);
        if (items != null) {
          Property inner=schema(null,items,location,result);
          sp.setItems(inner);
        }
      }
      Set<String> keys=getKeys(obj);
      for (      String key : keys) {
        if (key.startsWith("String_Node_Str")) {
          sp.setVendorExtension(key,extension(obj.get(key)));
        }
 else         if (!PARAMETER_KEYS.contains(key)) {
          result.extra(location,key,obj.get(key));
        }
      }
      String collectionFormat=getString("String_Node_Str",obj,false,location,result);
      sp.setCollectionFormat(collectionFormat);
      output=sp;
    }
 else     if ("String_Node_Str".equals(value)) {
      BodyParameter bp=new BodyParameter();
      JsonNode node=obj.get("String_Node_Str");
      if (node != null && node instanceof ObjectNode) {
        bp.setSchema(this.definition((ObjectNode)node,location,result));
      }
      ObjectNode examplesNode=getObject("String_Node_Str",obj,false,location,result);
      if (examplesNode != null) {
        Map<String,String> examples=Json.mapper().convertValue(examplesNode,Json.mapper().getTypeFactory().constructMapType(Map.class,String.class,Object.class));
        bp.setExamples(examples);
      }
      String pat=getString("String_Node_Str",obj,false,location,result);
      if (pat != null) {
        bp.setPattern(pat);
      }
      Boolean bl=getBoolean("String_Node_Str",obj,false,location,result);
      if (bl != null) {
        bp.setReadOnly(bl);
      }
      Set<String> keys=getKeys(obj);
      for (      String key : keys) {
        if (key.startsWith("String_Node_Str")) {
          bp.setVendorExtension(key,extension(obj.get(key)));
        }
 else         if (!BODY_PARAMETER_KEYS.contains(key)) {
          result.extra(location,key,obj.get(key));
        }
      }
      output=bp;
    }
    if (output != null) {
      value=getString("String_Node_Str",obj,true,location,result);
      output.setName(value);
      value=getString("String_Node_Str",obj,false,location,result);
      output.setDescription(value);
      Boolean required=getBoolean("String_Node_Str",obj,false,location,result);
      if (required != null) {
        output.setRequired(required);
      }
    }
  }
  return output;
}