File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/WindowManager.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/WindowManager.java | |||
Method name: SQLInternalFrame createSQLInternalFrame(ISession)
|
Method name: ObjectTreeInternalFrame createObjectTreeInternalFrame(ISession)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (session == null)↵ | 1 | if (session == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | throw new IllegalArgumentException("ISession == null");↵ | 3 | throw new IllegalArgumentException("ISession == null");↵ | |
4 | }↵ | 4 | }↵ | |
5 | final SQLInternalFrame sif = new SQLInternalFrame(session);↵ | 5 | final ObjectTreeInternalFrame oif = new ObjectTreeInternalFrame(session);↵ | |
6 | getMainFrame().addWidget(sif);↵ | 6 | getMainFrame().addWidget(oif);↵ | |
7 | // If we don't invokeLater here no Short-Cut-Key is sent↵ | 7 | // If we don't invokeLater here no Short-Cut-Key is sent↵ | |
8 | // to the internal frame↵ | 8 | // to the internal frame↵ | |
9 | // seen under java version "1.4.1_01" and Linux↵ | 9 | // seen under java version "1.4.1_01" and Linux↵ | |
10 | SwingUtilities.invokeLater(new Runnable()↵ | 10 | SwingUtilities.invokeLater(new Runnable()↵ | |
11 | {↵ | 11 | {↵ | |
12 | public void run()↵ | 12 | public void run()↵ | |
13 | {↵ | 13 | {↵ | |
14 | sif.setVisible(true);↵ | 14 | oif.setVisible(true);↵ | |
15 | sif.requestFocus();↵ | 15 | oif.getObjectTreeAPI().selectRoot();↵ | |
16 | }↵ | 16 | }↵ | |
17 | });↵ | 17 | });↵ | |
18 | return sif; | 18 | return oif; | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
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) | 42.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (session == null) | 1 | if (session == null) | |||||||||||||||||||||||||||
2 | throw new IllegalArgumentException("ISession == null"); | 2 | throw new IllegalArgumentException("ISession == null"); | |||||||||||||||||||||||||||
3 | final SQLInternalFrame sif = new SQLInternalFrame(session); |
| 3 | final ObjectTreeInternalFrame oif = new ObjectTreeInternalFrame(session); | ||||||||||||||||||||||||||
4 | getMainFrame().addWidget(sif); |
| 4 | getMainFrame().addWidget(oif); | ||||||||||||||||||||||||||
5 | SwingUtilities.invokeLater(new Runnable() {...}); |
| 5 | SwingUtilities.invokeLater(new Runnable() {...}); | ||||||||||||||||||||||||||
6 | return sif; |
| 6 | return oif; |
Row | Violation |
---|---|
1 | Expression new SQLInternalFrame(session) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new ObjectTreeInternalFrame(session) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression sif cannot be unified with expression oif , because common superclass net.sourceforge.squirrel_sql.client.gui.desktopcontainer.SessionTabWidget does not declare member(s) public void requestFocus() , public net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI getObjectTreeAPI() |
4 | Expression sif.requestFocus() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression oif.getObjectTreeAPI().selectRoot() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression sif.requestFocus() is a void method call, and thus it cannot be parameterized |
7 | Expression oif.getObjectTreeAPI().selectRoot() is a void method call, and thus it cannot be parameterized |
8 | Expression sif cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression oif.getObjectTreeAPI() cannot be parameterized, because it has dependencies to/from statements that will be extracted |