Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 3 | 0.985 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 67 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/CodeFormatterUtil.java |
2 | 8 | 91 | 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); } |
| ||||
/** * 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); } |
| |||
/** * 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#951878a0]] | getTabWidth |
1 | 2 | [[#951878a0]] | getIndentWidth |
2 | 1 | [[#95187820]] | JavaCore |
2 | 2 | [[#95187820]] | DefaultCodeFormatterConstants |
3 | 1 | [[#951877a0]] | SPACE |
3 | 2 | [[#951877a0]] | MIXED |