File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/demo/SWTMultipleAxisDemo1.java | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/demo/SWTTimeSeriesDemo.java | |||
Method name: void main(String[])
|
Method name: void main(String[])
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | final JFreeChart chart = createChart();↵ | 1 | final JFreeChart chart = createChart(createDataset());↵ | |
2 | final Display display = new Display();↵ | 2 | final Display display = new Display();↵ | |
3 | Shell shell = new Shell(display);↵ | 3 | Shell shell = new Shell(display);↵ | |
4 | shell.setSize(600, 300);↵ | 4 | shell.setSize(600, 300);↵ | |
5 | shell.setLayout(new FillLayout());↵ | 5 | shell.setLayout(new FillLayout());↵ | |
6 | shell.setText("Test for jfreechart running with SWT");↵ | 6 | shell.setText("Time series demo for jfreechart running with SWT");↵ | |
7 | ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);↵ | 7 | ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);↵ | |
8 | frame.setDisplayToolTips(false);↵ | 8 | frame.setDisplayToolTips(true);↵ | |
9 | frame.setHorizontalAxisTrace(true);↵ | 9 | frame.setHorizontalAxisTrace(false);↵ | |
10 | frame.setVerticalAxisTrace(true);↵ | 10 | frame.setVerticalAxisTrace(false);↵ | |
11 | shell.open();↵ | 11 | shell.open();↵ | |
12 | while (!shell.isDisposed()) {↵ | 12 | while (!shell.isDisposed()) {↵ | |
13 | if (!display.readAndDispatch())↵ | 13 | if (!display.readAndDispatch())↵ | |
14 | display.sleep();↵ | 14 | display.sleep();↵ | |
15 | } | 15 |
| |
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 in different classes |
Number of node comparisons | 52 |
Number of mapped statements | 14 |
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) | 4.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | final JFreeChart chart = createChart(); |
| 1 | final JFreeChart chart = createChart(createDataset()); | ||||||||||||
2 | final Display display = new Display(); | 2 | final Display display = new Display(); | |||||||||||||
3 | Shell shell = new Shell(display); | 3 | Shell shell = new Shell(display); | |||||||||||||
4 | shell.setSize(600, 300); | 4 | shell.setSize(600, 300); | |||||||||||||
5 | shell.setLayout(new FillLayout()); | 5 | shell.setLayout(new FillLayout()); | |||||||||||||
6 | shell.setText("Test for jfreechart running with SWT"); |
| 6 | shell.setText("Time series demo for jfreechart running with SWT"); | ||||||||||||
7 | ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true); | 7 | ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true); | |||||||||||||
8 | frame.setDisplayToolTips(false); |
| 8 | frame.setDisplayToolTips(true); | ||||||||||||
9 | frame.setHorizontalAxisTrace(true); |
| 9 | frame.setHorizontalAxisTrace(false); | ||||||||||||
10 | frame.setVerticalAxisTrace(true); |
| 10 | frame.setVerticalAxisTrace(false); | ||||||||||||
11 | shell.open(); | 11 | shell.open(); | |||||||||||||
12 | while (!shell.isDisposed()) | 12 | while (!shell.isDisposed()) | |||||||||||||
13 | if (!display.readAndDispatch()) | 13 | if (!display.readAndDispatch()) | |||||||||||||
14 | display.sleep(); | 14 | display.sleep(); |
Row | Violation |
---|---|
1 | Expression createChart() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression createChart(createDataset()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |