if ( ( ( ParameterContainer ) n ).hasEmbeddedParameters() ) {
ParameterSpecification[] specifications = ( ( ParameterContainer ) n ).getEmbeddedParameters();
if ( specifications != null ) {
collectedParameters.addAll( Arrays.asList( specifications ) );
}
}
if ( value != null ) {
if ( String.class.isAssignableFrom( value.getClass() ) ) {
// Its the listener class name
cfg.setListener( type, ( ( String ) value ) );
}
else {
// Its the listener instance (or better be)
cfg.setListener( type, value );
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/SqlGenerator.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/ExternalSessionFactoryConfig.java
|
Method name: void out(AST)
|
|
Method name: Configuration buildConfiguration()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if ( ( ( ParameterContainer ) n ).hasEmbeddedParameters() ) {↵ | | 1 | if ( ↵
|
2 | ParameterSpecification[] specifications = ( ( ParameterContainer ) n ).getEmbeddedParameters();↵ | | |
|
3 | if ( specifications != null ) {↵ | | |
|
4 | collectedParameters.addAll( Arrays.asList( specifications )↵ | | 2 | value != null ) {↵
|
| | | 3 | if ( String.class.isAssignableFrom( value.getClass() ) ) {↵
|
| | | 4 | // Its the listener class name↵
|
| | | 5 | cfg.setListener( type, ( ( String ) value ) );↵
|
| | | 6 | }↵
|
| | | 7 | else {↵
|
| | | 8 | // Its the listener instance (or better be)↵
|
5 | );↵ | | 9 | cfg.setListener( type, value );↵
|
6 | }↵ | | 10 | }↵
|
7 | } | | 11 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |