CloneSet664


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
51260.968class_body_declarations[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
15160
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/AddWordProposal.java
25060
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordIgnoreProposal.java
Clone Instance
1
Line Count
51
Source Line
60
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/AddWordProposal.java

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
         */
        public final void apply( final IDocument document) {

                final ISpellCheckEngine engine = SpellCheckEngine.getInstance();
                final ISpellChecker checker = engine.createSpellChecker(engine.getLocale(), PreferenceConstants.getPreferenceStore());

                if (checker != null) {
                        checker.addWord(fWord);
                        JavaSpellingProblem.removeAllInActiveEditor(fWord);
                }
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
         */
        public String getAdditionalProposalInfo() {
                return Messages.format(JavaUIMessages.Spelling_add_info, new String[] {
                                                                                        WordCorrectionProposal.getHtmlRepresentation(fWord)
                                                                                      } );
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
         */
        public final IContextInformation getContextInformation() {
                return null;
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
         */
        public String getDisplayString() {
                return Messages.format(JavaUIMessages.Spelling_add_label, new String[] {
                                                                                         fWord
                                                                                       } );
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
         */
        public Image getImage() {
                return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_ADD);
        }

        /*
         * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance()
         */
        public int getRelevance() {
                return Integer.MIN_VALUE;
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
         */
        public final Point getSelection( final IDocument document) {
                return new Point(fContext.getSelectionOffset(), fContext.getSelectionLength());
        }


Clone Instance
2
Line Count
50
Source Line
60
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordIgnoreProposal.java

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
         */
        public final void apply( final IDocument document) {

                final ISpellCheckEngine engine = SpellCheckEngine.getInstance();
                final ISpellChecker checker = engine.createSpellChecker(engine.getLocale(), PreferenceConstants.getPreferenceStore());

                if (checker != null) {
                        checker.ignoreWord(fWord);
                        JavaSpellingProblem.removeAllInActiveEditor(fWord);
                }
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
         */
        public String getAdditionalProposalInfo() {
                return Messages.format(JavaUIMessages.Spelling_ignore_info, new String[] {
                                                                                           WordCorrectionProposal.getHtmlRepresentation(fWord)
                                                                                         } );
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
         */
        public final IContextInformation getContextInformation() {
                return null;
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
         */
        public String getDisplayString() {
                return Messages.format(JavaUIMessages.Spelling_ignore_label, new String[] {
                                                                                            fWord
                                                                                          } );
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
         */
        public Image getImage() {
                return JavaPluginImages.get(JavaPluginImages.IMG_OBJS_NLS_NEVER_TRANSLATE);
        }

        /*
         * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance()
         */
        public final int getRelevance() {
                return Integer.MIN_VALUE + 1;
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
         */
        public final Point getSelection( final IDocument document) {
                return new Point(fContext.getSelectionOffset(), fContext.getSelectionLength());
        }


Clone AbstractionParameter Count: 6Parameter Bindings

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
         */
public final void apply( final IDocument document) {
  final ISpellCheckEngine engine = SpellCheckEngine.getInstance();
  final ISpellChecker checker = engine.createSpellChecker(engine.getLocale(), PreferenceConstants.getPreferenceStore());
  if (checker != null) {
    checker. [[#variableb9764660]](fWord);
    JavaSpellingProblem.removeAllInActiveEditor(fWord);
  }
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
         */
public String getAdditionalProposalInfo() {
  return Messages.format(JavaUIMessages. [[#variableb97645c0]], new String[] {
                                                                               WordCorrectionProposal.getHtmlRepresentation(fWord)
                                                                             } );
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
         */
public final IContextInformation getContextInformation() {
  return null;
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
         */
public String getDisplayString() {
  return Messages.format(JavaUIMessages. [[#variableb9764540]], new String[] {
                                                                               fWord
                                                                             } );
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
         */
public Image getImage() {
  return JavaPluginImages.get(JavaPluginImages. [[#variableb9764440]]);
}

 [[#variableb97644a0]]int getRelevance() {
  return [[#variableb97643c0]];
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
         */
public final Point getSelection( final IDocument document) {
  return new Point(fContext.getSelectionOffset(), fContext.getSelectionLength());
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b9764660]]
addWord 
12[[#b9764660]]
ignoreWord 
21[[#b97645c0]]
Spelling_add_info 
22[[#b97645c0]]
Spelling_ignore_info 
31[[#b9764540]]
Spelling_add_label 
32[[#b9764540]]
Spelling_ignore_label 
41[[#b9764440]]
IMG_CORRECTION_ADD 
42[[#b9764440]]
IMG_OBJS_NLS_NEVER_TRANSLATE 
51[[#b97644a0]]
/*
 * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance()
 */
public 
52[[#b97644a0]]
/*
 * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance()
 */
public final 
61[[#b97643c0]]
Integer.MIN_VALUE 
62[[#b97643c0]]
Integer.MIN_VALUE + 1