CloneSet503


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28250.962class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
128714
plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMemberPage.java
228437
plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PushDownWizard.java
Clone Instance
1
Line Count
28
Source Line
714
Source File
plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMemberPage.java

        private boolean enableEditButton( final IStructuredSelection ss) {
                if (ss.isEmpty() || ss.size() == 0)
                        return false;
                return ss.size() == getEditableCount(getSelectedMembers());
        }

        private MemberActionInfo[] getActiveInfos() {
                final MemberActionInfo[] infos = getTableInput();
                final List result = new ArrayList(infos.length);
                for (int i = 0; i < infos.length; i++) {
                        final MemberActionInfo info = infos[i];
                        if (info.isActive())
                                result.add(info);
                }
                return (MemberActionInfo[]) result.toArray(new MemberActionInfo[result.size()]);
        }

        private int getCommonActionCodeForSelectedInfos() {
                final MemberActionInfo[] infos = getSelectedMembers();
                if (infos.length == 0)
                        return -1;

                final int code = infos[0].getAction();
                for (int i = 0; i < infos.length; i++) {
                        if (code != infos[i].getAction())
                                return -1;
                }
                return code;
        }


Clone Instance
2
Line Count
28
Source Line
437
Source File
plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PushDownWizard.java

                private boolean enableEditButton( final IStructuredSelection selection) {
                        if (selection.isEmpty() || selection.size() == 0)
                                return false;
                        return selection.size() == countEditableInfos(getSelectedMemberActionInfos());
                }

                private MemberActionInfo[] getActiveInfos() {
                        final MemberActionInfo[] infos = getPushDownRefactoring().getPushDownProcessor().getMemberActionInfos();
                        final List result = new ArrayList(infos.length);
                        for (int index = 0; index < infos.length; index++) {
                                final MemberActionInfo info = infos[index];
                                if (info.isActive())
                                        result.add(info);
                        }
                        return (MemberActionInfo[]) result.toArray(new MemberActionInfo[result.size()]);
                }

                private int getCommonActionCodeForSelectedInfos() {
                        final MemberActionInfo[] infos = getSelectedMemberActionInfos();
                        if (infos.length == 0)
                                return -1;

                        final int code = infos[0].getAction();
                        for (int index = 0; index < infos.length; index++) {
                                if (code != infos[index].getAction())
                                        return -1;
                        }
                        return code;
                }


Clone AbstractionParameter Count: 5Parameter Bindings

private boolean enableEditButton( final IStructuredSelection  [[#variableba894c60]]) {
  if ( [[#variableba894c60]].isEmpty() || [[#variableba894c60]].size() == 0)
    return false;
  return [[#variableba894c60]].size() == [[#variableba894be0]]( [[#variableba894ba0]]());
}

private MemberActionInfo[] getActiveInfos() {
  final MemberActionInfo[] infos = [[#variableba894b80]];
  final List result = new ArrayList(infos.length);
  for (int  [[#variableba894b00]]= 0; [[#variableba894b00]] < infos.length; [[#variableba894b00]]++) {
    final MemberActionInfo info = infos[ [[#variableba894b00]]];
    if (info.isActive())
      result.add(info);
  }
  return (MemberActionInfo[]) result.toArray(new MemberActionInfo[result.size()]);
}

private int getCommonActionCodeForSelectedInfos() {
  final MemberActionInfo[] infos = [[#variableba894ba0]]();
  if (infos.length == 0)
    return -1;
  final int code = infos[0].getAction();
  for (int  [[#variableba894b00]]= 0; [[#variableba894b00]] < infos.length; [[#variableba894b00]]++) {
    if (code != infos[ [[#variableba894b00]]].getAction())
      return -1;
  }
  return code;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#ba894c60]]
ss 
12[[#ba894c60]]
selection 
21[[#ba894be0]]
getEditableCount 
22[[#ba894be0]]
countEditableInfos 
31[[#ba894ba0]]
getSelectedMembers 
32[[#ba894ba0]]
getSelectedMemberActionInfos 
41[[#ba894b80]]
getTableInput() 
42[[#ba894b80]]
getPushDownRefactoring().getPushDownProcessor().getMemberActionInfos() 
51[[#ba894b00]]
i 
52[[#ba894b00]]
index