Any element = new Any( collection.getCollectionTable() ); collection.setElement( element ); bindAny( subnode, element, true, mappings );
SimpleValue elt = new SimpleValue( collection.getCollectionTable() ); collection.setElement( elt ); bindSimpleValue( subnode, elt, true, Collection.DEFAULT_ELEMENT_COLUMN_NAME, mappings );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/HbmBinder.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/HbmBinder.java
Method name: void bindCollectionSecondPass(Element, Collection, java.util.Map, Mappings, java.util.Map) Method name: void bindCollectionSecondPass(Element, Collection, java.util.Map, Mappings, java.util.Map)
Number of AST nodes: 3 Number of AST nodes: 3
1
Any element = new Any( collection.getCollectionTable() );
1
SimpleValue elt = new SimpleValue( collection.getCollectionTable() );
2
				collection.setElement( element );
2
				collection.setElement( elt );
3
				bindAny( subnode, element, true, 
3
				bindSimpleValue(
4
						subnode,
5
						elt,
6
						true,
7
						Collection.DEFAULT_ELEMENT_COLUMN_NAME,
4
mappings 
8
						mappings
5
);
9
					);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in the same method
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    45
    Any element = new Any(collection.getCollectionTable());
    45
    Any element = new Any(collection.getCollectionTable());
    32
    SimpleValue elt = new SimpleValue(collection.getCollectionTable());
    Differences
    Expression1Expression2Difference
    org.hibernate.mapping.Anyorg.hibernate.mapping.SimpleValueSUBCLASS_TYPE_MISMATCH
    elementeltVARIABLE_NAME_MISMATCH
    org.hibernate.mapping.Anyorg.hibernate.mapping.SimpleValueSUBCLASS_TYPE_MISMATCH
    org.hibernate.mapping.Anyorg.hibernate.mapping.SimpleValueSUBCLASS_TYPE_MISMATCH
    32
    SimpleValue elt = new SimpleValue(collection.getCollectionTable());
    46
    collection.setElement(element);
    46
    collection.setElement(element);
    33
    collection.setElement(elt);
    Differences
    Expression1Expression2Difference
    elementeltVARIABLE_NAME_MISMATCH
    org.hibernate.mapping.Anyorg.hibernate.mapping.SimpleValueSUBCLASS_TYPE_MISMATCH
    33
    collection.setElement(elt);
    47
    bindAny(subnode, element, true, mappings);
    47
    bindAny(subnode, element, true, mappings);
    34
    bindSimpleValue(subnode, elt, true, Collection.DEFAULT_ELEMENT_COLUMN_NAME, mappings);
    Differences
    Expression1Expression2Difference
    bindAnybindSimpleValueMETHOD_INVOCATION_NAME_MISMATCH
    bindAny(subnode,element,true,mappings)bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression bindAny(subnode,element,true,mappings) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bindAny(subnode,element,true,mappings) is a void method call, and thus it cannot be parameterized
    Expression bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings) is a void method call, and thus it cannot be parameterized
    Expression bindAny(subnode,element,true,mappings) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bindAny(subnode,element,true,mappings) is a void method call, and thus it cannot be parameterized
    Expression bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings) is a void method call, and thus it cannot be parameterized
    34
    bindSimpleValue(subnode, elt, true, Collection.DEFAULT_ELEMENT_COLUMN_NAME, mappings);
    Precondition Violations (8)
    Row Violation
    1Expression bindAny(subnode,element,true,mappings) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression bindAny(subnode,element,true,mappings) is a void method call, and thus it cannot be parameterized
    4Expression bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings) is a void method call, and thus it cannot be parameterized
    5Expression bindAny(subnode,element,true,mappings) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression bindAny(subnode,element,true,mappings) is a void method call, and thus it cannot be parameterized
    8Expression bindSimpleValue(subnode,elt,true,Collection.DEFAULT_ELEMENT_COLUMN_NAME,mappings) is a void method call, and thus it cannot be parameterized