ch = str.charAt(pos);
if (ch == '<') {
result.append("<");
} else if (ch == '>') {
result.append(">");
} else {
result.append(ch);
}
pos++;
ch = str.charAt(pos);
if (ch == '<') {
result.append("<");
} else if (ch == '>') {
result.append(">");
} else {
result.append(ch);
}
pos++;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/util/ToolTipFactory.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/contact/list/HeaderItemToolTipFactory.java
|
Method name: String convert(String)
|
|
Method name: String convert(String)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | ch = str.charAt(pos);↵ | | 1 | ch = str.charAt(pos);↵
|
|
2 | if (ch == '<') {↵ | | 2 | if (ch == '<') {↵
|
3 | result.append("<");↵ | | 3 | result.append("<");↵
|
4 | } else if (ch == '>') {↵ | | 4 | } else if (ch == '>') {↵
|
5 | result.append(">");↵ | | 5 | result.append(">");↵
|
6 | } else {↵ | | 6 | } else {↵
|
7 | result.append(ch);↵ | | 7 | result.append(ch);↵
|
8 | }↵ | | 8 | }↵
|
|
9 | pos++; | | 9 | pos++;
|
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 25 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 5.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | ch = str.charAt(pos); | | 7 | ch = str.charAt(pos); |
8 | if (ch == '<') | | 8 | if (ch == '<') |
9 | | | 9 | |
10 | | | 10 | |
11 | | | 11 | |
| | | | |
12 | | | 12 | |
13 | pos++; | | 13 | pos++; |
Precondition Violations (0)
Row |
Violation |