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, boolean, boolean, Locale)
|
Method name: JFreeChart createRingChart(String, PieDataset, boolean, boolean, Locale)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | PiePlot plot = new PiePlot(dataset);↵ | 1 | RingPlot plot = new RingPlot(dataset);↵ | |
2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale));↵ | 2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale));↵ | |
3 | plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));↵ | 3 | plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));↵ | |
4 | if (tooltips) {↵ | 4 | if (tooltips) {↵ | |
5 | plot.setToolTipGenerator(new StandardPieToolTipGenerator(locale));↵ | 5 | plot.setToolTipGenerator(new StandardPieToolTipGenerator(locale));↵ | |
6 | }↵ | 6 | }↵ | |
7 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, ↵ | 7 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, ↵ | |
8 | legend); | 8 |
| |
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 | 14 |
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) | 61.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | PiePlot plot = new PiePlot(dataset); |
| 1 | RingPlot plot = new RingPlot(dataset); | ||||||||||||||||||
2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale)); |
| 2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale)); | ||||||||||||||||||
3 | plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); |
| 3 | plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); | ||||||||||||||||||
4 | if (tooltips) | 4 | if (tooltips) | |||||||||||||||||||
5 | plot.setToolTipGenerator(new StandardPieToolTipGenerator(locale)); |
| 5 | plot.setToolTipGenerator(new StandardPieToolTipGenerator(locale)); | ||||||||||||||||||
6 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); |
| 6 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); |
Row | Violation |
---|---|
1 | Expression new PiePlot(dataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new RingPlot(dataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted |