File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/moduleloader/SettingsTabModules.java | File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/cognitive/ToDoList.java | |||
Method name: void handleSettingsTabRefresh()
|
Method name: String toString()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | public void handleSettingsTabRefresh() { | 1 | @Override | |
2 | table.setModel(new ModuleTableModel()); | 2 | public String toString() { | |
3 | 3 | StringBuffer res = new StringBuffer(100); | ||
4 | StringBuffer sb = new StringBuffer(); | 4 | res.append(getClass().getName()).append(" {\n"); | |
5 | List locations = ModuleLoader2.getInstance().getExtensionLocations(); | 5 | List<ToDoItem> itemList = getToDoItemList(); | |
6 | for (Iterator it = locations.iterator(); it.hasNext();) { | 6 | synchronized (itemList) { | |
7 | sb.append((String) it.next()); | 7 | for (ToDoItem item : itemList) { | |
8 | sb.append("\n"); | 8 | res.append(" ").append(item.toString()).append("\n"); | |
9 | } | 9 | } | |
10 | fieldAllExtDirs.setText(sb.substring(0, sb.length() - 1).toString()); | 10 | } | |
11 | } | 11 | res.append(" }"); | |
12 | return res.toString(); | |||
13 | } | |||
See real code fragment | See real code fragment |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.600 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | for (Iterator it = locations.iterator(); it.hasNext(); ) |
| 5 | for (ToDoItem item : itemList) | |||||||||||
5 | sb.append((String)it.next()); |
| | ||||||||||||
6 | sb.append("\n"); |
| 6 | res.append(" ").append(item.toString()).append("\n"); |
Row | Violation |
---|---|
1 | Type java.util.List of variable locations does not match with type java.util.List<org.argouml.cognitive.ToDoItem> of variable itemList |
2 | Unmatched statement sb.append((String)it.next()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Expression res.append(" ").append(item.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables it , while Clone fragment #2 returns variables |