Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
8 | 2 | 1 | 0.989 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 791 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java |
2 | 8 | 887 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java |
| ||||
/** * Suggest name for a getter method. The name is computed from field's name * and possible prefixes or suffixes are removed. * <p> * If the field name is <code>preFieldNamesuf</code> and the prefix for field is <code>pre</code> and * the suffix for field is <code>suf</code> then the prosposed name is <code>isFieldName</code> for boolean field or * <code>getFieldName</code> for others. If there is no prefix and suffix the proposal is <code>isPreFieldNamesuf</code> * for boolean field or <code>getPreFieldNamesuf</code> for others. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_FIELD_PREFIXES}, * {@link JavaCore#CODEASSIST_FIELD_SUFFIXES} for instance field and {@link JavaCore#CODEASSIST_STATIC_FIELD_PREFIXES}, * {@link JavaCore#CODEASSIST_STATIC_FIELD_SUFFIXES} for static field. * </p> * <p> * For a complete description of these configurable options, see <code>getDefaultOptions</code>. * For programmaticaly change these options, see <code>JavaCore#setOptions()</code>. * </p> * * @param project project which contains the field. * @param fieldName field's name's. * @param modifiers field's modifiers as defined by the class * <code>Flags</code>. * @param isBoolean <code>true</code> if the field's type is boolean * @param excludedNames a list of names which cannot be suggested (already used names). * Can be <code>null</code> if there is no excluded names. * @return char[] a name. * @see Flags * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static String suggestGetterName(IJavaProject project, String fieldName, int modifiers, boolean isBoolean, String[] excludedNames) { return String.valueOf( suggestGetterName( project, fieldName.toCharArray(), modifiers, isBoolean, convertStringToChars(excludedNames))); } |
| ||||
/** * Suggest name for a setter method. The name is computed from field's name * and possible prefixes or suffixes are removed. * <p> * If the field name is <code>preFieldNamesuf</code> and the prefix for field is <code>pre</code> and * the suffix for field is <code>suf</code> then the proposed name is <code>setFieldName</code>. * If there is no prefix and suffix the proposal is <code>setPreFieldNamesuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_FIELD_PREFIXES}, * {@link JavaCore#CODEASSIST_FIELD_SUFFIXES} for instance field and {@link JavaCore#CODEASSIST_STATIC_FIELD_PREFIXES}, * {@link JavaCore#CODEASSIST_STATIC_FIELD_SUFFIXES} for static field. * </p> * <p> * For a complete description of these configurable options, see <code>getDefaultOptions</code>. * For programmaticaly change these options, see <code>JavaCore#setOptions()</code>. * </p> * * @param project project which contains the field. * @param fieldName field's name's. * @param modifiers field's modifiers as defined by the class * <code>Flags</code>. * @param isBoolean <code>true</code> if the field's type is boolean * @param excludedNames a list of names which cannot be suggested (already used names). * Can be <code>null</code> if there is no excluded names. * @return char[] a name. * @see Flags * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static String suggestSetterName(IJavaProject project, String fieldName, int modifiers, boolean isBoolean, String[] excludedNames) { return String.valueOf( suggestSetterName( project, fieldName.toCharArray(), modifiers, isBoolean, convertStringToChars(excludedNames))); } |
| |||
/** * Suggest name for a getter method. The name is computed from field's name * and possible prefixes or suffixes are removed. * <p> * If the field name is <code>preFieldNamesuf</code> and the prefix for field is <code>pre</code> and * the suffix for field is <code>suf</code> then the prosposed name is <code>isFieldName</code> for boolean field or * <code>getFieldName</code> for others. If there is no prefix and suffix the proposal is <code>isPreFieldNamesuf</code> * for boolean field or <code>getPreFieldNamesuf</code> for others. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_FIELD_PREFIXES}, * {@link JavaCore#CODEASSIST_FIELD_SUFFIXES} for instance field and {@link JavaCore#CODEASSIST_STATIC_FIELD_PREFIXES}, * {@link JavaCore#CODEASSIST_STATIC_FIELD_SUFFIXES} for static field. * </p> * <p> * For a complete description of these configurable options, see <code>getDefaultOptions</code>. * For programmaticaly change these options, see <code>JavaCore#setOptions()</code>. * </p> * * @param project project which contains the field. * @param fieldName field's name's. * @param modifiers field's modifiers as defined by the class * <code>Flags</code>. * @param isBoolean <code>true</code> if the field's type is boolean * @param excludedNames a list of names which cannot be suggested (already used names). * Can be <code>null</code> if there is no excluded names. * @return char[] a name. * @see Flags * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ /** * Suggest name for a setter method. The name is computed from field's name * and possible prefixes or suffixes are removed. * <p> * If the field name is <code>preFieldNamesuf</code> and the prefix for field is <code>pre</code> and * the suffix for field is <code>suf</code> then the proposed name is <code>setFieldName</code>. * If there is no prefix and suffix the proposal is <code>setPreFieldNamesuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_FIELD_PREFIXES}, * {@link JavaCore#CODEASSIST_FIELD_SUFFIXES} for instance field and {@link JavaCore#CODEASSIST_STATIC_FIELD_PREFIXES}, * {@link JavaCore#CODEASSIST_STATIC_FIELD_SUFFIXES} for static field. * </p> * <p> * For a complete description of these configurable options, see <code>getDefaultOptions</code>. * For programmaticaly change these options, see <code>JavaCore#setOptions()</code>. * </p> * * @param project project which contains the field. * @param fieldName field's name's. * @param modifiers field's modifiers as defined by the class * <code>Flags</code>. * @param isBoolean <code>true</code> if the field's type is boolean * @param excludedNames a list of names which cannot be suggested (already used names). * Can be <code>null</code> if there is no excluded names. * @return char[] a name. * @see Flags * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static String [[#variable951f6080]](IJavaProject project, String fieldName, int modifiers, boolean isBoolean, String[] excludedNames) { return String.valueOf( [[#variable951f6080]](project, fieldName.toCharArray(), modifiers, isBoolean, convertStringToChars(excludedNames))); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#951f6080]] | suggestGetterName |
1 | 2 | [[#951f6080]] | suggestSetterName |