Program: 67653
Project: 67653
Buggy source:
protected SQLCall buildSimple(AbstractSession session){
  SQLCall call=new SQLCall();
  call.returnNothing();
  Writer writer=new CharArrayWriter(100);
  ExpressionSQLPrinter printer=new ExpressionSQLPrinter(session,getTranslationRow(),call,false);
  printer.setWriter(writer);
  try {
    writer.write("String_Node_Str");
    if (getHintString() != null) {
      writer.write(getHintString());
      writer.write("String_Node_Str");
    }
    writer.write(getTable().getQualifiedName());
    writer.write("String_Node_Str");
    Iterator i=m_updateClauses.keySet().iterator();
    boolean commaNeeded=false;
    while (i.hasNext()) {
      if (commaNeeded) {
        writer.write("String_Node_Str");
      }
      DatabaseField field=(DatabaseField)i.next();
      Object value=m_updateClauses.get(field);
      writer.write(field.getName());
      writer.write("String_Node_Str");
      if (value instanceof Expression) {
        printer.printExpression((Expression)value);
      }
 else {
        SQLCall selCall=(SQLCall)value;
        String tableAlias=(String)getDatabaseFieldsToTableAliases().get(field);
        writer.write("String_Node_Str");
        writeSelect(writer,selCall,tableAlias,call);
        writer.write("String_Node_Str");
      }
      commaNeeded=true;
    }
    if (getWhereClause() != null) {
      writer.write("String_Node_Str");
      printer.printExpression(getWhereClause());
    }
    call.setSQLString(writer.toString());
    return call;
  }
 catch (  IOException exception) {
    throw ValidationException.fileError(exception);
  }
}

Fixed version (ground truth):
protected SQLCall buildSimple(AbstractSession session){
  SQLCall call=new SQLCall();
  call.returnNothing();
  Writer writer=new CharArrayWriter(100);
  ExpressionSQLPrinter printer=new ExpressionSQLPrinter(session,getTranslationRow(),call,false,getBuilder());
  printer.setWriter(writer);
  try {
    writer.write("String_Node_Str");
    if (getHintString() != null) {
      writer.write(getHintString());
      writer.write("String_Node_Str");
    }
    writer.write(getTable().getQualifiedName());
    writer.write("String_Node_Str");
    Iterator i=m_updateClauses.keySet().iterator();
    boolean commaNeeded=false;
    while (i.hasNext()) {
      if (commaNeeded) {
        writer.write("String_Node_Str");
      }
      DatabaseField field=(DatabaseField)i.next();
      Object value=m_updateClauses.get(field);
      writer.write(field.getName());
      writer.write("String_Node_Str");
      if (value instanceof Expression) {
        printer.printExpression((Expression)value);
      }
 else {
        SQLCall selCall=(SQLCall)value;
        String tableAlias=(String)getDatabaseFieldsToTableAliases().get(field);
        writer.write("String_Node_Str");
        writeSelect(writer,selCall,tableAlias,call);
        writer.write("String_Node_Str");
      }
      commaNeeded=true;
    }
    if (getWhereClause() != null) {
      writer.write("String_Node_Str");
      printer.printExpression(getWhereClause());
    }
    call.setSQLString(writer.toString());
    return call;
  }
 catch (  IOException exception) {
    throw ValidationException.fileError(exception);
  }
}