Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
33 | 2 | 4 | 0.965 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 33 | 300 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java |
2 | 33 | 424 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java |
| ||||
/** * Remove prefix and suffix from an argument name. * <p> * If argument name prefix is <code>pre</code> and argument name suffix is <code>suf</code> * then for an argument named <code>preArgsuf</code> the result of this method is <code>arg</code>. * If there is no prefix or suffix defined in JavaCore options the result is the unchanged * name <code>preArgsuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_ARGUMENT_PREFIXES} and * {@link JavaCore#CODEASSIST_ARGUMENT_SUFFIXES}. * </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 javaProject project which contains the argument. * @param argumentName argument's name. * @return char[] the name without prefix and suffix. * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static char[] removePrefixAndSuffixForArgumentName(IJavaProject javaProject, char[] argumentName) { AssistOptions assistOptions = new AssistOptions(javaProject.getOptions(true)); return removePrefixAndSuffix( argumentName, assistOptions.argumentPrefixes, assistOptions.argumentSuffixes); } /** * Remove prefix and suffix from an argument name. * <p> * If argument name prefix is <code>pre</code> and argument name suffix is <code>suf</code> * then for an argument named <code>preArgsuf</code> the result of this method is <code>arg</code>. * If there is no prefix or suffix defined in JavaCore options the result is the unchanged * name <code>preArgsuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_ARGUMENT_PREFIXES} and * {@link JavaCore#CODEASSIST_ARGUMENT_SUFFIXES}. * </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 javaProject project which contains the argument. * @param argumentName argument's name. * @return char[] the name without prefix and suffix. * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static String removePrefixAndSuffixForArgumentName(IJavaProject javaProject, String argumentName) { return String.valueOf(removePrefixAndSuffixForArgumentName(javaProject, argumentName.toCharArray())); } |
| ||||
/** * Remove prefix and suffix from a local variable name. * <p> * If local variable name prefix is <code>pre</code> and local variable name suffix is <code>suf</code> * then for a local variable named <code>preLocalsuf</code> the result of this method is <code>local</code>. * If there is no prefix or suffix defined in JavaCore options the result is the unchanged * name <code>preLocalsuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_LOCAL_PREFIXES} and * {@link JavaCore#CODEASSIST_LOCAL_SUFFIXES}. * </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 javaProject project which contains the variable. * @param localName variable's name. * @return char[] the name without prefix and suffix. * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static char[] removePrefixAndSuffixForLocalVariableName(IJavaProject javaProject, char[] localName) { AssistOptions assistOptions = new AssistOptions(javaProject.getOptions(true)); return removePrefixAndSuffix( localName, assistOptions.localPrefixes, assistOptions.localSuffixes); } /** * Remove prefix and suffix from a local variable name. * <p> * If local variable name prefix is <code>pre</code> and local variable name suffix is <code>suf</code> * then for a local variable named <code>preLocalsuf</code> the result of this method is <code>local</code>. * If there is no prefix or suffix defined in JavaCore options the result is the unchanged * name <code>preLocalsuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_LOCAL_PREFIXES} and * {@link JavaCore#CODEASSIST_LOCAL_SUFFIXES}. * </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 javaProject project which contains the variable. * @param localName variable's name. * @return char[] the name without prefix and suffix. * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static String removePrefixAndSuffixForLocalVariableName(IJavaProject javaProject, String localName) { return String.valueOf(removePrefixAndSuffixForLocalVariableName(javaProject, localName.toCharArray())); } |
| |||
/** * Remove prefix and suffix from a local variable name. * <p> * If local variable name prefix is <code>pre</code> and local variable name suffix is <code>suf</code> * then for a local variable named <code>preLocalsuf</code> the result of this method is <code>local</code>. * If there is no prefix or suffix defined in JavaCore options the result is the unchanged * name <code>preLocalsuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_LOCAL_PREFIXES} and * {@link JavaCore#CODEASSIST_LOCAL_SUFFIXES}. * </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 javaProject project which contains the variable. * @param localName variable's name. * @return char[] the name without prefix and suffix. * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ /** * Remove prefix and suffix from an argument name. * <p> * If argument name prefix is <code>pre</code> and argument name suffix is <code>suf</code> * then for an argument named <code>preArgsuf</code> the result of this method is <code>arg</code>. * If there is no prefix or suffix defined in JavaCore options the result is the unchanged * name <code>preArgsuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_ARGUMENT_PREFIXES} and * {@link JavaCore#CODEASSIST_ARGUMENT_SUFFIXES}. * </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 javaProject project which contains the argument. * @param argumentName argument's name. * @return char[] the name without prefix and suffix. * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static char[] [[#variableb48ac120]](IJavaProject javaProject, char[] [[#variableb48ac040]]) { AssistOptions assistOptions = new AssistOptions(javaProject.getOptions(true)); return removePrefixAndSuffix( [[#variableb48ac040]], assistOptions. [[#variableb48ac020]], assistOptions. [[#variableb48ac080]]); } /** * Remove prefix and suffix from a local variable name. * <p> * If local variable name prefix is <code>pre</code> and local variable name suffix is <code>suf</code> * then for a local variable named <code>preLocalsuf</code> the result of this method is <code>local</code>. * If there is no prefix or suffix defined in JavaCore options the result is the unchanged * name <code>preLocalsuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_LOCAL_PREFIXES} and * {@link JavaCore#CODEASSIST_LOCAL_SUFFIXES}. * </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 javaProject project which contains the variable. * @param localName variable's name. * @return char[] the name without prefix and suffix. * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ /** * Remove prefix and suffix from an argument name. * <p> * If argument name prefix is <code>pre</code> and argument name suffix is <code>suf</code> * then for an argument named <code>preArgsuf</code> the result of this method is <code>arg</code>. * If there is no prefix or suffix defined in JavaCore options the result is the unchanged * name <code>preArgsuf</code>. * </p> * <p> * This method is affected by the following JavaCore options : {@link JavaCore#CODEASSIST_ARGUMENT_PREFIXES} and * {@link JavaCore#CODEASSIST_ARGUMENT_SUFFIXES}. * </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 javaProject project which contains the argument. * @param argumentName argument's name. * @return char[] the name without prefix and suffix. * @see JavaCore#setOptions(java.util.Hashtable) * @see JavaCore#getDefaultOptions() */ public static String [[#variableb48ac120]](IJavaProject javaProject, String [[#variableb48ac040]]) { return String.valueOf( [[#variableb48ac120]](javaProject, [[#variableb48ac040]].toCharArray())); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b48ac120]] | removePrefixAndSuffixForLocalVariableName |
1 | 2 | [[#b48ac120]] | removePrefixAndSuffixForArgumentName |
2 | 1 | [[#b48ac040]] | localName |
2 | 2 | [[#b48ac040]] | argumentName |
3 | 1 | [[#b48ac020]] | localPrefixes |
3 | 2 | [[#b48ac020]] | argumentPrefixes |
4 | 1 | [[#b48ac080]] | localSuffixes |
4 | 2 | [[#b48ac080]] | argumentSuffixes |