Type expectedType = null; // we have something like : "lhs [op] ?" if ( isDateTimeType( lhType ) ) { // more specifically : "datetime [op] ?" // 1) if the operator is MINUS, we really cannot determine // the expected type as either another datetime or // numeric would be valid // 2) if the operator is PLUS, the param needs to be of // some numeric type if ( getType() == HqlSqlTokenTypes.PLUS ) { expectedType = Hibernate.DOUBLE; } } else { expectedType = lhType; } ( ( ExpectedTypeAwareNode ) rhs ).setExpectedType( expectedType );
if ( owner.hasDom4jRepresentation() ) { if ( tuplizerClassName == null ) { dom4jTuplizer = componentTuplizerFactory.constructDefaultTuplizer( EntityMode.DOM4J, component ); } else { dom4jTuplizer = componentTuplizerFactory.constructTuplizer( tuplizerClassName, component ); } } else { dom4jTuplizer = null; }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/BinaryArithmeticOperatorNode.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/component/ComponentEntityModeToTuplizerMapping.java
Method name: void initialize() Method name: void ComponentEntityModeToTuplizerMapping(Component)
Number of AST nodes: 6 Number of AST nodes: 5
1
Type expectedType = null;
2
			// we have something like : "lhs [op] ?"
3
			if ( isDateTimeType( lhType )
1
if ( owner.hasDom4jRepresentation() ) {
4
 ) {
2
			if ( tuplizerClassName == null ) {
5
				// more specifically : "datetime [op] ?"
3
				
6
				//      1) if the operator is MINUS, we really cannot determine
7
				//          the expected type as either another datetime or
8
				//          numeric would be valid
9
				//      2) if the operator is PLUS, the param needs to be of
10
				//          some numeric type
11
				if ( getType() == HqlSqlTokenTypes.PLUS ) {
12
					expectedType = Hibernate.DOUBLE;
4
dom4jTuplizer = componentTuplizerFactory.constructDefaultTuplizer( EntityMode.DOM4J, component );
5
			}
6
			else {
7
				dom4jTuplizer = componentTuplizerFactory.constructTuplizer( tuplizerClassName, component );
13
				}
8
			}
14
			}
9
		
15
	
10
}
16
		else {
11
		else {
17
				expectedType = lhType;
12
			
18
			}
19
			( ( ExpectedTypeAwareNode ) rhs ).setExpectedType( expectedType );
13
dom4jTuplizer = null;
14
		}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons1