File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CrosshairState.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CrosshairState.java | |||
Method name: void updateCrosshairX(double, int)
|
Method name: void updateCrosshairY(double, int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | double d = Math.abs(candidateX - this.anchorX);↵ | 1 | double d = Math.abs(candidateY - this.anchorY);↵ | |
2 | if (d < this.distance) {↵ | 2 | if (d < this.distance) {↵ | |
3 | this.crosshairX = candidateX;↵ | 3 | this.crosshairY = candidateY;↵ | |
4 | this.domainAxisIndex = domainAxisIndex;↵ | 4 | this.rangeAxisIndex = rangeAxisIndex;↵ | |
5 | this.distance = d;↵ | 5 | this.distance = d;↵ | |
6 | } | 6 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
Number of mapped statements | 5 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | double d = Math.abs(candidateX - this.anchorX); |
| 1 | double d = Math.abs(candidateY - this.anchorY); | |||||||||||||||
2 | if (d < this.distance) | 2 | if (d < this.distance) | ||||||||||||||||
3 | this.crosshairX = candidateX; |
| 3 | this.crosshairY = candidateY; | |||||||||||||||
4 | this.domainAxisIndex = domainAxisIndex; |
| 4 | this.rangeAxisIndex = rangeAxisIndex; | |||||||||||||||
5 | this.distance = d; | 5 | this.distance = d; |
Row | Violation |
---|---|
1 | Expression this.crosshairX is a field being modified, and thus it cannot be parameterized |
2 | Expression this.crosshairY is a field being modified, and thus it cannot be parameterized |
3 | Expression this.domainAxisIndex is a field being modified, and thus it cannot be parameterized |
4 | Expression this.rangeAxisIndex is a field being modified, and thus it cannot be parameterized |