synchronized (formEncodings) { String formEncoding = (String) formEncodings.get(urlWithoutQuery); // Form encoding has priority over page encoding if (formEncoding != null) { contentEncoding = formEncoding; } }
if(auth != null) { String authHeader = auth.getAuthHeaderForURL(url); if(authHeader != null) { ++hsz; } }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/AjpSampler.java
Method name: void populateSampler(Map, Map) Method name: int getHeaderSize(String, URL)
Number of AST nodes: 4 Number of AST nodes: 4
1
synchronized (formEncodings) {
1
if(auth != null) {
2
                    String formEncoding = (String) formEncodings.get(urlWithoutQuery);
2
                String 
3
                    // Form encoding has priority over page encoding
4
                    if (formEncoding != null) {
5
                        contentEncoding = formEncoding;
6
                    }
7
        
3
authHeader = auth.getAuthHeaderForURL(url);
4
            if(authHeader != null) {
5
            ++hsz;
6
            }
8
        }
7
        }
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.1
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)27.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    35
    String formEncoding = (String)formEncodings.get(urlWithoutQuery);
    35
    String formEncoding = (String)formEncodings.get(urlWithoutQuery);
    15
    String authHeader = auth.getAuthHeaderForURL(url);
    Differences
    Expression1Expression2Difference
    formEncodingauthHeaderVARIABLE_NAME_MISMATCH
    (String)formEncodings.get(urlWithoutQuery)auth.getAuthHeaderForURL(url)TYPE_COMPATIBLE_REPLACEMENT
    15
    String authHeader = auth.getAuthHeaderForURL(url);
    36
    if (formEncoding != null)
    36
    if (formEncoding != null)
    16
    if (authHeader != null)
    Differences
    Expression1Expression2Difference
    formEncodingauthHeaderVARIABLE_NAME_MISMATCH
    16
    if (authHeader != null)
                        
    17
    ++hsz;
    37
    contentEncoding = formEncoding;
                                                                      
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables formEncoding , while Clone fragment #2 returns variables