CloneSet2287


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
33240.965class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
133300
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java
233424
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java
Clone Instance
1
Line Count
33
Source Line
300
Source File
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()));
        }


Clone Instance
2
Line Count
33
Source Line
424
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java

        /**
         * 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()));
        }


Clone AbstractionParameter Count: 4Parameter Bindings

/**
         * 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b48ac120]]
removePrefixAndSuffixForLocalVariableName 
12[[#b48ac120]]
removePrefixAndSuffixForArgumentName 
21[[#b48ac040]]
localName 
22[[#b48ac040]]
argumentName 
31[[#b48ac020]]
localPrefixes 
32[[#b48ac020]]
argumentPrefixes 
41[[#b48ac080]]
localSuffixes 
42[[#b48ac080]]
argumentSuffixes