CloneSet831


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
20220.972class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
120450
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
220473
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
Clone Instance
1
Line Count
20
Source Line
450
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java

        // returns a list of fields with only setter entries checked
        private static IField[] getSetterOnlyFields(Object[] result) {
                Collection list = new ArrayList(0);
                Object each = null;
                GetterSetterEntry entry = null;
                boolean getterSet = false;
                for (int i = 0; i < result.length; i++) {
                        each = result[i];
                        if ((each instanceof GetterSetterEntry)) {
                                entry = (GetterSetterEntry) each;
                                if (entry.fGetterEntry) {
                                        getterSet = true;
                                }
                                if (( !entry.fGetterEntry) && (getterSet != true)) {
                                        list.add(entry.fField);
                                        getterSet = false;
                                }
                        }
                        else    getterSet = false;
                }
                return (IField[]) list.toArray(new IField[list.size()]);
        }


Clone Instance
2
Line Count
20
Source Line
473
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java

        // returns a list of fields with both entries checked
        private static IField[] getGetterSetterFields(Object[] result) {
                Collection list = new ArrayList(0);
                Object each = null;
                GetterSetterEntry entry = null;
                boolean getterSet = false;
                for (int i = 0; i < result.length; i++) {
                        each = result[i];
                        if ((each instanceof GetterSetterEntry)) {
                                entry = (GetterSetterEntry) each;
                                if (entry.fGetterEntry) {
                                        getterSet = true;
                                }
                                if (( !entry.fGetterEntry) && (getterSet == true)) {
                                        list.add(entry.fField);
                                        getterSet = false;
                                }
                        }
                        else    getterSet = false;
                }
                return (IField[]) list.toArray(new IField[list.size()]);
        }


Clone AbstractionParameter Count: 2Parameter Bindings

// returns a list of fields with only setter entries checked
// returns a list of fields with both entries checked
private static IField[]  [[#variable957a8440]](Object[] result) {
  Collection list = new ArrayList(0);
  Object each = null;
  GetterSetterEntry entry = null;
  boolean getterSet = false;
  for (int i = 0; i < result.length; i++) {
    each = result[i];
    if ((each instanceof GetterSetterEntry)) {
      entry = (GetterSetterEntry) each;
      if (entry.fGetterEntry) {
        getterSet = true;
      }
      if (( !entry.fGetterEntry) && ( [[#variable957a84a0]])) {
        list.add(entry.fField);
        getterSet = false;
      }
    }
    else
      getterSet = false;
  }
  return (IField[]) list.toArray(new IField[list.size()]);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#957a8440]]
getSetterOnlyFields 
12[[#957a8440]]
getGetterSetterFields 
21[[#957a84a0]]
getterSet != true 
22[[#957a84a0]]
getterSet == true