Program: 43188
Project: 43188
Buggy source:
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isPk() && en.getPks().size() == 1)       sb.append("String_Node_Str");
      if (mf.isNotNull())       sb.append("String_Node_Str");
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(getDefaultValue(mf)).append('\'');
      if (mf.isUnsigned())       sb.append("String_Node_Str").append(mf.getColumnName()).append("String_Node_Str");
    }
    sb.append(',');
  }
  sb.setCharAt(sb.length() - 1,')');
  List<Sql> sqls=new ArrayList<Sql>();
  sqls.add(Sqls.create(sb.toString()));
  List<MappingField> pks=en.getPks();
  if (pks.size() > 1) {
    StringBuilder pkNames=new StringBuilder();
    StringBuilder pkNames2=new StringBuilder();
    for (    MappingField pk : pks) {
      pkNames.append(pk.getColumnName()).append(',');
      pkNames2.append(pk.getColumnName()).append('_');
    }
    pkNames.setLength(pkNames.length() - 1);
    pkNames2.setLength(pkNames2.length() - 1);
    String sql=String.format("String_Node_Str",en.getTableName(),pkNames2,pkNames);
    sqls.add(Sqls.create(sql));
  }
  for (  MappingField mf : en.getMappingFields()) {
    if (!mf.isAutoIncreasement())     continue;
    sqls.add(Sqls.create(gSQL(CSEQ,en.getTableName(),mf.getColumnName())));
    sqls.add(Sqls.create(gSQL(CTRI,en.getTableName(),mf.getColumnName())));
  }
  sqls.addAll(createIndexs(en));
  dao.execute(sqls.toArray(new Sql[sqls.size()]));
  createRelation(dao,en);
  addComment(dao,en);
  return true;
}

Fixed version (ground truth):
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isPk() && en.getPks().size() == 1)       sb.append("String_Node_Str");
      if (mf.isNotNull())       sb.append("String_Node_Str");
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(getDefaultValue(mf)).append('\'');
      if (mf.isUnsigned())       sb.append("String_Node_Str").append(mf.getColumnName()).append("String_Node_Str");
    }
    sb.append(',');
  }
  sb.setCharAt(sb.length() - 1,')');
  List<Sql> sqls=new ArrayList<Sql>();
  sqls.add(Sqls.create(sb.toString()));
  List<MappingField> pks=en.getPks();
  if (pks.size() > 1) {
    StringBuilder pkNames=new StringBuilder();
    for (    MappingField pk : pks) {
      pkNames.append(pk.getColumnName()).append(',');
    }
    pkNames.setLength(pkNames.length() - 1);
    String pkNames2=makePksName(en);
    String sql=String.format("String_Node_Str",en.getTableName(),pkNames2,pkNames);
    sqls.add(Sqls.create(sql));
  }
  for (  MappingField mf : en.getMappingFields()) {
    if (!mf.isAutoIncreasement())     continue;
    sqls.add(Sqls.create(gSQL(CSEQ,en.getTableName(),mf.getColumnName())));
    sqls.add(Sqls.create(gSQL(CTRI,en.getTableName(),mf.getColumnName())));
  }
  sqls.addAll(createIndexs(en));
  dao.execute(sqls.toArray(new Sql[sqls.size()]));
  createRelation(dao,en);
  addComment(dao,en);
  return true;
}