File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java | File path: /ArgoUML-0.34-src/argouml-cpp/src/org/argouml/language/cpp/generator/GeneratorCpp.java | |||
Method name: void updateSearchDirectoriesConfiguration()
|
Method name: StringBuffer generateIncludes(StringBuffer)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 4 | |||
1 | private void updateSearchDirectoriesConfiguration() { | 1 | private StringBuffer generateIncludes(StringBuffer sb) { | |
2 | if (!disableConfigurationUpdate) { | 2 | for (Iterator it = systemInc.iterator(); it.hasNext(); ) { | |
3 | StringBuffer buf = new StringBuffer(); | 3 | String inc = (String) it.next(); | |
4 | for (String s : searchDirectories) { | 4 | sb.append("#include <"); | |
5 | buf.append(s).append(DIRECTORY_SEPARATOR); | 5 | sb.append(inc).append('>').append(LINE_SEPARATOR); | |
6 | } | 6 | } | |
7 | Configuration.setString(KEY_DEFAULT_DIRECTORIES, buf.toString()); | 7 | // separate system from external headers | |
8 | } | 8 | if (systemInc.size() > 0) sb.append(LINE_SEPARATOR); | |
9 | } | 9 | for (Iterator it = extInc.iterator(); it.hasNext(); ) { | |
10 | String inc = (String) it.next(); | |||
11 | sb.append("#include <"); | |||
12 | sb.append(inc).append('>').append(LINE_SEPARATOR); | |||
13 | } | |||
14 | // separate external from local headers | |||
15 | if (extInc.size() > 0) sb.append(LINE_SEPARATOR); | |||
16 | for (Iterator it = localInc.iterator(); it.hasNext(); ) { | |||
17 | String inc = (String) it.next(); | |||
18 | sb.append("#include \"").append(inc).append("\"" + LINE_SEPARATOR); | |||
19 | } | |||
20 | return sb; | |||
21 | } | |||
See real code fragment | See real code fragment |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.600 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | for (String s : searchDirectories) |
| 1 | for (Iterator it = systemInc.iterator(); it.hasNext(); ) | ||||||||||||||
| 2 | String inc = (String)it.next(); | ||||||||||||||||
4 | buf.append(s).append(DIRECTORY_SEPARATOR); |
| 3 | sb.append("#include <"); | ||||||||||||||
|
| 4 | sb.append(inc).append('>').append(LINE_SEPARATOR); |
Row | Violation |
---|---|
1 | Type java.util.List<java.lang.String> of variable searchDirectories does not match with type java.util.Set of variable systemInc |
2 | Expression buf.append(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement sb.append(inc).append('>').append(LINE_SEPARATOR); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables inc |