if (m_Instances.attribute(i).name().equals("Number_of_training_instances")) {
if (m_Instances.attribute(i).name().toLowerCase().equals("number_of_training_instances")) {
  public PairedStats calculateStatistics(Instance datasetSpecifier,					 int resultset1Index,					 int resultset2Index,					 int comparisonColumn) throws Exception {    if (m_Instances.attribute(comparisonColumn).type()	!= Attribute.NUMERIC) {      throw new Exception("Comparison column " + (comparisonColumn + 1)			  + " ("			  + m_Instances.attribute(comparisonColumn).name()			  + ") is not numeric");    }    if (!m_ResultsetsValid) {      prepareData();    }    Resultset resultset1 = (Resultset) m_Resultsets.elementAt(resultset1Index);    Resultset resultset2 = (Resultset) m_Resultsets.elementAt(resultset2Index);    FastVector dataset1 = resultset1.dataset(datasetSpecifier);    FastVector dataset2 = resultset2.dataset(datasetSpecifier);    String datasetName = templateString(datasetSpecifier);    if (dataset1 == null) {      throw new Exception("No results for dataset=" + datasetName			 + " for resultset=" + resultset1.templateString());    } else if (dataset2 == null) {      throw new Exception("No results for dataset=" + datasetName			 + " for resultset=" + resultset2.templateString());    } else if (dataset1.size() != dataset2.size()) {      throw new Exception("Results for dataset=" + datasetName			  + " differ in size for resultset="			  + resultset1.templateString()			  + " and resultset="			  + resultset2.templateString()			  );    }    // calculate the test/train ratio    double testTrainRatio = 0.0;    int trainSizeIndex = -1;    int testSizeIndex = -1;    // find the columns with the train/test sizes    for (int i=0; i<m_Instances.numAttributes(); i++) {      if (m_Instances.attribute(i).name().equals("Number_of_training_instances")) {	trainSizeIndex = i;      } else if (m_Instances.attribute(i).name().equals("Number_of_testing_instances")) {	testSizeIndex = i;      }    }    if (trainSizeIndex >= 0 && testSizeIndex >= 0) {      double totalTrainSize = 0.0;      double totalTestSize = 0.0;      for (int k = 0; k < dataset1.size(); k ++) {	Instance current = (Instance) dataset1.elementAt(k);	totalTrainSize += current.value(trainSizeIndex);	totalTestSize += current.value(testSizeIndex);      }      testTrainRatio = totalTestSize / totalTrainSize;    }    PairedStats pairedStats =      new PairedStatsCorrected(m_SignificanceLevel, testTrainRatio);    for (int k = 0; k < dataset1.size(); k ++) {      Instance current1 = (Instance) dataset1.elementAt(k);      Instance current2 = (Instance) dataset2.elementAt(k);      if (current1.isMissing(comparisonColumn)) {	throw new Exception("Instance has missing value in comparison "			    + "column!\n" + current1);      }      if (current2.isMissing(comparisonColumn)) {	throw new Exception("Instance has missing value in comparison "			    + "column!\n" + current2);      }      if (current1.value(m_RunColumn) != current2.value(m_RunColumn)) {	System.err.println("Run numbers do not match!\n"			    + current1 + current2);      }      if (m_FoldColumn != -1) {	if (current1.value(m_FoldColumn) != current2.value(m_FoldColumn)) {	  System.err.println("Fold numbers do not match!\n"			     + current1 + current2);	}      }      double value1 = current1.value(comparisonColumn);      double value2 = current2.value(comparisonColumn);      pairedStats.add(value1, value2);    }    pairedStats.calculateDerived();    return pairedStats;  }