File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/IntervalMarkerTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/IntervalMarkerTests.java | |||
Method name: void testGetSetStartValue()
|
Method name: void testGetSetEndValue()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | IntervalMarker m = new IntervalMarker(1.0, 2.0);↵ | 1 | IntervalMarker m = new IntervalMarker(1.0, 2.0);↵ | |
2 | m.addChangeListener(this);↵ | 2 | m.addChangeListener(this);↵ | |
3 | this.lastEvent = null;↵ | 3 | this.lastEvent = null;↵ | |
4 | assertEquals(1.0, m.getStartValue(), EPSILON);↵ | 4 | assertEquals(2.0, m.getEndValue(), EPSILON);↵ | |
5 | m.setStartValue(0.5);↵ | 5 | m.setEndValue(0.5);↵ | |
6 | assertEquals(0.5, m.getStartValue(), EPSILON);↵ | 6 | assertEquals(0.5, m.getEndValue(), EPSILON);↵ | |
7 | assertEquals(m, this.lastEvent.getMarker()); | 7 |
| |
See real code fragment | See real code fragment |
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 declared in the same class |
Number of node comparisons | 22 |
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 | IntervalMarker m = new IntervalMarker(1.0, 2.0); | 1 | IntervalMarker m = new IntervalMarker(1.0, 2.0); | ||||||||||||||||
2 | m.addChangeListener(this); | 2 | m.addChangeListener(this); | ||||||||||||||||
3 | this.lastEvent = null; | 3 | this.lastEvent = null; | ||||||||||||||||
4 | assertEquals(1.0, m.getStartValue(), EPSILON); |
| 4 | assertEquals(2.0, m.getEndValue(), EPSILON); | |||||||||||||||
5 | m.setStartValue(0.5); |
| 5 | m.setEndValue(0.5); | |||||||||||||||
6 | assertEquals(0.5, m.getStartValue(), EPSILON); |
| 6 | assertEquals(0.5, m.getEndValue(), EPSILON); | |||||||||||||||
7 | assertEquals(m, this.lastEvent.getMarker()); | 7 | assertEquals(m, this.lastEvent.getMarker()); |
Row | Violation |
---|---|
1 | Expression m.getStartValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression m.getEndValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression m.setStartValue(0.5) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression m.setEndValue(0.5) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression m.setStartValue(0.5) is a void method call, and thus it cannot be parameterized |
6 | Expression m.setEndValue(0.5) is a void method call, and thus it cannot be parameterized |
7 | Expression m.getStartValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression m.getEndValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |