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: int[] getColumnTypes(ISQLConnection, ITableInfo, String[])
|
Method name: int[] getColumnTypes(ISQLConnection, ITableInfo, String[])
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | TableColumnInfo[] tciArr = con.getSQLMetaData().getColumnInfo(ti);↵ | 1 | TableColumnInfo[] tciArr = con.getSQLMetaData().getColumnInfo(ti);↵ | |
2 | int[] result = new int[tciArr.length];↵ | 2 | int[] result = new int[tciArr.length];↵ | |
3 | for (int i = 0; i < tciArr.length; i++)↵ | 3 | for (int i = 0; i < tciArr.length; i++)↵ | |
4 | {↵ | 4 | {↵ | |
5 | boolean found = false;↵ | 5 | boolean found = false;↵ | |
6 | for (int j = 0; j < colNames.length && !found; j++)↵ | 6 | for (int j = 0; j < colNames.length && !found; j++)↵ | |
7 | {↵ | 7 | {↵ | |
8 | String columnName = colNames[j];↵ | 8 | String columnName = colNames[j];↵ | |
9 | if (tciArr[i].getColumnName().equalsIgnoreCase(columnName))↵ | 9 | if (tciArr[i].getColumnName().equalsIgnoreCase(columnName))↵ | |
10 | {↵ | 10 | {↵ | |
11 | result[i] = tciArr[i].getDataType();↵ | 11 | result[i] = tciArr[i].getDataType();↵ | |
12 | found = true;↵ | 12 | found = true;↵ | |
13 | }↵ | 13 | }↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | return result; | 16 |
| |
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 in different classes |
Number of node comparisons | 28 |
Number of mapped statements | 10 |
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) | 5.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | TableColumnInfo[] tciArr = con.getSQLMetaData().getColumnInfo(ti); | 1 | TableColumnInfo[] tciArr = con.getSQLMetaData().getColumnInfo(ti); | |
2 | int[] result = new int[tciArr.length]; | 2 | int[] result = new int[tciArr.length]; | |
3 | for (int i = 0; i < tciArr.length; i++) | 3 | for (int i = 0; i < tciArr.length; i++) | |
4 | boolean found = false; | 4 | boolean found = false; | |
5 | for (int j = 0; j < colNames.length && !found; j++) | 5 | for (int j = 0; j < colNames.length && !found; j++) | |
6 | String columnName = colNames[j]; | 6 | String columnName = colNames[j]; | |
7 | if (tciArr[i].getColumnName().equalsIgnoreCase(columnName)) | 7 | if (tciArr[i].getColumnName().equalsIgnoreCase(columnName)) | |
8 | result[i] = tciArr[i].getDataType(); | 8 | result[i] = tciArr[i].getDataType(); | |
9 | found = true; | 9 | found = true; | |
10 | return result; | 10 | return result; |
Row | Violation |
---|