File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/prefspanel/StyleMaintenancePanel.java | File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/prefspanel/StyleMaintenancePanel.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | final SyntaxStyle style = _list.getSelectedSyntaxStyle();↵ | 1 | final SyntaxStyle style = _list.getSelectedSyntaxStyle();↵ | |
2 | final int origRGB = style.getTextRGB();↵ | 2 | final int origRGB = style.getBackgroundRGB();↵ | |
3 | final Color color = JColorChooser.showDialog(null,↵ | 3 | final Color color = JColorChooser.showDialog(null,↵ | |
4 | //i18n[syntax.selColor=Select Color]↵ | 4 | //i18n[syntax.selColor2=Select Color]↵ | |
5 | s_stringMgr.getString("syntax.selColor"), new Color(origRGB));↵ | 5 | s_stringMgr.getString("syntax.selColor2"), new Color(origRGB));↵ | |
6 | if (color != null)↵ | 6 | if (color != null)↵ | |
7 | {↵ | 7 | {↵ | |
8 | style.setTextRGB(color.getRGB());↵ | 8 | style.setBackgroundRGB(color.getRGB());↵ | |
9 | } | 9 |
| |
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.1 |
Clones location | Clones are in the same java file |
Number of node comparisons | 9 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | final SyntaxStyle style = _list.getSelectedSyntaxStyle(); | 1 | final SyntaxStyle style = _list.getSelectedSyntaxStyle(); | |||||||||||||||
2 | final int origRGB = style.getTextRGB(); |
| 2 | final int origRGB = style.getBackgroundRGB(); | ||||||||||||||
3 | final Color color = JColorChooser.showDialog(null, s_stringMgr.getString("syntax.selColor"), new Color(origRGB)); |
| 3 | final Color color = JColorChooser.showDialog(null, s_stringMgr.getString("syntax.selColor2"), new Color(origRGB)); | ||||||||||||||
4 | if (color != null) | 4 | if (color != null) | |||||||||||||||
5 | style.setTextRGB(color.getRGB()); |
| 5 | style.setBackgroundRGB(color.getRGB()); |
Row | Violation |
---|---|
1 | Expression style.getTextRGB() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression style.getBackgroundRGB() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression style.setTextRGB(color.getRGB()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression style.setBackgroundRGB(color.getRGB()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression style.setTextRGB(color.getRGB()) is a void method call, and thus it cannot be parameterized |
6 | Expression style.setBackgroundRGB(color.getRGB()) is a void method call, and thus it cannot be parameterized |