File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java | |||
Method name: void test2ButCaseInsensitive()
|
Method name: void testFullpathDiffersInCaseScanningInsensitive()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 10 | |||
1 | if (loginSuceeded) {↵ | 1 | if (!loginSuceeded) {↵ | |
2 | ↵ | 2 | return;↵ | |
3 | }↵ | |||
3 | if (changeRemoteDir(remoteTmpDir)) {↵ | 4 | if (!changeRemoteDir(remoteTmpDir)) {↵ | |
4 | ↵ | 5 | return;↵ | |
6 | }↵ | |||
5 | FTP.FTPDirectoryScanner ds = myFTPTask.newScanner(ftp);↵ | 7 | FTP.FTPDirectoryScanner ds = myFTPTask.newScanner(ftp);↵ | |
6 | ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));↵ | 8 | ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));↵ | |
7 | ds.setIncludes(new String[] {"ALPHA/"});↵ | 9 | ds.setIncludes(new String[] {↵ | |
10 | "alpha/beta/gamma/gamma.xml",↵ | |||
11 | "alpha/beta/gamma/GAMMA.XML"↵ | |||
8 | ↵ | 12 | });↵ | |
9 | ds.setCaseSensitive(false);↵ | 13 | ds.setCaseSensitive(false);↵ | |
10 | ds.scan();↵ | 14 | ds.scan();↵ | |
11 | compareFiles(ds, new String[] {"alpha/beta/beta.xml",↵ | 15 | compareFiles(ds, new String[] {↵ | |
12 | "alpha/beta/gamma/gamma.xml"},↵ | 16 | "alpha/beta/gamma/gamma.xml"},↵ | |
13 | new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"});↵ | 17 | new String[] {↵ | |
14 | }↵ | |||
15 | } | 18 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 15 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 6 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (changeRemoteDir(remoteTmpDir)) |
| 1 | if (!loginSuceeded) | ||||||||||
|
| 2 | return; | |||||||||||
3 | FTP.FTPDirectoryScanner ds = myFTPTask.newScanner(ftp); | | ||||||||||||
4 | ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); | | ||||||||||||
5 | ds.setIncludes(new String[] {"ALPHA/"}); | | ||||||||||||
6 | ds.setCaseSensitive(false); | | ||||||||||||
7 | ds.scan(); | | ||||||||||||
8 | compareFiles(ds, new String[] {"alpha/beta/beta.xml", "alpha/beta/gamma/gamma.xml"}, new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"}); | |
Row | Violation |
---|---|
1 | Unmatched return; |