Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
7 | 2 | 2 | 0.977 | method_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 61 | E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java |
2 | 7 | 75 | E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java |
| |||||
// check that something which is not a testcase generates no errors // at first even though this is incorrect. public void testNoTestCase() { TestRunner runner = createRunner(NoTestCase.class ); runner.run(); // On junit3 this is a FAILURE, on junit4 this is an ERROR int ret = runner.getRetCode(); if (ret != JUnitTestRunner.FAILURES && ret != JUnitTestRunner.ERRORS) { fail("Unexpected result " + ret + " from junit runner"); } // JUnit3 test //assertEquals(runner.getFormatter().getError(), JUnitTestRunner.FAILURES, runner.getRetCode()); } |
| |||||
// check that an exception in the constructor is noticed public void testInvalidTestCase() { TestRunner runner = createRunner(InvalidTestCase.class ); runner.run(); // On junit3 this is a FAILURE, on junit4 this is an ERROR int ret = runner.getRetCode(); if (ret != JUnitTestRunner.FAILURES && ret != JUnitTestRunner.ERRORS) { fail("Unexpected result " + ret + " from junit runner"); } // JUNIT3 test //assertEquals(error, JUnitTestRunner.FAILURES, runner.getRetCode()); //@fixme as of now does not report the original stacktrace. //assertTrue(error, error.indexOf("thrown on purpose") != -1); } |
| |||
// check that an exception in the constructor is noticed // check that something which is not a testcase generates no errors // at first even though this is incorrect. public void [[#variable100d3120]]() { TestRunner runner = createRunner( [[#variable100d2f60]].class ); runner.run(); // On junit3 this is a FAILURE, on junit4 this is an ERROR int ret = runner.getRetCode(); if (ret != JUnitTestRunner.FAILURES && ret != JUnitTestRunner.ERRORS) { fail("Unexpected result " + ret + " from junit runner"); } // JUNIT3 test //assertEquals(error, JUnitTestRunner.FAILURES, runner.getRetCode()); //@fixme as of now does not report the original stacktrace. //assertTrue(error, error.indexOf("thrown on purpose") != -1); // JUnit3 test //assertEquals(runner.getFormatter().getError(), JUnitTestRunner.FAILURES, runner.getRetCode()); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#100d3120]] | testNoTestCase |
1 | 2 | [[#100d3120]] | testInvalidTestCase |
2 | 1 | [[#100d2f60]] | NoTestCase |
2 | 2 | [[#100d2f60]] | InvalidTestCase |