CloneSet986


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
57201.000class_body_declarations[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
157120
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/DocumentCharacterIterator.java
257107
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/SequenceCharacterIterator.java
Clone Instance
1
Line Count
57
Source Line
120
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/DocumentCharacterIterator.java

        /*
         * @see java.text.CharacterIterator#next()
         */
        public char next() {
                return setIndex(Math.min(fIndex + 1, getEndIndex()));
        }

        /*
         * @see java.text.CharacterIterator#previous()
         */
        public char previous() {
                if (fIndex > getBeginIndex()) {
                        return setIndex(fIndex - 1);
                }
                else   {
                        return DONE;
                }
        }

        /*
         * @see java.text.CharacterIterator#setIndex(int)
         */
        public char setIndex(int position) {
                if (position >= getBeginIndex() && position <= getEndIndex())
                        fIndex = position;
                else
                        throw new IllegalArgumentException();

                invariant();
                return current();
        }

        /*
         * @see java.text.CharacterIterator#getBeginIndex()
         */
        public int getBeginIndex() {
                return fFirst;
        }

        /*
         * @see java.text.CharacterIterator#getEndIndex()
         */
        public int getEndIndex() {
                return fLast;
        }

        /*
         * @see java.text.CharacterIterator#getIndex()
         */
        public int getIndex() {
                return fIndex;
        }

        /*
         * @see java.text.CharacterIterator#clone()
         */
        public Object clone() {
                try {
                        return super.clone();
                } catch (CloneNotSupportedException e) {
                        throw new InternalError();
                  }
        }


Clone Instance
2
Line Count
57
Source Line
107
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/SequenceCharacterIterator.java

        /*
         * @see java.text.CharacterIterator#next()
         */
        public char next() {
                return setIndex(Math.min(fIndex + 1, getEndIndex()));
        }

        /*
         * @see java.text.CharacterIterator#previous()
         */
        public char previous() {
                if (fIndex > getBeginIndex()) {
                        return setIndex(fIndex - 1);
                }
                else   {
                        return DONE;
                }
        }

        /*
         * @see java.text.CharacterIterator#setIndex(int)
         */
        public char setIndex(int position) {
                if (position >= getBeginIndex() && position <= getEndIndex())
                        fIndex = position;
                else
                        throw new IllegalArgumentException();

                invariant();
                return current();
        }

        /*
         * @see java.text.CharacterIterator#getBeginIndex()
         */
        public int getBeginIndex() {
                return fFirst;
        }

        /*
         * @see java.text.CharacterIterator#getEndIndex()
         */
        public int getEndIndex() {
                return fLast;
        }

        /*
         * @see java.text.CharacterIterator#getIndex()
         */
        public int getIndex() {
                return fIndex;
        }

        /*
         * @see java.text.CharacterIterator#clone()
         */
        public Object clone() {
                try {
                        return super.clone();
                } catch (CloneNotSupportedException e) {
                        throw new InternalError();
                  }
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/*
         * @see java.text.CharacterIterator#next()
         */
public char next() {
  return setIndex(Math.min(fIndex + 1, getEndIndex()));
}

/*
         * @see java.text.CharacterIterator#previous()
         */
public char previous() {
  if (fIndex > getBeginIndex()) {
    return setIndex(fIndex - 1);
  }
  else {
    return DONE;
  }
}

/*
         * @see java.text.CharacterIterator#setIndex(int)
         */
public char setIndex(int position) {
  if (position >= getBeginIndex() && position <= getEndIndex())
    fIndex = position;
  else
    throw new IllegalArgumentException();
  invariant();
  return current();
}

/*
         * @see java.text.CharacterIterator#getBeginIndex()
         */
public int getBeginIndex() {
  return fFirst;
}

/*
         * @see java.text.CharacterIterator#getEndIndex()
         */
public int getEndIndex() {
  return fLast;
}

/*
         * @see java.text.CharacterIterator#getIndex()
         */
public int getIndex() {
  return fIndex;
}

/*
         * @see java.text.CharacterIterator#clone()
         */
public Object clone() {
  try {
    return super.clone();
  }
  catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None