Program: 54504
Project: 54504
Buggy source:
public static void mergeParam(ObjectMapper objectMapper,JsonNode configRootNode,String pathAndProp,String value) throws Exception {
  String path=pathAndProp.substring(0,pathAndProp.lastIndexOf("String_Node_Str"));
  String prop=pathAndProp.substring(pathAndProp.lastIndexOf("String_Node_Str") + 1);
  JsonPointer pathPointer=JsonPointer.compile(path);
  JsonNode pathNode=configRootNode.at(pathPointer);
  if (pathNode.isMissingNode() || pathNode.isNull()) {
    JsonPointer currentPointer=pathPointer;
    JsonPointer childOfCurrentPointer=null;
    List<JsonPointer> missingPointers=new ArrayList<>();
    List<JsonPointer> childOfMissingPointers=new ArrayList<>();
    do {
      if (pathNode.isMissingNode() || pathNode.isNull()) {
        missingPointers.add(0,currentPointer);
        childOfMissingPointers.add(0,childOfCurrentPointer);
      }
      childOfCurrentPointer=currentPointer;
      currentPointer=currentPointer.head();
      pathNode=configRootNode.at(currentPointer);
    }
 while (pathNode.isMissingNode() || pathNode.isNull());
    for (int missingPointerIndex=0; missingPointerIndex < missingPointers.size(); missingPointerIndex++) {
      final JsonPointer missingPointer=missingPointers.get(missingPointerIndex);
      final JsonPointer childOfMissingPointer=childOfMissingPointers.get(missingPointerIndex);
      final List<JsonNode> newNodes=new ArrayList<>();
      if (pathNode.isObject()) {
        ((ObjectNode)pathNode).set(missingPointer.last().getMatchingProperty(),createNode(childOfMissingPointer,newNodes));
      }
 else       if (pathNode.isArray() && missingPointer.last().mayMatchElement()) {
        for (int index=((ArrayNode)pathNode).size(); index < missingPointer.last().getMatchingIndex() + 1; index++) {
          ((ArrayNode)pathNode).add(createNode(childOfMissingPointer,newNodes));
        }
      }
 else {
        throw new RuntimeException("String_Node_Str" + pathAndProp + "String_Node_Str"+ value);
      }
      pathNode=newNodes.get(newNodes.size() - 1);
    }
  }
  ObjectNode objectNode=(ObjectNode)pathNode;
  Object valueAsObject=objectMapper.readValue(value,Object.class);
  if (valueAsObject != null) {
    JsonNode valueNode=objectMapper.valueToTree(valueAsObject);
    objectNode.set(prop,valueNode);
  }
 else {
    objectNode.remove(prop);
  }
}

Fixed version (ground truth):
public static void mergeParam(ObjectMapper objectMapper,JsonNode configRootNode,String pathAndProp,String value) throws Exception {
  String path=pathAndProp.substring(0,pathAndProp.lastIndexOf("String_Node_Str"));
  String prop=pathAndProp.substring(pathAndProp.lastIndexOf("String_Node_Str") + 1);
  JsonPointer pathPointer=JsonPointer.compile(path);
  JsonNode pathNode=configRootNode.at(pathPointer);
  if (pathNode.isMissingNode() || pathNode.isNull()) {
    JsonPointer currentPointer=pathPointer;
    JsonPointer childOfCurrentPointer=null;
    List<JsonPointer> missingPointers=new ArrayList<>();
    List<JsonPointer> childOfMissingPointers=new ArrayList<>();
    do {
      if (pathNode.isMissingNode() || pathNode.isNull()) {
        missingPointers.add(0,currentPointer);
        childOfMissingPointers.add(0,childOfCurrentPointer);
      }
      childOfCurrentPointer=currentPointer;
      currentPointer=currentPointer.head();
      pathNode=configRootNode.at(currentPointer);
    }
 while (pathNode.isMissingNode() || pathNode.isNull());
    for (int missingPointerIndex=0; missingPointerIndex < missingPointers.size(); missingPointerIndex++) {
      final JsonPointer missingPointer=missingPointers.get(missingPointerIndex);
      final JsonPointer childOfMissingPointer=childOfMissingPointers.get(missingPointerIndex);
      final List<JsonNode> newNodes=new ArrayList<>();
      if (pathNode.isObject()) {
        ((ObjectNode)pathNode).set(missingPointer.last().getMatchingProperty(),createNode(childOfMissingPointer,newNodes));
      }
 else       if (pathNode.isArray() && missingPointer.last().mayMatchElement()) {
        for (int index=((ArrayNode)pathNode).size(); index < missingPointer.last().getMatchingIndex() + 1; index++) {
          ((ArrayNode)pathNode).add(createNode(childOfMissingPointer,newNodes));
        }
      }
 else {
        throw new RuntimeException("String_Node_Str" + pathAndProp + "String_Node_Str"+ value);
      }
      pathNode=newNodes.get(newNodes.size() - 1);
    }
  }
  ObjectNode objectNode=(ObjectNode)pathNode;
  Object valueAsObject;
  try {
    valueAsObject=objectMapper.readValue(value,Object.class);
  }
 catch (  JsonMappingException jsonMappingException) {
    throw JsonMappingException.wrapWithPath(jsonMappingException,configRootNode,path.substring(1) + "String_Node_Str" + prop);
  }
  if (valueAsObject != null) {
    JsonNode valueNode=objectMapper.valueToTree(valueAsObject);
    objectNode.set(prop,valueNode);
  }
 else {
    objectNode.remove(prop);
  }
}