int index = FactoryHelper.typeIndex( type );
String wrapperType = FactoryHelper.wrapperTypes[index];
// checkcast
code.addCheckcast( wrapperType );
// invokevirtual
code.addInvokevirtual( wrapperType, FactoryHelper.unwarpMethods[index], FactoryHelper.unwrapDesc[index] );
Type type = qp.getPositionalParameterTypes()[hqlPosition];
Object value = qp.getPositionalParameterValues()[hqlPosition];
type.nullSafeSet( statement, value, position, session );
return type.getColumnSpan( session.getFactory() );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/javassist/BulkAccessorFactory.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/param/PositionalParameterSpecification.java
|
Method name: void addUnwrapper(ClassFile, Bytecode, Class)
|
|
Method name: int bind(PreparedStatement, QueryParameters, SessionImplementor, int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | int index = FactoryHelper.typeIndex( type );↵ | | |
|
2 | String wrapperType = FactoryHelper.wrapperTypes[index↵ | | 1 | Type type = qp.getPositionalParameterTypes()[hqlPosition];↵
|
3 | ];↵ | | 2 | Object value = qp.getPositionalParameterValues()[hqlPosition];↵
|
|
4 | // checkcast↵ | | 3 | ↵
|
5 | code.addCheckcast( wrapperType );↵ | | |
|
6 | // invokevirtual↵ | | |
|
7 | code.addInvokevirtual( wrapperType, FactoryHelper.unwarpMethods[index], FactoryHelper.unwrapDesc[index]↵ | | 4 | type.nullSafeSet( statement, value, position, session );↵
|
8 | ); | | 5 | return type.getColumnSpan( session.getFactory() );
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 16 |