Program: 50898
Project: 50898
Buggy source:
/** 
 * Creates a TestSuite to test the whole of mondrian. Methods with the signature <code>public static Test suite()</code> are recognized automatically by JUnit test-harnesses; see   {@link TestSuite}.
 * @return test suite
 * @throws Exception on error
 */
public static Test suite() throws Exception {
  MondrianProperties properties=MondrianProperties.instance();
  String testName=properties.TestName.get();
  String testClass=properties.TestClass.get();
  System.out.println("String_Node_Str" + testName);
  System.out.println("String_Node_Str" + testClass);
  System.out.println("String_Node_Str" + System.getProperty("String_Node_Str"));
  TestSuite suite=new TestSuite();
  if (testClass != null && !testClass.equals("String_Node_Str")) {
    Class<? extends TestCase> clazz=(Class<? extends TestCase>)Class.forName(testClass);
    boolean matchTestMethods=false;
    if (Test.class.isAssignableFrom(clazz)) {
      Method[] methods=clazz.getMethods();
      for (int i=0; i < methods.length && !matchTestMethods; i++) {
        matchTestMethods=methods[i].getName().startsWith("String_Node_Str");
      }
    }
    if (matchTestMethods) {
      addTest(suite,clazz);
    }
 else {
      Method method=clazz.getMethod("String_Node_Str",new Class[0]);
      TestCase target;
      if (Modifier.isStatic(method.getModifiers())) {
        target=null;
      }
 else {
        target=clazz.newInstance();
      }
      Object o=method.invoke(target);
      addTest(suite,(Test)o,clazz.getName() + method.getName());
    }
  }
 else {
    if (RUN_OPTIONAL_TESTS) {
      addTest(suite,SegmentLoaderTest.class);
      addTest(suite,AggGenTest.class);
      addTest(suite,DefaultRuleTest.class);
      addTest(suite,SelectNotInGroupByTest.class);
      addTest(suite,CVConcurrentMdxTest.class);
      addTest(suite,CacheHitTest.class);
      addTest(suite,ConcurrentMdxTest.class);
      addTest(suite,MemHungryTest.class,"String_Node_Str");
      addTest(suite,MultiDimTest.class,"String_Node_Str");
      addTest(suite,MultiDimVCTest.class,"String_Node_Str");
      addTest(suite,MultiLevelTest.class,"String_Node_Str");
      addTest(suite,MultiLevelVCTest.class,"String_Node_Str");
      addTest(suite,PartialCacheTest.class,"String_Node_Str");
      addTest(suite,PartialCacheVCTest.class,"String_Node_Str");
      addTest(suite,QueryAllTest.class,"String_Node_Str");
      addTest(suite,QueryAllVCTest.class,"String_Node_Str");
      addTest(suite,Base64Test.class);
      return suite;
    }
    addTest(suite,NativeFilterMatchingTest.class);
    addTest(suite,RolapConnectionTest.class);
    addTest(suite,FilteredIterableTest.class);
    addTest(suite,HighDimensionsTest.class);
    addTest(suite,IndexedValuesTest.class);
    addTest(suite,MemoryMonitorTest.class);
    addTest(suite,ObjectPoolTest.class);
    addTest(suite,Ssas2005CompatibilityTest.OldBehaviorTest.class);
    addTest(suite,DialectTest.class);
    addTest(suite,ResultComparatorTest.class,"String_Node_Str");
    addTest(suite,DrillThroughTest.class);
    addTest(suite,ScenarioTest.class);
    addTest(suite,BasicQueryTest.class);
    addTest(suite,SegmentCacheTest.class);
    addTest(suite,CVBasicTest.class,"String_Node_Str");
    addTest(suite,GrandTotalTest.class,"String_Node_Str");
    addTest(suite,HangerDimensionTest.class,"String_Node_Str");
    addTest(suite,MetricFilterTest.class,"String_Node_Str");
    addTest(suite,MiscTest.class,"String_Node_Str");
    addTest(suite,PredicateFilterTest.class,"String_Node_Str");
    addTest(suite,SubTotalTest.class,"String_Node_Str");
    addTest(suite,SummaryMetricPercentTest.class,"String_Node_Str");
    addTest(suite,SummaryTest.class,"String_Node_Str");
    addTest(suite,TopBottomTest.class,"String_Node_Str");
    addTest(suite,OrderTest.class,"String_Node_Str");
    addTest(suite,CacheControlTest.class);
    addTest(suite,MemberCacheControlTest.class);
    addTest(suite,FunctionTest.class);
    addTest(suite,CurrentDateMemberUdfTest.class);
    addTest(suite,PartialSortTest.class);
    addTest(suite,VbaTest.class);
    addTest(suite,ExcelTest.class);
    addTest(suite,HierarchyBugTest.class);
    addTest(suite,ScheduleTest.class);
    addTest(suite,UtilTestCase.class);
    addTest(suite,PartiallyOrderedSetTest.class);
    addTest(suite,Olap4jTest.class);
    addTest(suite,SortTest.class);
    if (isRunOnce()) {
      addTest(suite,TestAggregationManager.class);
    }
    addTest(suite,VirtualCubeTest.class);
    addTest(suite,ParameterTest.class);
    addTest(suite,AccessControlTest.class);
    addTest(suite,ParserTest.class);
    addTest(suite,CustomizedParserTest.class);
    addTest(suite,SolveOrderScopeIsolationTest.class);
    addTest(suite,ParentChildHierarchyTest.class);
    addTest(suite,Olap4jTckTest.class,"String_Node_Str");
    addTest(suite,MondrianServerTest.class);
    addTest(suite,XmlaBasicTest.class);
    addTest(suite,XmlaMetaDataConstraintsTest.class);
    addTest(suite,XmlaErrorTest.class);
    addTest(suite,XmlaExcel2000Test.class);
    addTest(suite,XmlaExcelXPTest.class);
    addTest(suite,XmlaExcel2007Test.class);
    addTest(suite,XmlaCognosTest.class);
    addTest(suite,XmlaTabularTest.class);
    addTest(suite,XmlaTests.class);
    addTest(suite,DynamicDatasourceXmlaServletTest.class);
    addTest(suite,XmlaTest.class,"String_Node_Str");
    if (isRunOnce()) {
      addTest(suite,TestCalculatedMembers.class);
    }
    addTest(suite,CompoundSlicerTest.class);
    addTest(suite,RaggedHierarchyTest.class);
    addTest(suite,NonEmptyPropertyForAllAxisTest.class);
    addTest(suite,InlineTableTest.class);
    addTest(suite,CompatibilityTest.class);
    addTest(suite,CaptionTest.class);
    addTest(suite,UdfTest.class);
    addTest(suite,NullValueTest.class);
    addTest(suite,NamedSetTest.class);
    addTest(suite,PropertiesTest.class);
    addTest(suite,MultipleHierarchyTest.class);
    addTest(suite,I18nTest.class);
    addTest(suite,FormatTest.class);
    addTest(suite,ParallelTest.class);
    addTest(suite,SchemaTest.class);
    addTest(suite,PerformanceTest.class);
    addTest(suite,GroupingSetQueryTest.class);
    addTest(suite,CmdRunnerTest.class);
    addTest(suite,DataSourceChangeListenerTest.class);
    addTest(suite,ModulosTest.class);
    addTest(suite,PrimeFinderTest.class);
    addTest(suite,CellKeyTest.class);
    addTest(suite,RolapAxisTest.class);
    addTest(suite,CrossJoinTest.class);
    if (Bug.BugMondrian503Fixed) {
      addTest(suite,RolapResultTest.class);
    }
    addTest(suite,ConstantCalcTest.class);
    addTest(suite,SharedDimensionTest.class);
    addTest(suite,CellPropertyTest.class);
    addTest(suite,QueryTest.class);
    addTest(suite,RolapSchemaReaderTest.class);
    addTest(suite,RolapCubeTest.class);
    addTest(suite,RolapStarTest.class);
    addTest(suite,NullMemberRepresentationTest.class);
    addTest(suite,IgnoreUnrelatedDimensionsTest.class);
    addTest(suite,IgnoreMeasureForNonJoiningDimensionInAggregationTest.class);
    addTest(suite,SetFunDefTest.class);
    addTest(suite,VisualTotalsTest.class);
    addTest(suite,AggregationOnDistinctCountMeasuresTest.class);
    addTest(suite,NonCollapsedAggTest.class);
    addTest(suite,BitKeyTest.class);
    addTest(suite,TypeTest.class);
    addTest(suite,SteelWheelsSchemaTest.class);
    addTest(suite,MultipleColsInTupleAggTest.class);
    addTest(suite,DynamicSchemaProcessorTest.class);
    addTest(suite,MonitorTest.class);
    addTest(suite,CodeComplianceTest.class);
    boolean testNonEmpty=isRunOnce();
    if (!MondrianProperties.instance().EnableNativeNonEmpty.get()) {
      testNonEmpty=false;
    }
    if (!MondrianProperties.instance().EnableNativeCrossJoin.get()) {
      testNonEmpty=false;
    }
    if (testNonEmpty) {
      addTest(suite,NonEmptyTest.class);
      addTest(suite,FilterTest.class);
      addTest(suite,NativizeSetFunDefTest.class);
    }
 else {
      logger.warn("String_Node_Str");
    }
    addTest(suite,FastBatchingCellReaderTest.class);
    addTest(suite,SqlQueryTest.class);
    if (MondrianProperties.instance().EnableNativeCrossJoin.get()) {
      addTest(suite,BatchedFillTest.class,"String_Node_Str");
    }
 else {
      logger.warn("String_Node_Str");
    }
  }
  if (testName != null && !testName.equals("String_Node_Str")) {
    Pattern testPattern=Pattern.compile(testName);
    suite=copySuite(suite,testPattern);
  }
  String testInfo=testSuiteInfo.get(suite);
  if (testInfo != null && testInfo.length() > 0) {
    System.out.println(testInfo);
  }
 else {
    System.out.println("String_Node_Str");
  }
  System.out.flush();
  return suite;
}

