File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartFactory.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartFactory.java | |||
Method name: JFreeChart createPieChart(String, PieDataset, PieDataset, int, boolean, boolean, boolean, Locale, boolean, boolean)
|
Method name: JFreeChart createPieChart(String, PieDataset, PieDataset, int, boolean, boolean, boolean, boolean, boolean, boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | double percentChange = (newValue.doubleValue() ↵ | 1 | double percentChange = (newValue.doubleValue() ↵ | |
2 | / oldValue.doubleValue() - 1.0) * 100.0;↵ | 2 | / oldValue.doubleValue() - 1.0) * 100.0;↵ | |
3 | double shade↵ | 3 | double shade↵ | |
4 | = (Math.abs(percentChange) >= percentDiffForMaxScale ? 255↵ | 4 | = (Math.abs(percentChange) >= percentDiffForMaxScale ? 255↵ | |
5 | : Math.abs(percentChange) * colorPerPercent);↵ | 5 | : Math.abs(percentChange) * colorPerPercent);↵ | |
6 | if (greenForIncrease ↵ | 6 | if (greenForIncrease ↵ | |
7 | && newValue.doubleValue() > oldValue.doubleValue()↵ | 7 | && newValue.doubleValue() > oldValue.doubleValue()↵ | |
8 | || !greenForIncrease && newValue.doubleValue() ↵ | 8 | || !greenForIncrease && newValue.doubleValue() ↵ | |
9 | < oldValue.doubleValue()) {↵ | 9 | < oldValue.doubleValue()) {↵ | |
10 | plot.setSectionPaint(key, new Color(0, (int) shade, 0));↵ | 10 | plot.setSectionPaint(key, new Color(0, (int) shade, 0));↵ | |
11 | }↵ | 11 | }↵ | |
12 | else {↵ | 12 | else {↵ | |
13 | plot.setSectionPaint(key, new Color((int) shade, 0, 0));↵ | 13 | plot.setSectionPaint(key, new Color((int) shade, 0, 0));↵ | |
14 | } | 14 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
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) | 189.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
21 | double percentChange = (newValue.doubleValue() / oldValue.doubleValue() - 1.0) * 100.0; | 23 | double percentChange = (newValue.doubleValue() / oldValue.doubleValue() - 1.0) * 100.0; | |
22 | double shade = (Math.abs(percentChange) >= percentDiffForMaxScale ? 255 : Math.abs(percentChange) * colorPerPercent); | 24 | double shade = (Math.abs(percentChange) >= percentDiffForMaxScale ? 255 : Math.abs(percentChange) * colorPerPercent); | |
23 | if (greenForIncrease && newValue.doubleValue() > oldValue.doubleValue() || !greenForIncrease && newValue.doubleValue() < oldValue.doubleValue()) | 25 | if (greenForIncrease && newValue.doubleValue() > oldValue.doubleValue() || !greenForIncrease && newValue.doubleValue() < oldValue.doubleValue()) | |
24 | plot.setSectionPaint(key, new Color(0, (int)shade, 0)); | 26 | plot.setSectionPaint(key, new Color(0, (int)shade, 0)); | |
else | else | |||
25 | plot.setSectionPaint(key, new Color((int)shade, 0, 0)); | 27 | plot.setSectionPaint(key, new Color((int)shade, 0, 0)); |
Row | Violation |
---|