Program: 84506
Project: 84506
Buggy source:
/** 
 * creates a concept
 * @param connection a DatabaseConnection
 * @param conceptName the name of the concept to create
 * @throws CustomChangeException
 */
private void createConcept(DatabaseConnection connection,String conceptName) throws CustomChangeException {
  PreparedStatement updateStatement=null;
  try {
    final int conceptId=getInt(connection,"String_Node_Str");
    updateStatement=connection.prepareStatement("String_Node_Str");
    updateStatement.setInt(1,conceptId);
    updateStatement.setString(2,UUID.randomUUID().toString());
    updateStatement.executeUpdate();
    final int conceptNameId=getInt(connection,"String_Node_Str");
    updateStatement=connection.prepareStatement("String_Node_Str");
    updateStatement.setInt(1,conceptNameId);
    updateStatement.setInt(2,conceptId);
    updateStatement.setString(3,conceptName);
    updateStatement.setString(4,UUID.randomUUID().toString());
    updateStatement.executeUpdate();
    updateStatement=connection.prepareStatement("String_Node_Str");
    updateStatement.setInt(1,conceptNameId);
    updateStatement.executeUpdate();
    updateStatement=connection.prepareStatement("String_Node_Str");
    updateStatement.setInt(1,conceptId);
    updateStatement.setString(2,conceptName);
    updateStatement.setInt(3,conceptNameId);
    updateStatement.executeUpdate();
  }
 catch (  SQLException e) {
    throw new CustomChangeException("String_Node_Str" + conceptName,e);
  }
 finally {
    if (updateStatement != null) {
      try {
        updateStatement.close();
      }
 catch (      SQLException e) {
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * creates a concept
 * @param connection a DatabaseConnection
 * @param conceptName the name of the concept to create
 * @throws CustomChangeException
 */
private void createConcept(DatabaseConnection connection,String conceptName) throws CustomChangeException {
  PreparedStatement updateStatement=null;
  try {
    int conceptId=getInt(connection,"String_Node_Str");
    conceptId++;
    updateStatement=connection.prepareStatement("String_Node_Str");
    updateStatement.setInt(1,conceptId);
    updateStatement.setString(2,UUID.randomUUID().toString());
    updateStatement.executeUpdate();
    int conceptNameId=getInt(connection,"String_Node_Str");
    conceptNameId++;
    updateStatement=connection.prepareStatement("String_Node_Str");
    updateStatement.setInt(1,conceptNameId);
    updateStatement.setInt(2,conceptId);
    updateStatement.setString(3,conceptName);
    updateStatement.setString(4,UUID.randomUUID().toString());
    updateStatement.executeUpdate();
    updateStatement=connection.prepareStatement("String_Node_Str");
    updateStatement.setInt(1,conceptNameId);
    updateStatement.executeUpdate();
    updateStatement=connection.prepareStatement("String_Node_Str");
    updateStatement.setInt(1,conceptId);
    updateStatement.setString(2,conceptName);
    updateStatement.setInt(3,conceptNameId);
    updateStatement.executeUpdate();
  }
 catch (  SQLException e) {
    throw new CustomChangeException("String_Node_Str" + conceptName,e);
  }
 finally {
    if (updateStatement != null) {
      try {
        updateStatement.close();
      }
 catch (      SQLException e) {
      }
    }
  }
}