Program: 138175
Project: 138175
Buggy source:
private void createChildrenNode(Tree tree,TreeItemContainer parentItem,TreeColumn[] treeColumns,IIndicatorNode[] branchNodes){
  boolean expanded=false;
  for (int i=0; i < branchNodes.length; i++) {
    IIndicatorNode indicatorNode=branchNodes[i];
    if (!indicatorNode.getLabel().equals("String_Node_Str")) {
      final TreeItemContainer treeItem;
      if (parentItem == null) {
        treeItem=new TreeItemContainer(tree,SWT.NONE,treeColumns.length);
      }
 else {
        treeItem=new TreeItemContainer(parentItem,SWT.NONE,treeColumns.length);
      }
      TreeEditor editor;
      Button checkButton;
      Button rowCheckButton=null;
      Button commonCheckButton;
      List<Button> rowButtonList=new ArrayList<Button>();
      for (int j=0; j < treeColumns.length; j++) {
        IndicatorEnum indicatorEnum=indicatorNode.getIndicatorEnum();
        if (j == 0) {
          treeItem.setText(0,indicatorNode.getLabel());
          if (indicatorEnum != null) {
            treeItem.setData(INDICATORITEM,indicatorNode);
          }
          continue;
        }
 else         if (j == 1 && treeColumns.length > 2) {
          editor=new TreeEditor(tree);
          rowCheckButton=new Button(tree,SWT.CHECK);
          rowCheckButton.addSelectionListener(new RowSelectButtonListener(j,treeItem,indicatorEnum,null));
          checkButtons.add(rowCheckButton);
          Color systemColor=tree.getDisplay().getSystemColor(SWT.COLOR_YELLOW);
          treeItem.setBackground(j,systemColor);
          rowCheckButton.setBackground(systemColor);
          commonCheckButton=rowCheckButton;
        }
 else {
          editor=new TreeEditor(tree);
          checkButton=new Button(tree,SWT.CHECK);
          checkButton.setData(indicatorNode);
          ModelElementIndicator pageIndicator=(ModelElementIndicator)treeColumns[j].getData();
          boolean isMatch=isMatchCurrentIndicator(pageIndicator,indicatorNode);
          if (null != pageIndicator && pageIndicator.tempContains(indicatorEnum)) {
            if (isMatch) {
              checkButton.setSelection(true);
              expanded=true;
            }
          }
          checkButton.setEnabled(isMatch);
          checkButton.addSelectionListener(new ButtonSelectionListener(j,treeItem,indicatorEnum,pageIndicator));
          if (indicatorEnum != null) {
            checkButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str",indicatorEnum.getLabel(),pageIndicator.getElementName()));
          }
          checkButton.setData(MODELELEMENTINDICATORFLAG,pageIndicator);
          commonCheckButton=checkButton;
          rowButtonList.add(checkButton);
          checkButtons.add(checkButton);
        }
        commonCheckButton.pack();
        editor.minimumWidth=commonCheckButton.getSize().x;
        editor.horizontalAlignment=SWT.CENTER;
        editor.setEditor(commonCheckButton,treeItem,j);
        treeItem.setButton(j,commonCheckButton);
      }
      if (rowCheckButton != null) {
        boolean allChecked=true;
        rowCheckButton.setData(ROWINDICATORFLAG,rowButtonList);
        for (        Button btn : rowButtonList) {
          if (!btn.getSelection()) {
            allChecked=false;
          }
        }
        rowCheckButton.setSelection(allChecked);
      }
      if (indicatorNode.hasChildren()) {
        createChildrenNode(tree,treeItem,treeColumns,indicatorNode.getChildren());
      }
      if (expanded) {
        TreeItem item=treeItem.getParentItem();
        while (null != item) {
          item.setExpanded(true);
          item=item.getParentItem();
        }
      }
    }
  }
}

Fixed version (ground truth):
private void createChildrenNode(Tree tree,TreeItemContainer parentItem,TreeColumn[] treeColumns,IIndicatorNode[] branchNodes){
  boolean expanded=false;
  for (int i=0; i < branchNodes.length; i++) {
    IIndicatorNode indicatorNode=branchNodes[i];
    if (!indicatorNode.getLabel().equals("String_Node_Str")) {
      final TreeItemContainer treeItem;
      if (parentItem == null) {
        treeItem=new TreeItemContainer(tree,SWT.NONE,treeColumns.length);
        tree.setFocus();
      }
 else {
        treeItem=new TreeItemContainer(parentItem,SWT.NONE,treeColumns.length);
      }
      TreeEditor editor;
      Button checkButton;
      Button rowCheckButton=null;
      Button commonCheckButton;
      List<Button> rowButtonList=new ArrayList<Button>();
      for (int j=0; j < treeColumns.length; j++) {
        IndicatorEnum indicatorEnum=indicatorNode.getIndicatorEnum();
        if (j == 0) {
          treeItem.setText(0,indicatorNode.getLabel());
          if (indicatorEnum != null) {
            treeItem.setData(INDICATORITEM,indicatorNode);
          }
          continue;
        }
 else         if (j == 1 && treeColumns.length > 2) {
          editor=new TreeEditor(tree);
          rowCheckButton=new Button(tree,SWT.CHECK);
          rowCheckButton.addSelectionListener(new RowSelectButtonListener(j,treeItem,indicatorEnum,null));
          checkButtons.add(rowCheckButton);
          Color systemColor=tree.getDisplay().getSystemColor(SWT.COLOR_YELLOW);
          treeItem.setBackground(j,systemColor);
          rowCheckButton.setBackground(systemColor);
          commonCheckButton=rowCheckButton;
        }
 else {
          editor=new TreeEditor(tree);
          checkButton=new Button(tree,SWT.CHECK);
          checkButton.setData(indicatorNode);
          ModelElementIndicator pageIndicator=(ModelElementIndicator)treeColumns[j].getData();
          boolean isMatch=isMatchCurrentIndicator(pageIndicator,indicatorNode);
          if (null != pageIndicator && pageIndicator.tempContains(indicatorEnum)) {
            if (isMatch) {
              checkButton.setSelection(true);
              expanded=true;
            }
          }
          checkButton.setEnabled(isMatch);
          checkButton.addSelectionListener(new ButtonSelectionListener(j,treeItem,indicatorEnum,pageIndicator));
          if (indicatorEnum != null) {
            checkButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str",indicatorEnum.getLabel(),pageIndicator.getElementName()));
          }
          checkButton.setData(MODELELEMENTINDICATORFLAG,pageIndicator);
          commonCheckButton=checkButton;
          rowButtonList.add(checkButton);
          checkButtons.add(checkButton);
        }
        commonCheckButton.pack();
        editor.minimumWidth=commonCheckButton.getSize().x;
        editor.horizontalAlignment=SWT.CENTER;
        editor.setEditor(commonCheckButton,treeItem,j);
        treeItem.setButton(j,commonCheckButton);
      }
      if (rowCheckButton != null) {
        boolean allChecked=true;
        rowCheckButton.setData(ROWINDICATORFLAG,rowButtonList);
        for (        Button btn : rowButtonList) {
          if (!btn.getSelection()) {
            allChecked=false;
          }
        }
        rowCheckButton.setSelection(allChecked);
      }
      if (indicatorNode.hasChildren()) {
        createChildrenNode(tree,treeItem,treeColumns,indicatorNode.getChildren());
      }
      if (expanded) {
        TreeItem item=treeItem.getParentItem();
        while (null != item) {
          item.setExpanded(true);
          item=item.getParentItem();
        }
      }
    }
  }
}