CloneSet5632


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
7240.969class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1744
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MovedMemberAnalyzer.java
2636
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ReferenceAnalyzer.java
Clone Instance
1
Line Count
7
Source Line
44
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MovedMemberAnalyzer.java

/*
 * cases:
 * - access to moved member (or to member of moved member) -> do nothing.
 * - (static) access to source -> change to source, import source.
 * - (static) access to target -> change to target.
 * - access to other type -> do nothing (import is done in MoveStaticMembersRefactoring#getUpdatedMemberSource())
 */
// TW: Adapted references to type
//      - Reference to type inside moved type:
//        - if originally resolved by qualification -> no problem
//        - if originally resolved by import -> must add import in target too (qualify if import ambiguous)
        public MovedMemberAnalyzer(CompilationUnitRewrite cuRewrite,
                        IBinding[] members, ITypeBinding source, ITypeBinding target) {
                super(cuRewrite, members, source, target);
        }

        public boolean targetNeedsSourceImport() {
                return fNeedsImport;
        }


Clone Instance
2
Line Count
6
Source Line
36
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ReferenceAnalyzer.java

        public ReferenceAnalyzer(CompilationUnitRewrite cuRewrite, IBinding[] members, ITypeBinding target, ITypeBinding source) {
                super(cuRewrite, members, source, target);
        }

        public boolean needsTargetImport() {
                return fNeedsImport;
        }


Clone AbstractionParameter Count: 4Parameter Bindings

/*
 * cases:
 * - access to moved member (or to member of moved member) -> do nothing.
 * - (static) access to source -> change to source, import source.
 * - (static) access to target -> change to target.
 * - access to other type -> do nothing (import is done in MoveStaticMembersRefactoring#getUpdatedMemberSource())
 */
// TW: Adapted references to type
//      - Reference to type inside moved type:
//        - if originally resolved by qualification -> no problem
//        - if originally resolved by import -> must add import in target too (qualify if import ambiguous)
public [[#variable95db6b80]](CompilationUnitRewrite cuRewrite, IBinding[] members, ITypeBinding  [[#variable95db6a60]], ITypeBinding  [[#variable95db6b00]]) {
  super(cuRewrite, members, source, target);
}

public boolean  [[#variable95db6b20]]() {
  return fNeedsImport;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#95db6b80]]
MovedMemberAnalyzer 
12[[#95db6b80]]
ReferenceAnalyzer 
21[[#95db6a60]]
source 
22[[#95db6a60]]
target 
31[[#95db6b00]]
target 
32[[#95db6b00]]
source 
41[[#95db6b20]]
targetNeedsSourceImport 
42[[#95db6b20]]
needsTargetImport