File path: /jfreechart-1.0.10/src/org/jfree/chart/editor/DefaultAxisEditor.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/editor/DefaultAxisEditor.java | |||
Method name: void attemptLabelFontSelection()
|
Method name: void attemptTickLabelFontSelection()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | FontChooserPanel panel = new FontChooserPanel(this.labelFont);↵ | 1 | FontChooserPanel panel = new FontChooserPanel(this.tickLabelFont);↵ | |
2 | int result = JOptionPane.showConfirmDialog(this, panel,↵ | 2 | int result = JOptionPane.showConfirmDialog(this, panel,↵ | |
3 | localizationResources.getString("Font_Selection"),↵ | 3 | localizationResources.getString("Font_Selection"),↵ | |
4 | JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);↵ | 4 | JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);↵ | |
5 | if (result == JOptionPane.OK_OPTION) {↵ | 5 | if (result == JOptionPane.OK_OPTION) {↵ | |
6 | this.labelFont = panel.getSelectedFont();↵ | 6 | this.tickLabelFont = panel.getSelectedFont();↵ | |
7 | this.labelFontField.setText(↵ | 7 | this.tickLabelFontField.setText(↵ | |
8 | this.labelFont.getFontName() + " "↵ | 8 | this.tickLabelFont.getFontName() + " "↵ | |
9 | + this.labelFont.getSize()↵ | 9 | + this.tickLabelFont.getSize()↵ | |
10 | );↵ | 10 | );↵ | |
11 | } | 11 |
| |
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.1 |
Clones location | Clones are declared in the same 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) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | FontChooserPanel panel = new FontChooserPanel(this.labelFont); |
| 1 | FontChooserPanel panel = new FontChooserPanel(this.tickLabelFont); | ||||||||||||||||||||
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.tickLabelFont = panel.getSelectedFont(); | ||||||||||||||||||||
5 | this.labelFontField.setText(this.labelFont.getFontName() + " " + this.labelFont.getSize()); |
| 5 | this.tickLabelFontField.setText(this.tickLabelFont.getFontName() + " " + this.tickLabelFont.getSize()); |
Row | Violation |
---|---|
1 | Expression this.labelFont is a field being modified, and thus it cannot be parameterized |
2 | Expression this.tickLabelFont 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.tickLabelFont 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.tickLabelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |