File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/config/GeneralOptionsDialog.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/config/GeneralOptionsDialog.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | FontSelectionDialog fontDialog = new FontSelectionDialog(this, null);↵ | 1 | FontSelectionDialog fontDialog = new FontSelectionDialog(this, null);↵ | |
2 | if (fontDialog.showDialog() == FontSelectionDialog.APPROVE_OPTION) {↵ | 2 | if (fontDialog.showDialog() == FontSelectionDialog.APPROVE_OPTION) {↵ | |
3 | mainFont = fontDialog.getSelectedFont();↵ | 3 | textFont = fontDialog.getSelectedFont();↵ | |
4 | mainFontButton.setFont(mainFont);↵ | 4 | textFontButton.setFont(textFont);↵ | |
5 | mainFontButton.setText(mainFont.getFontName());↵ | 5 | textFontButton.setText(textFont.getFontName());↵ | |
6 | } | 6 |
| |
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 the same method |
Number of node comparisons | 18 |
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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26 | FontSelectionDialog fontDialog = new FontSelectionDialog(this, null); | 32 | FontSelectionDialog fontDialog = new FontSelectionDialog(this, null); | ||||||||||||||||
27 | if (fontDialog.showDialog() == FontSelectionDialog.APPROVE_OPTION) | 33 | if (fontDialog.showDialog() == FontSelectionDialog.APPROVE_OPTION) | ||||||||||||||||
28 | mainFont = fontDialog.getSelectedFont(); |
| 34 | textFont = fontDialog.getSelectedFont(); | |||||||||||||||
29 | mainFontButton.setFont(mainFont); |
| 35 | textFontButton.setFont(textFont); | |||||||||||||||
30 | mainFontButton.setText(mainFont.getFontName()); |
| 36 | textFontButton.setText(textFont.getFontName()); |
Row | Violation |
---|---|
1 | Expression mainFont is a field being modified, and thus it cannot be parameterized |
2 | Expression textFont is a field being modified, and thus it cannot be parameterized |
3 | Expression mainFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression textFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression mainFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression textFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |