Program: 135942
Project: 135942
Buggy source:
/** 
 * Adds the information from the obligation status to the view. If there is already an item with information of the same obligation as the status, that item is updated. If no such item exists, a new one is created.
 */
private void updateItem(ObligationStatus status){
  int id=status.getId();
  if (id != -1) {
    InterestingObligationExpandItem item=(InterestingObligationExpandItem)items.get(new Integer(id));
    if (!ProverHelper.isInterestingObligation(status)) {
      if (item != null) {
        removeItem(item);
      }
      return;
    }
    if (item == null) {
      item=new InterestingObligationExpandItem(bar,SWT.None,0,id);
      ;
      Composite oblWidget=new Composite(bar,SWT.LINE_SOLID);
      GridLayout gl=new GridLayout(1,true);
      gl.marginWidth=0;
      gl.marginHeight=0;
      oblWidget.setLayout(gl);
      Button stopButton=new Button(oblWidget,SWT.PUSH);
      stopButton.setText("String_Node_Str");
      stopButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
      stopButton.setData(status.getObMarker());
      stopButton.addSelectionListener(stopObListener);
      item.setButton(stopButton);
      SourceViewer viewer=new SourceViewer(oblWidget,null,SWT.READ_ONLY | SWT.MULTI | SWT.H_SCROLL);
      viewer.getTextWidget().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
      viewer.configure(new ObligationSourceViewerConfiguration());
      viewer.getControl().setFont(JFaceResources.getTextFont());
      fontListener.addControl(viewer.getControl());
      viewers.put(item,viewer);
      item.setControl(oblWidget);
      item.setExpanded(true);
      item.setData(status.getObMarker());
      viewer.getTextWidget().setData(status.getObMarker());
      oblWidget.setData(status.getObMarker());
      item.addListener(SWT.MouseDown,obClickListener);
      viewer.getTextWidget().addListener(SWT.MouseDown,obClickListener);
      oblWidget.addListener(SWT.MouseDown,obClickListener);
      items.put(new Integer(id),item);
    }
    item.setText("String_Node_Str" + id + "String_Node_Str"+ status.getProverStatusString());
    item.getButton().setEnabled(ProverHelper.isBeingProvedObligation(status));
    SourceViewer viewer=(SourceViewer)viewers.get(item);
    Assert.isNotNull(viewer,"String_Node_Str");
    String oblString=status.getObligationString();
    if ((viewer.getDocument() == null || !viewer.getDocument().get().equals(oblString)) && !oblString.isEmpty()) {
      viewer.setDocument(new Document(oblString.trim()));
      item.setHeight(item.getControl().computeSize(SWT.DEFAULT,SWT.DEFAULT,true).y);
    }
 else     if (oblString.isEmpty() && (viewer.getDocument() == null || viewer.getDocument().get().isEmpty())) {
      viewer.setDocument(new Document("String_Node_Str"));
      item.setHeight(100);
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds the information from the obligation status to the view. If there is already an item with information of the same obligation as the status, that item is updated. If no such item exists, a new one is created.
 */
private void updateItem(ObligationStatus status){
  int id=status.getId();
  if (id != -1) {
    InterestingObligationExpandItem item=(InterestingObligationExpandItem)items.get(new Integer(id));
    if (!ProverHelper.isInterestingObligation(status)) {
      if (item != null) {
        removeItem(item);
      }
      return;
    }
    if (item == null) {
      item=new InterestingObligationExpandItem(bar,SWT.None,0,id);
      ;
      Composite oblWidget=new Composite(bar,SWT.LINE_SOLID);
      GridLayout gl=new GridLayout(1,true);
      gl.marginWidth=0;
      gl.marginHeight=0;
      oblWidget.setLayout(gl);
      Button stopButton=new Button(oblWidget,SWT.PUSH);
      stopButton.setText("String_Node_Str");
      stopButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
      stopButton.setData(status.getObMarker());
      stopButton.addSelectionListener(stopObListener);
      item.setButton(stopButton);
      SourceViewer viewer=new SourceViewer(oblWidget,null,SWT.READ_ONLY | SWT.MULTI | SWT.H_SCROLL);
      viewer.getTextWidget().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
      viewer.configure(new ObligationSourceViewerConfiguration());
      viewer.getControl().setFont(JFaceResources.getTextFont());
      fontListener.addControl(viewer.getControl());
      viewers.put(item,viewer);
      item.setControl(oblWidget);
      item.setExpanded(true);
      item.setData(status.getObMarker());
      viewer.getTextWidget().setData(status.getObMarker());
      oblWidget.setData(status.getObMarker());
      item.addListener(SWT.MouseDown,obClickListener);
      viewer.getTextWidget().addListener(SWT.MouseDown,obClickListener);
      oblWidget.addListener(SWT.MouseDown,obClickListener);
      items.put(new Integer(id),item);
    }
    item.setText("String_Node_Str" + id + "String_Node_Str"+ status.getProverStatusString());
    item.getButton().setEnabled(ProverHelper.isBeingProvedObligation(status));
    SourceViewer viewer=(SourceViewer)viewers.get(item);
    Assert.isNotNull(viewer,"String_Node_Str");
    String oblString=status.getObligationString();
    Assert.isNotNull(oblString,"String_Node_Str" + status);
    if ((viewer.getDocument() == null || !viewer.getDocument().get().equals(oblString)) && !oblString.isEmpty()) {
      viewer.setDocument(new Document(oblString.trim()));
      item.setHeight(item.getControl().computeSize(SWT.DEFAULT,SWT.DEFAULT,true).y);
    }
 else     if (oblString.isEmpty() && (viewer.getDocument() == null || viewer.getDocument().get().isEmpty())) {
      viewer.setDocument(new Document("String_Node_Str"));
      item.setHeight(100);
    }
  }
}