throw new IllegalArgumentException("searchTerm == null");
if (startIndex < 0)
throw new IllegalArgumentException("startIndex must be >= 0");
if (resultCount <= 0)
throw new IllegalArgumentException("resultCount must be > 0");
throw new IllegalArgumentException("providerName == null");
if (startIndex < 0)
throw new IllegalArgumentException("startIndex must be >= 0");
if (resultCount <= 0)
throw new IllegalArgumentException("resultCount must be > 0");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java
|
Method name: void executeSearch(String, boolean, int, int)
|
|
Method name: void executeSearch(String, String, boolean, int, int)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | throw new IllegalArgumentException("searchTerm == null");↵ | | 1 | throw new IllegalArgumentException("providerName == null");↵
|
2 | if (startIndex < 0)↵ | | 2 | if (startIndex < 0)↵
|
3 | throw new IllegalArgumentException("startIndex must be >= 0");↵ | | 3 | throw new IllegalArgumentException("startIndex must be >= 0");↵
|
4 | if (resultCount <= 0)↵ | | 4 | if (resultCount <= 0)↵
|
5 | throw new IllegalArgumentException("resultCount must be > 0"); | | 5 | throw new IllegalArgumentException("resultCount must be > 0");
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | if (startIndex < 0) | | 5 | if (startIndex < 0) |
4 | throw new IllegalArgumentException("startIndex must be >= 0"); | | 6 | throw new IllegalArgumentException("startIndex must be >= 0"); |
5 | if (resultCount <= 0) | | 7 | if (resultCount <= 0) |
6 | throw new IllegalArgumentException("resultCount must be > 0"); | | 8 | throw new IllegalArgumentException("resultCount must be > 0"); |
Precondition Violations (0)
Row |
Violation |