Program: 29645
Project: 29645
Buggy source:
public Model definition(ObjectNode node,String location,ParseResult result){
  if (result == null) {
    result=new ParseResult();
  }
  if (node == null) {
    result.missing(location,"String_Node_Str");
    return null;
  }
  if (node.get("String_Node_Str") != null) {
    return refModel(node,location,result);
  }
  if (node.get("String_Node_Str") != null) {
    return allOfModel(node,location,result);
  }
  Model model=null;
  String value=null;
  String type=getString("String_Node_Str",node,false,location,result);
  Model m=new ModelImpl();
  if ("String_Node_Str".equals(type)) {
    ArrayModel am=new ArrayModel();
    ObjectNode propertyNode=getObject("String_Node_Str",node,false,location,result);
    Map<String,Property> properties=properties(propertyNode,location,result);
    am.setProperties(properties);
    ObjectNode itemsNode=getObject("String_Node_Str",node,false,location,result);
    Property items=property(itemsNode,location,result);
    if (items != null) {
      am.items(items);
    }
    Integer maxItems=getInteger("String_Node_Str",node,false,location,result);
    am.setMaxItems(maxItems);
    Integer minItems=getInteger("String_Node_Str",node,false,location,result);
    am.setMinItems(minItems);
    Set<String> keys=getKeys(node);
    for (    String key : keys) {
      if (key.startsWith("String_Node_Str")) {
        am.setVendorExtension(key,extension(node.get(key)));
      }
    }
    model=am;
  }
 else {
    ModelImpl impl=new ModelImpl();
    impl.setType(type);
    JsonNode ap=node.get("String_Node_Str");
    if (ap != null && ap.getNodeType().equals(JsonNodeType.OBJECT)) {
      impl.setAdditionalProperties(Json.mapper().convertValue(ap,Property.class));
    }
    value=getString("String_Node_Str",node,false,location,result);
    impl.setDefaultValue(value);
    value=getString("String_Node_Str",node,false,location,result);
    impl.setFormat(value);
    value=getString("String_Node_Str",node,false,location,result);
    impl.setDiscriminator(value);
    Boolean bp=getBoolean("String_Node_Str",node,false,location,result);
    if (bp != null) {
      impl.setUniqueItems(bp);
    }
    ap=node.get("String_Node_Str");
    if (ap != null) {
      ArrayNode arrayNode=getArray("String_Node_Str",node,false,location,result);
      if (arrayNode != null) {
        for (        JsonNode n : arrayNode) {
          if (n.isValueNode()) {
            impl._enum(n.asText());
          }
 else {
            result.invalidType(location,"String_Node_Str","String_Node_Str",n);
          }
        }
      }
    }
    JsonNode xml=node.get("String_Node_Str");
    if (xml != null) {
      impl.setXml(Json.mapper().convertValue(xml,Xml.class));
    }
    ObjectNode externalDocs=getObject("String_Node_Str",node,false,location,result);
    ExternalDocs docs=externalDocs(externalDocs,location,result);
    impl.setExternalDocs(docs);
    ObjectNode properties=getObject("String_Node_Str",node,false,location,result);
    if (properties != null) {
      Set<String> propertyNames=getKeys(properties);
      for (      String propertyName : propertyNames) {
        JsonNode propertyNode=properties.get(propertyName);
        if (propertyNode.getNodeType().equals(JsonNodeType.OBJECT)) {
          ObjectNode on=(ObjectNode)propertyNode;
          Property property=property(on,location,result);
          impl.property(propertyName,property);
        }
 else {
          result.invalidType(location,"String_Node_Str","String_Node_Str",propertyNode);
        }
      }
    }
    ArrayNode required=getArray("String_Node_Str",node,false,location,result);
    if (required != null) {
      List<String> requiredProperties=new ArrayList<String>();
      for (      JsonNode n : required) {
        if (n.getNodeType().equals(JsonNodeType.STRING)) {
          requiredProperties.add(((TextNode)n).textValue());
        }
 else {
          result.invalidType(location,"String_Node_Str","String_Node_Str",n);
        }
      }
      if (requiredProperties.size() > 0) {
        impl.setRequired(requiredProperties);
      }
    }
    Set<String> keys=getKeys(node);
    for (    String key : keys) {
      if (key.startsWith("String_Node_Str")) {
        impl.setVendorExtension(key,extension(node.get(key)));
      }
 else       if (!SCHEMA_KEYS.contains(key)) {
        result.extra(location,key,node.get(key));
      }
    }
    model=impl;
  }
  JsonNode exampleNode=node.get("String_Node_Str");
  if (exampleNode != null) {
    Object example=Json.mapper().convertValue(exampleNode,Object.class);
    model.setExample(example);
  }
  if (model != null) {
    value=getString("String_Node_Str",node,false,location,result);
    model.setDescription(value);
    value=getString("String_Node_Str",node,false,location,result);
    model.setTitle(value);
  }
  return model;
}

