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: 6 | Number of AST nodes: 6 | |||
1 | if (startIndex < 0)↵ | 1 | if (startIndex < 0)↵ | |
2 | throw new IllegalArgumentException("startIndex must be >= 0");↵ | 2 | throw new IllegalArgumentException("startIndex must be >= 0");↵ | |
3 | if (resultCount <= 0)↵ | 3 | if (resultCount <= 0)↵ | |
4 | throw new IllegalArgumentException("resultCount must be > 0");↵ | 4 | throw new IllegalArgumentException("resultCount must be > 0");↵ | |
5 | ↵ | |||
5 | Command command = new SearchCommand(new SearchCommandReference(searchTerm,↵ | 6 | Command command = new SearchCommand(new SearchCommandReference(searchTerm,↵ | |
6 | startIndex, resultCount, searchInside));↵ | 7 | providerName, startIndex, resultCount↵ | |
7 | ↵ | 8 | ));↵ | |
8 | // fire up search command↵ | 9 | // fire up search command↵ | |
9 | CommandProcessor.getInstance().addOp(command); | 10 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 12 |
Number of mapped statements | 6 |
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) | 1.5 |
Clone type | Type 2 |
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"); | |||||||||||||||||||||||||
7 | Command command = new SearchCommand(new SearchCommandReference(searchTerm, startIndex, resultCount, searchInside)); |
| 9 | Command command = new SearchCommand(new SearchCommandReference(searchTerm, providerName, startIndex, resultCount)); | ||||||||||||||||||||||||
8 | CommandProcessor.getInstance().addOp(command); | 10 | CommandProcessor.getInstance().addOp(command); |
Row | Violation |
---|---|
1 | Type int of variable startIndex does not match with type java.lang.String of variable providerName |
2 | Type boolean of variable searchInside does not match with type int of variable resultCount |