Program: 56835
Project: 56835
Buggy source:
private DataSetDescription setUpClusteredMatrixData(EDataSetType type,IDSpecification rowIDSpecification,IDSpecification columnIDSpecification,Pair<File,Boolean> pair){
  if (pair == null || pair.getFirst() == null)   return null;
  final File matrixFile=pair.getFirst();
  final boolean loadFullGenes=pair.getSecond();
  DataSetDescription dataSet=new DataSetDescription(ECreateDefaultProperties.NUMERICAL);
  dataSet.setDataSetName(dataSetName);
  dataSet.setColor(dataSetType.getColor());
  dataSet.setDataSourcePath(matrixFile.getPath());
  if (!loadFullGenes) {
    dataSet.setNumberOfHeaderLines(3);
    dataSet.getDataDescription().getNumericalProperties().setDataCenter(0d);
  }
 else {
    dataSet.setNumberOfHeaderLines(2);
    dataSet.setRowOfColumnIDs(0);
  }
  ParsingRule parsingRule=new ParsingRule();
  parsingRule.setFromColumn(2);
  parsingRule.setParseUntilEnd(true);
  parsingRule.setColumnDescripton(new ColumnDescription());
  dataSet.addParsingRule(parsingRule);
  dataSet.setTransposeMatrix(true);
  dataSet.setRowIDSpecification(rowIDSpecification);
  dataSet.setColumnIDSpecification(columnIDSpecification);
  File cnmfGroupingFile=fileFinder.findCNMFGroupingFile(type);
  if (cnmfGroupingFile != null) {
    GroupingParseSpecification grouping=new GroupingParseSpecification(cnmfGroupingFile.getPath());
    grouping.setContainsColumnIDs(false);
    grouping.setRowIDSpecification(columnIDSpecification);
    grouping.setGroupingName("String_Node_Str");
    dataSet.addColumnGroupingSpecification(grouping);
  }
 else {
    System.out.println("String_Node_Str");
  }
  File hierarchicalGroupingFile=fileFinder.findHiearchicalGrouping(type);
  if (hierarchicalGroupingFile != null) {
    GroupingParseSpecification grouping=new GroupingParseSpecification(hierarchicalGroupingFile.getPath());
    grouping.setContainsColumnIDs(false);
    grouping.setRowIDSpecification(columnIDSpecification);
    grouping.setGroupingName("String_Node_Str");
    dataSet.addColumnGroupingSpecification(grouping);
  }
 else {
    System.out.println("String_Node_Str");
  }
  DataProcessingDescription dataProcessingDescription=new DataProcessingDescription();
  dataSet.setDataProcessingDescription(dataProcessingDescription);
  ClusterConfiguration clusterConfiguration=new ClusterConfiguration();
  clusterConfiguration.setDistanceMeasure(EDistanceMeasure.EUCLIDEAN_DISTANCE);
switch (settings.getCluster()) {
case NONE:
    break;
case AFFINITY:
  AffinityClusterConfiguration affinityAlgo=new AffinityClusterConfiguration();
affinityAlgo.setClusterFactor(9);
affinityAlgo.setCacheVectors(true);
clusterConfiguration.setClusterAlgorithmConfiguration(affinityAlgo);
dataProcessingDescription.addRowClusterConfiguration(clusterConfiguration);
break;
case KMEANS:
KMeansClusterConfiguration kMeansAlgo=new KMeansClusterConfiguration();
kMeansAlgo.setNumberOfClusters(5);
kMeansAlgo.setCacheVectors(true);
clusterConfiguration.setClusterAlgorithmConfiguration(kMeansAlgo);
dataProcessingDescription.addRowClusterConfiguration(clusterConfiguration);
break;
case TREE:
TreeClusterConfiguration treeAlgo=new TreeClusterConfiguration();
treeAlgo.setTreeClustererAlgo(ETreeClustererAlgo.AVERAGE_LINKAGE);
clusterConfiguration.setClusterAlgorithmConfiguration(treeAlgo);
dataProcessingDescription.addRowClusterConfiguration(clusterConfiguration);
break;
default :
log.log(Level.ALL,"String_Node_Str" + settings.getCluster());
}
dataProcessingDescription.addRowClusterConfiguration(clusterConfiguration);
if (loadFullGenes) {
NumericalProperties numProp=dataSet.getDataDescription().getNumericalProperties();
numProp.setzScoreNormalization(NumericalProperties.ZSCORE_ROWS);
numProp.setClipToStdDevFactor(4f);
dataProcessingDescription.setNrRowsInSample(1500);
}
return dataSet;
}

Fixed version (ground truth):
private DataSetDescription setUpClusteredMatrixData(EDataSetType type,IDSpecification rowIDSpecification,IDSpecification columnIDSpecification,Pair<File,Boolean> pair){
  if (pair == null || pair.getFirst() == null)   return null;
  final File matrixFile=pair.getFirst();
  final boolean loadFullGenes=pair.getSecond();
  DataSetDescription dataSet=new DataSetDescription(ECreateDefaultProperties.NUMERICAL);
  dataSet.setDataSetName(dataSetName);
  dataSet.setColor(dataSetType.getColor());
  dataSet.setDataSourcePath(matrixFile.getPath());
  if (!loadFullGenes) {
    dataSet.setNumberOfHeaderLines(3);
    dataSet.getDataDescription().getNumericalProperties().setDataCenter(0d);
  }
 else {
    dataSet.setNumberOfHeaderLines(2);
    dataSet.setRowOfColumnIDs(0);
  }
  ParsingRule parsingRule=new ParsingRule();
  parsingRule.setFromColumn(2);
  parsingRule.setParseUntilEnd(true);
  parsingRule.setColumnDescripton(new ColumnDescription());
  dataSet.addParsingRule(parsingRule);
  dataSet.setTransposeMatrix(true);
  dataSet.setRowIDSpecification(rowIDSpecification);
  dataSet.setColumnIDSpecification(columnIDSpecification);
  File cnmfGroupingFile=fileFinder.findCNMFGroupingFile(type);
  if (cnmfGroupingFile != null) {
    GroupingParseSpecification grouping=new GroupingParseSpecification(cnmfGroupingFile.getPath());
    grouping.setContainsColumnIDs(false);
    grouping.setRowIDSpecification(columnIDSpecification);
    grouping.setGroupingName("String_Node_Str");
    dataSet.addColumnGroupingSpecification(grouping);
  }
 else {
    System.out.println("String_Node_Str");
  }
  File hierarchicalGroupingFile=fileFinder.findHiearchicalGrouping(type);
  if (hierarchicalGroupingFile != null) {
    GroupingParseSpecification grouping=new GroupingParseSpecification(hierarchicalGroupingFile.getPath());
    grouping.setContainsColumnIDs(false);
    grouping.setRowIDSpecification(columnIDSpecification);
    grouping.setGroupingName("String_Node_Str");
    dataSet.addColumnGroupingSpecification(grouping);
  }
 else {
    System.out.println("String_Node_Str");
  }
  DataProcessingDescription dataProcessingDescription=new DataProcessingDescription();
  dataSet.setDataProcessingDescription(dataProcessingDescription);
  ClusterConfiguration clusterConfiguration=new ClusterConfiguration();
  clusterConfiguration.setDistanceMeasure(EDistanceMeasure.EUCLIDEAN_DISTANCE);
switch (settings.getCluster()) {
case NONE:
    break;
case AFFINITY:
  AffinityClusterConfiguration affinityAlgo=new AffinityClusterConfiguration();
affinityAlgo.setClusterFactor(9);
affinityAlgo.setCacheVectors(true);
clusterConfiguration.setClusterAlgorithmConfiguration(affinityAlgo);
dataProcessingDescription.addRowClusterConfiguration(clusterConfiguration);
break;
case KMEANS:
KMeansClusterConfiguration kMeansAlgo=new KMeansClusterConfiguration();
kMeansAlgo.setNumberOfClusters(5);
kMeansAlgo.setCacheVectors(true);
clusterConfiguration.setClusterAlgorithmConfiguration(kMeansAlgo);
dataProcessingDescription.addRowClusterConfiguration(clusterConfiguration);
break;
case TREE:
TreeClusterConfiguration treeAlgo=new TreeClusterConfiguration();
treeAlgo.setTreeClustererAlgo(ETreeClustererAlgo.AVERAGE_LINKAGE);
clusterConfiguration.setClusterAlgorithmConfiguration(treeAlgo);
dataProcessingDescription.addRowClusterConfiguration(clusterConfiguration);
break;
default :
log.log(Level.ALL,"String_Node_Str" + settings.getCluster());
break;
}
if (loadFullGenes) {
NumericalProperties numProp=dataSet.getDataDescription().getNumericalProperties();
numProp.setzScoreNormalization(NumericalProperties.ZSCORE_ROWS);
numProp.setClipToStdDevFactor(4f);
dataProcessingDescription.setNrRowsInSample(1500);
}
return dataSet;
}