File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialPlot.java | |||
Method name: void setBackground(DialLayer)
|
Method name: void setCap(DialLayer)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (this.background != null) {↵ | 1 | if (this.cap != null) {↵ | |
2 | this.background.removeChangeListener(this);↵ | 2 | this.cap.removeChangeListener(this);↵ | |
3 | }↵ | 3 | }↵ | |
4 | this.background = background;↵ | 4 | this.cap = cap;↵ | |
5 | if (background != null) {↵ | 5 | if (cap != null) {↵ | |
6 | background.addChangeListener(this);↵ | 6 | cap.addChangeListener(this);↵ | |
7 | }↵ | 7 | }↵ | |
8 | fireChangeEvent(); | 8 |
| |
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 | 15 |
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) | 17.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this.background != null) |
| 1 | if (this.cap != null) | |||||||||||||||||
2 | this.background.removeChangeListener(this); |
| 2 | this.cap.removeChangeListener(this); | |||||||||||||||||
3 | this.background = background; |
| 3 | this.cap = cap; | |||||||||||||||||
4 | if (background != null) |
| 4 | if (cap != null) | |||||||||||||||||
5 | background.addChangeListener(this); |
| 5 | cap.addChangeListener(this); | |||||||||||||||||
6 | fireChangeEvent(); | 6 | fireChangeEvent(); |
Row | Violation |
---|---|
1 | Expression this.background cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.cap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression this.background is a field being modified, and thus it cannot be parameterized |
4 | Expression this.cap is a field being modified, and thus it cannot be parameterized |