final class Set implements DelayedOperation {
private int index;
private Object value;
private Object old;
public Set(int index, Object value, Object old) {
this.index = index;
this.value = value;
this.old = old;
}
public void operate() {
list.set(index, value);
}
public Object getAddedInstance() {
return value;
}
public Object getOrphan() {
return old;
final class Put implements DelayedOperation {
private Object index;
private Object value;
private Object old;
public Put(Object index, Object value, Object old) {
this.index = index;
this.value = value;
this.old = old;
}
public void operate() {
map.put(index, value);
}
public Object getAddedInstance() {
return value;
}
public Object getOrphan() {
return old;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentList.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentMap.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | final class Set implements DelayedOperation {↵ | | 1 | final class Put implements DelayedOperation {↵
|
2 | private int index;↵ | | 2 | private Object index;↵
|
3 | private Object value;↵ | | 3 | private Object value;↵
|
4 | private Object old;↵ | | 4 | private Object old;↵
|
| | | 5 | ↵
|
5 | public Set(int index, Object value, Object old) {↵ | | 6 | public Put(Object index, Object value, Object old) {↵
|
6 | this.index = index;↵ | | 7 | this.index = index;↵
|
7 | this.value = value;↵ | | 8 | this.value = value;↵
|
8 | this.old = old;↵ | | 9 | this.old = old;↵
|
9 | }↵ | | 10 | }↵
|
10 | public void operate() {↵ | | 11 | public void operate() {↵
|
11 | list.set(index, value);↵ | | 12 | map.put(index, value);↵
|
12 | }↵ | | 13 | }↵
|
13 | public Object getAddedInstance() {↵ | | 14 | public Object getAddedInstance() {↵
|
14 | return value;↵ | | 15 | return value;↵
|
15 | }↵ | | 16 | }↵
|
16 | public Object getOrphan() {↵ | | 17 | public Object getOrphan() {↵
|
17 | return old;↵ | | 18 | return old;↵
|
18 | | | 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 |