Program: 42558
Project: 42558
Buggy source:
@Override public Workflow getWorkflow(long modelId,long analysisId) throws DatabaseHandlerException {
  Connection connection=null;
  ResultSet result=null;
  PreparedStatement getStatement=null;
  try {
    Workflow mlWorkflow=new Workflow();
    mlWorkflow.setWorkflowID(modelId);
    connection=dbh.getDataSource().getConnection();
    connection.setAutoCommit(false);
    List<Feature> mlFeatures=new ArrayList<Feature>();
    getStatement=connection.prepareStatement(SQLQueries.GET_CUSTOMIZED_FEATURES);
    getStatement.setLong(1,modelId);
    result=getStatement.executeQuery();
    while (result.next()) {
      if (result.getBoolean(5) == true) {
        Feature mlFeature=new Feature();
        mlFeature.setName(result.getString(1));
        mlFeature.setIndex(result.getInt(2));
        mlFeature.setType(result.getString(3));
        mlFeature.setImputeOption(result.getString(4));
        mlFeature.setInclude(result.getBoolean(5));
        mlFeatures.add(mlFeature);
      }
    }
    mlWorkflow.setFeatures(mlFeatures);
    mlWorkflow.setAlgorithmName(getAStringModelConfiguration(analysisId,MLConstants.ALGORITHM_NAME));
    mlWorkflow.setAlgorithmClass(getAStringModelConfiguration(analysisId,MLConstants.ALGORITHM_TYPE));
    mlWorkflow.setResponseVariable(getAStringModelConfiguration(analysisId,MLConstants.RESPONSE));
    mlWorkflow.setTrainDataFraction(Double.valueOf(getAStringModelConfiguration(analysisId,MLConstants.TRAIN_DATA_FRACTION)));
    mlWorkflow.setHyperParameters(getHyperParametersOfModelAsMap(modelId));
    return mlWorkflow;
  }
 catch (  SQLException e) {
    throw new DatabaseHandlerException(e.getMessage(),e);
  }
 finally {
    MLDatabaseUtils.enableAutoCommit(connection);
    MLDatabaseUtils.closeDatabaseResources(connection,getStatement,result);
  }
}

Fixed version (ground truth):
@Override public Workflow getWorkflow(long modelId,long analysisId) throws DatabaseHandlerException {
  Connection connection=null;
  ResultSet result=null;
  PreparedStatement getStatement=null;
  try {
    Workflow mlWorkflow=new Workflow();
    mlWorkflow.setWorkflowID(modelId);
    connection=dbh.getDataSource().getConnection();
    connection.setAutoCommit(false);
    List<Feature> mlFeatures=new ArrayList<Feature>();
    getStatement=connection.prepareStatement(SQLQueries.GET_CUSTOMIZED_FEATURES);
    getStatement.setLong(1,modelId);
    result=getStatement.executeQuery();
    while (result.next()) {
      if (result.getBoolean(5) == true) {
        Feature mlFeature=new Feature();
        mlFeature.setName(result.getString(1));
        mlFeature.setIndex(result.getInt(2));
        mlFeature.setType(result.getString(3));
        mlFeature.setImputeOption(result.getString(4));
        mlFeature.setInclude(result.getBoolean(5));
        mlFeatures.add(mlFeature);
      }
    }
    mlWorkflow.setFeatures(mlFeatures);
    mlWorkflow.setAlgorithmName(getAStringModelConfiguration(analysisId,MLConstants.ALGORITHM_NAME));
    mlWorkflow.setAlgorithmClass(getAStringModelConfiguration(analysisId,MLConstants.ALGORITHM_TYPE));
    mlWorkflow.setResponseVariable(getAStringModelConfiguration(analysisId,MLConstants.RESPONSE));
    mlWorkflow.setTrainDataFraction(Double.valueOf(getAStringModelConfiguration(analysisId,MLConstants.TRAIN_DATA_FRACTION)));
    mlWorkflow.setHyperParameters(getHyperParametersOfModelAsMap(analysisId));
    return mlWorkflow;
  }
 catch (  SQLException e) {
    throw new DatabaseHandlerException(e.getMessage(),e);
  }
 finally {
    MLDatabaseUtils.enableAutoCommit(connection);
    MLDatabaseUtils.closeDatabaseResources(connection,getStatement,result);
  }
}