Program: 112427
Project: 112427
Buggy source:
protected void helpTestDeleteCoveredCol(boolean mutable,boolean localIndex) throws Exception {
  String dataTableName=generateUniqueName();
  String fullDataTableName=INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + dataTableName;
  String indexName=generateUniqueName();
  String fullIndexTableName=INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + indexName;
  Properties props=PropertiesUtil.deepCopy(TEST_PROPERTIES);
  Connection conn=DriverManager.getConnection(getUrl(),props);
  try {
    conn.setAutoCommit(false);
    createDataTable(conn,fullDataTableName,mutable ? "String_Node_Str" : "String_Node_Str");
    populateDataTable(conn,fullDataTableName);
    String ddl="String_Node_Str" + (localIndex ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ indexName+ "String_Node_Str"+ fullDataTableName+ "String_Node_Str"+ "String_Node_Str";
    PreparedStatement stmt=conn.prepareStatement(ddl);
    stmt.execute();
    ResultSet rs;
    rs=conn.createStatement().executeQuery("String_Node_Str" + fullDataTableName);
    assertTrue(rs.next());
    assertEquals(2,rs.getInt(1));
    rs=conn.createStatement().executeQuery("String_Node_Str" + fullIndexTableName);
    assertTrue(rs.next());
    assertEquals(2,rs.getInt(1));
    String dml="String_Node_Str" + fullDataTableName + "String_Node_Str";
    assertEquals(1,conn.createStatement().executeUpdate(dml));
    conn.commit();
    String query="String_Node_Str" + fullDataTableName;
    rs=conn.createStatement().executeQuery(query);
    assertTrue(rs.next());
    assertEquals(1L,rs.getLong(1));
    assertEquals("String_Node_Str",rs.getString(2));
    assertEquals(2L,rs.getLong(3));
    assertEquals("String_Node_Str",rs.getString(4));
    assertFalse(rs.next());
    query="String_Node_Str" + fullDataTableName;
    rs=conn.createStatement().executeQuery(query);
    assertTrue(rs.next());
    assertEquals(1L,rs.getLong(1));
    assertEquals("String_Node_Str",rs.getString(2));
    assertEquals(2L,rs.getLong(3));
    assertEquals("String_Node_Str",rs.getString(4));
    assertFalse(rs.next());
    query="String_Node_Str" + fullIndexTableName;
    rs=conn.createStatement().executeQuery(query);
    assertTrue(rs.next());
    assertEquals(1L,rs.getLong(1));
    assertEquals("String_Node_Str",rs.getString(2));
    assertEquals(2L,rs.getLong(3));
    assertEquals("String_Node_Str",rs.getString(4));
    assertFalse(rs.next());
    conn.createStatement().execute("String_Node_Str" + indexName + "String_Node_Str"+ fullDataTableName);
  }
  finally {
    conn.close();
  }
}

Fixed version (ground truth):
protected void helpTestDeleteCoveredCol(boolean mutable,boolean localIndex) throws Exception {
  String dataTableName=generateUniqueName();
  String fullDataTableName=INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + dataTableName;
  String indexName=generateUniqueName();
  String fullIndexTableName=INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + indexName;
  Properties props=PropertiesUtil.deepCopy(TEST_PROPERTIES);
  Connection conn=DriverManager.getConnection(getUrl(),props);
  try {
    conn.setAutoCommit(false);
    createDataTable(conn,fullDataTableName,mutable ? "String_Node_Str" : "String_Node_Str");
    populateDataTable(conn,fullDataTableName);
    String ddl="String_Node_Str" + (localIndex ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ indexName+ "String_Node_Str"+ fullDataTableName+ "String_Node_Str"+ "String_Node_Str";
    conn.createStatement().execute(ddl);
    ResultSet rs;
    rs=conn.createStatement().executeQuery("String_Node_Str" + fullDataTableName);
    assertTrue(rs.next());
    assertEquals(2,rs.getInt(1));
    rs=conn.createStatement().executeQuery("String_Node_Str" + fullIndexTableName);
    assertTrue(rs.next());
    assertEquals(2,rs.getInt(1));
    String dml="String_Node_Str" + fullDataTableName + "String_Node_Str";
    assertEquals(1,conn.createStatement().executeUpdate(dml));
    conn.commit();
    String query="String_Node_Str" + fullDataTableName;
    rs=conn.createStatement().executeQuery(query);
    assertTrue(rs.next());
    assertEquals(1L,rs.getLong(1));
    assertEquals("String_Node_Str",rs.getString(2));
    assertEquals(2L,rs.getLong(3));
    assertEquals("String_Node_Str",rs.getString(4));
    assertFalse(rs.next());
    query="String_Node_Str" + fullDataTableName;
    rs=conn.createStatement().executeQuery(query);
    assertTrue(rs.next());
    assertEquals(1L,rs.getLong(1));
    assertEquals("String_Node_Str",rs.getString(2));
    assertEquals(2L,rs.getLong(3));
    assertEquals("String_Node_Str",rs.getString(4));
    assertFalse(rs.next());
    query="String_Node_Str" + fullIndexTableName;
    rs=conn.createStatement().executeQuery(query);
    assertTrue(rs.next());
    assertEquals(1L,rs.getLong(1));
    assertEquals("String_Node_Str",rs.getString(2));
    assertEquals(2L,rs.getLong(3));
    assertEquals("String_Node_Str",rs.getString(4));
    assertFalse(rs.next());
    conn.createStatement().execute("String_Node_Str" + indexName + "String_Node_Str"+ fullDataTableName);
  }
  finally {
    conn.close();
  }
}