Program: 119379
Project: 119379
Buggy source:
private void createTosActionArea(Composite parent){
  tosActionComposite=toolkit.createComposite(parent);
  GridData gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.heightHint=140;
  tosActionComposite.setLayoutData(gd);
  tosActionComposite.setLayout(new FormLayout());
  tosActionComposite.setBackgroundMode(SWT.INHERIT_DEFAULT);
  FormData data;
  Label projectLabel=toolkit.createLabel(tosActionComposite,Messages.getString("String_Node_Str"));
  projectLabel.setFont(font);
  GC gc=new GC(projectLabel);
  Point labelSize=gc.stringExtent(Messages.getString("String_Node_Str"));
  gc.dispose();
  data=new FormData();
  data.top=new FormAttachment(0,10);
  data.left=new FormAttachment(0,50);
  data.bottom=new FormAttachment(0,30);
  projectLabel.setBackground(tosActionComposite.getBackground());
  projectLabel.setLayoutData(data);
  openButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(projectLabel,0,SWT.TOP);
  gc=new GC(openButton);
  Point labelSizeOpenButton=gc.stringExtent(Messages.getString("String_Node_Str"));
  gc.dispose();
  int width=OPEN_IMAGE.getBounds().width;
  gc=new GC(openButton);
  Point labelSizeDeleteButton=gc.stringExtent(Messages.getString("String_Node_Str"));
  gc.dispose();
  if (labelSizeOpenButton.x + width > labelSizeDeleteButton.x) {
    data.left=new FormAttachment(100,-20 - labelSizeOpenButton.x - width- 10);
  }
 else {
    data.left=new FormAttachment(100,-20 - labelSizeDeleteButton.x - 10);
  }
  data.right=new FormAttachment(100,-10);
  openButton.setText(Messages.getString("String_Node_Str"));
  openButton.setFont(font);
  openButton.setLayoutData(data);
  openButton.setImage(OPEN_IMAGE);
  Composite projectListViewerContainer=new Composite(tosActionComposite,SWT.NONE);
  projectListViewerContainer.setLayout(new FillLayout());
  this.projectListViewer=new ListViewer(projectListViewerContainer);
  this.projectListViewer.setContentProvider(new TableViewerContentProvider());
  this.projectListViewer.setLabelProvider(new ILabelProvider(){
    public void removeListener(    ILabelProviderListener listener){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void dispose(){
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public String getText(    Object element){
      if (element != null) {
        return element.toString();
      }
      return null;
    }
    public Image getImage(    Object element){
      return null;
    }
  }
);
  this.projectListViewer.setSorter(new ViewerSorter());
  data=new FormData();
  data.top=new FormAttachment(projectLabel,0,SWT.TOP);
  data.left=new FormAttachment(projectLabel,10,SWT.RIGHT);
  data.right=new FormAttachment(openButton,-10,SWT.LEFT);
  data.bottom=new FormAttachment(0,100);
  projectListViewerContainer.setLayoutData(data);
  deleteButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(openButton,5,SWT.BOTTOM);
  data.left=new FormAttachment(openButton,0,SWT.LEFT);
  data.right=new FormAttachment(openButton,0,SWT.RIGHT);
  deleteButton.setText(Messages.getString("String_Node_Str"));
  deleteButton.setFont(font);
  deleteButton.setLayoutData(data);
  createButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(projectListViewerContainer,10,SWT.BOTTOM);
  data.left=new FormAttachment(projectListViewerContainer,0,SWT.LEFT);
  data.right=new FormAttachment(projectListViewerContainer,65,SWT.LEFT);
  createButton.setText(Messages.getString("String_Node_Str"));
  createButton.setFont(font);
  createButton.setLayoutData(data);
  importButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(createButton,0,SWT.TOP);
  data.left=new FormAttachment(createButton,10,SWT.RIGHT);
  importButton.setText(Messages.getString("String_Node_Str"));
  importButton.setFont(font);
  importButton.setLayoutData(data);
  demoProjectButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(importButton,0,SWT.TOP);
  data.left=new FormAttachment(importButton,10,SWT.RIGHT);
  data.right=new FormAttachment(100,-10);
  demoProjectButton.setText(Messages.getString("String_Node_Str"));
  demoProjectButton.setFont(font);
  demoProjectButton.setLayoutData(data);
  enableOpenAndDelete(false);
}

Fixed version (ground truth):
private void createTosActionArea(Composite parent){
  tosActionComposite=toolkit.createComposite(parent);
  GridData gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.heightHint=140;
  tosActionComposite.setLayoutData(gd);
  tosActionComposite.setLayout(new FormLayout());
  tosActionComposite.setBackgroundMode(SWT.INHERIT_DEFAULT);
  FormData data;
  Label projectLabel=toolkit.createLabel(tosActionComposite,Messages.getString("String_Node_Str"));
  projectLabel.setFont(font);
  GC gc=new GC(projectLabel);
  Point labelSize=gc.stringExtent(Messages.getString("String_Node_Str"));
  gc.dispose();
  data=new FormData();
  data.top=new FormAttachment(0,10);
  data.left=new FormAttachment(0,50);
  data.bottom=new FormAttachment(0,30);
  projectLabel.setBackground(tosActionComposite.getBackground());
  projectLabel.setLayoutData(data);
  openButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(projectLabel,0,SWT.TOP);
  gc=new GC(openButton);
  Point labelSizeOpenButton=gc.stringExtent(Messages.getString("String_Node_Str"));
  gc.dispose();
  int width=OPEN_IMAGE.getBounds().width;
  gc=new GC(openButton);
  Point labelSizeDeleteButton=gc.stringExtent(Messages.getString("String_Node_Str"));
  gc.dispose();
  if (labelSizeOpenButton.x + width > labelSizeDeleteButton.x) {
    data.left=new FormAttachment(100,-20 - labelSizeOpenButton.x - width- 10);
  }
 else {
    data.left=new FormAttachment(100,-20 - labelSizeDeleteButton.x - 10);
  }
  data.right=new FormAttachment(100,-10);
  openButton.setText(Messages.getString("String_Node_Str"));
  openButton.setFont(font);
  openButton.setLayoutData(data);
  openButton.setImage(OPEN_IMAGE);
  Composite projectListViewerContainer=new Composite(tosActionComposite,SWT.NONE);
  projectListViewerContainer.setLayout(new FillLayout());
  this.projectListViewer=new ListViewer(projectListViewerContainer);
  this.projectListViewer.setContentProvider(new TableViewerContentProvider());
  this.projectListViewer.setLabelProvider(new ILabelProvider(){
    @Override public void removeListener(    ILabelProviderListener listener){
    }
    @Override public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    @Override public void dispose(){
    }
    @Override public void addListener(    ILabelProviderListener listener){
    }
    @Override public String getText(    Object element){
      if (element != null) {
        return element.toString();
      }
      return null;
    }
    @Override public Image getImage(    Object element){
      return null;
    }
  }
);
  this.projectListViewer.setSorter(new ViewerSorter());
  data=new FormData();
  data.top=new FormAttachment(projectLabel,0,SWT.TOP);
  data.left=new FormAttachment(projectLabel,10,SWT.RIGHT);
  data.right=new FormAttachment(openButton,-10,SWT.LEFT);
  data.bottom=new FormAttachment(0,100);
  projectListViewerContainer.setLayoutData(data);
  deleteButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(openButton,5,SWT.BOTTOM);
  data.left=new FormAttachment(openButton,0,SWT.LEFT);
  data.right=new FormAttachment(openButton,0,SWT.RIGHT);
  deleteButton.setText(Messages.getString("String_Node_Str"));
  deleteButton.setFont(font);
  deleteButton.setLayoutData(data);
  createButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(projectListViewerContainer,10,SWT.BOTTOM);
  data.left=new FormAttachment(projectListViewerContainer,0,SWT.LEFT);
  data.right=new FormAttachment(projectListViewerContainer,65,SWT.LEFT);
  createButton.setText(Messages.getString("String_Node_Str"));
  createButton.setFont(font);
  createButton.setLayoutData(data);
  importButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(createButton,0,SWT.TOP);
  data.left=new FormAttachment(createButton,10,SWT.RIGHT);
  importButton.setText(Messages.getString("String_Node_Str"));
  importButton.setFont(font);
  importButton.setLayoutData(data);
  demoProjectButton=toolkit.createButton(tosActionComposite,null,SWT.PUSH);
  data=new FormData();
  data.top=new FormAttachment(importButton,0,SWT.TOP);
  data.left=new FormAttachment(importButton,10,SWT.RIGHT);
  data.right=new FormAttachment(100,-10);
  demoProjectButton.setText(Messages.getString("String_Node_Str"));
  demoProjectButton.setFont(font);
  demoProjectButton.setLayoutData(data);
  enableOpenAndDelete(false);
}