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 attemptLabelFontSelection()
|
Method name: void attemptFontSelection()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | FontChooserPanel panel = new FontChooserPanel(this.labelFont);↵ | 1 | FontChooserPanel panel = new FontChooserPanel(this.titleFont);↵ | |
2 | int result = ↵ | 2 | int result = ↵ | |
3 | JOptionPane.showConfirmDialog(this, panel,↵ | 3 | JOptionPane.showConfirmDialog(↵ | |
4 | localizationResources.getString("Font_Selection"),↵ | 4 | this, panel, localizationResources.getString("Font_Selection"),↵ | |
5 | JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE↵ | 5 | JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE↵ | |
6 | );↵ | 6 | );↵ | |
7 | if (result == JOptionPane.OK_OPTION) {↵ | 7 | if (result == JOptionPane.OK_OPTION) {↵ | |
8 | this.labelFont = panel.getSelectedFont();↵ | 8 | this.titleFont = panel.getSelectedFont();↵ | |
9 | this.labelFontField.setText(↵ | 9 | this.fontfield.setText(↵ | |
10 | this.labelFont.getFontName() + " " + this.labelFont.getSize()↵ | 10 | this.titleFont.getFontName() + " " + this.titleFont.getSize()↵ | |
11 | );↵ | 11 | );↵ | |
12 | } | 12 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
Number of mapped statements | 5 |
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) | 3.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | FontChooserPanel panel = new FontChooserPanel(this.labelFont); |
| 1 | FontChooserPanel panel = new FontChooserPanel(this.titleFont); | ||||||||||||||||||||
2 | int result = JOptionPane.showConfirmDialog(this, panel, localizationResources.getString("Font_Selection"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); | 2 | int result = JOptionPane.showConfirmDialog(this, panel, localizationResources.getString("Font_Selection"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); | |||||||||||||||||||||
3 | if (result == JOptionPane.OK_OPTION) | 3 | if (result == JOptionPane.OK_OPTION) | |||||||||||||||||||||
4 | this.labelFont = panel.getSelectedFont(); |
| 4 | this.titleFont = panel.getSelectedFont(); | ||||||||||||||||||||
5 | this.labelFontField.setText(this.labelFont.getFontName() + " " + this.labelFont.getSize()); |
| 5 | this.fontfield.setText(this.titleFont.getFontName() + " " + this.titleFont.getSize()); |
Row | Violation |
---|---|
1 | Expression this.labelFont is a field being modified, and thus it cannot be parameterized |
2 | Expression this.titleFont is a field being modified, and thus it cannot be parameterized |
3 | Expression this.labelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression this.titleFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression this.labelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression this.titleFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |