if(searchBar == null)
searchBar = new SearchBar(this,true);
if(searchBar.getParent() == null)
addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);
searchBar.setHyperSearch(false);
if(searchBar == null)
searchBar = new SearchBar(this,true);
if(searchBar.getParent() == null)
addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);
searchBar.setHyperSearch(true);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/View.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/View.java
|
Method name: void quickIncrementalSearch(boolean)
|
|
Method name: void quickHyperSearch(boolean)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if(searchBar == null)↵ | | 1 | if(searchBar == null)↵
|
2 | searchBar = new SearchBar(this,true);↵ | | 2 | searchBar = new SearchBar(this,true);↵
|
3 | if(searchBar.getParent() == null)↵ | | 3 | if(searchBar.getParent() == null)↵
|
4 | addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);↵ | | 4 | addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);↵
|
|
5 | searchBar.setHyperSearch(false); | | 5 | searchBar.setHyperSearch(true);
|
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (searchBar == null) | | 13 | if (searchBar == null) |
2 | searchBar = new SearchBar(this, true); | | 14 | searchBar = new SearchBar(this, true); |
3 | if (searchBar.getParent() == null) | | 15 | if (searchBar.getParent() == null) |
4 | addToolBar(TOP_GROUP, SEARCH_BAR_LAYER, searchBar); | | 16 | addToolBar(TOP_GROUP, SEARCH_BAR_LAYER, searchBar); |
5 | searchBar.setHyperSearch(false); | | 17 | searchBar.setHyperSearch(true); |
Precondition Violations (0)
Row |
Violation |