Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
50 | 2 | 0 | 1.000 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 50 | 384 | plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java |
2 | 50 | 354 | plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe2.java |
| ||||
public String getEmptyLines(int linesNumber) { if (this.nlsTagCounter > 0) { return EMPTY_STRING; } StringBuffer buffer = new StringBuffer(); if (lastNumberOfNewLines == 0) { linesNumber++; // add an extra line breaks for (int i = 0; i < linesNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += linesNumber; line += linesNumber; column = 1; needSpace = false; this.pendingSpace = false; } else if (lastNumberOfNewLines == 1) { for (int i = 0; i < linesNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += linesNumber; line += linesNumber; column = 1; needSpace = false; this.pendingSpace = false; } else { if ((lastNumberOfNewLines - 1) >= linesNumber) { // there is no need to add new lines return EMPTY_STRING; } final int realNewLineNumber = linesNumber - lastNumberOfNewLines + 1; for (int i = 0; i < realNewLineNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += realNewLineNumber; line += realNewLineNumber; column = 1; needSpace = false; this.pendingSpace = false; } return String.valueOf(buffer); } public OptimizedReplaceEdit getLastEdit() { if (this.editsIndex > 0) { return this.edits[this.editsIndex - 1]; } return null; } |
| ||||
public String getEmptyLines(int linesNumber) { if (this.nlsTagCounter > 0) { return EMPTY_STRING; } StringBuffer buffer = new StringBuffer(); if (lastNumberOfNewLines == 0) { linesNumber++; // add an extra line breaks for (int i = 0; i < linesNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += linesNumber; line += linesNumber; column = 1; needSpace = false; this.pendingSpace = false; } else if (lastNumberOfNewLines == 1) { for (int i = 0; i < linesNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += linesNumber; line += linesNumber; column = 1; needSpace = false; this.pendingSpace = false; } else { if ((lastNumberOfNewLines - 1) >= linesNumber) { // there is no need to add new lines return EMPTY_STRING; } final int realNewLineNumber = linesNumber - lastNumberOfNewLines + 1; for (int i = 0; i < realNewLineNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += realNewLineNumber; line += realNewLineNumber; column = 1; needSpace = false; this.pendingSpace = false; } return String.valueOf(buffer); } public OptimizedReplaceEdit getLastEdit() { if (this.editsIndex > 0) { return this.edits[this.editsIndex - 1]; } return null; } |
| |||
public String getEmptyLines(int linesNumber) { if (this.nlsTagCounter > 0) { return EMPTY_STRING; } StringBuffer buffer = new StringBuffer(); if (lastNumberOfNewLines == 0) { linesNumber++; // add an extra line breaks for (int i = 0; i < linesNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += linesNumber; line += linesNumber; column = 1; needSpace = false; this.pendingSpace = false; } else if (lastNumberOfNewLines == 1) { for (int i = 0; i < linesNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += linesNumber; line += linesNumber; column = 1; needSpace = false; this.pendingSpace = false; } else { if ((lastNumberOfNewLines - 1) >= linesNumber) { // there is no need to add new lines return EMPTY_STRING; } final int realNewLineNumber = linesNumber - lastNumberOfNewLines + 1; for (int i = 0; i < realNewLineNumber; i++) { if (indentEmptyLines) printIndentationIfNecessary(buffer); buffer.append(this.lineSeparator); } lastNumberOfNewLines += realNewLineNumber; line += realNewLineNumber; column = 1; needSpace = false; this.pendingSpace = false; } return String.valueOf(buffer); } public OptimizedReplaceEdit getLastEdit() { if (this.editsIndex > 0) { return this.edits[this.editsIndex - 1]; } return null; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |