if (component!=null) { String[] propertyNames = type.getPropertyNames(); Type[] subtypes = type.getSubtypes(); Object[] values = type.getPropertyValues( component, getEntityMode(criteria, criteriaQuery) ); for (int i=0; i<propertyNames.length; i++) { Object value = values[i]; Type subtype = subtypes[i]; String subpath = StringHelper.qualify( path, propertyNames[i] ); if ( isPropertyIncluded(value, subpath, subtype) ) { if ( subtype.isComponentType() ) { addComponentTypedValues(subpath, value, (AbstractComponentType) subtype, list, criteria, criteriaQuery); } else { addPropertyTypedValue(value, subtype, list); } } } }
String[] propertyNames = type.getPropertyNames(); Object[] values = type.getPropertyValues( component, getEntityMode(criteria, criteriaQuery) ); Type[] subtypes = type.getSubtypes(); for (int i=0; i<propertyNames.length; i++) { String subpath = StringHelper.qualify( path, propertyNames[i] ); Object value = values[i]; if ( isPropertyIncluded( value, subpath, subtypes[i] ) ) { Type subtype = subtypes[i]; if ( subtype.isComponentType() ) { appendComponentCondition( subpath, value, (AbstractComponentType) subtype, criteria, criteriaQuery, buf );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/criterion/Example.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/criterion/Example.java
Method name: void addComponentTypedValues(String, Object, AbstractComponentType, List, Criteria, CriteriaQuery) Method name: void appendComponentCondition(String, Object, AbstractComponentType, Criteria, CriteriaQuery, StringBuffer)
Number of AST nodes: 12 Number of AST nodes: 7
1
if (component!=null) {
2
			String[] propertyNames = type.getPropertyNames();
1
String[] propertyNames = type.getPropertyNames();
3
			Type[] subtypes = type.getSubtypes();
2
			
4
			Object[] values = type.getPropertyValues( component, getEntityMode(criteria, criteriaQuery) );
3
Object[] values = type.getPropertyValues( component, getEntityMode(criteria, criteriaQuery) );
5
			
4
			Type[] subtypes = type.getSubtypes();
6
for (int i=0; i<propertyNames.length; i++) {
5
			for (int i=0; i<propertyNames.length; i++) {
7
				Object value = values[i];
6
				
8
				Type subtype = subtypes[i];
9
				String subpath = StringHelper.qualify( path, propertyNames[i] );
7
String subpath = StringHelper.qualify( path, propertyNames[i] );
10
				
8
				Object value = values[i];
11
if ( isPropertyIncluded(value, subpath, subtype) ) {
9
				if ( isPropertyIncluded( value, subpath, subtypes[i] ) ) {
12
					
10
					Type subtype = subtypes[i];
13
if ( subtype.isComponentType() ) {
11
					if ( subtype.isComponentType() ) {
14
						addComponentTypedValues(subpath, value, 
12
						appendComponentCondition(
13
							subpath,
14
							value,
15
(AbstractComponentType) subtype, list, 
15
							(AbstractComponentType) subtype,
16
criteria, criteriaQuery);
16
							criteria,
17
					}
18
					else {
19
						addPropertyTypedValue(value, subtype, list);
20
					}
21
				}
22
			}
23
		}
17
							criteriaQuery,
18
							buf
19
						);
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.0
Clones locationClones are declared in the same class
Number of node comparisons0