CloneSet712


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
40201.000class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
140188
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContext.java
240143
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaDocContext.java
Clone Instance
1
Line Count
40
Source Line
188
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContext.java

        /*
         * @see org.eclipse.jdt.internal.corext.template.DocumentTemplateContext#getEnd()
         */
        public int getEnd() {

                if (fIsManaged || getCompletionLength() == 0)
                        return super.getEnd();

                try {
                        IDocument document = getDocument();

                        int start = getCompletionOffset();
                        int end = getCompletionOffset() + getCompletionLength();

                        while (start != end && Character.isWhitespace(document.getChar(end - 1)))
                                end--;

                        return end;
                }
                  catch (BadLocationException e) {
                        return super.getEnd();
                  }
        }

        /*
         * @see org.eclipse.jdt.internal.corext.template.DocumentTemplateContext#getKey()
         */
        public String getKey() {

                if (getCompletionLength() == 0)
                        return super.getKey();

                try {
                        IDocument document = getDocument();

                        int start = getStart();
                        int end = getCompletionOffset();
                        return start <= end ?
                                  document.get(start, end - start):
                                  ""; //$NON-NLS-1$
                }
                  catch (BadLocationException e) {
                        return super.getKey();
                  }
        }


Clone Instance
2
Line Count
40
Source Line
143
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaDocContext.java

        /*
         * @see org.eclipse.jdt.internal.corext.template.DocumentTemplateContext#getEnd()
         */
        public int getEnd() {

                if (fIsManaged || getCompletionLength() == 0)
                        return super.getEnd();

                try {
                        IDocument document = getDocument();

                        int start = getCompletionOffset();
                        int end = getCompletionOffset() + getCompletionLength();

                        while (start != end && Character.isWhitespace(document.getChar(end - 1)))
                                end--;

                        return end;
                }
                  catch (BadLocationException e) {
                        return super.getEnd();
                  }
        }

        /*
         * @see org.eclipse.jdt.internal.corext.template.DocumentTemplateContext#getKey()
         */
        public String getKey() {

                if (getCompletionLength() == 0)
                        return super.getKey();

                try {
                        IDocument document = getDocument();

                        int start = getStart();
                        int end = getCompletionOffset();
                        return start <= end ?
                                  document.get(start, end - start):
                                  ""; //$NON-NLS-1$
                }
                  catch (BadLocationException e) {
                        return super.getKey();
                  }
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/*
         * @see org.eclipse.jdt.internal.corext.template.DocumentTemplateContext#getEnd()
         */
public int getEnd() {
  if (fIsManaged || getCompletionLength() == 0)
    return super.getEnd();
  try {
    IDocument document = getDocument();
    int start = getCompletionOffset();
    int end = getCompletionOffset() + getCompletionLength();
    while (start != end && Character.isWhitespace(document.getChar(end - 1)))
      end--;
    return end;
  }
  catch (BadLocationException e) {
    return super.getEnd();
  }
}

/*
         * @see org.eclipse.jdt.internal.corext.template.DocumentTemplateContext#getKey()
         */
public String getKey() {
  if (getCompletionLength() == 0)
    return super.getKey();
  try {
    IDocument document = getDocument();
    int start = getStart();
    int end = getCompletionOffset();
    return start <= end ? document.get(start, end - start): ""; //$NON-NLS-1$
  }
  catch (BadLocationException e) {
    return super.getKey();
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None