Program: 148524
Project: 148524
Buggy source:
private void createTypeTreeComp(Composite parent){
  Composite TypeSash=new Composite(parent,SWT.NONE);
  TypeSash.setLayout(new GridLayout());
  TypeSash.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  TypeSash.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  Label title=new Label(TypeSash,SWT.VERTICAL);
  title.setText("String_Node_Str");
  title.setFont(FontUtils.getBoldFont(title.getFont()));
  Color blue=new Color(TypeSash.getDisplay(),0,0,255);
  title.setForeground(blue);
  title.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  Label des=new Label(TypeSash,SWT.VERTICAL);
  des.setText("String_Node_Str" + modelName);
  des.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  typesViewer=new TreeViewer(TypeSash,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  typesViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  typesDrillDownAdapter=new DrillDownAdapter(viewer);
  typesProvider=new TypesContentProvider(this.getSite(),xsdSchema,getXObject());
  typesViewer.setContentProvider(typesProvider);
  typesViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
    }
  }
);
  typesViewer.getTree().addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      isSchemaSelected=false;
    }
  }
);
  typesViewer.setLabelProvider(new TypesLabelProvider());
  typesViewer.setSorter(new ViewerSorter(){
    public int category(    Object element){
      if (element instanceof XSDFacet)       return 100;
      if (element instanceof XSDSimpleTypeDefinition) {
        return 102;
      }
 else       if (element instanceof XSDComplexTypeDefinition) {
        return 101;
      }
      return 200;
    }
    public int compare(    Viewer theViewer,    Object e1,    Object e2){
      int cat1=category(e1);
      int cat2=category(e2);
      return cat1 - cat2;
    }
  }
);
  typesViewer.setInput(this.getSite());
  typesViewer.getTree().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      IStructuredSelection selection=((IStructuredSelection)typesViewer.getSelection());
      if ((e.stateMask == 0) && (e.keyCode == SWT.DEL)) {
        deleteConceptWrapAction.regisExtraClassToDel(XSDComplexTypeDefinitionImpl.class);
        if (deleteConceptWrapAction.checkInDeletableType(selection.toArray())) {
          deleteConceptWrapAction.prepareToDelSelectedItems(selection,viewer);
          deleteConceptWrapAction.run();
        }
 else {
          deleteConceptWrapAction.clearExtraClassToDel();
          deleteConceptWrapAction.regisExtraClassToDel(XSDSimpleTypeDefinitionImpl.class);
          if (deleteConceptWrapAction.checkInDeletableType(selection.toArray())) {
            deleteConceptWrapAction.prepareToDelSelectedItems(selection,viewer);
            deleteConceptWrapAction.run();
          }
 else {
            MessageDialog.openWarning(getSite().getShell(),"String_Node_Str","String_Node_Str");
          }
        }
      }
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
}

Fixed version (ground truth):
private void createTypeTreeComp(Composite parent){
  Composite TypeSash=new Composite(parent,SWT.NONE);
  TypeSash.setLayout(new GridLayout());
  TypeSash.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  TypeSash.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  Label title=new Label(TypeSash,SWT.VERTICAL);
  title.setText("String_Node_Str");
  title.setFont(FontUtils.getBoldFont(title.getFont()));
  Color blue=new Color(TypeSash.getDisplay(),0,0,255);
  title.setForeground(blue);
  title.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  Label des=new Label(TypeSash,SWT.VERTICAL);
  des.setText("String_Node_Str" + modelName);
  des.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  typesViewer=new TreeViewer(TypeSash,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  typesViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  typesDrillDownAdapter=new DrillDownAdapter(viewer);
  typesProvider=new TypesContentProvider(this.getSite(),xsdSchema,getXObject());
  typesViewer.setContentProvider(typesProvider);
  typesViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
    }
  }
);
  typesViewer.getTree().addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      isSchemaSelected=false;
    }
  }
);
  typesViewer.setLabelProvider(new TypesLabelProvider());
  typesViewer.setSorter(new ViewerSorter(){
    public int category(    Object element){
      if (element instanceof XSDFacet)       return 100;
      if (element instanceof XSDSimpleTypeDefinition) {
        return 102;
      }
 else       if (element instanceof XSDComplexTypeDefinition) {
        return 101;
      }
      return 200;
    }
    public int compare(    Viewer theViewer,    Object e1,    Object e2){
      int cat1=category(e1);
      int cat2=category(e2);
      return cat1 - cat2;
    }
  }
);
  typesViewer.setInput(this.getSite());
  typesViewer.getTree().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      IStructuredSelection selection=((IStructuredSelection)typesViewer.getSelection());
      if ((e.stateMask == 0) && (e.keyCode == SWT.DEL)) {
        deleteConceptWrapAction.regisExtraClassToDel(XSDComplexTypeDefinitionImpl.class);
        if (deleteConceptWrapAction.checkInDeletableType(selection.toArray())) {
          deleteConceptWrapAction.prepareToDelSelectedItems(selection,viewer);
          deleteConceptWrapAction.run();
        }
 else {
          deleteConceptWrapAction.clearExtraClassToDel();
          deleteConceptWrapAction.regisExtraClassToDel(XSDSimpleTypeDefinitionImpl.class);
          if (deleteConceptWrapAction.checkInDeletableType(selection.toArray())) {
            deleteConceptWrapAction.prepareToDelSelectedItems(selection,viewer);
            deleteConceptWrapAction.run();
          }
 else {
            MessageDialog.openWarning(getSite().getShell(),"String_Node_Str","String_Node_Str");
          }
        }
      }
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
}