Program: 168211
Project: 168211
Buggy source:
private void createInputSection(final Composite parent,FormToolkit toolkit,GridLayout layout,String title,String description){
  Section section=toolkit.createSection(parent,Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION);
  GridDataFactory.fillDefaults().grab(true,false).span(1,1).applyTo(section);
  GridLayoutFactory.fillDefaults().numColumns(3).applyTo(section);
  section.setText(title);
  section.setDescription(description);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  section.setLayoutData(gd);
  Composite client=toolkit.createComposite(section,SWT.NONE);
  client.setLayout(layout);
  NlputilsFormComposite.createEmptyRow(toolkit,client);
  trainingClassPathTree=new Tree(client,SWT.NONE);
  GridData gd_tree=new GridData(SWT.FILL,SWT.FILL,true,false,1,0);
  gd_tree.heightHint=100;
  trainingClassPathTree.setLayoutData(gd_tree);
  TreeItem trainingItem=new TreeItem(trainingClassPathTree,SWT.NULL);
  trainingItem.setText("String_Node_Str");
  trainingItem.setData("String_Node_Str");
  trainingClassPathTree.addListener(SWT.Expand,new Listener(){
    @Override public void handleEvent(    Event event){
      TreeItem root=(TreeItem)event.item;
      File file=new File(root.getData().toString());
      File[] files=file.listFiles();
      if (files == null) {
        return;
      }
 else {
        root.getItems()[0].dispose();
      }
      for (int i=0; i < files.length; i++) {
        TreeItem item=new TreeItem(root,SWT.NULL);
        item.setText(files[i].getName());
        item.setData(files[i]);
        if (files[i].isDirectory()) {
          new TreeItem(item,SWT.NULL);
        }
      }
    }
  }
);
  testingClassPathTree=new Tree(client,SWT.NONE);
  testingClassPathTree.setLayoutData(gd_tree);
  TreeItem testingItem=new TreeItem(testingClassPathTree,SWT.NULL);
  testingItem.setText("String_Node_Str");
  testingItem.setData("String_Node_Str");
  testingClassPathTree.addListener(SWT.Expand,new Listener(){
    @Override public void handleEvent(    Event event){
      TreeItem root=(TreeItem)event.item;
      File file=new File(root.getData().toString());
      File[] files=file.listFiles();
      if (files == null) {
        return;
      }
 else {
        root.getItems()[0].dispose();
      }
      for (int i=0; i < files.length; i++) {
        TreeItem item=new TreeItem(root,SWT.NULL);
        item.setText(files[i].getName());
        item.setData(files[i]);
        if (files[i].isDirectory()) {
          new TreeItem(item,SWT.NULL);
        }
      }
    }
  }
);
  Composite buttonComposite=new Composite(client,SWT.NONE);
  GridLayout buttonLayout=new GridLayout();
  buttonLayout.marginWidth=buttonLayout.marginHeight=0;
  buttonLayout.makeColumnsEqualWidth=true;
  buttonComposite.setLayout(buttonLayout);
  buttonComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
  Button button=new Button(buttonComposite,SWT.PUSH);
  button.setText("String_Node_Str");
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(button);
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Shell shell=parent.getShell();
      ClassifierDialog cDialog=new ClassifierDialog(shell);
      cDialog.create();
      if (cDialog.open() == Window.OK) {
        File file=null;
        classPathCount++;
        TreeItem trainingSubItem=new TreeItem(trainingItem,SWT.NULL);
        trainingSubItem.setText("String_Node_Str" + classPathCount + "String_Node_Str"+ cDialog.getTrainDataPath());
        trainingSubItem.setData(cDialog.getTrainDataPath());
        file=new File(cDialog.getTrainDataPath());
        if (file.isDirectory()) {
          new TreeItem(trainingSubItem,SWT.NULL);
        }
        TreeItem testingSubItem=new TreeItem(testingItem,SWT.NONE);
        testingSubItem.setText("String_Node_Str" + classPathCount + "String_Node_Str"+ cDialog.getTestDataPath());
        testingSubItem.setData(cDialog.getTestDataPath());
        file=new File(cDialog.getTestDataPath());
        if (file.isDirectory()) {
          new TreeItem(testingSubItem,SWT.NULL);
        }
        trainingClassPathTree.getItems()[0].setExpanded(true);
        testingClassPathTree.getItems()[0].setExpanded(true);
      }
    }
  }
);
  Button remove=new Button(buttonComposite,SWT.PUSH);
  remove.setText("String_Node_Str");
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(remove);
  section.setClient(client);
}

