Program: 29680
Project: 29680
Buggy source:
public Model definition(ObjectNode node,String location,ParseResult result){
  if (node == null) {
    result.missing(location,"String_Node_Str");
  }
  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;
  value=getString("String_Node_Str",node,false,location,result);
  model.setTitle(value);
  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);
    }
    model=am;
  }
 else {
    ModelImpl impl=new ModelImpl();
    impl.setType(value);
    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.setDescription(value);
    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,true,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));
      }
    }
    if ("String_Node_Str".equals(Json.pretty(impl)))     return null;
    model=impl;
  }
  JsonNode exampleNode=node.get("String_Node_Str");
  if (exampleNode != null) {
    if (exampleNode.getNodeType().equals(JsonNodeType.OBJECT)) {
      ObjectNode on=getObject("String_Node_Str",node,false,location,result);
      if (on != null) {
        model.setExample(on);
      }
    }
 else {
      model.setExample(exampleNode.asText());
    }
  }
  value=getString("String_Node_Str",node,false,location,result);
  model.setDescription(value);
  return model;
}

Fixed version (ground truth):
public Model definition(ObjectNode node,String location,ParseResult result){
  if (node == null) {
    result.missing(location,"String_Node_Str");
  }
  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);
    }
    model=am;
  }
 else {
    ModelImpl impl=new ModelImpl();
    impl.setType(value);
    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.setDescription(value);
    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,true,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));
      }
    }
    if ("String_Node_Str".equals(Json.pretty(impl)))     return null;
    model=impl;
  }
  JsonNode exampleNode=node.get("String_Node_Str");
  if (exampleNode != null) {
    if (exampleNode.getNodeType().equals(JsonNodeType.OBJECT)) {
      ObjectNode on=getObject("String_Node_Str",node,false,location,result);
      if (on != null) {
        model.setExample(on);
      }
    }
 else {
      model.setExample(exampleNode.asText());
    }
  }
  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;
}