Program: 133556
Project: 133556
Buggy source:
/** 
 * Creates a   {@link CSVPlotEditor} and all providers necessary topopulate it. The editor is created inside the specified parent {@code Composite}.
 * @param parent The  {@code Composite} in which to draw the CSV ploteditor.
 */
public DrawnPlot(final Composite parent) throws Exception {
  editor=new CSVPlotEditor();
  plotProvider=new PlotProvider();
  int lastSeparator=source.getPath().lastIndexOf("String_Node_Str");
  String plotTitle=(lastSeparator > -1 ? source.getPath().substring(lastSeparator + 1) : source.getPath());
  plotProvider.setPlotTitle(plotTitle);
  editor.createPartControl(parent);
  Composite canvas=editor.getPlotCanvas();
  Menu menu=parent.getMenu();
  if (menu == null) {
    MenuManager menuManager=new MenuManager();
    menu=menuManager.createContextMenu(canvas);
  }
  addSeriesTree=new ActionTree("String_Node_Str");
  removeSeriesTree=new ActionTree("String_Node_Str");
  final Separator separator=new Separator();
  final ActionTree clearAction=new ActionTree(new Action("String_Node_Str"){
    @Override public void run(){
      clear();
      refresh();
    }
  }
);
  for (  Entry<String,String[]> e : getPlotTypes().entrySet()) {
    final String category=e.getKey();
    String[] types=e.getValue();
    if (category != null && types != null) {
      ActionTree catTree=new ActionTree(category);
      addSeriesTree.add(catTree);
      for (      final String type : types) {
        if (type != null) {
          catTree.add(new ActionTree(new Action(type){
            @Override public void run(){
              addSeries(category,type);
              refresh();
            }
          }
));
        }
      }
    }
  }
  menu.addMenuListener(new MenuListener(){
    @Override public void menuHidden(    MenuEvent e){
    }
    @Override public void menuShown(    MenuEvent e){
      Menu menu=(Menu)e.widget;
      if (parent.getMenu() == null) {
        for (        MenuItem item : menu.getItems()) {
          item.dispose();
        }
      }
      addSeriesTree.getContributionItem().fill(menu,-1);
      removeSeriesTree.getContributionItem().fill(menu,-1);
      separator.fill(menu,-1);
      clearAction.getContributionItem().fill(menu,-1);
    }
  }
);
  editor.getPlotCanvas().setMenu(menu);
  return;
}

Fixed version (ground truth):
/** 
 * Creates a   {@link CSVPlotEditor} and all providers necessary topopulate it. The editor is created inside the specified parent {@code Composite}.
 * @param parent The  {@code Composite} in which to draw the CSV ploteditor.
 */
public DrawnPlot(final Composite parent) throws Exception {
  editor=new CSVPlotEditor();
  plotProvider=new PlotProvider();
  int lastSeparator=source.getPath().lastIndexOf("String_Node_Str");
  String plotTitle=(lastSeparator > -1 ? source.getPath().substring(lastSeparator + 1) : source.getPath());
  plotProvider.setPlotTitle(plotTitle);
  editor.createPartControl(parent);
  addSeriesTree=new ActionTree("String_Node_Str");
  removeSeriesTree=new ActionTree("String_Node_Str");
  final ActionTree clearAction=new ActionTree(new Action("String_Node_Str"){
    @Override public void run(){
      clear();
      refresh();
    }
  }
);
  for (  Entry<String,String[]> e : getPlotTypes().entrySet()) {
    final String category=e.getKey();
    String[] types=e.getValue();
    if (category != null && types != null) {
      ActionTree catTree=new ActionTree(category);
      addSeriesTree.add(catTree);
      for (      final String type : types) {
        if (type != null) {
          catTree.add(new ActionTree(new Action(type){
            @Override public void run(){
              addSeries(category,type);
              refresh();
            }
          }
));
        }
      }
    }
  }
  final MenuManager menuManager=new MenuManager();
  menuManager.add(addSeriesTree.getContributionItem());
  menuManager.add(removeSeriesTree.getContributionItem());
  menuManager.add(clearAction.getContributionItem());
  Menu contextMenu=parent.getMenu();
  if (contextMenu != null) {
    contextMenu.addMenuListener(new MenuListener(){
      @Override public void menuHidden(      MenuEvent e){
      }
      @Override public void menuShown(      MenuEvent e){
        Menu menu=(Menu)e.widget;
        for (        IContributionItem item : menuManager.getItems()) {
          item.fill(menu,-1);
        }
      }
    }
);
  }
 else {
    contextMenu=menuManager.createContextMenu(parent);
  }
  editor.getPlotCanvas().setMenu(contextMenu);
  return;
}