Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
20 | 2 | 2 | 0.972 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 20 | 450 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java |
2 | 20 | 473 | 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()]); } |
| ||||
// 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()]); } |
| |||
// 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#957a8440]] | getSetterOnlyFields |
1 | 2 | [[#957a8440]] | getGetterSetterFields |
2 | 1 | [[#957a84a0]] | getterSet != true |
2 | 2 | [[#957a84a0]] | getterSet == true |