File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java | |||
Method name: void testIncludeFiles()
|
Method name: void testExcludeFiles()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | testf.includeFiles(INCL);↵ | 1 | testf.excludeFiles(INCL);↵ | |
2 | for (int idx = 0; idx < TESTDATA.length; idx++) {↵ | 2 | for (int idx = 0; idx < TESTDATA.length; idx++) {↵ | |
3 | TestData td = TESTDATA[idx];↵ | 3 | TestData td = TESTDATA[idx];↵ | |
4 | String theFile = td.file;↵ | 4 | String theFile = td.file;↵ | |
5 | boolean expect = td.inclfile;↵ | 5 | boolean expect = td.exclfile;↵ | |
6 | testf.isFiltered(theFile,null);↵ | 6 | testf.isFiltered(theFile,null);↵ | |
7 | String line = testf.filter(theFile);↵ | 7 | String line = testf.filter(theFile);↵ | |
8 | if (line != null) {↵ | 8 | if (line != null) {↵ | |
9 | assertTrue("Expect to accept " + theFile, expect);↵ | 9 | assertTrue("Expect to accept " + theFile, expect);↵ | |
10 | } else {↵ | 10 | } else {↵ | |
11 | assertFalse("Expect to reject " + theFile, expect);↵ | 11 | assertFalse("Expect to reject " + theFile, expect);↵ | |
12 | }↵ | 12 | }↵ | |
13 | } | 13 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 46 |
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | testf.includeFiles(INCL); |
| 1 | testf.excludeFiles(INCL); | ||||||||||||
2 | for (int idx = 0; idx < TESTDATA.length; idx++) | 2 | for (int idx = 0; idx < TESTDATA.length; idx++) | |||||||||||||
3 | TestData td = TESTDATA[idx]; | 3 | TestData td = TESTDATA[idx]; | |||||||||||||
4 | String theFile = td.file; | 4 | String theFile = td.file; | |||||||||||||
5 | boolean expect = td.inclfile; |
| 5 | boolean expect = td.exclfile; | ||||||||||||
6 | testf.isFiltered(theFile, null); | 6 | testf.isFiltered(theFile, null); | |||||||||||||
7 | String line = testf.filter(theFile); | 7 | String line = testf.filter(theFile); | |||||||||||||
8 | if (line != null) | 8 | if (line != null) | |||||||||||||
9 | assertTrue("Expect to accept " + theFile, expect); | 9 | assertTrue("Expect to accept " + theFile, expect); | |||||||||||||
else | else | |||||||||||||||
10 | assertFalse("Expect to reject " + theFile, expect); | 10 | assertFalse("Expect to reject " + theFile, expect); |
Row | Violation |
---|---|
1 | Expression testf.includeFiles(INCL) is a void method call, and thus it cannot be parameterized |
2 | Expression testf.excludeFiles(INCL) is a void method call, and thus it cannot be parameterized |
3 | Expression td.inclfile cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression td.exclfile cannot be parameterized, because it has dependencies to/from statements that will be extracted |