File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jorphan/collections/PackageTest.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jorphan/collections/PackageTest.java | |||
Method name: void testEqualsAndHashCode1()
|
Method name: void testEqualsAndHashCode2()
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | HashTree tree1 = new HashTree("abcd");↵ | 1 | ListedHashTree tree1 = new ListedHashTree("abcd");↵ | |
2 | HashTree tree2 = new HashTree("abcd");↵ | 2 | ListedHashTree tree2 = new ListedHashTree("abcd");↵ | |
3 | HashTree tree3 = new HashTree("abcde");↵ | 3 | ListedHashTree tree3 = new ListedHashTree("abcde");↵ | |
4 | HashTree tree4 = new HashTree("abcde");↵ | 4 | ListedHashTree tree4 = new ListedHashTree("abcde");↵ | |
5 | assertTrue(tree1.equals(tree1));↵ | 5 | assertTrue(tree1.equals(tree1));↵ | |
6 | assertTrue(tree1.equals(tree2));↵ | 6 | assertTrue(tree1.equals(tree2));↵ | |
7 | assertTrue(tree2.equals(tree1));↵ | 7 | assertTrue(tree2.equals(tree1));↵ | |
8 | assertTrue(tree2.equals(tree2));↵ | 8 | assertTrue(tree2.equals(tree2));↵ | |
9 | assertTrue(tree1.hashCode() == tree2.hashCode());↵ | 9 | assertTrue(tree1.hashCode() == tree2.hashCode());↵ | |
10 | assertTrue(tree3.equals(tree3));↵ | 10 | assertTrue(tree3.equals(tree3));↵ | |
11 | assertTrue(tree3.equals(tree4));↵ | 11 | assertTrue(tree3.equals(tree4));↵ | |
12 | assertTrue(tree4.equals(tree3));↵ | 12 | assertTrue(tree4.equals(tree3));↵ | |
13 | assertTrue(tree4.equals(tree4));↵ | 13 | assertTrue(tree4.equals(tree4));↵ | |
14 | assertTrue(tree3.hashCode() == tree4.hashCode());↵ | 14 | assertTrue(tree3.hashCode() == tree4.hashCode());↵ | |
15 | assertNotSame(tree1, tree2);↵ | 15 | assertNotSame(tree1, tree2);↵ | |
16 | assertNotSame(tree1, tree3); | 16 |
| |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 111 |
Number of mapped statements | 16 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | HashTree tree1 = new HashTree("abcd"); |
| 1 | ListedHashTree tree1 = new ListedHashTree("abcd"); | ||||||||||||||||||
2 | HashTree tree2 = new HashTree("abcd"); |
| 2 | ListedHashTree tree2 = new ListedHashTree("abcd"); | ||||||||||||||||||
3 | HashTree tree3 = new HashTree("abcde"); |
| 3 | ListedHashTree tree3 = new ListedHashTree("abcde"); | ||||||||||||||||||
4 | HashTree tree4 = new HashTree("abcde"); |
| 4 | ListedHashTree tree4 = new ListedHashTree("abcde"); | ||||||||||||||||||
5 | assertTrue(tree1.equals(tree1)); |
| 5 | assertTrue(tree1.equals(tree1)); | ||||||||||||||||||
6 | assertTrue(tree1.equals(tree2)); |
| 6 | assertTrue(tree1.equals(tree2)); | ||||||||||||||||||
7 | assertTrue(tree2.equals(tree1)); |
| 7 | assertTrue(tree2.equals(tree1)); | ||||||||||||||||||
8 | assertTrue(tree2.equals(tree2)); |
| 8 | assertTrue(tree2.equals(tree2)); | ||||||||||||||||||
9 | assertTrue(tree1.hashCode() == tree2.hashCode()); |
| 9 | assertTrue(tree1.hashCode() == tree2.hashCode()); | ||||||||||||||||||
10 | assertTrue(tree3.equals(tree3)); |
| 10 | assertTrue(tree3.equals(tree3)); | ||||||||||||||||||
11 | assertTrue(tree3.equals(tree4)); |
| 11 | assertTrue(tree3.equals(tree4)); | ||||||||||||||||||
12 | assertTrue(tree4.equals(tree3)); |
| 12 | assertTrue(tree4.equals(tree3)); | ||||||||||||||||||
13 | assertTrue(tree4.equals(tree4)); |
| 13 | assertTrue(tree4.equals(tree4)); | ||||||||||||||||||
14 | assertTrue(tree3.hashCode() == tree4.hashCode()); |
| 14 | assertTrue(tree3.hashCode() == tree4.hashCode()); | ||||||||||||||||||
15 | assertNotSame(tree1, tree2); |
| 15 | assertNotSame(tree1, tree2); | ||||||||||||||||||
16 | assertNotSame(tree1, tree3); |
| 16 | assertNotSame(tree1, tree3); |
Row | Violation |
---|---|
1 | Expression new HashTree("abcd") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new ListedHashTree("abcd") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new HashTree("abcd") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new ListedHashTree("abcd") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression new HashTree("abcde") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression new ListedHashTree("abcde") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression new HashTree("abcde") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression new ListedHashTree("abcde") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Clone fragment #1 returns variables tree1, tree4, tree2, tree3 , while Clone fragment #2 returns variables tree1, tree3, tree4, tree2 |