| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 26 | 2 | 2 | 0.987 | class_body_declarations[3] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 26 | 65 | plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/MessagerImpl.java |
| 2 | 26 | 93 | plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/MessagerImpl.java |
| ||||
public void printNotice(SourcePosition pos, String msg, String[] arguments)
{
if (pos instanceof SourcePositionImpl)
print((SourcePositionImpl) pos, Severity.INFO, msg, arguments);
else if (pos == null)
printNotice(msg);
else
print(pos, Severity.INFO, msg, arguments);
}
public void printNotice(ASTNode node, String msg)
{
if (node == null)
throw new IllegalArgumentException("\'node\' cannot be null"); //$NON-NLS-1$
final int start = node.getStartPosition();
// The only time you get a dom AST node is when you are processing in a per-file mode.
// _env.getAstCompilationUnit() && _env.getFile() will return an non-null value.
int line = _env.getAstCompilationUnit().getLineNumber(start);
if (line < 1)
line = 1;
_env.addMessage(_env.getFile(), start, node.getLength() + start, Severity.INFO, msg, line, null);
}
public void printNotice(String msg)
{
print(Severity.INFO, msg, null);
}
|
| ||||
public void printWarning(SourcePosition pos, String msg, String[] arguments)
{
if (pos instanceof SourcePositionImpl)
print((SourcePositionImpl) pos, Severity.WARNING, msg, arguments);
else if (pos == null)
printWarning(msg);
else
print(pos, Severity.WARNING, msg, arguments);
}
public void printWarning(ASTNode node, String msg)
{
if (node == null)
throw new IllegalArgumentException("\'node\' cannot be null"); //$NON-NLS-1$
final int start = node.getStartPosition();
// The only time you get a dom AST node is when you are processing in a per-file mode.
// _env.getAstCompilationUnit() && _env.getFile() will return an non-null value.
int line = _env.getAstCompilationUnit().getLineNumber(start);
if (line < 1)
line = 1;
_env.addMessage(_env.getFile(), start, node.getLength() + start, Severity.WARNING, msg, line, null);
}
public void printWarning(String msg)
{
print(Severity.WARNING, msg, null);
}
|
| |||
public void [[#variableb15a1200]](SourcePosition pos, String msg, String[] arguments) {
if (pos instanceof SourcePositionImpl)
print((SourcePositionImpl) pos, Severity. [[#variableb15a11a0]], msg, arguments);
else
if (pos == null)
[[#variableb15a1200]](msg);
else
print(pos, Severity. [[#variableb15a11a0]], msg, arguments);
}
public void [[#variableb15a1200]](ASTNode node, String msg) {
if (node == null)
throw new IllegalArgumentException("\'node\' cannot be null"); //$NON-NLS-1$
final int start = node.getStartPosition();
// The only time you get a dom AST node is when you are processing in a per-file mode.
// _env.getAstCompilationUnit() && _env.getFile() will return an non-null value.
int line = _env.getAstCompilationUnit().getLineNumber(start);
if (line < 1)
line = 1;
_env.addMessage(_env.getFile(), start, node.getLength() + start, Severity. [[#variableb15a11a0]], msg, line, null);
}
public void [[#variableb15a1200]](String msg) {
print(Severity. [[#variableb15a11a0]], msg, null);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b15a1200]] | printWarning |
| 1 | 2 | [[#b15a1200]] | printNotice |
| 2 | 1 | [[#b15a11a0]] | WARNING |
| 2 | 2 | [[#b15a11a0]] | INFO |