File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java | |||
Method name: int loadTables(String, String, String, String[], int)
|
Method name: int loadSchemas(int)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | long start = 0, finish = 0;↵ | 1 | long start = 0, finish = 0;↵ | |
2 | try↵ | 2 | try↵ | |
3 | {↵ | 3 | {↵ | |
4 | ↵ | |||
5 | if (s_log.isDebugEnabled()) {↵ | 4 | if (s_log.isDebugEnabled()) {↵ | |
6 | s_log.debug(i18n.LOADING_TABLES_MSG);↵ | 5 | s_log.debug(i18n.LOADING_SCHEMAS_MSG);↵ | |
7 | start = System.currentTimeMillis();↵ | 6 | start = System.currentTimeMillis();↵ | |
8 | }↵ | 7 | }↵ | |
9 | int beginProgress = getLoadMethodProgress(progress++);↵ | 8 | int beginProgress = getLoadMethodProgress(progress++);↵ | |
10 | setProgress(i18n.LOADING_TABLES_MSG, beginProgress);↵ | 9 | setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress);↵ | |
11 | privateLoadTables(catalog, ↵ | 10 | privateLoad↵ | |
12 | schema, ↵ | |||
13 | tableNamePattern, ↵ | |||
14 | types, ↵ | |||
15 | i18n.LOADING_TABLES_MSG, ↵ | |||
16 | beginProgress);↵ | 11 | Schemas();↵ | |
17 | if (s_log.isDebugEnabled()) {↵ | 12 | if (s_log.isDebugEnabled()) {↵ | |
18 | finish = System.currentTimeMillis();↵ | 13 | finish = System.currentTimeMillis();↵ | |
19 | s_log.debug("Tables loaded in " + (finish - start) + " ms");↵ | 14 | s_log.debug("Schemas loaded in " + (finish - start) + " ms");↵ | |
20 | }↵ | 15 | }↵ | |
21 | }↵ | 16 | }↵ | |
22 | catch (Exception ex)↵ | 17 | catch (Exception ex)↵ | |
23 | {↵ | 18 | {↵ | |
24 | s_log.error("Error loading tables", ex);↵ | 19 | s_log.error("Error loading schemas", ex);↵ | |
25 | }↵ | 20 | }↵ | |
26 | return progress; | 21 |
| |
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.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 48 |
Number of mapped statements | 12 |
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) | 224.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | long start = 0, finish = 0; | 1 | long start = 0, finish = 0; | ||||||||||||||||||||||
2 | try |
| 2 | try | |||||||||||||||||||||
3 | if (s_log.isDebugEnabled()) | 3 | if (s_log.isDebugEnabled()) | ||||||||||||||||||||||
4 | s_log.debug(i18n.LOADING_TABLES_MSG); |
| 4 | s_log.debug(i18n.LOADING_SCHEMAS_MSG); | |||||||||||||||||||||
5 | start = System.currentTimeMillis(); | 5 | start = System.currentTimeMillis(); | ||||||||||||||||||||||
6 | int beginProgress = getLoadMethodProgress(progress++); | 6 | int beginProgress = getLoadMethodProgress(progress++); | ||||||||||||||||||||||
7 | setProgress(i18n.LOADING_TABLES_MSG, beginProgress); |
| 7 | setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress); | |||||||||||||||||||||
8 | privateLoadTables(catalog, schema, tableNamePattern, types, i18n.LOADING_TABLES_MSG, beginProgress); |
| 8 | privateLoadSchemas(); | |||||||||||||||||||||
9 | if (s_log.isDebugEnabled()) | 9 | if (s_log.isDebugEnabled()) | ||||||||||||||||||||||
10 | finish = System.currentTimeMillis(); | 10 | finish = System.currentTimeMillis(); | ||||||||||||||||||||||
11 | s_log.debug("Tables loaded in " + (finish - start) + " ms"); |
| 11 | s_log.debug("Schemas loaded in " + (finish - start) + " ms"); | |||||||||||||||||||||
12 | return progress; | 12 | return progress; |
Row | Violation |
---|---|
1 | Expression privateLoadTables(catalog,schema,tableNamePattern,types,i18n.LOADING_TABLES_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression privateLoadSchemas() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression privateLoadTables(catalog,schema,tableNamePattern,types,i18n.LOADING_TABLES_MSG,beginProgress) is a void method call, and thus it cannot be parameterized |
4 | Expression privateLoadSchemas() is a void method call, and thus it cannot be parameterized |
5 | Expression privateLoadTables(catalog,schema,tableNamePattern,types,i18n.LOADING_TABLES_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression privateLoadSchemas() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
7 | Expression privateLoadTables(catalog,schema,tableNamePattern,types,i18n.LOADING_TABLES_MSG,beginProgress) is a void method call, and thus it cannot be parameterized |
8 | Expression privateLoadSchemas() is a void method call, and thus it cannot be parameterized |