Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 2 | 3 | 0.952 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 15 | 159 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Strings.java |
2 | 16 | 297 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Strings.java |
| ||||
/** * Returns the indent of the given string in indentation units. Odd spaces * are not counted. * * @param line the text line * @param project the java project from which to get the formatter * preferences, or <code>null</code> for global preferences * @since 3.1 */ public static int computeIndentUnits(String line, IJavaProject project) { return IndentManipulation.measureIndentUnits(line, CodeFormatterUtil.getTabWidth(project), CodeFormatterUtil.getIndentWidth(project)); } /** * Returns the indent of the given string in indentation units. Odd spaces * are not counted. * * @param line the text line * @param tabWidth the width of the '\t' character in space equivalents * @param indentWidth the width of one indentation unit in space equivalents * @since 3.1 */ public static int computeIndentUnits(String line, int tabWidth, int indentWidth) { return IndentManipulation.measureIndentUnits(line, tabWidth, indentWidth); } |
| ||||
/** * Returns that part of the indentation of <code>line</code> that makes up * a multiple of indentation units. * * @param line the line to scan * @param project the java project from which to get the formatter * preferences, or <code>null</code> for global preferences * @return the indent part of <code>line</code>, but no odd spaces * @since 3.1 */ public static String getIndentString(String line, IJavaProject project) { return IndentManipulation.extractIndentString(line, CodeFormatterUtil.getTabWidth(project), CodeFormatterUtil.getIndentWidth(project)); } /** * Returns that part of the indentation of <code>line</code> that makes up * a multiple of indentation units. * * @param line the line to scan * @param tabWidth the size of one tab in space equivalents * @param indentWidth the size of the indent in space equivalents * @return the indent part of <code>line</code>, but no odd spaces * @since 3.1 */ public static String getIndentString(String line, int tabWidth, int indentWidth) { return IndentManipulation.extractIndentString(line, tabWidth, indentWidth); } |
| |||
/** * Returns that part of the indentation of <code>line</code> that makes up * a multiple of indentation units. * * @param line the line to scan * @param project the java project from which to get the formatter * preferences, or <code>null</code> for global preferences * @return the indent part of <code>line</code>, but no odd spaces * @since 3.1 */ /** * Returns the indent of the given string in indentation units. Odd spaces * are not counted. * * @param line the text line * @param project the java project from which to get the formatter * preferences, or <code>null</code> for global preferences * @since 3.1 */ public static [[#variable9c355bc0]] [[#variable9c355b60]](String line, IJavaProject project) { return IndentManipulation. [[#variable9c355c00]](line, CodeFormatterUtil.getTabWidth(project), CodeFormatterUtil.getIndentWidth(project)); } /** * Returns that part of the indentation of <code>line</code> that makes up * a multiple of indentation units. * * @param line the line to scan * @param tabWidth the size of one tab in space equivalents * @param indentWidth the size of the indent in space equivalents * @return the indent part of <code>line</code>, but no odd spaces * @since 3.1 */ /** * Returns the indent of the given string in indentation units. Odd spaces * are not counted. * * @param line the text line * @param tabWidth the width of the '\t' character in space equivalents * @param indentWidth the width of one indentation unit in space equivalents * @since 3.1 */ public static [[#variable9c355bc0]] [[#variable9c355b60]](String line, int tabWidth, int indentWidth) { return IndentManipulation. [[#variable9c355c00]](line, tabWidth, indentWidth); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#9c355bc0]] | String |
1 | 2 | [[#9c355bc0]] | int |
2 | 1 | [[#9c355b60]] | getIndentString |
2 | 2 | [[#9c355b60]] | computeIndentUnits |
3 | 1 | [[#9c355c00]] | extractIndentString |
3 | 2 | [[#9c355c00]] | measureIndentUnits |