File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AbstractCvsTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java | |||
Method name: void runCommand(Commandline)
|
Method name: int getArchiveLocationIndex(File)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (passFile == null) {↵ | 1 | for (int i = 0; i < ARCHIVE_LOCATIONS.length; i++) {↵ | |
2 | File defaultPassFile = new File(↵ | 2 | File ↵ | |
3 | System.getProperty("cygwin.user.home",↵ | |||
4 | System.getProperty("user.home"))↵ | |||
5 | + File.separatorChar + ".cvspass");↵ | 3 | f = new File(home, ARCHIVE_LOCATIONS[i]);↵ | |
6 | if (defaultPassFile.exists()) {↵ | 4 | if (f.exists()) {↵ | |
7 | this.setPassfile(defaultPassFile);↵ | 5 | return i;↵ | |
8 | }↵ | 6 | }↵ | |
9 | } | 7 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 6 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | File defaultPassFile = new File(System.getProperty("cygwin.user.home", System.getProperty("user.home")) + File.separatorChar + ".cvspass"); |
| 4 | File f = new File(home, ARCHIVE_LOCATIONS[i]); | |||||||||||||
9 | if (defaultPassFile.exists()) |
| 5 | if (f.exists()) | |||||||||||||
|
| 6 | return i; | ||||||||||||||
10 | this.setPassfile(defaultPassFile); | |
Row | Violation |
---|---|
1 | Unmatched return i; |
2 | Clone fragment #1 returns variables defaultPassFile , while Clone fragment #2 returns variables |