CloneSet397


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
15450.984class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11569
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractConstantAction.java
21570
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractMethodAction.java
31569
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractTempAction.java
41568
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceParameterAction.java
Clone Instance
1
Line Count
15
Source Line
69
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractConstantAction.java

        /**
         * Note: This method is for internal use only. Clients should not call this method.
         */
        public void selectionChanged(JavaTextSelection selection) {
                setEnabled(RefactoringAvailabilityTester.isExtractConstantAvailable(selection));
        }

        /* (non-Javadoc)
         * Method declared on SelectionDispatchAction
         */
        public void run(ITextSelection selection) {
                if ( !ActionUtil.isProcessable(getShell(), fEditor))
                        return;
                try {
                        final ExtractConstantRefactoring refactoring = new ExtractConstantRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
                        new RefactoringStarter().activate(refactoring, new ExtractConstantWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, false);
                } catch (JavaModelException e) {
                        ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
                  }
        }


Clone Instance
2
Line Count
15
Source Line
70
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractMethodAction.java

        /**
         * Note: This method is for internal use only. Clients should not call this method.
         */
        public void selectionChanged(JavaTextSelection selection) {
                setEnabled(RefactoringAvailabilityTester.isExtractMethodAvailable(selection));
        }

        /* (non-Javadoc)
         * Method declared on SelectionDispatchAction
         */
        public void run(ITextSelection selection) {
                if ( !ActionUtil.isProcessable(getShell(), fEditor))
                        return;
                try {
                        final ExtractMethodRefactoring refactoring = new ExtractMethodRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
                        new RefactoringStarter().activate(refactoring, new ExtractMethodWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, false);
                } catch (CoreException e) {
                        ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
                  }
        }


Clone Instance
3
Line Count
15
Source Line
69
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractTempAction.java

        /**
         * Note: This method is for internal use only. Clients should not call this method.
         */
        public void selectionChanged(JavaTextSelection selection) {
                setEnabled(RefactoringAvailabilityTester.isExtractTempAvailable(selection));
        }

        /* (non-Javadoc)
         * Method declared on SelectionDispatchAction
         */
        public void run(ITextSelection selection) {
                if ( !ActionUtil.isProcessable(getShell(), fEditor))
                        return;
                try {
                        final ExtractTempRefactoring refactoring = new ExtractTempRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
                        new RefactoringStarter().activate(refactoring, new ExtractTempWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, false);
                } catch (JavaModelException e) {
                        ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
                  }
        }


Clone Instance
4
Line Count
15
Source Line
68
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceParameterAction.java

        /**
         * Note: This method is for internal use only. Clients should not call this method.
         */
        public void selectionChanged(JavaTextSelection selection) {
                setEnabled(RefactoringAvailabilityTester.isIntroduceParameterAvailable(selection));
        }

        /* (non-Javadoc)
         * Method declared on SelectionDispatchAction
         */
        public void run(ITextSelection selection) {
                if ( !ActionUtil.isProcessable(getShell(), fEditor))
                        return;
                try {
                        final IntroduceParameterRefactoring refactoring = new IntroduceParameterRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
                        new RefactoringStarter().activate(refactoring, new IntroduceParameterWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, true);
                } catch (CoreException e) {
                        ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
                  }
        }


Clone AbstractionParameter Count: 5Parameter Bindings

/**
         * Note: This method is for internal use only. Clients should not call this method.
         */
public void selectionChanged(JavaTextSelection selection) {
  setEnabled(RefactoringAvailabilityTester. [[#variableb4282da0]](selection));
}

/* (non-Javadoc)
         * Method declared on SelectionDispatchAction
         */
public void run(ITextSelection selection) {
  if ( !ActionUtil.isProcessable(getShell(), fEditor))
    return;
  try {
    final [[#variable598176c0]] refactoring = new [[#variable598176c0]](SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
    new RefactoringStarter().activate(refactoring, new [[#variableb4282d00]](refactoring), getShell(), DIALOG_MESSAGE_TITLE,  [[#variable9628d3e0]]);
  }
  catch ( [[#variableb5819ee0]] e) {
    ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b4282da0]]
isExtractConstantAvailable 
12[[#b4282da0]]
isExtractMethodAvailable 
13[[#b4282da0]]
isExtractTempAvailable 
14[[#b4282da0]]
isIntroduceParameterAvailable 
21[[#598176c0]]
ExtractConstantRefactoring 
22[[#598176c0]]
ExtractMethodRefactoring 
23[[#598176c0]]
ExtractTempRefactoring 
24[[#598176c0]]
IntroduceParameterRefactoring 
31[[#b4282d00]]
ExtractConstantWizard 
32[[#b4282d00]]
ExtractMethodWizard 
33[[#b4282d00]]
ExtractTempWizard 
34[[#b4282d00]]
IntroduceParameterWizard 
41[[#9628d3e0]]
false 
42[[#9628d3e0]]
false 
43[[#9628d3e0]]
false 
44[[#9628d3e0]]
true 
51[[#b5819ee0]]
JavaModelException 
52[[#b5819ee0]]
CoreException 
53[[#b5819ee0]]
JavaModelException 
54[[#b5819ee0]]
CoreException