Type type = parameterMetadata.getOrdinalParameterExpectedType( paramPosition + 1 );
if ( type == null ) {
type = defaultType;
}
return type;
Type type = parameterMetadata.getNamedParameterExpectedType( paramName );
if ( type == null ) {
type = guessType( paramValue );
}
return type;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/AbstractQueryImpl.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/AbstractQueryImpl.java
|
Method name: Type determineType(int, Object, Type)
|
|
Method name: Type determineType(String, Object)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | Type type = parameterMetadata.getOrdinalParameterExpectedType( paramPosition + 1 );↵ | | 1 | Type type = parameterMetadata.getNamedParameterExpectedType( paramName );↵
|
2 | if ( type == null ) {↵ | | 2 | if ( type == null ) {↵
|
3 | type = defaultType;↵ | | 3 | type = guessType( paramValue );↵
|
4 | }↵ | | 4 | }↵
|
5 | return type; | | 5 | return type;
|
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | Type type = parameterMetadata.getNamedParameterExpectedType(paramName); |
1 | Type type = parameterMetadata.getOrdinalParameterExpectedType(paramPosition + 1); | | | |
2 | if (type == null) | | 2 | if (type == null) |
3 | | | 3 | type = guessType(paramValue); |
4 | return type; | | 4 | return type; |
Precondition Violations (0)
Row |
Violation |