Program: 51482
Project: 51482
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}.
 */
public static Test suite() throws Exception {
  RolapUtil.checkTracing();
  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);
  TestSuite suite=new TestSuite();
  if (testClass != null && !testClass.equals("String_Node_Str")) {
    Class clazz=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) {
      suite.addTestSuite(clazz);
    }
 else {
      Method method=clazz.getMethod("String_Node_Str",new Class[0]);
      Object target;
      if (Modifier.isStatic(method.getModifiers())) {
        target=null;
      }
 else {
        target=clazz.newInstance();
      }
      Object o=method.invoke(target,new Object[0]);
      suite.addTest((Test)o);
    }
  }
 else {
    suite.addTest(ResultComparatorTest.suite());
    suite.addTestSuite(BasicQueryTest.class);
    suite.addTestSuite(FunctionTest.class);
    suite.addTestSuite(HierarchyBugTest.class);
    suite.addTestSuite(ScheduleTest.class);
    suite.addTestSuite(UtilTestCase.class);
    if (isRunOnce())     suite.addTestSuite(TestAggregationManager.class);
    suite.addTestSuite(VirtualCubeTest.class);
    suite.addTestSuite(ParameterTest.class);
    suite.addTestSuite(AccessControlTest.class);
    suite.addTestSuite(ParserTest.class);
    suite.addTestSuite(ParentChildHierarchyTest.class);
    suite.addTestSuite(XmlaBasicTest.class);
    suite.addTestSuite(XmlaExcel2000Test.class);
    suite.addTestSuite(XmlaExcelXPTest.class);
    suite.addTest(XmlaTest.suite());
    if (isRunOnce())     suite.addTestSuite(TestCalculatedMembers.class);
    suite.addTestSuite(RaggedHierarchyTest.class);
    suite.addTestSuite(InlineTableTest.class);
    suite.addTestSuite(CompatibilityTest.class);
    suite.addTestSuite(CaptionTest.class);
    suite.addTestSuite(UdfTest.class);
    suite.addTestSuite(NamedSetTest.class);
    suite.addTestSuite(PropertiesTest.class);
    suite.addTestSuite(MultipleHierarchyTest.class);
    suite.addTestSuite(I18nTest.class);
    boolean testNonEmpty=isRunOnce();
    if (!MondrianProperties.instance().EnableNativeNonEmpty.get())     testNonEmpty=false;
    if (!MondrianProperties.instance().EnableNativeCrossJoin.get())     testNonEmpty=false;
    if (testNonEmpty)     suite.addTestSuite(NonEmptyTest.class);
 else     logger.warn("String_Node_Str");
  }
  if (testName != null && !testName.equals("String_Node_Str")) {
    Pattern testPattern=Pattern.compile(testName);
    suite=copySuite(suite,testPattern);
  }
  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}.
 */
public static Test suite() throws Exception {
  RolapUtil.checkTracing();
  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);
  TestSuite suite=new TestSuite();
  if (testClass != null && !testClass.equals("String_Node_Str")) {
    Class clazz=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) {
      suite.addTestSuite(clazz);
    }
 else {
      Method method=clazz.getMethod("String_Node_Str",new Class[0]);
      Object target;
      if (Modifier.isStatic(method.getModifiers())) {
        target=null;
      }
 else {
        target=clazz.newInstance();
      }
      Object o=method.invoke(target,new Object[0]);
      suite.addTest((Test)o);
    }
  }
 else {
    suite.addTestSuite(RolapConnectionTest.class);
    suite.addTest(ResultComparatorTest.suite());
    suite.addTestSuite(BasicQueryTest.class);
    suite.addTestSuite(FunctionTest.class);
    suite.addTestSuite(HierarchyBugTest.class);
    suite.addTestSuite(ScheduleTest.class);
    suite.addTestSuite(UtilTestCase.class);
    if (isRunOnce())     suite.addTestSuite(TestAggregationManager.class);
    suite.addTestSuite(VirtualCubeTest.class);
    suite.addTestSuite(ParameterTest.class);
    suite.addTestSuite(AccessControlTest.class);
    suite.addTestSuite(ParserTest.class);
    suite.addTestSuite(ParentChildHierarchyTest.class);
    suite.addTestSuite(XmlaBasicTest.class);
    suite.addTestSuite(XmlaExcel2000Test.class);
    suite.addTestSuite(XmlaExcelXPTest.class);
    suite.addTest(XmlaTest.suite());
    if (isRunOnce())     suite.addTestSuite(TestCalculatedMembers.class);
    suite.addTestSuite(RaggedHierarchyTest.class);
    suite.addTestSuite(InlineTableTest.class);
    suite.addTestSuite(CompatibilityTest.class);
    suite.addTestSuite(CaptionTest.class);
    suite.addTestSuite(UdfTest.class);
    suite.addTestSuite(NamedSetTest.class);
    suite.addTestSuite(PropertiesTest.class);
    suite.addTestSuite(MultipleHierarchyTest.class);
    suite.addTestSuite(I18nTest.class);
    boolean testNonEmpty=isRunOnce();
    if (!MondrianProperties.instance().EnableNativeNonEmpty.get())     testNonEmpty=false;
    if (!MondrianProperties.instance().EnableNativeCrossJoin.get())     testNonEmpty=false;
    if (testNonEmpty)     suite.addTestSuite(NonEmptyTest.class);
 else     logger.warn("String_Node_Str");
  }
  if (testName != null && !testName.equals("String_Node_Str")) {
    Pattern testPattern=Pattern.compile(testName);
    suite=copySuite(suite,testPattern);
  }
  return suite;
}