Program: 90490
Project: 90490
Buggy source:
/** 
 * Merge the source Configuration into the target Configuration.
 * @param target        The target node to merge into.
 * @param source        The source node.
 * @param pluginManager The PluginManager.
 */
@Override public void mergConfigurations(Node target,Node source,PluginManager pluginManager){
  for (  Node sourceChildNode : source.getChildren()) {
    boolean isFilter=isFilterNode(sourceChildNode);
    boolean isMerged=false;
    for (    Node targetChildNode : target.getChildren()) {
      if (isFilter) {
        if (isFilterNode(targetChildNode)) {
          updateFilterNode(target,targetChildNode,sourceChildNode,pluginManager);
          isMerged=true;
          break;
        }
 else {
          continue;
        }
      }
      if (!targetChildNode.getName().equalsIgnoreCase(sourceChildNode.getName())) {
        continue;
      }
switch (targetChildNode.getName().toLowerCase()) {
case PROPERTIES:
case SCRIPTS:
case APPENDERS:
{
          for (          Node node : sourceChildNode.getChildren()) {
            for (            Node targetNode : targetChildNode.getChildren()) {
              if (targetNode.getAttributes().get(NAME).equals(node.getAttributes().get(NAME))) {
                targetChildNode.getChildren().remove(targetNode);
                break;
              }
            }
            targetChildNode.getChildren().add(node);
          }
          isMerged=true;
          break;
        }
case LOGGERS:
{
        Map<String,Node> targetLoggers=new HashMap<>();
        for (        Node node : targetChildNode.getChildren()) {
          targetLoggers.put(node.getName(),node);
        }
        for (        Node node : sourceChildNode.getChildren()) {
          Node targetNode=getLoggerNode(targetChildNode,node.getAttributes().get(NAME));
          Node loggerNode=new Node(targetChildNode,node.getName(),node.getType());
          if (targetNode != null) {
            for (            Node sourceLoggerChild : node.getChildren()) {
              if (isFilterNode(sourceLoggerChild)) {
                boolean foundFilter=false;
                for (                Node targetChild : targetNode.getChildren()) {
                  if (isFilterNode(targetChild)) {
                    updateFilterNode(loggerNode,targetChild,sourceLoggerChild,pluginManager);
                    foundFilter=true;
                    break;
                  }
                }
                if (!foundFilter) {
                  Node childNode=new Node(loggerNode,sourceLoggerChild.getName(),sourceLoggerChild.getType());
                  targetNode.getChildren().add(childNode);
                }
              }
 else {
                Node childNode=new Node(loggerNode,sourceLoggerChild.getName(),sourceLoggerChild.getType());
                childNode.getAttributes().putAll(sourceLoggerChild.getAttributes());
                if (childNode.getName().equalsIgnoreCase("String_Node_Str")) {
                  for (                  Node targetChild : targetNode.getChildren()) {
                    if (isSameReference(targetChild,childNode)) {
                      targetNode.getChildren().remove(targetChild);
                      break;
                    }
                  }
                }
 else {
                  for (                  Node targetChild : targetNode.getChildren()) {
                    if (isSameName(targetChild,childNode)) {
                      targetNode.getChildren().remove(targetChild);
                      break;
                    }
                  }
                }
                targetNode.getChildren().add(childNode);
              }
            }
          }
 else {
            loggerNode.getAttributes().putAll(node.getAttributes());
            loggerNode.getChildren().addAll(node.getChildren());
            targetChildNode.getChildren().add(loggerNode);
          }
        }
        isMerged=true;
        break;
      }
default :
{
      targetChildNode.getChildren().addAll(sourceChildNode.getChildren());
      isMerged=true;
      break;
    }
}
}
if (!isMerged) {
target.getChildren().add(sourceChildNode);
}
}
}

Fixed version (ground truth):
/** 
 * Merge the source Configuration into the target Configuration.
 * @param target        The target node to merge into.
 * @param source        The source node.
 * @param pluginManager The PluginManager.
 */
@Override public void mergConfigurations(Node target,Node source,PluginManager pluginManager){
  for (  Node sourceChildNode : source.getChildren()) {
    boolean isFilter=isFilterNode(sourceChildNode);
    boolean isMerged=false;
    for (    Node targetChildNode : target.getChildren()) {
      if (isFilter) {
        if (isFilterNode(targetChildNode)) {
          updateFilterNode(target,targetChildNode,sourceChildNode,pluginManager);
          isMerged=true;
          break;
        }
 else {
          continue;
        }
      }
      if (!targetChildNode.getName().equalsIgnoreCase(sourceChildNode.getName())) {
        continue;
      }
switch (targetChildNode.getName().toLowerCase()) {
case PROPERTIES:
case SCRIPTS:
case APPENDERS:
{
          for (          Node node : sourceChildNode.getChildren()) {
            for (            Node targetNode : targetChildNode.getChildren()) {
              if (targetNode.getAttributes().get(NAME).equals(node.getAttributes().get(NAME))) {
                targetChildNode.getChildren().remove(targetNode);
                break;
              }
            }
            targetChildNode.getChildren().add(node);
          }
          isMerged=true;
          break;
        }
case LOGGERS:
{
        Map<String,Node> targetLoggers=new HashMap<>();
        for (        Node node : targetChildNode.getChildren()) {
          targetLoggers.put(node.getName(),node);
        }
        for (        Node node : sourceChildNode.getChildren()) {
          Node targetNode=getLoggerNode(targetChildNode,node.getAttributes().get(NAME));
          Node loggerNode=new Node(targetChildNode,node.getName(),node.getType());
          if (targetNode != null) {
            for (            Node sourceLoggerChild : node.getChildren()) {
              if (isFilterNode(sourceLoggerChild)) {
                boolean foundFilter=false;
                for (                Node targetChild : targetNode.getChildren()) {
                  if (isFilterNode(targetChild)) {
                    updateFilterNode(loggerNode,targetChild,sourceLoggerChild,pluginManager);
                    foundFilter=true;
                    break;
                  }
                }
                if (!foundFilter) {
                  Node childNode=new Node(loggerNode,sourceLoggerChild.getName(),sourceLoggerChild.getType());
                  targetNode.getChildren().add(childNode);
                }
              }
 else {
                Node childNode=new Node(loggerNode,sourceLoggerChild.getName(),sourceLoggerChild.getType());
                childNode.getAttributes().putAll(sourceLoggerChild.getAttributes());
                if (childNode.getName().equalsIgnoreCase("String_Node_Str")) {
                  for (                  Node targetChild : targetNode.getChildren()) {
                    if (isSameReference(targetChild,childNode)) {
                      targetNode.getChildren().remove(targetChild);
                      break;
                    }
                  }
                }
 else {
                  for (                  Node targetChild : targetNode.getChildren()) {
                    if (isSameName(targetChild,childNode)) {
                      targetNode.getChildren().remove(targetChild);
                      break;
                    }
                  }
                }
                targetNode.getChildren().add(childNode);
              }
            }
          }
 else {
            loggerNode.getAttributes().putAll(node.getAttributes());
            loggerNode.getChildren().addAll(node.getChildren());
            targetChildNode.getChildren().add(loggerNode);
          }
        }
        isMerged=true;
        break;
      }
default :
{
      targetChildNode.getChildren().addAll(sourceChildNode.getChildren());
      isMerged=true;
      break;
    }
}
}
if (!isMerged) {
if (sourceChildNode.getName().equalsIgnoreCase("String_Node_Str")) {
  target.getChildren().add(0,sourceChildNode);
}
 else {
  target.getChildren().add(sourceChildNode);
}
}
}
}