Source:
<code>public static ClusterException decode(StructDecoder<StructDecoder<Void>> decoder) { String exceptionClassName = decoder.string(FQCN_FIELD); String message = decoder.string(MESSAGE_FIELD); StructArrayDecoder<StructDecoder<StructDecoder<Void>>> arrayDecoder = decoder.structs(STACKTRACE_ELEMENTS_FIELD); StackTraceElement[] stackTraceElements = new StackTraceElement[arrayDecoder.length()]; for (int i = 0; i < arrayDecoder.length(); i++) { StructDecoder<?> element = arrayDecoder.next(); stackTraceElements[i] = new StackTraceElement( element.string(DECLARING_CLASS_FIELD), element.string(METHOD_NAME_FIELD), element.string(FILE_NAME_FIELD), element.int32(LINE_NUM_FIELD)); element.end(); } arrayDecoder.end(); <START> Class<?> clazz = null; <END> ClusterException exception; try { clazz = Class.forName(exceptionClassName); } catch (ClassNotFoundException e) { LOGGER.error("Exception type not found", e); } exception = getClusterException(message, clazz); if (exception == null) { exception = new UnknownClusterException(message); } exception.setStackTrace(stackTraceElements); return exception; }</code><technical_language>This Class<? extends ClusterException>, right? block become: java Class<? extends ClusterException> clazz = null; ClusterException exception; try { clazz = Class.forName(exceptionClassName).asSubclass(ClusterException.class); } catch (ClassNotFoundException e) { LOGGER.error("Exception type found", e); } exception = getClusterException(message, clazz); if (exception == null) { exception = new UnknownClusterException(message); } exception.setStackTrace(stackTraceElements); return exception; } @SuppressWarnings("unchecked") private static ClusterException getClusterException(String message, Class<? extends ClusterException> clazz) { ClusterException exception = null; if (clazz != null) { try { Constructor<? extends ClusterException> declaredConstructor = clazz.getDeclaredConstructor(String.class); exception = declaredConstructor.newInstance(message); } catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) { LOGGER.error("Failed instantiate exception object.", e); } } return exception; }</technical_language>

Target:
public static ClusterException decode(StructDecoder<StructDecoder<Void>> decoder) { String exceptionClassName = decoder.string(FQCN_FIELD); String message = decoder.string(MESSAGE_FIELD); StructArrayDecoder<StructDecoder<StructDecoder<Void>>> arrayDecoder = decoder.structs(STACKTRACE_ELEMENTS_FIELD); StackTraceElement[] stackTraceElements = new StackTraceElement[arrayDecoder.length()]; for (int i = 0; i < arrayDecoder.length(); i++) { StructDecoder<?> element = arrayDecoder.next(); stackTraceElements[i] = new StackTraceElement( element.string(DECLARING_CLASS_FIELD), element.string(METHOD_NAME_FIELD), element.string(FILE_NAME_FIELD), element.int32(LINE_NUM_FIELD)); element.end(); } arrayDecoder.end(); Class<? extends ClusterException> clazz = null; ClusterException exception; try { clazz = Class.forName(exceptionClassName).asSubclass(ClusterException.class); } catch (ClassNotFoundException e) { LOGGER.error("Exception type not found", e); } exception = getClusterException(message, clazz); if (exception == null) { exception = new UnknownClusterException(message); } exception.setStackTrace(stackTraceElements); return exception; }