Fixed version (ground truth):
public Model definition(ObjectNode node,String location,ParseResult result){
  if (result == null) {
    result=new ParseResult();
  }
  if (node == null) {
    result.missing(location,"String_Node_Str");
    return null;
  }
  if (node.get("String_Node_Str") != null) {
    return refModel(node,location,result);
  }
  if (node.get("String_Node_Str") != null) {
    return allOfModel(node,location,result);
  }
  Model model=null;
  String value=null;
  String type=getString("String_Node_Str",node,false,location,result);
  Model m=new ModelImpl();
  if ("String_Node_Str".equals(type)) {
    ArrayModel am=new ArrayModel();
    ObjectNode propertyNode=getObject("String_Node_Str",node,false,location,result);
    Map<String,Property> properties=properties(propertyNode,location,result);
    am.setProperties(properties);
    ObjectNode itemsNode=getObject("String_Node_Str",node,false,location,result);
    Property items=property(itemsNode,location,result);
    if (items != null) {
      am.items(items);
    }
    Integer maxItems=getInteger("String_Node_Str",node,false,location,result);
    am.setMaxItems(maxItems);
    Integer minItems=getInteger("String_Node_Str",node,false,location,result);
    am.setMinItems(minItems);
    Set<String> keys=getKeys(node);
    for (    String key : keys) {
      if (key.startsWith("String_Node_Str")) {
        am.setVendorExtension(key,extension(node.get(key)));
      }
    }
    model=am;
  }
 else {
    ModelImpl impl=new ModelImpl();
    impl.setType(type);
    JsonNode ap=node.get("String_Node_Str");
    if (ap != null && ap.getNodeType().equals(JsonNodeType.OBJECT)) {
      impl.setAdditionalProperties(Json.mapper().convertValue(ap,Property.class));
    }
    value=getString("String_Node_Str",node,false,location,result);
    impl.setDefaultValue(value);
    value=getString("String_Node_Str",node,false,location,result);
    impl.setFormat(value);
    value=getString("String_Node_Str",node,false,location,result);
    impl.setDiscriminator(value);
    Boolean bp=getBoolean("String_Node_Str",node,false,location,result);
    if (bp != null) {
      impl.setUniqueItems(bp);
    }
    bp=getBoolean("String_Node_Str",node,false,location,result);
    if (bp != null) {
      impl.setExclusiveMaximum(bp);
    }
    bp=getBoolean("String_Node_Str",node,false,location,result);
    if (bp != null) {
      impl.setExclusiveMinimum(bp);
    }
    value=getString("String_Node_Str",node,false,location,result);
    impl.setPattern(value);
    BigDecimal maximum=getBigDecimal("String_Node_Str",node,false,location,result);
    if (maximum != null) {
      impl.maximum(maximum);
    }
    BigDecimal minimum=getBigDecimal("String_Node_Str",node,false,location,result);
    if (minimum != null) {
      impl.minimum(minimum);
    }
    Integer minLength=getInteger("String_Node_Str",node,false,location,result);
    if (minLength != null) {
      impl.setMinLength(minLength);
    }
    Integer maxLength=getInteger("String_Node_Str",node,false,location,result);
    if (maxLength != null) {
      impl.setMaxLength(maxLength);
    }
    BigDecimal multipleOf=getBigDecimal("String_Node_Str",node,false,location,result);
    if (multipleOf != null) {
      impl.setMultipleOf(multipleOf);
    }
    ap=node.get("String_Node_Str");
    if (ap != null) {
      ArrayNode arrayNode=getArray("String_Node_Str",node,false,location,result);
      if (arrayNode != null) {
        for (        JsonNode n : arrayNode) {
          if (n.isValueNode()) {
            impl._enum(n.asText());
          }
 else {
            result.invalidType(location,"String_Node_Str","String_Node_Str",n);
          }
        }
      }
    }
    JsonNode xml=node.get("String_Node_Str");
    if (xml != null) {
      impl.setXml(Json.mapper().convertValue(xml,Xml.class));
    }
    ObjectNode externalDocs=getObject("String_Node_Str",node,false,location,result);
    ExternalDocs docs=externalDocs(externalDocs,location,result);
    impl.setExternalDocs(docs);
    ObjectNode properties=getObject("String_Node_Str",node,false,location,result);
    if (properties != null) {
      Set<String> propertyNames=getKeys(properties);
      for (      String propertyName : propertyNames) {
        JsonNode propertyNode=properties.get(propertyName);
        if (propertyNode.getNodeType().equals(JsonNodeType.OBJECT)) {
          ObjectNode on=(ObjectNode)propertyNode;
          Property property=property(on,location,result);
          impl.property(propertyName,property);
        }
 else {
          result.invalidType(location,"String_Node_Str","String_Node_Str",propertyNode);
        }
      }
    }
    ArrayNode required=getArray("String_Node_Str",node,false,location,result);
    if (required != null) {
      List<String> requiredProperties=new ArrayList<String>();
      for (      JsonNode n : required) {
        if (n.getNodeType().equals(JsonNodeType.STRING)) {
          requiredProperties.add(((TextNode)n).textValue());
        }
 else {
          result.invalidType(location,"String_Node_Str","String_Node_Str",n);
        }
      }
      if (requiredProperties.size() > 0) {
        impl.setRequired(requiredProperties);
      }
    }
    Set<String> keys=getKeys(node);
    for (    String key : keys) {
      if (key.startsWith("String_Node_Str")) {
        impl.setVendorExtension(key,extension(node.get(key)));
      }
 else       if (!SCHEMA_KEYS.contains(key)) {
        result.extra(location,key,node.get(key));
      }
    }
    model=impl;
  }
  JsonNode exampleNode=node.get("String_Node_Str");
  if (exampleNode != null) {
    Object example=Json.mapper().convertValue(exampleNode,Object.class);
    model.setExample(example);
  }
  if (model != null) {
    value=getString("String_Node_Str",node,false,location,result);
    model.setDescription(value);
    value=getString("String_Node_Str",node,false,location,result);
    model.setTitle(value);
  }
  return model;
}