Program: 140808
Project: 140808
Buggy source:
private void createIndicatorItems(final TreeItem treeItem,IndicatorUnit[] indicatorTypeMappings){
  for (  IndicatorUnit indicatorMapping : indicatorTypeMappings) {
    final TreeItem indicatorItem=new TreeItem(treeItem,SWT.NONE);
    final IndicatorUnit typeMapping=indicatorMapping;
    final IndicatorEnum indicatorEnum=indicatorMapping.getType();
    indicatorItem.setData(COLUMN_INDICATOR_VALUE,treeItem.getData(COLUMN_INDICATOR_VALUE));
    indicatorItem.setData(INDICATOR_UNIT_VALUE,typeMapping);
    indicatorItem.setText(0,indicatorMapping.getType().getLabel());
    TreeEditor editor;
    if (indicatorEnum.hasChildren()) {
      editor=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("String_Node_Str");
      optionLabel.pack();
      optionLabel.setData(indicatorMapping);
      optionLabel.addMouseListener(new MouseAdapter(){
        @Override public void mouseDown(        MouseEvent e){
          final IndicatorUnit indicator=(IndicatorUnit)((Label)e.getSource()).getData();
          final IndicatorOptionsWizard wizard=new IndicatorOptionsWizard(indicator,analysis){
            @Override public void dispose(){
              activeCount=0;
              super.dispose();
            }
          }
;
          try {
            WizardDialog dialog=new WizardDialog(null,wizard){
              @Override public void openTray(              DialogTray tray) throws IllegalStateException, UnsupportedOperationException {
                super.openTray(tray);
                if (tray instanceof HelpTray) {
                  HelpTray helpTray=(HelpTray)tray;
                  ReusableHelpPart helpPart=helpTray.getHelpPart();
                  helpPart.getForm().getForm().notifyListeners(SWT.Activate,new Event());
                }
              }
            }
;
            dialog.setPageSize(300,400);
            dialog.create();
            dialog.getShell().addShellListener(new ShellAdapter(){
              @Override public void shellActivated(              ShellEvent e){
                String string=HelpPlugin.PLUGIN_ID + HelpPlugin.INDICATOR_OPTION_HELP_ID;
                if (activeCount < 2) {
                  Point point=e.widget.getDisplay().getCursorLocation();
                  IContext context=HelpSystem.getContext(string);
                  IHelpResource[] relatedTopics=context.getRelatedTopics();
                  for (                  IHelpResource topic : relatedTopics) {
                    topic.getLabel();
                    topic.getHref();
                  }
                  IWorkbenchHelpSystem helpSystem=PlatformUI.getWorkbench().getHelpSystem();
                  helpSystem.displayContext(context,point.x + 15,point.y);
                  activeCount++;
                  ReusableHelpPart lastActiveInstance=ReusableHelpPart.getLastActiveInstance();
                  if (lastActiveInstance != null) {
                    String href=IndicatorParameterTypes.getHref(indicator);
                    if (href != null) {
                      lastActiveInstance.showURL(href);
                    }
                  }
                }
              }
            }
);
            int open=dialog.open();
            if (Window.OK == open) {
              setDirty(wizard.isDirty());
            }
          }
 catch (          AssertionFailedException ex) {
            MessageDialogWithToggle.openInformation(null,"String_Node_Str","String_Node_Str");
          }
        }
      }
);
      editor.minimumWidth=WIDTH1_CELL;
      editor.horizontalAlignment=SWT.CENTER;
      editor.setEditor(optionLabel,indicatorItem,1);
    }
    editor=new TreeEditor(tree);
    Label delLabel=new Label(tree,SWT.NONE);
    delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
    delLabel.setImage(ImageLib.getImage(ImageLib.ACTION_DELETE));
    delLabel.setToolTipText("String_Node_Str");
    delLabel.pack();
    delLabel.addMouseListener(new MouseAdapter(){
      @Override public void mouseDown(      MouseEvent e){
        ColumnIndicator columnIndicator=(ColumnIndicator)treeItem.getData(COLUMN_INDICATOR_VALUE);
        deleteIndicatorItems(columnIndicator,typeMapping);
        setElements(columnIndicators);
      }
    }
);
    editor.minimumWidth=WIDTH1_CELL;
    editor.horizontalAlignment=SWT.CENTER;
    editor.setEditor(delLabel,indicatorItem,2);
    if (indicatorEnum.hasChildren()) {
      indicatorItem.setData(treeItem.getData(COLUMN_INDICATOR_VALUE));
      createIndicatorItems(indicatorItem,indicatorMapping.getChildren());
    }
  }
}

