CloneSet1173


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26230.990class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1261127
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
2261307
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
Clone Instance
1
Line Count
26
Source Line
1127
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java

        /**
         * Text operation action to select the next sub-word.
         *
         * @since 3.0
         */
        protected class SelectNextSubWordAction extends NextSubWordAction {

                /**
                 * Creates a new select next sub-word action.
                 */
                public SelectNextSubWordAction() {
                        super(ST.SELECT_WORD_NEXT);
                }

                /*
                 * @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.NextSubWordAction#setCaretPosition(int)
                 */
                protected void setCaretPosition( final int position) {
                        final ISourceViewer viewer = getSourceViewer();

                        final StyledText text = viewer.getTextWidget();
                        if (text != null && !text.isDisposed()) {

                                final Point selection = text.getSelection();
                                final int caret = text.getCaretOffset();
                                final int offset = modelOffset2WidgetOffset(viewer, position);

                                if (caret == selection.x)
                                        text.setSelectionRange(selection.y, offset - selection.y);
                                else
                                        text.setSelectionRange(selection.x, offset - selection.x);
                        }
                }
        }


Clone Instance
2
Line Count
26
Source Line
1307
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java

        /**
         * Text operation action to select the previous sub-word.
         *
         * @since 3.0
         */
        protected class SelectPreviousSubWordAction extends PreviousSubWordAction {

                /**
                 * Creates a new select previous sub-word action.
                 */
                public SelectPreviousSubWordAction() {
                        super(ST.SELECT_WORD_PREVIOUS);
                }

                /*
                 * @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.PreviousSubWordAction#setCaretPosition(int)
                 */
                protected void setCaretPosition( final int position) {
                        final ISourceViewer viewer = getSourceViewer();

                        final StyledText text = viewer.getTextWidget();
                        if (text != null && !text.isDisposed()) {

                                final Point selection = text.getSelection();
                                final int caret = text.getCaretOffset();
                                final int offset = modelOffset2WidgetOffset(viewer, position);

                                if (caret == selection.x)
                                        text.setSelectionRange(selection.y, offset - selection.y);
                                else
                                        text.setSelectionRange(selection.x, offset - selection.x);
                        }
                }
        }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Text operation action to select the next sub-word.
         *
         * @since 3.0
         */
/**
         * Text operation action to select the previous sub-word.
         *
         * @since 3.0
         */
protected class [[#variableb50196c0]]extends [[#variableb5019720]]{
  /**
                   * Creates a new select next sub-word action.
                   */
  /**
                   * Creates a new select previous sub-word action.
                   */
  public [[#variableb50196c0]]() {
    super(ST. [[#variableb5019780]]);
  }

  /*
                   * @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.NextSubWordAction#setCaretPosition(int)
                   */
  /*
                   * @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.PreviousSubWordAction#setCaretPosition(int)
                   */
  protected void setCaretPosition( final int position) {
    final ISourceViewer viewer = getSourceViewer();
    final StyledText text = viewer.getTextWidget();
    if (text != null && !text.isDisposed()) {
      final Point selection = text.getSelection();
      final int caret = text.getCaretOffset();
      final int offset = modelOffset2WidgetOffset(viewer, position);
      if (caret == selection.x)
        text.setSelectionRange(selection.y, offset - selection.y);
      else
        text.setSelectionRange(selection.x, offset - selection.x);
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b50196c0]]
SelectNextSubWordAction 
12[[#b50196c0]]
SelectPreviousSubWordAction 
21[[#b5019720]]
NextSubWordAction 
22[[#b5019720]]
PreviousSubWordAction 
31[[#b5019780]]
SELECT_WORD_NEXT 
32[[#b5019780]]
SELECT_WORD_PREVIOUS