CloneSet995


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16210.977statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
116126
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionDelegateHelper.java
232995
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Clone Instance
1
Line Count
16
Source Line
126
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionDelegateHelper.java

                        IClassFile classFile = (IClassFile) editorInput.getAdapter(IClassFile.class );
                        if (classFile != null) {
                                IJavaElement e = classFile.getElementAt(currentSelection.getOffset());
                                if (e instanceof IMember) {
                                        m = (IMember) e;
                                }
                        }
                        else   {
                                IWorkingCopyManager manager = JavaUI.getWorkingCopyManager();
                                ICompilationUnit unit = manager.getWorkingCopy(editorInput);
                                if (unit != null) {
                                        synchronized (unit) {
                                                unit.reconcile(ICompilationUnit.NO_AST
                                                                                       /*don't create ast*/
                                                                                      ,                      false
                                                                                                                  /*don't force problem detection*/
                                                                                                                  ,                                  null
                                                                                                                                                         /*use primary owner*/
                                                                                                                                                         ,                      null
                                                                                                                                                                                    /*no progress monitor*/
                                                                                                                                                                                    );
                                        }
                                        IJavaElement e = unit.getElementAt(currentSelection.getOffset());
                                        if (e instanceof IMember) {
                                                m = (IMember) e;
                                        }
                                }
                        }


Clone Instance
2
Line Count
32
Source Line
995
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java

            IClassFile classFile = (IClassFile) editorInput.getAdapter(IClassFile.class );
            if (classFile != null) {
                IJavaElement e = classFile.getElementAt(offset);
                if (e instanceof IMember) {
                    m = (IMember) e;
                }
            }
            else   {
                IWorkingCopyManager manager = JavaUI.getWorkingCopyManager();
                ICompilationUnit unit = manager.getWorkingCopy(editorInput);
                if (unit != null) {
                    synchronized (unit) {
                        unit.reconcile(ICompilationUnit.NO_AST
                                                               /*
                                                                 * don't create
                                                                 * ast
                                                                 */
                                                              ,      false
                                                                          /*
                                                                                             * don't
                                                                                             * force
                                                                                             * problem
                                                                                             * detection
                                                                                             */
                                                                          ,                      null
                                                                                                     /*
                                                                                                                                     * use
                                                                                                                                     * primary
                                                                                                                                     * owner
                                                                                                                                     */
                                                                                                     ,                                   null
                                                                                                                                             /*
                                                                                                                                                             * no
                                                                                                                                                             * progress
                                                                                                                                                             * monitor
                                                                                                                                                             */
                                                                                                                                             );
                    }
                    IJavaElement e = unit.getElementAt(offset);
                    if (e instanceof IMember) {
                        m = (IMember) e;
                    }
                }
            }


Clone AbstractionParameter Count: 1Parameter Bindings

IClassFile classFile = (IClassFile) editorInput.getAdapter(IClassFile.class );
if (classFile != null) {
  IJavaElement e = classFile.getElementAt( [[#variable990ff360]]);
  if (e instanceof IMember) {
    m = (IMember) e;
  }
}
else {
  IWorkingCopyManager manager = JavaUI.getWorkingCopyManager();
  ICompilationUnit unit = manager.getWorkingCopy(editorInput);
  if (unit != null) {
    synchronized (unit) {
      unit.reconcile(ICompilationUnit.NO_AST
                                            /*don't create ast*/
                                            /*
                                                                                                             * don't create
                                                                                                             * ast
                                                                                                             */
                                            , false
                                                   /*don't force problem detection*/
                                                   /*
                                                                                                                                                * don't
                                                                                                                                                * force
                                                                                                                                                * problem
                                                                                                                                                * detection
                                                                                                                                                */
                                                   , null
                                                         /*use primary owner*/
                                                         /*
                                                                                                                                                                                              * use
                                                                                                                                                                                              * primary
                                                                                                                                                                                              * owner
                                                                                                                                                                                              */
                                                         , null
                                                               /*no progress monitor*/
                                                               /*
                                                                                                                                                                                                                            * no
                                                                                                                                                                                                                            * progress
                                                                                                                                                                                                                            * monitor
                                                                                                                                                                                                                            */
                                                               );
    }
    IJavaElement e = unit.getElementAt( [[#variable990ff360]]);
    if (e instanceof IMember) {
      m = (IMember) e;
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#990ff360]]
currentSelection.getOffset() 
12[[#990ff360]]
offset