CloneSet540


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22240.987class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12271
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/ChangeCollector.java
222169
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/ChangeCollector.java
Clone Instance
1
Line Count
22
Source Line
71
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/ChangeCollector.java

        /*
         * Adds the given delta on a compilation unit to the list of changes.
         */
        public void addChange(ICompilationUnit cu, IJavaElementDelta newDelta) throws JavaModelException {
                int newKind = newDelta.getKind();
                switch (newKind) {
                        case IJavaElementDelta.ADDED:
                                ArrayList allTypes = new ArrayList();
                                getAllTypesFromElement(cu, allTypes);
                                for (int i = 0, length = allTypes.size(); i < length; i++) {
                                        IType type = (IType) allTypes.get(i);
                                        addTypeAddition(type, (SimpleDelta) this.changes.get(type));
                                }
                                break;
                        case IJavaElementDelta.REMOVED:
                                allTypes = new ArrayList();
                                getAllTypesFromHierarchy((JavaElement) cu, allTypes);
                                for (int i = 0, length = allTypes.size(); i < length; i++) {
                                        IType type = (IType) allTypes.get(i);
                                        addTypeRemoval(type, (SimpleDelta) this.changes.get(type));
                                }
                                break;
                        case IJavaElementDelta.CHANGED:
                                addAffectedChildren(newDelta);
                                break;
                      }
        }


Clone Instance
2
Line Count
22
Source Line
169
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/ChangeCollector.java

        /*
         * Adds a change for the given member (a method, a field or an initializer) and the types it defines.
         */
        private void addChange(IMember member, IJavaElementDelta newDelta) throws JavaModelException {
                int newKind = newDelta.getKind();
                switch (newKind) {
                        case IJavaElementDelta.ADDED:
                                ArrayList allTypes = new ArrayList();
                                getAllTypesFromElement(member, allTypes);
                                for (int i = 0, length = allTypes.size(); i < length; i++) {
                                        IType innerType = (IType) allTypes.get(i);
                                        addTypeAddition(innerType, (SimpleDelta) this.changes.get(innerType));
                                }
                                break;
                        case IJavaElementDelta.REMOVED:
                                allTypes = new ArrayList();
                                getAllTypesFromHierarchy((JavaElement) member, allTypes);
                                for (int i = 0, length = allTypes.size(); i < length; i++) {
                                        IType type = (IType) allTypes.get(i);
                                        addTypeRemoval(type, (SimpleDelta) this.changes.get(type));
                                }
                                break;
                        case IJavaElementDelta.CHANGED:
                                addAffectedChildren(newDelta);
                                break;
                      }
        }


Clone AbstractionParameter Count: 4Parameter Bindings

 [[#variable9b1c9f00]]void addChange( [[#variable9b1c9e00]]  [[#variable9b1c9dc0]], IJavaElementDelta newDelta) throws JavaModelException {
  int newKind = newDelta.getKind();
  switch (newKind) {
    case IJavaElementDelta.ADDED:
      ArrayList allTypes = new ArrayList();
      getAllTypesFromElement( [[#variable9b1c9dc0]], allTypes);
      for (int i = 0, length = allTypes.size(); i < length; i++) {
        IType  [[#variable9b1c9d80]]= (IType) allTypes.get(i);
        addTypeAddition( [[#variable9b1c9d80]], (SimpleDelta) this.changes.get( [[#variable9b1c9d80]]));
      }
      break;
    case IJavaElementDelta.REMOVED:
      allTypes = new ArrayList();
      getAllTypesFromHierarchy((JavaElement)  [[#variable9b1c9dc0]], allTypes);
      for (int i = 0, length = allTypes.size(); i < length; i++) {
        IType type = (IType) allTypes.get(i);
        addTypeRemoval(type, (SimpleDelta) this.changes.get(type));
      }
      break;
    case IJavaElementDelta.CHANGED:
      addAffectedChildren(newDelta);
      break;
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9b1c9f00]]
/*
 * Adds a change for the given member (a method, a field or an initializer) and the types it defines.
 */
private 
12[[#9b1c9f00]]
/*
 * Adds the given delta on a compilation unit to the list of changes.
 */
public 
21[[#9b1c9e00]]
IMember 
22[[#9b1c9e00]]
ICompilationUnit 
31[[#9b1c9dc0]]
member 
32[[#9b1c9dc0]]
cu 
41[[#9b1c9d80]]
innerType 
42[[#9b1c9d80]]
type