Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
11 | 2 | 0 | 1.000 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 11 | 98 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContext.java |
2 | 11 | 210 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaDocContext.java |
| ||||
/** * Returns the indentation level at the position of code completion. * * @return the indentation level at the position of the code completion */ private int getIndentation() { int start = getStart(); IDocument document = getDocument(); try { IRegion region = document.getLineInformationOfOffset(start); String lineContent = document.get(region.getOffset(), region.getLength()); ICompilationUnit compilationUnit = getCompilationUnit(); IJavaProject project = compilationUnit == null ? null: compilationUnit.getJavaProject(); return Strings.computeIndentUnits(lineContent, project); } catch (BadLocationException e) { return 0; } } |
| ||||
/** * Returns the indentation level at the position of code completion. * * @return the indentation level at the position of the code completion */ private int getIndentation() { int start = getStart(); IDocument document = getDocument(); try { IRegion region = document.getLineInformationOfOffset(start); String lineContent = document.get(region.getOffset(), region.getLength()); ICompilationUnit compilationUnit = getCompilationUnit(); IJavaProject project = compilationUnit == null ? null: compilationUnit.getJavaProject(); return Strings.computeIndentUnits(lineContent, project); } catch (BadLocationException e) { return 0; } } |
| |||
/** * Returns the indentation level at the position of code completion. * * @return the indentation level at the position of the code completion */ private int getIndentation() { int start = getStart(); IDocument document = getDocument(); try { IRegion region = document.getLineInformationOfOffset(start); String lineContent = document.get(region.getOffset(), region.getLength()); ICompilationUnit compilationUnit = getCompilationUnit(); IJavaProject project = compilationUnit == null ? null: compilationUnit.getJavaProject(); return Strings.computeIndentUnits(lineContent, project); } catch (BadLocationException e) { return 0; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |