File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartPanel.java | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java | |||
Method name: void paintComponent(Graphics)
|
Method name: void paintControl(PaintEvent)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (drawHeight < this.minimumDrawHeight) { ↵ | 1 | if (drawWidth < this.minimumDrawWidth) {↵ | |
2 | this.scaleY = drawHeight / this.minimumDrawHeight; ↵ | 2 | this.scaleX = (double) drawWidth / this.minimumDrawWidth;↵ | |
3 | drawHeight = this.minimumDrawHeight; ↵ | 3 | drawWidth = this.minimumDrawWidth;↵ | |
4 | scale = true; ↵ | 4 | scale = true;↵ | |
5 | } ↵ | 5 | }↵ | |
6 | else if (drawHeight > this.maximumDrawHeight) { ↵ | 6 | else if (drawWidth > this.maximumDrawWidth) {↵ | |
7 | this.scaleY = drawHeight / this.maximumDrawHeight; ↵ | 7 | this.scaleX = (double) drawWidth / this.maximumDrawWidth;↵ | |
8 | drawHeight = this.maximumDrawHeight; ↵ | 8 | drawWidth = this.maximumDrawWidth;↵ | |
9 | scale = true; ↵ | 9 | scale = true;↵ | |
10 | } | 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) | 1.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 49 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 10.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21 | if (drawHeight < this.minimumDrawHeight) |
| 13 | if (drawWidth < this.minimumDrawWidth) | |||||||||||||||||||
22 | this.scaleY = drawHeight / this.minimumDrawHeight; |
| 14 | this.scaleX = (double)drawWidth / this.minimumDrawWidth; | |||||||||||||||||||
|
| 15 | drawWidth = this.minimumDrawWidth; | ||||||||||||||||||||
23 | drawHeight = this.minimumDrawHeight; |
| | ||||||||||||||||||||
24 | scale = true; | 16 | scale = true; | ||||||||||||||||||||
25 | else if (drawHeight > this.maximumDrawHeight) |
| 17 | else if (drawWidth > this.maximumDrawWidth) | |||||||||||||||||||
26 | this.scaleY = drawHeight / this.maximumDrawHeight; |
| 18 | this.scaleX = (double)drawWidth / this.maximumDrawWidth; | |||||||||||||||||||
|
| 19 | drawWidth = this.maximumDrawWidth; | ||||||||||||||||||||
27 | drawHeight = this.maximumDrawHeight; |
| | ||||||||||||||||||||
28 | scale = true; | 20 | scale = true; |
Row | Violation |
---|---|
1 | Type double of variable drawHeight does not match with type int of variable drawWidth |
2 | Expression this.scaleY is a field being modified, and thus it cannot be parameterized |
3 | Expression this.scaleX is a field being modified, and thus it cannot be parameterized |
4 | Expression (double)drawWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement drawWidth=this.minimumDrawWidth; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement drawHeight=this.minimumDrawHeight; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Type double of variable drawHeight does not match with type int of variable drawWidth |
8 | Expression this.scaleY is a field being modified, and thus it cannot be parameterized |
9 | Expression this.scaleX is a field being modified, and thus it cannot be parameterized |
10 | Expression (double)drawWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Unmatched statement drawWidth=this.maximumDrawWidth; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
12 | Unmatched statement drawHeight=this.maximumDrawHeight; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |