final class Remove implements DelayedOperation {
private Object index;
private Object old;
public Remove(Object index, Object old) {
this.index = index;
this.old = old;
}
public void operate() {
map.remove(index);
}
public Object getAddedInstance() {
return null;
}
public Object getOrphan() {
return old;
public class Product implements Serializable {
private String name;
private Map parts = new HashMap();
public Product() {
}
public Product(String name) {
this.name = name;
}
public String getName() {
return name;
}
public Map getParts() {
return parts;
}
public void setParts(Map parts) {
this.parts = parts;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentMap.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/collection/backref/map/compkey/Product.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | final class Remove implements DelayedOperation {↵ | | 1 | public class Product implements Serializable {↵
|
2 | private Object index;↵ | | 2 | private String name;↵
|
3 | private Object old;↵ | | 3 | private ↵
|
4 | ↵ | | |
|
5 | public Remove(Object index, Object old↵ | | 4 | Map parts = new HashMap();↵
|
|
| | | 5 | public Product() {↵
|
| | | 6 | }↵
|
|
6 | ) {↵ | | 7 | public Product(String name) {↵
|
7 | this.index = index;↵ | | 8 | this.↵
|
8 | this.old = old;↵ | | |
|
9 | }↵ | | |
|
10 | public void operate() {↵ | | |
|
11 | map.remove(index)↵ | | 9 | name = name;↵
|
| | | 10 | }↵
|
|
| | | 11 | public String getName() {↵
|
12 | ;↵ | | 12 | return name;↵
|
13 | }↵ | | 13 | }↵
|
14 | ↵ | | |
|
15 | public Object getAddedInstance() {↵ | | 14 | public Map getParts() {↵
|
16 | return null;↵ | | 15 | return parts;↵
|
17 | }↵ | | 16 | }↵
|
18 | ↵ | | |
|
19 | public Object getOrphan() {↵ | | 17 | public void setParts(Map parts) {↵
|
20 | return old;↵ | | 18 | this.parts = parts;↵
|
21 | | | 19 |
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |