private void addUnwrapper(
ClassFile classfile,
Bytecode code,
Class type) {
int index = FactoryHelper.typeIndex( type );
String wrapperType = FactoryHelper.wrapperTypes[index];
// checkcast
code.addCheckcast( wrapperType );
// invokevirtual
code.addInvokevirtual( wrapperType, FactoryHelper.unwarpMethods[index], FactoryHelper.unwrapDesc[index] );
public int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) throws SQLException {
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:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | private void addUnwrapper(↵ | | 1 | p↵
|
2 | ClassFile classfile,↵ | | |
|
3 | Bytecode code,↵ | | |
|
4 | Class type) {↵ | | |
|
5 | int index = FactoryHelper.typeIndex( type );↵ | | |
|
6 | String wrapperType = FactoryHelper.wrapperTypes[index];↵ | | |
|
7 | // checkcast↵ | | |
|
8 | code.addCheckcast( wrapperType );↵ | | |
|
9 | // invokevirtual↵ | | |
|
10 | code.addInvokevirtual( wrapperType, FactoryHelper.unwarpMethods[index], FactoryHelper.unwrapDesc[index]↵ | | 2 | ublic int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) throws SQLException {↵
|
| | | 3 | Type type = qp.getPositionalParameterTypes()[hqlPosition];↵
|
| | | 4 | Object value = qp.getPositionalParameterValues()[hqlPosition];↵
|
|
| | | 5 | type.nullSafeSet( statement, value, position, session );↵
|
11 | );↵ | | 6 | return type.getColumnSpan( session.getFactory() );↵
|
12 | | | 7 |
|
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 | |
Number of node comparisons | 0 |