Program: 136727
Project: 136727
Buggy source:
@Override public void addMouseListenerForChart(Object chartComposite,final Map<String,Object> menuMap,final boolean useRowFirst){
  final ChartComposite chartComp=(ChartComposite)chartComposite;
  chartComp.addChartMouseListener(new ChartMouseListener(){
    @Override public void chartMouseClicked(    ChartMouseEvent event){
      boolean flag=event.getTrigger().getButton() != MouseEvent.BUTTON3;
      chartComp.setDomainZoomable(flag);
      chartComp.setRangeZoomable(flag);
      if (flag) {
        return;
      }
      ChartEntity chartEntity=event.getEntity();
      if (chartEntity != null && chartEntity instanceof CategoryItemEntity) {
        CategoryItemEntity cateEntity=(CategoryItemEntity)chartEntity;
        Menu menu=getCurrentMenu(cateEntity);
        chartComp.setMenu(menu);
        menu.setVisible(true);
      }
    }
    private Menu getCurrentMenu(    CategoryItemEntity cateEntity){
      if (useRowFirst) {
        return findCurrentMenu(cateEntity.getRowKey(),cateEntity.getColumnKey());
      }
 else {
        return findCurrentMenu(cateEntity.getColumnKey(),cateEntity.getRowKey());
      }
    }
    /** 
 * DOC yyin Comment method "findCurrentMenu".
 * @param firstKey
 * @param secondKey
 * @return
 */
    private Menu findCurrentMenu(    final Object firstKey,    Object secondKey){
      Object menu=menuMap.get(firstKey);
      if (menu != null) {
        return (Menu)menu;
      }
      menu=menuMap.get(secondKey);
      if (menu != null) {
        return (Menu)menu;
      }
      return null;
    }
    @Override public void chartMouseMoved(    ChartMouseEvent event){
    }
  }
);
  chartComp.addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent e){
      chartComp.dispose();
    }
  }
);
}

Fixed version (ground truth):
@Override public void addMouseListenerForChart(Object chartComposite,final Map<String,Object> menuMap,final boolean useRowFirst){
  final ChartComposite chartComp=(ChartComposite)chartComposite;
  chartComp.addChartMouseListener(new ChartMouseListener(){
    @Override public void chartMouseClicked(    ChartMouseEvent event){
      boolean flag=event.getTrigger().getButton() != MouseEvent.BUTTON3;
      chartComp.setDomainZoomable(flag);
      chartComp.setRangeZoomable(flag);
      if (flag) {
        return;
      }
      ChartEntity chartEntity=event.getEntity();
      if (chartEntity != null && chartEntity instanceof CategoryItemEntity) {
        CategoryItemEntity cateEntity=(CategoryItemEntity)chartEntity;
        Menu menu=getCurrentMenu(cateEntity);
        if (menu != null) {
          chartComp.setMenu(menu);
          menu.setVisible(true);
        }
      }
    }
    private Menu getCurrentMenu(    CategoryItemEntity cateEntity){
      if (useRowFirst) {
        return findCurrentMenu(cateEntity.getRowKey(),cateEntity.getColumnKey());
      }
 else {
        return findCurrentMenu(cateEntity.getColumnKey(),cateEntity.getRowKey());
      }
    }
    /** 
 * DOC yyin Comment method "findCurrentMenu".
 * @param firstKey
 * @param secondKey
 * @return
 */
    private Menu findCurrentMenu(    final Object firstKey,    Object secondKey){
      Object menu=menuMap.get(firstKey);
      if (menu != null) {
        return (Menu)menu;
      }
      menu=menuMap.get(secondKey);
      if (menu != null) {
        return (Menu)menu;
      }
      return null;
    }
    @Override public void chartMouseMoved(    ChartMouseEvent event){
    }
  }
);
  chartComp.addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent e){
      chartComp.dispose();
    }
  }
);
}