File path: /jfreechart-1.0.10/tests/org/jfree/data/time/junit/DayTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/data/time/junit/MonthTests.java | |||
Method name: void testDateConstructor1()
|
Method name: void testDateConstructor1()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | TimeZone zone = TimeZone.getTimeZone("GMT");↵ | 1 | TimeZone zone = TimeZone.getTimeZone("GMT");↵ | |
2 | Day d1 = new Day(new Date(1078099199999L), zone);↵ | 2 | Month m1 = new Month(new Date(951868799999L), zone);↵ | |
3 | Day d2 = new Day(new Date(1078099200000L), zone);↵ | 3 | Month m2 = new Month(new Date(951868800000L), zone);↵ | |
4 | assertEquals(MonthConstants.FEBRUARY, d1.getMonth());↵ | 4 | assertEquals(MonthConstants.FEBRUARY, m1.getMonth());↵ | |
5 | assertEquals(1078099199999L, d1.getLastMillisecond(zone));↵ | 5 | assertEquals(951868799999L, m1.getLastMillisecond(zone));↵ | |
6 | assertEquals(MonthConstants.MARCH, d2.getMonth());↵ | 6 | assertEquals(MonthConstants.MARCH, m2.getMonth());↵ | |
7 | assertEquals(1078099200000L, d2.getFirstMillisecond(zone)); | 7 | assertEquals(951868800000L, m2.getFirstMillisecond(zone)); | |
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 | 28 |
Number of mapped statements | 7 |
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 | TimeZone zone = TimeZone.getTimeZone("GMT"); | 1 | TimeZone zone = TimeZone.getTimeZone("GMT"); | |||||||||||||||||||||||||
2 | Day d1 = new Day(new Date(1078099199999L), zone); |
| 2 | Month m1 = new Month(new Date(951868799999L), zone); | ||||||||||||||||||||||||
3 | Day d2 = new Day(new Date(1078099200000L), zone); |
| 3 | Month m2 = new Month(new Date(951868800000L), zone); | ||||||||||||||||||||||||
4 | assertEquals(MonthConstants.FEBRUARY, d1.getMonth()); |
| 4 | assertEquals(MonthConstants.FEBRUARY, m1.getMonth()); | ||||||||||||||||||||||||
5 | assertEquals(1078099199999L, d1.getLastMillisecond(zone)); |
| 5 | assertEquals(951868799999L, m1.getLastMillisecond(zone)); | ||||||||||||||||||||||||
6 | assertEquals(MonthConstants.MARCH, d2.getMonth()); |
| 6 | assertEquals(MonthConstants.MARCH, m2.getMonth()); | ||||||||||||||||||||||||
7 | assertEquals(1078099200000L, d2.getFirstMillisecond(zone)); |
| 7 | assertEquals(951868800000L, m2.getFirstMillisecond(zone)); |
Row | Violation |
---|---|
1 | Expression new Day(new Date(1078099199999L),zone) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new Month(new Date(951868799999L),zone) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new Day(new Date(1078099200000L),zone) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new Month(new Date(951868800000L),zone) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression d1 cannot be unified with expression m1 , because common superclass org.jfree.data.time.RegularTimePeriod does not declare member(s) public int getMonth() |
6 | Expression d2 cannot be unified with expression m2 , because common superclass org.jfree.data.time.RegularTimePeriod does not declare member(s) public int getMonth() |