Program: 39303
Project: 39303
Buggy source:
private void parsePredefinedFilterChildNodes(final NodeList componentNodes,final ViewDefinitionParser parser) throws ViewDefinitionParserNodeException {
  for (int i=0; i < componentNodes.getLength(); i++) {
    Node child=componentNodes.item(i);
    if (child.getNodeType() == Node.ELEMENT_NODE) {
      if ("String_Node_Str".equals(child.getNodeName())) {
        PredefinedFilter predefinedFilter=new PredefinedFilter();
        predefinedFilter.setName(parser.getStringAttribute(child,"String_Node_Str"));
        NodeList restrictionNodes=child.getChildNodes();
        for (int restrictionNodesIndex=0; restrictionNodesIndex < restrictionNodes.getLength(); restrictionNodesIndex++) {
          Node restrictionNode=restrictionNodes.item(restrictionNodesIndex);
          if (restrictionNode.getNodeType() == Node.ELEMENT_NODE) {
            if ("String_Node_Str".equals(restrictionNode.getNodeName())) {
              predefinedFilter.addFilterRestriction(parser.getStringAttribute(restrictionNode,"String_Node_Str"),parser.getStringAttribute(restrictionNode,"String_Node_Str"));
            }
 else             if ("String_Node_Str".equals(restrictionNode.getNodeName())) {
              String column=parser.getStringAttribute(restrictionNode,"String_Node_Str");
              String direction=parser.getStringAttribute(restrictionNode,"String_Node_Str");
              if (column == null) {
                throw new ViewDefinitionParserNodeException(restrictionNode,"String_Node_Str");
              }
              if (direction == null) {
                direction="String_Node_Str";
              }
 else {
                if (!("String_Node_Str".equals(direction) || "String_Node_Str".equals(direction))) {
                  throw new ViewDefinitionParserNodeException(restrictionNode,"String_Node_Str" + direction);
                }
              }
              predefinedFilter.setOrderColumn(column);
              predefinedFilter.setOrderDirection(direction);
            }
 else {
              throw new ViewDefinitionParserNodeException(restrictionNode,"String_Node_Str");
            }
          }
        }
        if (predefinedFilter.getOrderColumn() == null && defaultOrderColumn != null) {
          predefinedFilter.setOrderColumn(defaultOrderColumn);
          predefinedFilter.setOrderDirection(defaultOrderDirection);
        }
        predefinedFilters.add(predefinedFilter);
      }
 else {
        throwIllegalStateException("String_Node_Str");
        throw new ViewDefinitionParserNodeException(child,"String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
private void parsePredefinedFilterChildNodes(final NodeList componentNodes,final ViewDefinitionParser parser) throws ViewDefinitionParserNodeException {
  for (int i=0; i < componentNodes.getLength(); i++) {
    Node child=componentNodes.item(i);
    if (child.getNodeType() == Node.ELEMENT_NODE) {
      if ("String_Node_Str".equals(child.getNodeName())) {
        PredefinedFilter predefinedFilter=new PredefinedFilter();
        predefinedFilter.setName(parser.getStringAttribute(child,"String_Node_Str"));
        NodeList restrictionNodes=child.getChildNodes();
        for (int restrictionNodesIndex=0; restrictionNodesIndex < restrictionNodes.getLength(); restrictionNodesIndex++) {
          Node restrictionNode=restrictionNodes.item(restrictionNodesIndex);
          if (restrictionNode.getNodeType() == Node.ELEMENT_NODE) {
            if ("String_Node_Str".equals(restrictionNode.getNodeName())) {
              predefinedFilter.addFilterRestriction(parser.getStringAttribute(restrictionNode,COLUMN),parser.getStringAttribute(restrictionNode,"String_Node_Str"));
            }
 else             if ("String_Node_Str".equals(restrictionNode.getNodeName())) {
              String column=parser.getStringAttribute(restrictionNode,COLUMN);
              String direction=parser.getStringAttribute(restrictionNode,"String_Node_Str");
              if (column == null) {
                throw new ViewDefinitionParserNodeException(restrictionNode,"String_Node_Str");
              }
              if (direction == null) {
                direction="String_Node_Str";
              }
 else {
                if (!("String_Node_Str".equals(direction) || "String_Node_Str".equals(direction))) {
                  throw new ViewDefinitionParserNodeException(restrictionNode,"String_Node_Str" + direction);
                }
              }
              predefinedFilter.setOrderColumn(column);
              predefinedFilter.setOrderDirection(direction);
            }
 else {
              throw new ViewDefinitionParserNodeException(restrictionNode,"String_Node_Str");
            }
          }
        }
        if (predefinedFilter.getOrderColumn() == null && defaultOrderColumn != null) {
          predefinedFilter.setOrderColumn(defaultOrderColumn);
          predefinedFilter.setOrderDirection(defaultOrderDirection);
        }
        predefinedFilters.add(predefinedFilter);
      }
 else {
        throwIllegalStateException("String_Node_Str");
        throw new ViewDefinitionParserNodeException(child,"String_Node_Str");
      }
    }
  }
}