ISQLDatabaseMetaData md = TestUtil.getEasyMockSQLMetaData(fromDb, null);
TableColumnInfo column = TestUtil.getBlobColumnInfo(md, true);
//This is for brute force detection of BLOB/CLOB lengths if necessary
ResultSet rs = getColLengthResult();
testColType(md, toDb, column, rs);
ISQLDatabaseMetaData md = TestUtil.getEasyMockSQLMetaData(fromDb, null);
TableColumnInfo column = TestUtil.getBinaryColumnInfo(md, true);
// This is for brute force detection of columns whose column size is 0
ResultSet rs = getColLengthResult();
testColType(md, toDb, column, rs);
Clone fragments detected by clone detection tool
File path: /sql12/test/src/net/sourceforge/squirrel_sql/plugins/dbcopy/ColTypeMapperTest.java
|
|
File path: /sql12/test/src/net/sourceforge/squirrel_sql/plugins/dbcopy/ColTypeMapperTest.java
|
Method name: void testBlobColType(String, String)
|
|
Method name: void testBinaryColType(String, String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | ISQLDatabaseMetaData md = TestUtil.getEasyMockSQLMetaData(fromDb, null);↵ | | 1 | ISQLDatabaseMetaData md = TestUtil.getEasyMockSQLMetaData(fromDb, null);↵
|
2 | TableColumnInfo column = TestUtil.getBlobColumnInfo(md, true);↵ | | 2 | TableColumnInfo column = TestUtil.getBinaryColumnInfo(md, true);↵
|
3 | //This is for brute force detection of BLOB/CLOB lengths if necessary↵ | | 3 | // This is for brute force detection of columns whose column size is 0↵
|
4 | ResultSet rs = getColLengthResult();↵ | | 4 | ResultSet rs = getColLengthResult();↵
|
5 | testColType(md, toDb, column, rs); | | 5 | testColType(md, toDb, column, rs);
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | ISQLDatabaseMetaData md = TestUtil.getEasyMockSQLMetaData(fromDb, null); | | 1 | ISQLDatabaseMetaData md = TestUtil.getEasyMockSQLMetaData(fromDb, null); |
2 | TableColumnInfo column = TestUtil.getBlobColumnInfo(md, true); | | 2 | TableColumnInfo column = TestUtil.getBinaryColumnInfo(md, true); |
3 | ResultSet rs = getColLengthResult(); | | 3 | ResultSet rs = getColLengthResult(); |
4 | testColType(md, toDb, column, rs); | | 4 | testColType(md, toDb, column, rs); |
Precondition Violations (2)
Row |
Violation |
1 | Expression TestUtil.getBlobColumnInfo(md,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression TestUtil.getBinaryColumnInfo(md,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |