File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryAxis.java | |||
Method name: void setTickLabelFont(Comparable, Font)
|
Method name: void setTickLabelPaint(Comparable, Paint)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (category == null) {↵ | 1 | if (category == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'category' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'category' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (font == null) {↵ | 4 | if (paint == null) {↵ | |
5 | this.tickLabelFontMap.remove(category);↵ | 5 | this.tickLabelPaintMap.remove(category);↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | this.tickLabelFontMap.put(category, font);↵ | 8 | this.tickLabelPaintMap.put(category, paint);↵ | |
9 | }↵ | 9 | }↵ | |
10 | notifyListeners(new AxisChangeEvent(this)); | 10 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 6 |
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) | 15.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (category == null) | 1 | if (category == null) | ||||||||||||||||||||
2 | throw new IllegalArgumentException("Null 'category' argument."); | 2 | throw new IllegalArgumentException("Null 'category' argument."); | ||||||||||||||||||||
3 | if (font == null) |
| 3 | if (paint == null) | |||||||||||||||||||
4 | this.tickLabelFontMap.remove(category); |
| 4 | this.tickLabelPaintMap.remove(category); | |||||||||||||||||||
else | else | ||||||||||||||||||||||
5 | this.tickLabelFontMap.put(category, font); |
| 5 | this.tickLabelPaintMap.put(category, paint); | |||||||||||||||||||
6 | notifyListeners(new AxisChangeEvent(this)); | 6 | notifyListeners(new AxisChangeEvent(this)); |
Row | Violation |
---|---|
1 | Type java.awt.Font of variable font does not match with type java.awt.Paint of variable paint |
2 | Type java.awt.Font of variable font does not match with type java.awt.Paint of variable paint |
3 | Expression this.tickLabelFontMap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression this.tickLabelPaintMap cannot be parameterized, because it has dependencies to/from statements that will be extracted |