String toReturn = ccmDir;
if (!toReturn.equals("") && !toReturn.endsWith("/")) {
toReturn += "/";
}
toReturn += CCM_EXE;
return toReturn;
String toReturn = mClearToolDir;
if (!toReturn.equals("") && !toReturn.endsWith("/")) {
toReturn += "/";
}
toReturn += CLEARTOOL_EXE;
return toReturn;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
|
Method name: String getCcmCommand()
|
|
Method name: String getClearToolCommand()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | String toReturn = ccmDir;↵ | | 1 | String toReturn = mClearToolDir;↵
|
2 | if (!toReturn.equals("") && !toReturn.endsWith("/")) {↵ | | 2 | if (!toReturn.equals("") && !toReturn.endsWith("/")) {↵
|
3 | toReturn += "/";↵ | | 3 | toReturn += "/";↵
|
4 | }↵ | | 4 | }↵
|
|
5 | toReturn += CCM_EXE;↵ | | 5 | toReturn += CLEARTOOL_EXE;↵
|
|
6 | return toReturn; | | 6 | return toReturn;
|
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
-
{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) | 0.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | String toReturn = ccmDir; | | 1 | String toReturn = mClearToolDir; |
2 | if (!toReturn.equals("") && !toReturn.endsWith("/")) | | 2 | if (!toReturn.equals("") && !toReturn.endsWith("/")) |
3 | | | 3 | |
4 | toReturn += CCM_EXE; | | 4 | toReturn += CLEARTOOL_EXE; |
5 | return toReturn; | | 5 | return toReturn; |
Precondition Violations (0)
Row |
Violation |