Program: 137823
Project: 137823
Buggy source:
private void addTreeListener(final Tree tree){
  tree.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TreeItem item=(TreeItem)e.item;
      if (item == null || DATA_PARAM.equals(item.getData(DATA_PARAM))) {
        Menu m=tree.getMenu();
        if (m != null && !m.isDisposed()) {
          m.dispose();
        }
        tree.setMenu(null);
      }
 else {
        new AnalysisColumnColumnMenuProvider(tree).createTreeMenu(Boolean.FALSE);
      }
    }
  }
);
  tree.addTreeListener(new TreeAdapter(){
    @Override public void treeCollapsed(    TreeEvent e){
      ExpandableComposite theSuitedComposite=getTheSuitedComposite(e);
      ScrolledForm form=masterPage.getForm();
      Composite comp=masterPage.getChartComposite();
      if (theSuitedComposite != null && theSuitedComposite.isExpanded()) {
        getTheSuitedComposite(e).setExpanded(false);
      }
      comp.layout();
      form.reflow(true);
    }
    @Override public void treeExpanded(    TreeEvent e){
      ExpandableComposite theSuitedComposite=getTheSuitedComposite(e);
      ScrolledForm form=masterPage.getForm();
      Composite comp=masterPage.getChartComposite();
      if (theSuitedComposite != null && !theSuitedComposite.isExpanded()) {
        theSuitedComposite.setExpanded(true);
      }
 else {
        propertyChangeSupport.firePropertyChange(PluginConstant.EXPAND_TREE,null,e.item);
      }
      comp.layout();
      form.reflow(true);
    }
  }
);
  tree.addMouseListener(new MouseAdapter(){
    @Override public void mouseDoubleClick(    MouseEvent e){
      TreeItem[] treeSelection=tree.getSelection();
      if (treeSelection.length > 0) {
        TreeItem item=treeSelection[0];
        Object indicatorobj=item.getData(INDICATOR_UNIT_KEY);
        Object meobj=item.getData(MODELELEMENT_INDICATOR_KEY);
        if (meobj != null && indicatorobj == null) {
          ModelElementIndicator[] modelElementIndicator=openIndicatorSelectDialog(null);
          if (modelElementIndicator.length > 0) {
            setElements(modelElementIndicator);
          }
        }
 else         if (meobj != null && indicatorobj != null) {
          openIndicatorOptionDialog(null,item);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void addTreeListener(final Tree tree){
  tree.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TreeItem item=(TreeItem)e.item;
      if (item == null || DATA_PARAM.equals(item.getData(DATA_PARAM))) {
        Menu m=tree.getMenu();
        if (m != null && !m.isDisposed()) {
          m.dispose();
        }
        tree.setMenu(null);
      }
 else {
        new AnalysisColumnColumnMenuProvider(tree).createTreeMenu(Boolean.FALSE);
      }
    }
  }
);
  tree.addTreeListener(new TreeAdapter(){
    @Override public void treeCollapsed(    TreeEvent e){
      ExpandableComposite theSuitedComposite=getTheSuitedComposite(e);
      ScrolledForm form=masterPage.getForm();
      Composite comp=masterPage.getChartComposite();
      if (theSuitedComposite != null && theSuitedComposite.isExpanded()) {
        getTheSuitedComposite(e).setExpanded(false);
      }
      if (comp != null) {
        comp.layout();
      }
      form.reflow(true);
    }
    @Override public void treeExpanded(    TreeEvent e){
      ExpandableComposite theSuitedComposite=getTheSuitedComposite(e);
      ScrolledForm form=masterPage.getForm();
      Composite comp=masterPage.getChartComposite();
      if (theSuitedComposite != null && !theSuitedComposite.isExpanded()) {
        theSuitedComposite.setExpanded(true);
      }
 else {
        propertyChangeSupport.firePropertyChange(PluginConstant.EXPAND_TREE,null,e.item);
      }
      if (comp != null) {
        comp.layout();
      }
      form.reflow(true);
    }
  }
);
  tree.addMouseListener(new MouseAdapter(){
    @Override public void mouseDoubleClick(    MouseEvent e){
      TreeItem[] treeSelection=tree.getSelection();
      if (treeSelection.length > 0) {
        TreeItem item=treeSelection[0];
        Object indicatorobj=item.getData(INDICATOR_UNIT_KEY);
        Object meobj=item.getData(MODELELEMENT_INDICATOR_KEY);
        if (meobj != null && indicatorobj == null) {
          ModelElementIndicator[] modelElementIndicator=openIndicatorSelectDialog(null);
          if (modelElementIndicator.length > 0) {
            setElements(modelElementIndicator);
          }
        }
 else         if (meobj != null && indicatorobj != null) {
          openIndicatorOptionDialog(null,item);
        }
      }
    }
  }
);
}