Program: 16016
Project: 16016
Buggy source:
/** 
 * Get the query execution plan text to use for this table filter.
 * @param isJoin if this is a joined table
 * @return the SQL statement snippet
 */
public String getPlanSQL(boolean isJoin){
  StringBuilder buff=new StringBuilder();
  if (isJoin) {
    if (joinOuter) {
      buff.append("String_Node_Str");
    }
 else {
      buff.append("String_Node_Str");
    }
  }
  if (nestedJoin != null) {
    StringBuffer buffNested=new StringBuffer();
    TableFilter n=nestedJoin;
    do {
      buffNested.append(n.getPlanSQL(n != nestedJoin));
      buffNested.append("String_Node_Str");
      n=n.getJoin();
    }
 while (n != null);
    buff.append("String_Node_Str");
    buff.append(StringUtils.indent(buffNested.toString(),4,false));
    buff.append("String_Node_Str");
    if (isJoin) {
      buff.append("String_Node_Str");
      if (joinCondition == null) {
        buff.append("String_Node_Str");
      }
 else {
        buff.append(StringUtils.unEnclose(joinCondition.getSQL()));
      }
    }
    return buff.toString();
  }
  buff.append(table.getSQL());
  if (alias != null) {
    buff.append(' ').append(Parser.quoteIdentifier(alias));
  }
  if (index != null) {
    buff.append("String_Node_Str");
    StatementBuilder planBuff=new StatementBuilder();
    planBuff.append(index.getPlanSQL());
    if (indexConditions.size() > 0) {
      planBuff.append("String_Node_Str");
      for (      IndexCondition condition : indexConditions) {
        planBuff.appendExceptFirst("String_Node_Str");
        planBuff.append(condition.getSQL());
      }
    }
    String plan=StringUtils.quoteRemarkSQL(planBuff.toString());
    if (plan.indexOf('\n') >= 0) {
      plan+="String_Node_Str";
    }
    buff.append(StringUtils.indent("String_Node_Str" + plan + "String_Node_Str",4,false));
  }
  if (isJoin) {
    buff.append("String_Node_Str");
    if (joinCondition == null) {
      buff.append("String_Node_Str");
    }
 else {
      buff.append(StringUtils.unEnclose(joinCondition.getSQL()));
    }
  }
  if (filterCondition != null) {
    buff.append("String_Node_Str");
    String condition=StringUtils.unEnclose(filterCondition.getSQL());
    condition="String_Node_Str" + StringUtils.quoteRemarkSQL(condition) + "String_Node_Str";
    buff.append(StringUtils.indent(condition,4,false));
  }
  if (scanCount > 0) {
    buff.append("String_Node_Str").append(scanCount).append("String_Node_Str");
  }
  return buff.toString();
}

Fixed version (ground truth):
/** 
 * Get the query execution plan text to use for this table filter.
 * @param isJoin if this is a joined table
 * @return the SQL statement snippet
 */
public String getPlanSQL(boolean isJoin){
  StringBuilder buff=new StringBuilder();
  if (isJoin) {
    if (joinOuter) {
      buff.append("String_Node_Str");
    }
 else {
      buff.append("String_Node_Str");
    }
  }
  if (nestedJoin != null) {
    StringBuffer buffNested=new StringBuffer();
    TableFilter n=nestedJoin;
    do {
      buffNested.append(n.getPlanSQL(n != nestedJoin));
      buffNested.append('\n');
      n=n.getJoin();
    }
 while (n != null);
    buff.append("String_Node_Str");
    buff.append(StringUtils.indent(buffNested.toString(),4,false));
    buff.append(')');
    if (isJoin) {
      buff.append("String_Node_Str");
      if (joinCondition == null) {
        buff.append("String_Node_Str");
      }
 else {
        buff.append(StringUtils.unEnclose(joinCondition.getSQL()));
      }
    }
    return buff.toString();
  }
  buff.append(table.getSQL());
  if (alias != null) {
    buff.append(' ').append(Parser.quoteIdentifier(alias));
  }
  if (index != null) {
    buff.append('\n');
    StatementBuilder planBuff=new StatementBuilder();
    planBuff.append(index.getPlanSQL());
    if (indexConditions.size() > 0) {
      planBuff.append("String_Node_Str");
      for (      IndexCondition condition : indexConditions) {
        planBuff.appendExceptFirst("String_Node_Str");
        planBuff.append(condition.getSQL());
      }
    }
    String plan=StringUtils.quoteRemarkSQL(planBuff.toString());
    if (plan.indexOf('\n') >= 0) {
      plan+="String_Node_Str";
    }
    buff.append(StringUtils.indent("String_Node_Str" + plan + "String_Node_Str",4,false));
  }
  if (isJoin) {
    buff.append("String_Node_Str");
    if (joinCondition == null) {
      buff.append("String_Node_Str");
    }
 else {
      buff.append(StringUtils.unEnclose(joinCondition.getSQL()));
    }
  }
  if (filterCondition != null) {
    buff.append('\n');
    String condition=StringUtils.unEnclose(filterCondition.getSQL());
    condition="String_Node_Str" + StringUtils.quoteRemarkSQL(condition) + "String_Node_Str";
    buff.append(StringUtils.indent(condition,4,false));
  }
  if (scanCount > 0) {
    buff.append("String_Node_Str").append(scanCount).append("String_Node_Str");
  }
  return buff.toString();
}