CloneSet526


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26220.992class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
126538
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/EvaluateAction.java
226222
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/JavaObjectValueEditor.java
Clone Instance
1
Line Count
26
Source Line
538
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/EvaluateAction.java

        public static String getExceptionMessage(Throwable exception) {
                if (exception instanceof CoreException) {
                        CoreException ce = (CoreException) exception;
                        Throwable throwable = ce.getStatus().getException();
                        if (throwable instanceof com.sun.jdi.InvocationException) {
                                return getInvocationExceptionMessage((com.sun.jdi.InvocationException) throwable);
                        }
                        else   if (throwable instanceof CoreException) {
                                // Traverse nested CoreExceptions
                                return getExceptionMessage(throwable);
                               }
                        return ce.getStatus().getMessage();
                }
                String message = MessageFormat.format(ActionMessages.Evaluate_error_message_direct_exception, new Object[] {
                                                                                                                             exception.getClass()
                                                                                                                           } );
                if (exception.getMessage() != null) {
                        message = MessageFormat.format(ActionMessages.Evaluate_error_message_exception_pattern, new Object[] {
                                                                                                                               message, exception.getMessage()
                                                                                                                             } );
                }
                return message;
        }

        /**
         * Returns a message for the exception wrapped in an invocation exception
         */
        protected static String getInvocationExceptionMessage(com.sun.jdi.InvocationException exception) {
                        InvocationException ie = exception;
                        ObjectReference ref = ie.exception();
                        return MessageFormat.format(ActionMessages.Evaluate_error_message_wrapped_exception, new Object[] {
                                                                                                                            ref.referenceType().name()
                                                                                                                          } );
        }


Clone Instance
2
Line Count
26
Source Line
222
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/JavaObjectValueEditor.java

    /**
     * (copied from EvaluateAction)
     */
        protected String getExceptionMessage(Throwable exception) {
                if (exception instanceof CoreException) {
                        CoreException ce = (CoreException) exception;
                        Throwable throwable = ce.getStatus().getException();
                        if (throwable instanceof com.sun.jdi.InvocationException) {
                                return getInvocationExceptionMessage((com.sun.jdi.InvocationException) throwable);
                        }
                        else   if (throwable instanceof CoreException) {
                                // Traverse nested CoreExceptions
                                return getExceptionMessage(throwable);
                               }
                        return ce.getStatus().getMessage();
                }
                String message = MessageFormat.format(ActionMessages.Evaluate_error_message_direct_exception, new Object[] {
                                                                                                                             exception.getClass()
                                                                                                                           } );
                if (exception.getMessage() != null) {
                        message = MessageFormat.format(ActionMessages.Evaluate_error_message_exception_pattern, new Object[] {
                                                                                                                               message, exception.getMessage()
                                                                                                                             } );
                }
                return message;
        }

        /**
         * Returns a message for the exception wrapped in an invocation exception
         */
        protected String getInvocationExceptionMessage(com.sun.jdi.InvocationException exception) {
                        InvocationException ie = exception;
                        ObjectReference ref = ie.exception();
                        return MessageFormat.format(ActionMessages.Evaluate_error_message_wrapped_exception, new Object[] {
                                                                                                                            ref.referenceType().name()
                                                                                                                          } );
        }


Clone AbstractionParameter Count: 2Parameter Bindings

 [[#variable9bdbb920]]String getExceptionMessage(Throwable exception) {
  if (exception instanceof CoreException) {
    CoreException ce = (CoreException) exception;
    Throwable throwable = ce.getStatus().getException();
    if (throwable instanceof com.sun.jdi.InvocationException) {
      return getInvocationExceptionMessage((com.sun.jdi.InvocationException) throwable);
    }
    else
      if (throwable instanceof CoreException) {
        // Traverse nested CoreExceptions
        return getExceptionMessage(throwable);
      }
    return ce.getStatus().getMessage();
  }
  String message = MessageFormat.format(ActionMessages.Evaluate_error_message_direct_exception, new Object[] {
                                                                                                               exception.getClass()
                                                                                                             } );
  if (exception.getMessage() != null) {
    message = MessageFormat.format(ActionMessages.Evaluate_error_message_exception_pattern, new Object[] {
                                                                                                           message,
                                                                                                           exception.getMessage()
                                                                                                         } );
  }
  return message;
}

 [[#variableb89105e0]]String getInvocationExceptionMessage(com.sun.jdi.InvocationException exception) {
  InvocationException ie = exception;
  ObjectReference ref = ie.exception();
  return MessageFormat.format(ActionMessages.Evaluate_error_message_wrapped_exception, new Object[] {
                                                                                                      ref.referenceType().name()
                                                                                                    } );
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9bdbb920]]
/**
 * (copied from EvaluateAction)
 */
protected 
12[[#9bdbb920]]
public static 
21[[#b89105e0]]
/**
 * Returns a message for the exception wrapped in an invocation exception
 */
protected 
22[[#b89105e0]]
/**
 * Returns a message for the exception wrapped in an invocation exception
 */
protected static