Fixed version (ground truth):
/** 
 * Creates a TestSuite to test the whole of mondrian. Methods with the signature <code>public static Test suite()</code> are recognized automatically by JUnit test-harnesses; see   {@link TestSuite}.
 * @return test suite
 * @throws Exception on error
 */
public static Test suite() throws Exception {
  MondrianProperties properties=MondrianProperties.instance();
  String testName=properties.TestName.get();
  String testClass=properties.TestClass.get();
  System.out.println("String_Node_Str" + testName);
  System.out.println("String_Node_Str" + testClass);
  System.out.println("String_Node_Str" + System.getProperty("String_Node_Str"));
  TestSuite suite=new TestSuite();
  if (testClass != null && !testClass.equals("String_Node_Str")) {
    Class<? extends TestCase> clazz=(Class<? extends TestCase>)Class.forName(testClass);
    boolean matchTestMethods=false;
    if (Test.class.isAssignableFrom(clazz)) {
      Method[] methods=clazz.getMethods();
      for (int i=0; i < methods.length && !matchTestMethods; i++) {
        matchTestMethods=methods[i].getName().startsWith("String_Node_Str");
      }
    }
    if (matchTestMethods) {
      addTest(suite,clazz);
    }
 else {
      Method method=clazz.getMethod("String_Node_Str",new Class[0]);
      TestCase target;
      if (Modifier.isStatic(method.getModifiers())) {
        target=null;
      }
 else {
        target=clazz.newInstance();
      }
      Object o=method.invoke(target);
      addTest(suite,(Test)o,clazz.getName() + method.getName());
    }
  }
 else {
    if (RUN_OPTIONAL_TESTS) {
      addTest(suite,SegmentLoaderTest.class);
      addTest(suite,AggGenTest.class);
      addTest(suite,DefaultRuleTest.class);
      addTest(suite,SelectNotInGroupByTest.class);
      addTest(suite,CVConcurrentMdxTest.class);
      addTest(suite,CacheHitTest.class);
      addTest(suite,ConcurrentMdxTest.class);
      addTest(suite,MemHungryTest.class,"String_Node_Str");
      addTest(suite,MultiDimTest.class,"String_Node_Str");
      addTest(suite,MultiDimVCTest.class,"String_Node_Str");
      addTest(suite,MultiLevelTest.class,"String_Node_Str");
      addTest(suite,MultiLevelVCTest.class,"String_Node_Str");
      addTest(suite,PartialCacheTest.class,"String_Node_Str");
      addTest(suite,PartialCacheVCTest.class,"String_Node_Str");
      addTest(suite,QueryAllTest.class,"String_Node_Str");
      addTest(suite,QueryAllVCTest.class,"String_Node_Str");
      addTest(suite,Base64Test.class);
      return suite;
    }
    addTest(suite,NativeFilterMatchingTest.class);
    addTest(suite,RolapConnectionTest.class);
    addTest(suite,FilteredIterableTest.class);
    addTest(suite,HighDimensionsTest.class);
    addTest(suite,IndexedValuesTest.class);
    addTest(suite,MemoryMonitorTest.class);
    addTest(suite,ObjectPoolTest.class);
    addTest(suite,Ssas2005CompatibilityTest.OldBehaviorTest.class);
    addTest(suite,DialectTest.class);
    addTest(suite,ResultComparatorTest.class,"String_Node_Str");
    addTest(suite,DrillThroughTest.class);
    addTest(suite,ScenarioTest.class);
    addTest(suite,BasicQueryTest.class);
    addTest(suite,SegmentCacheTest.class);
    addTest(suite,CVBasicTest.class,"String_Node_Str");
    addTest(suite,GrandTotalTest.class,"String_Node_Str");
    addTest(suite,HangerDimensionTest.class,"String_Node_Str");
    addTest(suite,MetricFilterTest.class,"String_Node_Str");
    addTest(suite,MiscTest.class,"String_Node_Str");
    addTest(suite,PredicateFilterTest.class,"String_Node_Str");
    addTest(suite,SubTotalTest.class,"String_Node_Str");
    addTest(suite,SummaryMetricPercentTest.class,"String_Node_Str");
    addTest(suite,SummaryTest.class,"String_Node_Str");
    addTest(suite,TopBottomTest.class,"String_Node_Str");
    addTest(suite,OrderTest.class,"String_Node_Str");
    addTest(suite,CacheControlTest.class);
    addTest(suite,MemberCacheControlTest.class);
    addTest(suite,FunctionTest.class);
    addTest(suite,CurrentDateMemberUdfTest.class);
    addTest(suite,PartialSortTest.class);
    addTest(suite,VbaTest.class);
    addTest(suite,ExcelTest.class);
    addTest(suite,HierarchyBugTest.class);
    addTest(suite,ScheduleTest.class);
    addTest(suite,UtilTestCase.class);
    addTest(suite,PartiallyOrderedSetTest.class);
    addTest(suite,Olap4jTest.class);
    addTest(suite,SortTest.class);
    if (isRunOnce()) {
      addTest(suite,TestAggregationManager.class);
    }
    addTest(suite,VirtualCubeTest.class);
    addTest(suite,ParameterTest.class);
    addTest(suite,AccessControlTest.class);
    addTest(suite,ParserTest.class);
    addTest(suite,CustomizedParserTest.class);
    addTest(suite,SolveOrderScopeIsolationTest.class);
    addTest(suite,ParentChildHierarchyTest.class);
    addTest(suite,Olap4jTckTest.class,"String_Node_Str");
    addTest(suite,MondrianServerTest.class);
    addTest(suite,XmlaBasicTest.class);
    addTest(suite,XmlaMetaDataConstraintsTest.class);
    addTest(suite,XmlaErrorTest.class);
    addTest(suite,XmlaExcel2000Test.class);
    addTest(suite,XmlaExcelXPTest.class);
    addTest(suite,XmlaExcel2007Test.class);
    addTest(suite,XmlaCognosTest.class);
    addTest(suite,XmlaTabularTest.class);
    addTest(suite,XmlaTests.class);
    addTest(suite,DynamicDatasourceXmlaServletTest.class);
    addTest(suite,XmlaTest.class,"String_Node_Str");
    if (isRunOnce()) {
      addTest(suite,TestCalculatedMembers.class);
    }
    addTest(suite,CompoundSlicerTest.class);
    addTest(suite,RaggedHierarchyTest.class);
    addTest(suite,NonEmptyPropertyForAllAxisTest.class);
    addTest(suite,InlineTableTest.class);
    addTest(suite,CompatibilityTest.class);
    addTest(suite,CaptionTest.class);
    addTest(suite,UdfTest.class);
    addTest(suite,NullValueTest.class);
    addTest(suite,NamedSetTest.class);
    addTest(suite,PropertiesTest.class);
    addTest(suite,MultipleHierarchyTest.class);
    addTest(suite,I18nTest.class);
    addTest(suite,FormatTest.class);
    addTest(suite,ParallelTest.class);
    addTest(suite,SchemaTest.class);
    addTest(suite,PerformanceTest.class);
    addTest(suite,GroupingSetQueryTest.class);
    addTest(suite,CmdRunnerTest.class);
    addTest(suite,DataSourceChangeListenerTest.class);
    addTest(suite,ModulosTest.class);
    addTest(suite,PrimeFinderTest.class);
    addTest(suite,CellKeyTest.class);
    addTest(suite,RolapAxisTest.class);
    addTest(suite,CrossJoinTest.class);
    if (Bug.BugMondrian503Fixed) {
      addTest(suite,RolapResultTest.class);
    }
    addTest(suite,ConstantCalcTest.class);
    addTest(suite,SharedDimensionTest.class);
    addTest(suite,CellPropertyTest.class);
    addTest(suite,QueryTest.class);
    addTest(suite,RolapSchemaReaderTest.class);
    addTest(suite,RolapCubeTest.class);
    addTest(suite,RolapStarTest.class);
    addTest(suite,RolapSchemaPoolTest.class);
    addTest(suite,NullMemberRepresentationTest.class);
    addTest(suite,IgnoreUnrelatedDimensionsTest.class);
    addTest(suite,IgnoreMeasureForNonJoiningDimensionInAggregationTest.class);
    addTest(suite,SetFunDefTest.class);
    addTest(suite,VisualTotalsTest.class);
    addTest(suite,AggregationOnDistinctCountMeasuresTest.class);
    addTest(suite,NonCollapsedAggTest.class);
    addTest(suite,BitKeyTest.class);
    addTest(suite,TypeTest.class);
    addTest(suite,SteelWheelsSchemaTest.class);
    addTest(suite,MultipleColsInTupleAggTest.class);
    addTest(suite,DynamicSchemaProcessorTest.class);
    addTest(suite,MonitorTest.class);
    addTest(suite,CodeComplianceTest.class);
    boolean testNonEmpty=isRunOnce();
    if (!MondrianProperties.instance().EnableNativeNonEmpty.get()) {
      testNonEmpty=false;
    }
    if (!MondrianProperties.instance().EnableNativeCrossJoin.get()) {
      testNonEmpty=false;
    }
    if (testNonEmpty) {
      addTest(suite,NonEmptyTest.class);
      addTest(suite,FilterTest.class);
      addTest(suite,NativizeSetFunDefTest.class);
    }
 else {
      logger.warn("String_Node_Str");
    }
    addTest(suite,FastBatchingCellReaderTest.class);
    addTest(suite,SqlQueryTest.class);
    if (MondrianProperties.instance().EnableNativeCrossJoin.get()) {
      addTest(suite,BatchedFillTest.class,"String_Node_Str");
    }
 else {
      logger.warn("String_Node_Str");
    }
  }
  if (testName != null && !testName.equals("String_Node_Str")) {
    Pattern testPattern=Pattern.compile(testName);
    suite=copySuite(suite,testPattern);
  }
  String testInfo=testSuiteInfo.get(suite);
  if (testInfo != null && testInfo.length() > 0) {
    System.out.println(testInfo);
  }
 else {
    System.out.println("String_Node_Str");
  }
  System.out.flush();
  return suite;
}