File path: /jfreechart-1.0.10/src/org/jfree/chart/editor/DefaultAxisEditor.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/editor/DefaultTitleEditor.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | String command = event.getActionCommand();↵ | 1 | String command = event.getActionCommand();↵ | |
2 | if (command.equals("SelectLabelFont")) {↵ | 2 | if (command.equals("SelectFont")) {↵ | |
3 | attemptLabelFontSelection();↵ | 3 | attemptFontSelection();↵ | |
4 | }↵ | 4 | }↵ | |
5 | else if (command.equals("SelectLabelPaint")) {↵ | 5 | else if (command.equals("SelectPaint")) {↵ | |
6 | attemptModifyLabelPaint();↵ | 6 | attemptPaintSelection();↵ | |
7 | }↵ | 7 | }↵ | |
8 | else if (command.equals("SelectTickLabelFont")) {↵ | 8 | else if (command.equals("ShowTitle")) {↵ | |
9 | attemptTickLabelFontSelection();↵ | 9 | attemptModifyShowTitle();↵ | |
10 | } | 10 |
| |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 28 |
Number of mapped statements | 7 |
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.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String command = event.getActionCommand(); | 1 | String command = event.getActionCommand(); | |||||||||||||||
2 | if (command.equals("SelectLabelFont")) |
| 2 | if (command.equals("SelectFont")) | ||||||||||||||
3 | attemptLabelFontSelection(); |
| 3 | attemptFontSelection(); | ||||||||||||||
4 | else if (command.equals("SelectLabelPaint")) |
| 6 | else if (command.equals("ShowTitle")) | ||||||||||||||
5 | attemptModifyLabelPaint(); |
| 7 | attemptModifyShowTitle(); | ||||||||||||||
6 | else if (command.equals("SelectTickLabelFont")) |
| 4 | else if (command.equals("SelectPaint")) | ||||||||||||||
7 | attemptTickLabelFontSelection(); |
| 5 | attemptPaintSelection(); |
Row | Violation |
---|---|
1 | Expression attemptLabelFontSelection() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression attemptFontSelection() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression attemptLabelFontSelection() is a void method call, and thus it cannot be parameterized |
4 | Expression attemptFontSelection() is a void method call, and thus it cannot be parameterized |
5 | Expression attemptModifyLabelPaint() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression attemptModifyShowTitle() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression attemptModifyLabelPaint() is a void method call, and thus it cannot be parameterized |
8 | Expression attemptModifyShowTitle() is a void method call, and thus it cannot be parameterized |
9 | Expression attemptTickLabelFontSelection() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression attemptPaintSelection() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression attemptTickLabelFontSelection() is a void method call, and thus it cannot be parameterized |
12 | Expression attemptPaintSelection() is a void method call, and thus it cannot be parameterized |