File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/ColorPropertiesPanel.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/ColorPropertiesPanel.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Color startColor = toolbarBackgroundColor == null ? Color.WHITE : toolbarBackgroundColor;↵ | 1 | Color startColor = objectTreeBackgroundColor == null ? Color.WHITE : objectTreeBackgroundColor;↵ | |
2 | Color newColor =↵ | 2 | Color newColor =↵ | |
3 | JColorChooser.showDialog(null, i18n.TOOLBAR_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE, ↵ | 3 | JColorChooser.showDialog(null, i18n.OBJECT_TREE_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE,↵ | |
4 | startColor);↵ | 4 | startColor);↵ | |
5 | if (newColor != null)↵ | 5 | if (newColor != null)↵ | |
6 | {↵ | 6 | {↵ | |
7 | toolbarBackgroundColor = newColor;↵ | 7 | objectTreeBackgroundColor = newColor;↵ | |
8 | toolbarBackgroundColorPnl.setBackground(newColor);↵ | 8 | objectTreeBackgroundColorPnl.setBackground(newColor);↵ | |
9 | toolbarBackgroundColorPnl.validate();↵ | 9 | objectTreeBackgroundColorPnl.validate();↵ | |
10 | } | 10 |
| |
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 java file |
Number of node comparisons | 20 |
Number of mapped statements | 6 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Color startColor = toolbarBackgroundColor == null ? Color.WHITE : toolbarBackgroundColor; |
| 1 | Color startColor = objectTreeBackgroundColor == null ? Color.WHITE : objectTreeBackgroundColor; | ||||||||||||||||
2 | Color newColor = JColorChooser.showDialog(null, i18n.TOOLBAR_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE, startColor); |
| 2 | Color newColor = JColorChooser.showDialog(null, i18n.OBJECT_TREE_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE, startColor); | ||||||||||||||||
3 | if (newColor != null) |
| 3 | if (newColor != null) | ||||||||||||||||
4 | toolbarBackgroundColor = newColor; |
| 4 | objectTreeBackgroundColor = newColor; | ||||||||||||||||
5 | toolbarBackgroundColorPnl.setBackground(newColor); |
| 5 | objectTreeBackgroundColorPnl.setBackground(newColor); | ||||||||||||||||
6 | toolbarBackgroundColorPnl.validate(); |
| 6 | objectTreeBackgroundColorPnl.validate(); |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes and do not have a common superclass |