File path: /ArgoUML-0.34-src/argouml/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationConnectionListModel.java | File path: /ArgoUML-0.34-src/argouml/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationRoleBaseComboBoxModel.java | |||
Method name: void addOtherModelEventListeners(Object)
|
Method name: void removeOtherModelEventListeners(Object)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | protected void addOtherModelEventListeners(Object newTarget) { | 1 | @Override | |
2 | super.addOtherModelEventListeners(newTarget); | 2 | protected void removeOtherModelEventListeners(Object oldTarget) { | |
3 | /* Make a copy of the modelelements: */ | 3 | super.removeOtherModelEventListeners(oldTarget); | |
4 | others = new ArrayList(Model.getFacade().getConnections(newTarget)); | 4 | for (Object classifier : others) { | |
5 | Iterator i = others.iterator(); | 5 | Model.getPump().removeModelEventListener(this, | |
6 | while (i.hasNext()) { | 6 | classifier, "feature"); | |
7 | Object end = i.next(); | 7 | } | |
8 | Model.getPump().addModelEventListener(this, end, "name"); | 8 | others.clear(); | |
9 | } | 9 | } | |
10 | } | |||
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.667 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | while (i.hasNext()) |
| 2 | for (Object classifier : others) | |||||||||||||||||||
5 | Object end = i.next(); |
| | ||||||||||||||||||||
6 | Model.getPump().addModelEventListener(this, end, "name"); |
| 3 | Model.getPump().removeModelEventListener(this, classifier, "feature"); |
Row | Violation |
---|---|
1 | Expression Model.getPump().removeModelEventListener(this,classifier,"feature") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression Model.getPump().addModelEventListener(this,end,"name") is a void method call, and thus it cannot be parameterized |
3 | Expression Model.getPump().removeModelEventListener(this,classifier,"feature") is a void method call, and thus it cannot be parameterized |