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 createRingChart(String, PieDataset, boolean, boolean, boolean)
|
Method name: JFreeChart createPieChart3D(String, PieDataset, boolean, boolean, boolean)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 7 | |||
1 | RingPlot plot = new RingPlot(dataset);↵ | 1 | PiePlot3D plot = new PiePlot3D(dataset);↵ | |
2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator());↵ | |||
3 | plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));↵ | 2 | plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));↵ | |
4 | if (tooltips) {↵ | 3 | if (tooltips) {↵ | |
5 | plot.setToolTipGenerator(new StandardPieToolTipGenerator());↵ | 4 | plot.setToolTipGenerator(new StandardPieToolTipGenerator());↵ | |
6 | }↵ | 5 | }↵ | |
7 | if (urls) {↵ | 6 | if (urls) {↵ | |
8 | plot.setURLGenerator(new StandardPieURLGenerator());↵ | 7 | plot.setURLGenerator(new StandardPieURLGenerator());↵ | |
9 | }↵ | 8 | }↵ | |
10 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, ↵ | 9 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, ↵ | |
11 | legend); | 10 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 21 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 50.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | RingPlot plot = new RingPlot(dataset); |
| 1 | PiePlot3D plot = new PiePlot3D(dataset); | |||||||||||||||||
2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); |
| | ||||||||||||||||||
3 | plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); |
| 2 | plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); | |||||||||||||||||
4 | if (tooltips) | 3 | if (tooltips) | ||||||||||||||||||
5 | plot.setToolTipGenerator(new StandardPieToolTipGenerator()); |
| 4 | plot.setToolTipGenerator(new StandardPieToolTipGenerator()); | |||||||||||||||||
6 | if (urls) | 5 | if (urls) | ||||||||||||||||||
7 | plot.setURLGenerator(new StandardPieURLGenerator()); |
| 6 | plot.setURLGenerator(new StandardPieURLGenerator()); | |||||||||||||||||
8 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); |
| 7 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); |
Row | Violation |
---|---|
1 | Expression new RingPlot(dataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |