Option option = new Option(); option.setDataVersion( NonLockingDataVersion.INSTANCE ); cache.remove( regionFqn, option );
Option option = new Option(); option.setDataVersion( NonLockingDataVersion.INSTANCE ); cache.put( new Fqn( regionFqn, key ), ITEM, value, option );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java
Method name: void clear() Method name: void update(Object, Object)
Number of AST nodes: 3 Number of AST nodes: 3
1
Option option = new Option();
1
Option option = new Option();
2
			option.setDataVersion( NonLockingDataVersion.INSTANCE );
2
			option.setDataVersion( NonLockingDataVersion.INSTANCE );
3
			cache.remove( regionFqn, option );
3
			cache.put( new Fqn( regionFqn, key ), ITEM, value, option );
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 declared in the same class
Number of node comparisons5
  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
    2
    Option option = new Option();
    2
    Option option = new Option();
    3
    option.setDataVersion(NonLockingDataVersion.INSTANCE);
    3
    option.setDataVersion(NonLockingDataVersion.INSTANCE);
    4
    cache.remove(regionFqn, option);
    4
    cache.remove(regionFqn, option);
    4
    cache.put(new Fqn(regionFqn, key), ITEM, value, option);
    Differences
    Expression1Expression2Difference
    removeputMETHOD_INVOCATION_NAME_MISMATCH
    cache.remove(regionFqn,option)cache.put(new Fqn(regionFqn,key),ITEM,value,option)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression cache.remove(regionFqn,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cache.remove(regionFqn,option) is a void method call, and thus it cannot be parameterized
    Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) is a void method call, and thus it cannot be parameterized
    Expression cache.remove(regionFqn,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cache.remove(regionFqn,option) is a void method call, and thus it cannot be parameterized
    Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) is a void method call, and thus it cannot be parameterized
    4
    cache.put(new Fqn(regionFqn, key), ITEM, value, option);
    Precondition Violations (8)
    Row Violation
    1Expression cache.remove(regionFqn,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression cache.remove(regionFqn,option) is a void method call, and thus it cannot be parameterized
    4Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) is a void method call, and thus it cannot be parameterized
    5Expression cache.remove(regionFqn,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression cache.remove(regionFqn,option) is a void method call, and thus it cannot be parameterized
    8Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) is a void method call, and thus it cannot be parameterized