TextTitle t1 = new TextTitle();
TextTitle t2 = new TextTitle();
assertTrue(t1.equals(t2));
int h1 = t1.hashCode();
int h2 = t2.hashCode();
assertEquals(h1, h2);
TextTitle t1 = new TextTitle();
TextTitle t2 = new TextTitle();
assertTrue(t1.equals(t2));
int h1 = t1.hashCode();
int h2 = t2.hashCode();
assertEquals(h1, h2);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/title/junit/TextTitleTests.java
|
|
File path: /jfreechart-1.0.10/tests/org/jfree/chart/title/junit/TitleTests.java
|
Method name: void testHashcode()
|
|
Method name: void testHashcode()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | TextTitle t1 = new TextTitle();↵ | | 1 | TextTitle t1 = new TextTitle();↵
|
2 | TextTitle t2 = new TextTitle();↵ | | 2 | TextTitle t2 = new TextTitle();↵
|
3 | assertTrue(t1.equals(t2));↵ | | 3 | assertTrue(t1.equals(t2));↵
|
4 | int h1 = t1.hashCode();↵ | | 4 | int h1 = t1.hashCode();↵
|
5 | int h2 = t2.hashCode();↵ | | 5 | int h2 = t2.hashCode();↵
|
6 | assertEquals(h1, h2); | | 6 | assertEquals(h1, h2);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | TextTitle t1 = new TextTitle(); | | 1 | TextTitle t1 = new TextTitle(); |
2 | TextTitle t2 = new TextTitle(); | | 2 | TextTitle t2 = new TextTitle(); |
3 | assertTrue(t1.equals(t2)); | | 3 | assertTrue(t1.equals(t2)); |
4 | int h1 = t1.hashCode(); | | 4 | int h1 = t1.hashCode(); |
5 | int h2 = t2.hashCode(); | | 5 | int h2 = t2.hashCode(); |
6 | assertEquals(h1, h2); | | 6 | assertEquals(h1, h2); |
Precondition Violations (0)
Row |
Violation |