jbcFactory.releaseCache(collectionConfig); jbcCollectionCache = null; if (collectionConfig.equals(queryConfig)) queryConfig = null; if (collectionConfig.equals(tsConfig)) tsConfig = null; collectionConfig = null;
jbcFactory.releaseCache(queryConfig); jbcQueryCache = null; if (queryConfig.equals(tsConfig)) tsConfig = null; queryConfig = 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: 7 Number of AST nodes: 5
1
jbcFactory.releaseCache(collectionConfig);
1
jbcFactory.releaseCache(queryConfig);
2
                jbcCollectionCache = null;
2
                jbcQueryCache = null;
3
                
3
                
4
                if (collectionConfig.equals(queryConfig))
4
                if (
5
                    queryConfig = null;
6
                if (collectionConfig.equals(tsConfig))
5
queryConfig.equals(tsConfig))
7
                    tsConfig = null;
6
                    tsConfig = null;
8
                collectionConfig = null;
7
                queryConfig = 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.3
Clones locationClones are in the same method
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    14
    jbcFactory.releaseCache(collectionConfig);
    14
    jbcFactory.releaseCache(collectionConfig);
    23
    jbcFactory.releaseCache(queryConfig);
    Differences
    Expression1Expression2Difference
    collectionConfigqueryConfigVARIABLE_NAME_MISMATCH
    23
    jbcFactory.releaseCache(queryConfig);
    15
    jbcCollectionCache = null;
    15
    jbcCollectionCache = null;
    24
    jbcQueryCache = null;
    Differences
    Expression1Expression2Difference
    jbcCollectionCachejbcQueryCacheVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression jbcCollectionCache is a field being modified, and thus it cannot be parameterized
    Expression jbcQueryCache is a field being modified, and thus it cannot be parameterized
    24
    jbcQueryCache = null;
    16
    if (collectionConfig.equals(queryConfig))
    16
    if (collectionConfig.equals(queryConfig))
    25
    if (queryConfig.equals(tsConfig))
    Differences
    Expression1Expression2Difference
    queryConfigtsConfigVARIABLE_NAME_MISMATCH
    collectionConfigqueryConfigVARIABLE_NAME_MISMATCH
    25
    if (queryConfig.equals(tsConfig))
    17
    queryConfig = null;
    17
    queryConfig = null;
    26
    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
    26
    tsConfig = null;
    19
    tsConfig = null;
                                        
    20
    collectionConfig = null;
    20
    collectionConfig = null;
    27
    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
    27
    queryConfig = null;
    Precondition Violations (6)
    Row Violation
    1Expression jbcCollectionCache is a field being modified, and thus it cannot be parameterized
    2Expression jbcQueryCache is a field being modified, and thus it cannot be parameterized
    3Expression queryConfig is a field being modified, and thus it cannot be parameterized
    4Expression tsConfig is a field being modified, and thus it cannot be parameterized
    5Expression collectionConfig is a field being modified, and thus it cannot be parameterized
    6Expression queryConfig is a field being modified, and thus it cannot be parameterized