File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/notation/providers/ClassifierRoleNotation.java | File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/notation/providers/ObjectNotation.java | |||
Method name: void initialiseListener(Object)
|
Method name: void initialiseListener(Object)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 3 | |||
1 | @Override | 1 | @Override | |
2 | public void initialiseListener(Object modelElement) { | 2 | public void initialiseListener(Object modelElement) { | |
3 | super.initialiseListener(modelElement); | 3 | addElementListener(modelElement, | |
4 | Collection classifiers = Model.getFacade().getBases(modelElement); | 4 | new String[] {"name", "classifier"}); | |
5 | for (Object c : classifiers) { | 5 | ||
6 | addElementListener(c, "name"); | 6 | // Add the following once we show stereotypes: | |
7 | } | 7 | // Collection c = Model.getFacade().getStereotypes(newOwner); | |
8 | } | 8 | // Iterator i = c.iterator(); | |
9 | // while (i.hasNext()) { | |||
10 | // Object st = i.next(); | |||
11 | // addElementListener(st, "name"); | |||
12 | // } | |||
13 | ||||
14 | Collection c = Model.getFacade().getClassifiers(modelElement); | |||
15 | Iterator i = c.iterator(); | |||
16 | while (i.hasNext()) { | |||
17 | Object st = i.next(); | |||
18 | addElementListener(st, "name"); | |||
19 | } | |||
20 | } | |||
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 | 1.000 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | for (Object c : classifiers) |
| 4 | while (i.hasNext()) | ||||||||||
|
| 5 | Object st = i.next(); | |||||||||||
4 | addElementListener(c, "name"); |
| 6 | addElementListener(st, "name"); |
Row | Violation |
---|