Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
2 | 2 | 2 | 0.968 | statement_sequence[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 2 | 264 | E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/command/RemoveCommand.java |
2 | 2 | 295 | E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/command/RemoveCommand.java |
| |||||
// Iterate over the owner list twice, first matching objects from the collection by identity (==), then matching // objects by value equality (.equals()). The positions of matched objects in the owner list are recorded, and // the objects are stored in the same order. The lists are then merged to form a final, in-order list of objects // and corresponding indices in ownerList. This is very important for undo to interpret the indices correctly. // Also, this yields exactly one object removed for each object in the collection, with preference given to // identity over value equality. // List<Object> identity = new ArrayList<Object>(collection.size()); int[] identityIndices = new int[collection.size()]; |
| |||||
// Second pass: match by value equality. // List<Object> equality = new ArrayList<Object>(collection.size()); int[] equalityIndices = new int[collection.size()]; |
| |||
// Second pass: match by value equality. // Iterate over the owner list twice, first matching objects from the collection by identity (==), then matching // objects by value equality (.equals()). The positions of matched objects in the owner list are recorded, and // the objects are stored in the same order. The lists are then merged to form a final, in-order list of objects // and corresponding indices in ownerList. This is very important for undo to interpret the indices correctly. // Also, this yields exactly one object removed for each object in the collection, with preference given to // identity over value equality. // List<Object> [[#variable174b00c0]]= new ArrayList<Object>(collection.size()); int[] [[#variable174af200]]= new int[collection.size()]; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#174b00c0]] | identity |
1 | 2 | [[#174b00c0]] | equality |
2 | 1 | [[#174af200]] | identityIndices |
2 | 2 | [[#174af200]] | equalityIndices |