Program: 64204
Project: 64204
Buggy source:
/** 
 * read in lines and execute them
 * @param reader the reader contains sql lines.
 * @param out the place to output results.
 * @throws SQLException on sql problems
 * @throws IOException on io problems
 */
protected void runStatements(Reader reader,PrintStream out) throws SQLException, IOException {
  StringBuffer sql=new StringBuffer();
  String line="String_Node_Str";
  BufferedReader in=new BufferedReader(reader);
  while ((line=in.readLine()) != null) {
    if (!keepformat) {
      line=line.trim();
    }
    line=getProject().replaceProperties(line);
    if (!keepformat) {
      if (line.startsWith("String_Node_Str")) {
        continue;
      }
      if (line.startsWith("String_Node_Str")) {
        continue;
      }
      StringTokenizer st=new StringTokenizer(line);
      if (st.hasMoreTokens()) {
        String token=st.nextToken();
        if ("String_Node_Str".equalsIgnoreCase(token)) {
          continue;
        }
      }
    }
    if (!keepformat) {
      sql.append("String_Node_Str" + line);
    }
 else {
      sql.append("String_Node_Str" + line);
    }
    if (!keepformat) {
      if (line.indexOf("String_Node_Str") >= 0) {
        sql.append("String_Node_Str");
      }
    }
    if ((delimiterType.equals(DelimiterType.NORMAL) && sql.toString().endsWith(delimiter)) || (delimiterType.equals(DelimiterType.ROW) && line.equals(delimiter))) {
      execSQL(sql.substring(0,sql.length() - delimiter.length()),out);
      sql.replace(0,sql.length(),"String_Node_Str");
    }
  }
  if (!sql.equals("String_Node_Str")) {
    execSQL(sql.toString(),out);
  }
}

Fixed version (ground truth):
/** 
 * read in lines and execute them
 * @param reader the reader contains sql lines.
 * @param out the place to output results.
 * @throws SQLException on sql problems
 * @throws IOException on io problems
 */
protected void runStatements(Reader reader,PrintStream out) throws SQLException, IOException {
  StringBuffer sql=new StringBuffer();
  String line;
  BufferedReader in=new BufferedReader(reader);
  while ((line=in.readLine()) != null) {
    if (!keepformat) {
      line=line.trim();
    }
    line=getProject().replaceProperties(line);
    if (!keepformat) {
      if (line.startsWith("String_Node_Str")) {
        continue;
      }
      if (line.startsWith("String_Node_Str")) {
        continue;
      }
      StringTokenizer st=new StringTokenizer(line);
      if (st.hasMoreTokens()) {
        String token=st.nextToken();
        if ("String_Node_Str".equalsIgnoreCase(token)) {
          continue;
        }
      }
    }
    if (!keepformat) {
      sql.append("String_Node_Str" + line);
    }
 else {
      sql.append("String_Node_Str" + line);
    }
    if (!keepformat) {
      if (line.indexOf("String_Node_Str") >= 0) {
        sql.append("String_Node_Str");
      }
    }
    if ((delimiterType.equals(DelimiterType.NORMAL) && StringUtils.endsWith(sql,delimiter)) || (delimiterType.equals(DelimiterType.ROW) && line.equals(delimiter))) {
      execSQL(sql.substring(0,sql.length() - delimiter.length()),out);
      sql.replace(0,sql.length(),"String_Node_Str");
    }
  }
  if (!sql.equals("String_Node_Str")) {
    execSQL(sql.toString(),out);
  }
}