Program: 139264
Project: 139264
Buggy source:
/** 
 * DOC xqliu Comment method "addColumnUdi".
 * @param treeItem
 * @param meIndicator
 * @param columnIndex
 */
private void addColumnUdi(final TreeItem treeItem,final ModelElementIndicator meIndicator,int columnIndex){
  TreeEditor addUdiEditor=new TreeEditor(tree);
  Label addUdiLabl=new Label(tree,SWT.NONE);
  addUdiLabl.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
  addUdiLabl.setImage(ImageLib.getImage(ImageLib.IND_DEFINITION));
  addUdiLabl.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  addUdiLabl.pack();
  addUdiLabl.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      DataManager dm=getAnalysis().getContext().getConnection();
      if (dm == null) {
        masterPage.doSave(null);
      }
      if (dm != null && dm instanceof TdDataProvider) {
        TdDataProvider dp=(TdDataProvider)dm;
        if (ConnectionUtils.isMdmConnection(DataProviderHelper.getTdProviderConnection(dp).getObject())) {
          MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
          return;
        }
      }
      IFolder udiProject=ResourceManager.getUDIFolder();
      CheckedTreeSelectionDialog dialog=UDIUtils.createUdiCheckedTreeSelectionDialog(udiProject);
      if (dialog.open() == Window.OK) {
        for (        Object obj : dialog.getResult()) {
          if (obj instanceof IFile) {
            IFile file=(IFile)obj;
            IndicatorUnit[] addIndicatorUnits=null;
            try {
              addIndicatorUnits=UDIUtils.createIndicatorUnit(file,meIndicator,getAnalysis());
            }
 catch (            Throwable e1) {
              log.warn(e1,e1);
            }
            if (addIndicatorUnits != null && addIndicatorUnits.length > 0) {
              for (              IndicatorUnit unit : addIndicatorUnits) {
                createOneUnit(treeItem,unit);
              }
              setDirty(true);
            }
          }
        }
      }
    }
  }
);
  addUdiEditor.minimumWidth=addUdiLabl.getImage().getBounds().width;
  addUdiEditor.setEditor(addUdiLabl,treeItem,columnIndex);
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "addColumnUdi". ADD xqliu 2010-02-23 feature 11617
 * @param treeItem
 * @param meIndicator
 * @param columnIndex
 * @return
 */
private TreeEditor addColumnUdi(final TreeItem treeItem,final ModelElementIndicator meIndicator,int columnIndex){
  TreeEditor addUdiEditor=new TreeEditor(tree);
  Label addUdiLabl=new Label(tree,SWT.NONE);
  addUdiLabl.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
  addUdiLabl.setImage(ImageLib.getImage(ImageLib.IND_DEFINITION));
  addUdiLabl.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  addUdiLabl.pack();
  addUdiLabl.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      DataManager dm=getAnalysis().getContext().getConnection();
      if (dm == null) {
        masterPage.doSave(null);
      }
      if (dm != null && dm instanceof TdDataProvider) {
        TdDataProvider dp=(TdDataProvider)dm;
        if (ConnectionUtils.isMdmConnection(DataProviderHelper.getTdProviderConnection(dp).getObject())) {
          MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
          return;
        }
      }
      IFolder udiProject=ResourceManager.getUDIFolder();
      CheckedTreeSelectionDialog dialog=UDIUtils.createUdiCheckedTreeSelectionDialog(udiProject);
      if (dialog.open() == Window.OK) {
        for (        Object obj : dialog.getResult()) {
          if (obj instanceof IFile) {
            IFile file=(IFile)obj;
            IndicatorUnit[] addIndicatorUnits=null;
            try {
              addIndicatorUnits=UDIUtils.createIndicatorUnit(file,meIndicator,getAnalysis());
            }
 catch (            Throwable e1) {
              log.warn(e1,e1);
            }
            if (addIndicatorUnits != null && addIndicatorUnits.length > 0) {
              for (              IndicatorUnit unit : addIndicatorUnits) {
                createOneUnit(treeItem,unit);
              }
              setDirty(true);
            }
          }
        }
      }
    }
  }
);
  addUdiEditor.minimumWidth=addUdiLabl.getImage().getBounds().width;
  addUdiEditor.setEditor(addUdiLabl,treeItem,columnIndex);
  return addUdiEditor;
}