Program: 259
Project: 259
Buggy source:
/** 
 * This updates all the marks for a file whenever text is deleted from the file. If the line that contains a mark is completely deleted then the mark is deleted too. If the deleted text is before the marked line, the mark is moved up by the number of deleted lines.
 * @param editor The modified editor
 * @param marks The editor's marks to update
 * @param delStartOff The offset within the editor where the deletion occurred
 * @param delLength The length of the deleted text
 */
public static void updateMarkFromDelete(Editor editor,HashMap marks,int delStartOff,int delLength){
  if (marks != null && marks.size() > 0) {
    int delEndOff=delStartOff + delLength;
    LogicalPosition delStart=editor.offsetToLogicalPosition(delStartOff);
    LogicalPosition delEnd=editor.offsetToLogicalPosition(delEndOff);
    logger.debug("String_Node_Str" + delStart + "String_Node_Str"+ delEnd);
    for (Iterator iterator=marks.values().iterator(); iterator.hasNext(); ) {
      Mark mark=(Mark)iterator.next();
      logger.debug("String_Node_Str" + mark);
      if (delEnd.line < mark.getLogicalLine()) {
        int lines=delEnd.line - delStart.line;
        logger.debug("String_Node_Str" + lines + "String_Node_Str");
        mark.setLogicalLine(mark.getLogicalLine() - lines);
      }
 else       if (delStart.line <= mark.getLogicalLine() && delEnd.line >= mark.getLogicalLine()) {
        int markLineStartOff=editor.getDocument().getLineStartOffset(mark.getLogicalLine());
        int markLineEndOff=editor.getDocument().getLineEndOffset(mark.getLogicalLine());
        if (delStartOff <= markLineStartOff && delEndOff >= markLineEndOff) {
          mark.clear();
          iterator.remove();
          logger.debug("String_Node_Str");
        }
 else         if (delStart.line < mark.getLogicalLine()) {
          mark.setLogicalLine(delStart.line);
          logger.debug("String_Node_Str" + delStart.line);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This updates all the marks for a file whenever text is deleted from the file. If the line that contains a mark is completely deleted then the mark is deleted too. If the deleted text is before the marked line, the mark is moved up by the number of deleted lines.
 * @param editor The modified editor
 * @param marks The editor's marks to update
 * @param delStartOff The offset within the editor where the deletion occurred
 * @param delLength The length of the deleted text
 */
public static void updateMarkFromDelete(Editor editor,HashMap marks,int delStartOff,int delLength){
  if (marks != null && marks.size() > 0) {
    int delEndOff=delStartOff + delLength;
    LogicalPosition delStart=editor.offsetToLogicalPosition(delStartOff);
    LogicalPosition delEnd=editor.offsetToLogicalPosition(delEndOff);
    logger.debug("String_Node_Str" + delStart + "String_Node_Str"+ delEnd);
    for (Iterator iterator=marks.values().iterator(); iterator.hasNext(); ) {
      Mark mark=(Mark)iterator.next();
      logger.debug("String_Node_Str" + mark);
      if (delEnd.line < mark.getLogicalLine()) {
        int lines=delEnd.line - delStart.line;
        logger.debug("String_Node_Str" + lines + "String_Node_Str");
        mark.setLogicalLine(mark.getLogicalLine() - lines);
      }
 else       if (delStart.line <= mark.getLogicalLine() && delEnd.line >= mark.getLogicalLine()) {
        int markLineStartOff=EditorHelper.getLineStartOffset(editor,mark.getLogicalLine());
        int markLineEndOff=EditorHelper.getLineEndOffset(editor,mark.getLogicalLine());
        if (delStartOff <= markLineStartOff && delEndOff >= markLineEndOff) {
          mark.clear();
          iterator.remove();
          logger.debug("String_Node_Str");
        }
 else         if (delStart.line < mark.getLogicalLine()) {
          mark.setLogicalLine(delStart.line);
          logger.debug("String_Node_Str" + delStart.line);
        }
      }
    }
  }
}