File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/MarkerTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/ValueMarkerTests.java | |||
Method name: void testGetSetAlpha()
|
Method name: void testGetSetValue()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | ValueMarker m = new ValueMarker(1.1);↵ | 1 | ValueMarker m = new ValueMarker(1.1);↵ | |
2 | m.addChangeListener(this);↵ | 2 | m.addChangeListener(this);↵ | |
3 | this.lastEvent = null;↵ | 3 | this.lastEvent = null;↵ | |
4 | assertEquals(0.8f, m.getAlpha(), EPSILON);↵ | 4 | assertEquals(1.1, m.getValue(), EPSILON);↵ | |
5 | m.setAlpha(0.5f);↵ | 5 | m.setValue(33.3);↵ | |
6 | assertEquals(0.5f, m.getAlpha(), EPSILON);↵ | 6 | assertEquals(33.3, m.getValue(), 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 | 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 | 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 | ValueMarker m = new ValueMarker(1.1); | 1 | ValueMarker m = new ValueMarker(1.1); | ||||||||||||||||||||||||||||
2 | m.addChangeListener(this); | 2 | m.addChangeListener(this); | ||||||||||||||||||||||||||||
3 | this.lastEvent = null; | 3 | this.lastEvent = null; | ||||||||||||||||||||||||||||
4 | assertEquals(0.8f, m.getAlpha(), EPSILON); |
| 4 | assertEquals(1.1, m.getValue(), EPSILON); | |||||||||||||||||||||||||||
5 | m.setAlpha(0.5f); |
| 5 | m.setValue(33.3); | |||||||||||||||||||||||||||
6 | assertEquals(0.5f, m.getAlpha(), EPSILON); |
| 6 | assertEquals(33.3, m.getValue(), EPSILON); | |||||||||||||||||||||||||||
7 | assertEquals(m, this.lastEvent.getMarker()); | 7 | assertEquals(m, this.lastEvent.getMarker()); |
Row | Violation |
---|---|
1 | Type float of variable 0.8f does not match with type double of variable 1.1 |
2 | Expression m.getAlpha() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression m.getValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type float of variable m.getAlpha() does not match with type double of variable m.getValue() |
5 | Type float of variable EPSILON does not match with type double of variable EPSILON |
6 | Type float of variable 0.5f does not match with type double of variable 33.3 |
7 | Expression m.setAlpha(0.5f) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression m.setValue(33.3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression m.setAlpha(0.5f) is a void method call, and thus it cannot be parameterized |
10 | Expression m.setValue(33.3) is a void method call, and thus it cannot be parameterized |
11 | Type float of variable 0.5f does not match with type double of variable 33.3 |
12 | Expression m.getAlpha() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression m.getValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type float of variable m.getAlpha() does not match with type double of variable m.getValue() |
15 | Type float of variable EPSILON does not match with type double of variable EPSILON |