this.pattern = pattern;
this.source = source;
this.replaceWith = new String();
casesensitive = false;
matchwholeword = false;
backwards = false;
isFound = false;
lastreplaceposition = lastfoundposition = -1;
m = null;
p = null;
this.pattern = pattern;
this.source = source;
this.replaceWith = replaceWith;
casesensitive = false;
matchwholeword = false;
backwards = false;
isFound = false;
lastreplaceposition = lastfoundposition = -1;
m = null;
p = null;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/util/FindReplace.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/util/FindReplace.java
|
Method name: void FindReplace(String, String)
|
|
Method name: void FindReplace(String, String, String)
|
Number of AST nodes: 10
|
|
Number of AST nodes: 10
|
|
1 | this.pattern = pattern;↵ | | 1 | this.pattern = pattern;↵
|
2 | this.source = source;↵ | | 2 | this.source = source;↵
|
3 | this.replaceWith = new String();↵ | | 3 | this.replaceWith = ↵
|
4 | ↵ | | |
|
5 | ↵ | | 4 | replaceWith;↵
|
6 | casesensitive = false;↵ | | 5 | casesensitive = false;↵
|
7 | matchwholeword = false;↵ | | 6 | matchwholeword = false;↵
|
8 | backwards = false;↵ | | 7 | backwards = false;↵
|
9 | ↵ | | 8 | ↵
|
10 | isFound = false;↵ | | 9 | isFound = false;↵
|
11 | lastreplaceposition = lastfoundposition = -1;↵ | | 10 | lastreplaceposition = lastfoundposition = -1;↵
|
12 | m = null;↵ | | 11 | m = null;↵
|
13 | p = null; | | 12 | p = null;
|
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 55 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 10 |
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.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | this.pattern = pattern; | | 1 | this.pattern = pattern; |
2 | this.source = source; | | 2 | this.source = source; |
3 | this.replaceWith = new String(); | | 3 | this.replaceWith = replaceWith; |
4 | casesensitive = false; | | 4 | casesensitive = false; |
5 | matchwholeword = false; | | 5 | matchwholeword = false; |
6 | backwards = false; | | 6 | backwards = false; |
7 | isFound = false; | | 7 | isFound = false; |
8 | lastreplaceposition = lastfoundposition = -1; | | 8 | lastreplaceposition = lastfoundposition = -1; |
9 | m = null; | | 9 | m = null; |
10 | p = null; | | 10 | p = null; |
Precondition Violations (0)
Row |
Violation |