Fixed version (ground truth):
private void createInputSection(final Composite parent,FormToolkit toolkit,GridLayout layout,String title,String description){
  Section section=toolkit.createSection(parent,Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION);
  GridDataFactory.fillDefaults().grab(true,false).span(1,1).applyTo(section);
  GridLayoutFactory.fillDefaults().numColumns(3).applyTo(section);
  section.setText(title);
  section.setDescription(description);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  section.setLayoutData(gd);
  Composite client=toolkit.createComposite(section,SWT.NONE);
  client.setLayout(layout);
  NlputilsFormComposite.createEmptyRow(toolkit,client);
  trainingClassPathTree=new Tree(client,SWT.NONE);
  GridData gd_tree=new GridData(SWT.FILL,SWT.FILL,true,false,1,0);
  gd_tree.heightHint=100;
  trainingClassPathTree.setLayoutData(gd_tree);
  TreeItem trainingItem=new TreeItem(trainingClassPathTree,SWT.NULL);
  trainingItem.setText("String_Node_Str");
  trainingItem.setData("String_Node_Str");
  trainingClassPathTree.addListener(SWT.Expand,new Listener(){
    @Override public void handleEvent(    Event event){
      TreeItem root=(TreeItem)event.item;
      File file=new File(root.getData().toString());
      File[] files=file.listFiles();
      if (files == null) {
        return;
      }
 else {
        root.getItems()[0].dispose();
      }
      for (int i=0; i < files.length; i++) {
        TreeItem item=new TreeItem(root,SWT.NULL);
        item.setText(files[i].getName());
        item.setData(files[i]);
        if (files[i].isDirectory()) {
          new TreeItem(item,SWT.NULL);
        }
      }
    }
  }
);
  testingClassPathTree=new Tree(client,SWT.NONE);
  testingClassPathTree.setLayoutData(gd_tree);
  TreeItem testingItem=new TreeItem(testingClassPathTree,SWT.NULL);
  testingItem.setText("String_Node_Str");
  testingItem.setData("String_Node_Str");
  testingClassPathTree.addListener(SWT.Expand,new Listener(){
    @Override public void handleEvent(    Event event){
      TreeItem root=(TreeItem)event.item;
      File file=new File(root.getData().toString());
      File[] files=file.listFiles();
      if (files == null) {
        return;
      }
 else {
        root.getItems()[0].dispose();
      }
      for (int i=0; i < files.length; i++) {
        TreeItem item=new TreeItem(root,SWT.NULL);
        item.setText(files[i].getName());
        item.setData(files[i]);
        if (files[i].isDirectory()) {
          new TreeItem(item,SWT.NULL);
        }
      }
    }
  }
);
  Composite buttonComposite=new Composite(client,SWT.NONE);
  GridLayout buttonLayout=new GridLayout();
  buttonLayout.marginWidth=buttonLayout.marginHeight=0;
  buttonLayout.makeColumnsEqualWidth=true;
  buttonComposite.setLayout(buttonLayout);
  buttonComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
  Button addClassButton=new Button(buttonComposite,SWT.PUSH);
  addClassButton.setText("String_Node_Str");
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(addClassButton);
  addClassButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Shell shell=parent.getShell();
      ClassifierDialog cDialog=new ClassifierDialog(shell);
      cDialog.create();
      if (cDialog.open() == Window.OK) {
        File file=null;
        classPathCount++;
        TreeItem trainingSubItem=new TreeItem(trainingItem,SWT.NULL);
        trainingSubItem.setText("String_Node_Str" + classPathCount + "String_Node_Str"+ cDialog.getTrainDataPath());
        trainingSubItem.setData(cDialog.getTrainDataPath());
        file=new File(cDialog.getTrainDataPath());
        if (file.isDirectory()) {
          new TreeItem(trainingSubItem,SWT.NULL);
        }
        TreeItem testingSubItem=new TreeItem(testingItem,SWT.NONE);
        testingSubItem.setText("String_Node_Str" + classPathCount + "String_Node_Str"+ cDialog.getTestDataPath());
        testingSubItem.setData(cDialog.getTestDataPath());
        file=new File(cDialog.getTestDataPath());
        if (file.isDirectory()) {
          new TreeItem(testingSubItem,SWT.NULL);
        }
        trainingClassPathTree.getItems()[0].setExpanded(true);
        testingClassPathTree.getItems()[0].setExpanded(true);
      }
    }
  }
);
  Button removeClassButton=new Button(buttonComposite,SWT.PUSH);
  removeClassButton.setText("String_Node_Str");
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(removeClassButton);
  section.setClient(client);
}