File path: /sql12/plugins/dbdiff/src/net/sourceforge/squirrel_sql/plugins/dbdiff/util/DBUtil.java | File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java | |||
Method name: ITableInfo getTableInfo(ISession, String, String)
|
Method name: ITableInfo getTableInfo(ISession, String, String)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (Character.isUpperCase(tableName.charAt(0)))↵ | 1 | if (Character.isUpperCase(tableName.charAt(0)))↵ | |
2 | {↵ | 2 | {↵ | |
3 | tableName = tableName.toLowerCase();↵ | 3 | tableName = tableName.toLowerCase();↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | tableName = tableName.toUpperCase();↵ | 7 | tableName = tableName.toUpperCase();↵ | |
8 | }↵ | 8 | }↵ | |
9 | tis = schemaInfo.getITableInfos(null, schema, tableName);↵ | 9 | tis = getTables(session, null, schema, tableName);↵ | |
10 | if (tis.length == 0)↵ | 10 | if (tis.length == 0)↵ | |
11 | {↵ | 11 | {↵ | |
12 | if (Character.isUpperCase(tableName.charAt(0)))↵ | 12 | if (Character.isUpperCase(tableName.charAt(0)))↵ | |
13 | {↵ | 13 | {↵ | |
14 | tableName = tableName.toLowerCase();↵ | 14 | tableName = tableName.toLowerCase();↵ | |
15 | }↵ | 15 | }↵ | |
16 | else↵ | 16 | else↵ | |
17 | {↵ | 17 | {↵ | |
18 | tableName = tableName.toUpperCase();↵ | 18 | tableName = tableName.toUpperCase();↵ | |
19 | }↵ | 19 | }↵ | |
20 | tis = schemaInfo.getITableInfos(null, schema, tableName);↵ | 20 | tis = getTables(session, null, schema, tableName);↵ | |
21 | } | 21 |
| |
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 | 24 |
Number of mapped statements | 9 |
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) | 37.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (Character.isUpperCase(tableName.charAt(0))) | 11 | if (Character.isUpperCase(tableName.charAt(0))) | |||||||||||||
13 | tableName = tableName.toLowerCase(); | 12 | tableName = tableName.toLowerCase(); | |||||||||||||
else | else | |||||||||||||||
14 | tableName = tableName.toUpperCase(); | 13 | tableName = tableName.toUpperCase(); | |||||||||||||
15 | tis = schemaInfo.getITableInfos(null, schema, tableName); |
| 14 | tis = getTables(session, null, schema, tableName); | ||||||||||||
16 | if (tis.length == 0) | 15 | if (tis.length == 0) | |||||||||||||
17 | if (Character.isUpperCase(tableName.charAt(0))) | 16 | if (Character.isUpperCase(tableName.charAt(0))) | |||||||||||||
18 | tableName = tableName.toLowerCase(); | 17 | tableName = tableName.toLowerCase(); | |||||||||||||
else | else | |||||||||||||||
19 | tableName = tableName.toUpperCase(); | 18 | tableName = tableName.toUpperCase(); | |||||||||||||
20 | tis = schemaInfo.getITableInfos(null, schema, tableName); |
| 19 | tis = getTables(session, null, schema, tableName); |
Row | Violation |
---|---|
1 | Expression schemaInfo.getITableInfos(null,schema,tableName) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getTables(session,null,schema,tableName) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression schemaInfo.getITableInfos(null,schema,tableName) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression getTables(session,null,schema,tableName) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Clone fragment #1 returns variables tis, tableName , while Clone fragment #2 returns variables tis, tableName |