File path: /sql12/plugins/smarttools/src/net/sourceforge/squirrel_sql/plugins/smarttools/SmarttoolsPlugin.java | File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/FirebirdManagerPlugin.java | |||
Method name: IWidget isInternalFrameUsed(IApplication, int)
|
Method name: IWidget isInternalFrameUsed(IApplication, int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | IWidget[] frames = application.getMainFrame().getDesktopContainer().getAllWidgets();↵ | 1 | IWidget[] frames = application.getMainFrame().getDesktopContainer().getAllWidgets();↵ | |
2 | for (int i = 0; i < frames.length; i++) {↵ | 2 | for (int i = 0; i < frames.length; i++) {↵ | |
3 | if ((sheetType == ST_SHEET_TYPE_FIND_VALUES && frames[i] instanceof SmarttoolFindBadNullValues↵ | 3 | if ((sheetType == FB_SHEET_TYPE_CREATE && frames[i] instanceof FirebirdManagerCreateDatabaseFrame)↵ | |
4 | Frame)↵ | 4 | || (sheetType == FB_SHEET_TYPE_USER && frames[i] instanceof FirebirdManagerUserManagerFrame)↵ | |
5 | || (sheetType == ST_SHEET_TYPE_CHANGE_VALUES && frames[i] instanceof SmarttoolChangeValuesFrame)↵ | 5 | || (sheetType == FB_SHEET_TYPE_BACKUP && frames[i] instanceof FirebirdManagerBackupRestoreFrame)↵ | |
6 | || (sheetType == ST_SHEET_TYPE_MISSING_INICES && frames[i] instanceof SmarttoolMissingIndices↵ | 6 | || (sheetType == FB_SHEET_TYPE_GRANT && frames[i] instanceof FirebirdManagerGrantFrame)↵ | |
7 | Frame)↵ | 7 | || (sheetType == FB_SHEET_TYPE_ROLE && frames[i] instanceof FirebirdManagerRoleFrame)↵ | |
8 | ) {↵ | 8 | ) {↵ | |
9 | return frames[i];↵ | 9 | return frames[i];↵ | |
10 | }↵ | 10 | }↵ | |
11 | }↵ | 11 | }↵ | |
12 | return null; | 12 |
| |
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.9 |
Clones location | Clones are in different classes having the same super class |
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) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | IWidget[] frames = application.getMainFrame().getDesktopContainer().getAllWidgets(); | 1 | IWidget[] frames = application.getMainFrame().getDesktopContainer().getAllWidgets(); | |||||||||||||||||||||||||||||
2 | for (int i = 0; i < frames.length; i++) | 2 | for (int i = 0; i < frames.length; i++) | |||||||||||||||||||||||||||||
3 | if ((sheetType == ST_SHEET_TYPE_FIND_VALUES && frames[i] instanceof SmarttoolFindBadNullValuesFrame) || (sheetType == ST_SHEET_TYPE_CHANGE_VALUES && frames[i] instanceof SmarttoolChangeValuesFrame) || (sheetType == ST_SHEET_TYPE_MISSING_INICES && frames[i] instanceof SmarttoolMissingIndicesFrame)) |
| 3 | if ((sheetType == FB_SHEET_TYPE_CREATE && frames[i] instanceof FirebirdManagerCreateDatabaseFrame) || (sheetType == FB_SHEET_TYPE_USER && frames[i] instanceof FirebirdManagerUserManagerFrame) || (sheetType == FB_SHEET_TYPE_BACKUP && frames[i] instanceof FirebirdManagerBackupRestoreFrame) || (sheetType == FB_SHEET_TYPE_GRANT && frames[i] instanceof FirebirdManagerGrantFrame) || (sheetType == FB_SHEET_TYPE_ROLE && frames[i] instanceof FirebirdManagerRoleFrame)) | ||||||||||||||||||||||||||||
4 | return frames[i]; | 4 | return frames[i]; | |||||||||||||||||||||||||||||
5 | return null; | 5 | return null; |
Row | Violation |
---|---|
1 | Expression frames[i] instanceof SmarttoolFindBadNullValuesFrame cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression frames[i] instanceof FirebirdManagerCreateDatabaseFrame cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression frames[i] instanceof SmarttoolChangeValuesFrame cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression frames[i] instanceof FirebirdManagerUserManagerFrame cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression (sheetType == ST_SHEET_TYPE_FIND_VALUES && frames[i] instanceof SmarttoolFindBadNullValuesFrame) || (sheetType == ST_SHEET_TYPE_CHANGE_VALUES && frames[i] instanceof SmarttoolChangeValuesFrame) || (sheetType == ST_SHEET_TYPE_MISSING_INICES && frames[i] instanceof SmarttoolMissingIndicesFrame) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression (sheetType == FB_SHEET_TYPE_CREATE && frames[i] instanceof FirebirdManagerCreateDatabaseFrame) || (sheetType == FB_SHEET_TYPE_USER && frames[i] instanceof FirebirdManagerUserManagerFrame) || (sheetType == FB_SHEET_TYPE_BACKUP && frames[i] instanceof FirebirdManagerBackupRestoreFrame)|| (sheetType == FB_SHEET_TYPE_GRANT && frames[i] instanceof FirebirdManagerGrantFrame)|| (sheetType == FB_SHEET_TYPE_ROLE && frames[i] instanceof FirebirdManagerRoleFrame) cannot be parameterized, because it has dependencies to/from statements that will be extracted |