Program: 135962
Project: 135962
Buggy source:
/** 
 * Creates a new marker at the current location of sanyMarker indicating the status given by status. If status is not a known type (the method  {@link #statusStringToMarkerType(String,boolean)} returns null) then this printssome debugging message and returns. If sanyMarker is null, this also prints some debugging message and returns. If status is null, this method just returns without doing anything.
 * @param sanyMarker
 * @param status
 */
public static void newStepStatusMarker(final IMarker sanyMarker,String status){
  if (status == null) {
    return;
  }
  if (sanyMarker == null) {
    ProverUIActivator.logDebug("String_Node_Str");
    return;
  }
  try {
    final IResource module=sanyMarker.getResource();
    final String markerType=statusStringToMarkerType(status,sanyMarker.getAttribute(SANY_IS_LEAF_ATR,false));
    if (markerType == null) {
      ProverUIActivator.logDebug("String_Node_Str" + status);
      return;
    }
    IWorkspaceRunnable runnable=new IWorkspaceRunnable(){
      public void run(      IProgressMonitor monitor) throws CoreException {
        IMarker newMarker=module.createMarker(markerType);
        Map markerAttributes=new HashMap(2);
        Position curPosition=EditorUtil.getMarkerPosition(sanyMarker);
        int newCharStart;
        int newCharEnd;
        if (curPosition != null) {
          newCharStart=curPosition.getOffset();
          newCharEnd=curPosition.getOffset() + curPosition.getLength();
        }
 else {
          newCharStart=sanyMarker.getAttribute(IMarker.CHAR_START,0);
          newCharEnd=sanyMarker.getAttribute(IMarker.CHAR_END,0);
        }
        IMarker[] existingMarkers=module.findMarkers(ProverHelper.STEP_STATUS_MARKER,true,IResource.DEPTH_ZERO);
        for (int i=0; i < existingMarkers.length; i++) {
          IMarker existingMarker=existingMarkers[i];
          int existingCharStart=existingMarker.getAttribute(IMarker.CHAR_START,-1);
          int existingCharEnd=existingMarker.getAttribute(IMarker.CHAR_END,-1);
          if (existingCharStart < newCharEnd && existingCharEnd > newCharStart) {
            existingMarker.delete();
          }
        }
        markerAttributes.put(IMarker.CHAR_START,new Integer(newCharStart));
        markerAttributes.put(IMarker.CHAR_END,new Integer(newCharEnd));
        markerAttributes.put(IMarker.LINE_NUMBER,new Integer(stringToLoc(sanyMarker.getAttribute(SANY_LOC_ATR,"String_Node_Str")).beginLine()));
        newMarker.setAttributes(markerAttributes);
      }
    }
;
    module.getWorkspace().run(runnable,null,IWorkspace.AVOID_UPDATE,null);
  }
 catch (  CoreException e) {
    ProverUIActivator.logError("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new marker at the current location of sanyMarker indicating the status given by status. If status is not a known type (the method  {@link #statusStringToMarkerType(String,boolean)} returns null) then this printssome debugging message and returns. If sanyMarker is null, this also prints some debugging message and returns. If status is null, this method removes any step status markers that overlap with sanyMarker. A null status means that no color should be shown on the editor.
 * @param sanyMarker
 * @param status
 */
public static void newStepStatusMarker(final IMarker sanyMarker,String status){
  if (sanyMarker == null) {
    ProverUIActivator.logDebug("String_Node_Str");
    return;
  }
  try {
    final IResource module=sanyMarker.getResource();
    final String markerType=statusStringToMarkerType(status,sanyMarker.getAttribute(SANY_IS_LEAF_ATR,false));
    IWorkspaceRunnable runnable=new IWorkspaceRunnable(){
      public void run(      IProgressMonitor monitor) throws CoreException {
        Position curPosition=EditorUtil.getMarkerPosition(sanyMarker);
        int newCharStart;
        int newCharEnd;
        if (curPosition != null) {
          newCharStart=curPosition.getOffset();
          newCharEnd=curPosition.getOffset() + curPosition.getLength();
        }
 else {
          newCharStart=sanyMarker.getAttribute(IMarker.CHAR_START,0);
          newCharEnd=sanyMarker.getAttribute(IMarker.CHAR_END,0);
        }
        IMarker[] existingMarkers=module.findMarkers(ProverHelper.STEP_STATUS_MARKER,true,IResource.DEPTH_ZERO);
        for (int i=0; i < existingMarkers.length; i++) {
          IMarker existingMarker=existingMarkers[i];
          int existingCharStart=existingMarker.getAttribute(IMarker.CHAR_START,-1);
          int existingCharEnd=existingMarker.getAttribute(IMarker.CHAR_END,-1);
          if (existingCharStart < newCharEnd && existingCharEnd > newCharStart) {
            existingMarker.delete();
          }
        }
        if (markerType != null) {
          Map markerAttributes=new HashMap(2);
          markerAttributes.put(IMarker.CHAR_START,new Integer(newCharStart));
          markerAttributes.put(IMarker.CHAR_END,new Integer(newCharEnd));
          markerAttributes.put(IMarker.LINE_NUMBER,new Integer(stringToLoc(sanyMarker.getAttribute(SANY_LOC_ATR,"String_Node_Str")).beginLine()));
          IMarker newMarker=module.createMarker(markerType);
          newMarker.setAttributes(markerAttributes);
        }
      }
    }
;
    module.getWorkspace().run(runnable,null,IWorkspace.AVOID_UPDATE,null);
  }
 catch (  CoreException e) {
    ProverUIActivator.logError("String_Node_Str",e);
  }
}