CloneSet1475


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21210.997statement_sequence[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
121142
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
221240
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
Clone Instance
1
Line Count
21
Source Line
142
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java

                                // catch var is always set
                                LocalVariableBinding catchArg = this.catchArguments[i].binding;
                                catchInfo.markAsDefinitelyAssigned(catchArg);
                                catchInfo.markAsDefinitelyNonNull(catchArg);
                                /*
                                "If we are about to consider an unchecked exception handler, potential inits may have occured inside
                                the try block that need to be detected , e.g. 
                                try { x = 1; throwSomething();} catch(Exception e){ x = 2} "
                                "(uncheckedExceptionTypes notNil and: [uncheckedExceptionTypes at: index])
                                ifTrue: [catchInits addPotentialInitializationsFrom: tryInits]."
                                */
                                if (this.tryBlock.statements == null) {
                                        catchInfo.setReachMode(FlowInfo.UNREACHABLE);
                                }
                                catchInfo =
                                        this.catchBlocks[i].analyseCode(
                                                currentScope, 
                                                flowContext, 
                                                catchInfo              );
                                this.catchExits[i] =
                                        (catchInfo.tagBits&  FlowInfo.UNREACHABLE) != 0;
                                tryInfo = tryInfo.mergedWith(catchInfo.unconditionalInits());


Clone Instance
2
Line Count
21
Source Line
240
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java

                                // catch var is always set
                                LocalVariableBinding catchArg = this.catchArguments[i].binding;
                                catchInfo.markAsDefinitelyAssigned(catchArg);
                                catchInfo.markAsDefinitelyNonNull(catchArg);
                                /*
                                "If we are about to consider an unchecked exception handler, potential inits may have occured inside
                                the try block that need to be detected , e.g. 
                                try { x = 1; throwSomething();} catch(Exception e){ x = 2} "
                                "(uncheckedExceptionTypes notNil and: [uncheckedExceptionTypes at: index])
                                ifTrue: [catchInits addPotentialInitializationsFrom: tryInits]."
                                */
                                if (this.tryBlock.statements == null) {
                                        catchInfo.setReachMode(FlowInfo.UNREACHABLE);
                                }
                                catchInfo =
                                        this.catchBlocks[i].analyseCode(
                                                currentScope, 
                                                insideSubContext, 
                                                catchInfo              );
                                this.catchExits[i] =
                                        (catchInfo.tagBits&  FlowInfo.UNREACHABLE) != 0;
                                tryInfo = tryInfo.mergedWith(catchInfo.unconditionalInits());


Clone AbstractionParameter Count: 1Parameter Bindings

// catch var is always set
LocalVariableBinding catchArg = this.catchArguments[i].binding;
catchInfo.markAsDefinitelyAssigned(catchArg);
catchInfo.markAsDefinitelyNonNull(catchArg);
/*
                                "If we are about to consider an unchecked exception handler, potential inits may have occured inside
                                the try block that need to be detected , e.g. 
                                try { x = 1; throwSomething();} catch(Exception e){ x = 2} "
                                "(uncheckedExceptionTypes notNil and: [uncheckedExceptionTypes at: index])
                                ifTrue: [catchInits addPotentialInitializationsFrom: tryInits]."
                                */
if (this.tryBlock.statements == null) {
  catchInfo.setReachMode(FlowInfo.UNREACHABLE);
}
catchInfo = this.catchBlocks[i].analyseCode(currentScope,  [[#variable7d139300]], catchInfo);
this.catchExits[i] = (catchInfo.tagBits&FlowInfo.UNREACHABLE) != 0;
tryInfo = tryInfo.mergedWith(catchInfo.unconditionalInits());
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#7d139300]]
flowContext 
12[[#7d139300]]
insideSubContext