CloneSet983


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
58240.960class_body_declarations[8]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
158122
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariableGuess.java
258108
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/PositionBasedCompletionProposal.java
Clone Instance
1
Line Count
58
Source Line
122
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariableGuess.java

                /*
                 * @see ICompletionProposal#getContextInformation()
                 */
                public IContextInformation getContextInformation() {
                        return fContextInformation;
                }

                /*
                 * @see ICompletionProposal#getImage()
                 */
                public Image getImage() {
                        return fImage;
                }

                /*
                 * @see ICompletionProposal#getDisplayString()
                 */
                public String getDisplayString() {
                        if (fDisplayString != null)
                                return fDisplayString;
                        return fReplacementString;
                }

                /*
                 * @see ICompletionProposal#getAdditionalProposalInfo()
                 */
                public String getAdditionalProposalInfo() {
                        return fAdditionalProposalInfo;
                }

                /*
                 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer, char, int, int)
                 */
                public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
                        apply(viewer.getDocument());
                }

                /*
                 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer, boolean)
                 */
                public void selected(ITextViewer viewer, boolean smartToggle) {
                }

                /*
                 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)
                 */
                public void unselected(ITextViewer viewer) {
                }

                /*
                 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument, int, org.eclipse.jface.text.DocumentEvent)
                 */
                public boolean validate(IDocument document, int offset, DocumentEvent event) {
                        try {
                                String content = document.get(fReplacementOffset, fReplacementLength);
                                if (content.startsWith(fReplacementString))
                                        return true;
                        } catch (BadLocationException e) {
                                // ignore concurrently modified document
                          }
                        return false;
                }


Clone Instance
2
Line Count
58
Source Line
108
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/PositionBasedCompletionProposal.java

        /*
         * @see ICompletionProposal#getContextInformation()
         */
        public IContextInformation getContextInformation() {
                return fContextInformation;
        }

        /*
         * @see ICompletionProposal#getImage()
         */
        public Image getImage() {
                return fImage;
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
         */
        public String getDisplayString() {
                if (fDisplayString != null)
                        return fDisplayString;
                return fReplacementString;
        }

        /*
         * @see ICompletionProposal#getAdditionalProposalInfo()
         */
        public String getAdditionalProposalInfo() {
                return fAdditionalProposalInfo;
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer, char, int, int)
         */
        public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
                apply(viewer.getDocument());
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer, boolean)
         */
        public void selected(ITextViewer viewer, boolean smartToggle) {
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)
         */
        public void unselected(ITextViewer viewer) {
        }

        /*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument, int, org.eclipse.jface.text.DocumentEvent)
         */
        public boolean validate(IDocument document, int offset, DocumentEvent event) {
                try {
                        String content = document.get(fReplacementPosition.getOffset(), offset - fReplacementPosition.getOffset());
                        if (fReplacementString.startsWith(content))
                                return true;
                } catch (BadLocationException e) {
                        // ignore concurrently modified document
                  }
                return false;
        }


Clone AbstractionParameter Count: 4Parameter Bindings

/*
         * @see ICompletionProposal#getContextInformation()
         */
/*
                 * @see ICompletionProposal#getContextInformation()
                 */
public IContextInformation getContextInformation() {
  return fContextInformation;
}

/*
         * @see ICompletionProposal#getImage()
         */
/*
                 * @see ICompletionProposal#getImage()
                 */
public Image getImage() {
  return fImage;
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
         */
/*
                 * @see ICompletionProposal#getDisplayString()
                 */
public String getDisplayString() {
  if (fDisplayString != null)
    return fDisplayString;
  return fReplacementString;
}

/*
         * @see ICompletionProposal#getAdditionalProposalInfo()
         */
/*
                 * @see ICompletionProposal#getAdditionalProposalInfo()
                 */
public String getAdditionalProposalInfo() {
  return fAdditionalProposalInfo;
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer, char, int, int)
         */
/*
                 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer, char, int, int)
                 */
public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
  apply(viewer.getDocument());
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer, boolean)
         */
/*
                 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer, boolean)
                 */
public void selected(ITextViewer viewer, boolean smartToggle) {
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)
         */
/*
                 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)
                 */
public void unselected(ITextViewer viewer) {
}

/*
         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument, int, org.eclipse.jface.text.DocumentEvent)
         */
/*
                 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument, int, org.eclipse.jface.text.DocumentEvent)
                 */
public boolean validate(IDocument document, int offset, DocumentEvent event) {
  try {
    String content = document.get( [[#variablebb5039a0]],  [[#variablebb503880]]);
    if ( [[#variablebb5038e0]].startsWith( [[#variablebb5036a0]]))
      return true;
  }
  catch (BadLocationException e) {
  // ignore concurrently modified document
  }
  return false;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bb5039a0]]
fReplacementPosition.getOffset() 
12[[#bb5039a0]]
fReplacementOffset 
21[[#bb503880]]
offset - fReplacementPosition.getOffset() 
22[[#bb503880]]
fReplacementLength 
31[[#bb5038e0]]
fReplacementString 
32[[#bb5038e0]]
content 
41[[#bb5036a0]]
content 
42[[#bb5036a0]]
fReplacementString