Source:
<code>public static synchronized final String[] init(Version requestedVersion, String progname, String ... args) throws GstException { if (CHECK_VERSIONS) { Version availableVersion = getVersion(); if (requestedVersion.getMajor() != 1 || availableVersion.getMajor() != 1) { throw new GstException("gst1-java-core only supports GStreamer 1.x"); } if (requestedVersion.getMinor() < 8) { requestedVersion = new Version(1, 8); } if (!availableVersion.checkSatisfies(requestedVersion)) { <START> throw new GstException("The requested version of GStreamer is not available\n" <END> + "Requested : " + requestedVersion + "\nAvailable : " + availableVersion); } } if (INIT_COUNT.getAndIncrement() > 0) { if (CHECK_VERSIONS) { if (requestedVersion.getMinor() > minorVersion) { minorVersion = (int) requestedVersion.getMinor(); } } return args; } NativeArgs argv = new NativeArgs(progname, args); Pointer[] error = { null }; if (!GST_API.gst_init_check(argv.argcRef, argv.argvRef, error)) { INIT_COUNT.decrementAndGet(); throw new GstException(new GError(new GErrorStruct(error[0]))); } LOG.fine("after gst_init, argc=" + argv.argcRef.getValue()); Version runningVersion = getVersion(); if (runningVersion.getMajor() != 1) { LOG.warning("gst1-java-core only supports GStreamer 1.x"); } if (useDefaultContext) { mainContext = GMainContext.getDefaultContext(); executorService = new MainContextExecutorService(mainContext); } else { mainContext = new GMainContext(); executorService = Executors.newSingleThreadScheduledExecutor(threadFactory); } quit = new CountDownLatch(1); loadAllClasses(); if (CHECK_VERSIONS) { minorVersion = requestedVersion.getMinor(); } return argv.toStringArray(); }</code><technical_language>I prefer String.format more readable</technical_language>

Target:
public static synchronized final String[] init(Version requestedVersion, String progname, String ... args) throws GstException { if (CHECK_VERSIONS) { Version availableVersion = getVersion(); if (requestedVersion.getMajor() != 1 || availableVersion.getMajor() != 1) { throw new GstException("gst1-java-core only supports GStreamer 1.x"); } if (requestedVersion.getMinor() < 8) { requestedVersion = new Version(1, 8); } if (!availableVersion.checkSatisfies(requestedVersion)) { throw new GstException(String.format( "The requested version of GStreamer is not available\nRequested : %s\nAvailable : %s\n", requestedVersion, availableVersion)); } } if (INIT_COUNT.getAndIncrement() > 0) { if (CHECK_VERSIONS) { if (requestedVersion.getMinor() > minorVersion) { minorVersion = (int) requestedVersion.getMinor(); } } return args; } NativeArgs argv = new NativeArgs(progname, args); Pointer[] error = { null }; if (!GST_API.gst_init_check(argv.argcRef, argv.argvRef, error)) { INIT_COUNT.decrementAndGet(); throw new GstException(new GError(new GErrorStruct(error[0]))); } LOG.fine("after gst_init, argc=" + argv.argcRef.getValue()); Version runningVersion = getVersion(); if (runningVersion.getMajor() != 1) { LOG.warning("gst1-java-core only supports GStreamer 1.x"); } if (useDefaultContext) { mainContext = GMainContext.getDefaultContext(); executorService = new MainContextExecutorService(mainContext); } else { mainContext = new GMainContext(); executorService = Executors.newSingleThreadScheduledExecutor(threadFactory); } quit = new CountDownLatch(1); loadAllClasses(); if (CHECK_VERSIONS) { minorVersion = requestedVersion.getMinor(); } return argv.toStringArray(); }