Program: 139880
Project: 139880
Buggy source:
public void createOneUnit(final TreeItem treeItem,TableIndicatorUnit indicatorUnit){
  final TreeItem indicatorItem=new TreeItem(treeItem,SWT.NONE);
  final TableIndicatorUnit unit=indicatorUnit;
  IndicatorEnum type=indicatorUnit.getType();
  final IndicatorEnum indicatorEnum=type;
  indicatorItem.setData(TABLE_INDICATOR_KEY,treeItem.getData(TABLE_INDICATOR_KEY));
  indicatorItem.setData(INDICATOR_UNIT_KEY,unit);
  indicatorItem.setData(VIEWER_KEY,this);
  String label=indicatorUnit.getIndicatorName();
  if (IndicatorEnum.WhereRuleIndicatorEnum.compareTo(type) == 0) {
    indicatorItem.setImage(0,ImageLib.getImage(ImageLib.DQ_RULE));
  }
  indicatorItem.setText(0,label);
  TreeEditor optionEditor=new TreeEditor(tree);
  Label optionLabel=new Label(tree,SWT.NONE);
  optionLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
  optionLabel.setImage(ImageLib.getImage(ImageLib.INDICATOR_OPTION));
  optionLabel.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  optionLabel.pack();
  optionLabel.setData(indicatorUnit);
  optionLabel.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      openIndicatorOptionDialog(null,indicatorItem);
    }
  }
);
  optionEditor.minimumWidth=optionLabel.getImage().getBounds().width;
  optionEditor.horizontalAlignment=SWT.CENTER;
  optionEditor.setEditor(optionLabel,indicatorItem,1);
  TreeEditor delEditor=null;
  if (!(unit.getIndicator() instanceof RowCountIndicator)) {
    delEditor=new TreeEditor(tree);
    Label delLabel=new Label(tree,SWT.NONE);
    delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
    delLabel.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));
    delLabel.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
    delLabel.pack();
    delLabel.addMouseListener(new MouseAdapter(){
      @Override public void mouseDown(      MouseEvent e){
        deleteIndicatorItems((TableIndicator)treeItem.getData(TABLE_INDICATOR_KEY),unit);
        if (indicatorItem.getParentItem() != null && indicatorItem.getParentItem().getData(INDICATOR_UNIT_KEY) != null) {
          setElements(tableIndicators);
        }
 else {
          removeItemBranch(indicatorItem);
        }
      }
    }
);
    delEditor.minimumWidth=delLabel.getImage().getBounds().width;
    delEditor.horizontalAlignment=SWT.CENTER;
    delEditor.setEditor(delLabel,indicatorItem,2);
  }
  if (delEditor == null) {
    indicatorItem.setData(ITEM_EDITOR_KEY,new TreeEditor[]{optionEditor});
  }
 else {
    indicatorItem.setData(ITEM_EDITOR_KEY,new TreeEditor[]{optionEditor,delEditor});
  }
  if (indicatorEnum != null && indicatorEnum.hasChildren()) {
    indicatorItem.setData(treeItem.getData(TABLE_INDICATOR_KEY));
    createIndicatorItems(indicatorItem,indicatorUnit.getChildren());
  }
  createIndicatorParameters(indicatorItem,indicatorUnit);
}

Fixed version (ground truth):
public void createOneUnit(final TreeItem treeItem,TableIndicatorUnit indicatorUnit){
  final TreeItem indicatorItem=new TreeItem(treeItem,SWT.NONE);
  final TableIndicatorUnit unit=indicatorUnit;
  IndicatorEnum type=indicatorUnit.getType();
  final IndicatorEnum indicatorEnum=type;
  indicatorItem.setData(TABLE_INDICATOR_KEY,treeItem.getData(TABLE_INDICATOR_KEY));
  indicatorItem.setData(INDICATOR_UNIT_KEY,unit);
  indicatorItem.setData(VIEWER_KEY,this);
  String label=indicatorUnit.getIndicatorName();
  if (IndicatorEnum.WhereRuleIndicatorEnum.compareTo(type) == 0) {
    indicatorItem.setImage(0,ImageLib.getImage(ImageLib.DQ_RULE));
  }
  indicatorItem.setText(0,label);
  TreeEditor optionEditor=new TreeEditor(tree);
  Label optionLabel=new Label(tree,SWT.NONE);
  optionLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
  optionLabel.setImage(ImageLib.getImage(ImageLib.INDICATOR_OPTION));
  optionLabel.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  optionLabel.pack();
  optionLabel.setData(indicatorUnit);
  optionLabel.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      openIndicatorOptionDialog(null,indicatorItem);
    }
  }
);
  optionEditor.minimumWidth=optionLabel.getImage().getBounds().width;
  optionEditor.horizontalAlignment=SWT.CENTER;
  optionEditor.setEditor(optionLabel,indicatorItem,1);
  TreeEditor delEditor=null;
  if (!(unit.getIndicator() instanceof RowCountIndicator)) {
    delEditor=new TreeEditor(tree);
    Label delLabel=new Label(tree,SWT.NONE);
    delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
    delLabel.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));
    delLabel.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
    delLabel.pack();
    delLabel.addMouseListener(new MouseAdapter(){
      @Override public void mouseDown(      MouseEvent e){
        deleteIndicatorItems((TableIndicator)treeItem.getData(TABLE_INDICATOR_KEY),unit);
        if (indicatorItem.getParentItem() != null && indicatorItem.getParentItem().getData(INDICATOR_UNIT_KEY) != null) {
          setElements(tableIndicators);
        }
 else {
          removeItemBranch(indicatorItem);
          indicatorTreeItemMap.remove(unit);
        }
      }
    }
);
    delEditor.minimumWidth=delLabel.getImage().getBounds().width;
    delEditor.horizontalAlignment=SWT.CENTER;
    delEditor.setEditor(delLabel,indicatorItem,2);
  }
  if (delEditor == null) {
    indicatorItem.setData(ITEM_EDITOR_KEY,new TreeEditor[]{optionEditor});
  }
 else {
    indicatorItem.setData(ITEM_EDITOR_KEY,new TreeEditor[]{optionEditor,delEditor});
  }
  if (indicatorEnum != null && indicatorEnum.hasChildren()) {
    indicatorItem.setData(treeItem.getData(TABLE_INDICATOR_KEY));
    createIndicatorItems(indicatorItem,indicatorUnit.getChildren());
  }
  createIndicatorParameters(indicatorItem,indicatorUnit);
  this.indicatorTreeItemMap.put(unit,indicatorItem);
}