Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
28 | 2 | 5 | 0.962 | class_body_declarations[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 28 | 714 | plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMemberPage.java |
2 | 28 | 437 | plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PushDownWizard.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; } |
| ||||
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; } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#ba894c60]] | ss |
1 | 2 | [[#ba894c60]] | selection |
2 | 1 | [[#ba894be0]] | getEditableCount |
2 | 2 | [[#ba894be0]] | countEditableInfos |
3 | 1 | [[#ba894ba0]] | getSelectedMembers |
3 | 2 | [[#ba894ba0]] | getSelectedMemberActionInfos |
4 | 1 | [[#ba894b80]] | getTableInput() |
4 | 2 | [[#ba894b80]] | getPushDownRefactoring().getPushDownProcessor().getMemberActionInfos() |
5 | 1 | [[#ba894b00]] | i |
5 | 2 | [[#ba894b00]] | index |