File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/sos/SOS.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/sos/SOS.java | |||
Method name: void getRequiredAttributes()
|
Method name: void getRequiredAttributes()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (getVssServerPath() == null) {↵ | 1 | if (getSosServerPath() == null) {↵ | |
2 | throw new BuildException("vssserverpath attribute must be set!", getLocation());↵ | 2 | throw new BuildException("sosserverpath attribute must be set!", getLocation());↵ | |
3 | }↵ | 3 | }↵ | |
4 | commandLine.createArgument().setValue(FLAG_VSS_SERVER);↵ | 4 | commandLine.createArgument().setValue(FLAG_SOS_SERVER);↵ | |
5 | commandLine.createArgument().setValue(getVssServerPath());↵ | 5 | commandLine.createArgument().setValue(getSosServerPath());↵ | |
6 | // VSS project is required↵ | 6 | // Login info is required↵ | |
7 | if (getProjectPath() == null) {↵ | 7 | if (getUsername() == null) {↵ | |
8 | throw new BuildException("projectpath attribute must be set!", getLocation());↵ | 8 | throw new BuildException("username attribute must be set!", getLocation());↵ | |
9 | }↵ | 9 | }↵ | |
10 | commandLine.createArgument().setValue(FLAG_PROJECT);↵ | 10 | commandLine.createArgument().setValue(FLAG_USERNAME);↵ | |
11 | commandLine.createArgument().setValue(getProjectPath()); | 11 | commandLine.createArgument().setValue(getUsername()); | |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 29 |
Number of mapped statements | 8 |
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) | 4.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (getVssServerPath() == null) |
| 6 | if (getUsername() == null) | ||||||||||
13 | throw new BuildException("vssserverpath attribute must be set!", getLocation()); |
| 7 | throw new BuildException("username attribute must be set!", getLocation()); | ||||||||||
14 | commandLine.createArgument().setValue(FLAG_VSS_SERVER); |
| 4 | commandLine.createArgument().setValue(FLAG_SOS_SERVER); | ||||||||||
15 | commandLine.createArgument().setValue(getVssServerPath()); |
| 5 | commandLine.createArgument().setValue(getSosServerPath()); | ||||||||||
16 | if (getProjectPath() == null) |
| 2 | if (getSosServerPath() == null) | ||||||||||
17 | throw new BuildException("projectpath attribute must be set!", getLocation()); |
| 3 | throw new BuildException("sosserverpath attribute must be set!", getLocation()); | ||||||||||
18 | commandLine.createArgument().setValue(FLAG_PROJECT); |
| 8 | commandLine.createArgument().setValue(FLAG_USERNAME); | ||||||||||
19 | commandLine.createArgument().setValue(getProjectPath()); |
| 9 | commandLine.createArgument().setValue(getUsername()); |
Row | Violation |
---|