Program: 124893
Project: 124893
Buggy source:
@Override protected void addFieldsListeners(){
  nameFilter.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      schemaTreeViewer.refresh();
    }
  }
);
  schemaTree.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      if (e.detail == SWT.CHECK) {
        final TreeItem treeItem=(TreeItem)e.item;
        IHDFSNode node=(IHDFSNode)treeItem.getData();
        final boolean promptNeeded=treeItem.getChecked();
        EHadoopFileTypes type=node.getType();
        if (type != EHadoopFileTypes.FILE) {
          treeItem.setGrayed(promptNeeded);
        }
        if (type == EHadoopFileTypes.FILE) {
          if (promptNeeded) {
            treeItem.setText(3,EMPTY_STRING);
            treeItem.setText(4,Messages.getString("String_Node_Str"));
            parentWizardPage.setPageComplete(false);
            refreshTable(treeItem,-1);
          }
 else {
            clearTreeItem(treeItem);
          }
        }
 else         if (type == EHadoopFileTypes.FOLDER) {
          long checkedSize=fetchAllChildren(new TreeItem[]{treeItem});
          boolean continueCheck=true;
          if (promptNeeded && INFORM_SIZE < checkedSize) {
            continueCheck=MessageDialog.openConfirm(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",new Object[]{INFORM_SIZE}));
          }
          if (continueCheck) {
            updateItems(treeItem.getItems(),promptNeeded,true);
          }
 else {
            treeItem.setGrayed(!promptNeeded);
            treeItem.setChecked(!promptNeeded);
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addFieldsListeners(){
  nameFilter.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      schemaTreeViewer.refresh();
    }
  }
);
  schemaTree.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      if (e.detail == SWT.CHECK) {
        final TreeItem treeItem=(TreeItem)e.item;
        IHDFSNode node=(IHDFSNode)treeItem.getData();
        final boolean promptNeeded=treeItem.getChecked();
        EHadoopFileTypes type=node.getType();
        if (type != EHadoopFileTypes.FILE) {
          treeItem.setGrayed(promptNeeded);
        }
        if (type == EHadoopFileTypes.FILE) {
          if (promptNeeded) {
            treeItem.setText(3,EMPTY_STRING);
            treeItem.setText(4,Messages.getString("String_Node_Str"));
            parentWizardPage.setPageComplete(false);
            refreshTable(treeItem,-1);
          }
 else {
            clearTreeItem(treeItem);
          }
        }
 else         if (type == EHadoopFileTypes.FOLDER) {
          if (!promptNeeded) {
            threadExecutor.clearRunnable(node.getPath());
          }
          long checkedSize=fetchAllChildren(new TreeItem[]{treeItem});
          boolean continueCheck=true;
          if (promptNeeded && INFORM_SIZE < checkedSize) {
            continueCheck=MessageDialog.openConfirm(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",new Object[]{INFORM_SIZE}));
          }
          if (continueCheck) {
            updateItems(treeItem.getItems(),promptNeeded,true);
          }
 else {
            treeItem.setGrayed(!promptNeeded);
            treeItem.setChecked(!promptNeeded);
          }
        }
      }
    }
  }
);
}