File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionSQLPropertiesPanel.java | File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/LAFFontsTab.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | FontButton btn = (FontButton) evt.getSource();↵ | 1 | FontButton btn = (FontButton) evt.getSource();↵ | |
2 | FontInfo fi = btn.getFontInfo();↵ | 2 | FontInfo fi = btn.getFontInfo();↵ | |
3 | Font font = null;↵ | 3 | Font font = null;↵ | |
4 | if (fi != null)↵ | 4 | if (fi != null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | font = fi.createFont();↵ | 6 | font = fi.createFont();↵ | |
7 | }↵ | 7 | }↵ | |
8 | font = new FontChooser().showDialog(font);↵ | 8 | font = new FontChooser().showDialog(font);↵ | |
9 | if (font != null)↵ | 9 | if (font != null)↵ | |
10 | {↵ | 10 | {↵ | |
11 | btn.setSelectedFont(font);↵ | 11 | btn.setSelectedFont(font);↵ | |
12 | btn._lbl.setText(new FontInfo(font).toString());↵ | 12 | btn._lbl.setText(new FontInfo(font).toString());↵ | |
13 | } | 13 |
| |
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.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 37 |
Number of mapped statements | 9 |
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) | 11.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | FontButton btn = (FontButton)evt.getSource(); |
| 2 | FontButton btn = (FontButton)evt.getSource(); | ||||||||||||||||
3 | FontInfo fi = btn.getFontInfo(); |
| 3 | FontInfo fi = btn.getFontInfo(); | ||||||||||||||||
4 | Font font = null; | 4 | Font font = null; | |||||||||||||||||
5 | if (fi != null) | 5 | if (fi != null) | |||||||||||||||||
6 | font = fi.createFont(); | 6 | font = fi.createFont(); | |||||||||||||||||
7 | font = new FontChooser().showDialog(font); | 7 | font = new FontChooser().showDialog(font); | |||||||||||||||||
8 | if (font != null) | 8 | if (font != null) | |||||||||||||||||
9 | btn.setSelectedFont(font); |
| 9 | btn.setSelectedFont(font); | ||||||||||||||||
10 | btn._lbl.setText(new FontInfo(font).toString()); |
| 10 | btn._lbl.setText(new FontInfo(font).toString()); |
Row | Violation |
---|---|
1 | Expression btn cannot be unified with expression btn , because common superclass javax.swing.JButton does not declare member(s) net.sourceforge.squirrel_sql.fw.gui.FontInfo getFontInfo() |
2 | Expression btn cannot be unified with expression btn , because common superclass javax.swing.JButton does not declare member(s) void setSelectedFont(java.awt.Font) |
3 | Expression btn._lbl cannot be unified with expression btn._lbl , because common superclass javax.swing.JButton does not declare member(s) private javax.swing.JLabel _lbl |