while (srch.hasMore()) { // If there's anything left ... final SearchResult sr = (SearchResult) srch.next(); normaliseSearchDN(sr, searchBase, rootDn); writeSearchResult(sr, xmlb); }
while (srch.hasMore() && (sortedResults.size() < MAX_SORTED_RESULTS)) { final SearchResult sr = (SearchResult) srch.next(); // must be done prior to sorting normaliseSearchDN(sr, searchBase, rootDn); sortedResults.add(sr); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java
Method name: void writeSearchResults(XMLBuffer, NamingEnumeration) Method name: void writeSearchResults(XMLBuffer, NamingEnumeration)
Number of AST nodes: 4 Number of AST nodes: 4
1
while (srch.hasMore()) { // If there's anything left ...
1
while (srch.hasMore()
2
        
2
 && (sortedResults.size() < MAX_SORTED_RESULTS)) {
3
    final SearchResult    sr = (SearchResult) srch.next();
3
			    final SearchResult    sr = (SearchResult) srch.next();
4
        
4
			        // must be done prior to sorting
5
    normaliseSearchDN(sr, searchBase, rootDn);
5
			    normaliseSearchDN(sr, searchBase, rootDn);
6
            writeSearchResult(sr, xmlb);
6
			    
7
        
7
sortedResults.add(sr);
8
}
8
			}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in the same method
Number of node comparisons1