File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetBaseMatchingTask.java | |||
Method name: void applyExtraArgs(NetCommand)
|
Method name: void addFilesToCommand(Hashtable, NetCommand)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 3 | |||
1 | /** | 1 | /** | |
2 | * apply any extra arguments of this class | 2 | * add the list of files to a command | |
3 | * @param command the command to apply the arguments to. | 3 | * @param filesToBuild vector of files | |
4 | */ | 4 | * @param command the command to append to | |
5 | public void applyExtraArgs(NetCommand command) { | 5 | */ | |
6 | String[] args = getExtraArgs(); | 6 | protected void addFilesToCommand(Hashtable filesToBuild, NetCommand command) { | |
7 | for (int i = 0; i < args.length; i++) { | 7 | int count = filesToBuild.size(); | |
8 | command.addArgument(args[i]); | 8 | log("compiling " + count + " file" + ((count == 1) ? "" : "s"), | |
9 | } | 9 | Project.MSG_VERBOSE); | |
10 | } | 10 | Enumeration files = filesToBuild.elements(); | |
11 | while (files.hasMoreElements()) { | |||
12 | File file = (File) files.nextElement(); | |||
13 | command.addArgument(file.toString()); | |||
14 | } | |||
15 | } | |||
See real code fragment | See real code fragment |
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.0 |
Similarity Score | 0.400 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | for (int i = 0; i < args.length; i++) |
| 4 | while (files.hasMoreElements()) | ||||||||||||||||||
| 5 | File file = (File)files.nextElement(); | ||||||||||||||||||||
3 | command.addArgument(args[i]); |
| 6 | command.addArgument(file.toString()); |
Row | Violation |
---|---|
1 | Type java.lang.String[] of variable args does not match with type java.util.Hashtable of variable filesToBuild |
2 | Type java.lang.String[] of variable args does not match with type java.util.Hashtable of variable filesToBuild |
3 | Expression args[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted |