SimpleValue value = new SimpleValue(); value.setTypeName( "long" ); Property property = new Property(); property.setName( "id" ); property.setNodeName( "@id" ); property.setValue( value ); return property;
SimpleValue value = new SimpleValue(); value.setTypeName( "string" ); Property property = new Property(); property.setName( "name" ); property.setNodeName( "name" ); property.setValue( value ); return property;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/entitymode/dom4j/accessors/Dom4jAccessorTest.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/entitymode/dom4j/accessors/Dom4jAccessorTest.java
Method name: Property generateIdProperty() Method name: Property generateNameProperty()
Number of AST nodes: 7 Number of AST nodes: 7
1
SimpleValue value = new SimpleValue();
1
SimpleValue value = new SimpleValue();
2
		value.setTypeName( "long" );
2
		value.setTypeName( "string" );
3
		Property property = new Property();
3
		Property property = new Property();
4
		property.setName( "id" );
4
		property.setName( "name" );
5
		property.setNodeName( "@id" );
5
		property.setNodeName( "name" );
6
		property.setValue( value );
6
		property.setValue( value );
7
		return property;
7
		return property;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
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 comparisons21
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    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
    1
    SimpleValue value = new SimpleValue();
    1
    SimpleValue value = new SimpleValue();
    2
    value.setTypeName("long");
    2
    value.setTypeName("long");
    2
    value.setTypeName("string");
    Differences
    Expression1Expression2Difference
    "long""string"LITERAL_VALUE_MISMATCH
    2
    value.setTypeName("string");
    3
    Property property = new Property();
    3
    Property property = new Property();
    4
    property.setName("id");
    4
    property.setName("id");
    4
    property.setName("name");
    Differences
    Expression1Expression2Difference
    "id""name"LITERAL_VALUE_MISMATCH
    4
    property.setName("name");
    5
    property.setNodeName("@id");
    5
    property.setNodeName("@id");
    5
    property.setNodeName("name");
    Differences
    Expression1Expression2Difference
    "@id""name"LITERAL_VALUE_MISMATCH
    5
    property.setNodeName("name");
    6
    property.setValue(value);
    6
    property.setValue(value);
    7
    return property;
    7
    return property;
    Precondition Violations (0)
    Row Violation