Fixed version (ground truth):
private void createIndicatorItems(final TreeItem treeItem,IndicatorUnit[] indicatorTypeMappings){
  for (  IndicatorUnit indicatorMapping : indicatorTypeMappings) {
    final TreeItem indicatorItem=new TreeItem(treeItem,SWT.NONE);
    final IndicatorUnit typeMapping=indicatorMapping;
    final IndicatorEnum indicatorEnum=indicatorMapping.getType();
    indicatorItem.setData(COLUMN_INDICATOR_VALUE,treeItem.getData(COLUMN_INDICATOR_VALUE));
    indicatorItem.setData(INDICATOR_UNIT_VALUE,typeMapping);
    indicatorItem.setText(0,indicatorMapping.getType().getLabel());
    TreeEditor editor;
    editor=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("String_Node_Str");
    optionLabel.pack();
    optionLabel.setData(indicatorMapping);
    optionLabel.addMouseListener(new MouseAdapter(){
      @Override public void mouseDown(      MouseEvent e){
        final IndicatorUnit indicator=(IndicatorUnit)((Label)e.getSource()).getData();
        final IndicatorOptionsWizard wizard=new IndicatorOptionsWizard(indicator,analysis){
          @Override public void dispose(){
            activeCount=0;
            super.dispose();
          }
        }
;
        try {
          WizardDialog dialog=new WizardDialog(null,wizard){
            @Override public void openTray(            DialogTray tray) throws IllegalStateException, UnsupportedOperationException {
              super.openTray(tray);
              if (tray instanceof HelpTray) {
                HelpTray helpTray=(HelpTray)tray;
                ReusableHelpPart helpPart=helpTray.getHelpPart();
                helpPart.getForm().getForm().notifyListeners(SWT.Activate,new Event());
              }
            }
          }
;
          dialog.setPageSize(300,400);
          dialog.create();
          dialog.getShell().addShellListener(new ShellAdapter(){
            @Override public void shellActivated(            ShellEvent e){
              String string=HelpPlugin.PLUGIN_ID + HelpPlugin.INDICATOR_OPTION_HELP_ID;
              if (activeCount < 2) {
                Point point=e.widget.getDisplay().getCursorLocation();
                IContext context=HelpSystem.getContext(string);
                IHelpResource[] relatedTopics=context.getRelatedTopics();
                for (                IHelpResource topic : relatedTopics) {
                  topic.getLabel();
                  topic.getHref();
                }
                IWorkbenchHelpSystem helpSystem=PlatformUI.getWorkbench().getHelpSystem();
                helpSystem.displayContext(context,point.x + 15,point.y);
                activeCount++;
                ReusableHelpPart lastActiveInstance=ReusableHelpPart.getLastActiveInstance();
                if (lastActiveInstance != null) {
                  String href=IndicatorParameterTypes.getHref(indicator);
                  if (href != null) {
                    lastActiveInstance.showURL(href);
                  }
                }
              }
            }
          }
);
          int open=dialog.open();
          if (Window.OK == open) {
            setDirty(wizard.isDirty());
          }
        }
 catch (        AssertionFailedException ex) {
          MessageDialogWithToggle.openInformation(null,"String_Node_Str","String_Node_Str");
        }
      }
    }
);
    editor.minimumWidth=WIDTH1_CELL;
    editor.horizontalAlignment=SWT.CENTER;
    editor.setEditor(optionLabel,indicatorItem,1);
    editor=new TreeEditor(tree);
    Label delLabel=new Label(tree,SWT.NONE);
    delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
    delLabel.setImage(ImageLib.getImage(ImageLib.ACTION_DELETE));
    delLabel.setToolTipText("String_Node_Str");
    delLabel.pack();
    delLabel.addMouseListener(new MouseAdapter(){
      @Override public void mouseDown(      MouseEvent e){
        ColumnIndicator columnIndicator=(ColumnIndicator)treeItem.getData(COLUMN_INDICATOR_VALUE);
        deleteIndicatorItems(columnIndicator,typeMapping);
        setElements(columnIndicators);
      }
    }
);
    editor.minimumWidth=WIDTH1_CELL;
    editor.horizontalAlignment=SWT.CENTER;
    editor.setEditor(delLabel,indicatorItem,2);
    if (indicatorEnum.hasChildren()) {
      indicatorItem.setData(treeItem.getData(COLUMN_INDICATOR_VALUE));
      createIndicatorItems(indicatorItem,indicatorMapping.getChildren());
    }
  }
}