| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 25 | 2 | 1 | 0.998 | statement_sequence[5] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 25 | 83 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java |
| 2 | 25 | 194 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java |
| ||||
// no finally block -- this is a simplified copy of the else part
// process the try block in a context handling the local exceptions.
ExceptionHandlingFlowContext handlingContext =
new ExceptionHandlingFlowContext(
flowContext,
this,
this.caughtExceptionTypes,
this.scope,
flowInfo.unconditionalInits());
handlingContext.initsOnFinally =
new NullInfoRegistry(flowInfo.unconditionalInits());
// only try blocks initialize that member - may consider creating a
// separate class if needed
FlowInfo tryInfo;
if (this.tryBlock.isEmptyBlock()) {
tryInfo = flowInfo;
this.postTryInitStateIndex = currentScope.methodScope().recordInitializationStates(tryInfo);
}
else {
tryInfo = this.tryBlock.analyseCode(currentScope, handlingContext, flowInfo.copy());
if ((tryInfo.tagBits& FlowInfo.UNREACHABLE) != 0)
this.bits |= ASTNode.IsTryBlockExiting;
this.postTryInitStateIndex = currentScope.methodScope().recordInitializationStates(tryInfo);
}
// check unreachable catch blocks
handlingContext.complainIfUnusedExceptionHandlers(this.scope, this );
|
| ||||
// process the try block in a context handling the local exceptions.
ExceptionHandlingFlowContext handlingContext =
new ExceptionHandlingFlowContext(
insideSubContext,
this,
this.caughtExceptionTypes,
this.scope,
flowInfo.unconditionalInits());
handlingContext.initsOnFinally =
new NullInfoRegistry(flowInfo.unconditionalInits());
// only try blocks initialize that member - may consider creating a
// separate class if needed
FlowInfo tryInfo;
if (this.tryBlock.isEmptyBlock()) {
tryInfo = flowInfo;
this.postTryInitStateIndex = currentScope.methodScope().recordInitializationStates(tryInfo);
}
else {
tryInfo = this.tryBlock.analyseCode(currentScope, handlingContext, flowInfo.copy());
if ((tryInfo.tagBits& FlowInfo.UNREACHABLE) != 0)
this.bits |= ASTNode.IsTryBlockExiting;
this.postTryInitStateIndex = currentScope.methodScope().recordInitializationStates(tryInfo);
}
// check unreachable catch blocks
handlingContext.complainIfUnusedExceptionHandlers(this.scope, this );
|
| |||
// no finally block -- this is a simplified copy of the else part
// process the try block in a context handling the local exceptions.
ExceptionHandlingFlowContext handlingContext = new ExceptionHandlingFlowContext( [[#variable52342880]], this, this.caughtExceptionTypes, this.scope, flowInfo.unconditionalInits());
handlingContext.initsOnFinally = new NullInfoRegistry(flowInfo.unconditionalInits());
// only try blocks initialize that member - may consider creating a
// separate class if needed
// separate class if needed
FlowInfo tryInfo;
if (this.tryBlock.isEmptyBlock()) {
tryInfo = flowInfo;
this.postTryInitStateIndex = currentScope.methodScope().recordInitializationStates(tryInfo);
}
else {
tryInfo = this.tryBlock.analyseCode(currentScope, handlingContext, flowInfo.copy());
if ((tryInfo.tagBits&FlowInfo.UNREACHABLE) != 0)
this.bits |= ASTNode.IsTryBlockExiting;
this.postTryInitStateIndex = currentScope.methodScope().recordInitializationStates(tryInfo);
}
// check unreachable catch blocks
handlingContext.complainIfUnusedExceptionHandlers(this.scope, this );
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#52342880]] | flowContext |
| 1 | 2 | [[#52342880]] | insideSubContext |