| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 51 | 2 | 6 | 0.968 | class_body_declarations[7] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 51 | 60 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/AddWordProposal.java |
| 2 | 50 | 60 | 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.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());
}
|
| ||||
/*
* @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());
}
|
| |||
/*
* @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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b9764660]] | addWord |
| 1 | 2 | [[#b9764660]] | ignoreWord |
| 2 | 1 | [[#b97645c0]] | Spelling_add_info |
| 2 | 2 | [[#b97645c0]] | Spelling_ignore_info |
| 3 | 1 | [[#b9764540]] | Spelling_add_label |
| 3 | 2 | [[#b9764540]] | Spelling_ignore_label |
| 4 | 1 | [[#b9764440]] | IMG_CORRECTION_ADD |
| 4 | 2 | [[#b9764440]] | IMG_OBJS_NLS_NEVER_TRANSLATE |
| 5 | 1 | [[#b97644a0]] | /* * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance() */ public |
| 5 | 2 | [[#b97644a0]] | /* * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance() */ public final |
| 6 | 1 | [[#b97643c0]] | Integer.MIN_VALUE |
| 6 | 2 | [[#b97643c0]] | Integer.MIN_VALUE + 1 |