File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/sessioninfo/NewSessionInfoWorksheetAction.java | File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/invalidobjects/NewInvalidObjectsWorksheetAction.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | ISession activeSession = getApplication().getSessionManager().getActiveSession();↵ | 1 | ISession activeSession = getApplication().getSessionManager().getActiveSession();↵ | |
2 | if (activeSession == null)↵ | 2 | if (activeSession == null)↵ | |
3 | throw new IllegalArgumentException("This method should not be called with a null activeSession");↵ | 3 | throw new IllegalArgumentException("This method should not be called with a null activeSession");↵ | |
4 | final SessionInfoInternalFrame sif = new SessionInfoInternalFrame(activeSession, _resources);↵ | 4 | final InvalidObjectsInternalFrame sif = new InvalidObjectsInternalFrame(activeSession, _resources);↵ | |
5 | getApplication().getMainFrame().addWidget(sif);↵ | 5 | getApplication().getMainFrame().addWidget(sif);↵ | |
6 | // If we don't invokeLater here no Short-Cut-Key is sent↵ | 6 | // If we don't invokeLater here no Short-Cut-Key is sent↵ | |
7 | // to the internal frame↵ | 7 | // to the internal frame↵ | |
8 | // seen under java version "1.4.1_01" and Linux↵ | 8 | // seen under java version "1.4.1_01" and Linux↵ | |
9 | SwingUtilities.invokeLater(new Runnable()↵ | 9 | SwingUtilities.invokeLater(new Runnable()↵ | |
10 | {↵ | 10 | {↵ | |
11 | public void run()↵ | 11 | public void run()↵ | |
12 | {↵ | 12 | {↵ | |
13 | sif.setVisible(true);↵ | 13 | sif.setVisible(true);↵ | |
14 | }↵ | 14 | }↵ | |
15 | }); | 15 |
| |
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 different classes having the same super 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) | 141.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ISession activeSession = getApplication().getSessionManager().getActiveSession(); | 1 | ISession activeSession = getApplication().getSessionManager().getActiveSession(); | |||||||||||||||||||
2 | if (activeSession == null) | 2 | if (activeSession == null) | |||||||||||||||||||
3 | throw new IllegalArgumentException("This method should not be called with a null activeSession"); | 3 | throw new IllegalArgumentException("This method should not be called with a null activeSession"); | |||||||||||||||||||
4 | final SessionInfoInternalFrame sif = new SessionInfoInternalFrame(activeSession, _resources); |
| 4 | final InvalidObjectsInternalFrame sif = new InvalidObjectsInternalFrame(activeSession, _resources); | ||||||||||||||||||
5 | getApplication().getMainFrame().addWidget(sif); |
| 5 | getApplication().getMainFrame().addWidget(sif); | ||||||||||||||||||
6 | SwingUtilities.invokeLater(new Runnable() {...}); |
| 6 | SwingUtilities.invokeLater(new Runnable() {...}); |
Row | Violation |
---|---|
1 | Expression new SessionInfoInternalFrame(activeSession,_resources) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new InvalidObjectsInternalFrame(activeSession,_resources) cannot be parameterized, because it has dependencies to/from statements that will be extracted |