Program: 17429
Project: 17429
Buggy source:
/** 
 * Handles the case where a user has <tr>| <td> and presses enter. <tr>|</tr> will not indent. <tr>| <td> will indent.
 * @param doc
 * @param docCommand
 */
private void handleEnterBetweenTags(IDocument doc,DocumentCommand docCommand){
  if (doc instanceof ICFDocument && useSmartIndent) {
    ICFDocument cfd=(ICFDocument)doc;
    CFEPartitioner partitioner=(CFEPartitioner)cfd.getDocumentPartitioner();
    CFEPartition prevPartition=partitioner.getPreviousPartition(docCommand.offset);
    CFEPartition nextPartition=null;
    if (prevPartition != null) {
      nextPartition=partitioner.getNextPartition(prevPartition.offset);
    }
    if (nextPartition != null && prevPartition != null) {
      if (prevPartition.getType().endsWith("String_Node_Str")) {
        try {
          boolean doIndent=true;
          if (nextPartition.getType().endsWith("String_Node_Str") && nextPartition.offset == docCommand.offset) {
            doIndent=false;
          }
          if (doc.getLineOfOffset(prevPartition.offset) != doc.getLineOfOffset(docCommand.offset)) {
            doIndent=false;
          }
          if (doIndent) {
            CFEPartition closer=partitioner.getCloser(prevPartition);
            if (closer != null) {
              String prevLineWhitespace=getPrevLineWhiteSpace(doc,docCommand.offset);
              docCommand.text+=indentString + guessNewIndentWhitespace(prevLineWhitespace);
              return;
            }
          }
        }
 catch (        BadLocationException e) {
        }
      }
 else       if (nextPartition.getType().endsWith("String_Node_Str")) {
        try {
          CFEPartition opener=partitioner.getOpener(nextPartition);
          if (opener == null) {
            return;
          }
          int openerLine=doc.getLineOfOffset(opener.offset);
          int lineStart=doc.getLineOffset(openerLine);
          String prefix=doc.get(lineStart,opener.offset - lineStart);
          String tagStart="String_Node_Str";
          int indent=prefix.indexOf(tagStart);
          for (int i=0; i < prefix.length(); i++) {
            char c=prefix.charAt(i);
            if (c == '\t') {
              indent+=indentSize - 1;
            }
          }
          int cnt=(int)Math.round(new Float(indent).floatValue() / new Float(indentSize).floatValue());
          prefix="String_Node_Str";
          for (int i=0; i < cnt; i++) {
            prefix+=indentString;
          }
          docCommand.text+=prefix;
          return;
        }
 catch (        BadLocationException e) {
          e.printStackTrace();
        }
      }
    }
  }
  try {
    String prevLineWhitespace=getPrevLineWhiteSpace(doc,docCommand.offset);
    docCommand.text+=guessNewIndentWhitespace(prevLineWhitespace);
  }
 catch (  BadLocationException e) {
  }
}

Fixed version (ground truth):
/** 
 * Handles the case where a user has <tr>| <td> and presses enter. <tr>|</tr> will not indent. <tr>| <td> will indent.
 * @param doc
 * @param docCommand
 */
private void handleEnterBetweenTags(IDocument doc,DocumentCommand docCommand){
  if (doc instanceof ICFDocument && useSmartIndent) {
    ICFDocument cfd=(ICFDocument)doc;
    CFEPartitioner partitioner=(CFEPartitioner)cfd.getDocumentPartitioner();
    CFEPartition prevPartition=partitioner.getPreviousPartition(docCommand.offset);
    CFEPartition nextPartition=null;
    if (prevPartition != null) {
      nextPartition=partitioner.getNextPartition(prevPartition.offset);
    }
    if (nextPartition != null && prevPartition != null) {
      if (prevPartition.getType().endsWith("String_Node_Str")) {
        try {
          boolean doIndent=true;
          if (nextPartition.getType().endsWith("String_Node_Str") && nextPartition.offset == docCommand.offset) {
            doIndent=false;
          }
          if (doc.getLineOfOffset(prevPartition.offset) != doc.getLineOfOffset(docCommand.offset)) {
            doIndent=false;
          }
          if (doIndent) {
            CFEPartition closer=partitioner.getCloser(prevPartition);
            if (closer != null) {
              String prevLineWhitespace=getPrevLineWhiteSpace(doc,docCommand.offset);
              docCommand.text+=indentString + guessNewIndentWhitespace(prevLineWhitespace);
              return;
            }
          }
        }
 catch (        BadLocationException e) {
        }
      }
      if (nextPartition.getType().endsWith("String_Node_Str") && nextPartition.offset == docCommand.offset) {
        try {
          CFEPartition opener=partitioner.getOpener(nextPartition);
          if (opener == null) {
            return;
          }
          int openerLine=doc.getLineOfOffset(opener.offset);
          int lineStart=doc.getLineOffset(openerLine);
          String prefix=doc.get(lineStart,opener.offset - lineStart);
          String tagStart="String_Node_Str";
          int indent=prefix.indexOf(tagStart);
          for (int i=0; i < prefix.length(); i++) {
            char c=prefix.charAt(i);
            if (c == '\t') {
              indent+=indentSize - 1;
            }
          }
          int cnt=(int)Math.round(new Float(indent).floatValue() / new Float(indentSize).floatValue());
          prefix="String_Node_Str";
          for (int i=0; i < cnt; i++) {
            prefix+=indentString;
          }
          docCommand.text+=prefix;
          return;
        }
 catch (        BadLocationException e) {
          e.printStackTrace();
        }
      }
    }
  }
  try {
    String prevLineWhitespace=getPrevLineWhiteSpace(doc,docCommand.offset);
    docCommand.text+=guessNewIndentWhitespace(prevLineWhitespace);
  }
 catch (  BadLocationException e) {
  }
}