Program: 177116
Project: 177116
Buggy source:
private void build(ObjectNode node,ObjectTypeDefinition type,Context context){
  if (context.stack.size() > 2) {
    return;
  }
  if (type.getTypeIdInclusion() == JsonTypeInfo.As.PROPERTY) {
    if (type.getTypeIdProperty() != null) {
      node.put(type.getTypeIdProperty(),"String_Node_Str");
    }
  }
  FacetFilter facetFilter=type.getContext().getContext().getConfiguration().getFacetFilter();
  for (  Member member : type.getMembers()) {
    if (!facetFilter.accept(member)) {
      continue;
    }
    if (ElementUtils.findDeprecationMessage(member,null) != null) {
      continue;
    }
    String example=null;
    String example2=null;
    JsonType exampleType=null;
    JavaDoc.JavaDocTagList tags=getDocumentationExampleTags(member);
    if (tags != null && tags.size() > 0) {
      String tag=tags.get(0).trim();
      example=tag.isEmpty() ? null : tag;
      example2=example;
      if (tags.size() > 1) {
        tag=tags.get(1).trim();
        example2=tag.isEmpty() ? null : tag;
      }
    }
    tags=member.getJavaDoc().get("String_Node_Str");
    if (tags != null && tags.size() > 0) {
      String tag=tags.get(0).trim();
      if (!tag.isEmpty()) {
        TypeElement typeElement=type.getContext().getContext().getProcessingEnvironment().getElementUtils().getTypeElement(tag);
        if (typeElement != null) {
          exampleType=JsonTypeFactory.getJsonType(typeElement.asType(),type.getContext());
        }
 else {
          type.getContext().getContext().getLogger().warn("String_Node_Str",tag);
        }
      }
    }
    DocumentationExample documentationExample=getDocumentationExample(member);
    if (documentationExample != null) {
      if (documentationExample.exclude()) {
        continue;
      }
      example=documentationExample.value();
      example="String_Node_Str".equals(example) ? null : example;
      example2=documentationExample.value2();
      example2="String_Node_Str".equals(example2) ? null : example2;
      TypeMirror typeHint=TypeHintUtils.getTypeHint(documentationExample.type(),type.getContext().getContext().getProcessingEnvironment(),null);
      if (typeHint != null) {
        exampleType=JsonTypeFactory.getJsonType(typeHint,type.getContext());
      }
    }
    String specifiedTypeInfoValue=findSpecifiedTypeInfoValue(member,type.getQualifiedName().toString(),type);
    if (specifiedTypeInfoValue != null) {
      example=specifiedTypeInfoValue;
      example2=specifiedTypeInfoValue;
    }
    String configuredExample=getConfiguredExample(member);
    if (configuredExample != null) {
      example=configuredExample;
      example2=configuredExample;
    }
    if (context.currentIndex % 2 > 0) {
      String placeholder=example2;
      example2=example;
      example=placeholder;
    }
    if (member.getChoices().size() > 1) {
      if (member.isCollectionType()) {
        final ArrayNode exampleNode=JsonNodeFactory.instance.arrayNode();
        for (        Member choice : member.getChoices()) {
          JsonType jsonType=exampleType == null ? choice.getJsonType() : exampleType;
          String choiceName=choice.getName();
          if ("String_Node_Str".equals(choiceName)) {
            choiceName="String_Node_Str";
          }
          if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.WRAPPER_ARRAY) {
            ArrayNode wrapperNode=JsonNodeFactory.instance.arrayNode();
            wrapperNode.add(choiceName);
            wrapperNode.add(exampleNode(jsonType,example,example2,context));
            exampleNode.add(wrapperNode);
          }
 else           if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.WRAPPER_OBJECT) {
            ObjectNode wrapperNode=JsonNodeFactory.instance.objectNode();
            wrapperNode.set(choiceName,exampleNode(jsonType,example,example2,context));
            exampleNode.add(wrapperNode);
          }
 else {
            JsonNode itemNode=exampleNode(jsonType,example,example2,context);
            if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.PROPERTY) {
              if (member.getSubtypeIdProperty() != null && itemNode instanceof ObjectNode) {
                ((ObjectNode)itemNode).put(member.getSubtypeIdProperty(),"String_Node_Str");
              }
            }
 else             if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
              if (member.getSubtypeIdProperty() != null) {
                node.put(member.getSubtypeIdProperty(),"String_Node_Str");
              }
            }
            exampleNode.add(itemNode);
          }
        }
        node.set(member.getName(),exampleNode);
      }
 else {
        for (        Member choice : member.getChoices()) {
          JsonNode exampleNode;
          JsonType jsonType=exampleType == null ? choice.getJsonType() : exampleType;
          String choiceName=choice.getName();
          if ("String_Node_Str".equals(choiceName)) {
            choiceName="String_Node_Str";
          }
          if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.WRAPPER_ARRAY) {
            ArrayNode wrapperNode=JsonNodeFactory.instance.arrayNode();
            wrapperNode.add(choiceName);
            wrapperNode.add(exampleNode(jsonType,example,example2,context));
            exampleNode=wrapperNode;
          }
 else           if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.WRAPPER_OBJECT) {
            ObjectNode wrapperNode=JsonNodeFactory.instance.objectNode();
            wrapperNode.set(choiceName,exampleNode(jsonType,example,example2,context));
            exampleNode=wrapperNode;
          }
 else {
            exampleNode=exampleNode(jsonType,example,example2,context);
            if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.PROPERTY) {
              if (member.getSubtypeIdProperty() != null && exampleNode instanceof ObjectNode) {
                ((ObjectNode)exampleNode).put(member.getSubtypeIdProperty(),"String_Node_Str");
              }
            }
 else             if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
              if (member.getSubtypeIdProperty() != null) {
                node.put(member.getSubtypeIdProperty(),"String_Node_Str");
              }
            }
          }
          node.set(member.getName(),exampleNode);
        }
      }
    }
 else {
      JsonType jsonType=exampleType == null ? member.getJsonType() : exampleType;
      node.set(member.getName(),exampleNode(jsonType,example,example2,context));
    }
  }
  JsonType supertype=type.getSupertype();
  if (supertype instanceof JsonClassType && ((JsonClassType)supertype).getTypeDefinition() instanceof ObjectTypeDefinition) {
    build(node,(ObjectTypeDefinition)((JsonClassType)supertype).getTypeDefinition(),context);
  }
  if (type.getWildcardMember() != null && ElementUtils.findDeprecationMessage(type.getWildcardMember(),null) == null && !ExampleUtils.isExcluded(type.getWildcardMember())) {
    node.put("String_Node_Str","String_Node_Str");
    node.put("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
private void build(ObjectNode node,ObjectTypeDefinition type,@Nonnull ObjectTypeDefinition sourceType,Context context){
  if (context.stack.size() > 2) {
    return;
  }
  if (type.getTypeIdInclusion() == JsonTypeInfo.As.PROPERTY) {
    if (type.getTypeIdProperty() != null) {
      node.put(type.getTypeIdProperty(),sourceType.getTypeIdValue());
    }
  }
  FacetFilter facetFilter=type.getContext().getContext().getConfiguration().getFacetFilter();
  for (  Member member : type.getMembers()) {
    if (!facetFilter.accept(member)) {
      continue;
    }
    if (ElementUtils.findDeprecationMessage(member,null) != null) {
      continue;
    }
    String example=null;
    String example2=null;
    JsonType exampleType=null;
    JavaDoc.JavaDocTagList tags=getDocumentationExampleTags(member);
    if (tags != null && tags.size() > 0) {
      String tag=tags.get(0).trim();
      example=tag.isEmpty() ? null : tag;
      example2=example;
      if (tags.size() > 1) {
        tag=tags.get(1).trim();
        example2=tag.isEmpty() ? null : tag;
      }
    }
    tags=member.getJavaDoc().get("String_Node_Str");
    if (tags != null && tags.size() > 0) {
      String tag=tags.get(0).trim();
      if (!tag.isEmpty()) {
        TypeElement typeElement=type.getContext().getContext().getProcessingEnvironment().getElementUtils().getTypeElement(tag);
        if (typeElement != null) {
          exampleType=JsonTypeFactory.getJsonType(typeElement.asType(),type.getContext());
        }
 else {
          type.getContext().getContext().getLogger().warn("String_Node_Str",tag);
        }
      }
    }
    DocumentationExample documentationExample=getDocumentationExample(member);
    if (documentationExample != null) {
      if (documentationExample.exclude()) {
        continue;
      }
      example=documentationExample.value();
      example="String_Node_Str".equals(example) ? null : example;
      example2=documentationExample.value2();
      example2="String_Node_Str".equals(example2) ? null : example2;
      TypeMirror typeHint=TypeHintUtils.getTypeHint(documentationExample.type(),type.getContext().getContext().getProcessingEnvironment(),null);
      if (typeHint != null) {
        exampleType=JsonTypeFactory.getJsonType(typeHint,type.getContext());
      }
    }
    String specifiedTypeInfoValue=findSpecifiedTypeInfoValue(member,type.getQualifiedName().toString(),type);
    if (specifiedTypeInfoValue != null) {
      example=specifiedTypeInfoValue;
      example2=specifiedTypeInfoValue;
    }
    String configuredExample=getConfiguredExample(member);
    if (configuredExample != null) {
      example=configuredExample;
      example2=configuredExample;
    }
    if (context.currentIndex % 2 > 0) {
      String placeholder=example2;
      example2=example;
      example=placeholder;
    }
    if (member.getChoices().size() > 1) {
      if (member.isCollectionType()) {
        final ArrayNode exampleNode=JsonNodeFactory.instance.arrayNode();
        for (        Member choice : member.getChoices()) {
          JsonType jsonType=exampleType == null ? choice.getJsonType() : exampleType;
          String choiceName=choice.getName();
          if ("String_Node_Str".equals(choiceName)) {
            choiceName="String_Node_Str";
          }
          if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.WRAPPER_ARRAY) {
            ArrayNode wrapperNode=JsonNodeFactory.instance.arrayNode();
            wrapperNode.add(choiceName);
            wrapperNode.add(exampleNode(jsonType,example,example2,context));
            exampleNode.add(wrapperNode);
          }
 else           if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.WRAPPER_OBJECT) {
            ObjectNode wrapperNode=JsonNodeFactory.instance.objectNode();
            wrapperNode.set(choiceName,exampleNode(jsonType,example,example2,context));
            exampleNode.add(wrapperNode);
          }
 else {
            JsonNode itemNode=exampleNode(jsonType,example,example2,context);
            if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.PROPERTY) {
              if (member.getSubtypeIdProperty() != null && itemNode instanceof ObjectNode) {
                ((ObjectNode)itemNode).put(member.getSubtypeIdProperty(),"String_Node_Str");
              }
            }
 else             if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
              if (member.getSubtypeIdProperty() != null) {
                node.put(member.getSubtypeIdProperty(),"String_Node_Str");
              }
            }
            exampleNode.add(itemNode);
          }
        }
        node.set(member.getName(),exampleNode);
      }
 else {
        for (        Member choice : member.getChoices()) {
          JsonNode exampleNode;
          JsonType jsonType=exampleType == null ? choice.getJsonType() : exampleType;
          String choiceName=choice.getName();
          if ("String_Node_Str".equals(choiceName)) {
            choiceName="String_Node_Str";
          }
          if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.WRAPPER_ARRAY) {
            ArrayNode wrapperNode=JsonNodeFactory.instance.arrayNode();
            wrapperNode.add(choiceName);
            wrapperNode.add(exampleNode(jsonType,example,example2,context));
            exampleNode=wrapperNode;
          }
 else           if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.WRAPPER_OBJECT) {
            ObjectNode wrapperNode=JsonNodeFactory.instance.objectNode();
            wrapperNode.set(choiceName,exampleNode(jsonType,example,example2,context));
            exampleNode=wrapperNode;
          }
 else {
            exampleNode=exampleNode(jsonType,example,example2,context);
            if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.PROPERTY) {
              if (member.getSubtypeIdProperty() != null && exampleNode instanceof ObjectNode) {
                ((ObjectNode)exampleNode).put(member.getSubtypeIdProperty(),"String_Node_Str");
              }
            }
 else             if (member.getSubtypeIdInclusion() == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
              if (member.getSubtypeIdProperty() != null) {
                node.put(member.getSubtypeIdProperty(),"String_Node_Str");
              }
            }
          }
          node.set(member.getName(),exampleNode);
        }
      }
    }
 else {
      JsonType jsonType=exampleType == null ? member.getJsonType() : exampleType;
      node.set(member.getName(),exampleNode(jsonType,example,example2,context));
    }
  }
  JsonType supertype=type.getSupertype();
  if (supertype instanceof JsonClassType && ((JsonClassType)supertype).getTypeDefinition() instanceof ObjectTypeDefinition) {
    build(node,(ObjectTypeDefinition)((JsonClassType)supertype).getTypeDefinition(),sourceType,context);
  }
  if (type.getWildcardMember() != null && ElementUtils.findDeprecationMessage(type.getWildcardMember(),null) == null && !ExampleUtils.isExcluded(type.getWildcardMember())) {
    node.put("String_Node_Str","String_Node_Str");
    node.put("String_Node_Str","String_Node_Str");
  }
}