Program: 147758
Project: 147758
Buggy source:
@Override protected void createCharacteristicsContent(FormToolkit toolkit,Composite charComposite){
  try {
    Label vbeLabel=toolkit.createLabel(charComposite,Messages.ViewBrowserMainPage_ViewableElements,SWT.NULL);
    vbeLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    Label sbeLabel=toolkit.createLabel(charComposite,Messages.ViewBrowserMainPage_SearchableElements,SWT.NULL);
    sbeLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    viewableBEsList=new List(charComposite,SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
    viewableBEsList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    ((GridData)viewableBEsList.getLayoutData()).heightHint=100;
    searchableBEsList=new List(charComposite,SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
    searchableBEsList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    ((GridData)searchableBEsList.getLayoutData()).heightHint=100;
    Label wcLabel=toolkit.createLabel(charComposite,Messages.ViewBrowserMainPage_Conditions,SWT.NULL);
    wcLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,2,1));
    wcListViewer=new ListViewer(charComposite,SWT.BORDER);
    wcListViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,1));
    ((GridData)wcListViewer.getControl().getLayoutData()).minimumHeight=100;
    wcListViewer.setContentProvider(new IStructuredContentProvider(){
      public void dispose(){
      }
      public void inputChanged(      Viewer viewer,      Object oldInput,      Object newInput){
      }
      public Object[] getElements(      Object inputElement){
        return ((WSView)inputElement).getWhereConditions() == null ? new WSWhereCondition[0] : ((WSView)inputElement).getWhereConditions();
      }
    }
);
    wcListViewer.setLabelProvider(new ILabelProvider(){
      public Image getImage(      Object element){
        return null;
      }
      public String getText(      Object element){
        WSWhereCondition wc=(WSWhereCondition)element;
        String text=wc.getLeftPath() + "String_Node_Str";
        if (wc.getOperator().equals(WSWhereOperator.CONTAINS))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.EQUALS))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.GREATER_THAN))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.GREATER_THAN_OR_EQUAL))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.JOIN))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.LOWER_THAN))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.LOWER_THAN_OR_EQUAL))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.NOT_EQUALS))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.STARTSWITH))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.STRICTCONTAINS))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.EMPTY_NULL))         text+="String_Node_Str";
        text+="String_Node_Str";
        if (!wc.getOperator().equals(WSWhereOperator.JOIN))         text+="String_Node_Str";
        text+=wc.getRightValueOrPath();
        if (!wc.getOperator().equals(WSWhereOperator.JOIN))         text+="String_Node_Str";
        text+="String_Node_Str";
        if (wc.getStringPredicate().equals(WSStringPredicate.AND))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.EXACTLY))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.NONE))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.NOT))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.OR))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.STRICTAND))         text+="String_Node_Str";
        return text;
      }
      public void addListener(      ILabelProviderListener listener){
      }
      public void dispose(){
      }
      public boolean isLabelProperty(      Object element,      String property){
        return false;
      }
      public void removeListener(      ILabelProviderListener listener){
      }
    }
);
    Composite resultsGroup=this.getNewSectionComposite(Messages.ViewBrowserMainPage_SearchAndResults);
    resultsGroup.setLayout(new GridLayout(4,false));
    Label descriptionLabel=toolkit.createLabel(resultsGroup,Messages.ViewBrowserMainPage_Search,SWT.NULL);
    descriptionLabel.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1));
    dataClusterCombo=new Combo(resultsGroup,SWT.READ_ONLY | SWT.DROP_DOWN | SWT.SINGLE);
    dataClusterCombo.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1));
    ((GridData)dataClusterCombo.getLayoutData()).minimumWidth=100;
    searchText=toolkit.createText(resultsGroup,"String_Node_Str",SWT.BORDER);
    searchText.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
    searchText.addKeyListener(new KeyListener(){
      public void keyPressed(      KeyEvent e){
      }
      public void keyReleased(      KeyEvent e){
        if ((e.stateMask == 0) && (e.character == SWT.CR)) {
          ViewBrowserMainPage.this.resultsViewer.setInput(getResults());
        }
      }
    }
);
    Button bSearch=toolkit.createButton(resultsGroup,Messages.ViewBrowserMainPage_Search,SWT.CENTER);
    bSearch.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
    bSearch.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        ViewBrowserMainPage.this.resultsViewer.setInput(getResults());
      }
    }
);
    matchAllWords=toolkit.createButton(resultsGroup,Messages.ViewBrowserMainPage_MatchWholeSentence,SWT.CHECK);
    matchAllWords.setSelection(true);
    resultsLabel=toolkit.createLabel(resultsGroup,Messages.ViewBrowserMainPage_Search,SWT.NULL);
    resultsLabel.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,4,1));
    resultsLabel.setText("String_Node_Str");
    resultsViewer=new TableViewer(resultsGroup);
    resultsViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,4,1));
    ((GridData)resultsViewer.getControl().getLayoutData()).heightHint=500;
    resultsViewer.setContentProvider(new ArrayContentProvider());
    resultsViewer.setLabelProvider(new XMLTableLabelProvider());
    resultsViewer.addDoubleClickListener(new IDoubleClickListener(){
      public void doubleClick(      DoubleClickEvent event){
        resultsViewer.setSelection(event.getSelection());
        try {
          new DOMViewAction(ViewBrowserMainPage.this.getSite().getShell(),resultsViewer).run();
        }
 catch (        Exception e) {
          MessageDialog.openError(ViewBrowserMainPage.this.getSite().getShell(),Messages._Error,Messages.bind(Messages.ViewBrowserMainPage_ErrorMsg,e.getClass().getName(),e.getLocalizedMessage()));
        }
      }
    }
);
    hookContextMenu();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override protected void createCharacteristicsContent(FormToolkit toolkit,Composite charComposite){
  try {
    Label vbeLabel=toolkit.createLabel(charComposite,Messages.ViewBrowserMainPage_ViewableElements,SWT.NULL);
    vbeLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    Label sbeLabel=toolkit.createLabel(charComposite,Messages.ViewBrowserMainPage_SearchableElements,SWT.NULL);
    sbeLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    viewableBEsList=new List(charComposite,SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
    viewableBEsList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    ((GridData)viewableBEsList.getLayoutData()).heightHint=100;
    searchableBEsList=new List(charComposite,SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
    searchableBEsList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    ((GridData)searchableBEsList.getLayoutData()).heightHint=100;
    Label wcLabel=toolkit.createLabel(charComposite,Messages.ViewBrowserMainPage_Conditions,SWT.NULL);
    wcLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,2,1));
    wcListViewer=new ListViewer(charComposite,SWT.BORDER);
    wcListViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,1));
    ((GridData)wcListViewer.getControl().getLayoutData()).minimumHeight=100;
    wcListViewer.setContentProvider(new IStructuredContentProvider(){
      public void dispose(){
      }
      public void inputChanged(      Viewer viewer,      Object oldInput,      Object newInput){
      }
      public Object[] getElements(      Object inputElement){
        return ((WSView)inputElement).getWhereConditions() == null ? new WSWhereCondition[0] : ((WSView)inputElement).getWhereConditions();
      }
    }
);
    wcListViewer.setLabelProvider(new ILabelProvider(){
      public Image getImage(      Object element){
        return null;
      }
      public String getText(      Object element){
        WSWhereCondition wc=(WSWhereCondition)element;
        String text=wc.getLeftPath() + "String_Node_Str";
        if (wc.getOperator().equals(WSWhereOperator.CONTAINS))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.CONTAINS_TEXT_OF))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.EQUALS))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.GREATER_THAN))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.GREATER_THAN_OR_EQUAL))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.JOIN))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.LOWER_THAN))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.LOWER_THAN_OR_EQUAL))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.NOT_EQUALS))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.STARTSWITH))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.STRICTCONTAINS))         text+="String_Node_Str";
 else         if (wc.getOperator().equals(WSWhereOperator.EMPTY_NULL))         text+="String_Node_Str";
        text+="String_Node_Str";
        if (!wc.getOperator().equals(WSWhereOperator.JOIN))         text+="String_Node_Str";
        text+=wc.getRightValueOrPath();
        if (!wc.getOperator().equals(WSWhereOperator.JOIN))         text+="String_Node_Str";
        text+="String_Node_Str";
        if (wc.getStringPredicate().equals(WSStringPredicate.AND))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.EXACTLY))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.NONE))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.NOT))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.OR))         text+="String_Node_Str";
 else         if (wc.getStringPredicate().equals(WSStringPredicate.STRICTAND))         text+="String_Node_Str";
        return text;
      }
      public void addListener(      ILabelProviderListener listener){
      }
      public void dispose(){
      }
      public boolean isLabelProperty(      Object element,      String property){
        return false;
      }
      public void removeListener(      ILabelProviderListener listener){
      }
    }
);
    Composite resultsGroup=this.getNewSectionComposite(Messages.ViewBrowserMainPage_SearchAndResults);
    resultsGroup.setLayout(new GridLayout(4,false));
    Label descriptionLabel=toolkit.createLabel(resultsGroup,Messages.ViewBrowserMainPage_Search,SWT.NULL);
    descriptionLabel.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1));
    dataClusterCombo=new Combo(resultsGroup,SWT.READ_ONLY | SWT.DROP_DOWN | SWT.SINGLE);
    dataClusterCombo.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1));
    ((GridData)dataClusterCombo.getLayoutData()).minimumWidth=100;
    searchText=toolkit.createText(resultsGroup,"String_Node_Str",SWT.BORDER);
    searchText.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
    searchText.addKeyListener(new KeyListener(){
      public void keyPressed(      KeyEvent e){
      }
      public void keyReleased(      KeyEvent e){
        if ((e.stateMask == 0) && (e.character == SWT.CR)) {
          ViewBrowserMainPage.this.resultsViewer.setInput(getResults());
        }
      }
    }
);
    Button bSearch=toolkit.createButton(resultsGroup,Messages.ViewBrowserMainPage_Search,SWT.CENTER);
    bSearch.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
    bSearch.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        ViewBrowserMainPage.this.resultsViewer.setInput(getResults());
      }
    }
);
    matchAllWords=toolkit.createButton(resultsGroup,Messages.ViewBrowserMainPage_MatchWholeSentence,SWT.CHECK);
    matchAllWords.setSelection(true);
    resultsLabel=toolkit.createLabel(resultsGroup,Messages.ViewBrowserMainPage_Search,SWT.NULL);
    resultsLabel.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,4,1));
    resultsLabel.setText("String_Node_Str");
    resultsViewer=new TableViewer(resultsGroup);
    resultsViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,4,1));
    ((GridData)resultsViewer.getControl().getLayoutData()).heightHint=500;
    resultsViewer.setContentProvider(new ArrayContentProvider());
    resultsViewer.setLabelProvider(new XMLTableLabelProvider());
    resultsViewer.addDoubleClickListener(new IDoubleClickListener(){
      public void doubleClick(      DoubleClickEvent event){
        resultsViewer.setSelection(event.getSelection());
        try {
          new DOMViewAction(ViewBrowserMainPage.this.getSite().getShell(),resultsViewer).run();
        }
 catch (        Exception e) {
          MessageDialog.openError(ViewBrowserMainPage.this.getSite().getShell(),Messages._Error,Messages.bind(Messages.ViewBrowserMainPage_ErrorMsg,e.getClass().getName(),e.getLocalizedMessage()));
        }
      }
    }
);
    hookContextMenu();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}