Program: 135998
Project: 135998
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 newMarker(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) {
          item.getControl().dispose();
          item.dispose();
          items.remove(new Integer(id));
        }
        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.WRAP);
        StyledText text=viewer.getTextWidget();
        String oblString=marker.getAttribute(ProverHelper.OBLIGATION_STRING,"String_Node_Str");
        viewer.setDocument(new Document(oblString.trim()));
        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);
        item.setHeight(text.getLineHeight() * text.getLineCount());
        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);
    }
  }
 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 newMarker(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) {
          item.getControl().dispose();
          item.dispose();
          items.remove(new Integer(id));
        }
        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.WRAP);
        viewer.getTextWidget().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
        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();
        System.out.println(viewer.getDocument().get());
        System.out.println("String_Node_Str" + text.getLineCount());
        item.setHeight(text.getLineHeight() * text.getLineCount());
      }
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
  }
}