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: 5 | Number of AST nodes: 5 | |||
1 | boolean checkin = true;↵ | 1 | boolean check↵ | |
2 | out = true;↵ | |||
3 | // Just a note: StarTeam has a status for NEW which implies↵ | |||
4 | // that there is an item on your local machine that is not↵ | |||
5 | // in the repository. These are the items that show up as↵ | |||
6 | // NOT IN VIEW in the Starteam GUI.↵ | |||
7 | // One would think that we would want to perhaps checkin the↵ | |||
8 | // NEW items (not in all cases! - Steve Cohen 15 Dec 2001)↵ | |||
9 | // Unfortunately, the sdk doesn't really work, and we can't↵ | |||
10 | // actually see anything with a status of NEW. That is why↵ | |||
11 | // we can just check out everything here without worrying↵ | |||
12 | // about losing anything.↵ | |||
2 | int fileStatus = (eachFile.getStatus());↵ | 13 | int fileStatus = (eachFile.getStatus());↵ | |
3 | // We try to update the status once to give StarTeam↵ | 14 | // We try to update the status once to give StarTeam↵ | |
4 | // another chance.↵ | 15 | // another chance.↵ | |
5 | if (fileStatus == Status.MERGE↵ | 16 | if (fileStatus == Status.MERGE↵ | |
6 | || fileStatus == Status.UNKNOWN) {↵ | 17 | || fileStatus == Status.UNKNOWN) {↵ | |
7 | eachFile.updateStatus(true, true);↵ | 18 | eachFile.updateStatus(true, true);↵ | |
8 | fileStatus = (eachFile.getStatus());↵ | 19 | fileStatus = (eachFile.getStatus());↵ | |
9 | } | 20 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
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 |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | boolean checkin = true; |
| 14 | boolean checkout = true; | ||||||||||
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()); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables fileStatus, checkin , while Clone fragment #2 returns variables fileStatus, checkout |