final class Add implements DelayedOperation {
private int index;
private Object value;
public Add(int index, Object value) {
this.index = index;
this.value = value;
}
public void operate() {
list.add(index, value);
}
public Object getAddedInstance() {
return value;
}
public Object getOrphan() {
return null
final class Remove implements DelayedOperation {
private int index;
private Object old;
public Remove(int index, Object old) {
this.index = index;
this.old = old;
}
public void operate() {
list.remove(index);
}
public Object getAddedInstance() {
return null;
}
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/PersistentList.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | final class Add implements DelayedOperation {↵ | | 1 | final class Remove implements DelayedOperation {↵
|
2 | private int index;↵ | | 2 | private int index;↵
|
3 | private Object value;↵ | | 3 | private Object old;↵
|
|
4 | public Add(int index, Object value) {↵ | | 4 | public Remove(int index, Object old) {↵
|
5 | this.index = index;↵ | | 5 | this.index = index;↵
|
6 | this.value = value;↵ | | 6 | this.old = old;↵
|
7 | }↵ | | 7 | }↵
|
8 | public void operate() {↵ | | 8 | public void operate() {↵
|
9 | list.add(index, value);↵ | | 9 | list.remove(index);↵
|
10 | }↵ | | 10 | }↵
|
11 | public Object getAddedInstance() {↵ | | 11 | public Object getAddedInstance() {↵
|
12 | return value;↵ | | 12 | return null;↵
|
13 | }↵ | | 13 | }↵
|
14 | public Object getOrphan() {↵ | | 14 | public Object getOrphan() {↵
|
15 | return null | | 15 | return old
|
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 |