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: 10 | Number of AST nodes: 10 | |||
1 | if (evt.getSource() instanceof FontButton)↵ | 1 | if (evt.getSource() instanceof FontButton)↵ | |
2 | {↵ | 2 | {↵ | |
3 | FontButton btn = (FontButton) evt.getSource();↵ | 3 | FontButton btn = (FontButton) evt.getSource();↵ | |
4 | FontInfo fi = btn.getFontInfo();↵ | 4 | FontInfo fi = btn.getFontInfo();↵ | |
5 | Font font = null;↵ | 5 | Font font = null;↵ | |
6 | if (fi != null)↵ | 6 | if (fi != null)↵ | |
7 | {↵ | 7 | {↵ | |
8 | font = fi.createFont();↵ | 8 | font = fi.createFont();↵ | |
9 | }↵ | 9 | }↵ | |
10 | font = new FontChooser().showDialog(font);↵ | 10 | font = new FontChooser().showDialog(font);↵ | |
11 | if (font != null)↵ | 11 | if (font != null)↵ | |
12 | {↵ | 12 | {↵ | |
13 | btn.setSelectedFont(font);↵ | 13 | btn.setSelectedFont(font);↵ | |
14 | btn._lbl.setText(new FontInfo(font).toString());↵ | 14 | btn._lbl.setText(new FontInfo(font).toString());↵ | |
15 | }↵ | 15 | }↵ | |
16 | } | 16 |
| |
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.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 45 |
Number of mapped statements | 10 |
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) | 15.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (evt.getSource() instanceof FontButton) |
| 1 | if (evt.getSource() instanceof FontButton) | ||||||||||||||||||
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 (FontButton)evt.getSource() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression (FontButton)evt.getSource() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | 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() |
4 | Expression btn cannot be unified with expression btn , because common superclass javax.swing.JButton does not declare member(s) void setSelectedFont(java.awt.Font) |
5 | 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 |