jbcFactory.releaseCache(entityConfig); jbcEntityCache = null; // Make sure we don't re-release the same cache if (entityConfig.equals(collectionConfig)) collectionConfig = null; if (entityConfig.equals(queryConfig)) queryConfig = null; if (entityConfig.equals(tsConfig)) tsConfig = null; entityConfig = null;
jbcFactory.releaseCache(collectionConfig); jbcCollectionCache = null; if (collectionConfig.equals(queryConfig)) queryConfig = null; if (collectionConfig.equals(tsConfig)) tsConfig = null; collectionConfig = null;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/MultiplexingCacheInstanceManager.java File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/MultiplexingCacheInstanceManager.java
Method name: void releaseCaches() Method name: void releaseCaches()
Number of AST nodes: 9 Number of AST nodes: 7
1
jbcFactory.releaseCache(entityConfig);
1
jbcFactory.releaseCache(collectionConfig);
2
                jbcEntityCache = null;
2
                jbcCollectionCache = null;
3
                
3
                
4
                // Make sure we don't re-release the same cache
4
                
5
                if (entityConfig.equals(collectionConfig))
6
                    collectionConfig = null;
7
                if (entityConfig.equals(queryConfig))
5
if (collectionConfig.equals(queryConfig))
8
                    queryConfig = null;
6
                    queryConfig = null;
9
                if (entityConfig.equals(tsConfig))
7
                if (collectionConfig.equals(tsConfig))
10
                    tsConfig = null;
8
                    tsConfig = null;
11
                entityConfig = null;
9
                collectionConfig = null;
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.5
Clones locationClones are in the same method
Number of node comparisons20
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.4
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    3
    jbcFactory.releaseCache(entityConfig);
    3
    jbcFactory.releaseCache(entityConfig);
    14
    jbcFactory.releaseCache(collectionConfig);
    Differences
    Expression1Expression2Difference
    entityConfigcollectionConfigVARIABLE_NAME_MISMATCH
    14
    jbcFactory.releaseCache(collectionConfig);
    4
    jbcEntityCache = null;
    4
    jbcEntityCache = null;
    15
    jbcCollectionCache = null;
    Differences
    Expression1Expression2Difference
    jbcEntityCachejbcCollectionCacheVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression jbcEntityCache is a field being modified, and thus it cannot be parameterized
    Expression jbcCollectionCache is a field being modified, and thus it cannot be parameterized
    15
    jbcCollectionCache = null;
    5
    if (entityConfig.equals(collectionConfig))
    5
    if (entityConfig.equals(collectionConfig))
    16
    if (collectionConfig.equals(queryConfig))
    Differences
    Expression1Expression2Difference
    collectionConfigqueryConfigVARIABLE_NAME_MISMATCH
    entityConfigcollectionConfigVARIABLE_NAME_MISMATCH
    16
    if (collectionConfig.equals(queryConfig))
    6
    collectionConfig = null;
    6
    collectionConfig = null;
    17
    queryConfig = null;
    Differences
    Expression1Expression2Difference
    collectionConfigqueryConfigVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression collectionConfig is a field being modified, and thus it cannot be parameterized
    Expression queryConfig is a field being modified, and thus it cannot be parameterized
    17
    queryConfig = null;
    7
    if (entityConfig.equals(queryConfig))
    7
    if (entityConfig.equals(queryConfig))
    18
    if (collectionConfig.equals(tsConfig))
    Differences
    Expression1Expression2Difference
    queryConfigtsConfigVARIABLE_NAME_MISMATCH
    entityConfigcollectionConfigVARIABLE_NAME_MISMATCH
    18
    if (collectionConfig.equals(tsConfig))
    8
    queryConfig = null;
    8
    queryConfig = null;
    19
    tsConfig = null;
    Differences
    Expression1Expression2Difference
    queryConfigtsConfigVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression queryConfig is a field being modified, and thus it cannot be parameterized
    Expression tsConfig is a field being modified, and thus it cannot be parameterized
    19
    tsConfig = null;
    10
    tsConfig = null;
                                        
    11
    entityConfig = null;
    11
    entityConfig = null;
    20
    collectionConfig = null;
    Differences
    Expression1Expression2Difference
    entityConfigcollectionConfigVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression entityConfig is a field being modified, and thus it cannot be parameterized
    Expression collectionConfig is a field being modified, and thus it cannot be parameterized
    20
    collectionConfig = null;
    Precondition Violations (8)
    Row Violation
    1Expression jbcEntityCache is a field being modified, and thus it cannot be parameterized
    2Expression jbcCollectionCache is a field being modified, and thus it cannot be parameterized
    3Expression collectionConfig is a field being modified, and thus it cannot be parameterized
    4Expression queryConfig is a field being modified, and thus it cannot be parameterized
    5Expression queryConfig is a field being modified, and thus it cannot be parameterized
    6Expression tsConfig is a field being modified, and thus it cannot be parameterized
    7Expression entityConfig is a field being modified, and thus it cannot be parameterized
    8Expression collectionConfig is a field being modified, and thus it cannot be parameterized