try { return getName( callstack.top() ).toObject( callstack, interpreter, forceClass ); } catch ( UtilEvalError e ) { //e.printStackTrace(); throw e.toEvalError( this, callstack ); }
try { Object ret = globalNameSpace.get( name, this ); return Primitive.unwrap( ret ); } catch ( UtilEvalError e ) { throw e.toEvalError( SimpleNode.JAVACODE, new CallStack() ); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/BSHAmbiguousName.java File path: /jEdit-4.2/src/bsh/Interpreter.java
Method name: Object toObject(CallStack, Interpreter, boolean) Method name: Object get(String)
Number of AST nodes: 2 Number of AST nodes: 3
1
try {
1
try {
2
        	return 
3
				getName( callstack.top() ).toObject( 
4
					callstack, interpreter, forceClass
2
			Object ret = globalNameSpace.get( name, this );
5
 );
3
			return Primitive.unwrap( ret );
6
		} catch ( UtilEvalError e ) {
4
		} catch ( UtilEvalError e ) {
7
//e.printStackTrace();
5
 
8
			throw e.toEvalError( this, callstack );
6
			throw e.toEvalError( SimpleNode.JAVACODE, new CallStack() ); 
9
		}
7
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    1
    try
    Differences
    Expression1Expression2Difference
    thisSimpleNode.JAVACODETYPE_COMPATIBLE_REPLACEMENT
    callstacknew CallStack()TYPE_COMPATIBLE_REPLACEMENT
    1
    try
                                                                                              
    2
    Object ret = globalNameSpace.get(name, this);
    Preondition Violations
    Unmatched statement Object ret=globalNameSpace.get(name,this); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2
    Object ret = globalNameSpace.get(name, this);
    2
    return getName(callstack.top()).toObject(callstack, interpreter, forceClass);
    2
    return getName(callstack.top()).toObject(callstack, interpreter, forceClass);
    Preondition Violations
    Unmatched return getName(callstack.top()).toObject(callstack,interpreter,forceClass);
                                                                                                                                                                
                                                                    
    3
    return Primitive.unwrap(ret);
    Preondition Violations
    Unmatched return Primitive.unwrap(ret);
    3
    return Primitive.unwrap(ret);
    Precondition Violations (3)
    Row Violation
    1Unmatched statement Object ret=globalNameSpace.get(name,this); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2Unmatched return getName(callstack.top()).toObject(callstack,interpreter,forceClass);
    3Unmatched return Primitive.unwrap(ret);