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 createCandlestickChart(String, String, String, OHLCDataset, boolean)
|
Method name: JFreeChart createBoxAndWhiskerChart(String, String, String, BoxAndWhiskerXYDataset, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | ValueAxis timeAxis = new DateAxis(timeAxisLabel);↵ | 1 | ValueAxis timeAxis = new DateAxis(timeAxisLabel);↵ | |
2 | NumberAxis valueAxis = new NumberAxis(valueAxisLabel);↵ | 2 | NumberAxis valueAxis = new NumberAxis(valueAxisLabel);↵ | |
3 | valueAxis.setAutoRangeIncludesZero(false);↵ | |||
4 | XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);↵ | |||
3 | XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, null);↵ | 5 | XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, ↵ | |
4 | plot.setRenderer(new CandlestickRenderer());↵ | 6 | renderer);↵ | |
5 | JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,↵ | 7 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, ↵ | |
6 | plot, legend);↵ | 8 | legend); | |
7 | return chart; | |||
See real code fragment | See real code fragment |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 15 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ValueAxis timeAxis = new DateAxis(timeAxisLabel); | 1 | ValueAxis timeAxis = new DateAxis(timeAxisLabel); | |||||||||||||||
2 | NumberAxis valueAxis = new NumberAxis(valueAxisLabel); | 2 | NumberAxis valueAxis = new NumberAxis(valueAxisLabel); | |||||||||||||||
|
| 3 | valueAxis.setAutoRangeIncludesZero(false); | |||||||||||||||
|
| 4 | XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0); | |||||||||||||||
3 | XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, null); |
| 5 | XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer); | ||||||||||||||
4 | plot.setRenderer(new CandlestickRenderer()); |
| | |||||||||||||||
5 | JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); |
| | |||||||||||||||
6 | return chart; |
| 6 | return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); |
Row | Violation |
---|---|
1 | Unmatched statement valueAxis.setAutoRangeIncludesZero(false); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement XYBoxAndWhiskerRenderer renderer=new XYBoxAndWhiskerRenderer(10.0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Expression renderer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement plot.setRenderer(new CandlestickRenderer()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement JFreeChart chart=new JFreeChart(title,JFreeChart.DEFAULT_TITLE_FONT,plot,legend); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Expression chart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression new JFreeChart(title,JFreeChart.DEFAULT_TITLE_FONT,plot,legend) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Clone fragment #1 returns variable plot with type org.jfree.chart.plot.XYPlot , while Clone fragment #2 returns variable valueAxis with type org.jfree.chart.axis.NumberAxis |