CloneSet3200


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
14230.985class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11467
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/CodeFormatterUtil.java
2891
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/CodeFormatterUtil.java
Clone Instance
1
Line Count
14
Source Line
67
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/CodeFormatterUtil.java

        /**
         * Gets the current tab width.
         * 
         * @param project The project where the source is used, used for project
         *        specific options or <code>null</code> if the project is unknown
         *        and the workspace default should be used
         * @return The tab width
         */
        public static int getTabWidth(IJavaProject project) {
                /*
                 * If the tab-char is SPACE, FORMATTER_INDENTATION_SIZE is not used
                 * by the core formatter.
                 * We piggy back the visual tab length setting in that preference in
                 * that case.
                 */
                String key;
                if (JavaCore.SPACE.equals(getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR)))
                        key = DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE;
                else
                        key = DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE;

                return getCoreOption(project, key, 4);
        }


Clone Instance
2
Line Count
8
Source Line
91
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/CodeFormatterUtil.java

        /**
         * Returns the current indent width.
         * 
         * @param project the project where the source is used or <code>null</code>
         *        if the project is unknown and the workspace default should be used
         * @return the indent width
         * @since 3.1
         */
        public static int getIndentWidth(IJavaProject project) {
                String key;
                if (DefaultCodeFormatterConstants.MIXED.equals(getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR)))
                        key = DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE;
                else
                        key = DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE;

                return getCoreOption(project, key, 4);
        }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Gets the current tab width.
         * 
         * @param project The project where the source is used, used for project
         *        specific options or <code>null</code> if the project is unknown
         *        and the workspace default should be used
         * @return The tab width
         */
/**
         * Returns the current indent width.
         * 
         * @param project the project where the source is used or <code>null</code>
         *        if the project is unknown and the workspace default should be used
         * @return the indent width
         * @since 3.1
         */
public static int  [[#variable951878a0]](IJavaProject project) {
  /*
                   * If the tab-char is SPACE, FORMATTER_INDENTATION_SIZE is not used
                   * by the core formatter.
                   * We piggy back the visual tab length setting in that preference in
                   * that case.
                   */
  String key;
  if ( [[#variable95187820]]. [[#variable951877a0]].equals(getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR)))
    key = DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE;
  else
    key = DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE;
  return getCoreOption(project, key, 4);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#951878a0]]
getTabWidth 
12[[#951878a0]]
getIndentWidth 
21[[#95187820]]
JavaCore 
22[[#95187820]]
DefaultCodeFormatterConstants 
31[[#951877a0]]
SPACE 
32[[#951877a0]]
MIXED