if (getAutoRedirects()){ res.setURL(new URL(httpMethod.getURI().toString())); } // Store any cookies received in the cookie manager: saveConnectionCookies(httpMethod, res.getURL(), getCookieManager()); // Save cache information final CacheManager cacheManager = getCacheManager(); if (cacheManager != null){ cacheManager.saveDetails(httpMethod, res); } // Follow redirects and download page resources if appropriate: res = resultProcessing(areFollowingRedirect, frameDepth, res); log.debug("End : sample"); httpMethod.releaseConnection(); return res;
if (getAutoRedirects()) { res.setURL(new URL(httpMethod.getURI().toString())); } // Store any cookies received in the cookie manager: saveConnectionCookies(httpMethod, res.getURL(), getCookieManager()); // Save cache information final CacheManager cacheManager = getCacheManager(); if (cacheManager != null){ cacheManager.saveDetails(httpMethod, res); } // Follow redirects and download page resources if appropriate: res = resultProcessing(areFollowingRedirect, frameDepth, res); log.debug("End : sample"); httpMethod.releaseConnection(); return res;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/SoapSampler.java
Method name: HTTPSampleResult sample(URL, String, boolean, int) Method name: HTTPSampleResult sample(URL, String, boolean, int)
Number of AST nodes: 10 Number of AST nodes: 10
1
if (getAutoRedirects()){
1
if (getAutoRedirects()) {
2
                res.setURL(new URL(httpMethod.getURI().toString()));
2
                res.setURL(new URL(httpMethod.getURI().toString()));
3
            }
3
            }
4
            
4
            
5
			// Store any cookies received in the cookie manager:
5
// Store any cookies received in the cookie manager:
6
			saveConnectionCookies(httpMethod, res.getURL(), getCookieManager());
6
            saveConnectionCookies(httpMethod, res.getURL(), getCookieManager());
7
			
8
			
9
// Save cache information
7
            // Save cache information
10
            final CacheManager cacheManager = getCacheManager();
8
            final CacheManager cacheManager = getCacheManager();
11
            if (cacheManager != null){
9
            if (cacheManager != null){
12
                cacheManager.saveDetails(httpMethod, res);
10
                cacheManager.saveDetails(httpMethod, res);
13
            }
11
            }
14
			// Follow redirects and download page resources if appropriate:
12
            // Follow redirects and download page resources if appropriate:
15
			res = resultProcessing(areFollowingRedirect, frameDepth, res);
13
            res = resultProcessing(areFollowingRedirect, frameDepth, res);
16
			log.debug("End : sample");
14
            log.debug("End : sample");
17
			httpMethod.releaseConnection();
15
            httpMethod.releaseConnection();
18
			return res;
16
            return res;
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)1.1
Clones locationClones are in different classes having the same super class
Number of node comparisons50
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)4.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    62
    if (getAutoRedirects())
    48
    if (getAutoRedirects())
    63
    res.setURL(new URL(httpMethod.getURI().toString()));
    63
    res.setURL(new URL(httpMethod.getURI().toString()));
    49
    res.setURL(new URL(httpMethod.getURI().toString()));
    Differences
    Expression1Expression2Difference
    org.apache.commons.httpclient.HttpMethodBaseorg.apache.commons.httpclient.methods.PostMethodSUBCLASS_TYPE_MISMATCH
    49
    res.setURL(new URL(httpMethod.getURI().toString()));
    64
    saveConnectionCookies(httpMethod, res.getURL(), getCookieManager());
    64
    saveConnectionCookies(httpMethod, res.getURL(), getCookieManager());
    50
    saveConnectionCookies(httpMethod, res.getURL(), getCookieManager());
    Differences
    Expression1Expression2Difference
    org.apache.commons.httpclient.HttpMethodBaseorg.apache.commons.httpclient.methods.PostMethodSUBCLASS_TYPE_MISMATCH
    50
    saveConnectionCookies(httpMethod, res.getURL(), getCookieManager());
    65
    final CacheManager cacheManager = getCacheManager();
    51
    final CacheManager cacheManager = getCacheManager();
    66
    if (cacheManager != null)
    52
    if (cacheManager != null)
    67
    cacheManager.saveDetails(httpMethod, res);
    67
    cacheManager.saveDetails(httpMethod, res);
    53
    cacheManager.saveDetails(httpMethod, res);
    Differences
    Expression1Expression2Difference
    org.apache.commons.httpclient.HttpMethodBaseorg.apache.commons.httpclient.methods.PostMethodSUBCLASS_TYPE_MISMATCH
    53
    cacheManager.saveDetails(httpMethod, res);
    68
    res = resultProcessing(areFollowingRedirect, frameDepth, res);
    54
    res = resultProcessing(areFollowingRedirect, frameDepth, res);
    69
    log.debug("End : sample");
    55
    log.debug("End : sample");
    70
    httpMethod.releaseConnection();
    70
    httpMethod.releaseConnection();
    56
    httpMethod.releaseConnection();
    Differences
    Expression1Expression2Difference
    org.apache.commons.httpclient.HttpMethodBaseorg.apache.commons.httpclient.methods.PostMethodSUBCLASS_TYPE_MISMATCH
    56
    httpMethod.releaseConnection();
    71
    return res;
    57
    return res;
    Precondition Violations (0)
    Row Violation