File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/uml/reveng/ImportClassLoader.java | File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/uml/reveng/ImportClassLoader.java | |||
Method name: void setPath(String)
|
Method name: void setPath(Object[])
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | /** | 1 | /** | |
2 | * Add the file for which a path is given. | 2 | * @param paths the paths to the files to be added | |
3 | * | 3 | */ | |
4 | * @param path the path in String format | 4 | public void setPath(Object[] paths) { | |
5 | */ | 5 | ||
6 | public void setPath(String path) { | 6 | for (int i = 0; i < paths.length; i++) { | |
7 | 7 | |||
8 | StringTokenizer st = new StringTokenizer(path, ";"); | 8 | try { | |
9 | st.countTokens(); | 9 | this.addFile(new File(paths[i].toString())); | |
10 | while (st.hasMoreTokens()) { | 10 | } catch (Exception e) { | |
11 | 11 | LOG.warn("could not set path ", e); | ||
12 | String token = st.nextToken(); | 12 | } | |
13 | 13 | } | ||
14 | try { | 14 | } | |
15 | this.addFile(new File(token)); | |||
16 | } catch (MalformedURLException e) { | |||
17 | LOG.warn("could not set path ", e); | |||
18 | } | |||
19 | } | |||
20 | } | |||
See real code fragment | See real code fragment |
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) | 0.0 |
Similarity Score | 0.333 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | while (st.hasMoreTokens()) |
| 1 | for (int i = 0; i < paths.length; i++) | ||||||||||||||||||
4 | String token = st.nextToken(); | | ||||||||||||||||||||
5 | try |
| 2 | try | ||||||||||||||||||
6 | this.addFile(new File(token)); |
| 3 | this.addFile(new File(paths[i].toString())); |
Row | Violation |
---|---|
1 | Type java.lang.String of variable path does not match with type java.lang.Object[] of variable paths |
2 | Type java.lang.String of variable path does not match with type java.lang.Object[] of variable paths |