buffer.append( fkColumns[j] )
.append('=')
.append(alias)
.append('.')
.append( pkColumns[j] );
if ( j<fkColumns.length-1 ) buffer.append(" and ");
buf.append(tableAlias)
.append('.')
.append( lhs[i] )
.append(op)
.append( rhs[i] );
if (i<lhs.length-1) buf.append(" and ");
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/sql/ANSIJoinFragment.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/sql/ConditionFragment.java
|
Method name: void addJoin(String, String, String[], String[], int, String)
|
|
Method name: String toFragmentString()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | buffer.append( fkColumns[j] )↵ | | 1 | buf.append(tableAlias)↵
|
2 | .append('=')↵ | | 2 | .append('.')↵
|
3 | .append(alias)↵ | | 3 | .append( lhs[i] )↵
|
4 | .append('.')↵ | | 4 | .append(op)↵
|
5 | .append( pkColumns[j] );↵ | | 5 | .append( rhs[i] );↵
|
6 | if ( j<fkColumns.length-1 ) buffer.append(" and "); | | 6 | if (i<lhs.length-1) buf.append(" and ");
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 3 | buf.append(tableAlias).append('.').append(lhs[i]).append(op).append(rhs[i]); |
19 | buffer.append(fkColumns[j]).append('=').append(alias).append('.').append(pkColumns[j]); | | | |
20 | if (j < fkColumns.length - 1) | | 4 | if (i < lhs.length - 1) |
21 | | | 5 | |
Precondition Violations (0)
Row |
Violation |