Program: 149171
Project: 149171
Buggy source:
public void createControl(Composite parent){
  Composite composite=new Composite(parent,SWT.BORDER);
  composite.setLayout(new GridLayout(1,false));
  browseViewer=new TableViewer(composite,SWT.FULL_SELECTION | SWT.SINGLE | SWT.H_SCROLL);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  gd.widthHint=600;
  browseViewer.getControl().setLayoutData(gd);
  ((GridData)browseViewer.getControl().getLayoutData()).heightHint=100;
  Table table=browseViewer.getTable();
  TableColumn column=new TableColumn(table,SWT.CENTER);
  column.setText(INSTANCE_NAME);
  column.setWidth(615);
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  CellEditor[] editors=new CellEditor[1];
  editors[0]=new TextCellEditor(table);
  browseViewer.setCellEditors(editors);
  browseViewer.setContentProvider(new IStructuredContentProvider(){
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
    public Object[] getElements(    Object inputElement){
      ArrayList<XSDElementDeclaration> values=(ArrayList<XSDElementDeclaration>)inputElement;
      return values.toArray(new XSDElementDeclaration[values.size()]);
    }
  }
);
  browseViewer.setLabelProvider(new ITableLabelProvider(){
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void dispose(){
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void removeListener(    ILabelProviderListener listener){
    }
    public String getColumnText(    Object element,    int columnIndex){
      return BROWSE_ITEMS + ((XSDElementDeclaration)element).getName();
    }
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
  }
);
  browseViewer.setCellModifier(new ICellModifier(){
    public boolean canModify(    Object element,    String property){
      return true;
    }
    public void modify(    Object element,    String property,    Object value){
      TableItem item=(TableItem)element;
      XSDElementDeclaration elem=(XSDElementDeclaration)item.getData();
      if (!(BROWSE_ITEMS + elem.getName()).equals(value.toString())) {
        for (        XSDElementDeclaration theElem : declList) {
          if (theElem == elem)           continue;
          if ((BROWSE_ITEMS + theElem.getName()).equals(value.toString())) {
            MessageDialog.openInformation(null,"String_Node_Str","String_Node_Str");
            return;
          }
        }
        List<Line> lines=browseItemToRoles.get(BROWSE_ITEMS + elem.getName());
        browseItemToRoles.remove(BROWSE_ITEMS + elem.getName());
        int prex=value.toString().indexOf(BROWSE_ITEMS);
        elem.setName(value.toString().substring(prex + BROWSE_ITEMS.length()));
        browseItemToRoles.put(value.toString(),lines);
        refreshRoleView(BROWSE_ITEMS + elem.getName());
        browseViewer.update(elem,null);
      }
    }
    public Object getValue(    Object element,    String property){
      XSDElementDeclaration elem=(XSDElementDeclaration)element;
      return BROWSE_ITEMS + elem.getName();
    }
  }
);
  browseViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      XSDElementDeclaration decl=(XSDElementDeclaration)((IStructuredSelection)event.getSelection()).getFirstElement();
      refreshRoleView(BROWSE_ITEMS + decl.getName());
      UpdateComplexViewButton(true);
    }
  }
);
  browseViewer.setInput(declList);
  browseViewer.setColumnProperties(new String[]{INSTANCE_NAME});
  browseViewer.refresh();
  Label infoLabel=new Label(composite,SWT.NONE);
  infoLabel.setText("String_Node_Str");
  ComplexTableViewerColumn ruleColumn=roleConfigurationColumns[0];
  ruleColumn.setColumnWidth(250);
  List<String> roles=Util.getCachedXObjectsNameSet(page.getXObject(),TreeObject.ROLE);
  ruleColumn.setComboValues(roles.toArray(new String[]{}));
  ComplexTableViewerColumn acsColumn=roleConfigurationColumns[1];
  acsColumn.setColumnWidth(250);
  acsColumn.setComboValues(new String[]{"String_Node_Str","String_Node_Str"});
  complexTableViewer=new ComplexTableViewer(Arrays.asList(roleConfigurationColumns),page.getManagedForm().getToolkit(),composite);
  complexTableViewer.setKeyColumns(new ComplexTableViewerColumn[]{roleConfigurationColumns[0]});
  complexTableViewer.create();
  complexTableViewer.getViewer().setInput(new ArrayList<Line>());
  UpdateComplexViewButton(false);
  setControl(composite);
}

