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.992 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 26 | 538 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/EvaluateAction.java |
2 | 26 | 222 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/JavaObjectValueEditor.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() } ); } |
| ||||
/** * (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() } ); } |
| |||
[[#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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#9bdbb920]] | /** * (copied from EvaluateAction) */ protected |
1 | 2 | [[#9bdbb920]] | public static |
2 | 1 | [[#b89105e0]] | /** * Returns a message for the exception wrapped in an invocation exception */ protected |
2 | 2 | [[#b89105e0]] | /** * Returns a message for the exception wrapped in an invocation exception */ protected static |