RingPlot plot = new RingPlot(dataset);
plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale));
plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
if (tooltips) {
plot.setToolTipGenerator(new StandardPieToolTipGenerator(locale));
}
return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot,
legend);
RingPlot plot = new RingPlot(dataset);
plot.setLabelGenerator(new StandardPieSectionLabelGenerator());
plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
if (tooltips) {
plot.setToolTipGenerator(new StandardPieToolTipGenerator());
}
if (urls) {
plot.setURLGenerator(new StandardPieURLGenerator());
}
return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot,
legend);
Clone fragments detected by clone detection tool
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, Locale)
|
|
Method name: JFreeChart createRingChart(String, PieDataset, boolean, boolean, boolean)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 8
|
|
1 | RingPlot plot = new RingPlot(dataset);↵ | | 1 | RingPlot plot = new RingPlot(dataset);↵
|
2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale));↵ | | 2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator());↵
|
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());↵
|
| | | 6 | }↵
|
| | | 7 | if (urls) {↵
|
6 | ));↵ | | 8 | plot.setURLGenerator(new StandardPieURLGenerator());↵
|
7 | }↵ | | 9 | }↵
|
8 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, ↵ | | 10 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, ↵
|
9 | legend); | | 11 | legend);
|
See real code fragment |
|
See real code fragment |
Summary
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 15 |
-
{Non-refactorable}
Mapping Summary
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) | 2.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | RingPlot plot = new RingPlot(dataset); | | 1 | RingPlot plot = new RingPlot(dataset); |
2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale)); | | 2 | plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); |
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()); |
6 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); | | 8 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables plot |