if (_salutation != null) {
sb.append(_salutation);
sb.append(" ");
}
if (_firstName != null) {
sb.append(_firstName);
sb.append(" ");
}
if (_firstName != null) {
sb.append(_firstName);
sb.append(" ");
}
if (_middleName != null) {
sb.append(_middleName);
sb.append(" ");
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/util/NameParser.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/util/NameParser.java
|
Method name: String toString()
|
|
Method name: String toString()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (_salutation != null) {↵ | | 1 | if (_firstName != null) {↵
|
2 | sb.append(_salutation);↵ | | 2 | sb.append(_firstName);↵
|
3 | sb.append(" ");↵ | | 3 | sb.append(" ");↵
|
4 | }↵ | | 4 | }↵
|
5 | if (_firstName != null) {↵ | | 5 | if (_middleName != null) {↵
|
6 | sb.append(_firstName);↵ | | 6 | sb.append(_middleName);↵
|
7 | sb.append(" ");↵ | | 7 | sb.append(" ");↵
|
8 | } | | 8 | }
|
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 in the same method |
Number of node comparisons | 28 |
-
{Refactorable}
Mapping Summary
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.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (_salutation != null) | | 5 | if (_firstName != null) |
3 | | | 6 | |
4 | | | 7 | |
5 | if (_firstName != null) | | 8 | if (_middleName != null) |
6 | | | 9 | |
7 | | | 10 | |
Precondition Violations (0)
Row |
Violation |