File path: /jfreechart-1.0.10/tests/org/jfree/data/time/junit/DateRangeTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/data/time/junit/SimpleTimePeriodTests.java | |||
Method name: void testEquals()
|
Method name: void testEquals()
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | DateRange r1 = new DateRange(new Date(1000L), ↵ | 1 | SimpleTimePeriod p1 = new SimpleTimePeriod(new Date(1000L),↵ | |
2 | new Date(2000L));↵ | 2 | new Date(1004L));↵ | |
3 | DateRange r2 = new DateRange(new Date(1000L), ↵ | 3 | SimpleTimePeriod p2 = new SimpleTimePeriod(new Date(1000L),↵ | |
4 | new Date(2000L));↵ | 4 | new Date(1004L));↵ | |
5 | assertTrue(r1.equals(r2));↵ | 5 | assertTrue(p1.equals(p2));↵ | |
6 | assertTrue(r2.equals(r1));↵ | 6 | assertTrue(p2.equals(p1));↵ | |
7 | r1 = new DateRange(new Date(1111L), new Date(2000L));↵ | 7 | p1 = new SimpleTimePeriod(new Date(1002L), new Date(1004L));↵ | |
8 | assertFalse(r1.equals(r2));↵ | 8 | assertFalse(p1.equals(p2));↵ | |
9 | r2 = new DateRange(new Date(1111L), new Date(2000L));↵ | 9 | p2 = new SimpleTimePeriod(new Date(1002L), new Date(1004L));↵ | |
10 | assertTrue(r1.equals(r2));↵ | 10 | assertTrue(p1.equals(p2));↵ | |
11 | r1 = new DateRange(new Date(1111L), new Date(2222L));↵ | 11 | p1 = new SimpleTimePeriod(new Date(1002L), new Date(1003L));↵ | |
12 | assertFalse(r1.equals(r2));↵ | 12 | assertFalse(p1.equals(p2));↵ | |
13 | r2 = new DateRange(new Date(1111L), new Date(2222L));↵ | 13 | p2 = new SimpleTimePeriod(new Date(1002L), new Date(1003L));↵ | |
14 | assertTrue(r1.equals(r2)); | 14 | assertTrue(p1.equals(p2)); | |
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 in different classes having the same super class |
Number of node comparisons | 62 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 6 |
Number of unmapped statements in the second code fragment | 6 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 1 | SimpleTimePeriod p1 = new SimpleTimePeriod(new Date(1000L), new Date(1004L)); | ||||||||||||||||||||||
1 | DateRange r1 = new DateRange(new Date(1000L), new Date(2000L)); |
| | ||||||||||||||||||||||
|
| 2 | SimpleTimePeriod p2 = new SimpleTimePeriod(new Date(1000L), new Date(1004L)); | ||||||||||||||||||||||
2 | DateRange r2 = new DateRange(new Date(1000L), new Date(2000L)); |
| | ||||||||||||||||||||||
3 | assertTrue(r1.equals(r2)); |
| 3 | assertTrue(p1.equals(p2)); | |||||||||||||||||||||
4 | assertTrue(r2.equals(r1)); |
| 4 | assertTrue(p2.equals(p1)); | |||||||||||||||||||||
|
| 5 | p1 = new SimpleTimePeriod(new Date(1002L), new Date(1004L)); | ||||||||||||||||||||||
5 | r1 = new DateRange(new Date(1111L), new Date(2000L)); |
| | ||||||||||||||||||||||
6 | assertFalse(r1.equals(r2)); |
| 6 | assertFalse(p1.equals(p2)); | |||||||||||||||||||||
|
| 7 | p2 = new SimpleTimePeriod(new Date(1002L), new Date(1004L)); | ||||||||||||||||||||||
7 | r2 = new DateRange(new Date(1111L), new Date(2000L)); |
| | ||||||||||||||||||||||
8 | assertTrue(r1.equals(r2)); |
| 8 | assertTrue(p1.equals(p2)); | |||||||||||||||||||||
|
| 9 | p1 = new SimpleTimePeriod(new Date(1002L), new Date(1003L)); | ||||||||||||||||||||||
9 | r1 = new DateRange(new Date(1111L), new Date(2222L)); |
| | ||||||||||||||||||||||
10 | assertFalse(r1.equals(r2)); |
| 10 | assertFalse(p1.equals(p2)); | |||||||||||||||||||||
|
| 11 | p2 = new SimpleTimePeriod(new Date(1002L), new Date(1003L)); | ||||||||||||||||||||||
11 | r2 = new DateRange(new Date(1111L), new Date(2222L)); |
| | ||||||||||||||||||||||
12 | assertTrue(r1.equals(r2)); |
| 12 | assertTrue(p1.equals(p2)); |
Row | Violation |
---|---|
1 | Unmatched statement SimpleTimePeriod p1=new SimpleTimePeriod(new Date(1000L),new Date(1004L)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement DateRange r1=new DateRange(new Date(1000L),new Date(2000L)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement SimpleTimePeriod p2=new SimpleTimePeriod(new Date(1000L),new Date(1004L)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement DateRange r2=new DateRange(new Date(1000L),new Date(2000L)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Type org.jfree.data.time.DateRange of variable r2 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p2 |
6 | Type org.jfree.data.time.DateRange of variable r1 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p1 |
7 | Type org.jfree.data.time.DateRange of variable r1 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p1 |
8 | Type org.jfree.data.time.DateRange of variable r2 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p2 |
9 | Unmatched statement p1=new SimpleTimePeriod(new Date(1002L),new Date(1004L)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
10 | Unmatched statement r1=new DateRange(new Date(1111L),new Date(2000L)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
11 | Type org.jfree.data.time.DateRange of variable r2 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p2 |
12 | Type org.jfree.data.time.DateRange of variable r1 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p1 |
13 | Unmatched statement p2=new SimpleTimePeriod(new Date(1002L),new Date(1004L)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
14 | Unmatched statement r2=new DateRange(new Date(1111L),new Date(2000L)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
15 | Type org.jfree.data.time.DateRange of variable r2 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p2 |
16 | Type org.jfree.data.time.DateRange of variable r1 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p1 |
17 | Unmatched statement p1=new SimpleTimePeriod(new Date(1002L),new Date(1003L)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
18 | Unmatched statement r1=new DateRange(new Date(1111L),new Date(2222L)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
19 | Type org.jfree.data.time.DateRange of variable r2 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p2 |
20 | Type org.jfree.data.time.DateRange of variable r1 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p1 |
21 | Unmatched statement p2=new SimpleTimePeriod(new Date(1002L),new Date(1003L)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
22 | Unmatched statement r2=new DateRange(new Date(1111L),new Date(2222L)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
23 | Type org.jfree.data.time.DateRange of variable r2 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p2 |
24 | Type org.jfree.data.time.DateRange of variable r1 does not match with type org.jfree.data.time.SimpleTimePeriod of variable p1 |