CloneSet4052


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
6220.976class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1639
plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RefactoringActions.java
2667
plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RefactoringActions.java
Clone Instance
1
Line Count
6
Source Line
39
Source File
plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RefactoringActions.java

        /**
         * Converts the given selection into a type using the following rules:
         * <ul>
         *   <li>if the selection is enclosed by a type than that type is returned.</li>
         *   <li>if the selection is inside a compilaiton unit or class file than the 
         *       primary type is returned.</li>
         *   <li>otherwise <code>null</code> is returned.
         * </ul>
         */
        public static IType getEnclosingOrPrimaryType(JavaTextSelection selection) throws JavaModelException {
                return convertToEnclosingOrPrimaryType(selection.resolveEnclosingElement());
        }

        public static IType getEnclosingOrPrimaryType(JavaEditor editor) throws JavaModelException {
                return convertToEnclosingOrPrimaryType(SelectionConverter.resolveEnclosingElement(
                        editor, (ITextSelection) editor.getSelectionProvider().getSelection()    ));
        }


Clone Instance
2
Line Count
6
Source Line
67
Source File
plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RefactoringActions.java

        /**
         * Converts the given selection into a type using the following rules:
         * <ul>
         *   <li>if the selection is enclosed by a type than that type is returned.</li>
         *   <li>otherwise <code>null</code> is returned.
         * </ul>
         */
        public static IType getEnclosingType(JavaTextSelection selection) throws JavaModelException {
                return convertToEnclosingType(selection.resolveEnclosingElement());
        }

        public static IType getEnclosingType(JavaEditor editor) throws JavaModelException {
                return convertToEnclosingType(SelectionConverter.resolveEnclosingElement(
                        editor, (ITextSelection) editor.getSelectionProvider().getSelection()));
        }


Clone AbstractionParameter Count: 2Parameter Bindings

/**
         * Converts the given selection into a type using the following rules:
         * <ul>
         *   <li>if the selection is enclosed by a type than that type is returned.</li>
         *   <li>otherwise <code>null</code> is returned.
         * </ul>
         */
/**
         * Converts the given selection into a type using the following rules:
         * <ul>
         *   <li>if the selection is enclosed by a type than that type is returned.</li>
         *   <li>if the selection is inside a compilaiton unit or class file than the 
         *       primary type is returned.</li>
         *   <li>otherwise <code>null</code> is returned.
         * </ul>
         */
public static IType  [[#variableb41f6c40]](JavaTextSelection selection) throws JavaModelException {
  return [[#variableb08e6680]](selection.resolveEnclosingElement());
}

public static IType  [[#variableb41f6c40]](JavaEditor editor) throws JavaModelException {
  return [[#variableb08e6680]](SelectionConverter.resolveEnclosingElement(editor, (ITextSelection) editor.getSelectionProvider().getSelection()));
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b41f6c40]]
getEnclosingType 
12[[#b41f6c40]]
getEnclosingOrPrimaryType 
21[[#b08e6680]]
convertToEnclosingType 
22[[#b08e6680]]
convertToEnclosingOrPrimaryType