Program: 123732
Project: 123732
Buggy source:
public static void getLoopFunctionData(TreeNode loopParentTreeNode,OutputTreeNode targetOutputNode){
  List<InputLoopNodesTable> listInputLoopNodesTablesEntry=null;
  InputLoopNodesTable inputLoopNodesTable=null;
  if (targetOutputNode == null || loopParentTreeNode == null) {
    return;
  }
  AbstractInOutTree abstractTree=getAbstractInOutTree(targetOutputNode);
  if (abstractTree != null && abstractTree instanceof OutputXmlTree) {
    if (hasDocument(abstractTree)) {
      OutputTreeNode loopParentNode=(OutputTreeNode)getLoopParentNode(targetOutputNode);
      if (loopParentNode != null) {
        inputLoopNodesTable=loopParentNode.getInputLoopNodesTable();
      }
      if (inputLoopNodesTable != null) {
        for (        TreeNode treeNode : inputLoopNodesTable.getInputloopnodes()) {
          if (treeNode.getXpath().equals(loopParentTreeNode.getXpath())) {
            inputLoopNodesTable.getInputloopnodes().remove(loopParentTreeNode);
            break;
          }
        }
      }
    }
 else {
      listInputLoopNodesTablesEntry=((OutputXmlTree)abstractTree).getInputLoopNodesTables();
      if (listInputLoopNodesTablesEntry != null && listInputLoopNodesTablesEntry.size() == 0) {
        return;
      }
 else       if (listInputLoopNodesTablesEntry != null && listInputLoopNodesTablesEntry.size() == 1) {
        inputLoopNodesTable=listInputLoopNodesTablesEntry.get(0);
        if (inputLoopNodesTable != null) {
          for (          TreeNode treeNode : inputLoopNodesTable.getInputloopnodes()) {
            if (treeNode.getXpath().equals(loopParentTreeNode.getXpath())) {
              inputLoopNodesTable.getInputloopnodes().remove(loopParentTreeNode);
              break;
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public static void getLoopFunctionData(TreeNode loopParentTreeNode,OutputTreeNode targetOutputNode){
  List<InputLoopNodesTable> listInputLoopNodesTablesEntry=null;
  InputLoopNodesTable inputLoopNodesTable=null;
  if (targetOutputNode == null || loopParentTreeNode == null) {
    return;
  }
  AbstractInOutTree abstractTree=getAbstractInOutTree(targetOutputNode);
  if (abstractTree != null && abstractTree instanceof OutputXmlTree) {
    if (hasDocument(abstractTree)) {
      OutputTreeNode loopParentNode=(OutputTreeNode)getLoopParentNode(targetOutputNode);
      if (loopParentNode != null) {
        inputLoopNodesTable=loopParentNode.getInputLoopNodesTable();
      }
      if (inputLoopNodesTable != null) {
        for (        TreeNode treeNode : inputLoopNodesTable.getInputloopnodes()) {
          if (treeNode.getXpath().equals(loopParentTreeNode.getXpath())) {
            inputLoopNodesTable.getInputloopnodes().remove(loopParentTreeNode);
            int i=inputLoopNodesTable.getInputloopnodes().size();
            if (i == 0) {
              List<InputLoopNodesTable> inputLoopNodesTables=((OutputXmlTree)abstractTree).getInputLoopNodesTables();
              if (inputLoopNodesTables.contains(inputLoopNodesTable)) {
                inputLoopNodesTables.remove(inputLoopNodesTable);
              }
              loopParentNode.setInputLoopNodesTable(null);
            }
            break;
          }
        }
      }
    }
 else {
      listInputLoopNodesTablesEntry=((OutputXmlTree)abstractTree).getInputLoopNodesTables();
      if (listInputLoopNodesTablesEntry != null && listInputLoopNodesTablesEntry.size() == 0) {
        return;
      }
 else       if (listInputLoopNodesTablesEntry != null && listInputLoopNodesTablesEntry.size() == 1) {
        inputLoopNodesTable=listInputLoopNodesTablesEntry.get(0);
        if (inputLoopNodesTable != null) {
          for (          TreeNode treeNode : inputLoopNodesTable.getInputloopnodes()) {
            if (treeNode.getXpath().equals(loopParentTreeNode.getXpath())) {
              inputLoopNodesTable.getInputloopnodes().remove(loopParentTreeNode);
              int i=inputLoopNodesTable.getInputloopnodes().size();
              if (i == 0) {
                List<InputLoopNodesTable> inputLoopNodesTables=((OutputXmlTree)abstractTree).getInputLoopNodesTables();
                if (inputLoopNodesTables.contains(inputLoopNodesTable)) {
                  inputLoopNodesTables.remove(inputLoopNodesTable);
                }
              }
              break;
            }
          }
        }
      }
    }
  }
}