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 createStackedBarChart(String, String, String, CategoryDataset, PlotOrientation, boolean, boolean, boolean)
|
Method name: JFreeChart createLineChart3D(String, String, String, CategoryDataset, PlotOrientation, boolean, boolean, boolean)
|
|||
Number of AST nodes: 13 | Number of AST nodes: 13 | |||
1 | if (orientation == null) {↵ | 1 | if (orientation == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'orientation' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'orientation' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | CategoryAxis categoryAxis = new CategoryAxis(domainAxisLabel);↵ | 4 | CategoryAxis categoryAxis = new CategoryAxis3D(categoryAxisLabel);↵ | |
5 | ValueAxis valueAxis = new NumberAxis(rangeAxisLabel);↵ | 5 | ValueAxis valueAxis = new NumberAxis3D(valueAxisLabel);↵ | |
6 | StackedBarRenderer renderer = new StackedBarRenderer();↵ | 6 | LineRenderer3D renderer = new LineRenderer3D();↵ | |
7 | if (tooltips) {↵ | 7 | if (tooltips) {↵ | |
8 | renderer.setBaseToolTipGenerator(↵ | 8 | renderer.setBaseToolTipGenerator(↵ | |
9 | new StandardCategoryToolTipGenerator());↵ | 9 | new StandardCategoryToolTipGenerator());↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (urls) {↵ | 11 | if (urls) {↵ | |
12 | renderer.setBaseItemURLGenerator(↵ | 12 | renderer.setBaseItemURLGenerator(↵ | |
13 | new StandardCategoryURLGenerator());↵ | 13 | new StandardCategoryURLGenerator());↵ | |
14 | }↵ | 14 | }↵ | |
15 | CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis, ↵ | 15 | CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis, ↵ | |
16 | renderer);↵ | 16 | renderer);↵ | |
17 | plot.setOrientation(orientation);↵ | 17 | plot.setOrientation(orientation);↵ | |
18 | JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,↵ | 18 | JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,↵ | |
19 | plot, legend);↵ | 19 | plot, legend);↵ | |
20 | return chart; | 20 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 36 |
Number of mapped statements | 13 |
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) | 131.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (orientation == null) | 1 | if (orientation == null) | |||||||||||||||||||
2 | throw new IllegalArgumentException("Null 'orientation' argument."); | 2 | throw new IllegalArgumentException("Null 'orientation' argument."); | |||||||||||||||||||
3 | CategoryAxis categoryAxis = new CategoryAxis(domainAxisLabel); |
| 3 | CategoryAxis categoryAxis = new CategoryAxis3D(categoryAxisLabel); | ||||||||||||||||||
4 | ValueAxis valueAxis = new NumberAxis(rangeAxisLabel); |
| 4 | ValueAxis valueAxis = new NumberAxis3D(valueAxisLabel); | ||||||||||||||||||
5 | StackedBarRenderer renderer = new StackedBarRenderer(); |
| 5 | LineRenderer3D renderer = new LineRenderer3D(); | ||||||||||||||||||
6 | if (tooltips) | 6 | if (tooltips) | |||||||||||||||||||
7 | renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); |
| 7 | renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); | ||||||||||||||||||
8 | if (urls) | 8 | if (urls) | |||||||||||||||||||
9 | renderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator()); |
| 9 | renderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator()); | ||||||||||||||||||
10 | CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis, renderer); |
| 10 | CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis, renderer); | ||||||||||||||||||
11 | plot.setOrientation(orientation); | 11 | plot.setOrientation(orientation); | |||||||||||||||||||
12 | JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); | 12 | JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); | |||||||||||||||||||
13 | return chart; | 13 | return chart; |
Row | Violation |
---|---|
1 | Expression new CategoryAxis(domainAxisLabel) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new NumberAxis(rangeAxisLabel) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new StackedBarRenderer() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new LineRenderer3D() cannot be parameterized, because it has dependencies to/from statements that will be extracted |