Program: 135981
Project: 135981
Buggy source:
/** 
 * Adds the information from the marker to the view. Should be a marker of type   {@link ProverHelper#OBLIGATION_METHOD}. If there is already an item with information of the same obligation as the marker, that item is updated. If no such item exists, a new one is created.
 */
private void updateItem(IMarker marker){
  try {
    Assert.isTrue(marker.getType().equals(ProverHelper.OBLIGATION_MARKER),"String_Node_Str");
    int id=marker.getAttribute(ProverHelper.OBLIGATION_ID,-1);
    if (id != -1) {
      ExpandItem item=(ExpandItem)items.get(new Integer(id));
      if (!ProverHelper.isInterestingObligation(marker)) {
        if (item != null) {
          removeItem(item);
        }
        return;
      }
      if (item == null) {
        item=new ExpandItem(bar,SWT.None,0);
        Composite oblWidget=new Composite(bar,SWT.LINE_SOLID);
        GridLayout gl=new GridLayout(1,true);
        gl.marginWidth=0;
        gl.marginHeight=0;
        oblWidget.setLayout(gl);
        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(marker);
        viewer.getTextWidget().setData(marker);
        oblWidget.setData(marker);
        item.addListener(SWT.MouseDown,listener);
        viewer.getTextWidget().addListener(SWT.MouseDown,listener);
        oblWidget.addListener(SWT.MouseDown,listener);
        items.put(new Integer(id),item);
      }
      String status=marker.getAttribute(ProverHelper.OBLIGATION_STATUS,"String_Node_Str");
      String method=marker.getAttribute(ProverHelper.OBLIGATION_METHOD,"String_Node_Str");
      item.setText("String_Node_Str" + id + "String_Node_Str"+ status+ "String_Node_Str"+ method);
      SourceViewer viewer=(SourceViewer)viewers.get(item);
      Assert.isNotNull(viewer,"String_Node_Str");
      String oblString=marker.getAttribute(ProverHelper.OBLIGATION_STRING,"String_Node_Str");
      if (viewer.getDocument() == null && !oblString.isEmpty()) {
        viewer.setDocument(new Document(oblString.trim()));
        StyledText text=viewer.getTextWidget();
        ScrollBar hBar=text.getHorizontalBar();
        item.setHeight(text.getLineHeight() * text.getLineCount() + (hBar != null ? hBar.getSize().y : 0));
      }
 else {
        viewer.setDocument(new Document("String_Node_Str"));
        item.setHeight(100);
      }
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Adds the information from the marker to the view. Should be a marker of type   {@link ProverHelper#OBLIGATION_METHOD}. If there is already an item with information of the same obligation as the marker, that item is updated. If no such item exists, a new one is created.
 */
private void updateItem(IMarker marker){
  try {
    Assert.isTrue(marker.getType().equals(ProverHelper.OBLIGATION_MARKER),"String_Node_Str");
    int id=marker.getAttribute(ProverHelper.OBLIGATION_ID,-1);
    if (id != -1) {
      ExpandItem item=(ExpandItem)items.get(new Integer(id));
      if (!ProverHelper.isInterestingObligation(marker)) {
        if (item != null) {
          removeItem(item);
        }
        return;
      }
      if (item == null) {
        item=new ExpandItem(bar,SWT.None,0);
        Composite oblWidget=new Composite(bar,SWT.LINE_SOLID);
        GridLayout gl=new GridLayout(1,true);
        gl.marginWidth=0;
        gl.marginHeight=0;
        oblWidget.setLayout(gl);
        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(marker);
        viewer.getTextWidget().setData(marker);
        oblWidget.setData(marker);
        item.addListener(SWT.MouseDown,listener);
        viewer.getTextWidget().addListener(SWT.MouseDown,listener);
        oblWidget.addListener(SWT.MouseDown,listener);
        items.put(new Integer(id),item);
      }
      String status=marker.getAttribute(ProverHelper.OBLIGATION_STATUS,"String_Node_Str");
      String method=marker.getAttribute(ProverHelper.OBLIGATION_METHOD,"String_Node_Str");
      item.setText("String_Node_Str" + id + "String_Node_Str"+ status+ "String_Node_Str"+ method);
      SourceViewer viewer=(SourceViewer)viewers.get(item);
      Assert.isNotNull(viewer,"String_Node_Str");
      String oblString=marker.getAttribute(ProverHelper.OBLIGATION_STRING,"String_Node_Str");
      if ((viewer.getDocument() == null || !viewer.getDocument().get().equals(oblString)) && !oblString.isEmpty()) {
        viewer.setDocument(new Document(oblString.trim()));
        StyledText text=viewer.getTextWidget();
        ScrollBar hBar=text.getHorizontalBar();
        item.setHeight(text.getLineHeight() * text.getLineCount() + (hBar != null ? hBar.getSize().y : 0));
      }
 else {
        viewer.setDocument(new Document("String_Node_Str"));
        item.setHeight(100);
      }
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
  }
}