Fixed version (ground truth):
public void createControl(Composite parent){
  Composite composite=new Composite(parent,SWT.BORDER);
  composite.setLayout(new GridLayout(1,false));
  browseViewer=new TableViewer(composite,SWT.FULL_SELECTION | SWT.SINGLE | SWT.H_SCROLL);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  gd.widthHint=600;
  browseViewer.getControl().setLayoutData(gd);
  ((GridData)browseViewer.getControl().getLayoutData()).heightHint=100;
  Table table=browseViewer.getTable();
  TableColumn column=new TableColumn(table,SWT.CENTER);
  column.setText(INSTANCE_NAME);
  column.setWidth(615);
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  CellEditor[] editors=new CellEditor[1];
  editors[0]=new TextCellEditor(table);
  browseViewer.setCellEditors(editors);
  browseViewer.setContentProvider(new IStructuredContentProvider(){
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
    public Object[] getElements(    Object inputElement){
      ArrayList<XSDElementDeclaration> values=(ArrayList<XSDElementDeclaration>)inputElement;
      return values.toArray(new XSDElementDeclaration[values.size()]);
    }
  }
);
  browseViewer.setLabelProvider(new ITableLabelProvider(){
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void dispose(){
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void removeListener(    ILabelProviderListener listener){
    }
    public String getColumnText(    Object element,    int columnIndex){
      return BROWSE_ITEMS + ((XSDElementDeclaration)element).getName();
    }
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
  }
);
  browseViewer.setCellModifier(new ICellModifier(){
    public boolean canModify(    Object element,    String property){
      return true;
    }
    public void modify(    Object element,    String property,    Object value){
      TableItem item=(TableItem)element;
      XSDElementDeclaration elem=(XSDElementDeclaration)item.getData();
      if (!(BROWSE_ITEMS + elem.getName()).equals(value.toString())) {
        for (        XSDElementDeclaration theElem : declList) {
          if (theElem == elem)           continue;
          if ((BROWSE_ITEMS + theElem.getName()).equals(value.toString())) {
            MessageDialog.openInformation(null,"String_Node_Str","String_Node_Str");
            return;
          }
        }
        List<Line> lines=browseItemToRoles.get(BROWSE_ITEMS + elem.getName());
        browseItemToRoles.remove(BROWSE_ITEMS + elem.getName());
        int prex=value.toString().indexOf(BROWSE_ITEMS);
        elem.setName(value.toString().substring(prex + BROWSE_ITEMS.length()));
        browseItemToRoles.put(value.toString(),lines);
        refreshRoleView(BROWSE_ITEMS + elem.getName());
        browseViewer.update(elem,null);
      }
    }
    public Object getValue(    Object element,    String property){
      XSDElementDeclaration elem=(XSDElementDeclaration)element;
      return BROWSE_ITEMS + elem.getName();
    }
  }
);
  browseViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      XSDElementDeclaration decl=(XSDElementDeclaration)((IStructuredSelection)event.getSelection()).getFirstElement();
      refreshRoleView(BROWSE_ITEMS + decl.getName());
      UpdateComplexViewButton(true);
    }
  }
);
  browseViewer.setInput(declList);
  browseViewer.setColumnProperties(new String[]{INSTANCE_NAME});
  browseViewer.refresh();
  Label infoLabel=new Label(composite,SWT.NONE);
  infoLabel.setText("String_Node_Str");
  ComplexTableViewerColumn ruleColumn=roleConfigurationColumns[0];
  ruleColumn.setColumnWidth(250);
  List<String> roles=Util.getChildren(page.getXObject().getServerRoot(),TreeObject.ROLE);
  ruleColumn.setComboValues(roles.toArray(new String[]{}));
  ComplexTableViewerColumn acsColumn=roleConfigurationColumns[1];
  acsColumn.setColumnWidth(250);
  acsColumn.setComboValues(new String[]{"String_Node_Str","String_Node_Str"});
  complexTableViewer=new ComplexTableViewer(Arrays.asList(roleConfigurationColumns),page.getManagedForm().getToolkit(),composite);
  complexTableViewer.setKeyColumns(new ComplexTableViewerColumn[]{roleConfigurationColumns[0]});
  complexTableViewer.create();
  complexTableViewer.getViewer().setInput(new ArrayList<Line>());
  UpdateComplexViewButton(false);
  setControl(composite);
}