Program: 150508
Project: 150508
Buggy source:
/** 
 * Extracted method for very similar tests with T_IDENTITY, T_IDENTITY_PK
 */
@SuppressWarnings("String_Node_Str") private <R extends TableRecord<R>>void testInsertIdentity0(Table<R> table,TableField<R,Integer> id,TableField<R,Integer> val) throws Exception {
  assertEquals(1,create().insertInto(table,val).values(10).execute());
  if (getDialect() != POSTGRES && getDialect() != DB2) {
    assertEquals(new BigInteger("String_Node_Str"),create().lastID());
  }
  R r1=create().selectFrom(table).fetchOne();
  assertEquals(1,(int)r1.getValue(id));
  assertEquals(10,(int)r1.getValue(val));
  R r2=create().insertInto(table,val).values(11).returning().fetchOne();
  if (getDialect() != POSTGRES && getDialect() != DB2) {
    assertEquals(new BigInteger("String_Node_Str"),create().lastID());
    assertEquals(new BigInteger("String_Node_Str"),create().lastID());
  }
  assertEquals(2,(int)r2.getValue(id));
  assertEquals(11,(int)r2.getValue(val));
  if (getDialect() == SYBASE || getDialect() == SQLSERVER || getDialect() == INGRES || getDialect() == H2 || getDialect() == DERBY || getDialect() == ASE) {
    log.info("String_Node_Str","String_Node_Str");
  }
 else {
    Result<R> r3=create().insertInto(table,val).values(12).values(13).returning(id).fetch();
    assertEquals(2,r3.size());
    assertNull(r3.getValue(0,val));
    assertNull(r3.getValue(1,val));
    assertEquals(3,(int)r3.getValue(0,id));
    assertEquals(4,(int)r3.getValue(1,id));
    R r4=create().newRecord(table);
    r4.setValue(val,20);
    assertEquals(1,r4.storeUsing(table.getIdentity().getField()));
    if (getDialect() != POSTGRES && getDialect() != DB2) {
      assertEquals(new BigInteger("String_Node_Str"),create().lastID());
      assertEquals(new BigInteger("String_Node_Str"),create().lastID());
    }
    R r5=create().fetchOne(table,id.equal(5));
    assertEquals(r5,r4);
  }
}

Fixed version (ground truth):
/** 
 * Extracted method for very similar tests with T_IDENTITY, T_IDENTITY_PK
 */
@SuppressWarnings("String_Node_Str") private <R extends TableRecord<R>>void testInsertIdentity0(Table<R> table,TableField<R,Integer> id,TableField<R,Integer> val) throws Exception {
  assertEquals(1,create().insertInto(table,val).values(10).execute());
  if (getDialect() != POSTGRES && getDialect() != DB2) {
    assertEquals(new BigInteger("String_Node_Str"),create().lastID());
  }
  R r1=create().selectFrom(table).fetchOne();
  assertEquals(1,(int)r1.getValue(id));
  assertEquals(10,(int)r1.getValue(val));
  R r2=create().insertInto(table,val).values(11).returning().fetchOne();
  if (getDialect() != POSTGRES && getDialect() != DB2) {
    assertEquals(new BigInteger("String_Node_Str"),create().lastID());
    assertEquals(new BigInteger("String_Node_Str"),create().lastID());
  }
  assertEquals(2,(int)r2.getValue(id));
  assertEquals(11,(int)r2.getValue(val));
  if (getDialect() == CUBRID || getDialect() == SYBASE || getDialect() == SQLSERVER || getDialect() == INGRES || getDialect() == H2 || getDialect() == DERBY || getDialect() == ASE) {
    log.info("String_Node_Str","String_Node_Str");
  }
 else {
    Result<R> r3=create().insertInto(table,val).values(12).values(13).returning(id).fetch();
    assertEquals(2,r3.size());
    assertNull(r3.getValue(0,val));
    assertNull(r3.getValue(1,val));
    assertEquals(3,(int)r3.getValue(0,id));
    assertEquals(4,(int)r3.getValue(1,id));
    R r4=create().newRecord(table);
    r4.setValue(val,20);
    assertEquals(1,r4.storeUsing(table.getIdentity().getField()));
    if (getDialect() != POSTGRES && getDialect() != DB2) {
      assertEquals(new BigInteger("String_Node_Str"),create().lastID());
      assertEquals(new BigInteger("String_Node_Str"),create().lastID());
    }
    R r5=create().fetchOne(table,id.equal(5));
    assertEquals(r5,r4);
  }
}