Program: 149084
Project: 149084
Buggy source:
private void createSchemaTreeComp(Composite parent){
  Composite schemaSash=new Composite(parent,SWT.NONE);
  schemaSash.setLayout(new GridLayout());
  schemaSash.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  schemaSash.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  Label title=new Label(schemaSash,SWT.VERTICAL);
  title.setText("String_Node_Str");
  title.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  title.setFont(FontUtils.getBoldFont(title.getFont()));
  Color blue=new Color(schemaSash.getDisplay(),0,0,255);
  title.setForeground(blue);
  title.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  Label des=new Label(schemaSash,SWT.VERTICAL);
  des.setText("String_Node_Str");
  des.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  viewer=new TreeViewer(schemaSash,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  viewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  drillDownAdapter=new DrillDownAdapter(viewer);
  provider=new XSDTreeContentProvider(this.getSite(),xsdSchema);
  viewer.setContentProvider(provider);
  viewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
      sel=(StructuredSelection)e.getSelection();
    }
  }
);
  viewer.getTree().addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      isSchemaSelected=true;
    }
  }
);
  viewer.setLabelProvider(new XSDTreeLabelProvider());
  viewer.setSorter(new ViewerSorter(){
    public int category(    Object element){
      if (element instanceof XSDFacet)       return 100;
      if (element instanceof XSDIdentityConstraintDefinition) {
        XSDIdentityConstraintDefinition icd=(XSDIdentityConstraintDefinition)element;
        if (icd.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.UNIQUE_LITERAL))         return 300;
 else         if (icd.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.KEY_LITERAL))         return 301;
 else         return 302;
      }
      return 200;
    }
    public int compare(    Viewer theViewer,    Object e1,    Object e2){
      int cat1=category(e1);
      int cat2=category(e2);
      return cat1 - cat2;
    }
  }
);
  viewer.setInput(this.getSite());
  viewer.getTree().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
      if ((e.stateMask == 0) && (e.keyCode == SWT.DEL)) {
        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 createSchemaTreeComp(Composite parent){
  Composite schemaSash=new Composite(parent,SWT.NONE);
  schemaSash.setLayout(new GridLayout());
  schemaSash.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  schemaSash.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  Label title=new Label(schemaSash,SWT.VERTICAL);
  title.setText("String_Node_Str" + modelName);
  title.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  title.setFont(FontUtils.getBoldFont(title.getFont()));
  Color blue=new Color(schemaSash.getDisplay(),0,0,255);
  title.setForeground(blue);
  title.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  Label des=new Label(schemaSash,SWT.VERTICAL);
  des.setText("String_Node_Str" + modelName + "String_Node_Str");
  des.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  viewer=new TreeViewer(schemaSash,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  viewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  drillDownAdapter=new DrillDownAdapter(viewer);
  provider=new XSDTreeContentProvider(this.getSite(),xsdSchema);
  viewer.setContentProvider(provider);
  viewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
      sel=(StructuredSelection)e.getSelection();
    }
  }
);
  viewer.getTree().addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      isSchemaSelected=true;
    }
  }
);
  viewer.setLabelProvider(new XSDTreeLabelProvider());
  viewer.setSorter(new ViewerSorter(){
    public int category(    Object element){
      if (element instanceof XSDFacet)       return 100;
      if (element instanceof XSDIdentityConstraintDefinition) {
        XSDIdentityConstraintDefinition icd=(XSDIdentityConstraintDefinition)element;
        if (icd.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.UNIQUE_LITERAL))         return 300;
 else         if (icd.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.KEY_LITERAL))         return 301;
 else         return 302;
      }
      return 200;
    }
    public int compare(    Viewer theViewer,    Object e1,    Object e2){
      int cat1=category(e1);
      int cat2=category(e2);
      return cat1 - cat2;
    }
  }
);
  viewer.setInput(this.getSite());
  viewer.getTree().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
      if ((e.stateMask == 0) && (e.keyCode == SWT.DEL)) {
        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){
    }
  }
);
}