int fileStatus = (eachFile.getStatus());
// We try to update the status once to give StarTeam
// another chance.
if (fileStatus == Status.MERGE || fileStatus == Status.UNKNOWN) {
eachFile.updateStatus(true, true);
fileStatus = (eachFile.getStatus());
}
int fileStatus = (eachFile.getStatus());
// We try to update the status once to give StarTeam
// another chance.
if (fileStatus == Status.MERGE
|| fileStatus == Status.UNKNOWN) {
eachFile.updateStatus(true, true);
fileStatus = (eachFile.getStatus());
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckin.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
|
Method name: void processFile(com.starbase.starteam.File)
|
|
Method name: void processFile(com.starbase.starteam.File, File)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | int fileStatus = (eachFile.getStatus());↵ | | 1 | int fileStatus = (eachFile.getStatus());↵
|
|
2 | // We try to update the status once to give StarTeam↵ | | 2 | // We try to update the status once to give StarTeam↵
|
3 | // another chance.↵ | | 3 | // another chance.↵
|
|
4 | if (fileStatus == Status.MERGE↵ | | 4 | if (fileStatus == Status.MERGE↵
|
5 | || fileStatus == Status.UNKNOWN) {↵ | | 5 | || fileStatus == Status.UNKNOWN) {↵
|
6 | eachFile.updateStatus(true, true);↵ | | 6 | eachFile.updateStatus(true, true);↵
|
7 | fileStatus = (eachFile.getStatus());↵ | | 7 | fileStatus = (eachFile.getStatus());↵
|
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | int fileStatus = (eachFile.getStatus()); | | 15 | int fileStatus = (eachFile.getStatus()); |
7 | if (fileStatus == Status.MERGE || fileStatus == Status.UNKNOWN) | | 16 | if (fileStatus == Status.MERGE || fileStatus == Status.UNKNOWN) |
8 | eachFile.updateStatus(true, true); | | 17 | eachFile.updateStatus(true, true); |
9 | fileStatus = (eachFile.getStatus()); | | 18 | fileStatus = (eachFile.getStatus()); |
Precondition Violations (0)
Row |
Violation |