[Demonstration 1]

[Buggy Method]
public void addMessage(Integer status, Throwable exception) {
    String message = exception.getMessage();
    if (message == null) {
        message = "Unknown stack trace!";
    }
    addMessage(status, message, ExceptionUtils.getStackTrace(exception));
}

[Buggy Hunk]
message = "Unknown stack trace!";

[Patch]
message = "Unknown problem occurred: " + exception.getMessage();

[Demonstration 2]

[Buggy Method]
private static void addSoftwareLibrary(File file, ClassLoader classLoader) throws Exception {
    Method method = URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { URL.class });
    method.setAccessible(true);
    method.invoke(classLoader, new Object[] { file.toURI().toURL() });
}

[Buggy Hunk]
ClassLoader classLoader) throws Exception {

[Patch]
ClassLoader classLoader) throws NoSuchMethodException, MalformedURLException, InvocationTargetException, IllegalAccessException {