class Installer extends ModuleInstall {

    private static final String LATEST_GEPHI_VERSION_URL =
        "https://raw.githubusercontent.com/gephi/gephi/gh-pages/latest";

    protected static boolean isNewVersion(String latest, String current) {
        String gephiVersionTst = current.replaceAll("[0-9]{12}", "").replaceAll("[a-zA-Z -]", "");
        latest = latest.replaceAll("[a-zA-Z -]", "");
        int res = ModuleDescriptor.Version.parse(gephiVersionTst)
            .compareTo(ModuleDescriptor.Version.parse(latest));
        return res < 0;
    }

    @Override
    public void restored() {
        //Init
        initGephi();

        //GTK Slider issue #529913
        UIManager.put("Slider.paintValue", Boolean.FALSE);

        //JTabbedPane issue JDK-8257595
        if (UIUtils.isAquaLookAndFeel()) {
            UIManager.put("TabbedPane.foreground", Color.BLACK);
        }

        //Handler
        if (System.getProperty("org.gephi.crashReporter.enabled", "true").equals("true")) {
            Logger.getLogger("").addHandler(new ReporterHandler());
        }

        //Memory Starvation Manager
        if (System.getProperty("org.gephiMemoryStarvationManager.enabled", "true").equals("true")) {
            MemoryStarvationManager memoryStarvationManager = new MemoryStarvationManager();
            memoryStarvationManager.startup();
        }

        //Check for new major release:
        WindowManager.getDefault().invokeWhenUIReady(new Runnable() {
            @Override
            public void run() {
                new Thread() {
                    @Override
                    public void run() {
                        checkForNewMajorRelease();
                    }
                }.start();
            }
        });

        //Output logger
        installOutputLogger();
    }

    private void initGephi() {
        WindowManager.getDefault().invokeWhenUIReady(new Runnable() {
            @Override
            public void run() {
                DragNDropFrameAdapter.register();
            }
        });

        if (Utilities.isMac()) {
            try {
                Desktop.getDesktop().setOpenFileHandler(new ProjectOpenFilesHandler());
            } catch (Exception e) {
                Logger.getLogger(Installer.class.getName())
                    .log(Level.WARNING, "Can't setup OpenFilesHandler", e);
            }
        }
    }

    private void checkForNewMajorRelease() {<FILL_FUNCTION_BODY>}

    private void installOutputLogger() {
        Logger.getLogger("").addHandler(new OutputHandler());
    }

    private static class OutputHandler extends Handler {

        private final InputOutput io;
        private final OutputWriter outputWriter;
        private final MsgFormatter formatter;

        public OutputHandler() {
            io = IOProvider.getDefault().getIO("Log", true);
            outputWriter = io.getOut();
            formatter = new MsgFormatter();
        }

        @Override
        public void publish(LogRecord record) {
            if ((record.getMessage() == null || record.getMessage().isEmpty()) &&
                record.getThrown() == null) {
                //Nothing to log
                return;
            }

            Color color = Color.BLACK;
            if (record.getLevel().equals(Level.WARNING)) {
                color = Color.ORANGE;
            } else if (record.getLevel().equals(Level.SEVERE)) {
                color = Color.RED;
            }

            String msg = formatter.format(record);
            if (IOColorLines.isSupported(io)) {
                try {
                    IOColorLines.println(io, msg, color);
                } catch (IOException ex) {
                    outputWriter.println(msg);
                }
            } else {
                outputWriter.println(msg);
            }
        }

        @Override
        public void flush() {
            outputWriter.flush();
        }

        @Override
        public void close() throws SecurityException {
            outputWriter.close();
        }

        public class MsgFormatter extends Formatter {

            @Override
            public synchronized String format(LogRecord record) {
                String formattedMessage = formatMessage(record);
                String throwable = "";
                String outputFormat = "[%1$s] %2$s %3$s"; //Also adding for logging exceptions
                if (record.getThrown() != null) {
                    StringWriter sw = new StringWriter();
                    PrintWriter pw = new PrintWriter(sw);
                    pw.println();
                    record.getThrown().printStackTrace(pw);
                    pw.close();
                    throwable = sw.toString();
                }
                return String
                    .format(outputFormat, record.getLevel().getName(), formattedMessage, throwable);
            }
        }
    }
}

        boolean doCheck =
            NbPreferences.forModule(Installer.class).getBoolean("check_latest_version", true);
        if (doCheck) {
            InputStream stream = null;
            BufferedReader reader = null;
            try {
                String gephiVersion = System.getProperty("netbeans.productversion");
                if (gephiVersion.contains("SNAPSHOT")) {
                    return;
                }

                URL url = new URL(LATEST_GEPHI_VERSION_URL);
                URLConnection connection = url.openConnection();
                connection.setRequestProperty("User-Agent", "");
                connection.connect();
                stream = connection.getInputStream();
                reader = new BufferedReader(new InputStreamReader(stream));

                String latest = reader.readLine();

                if (isNewVersion(latest, gephiVersion)) {
                    //Show update dialog
                    JCheckBox checkbox =
                        new JCheckBox(NbBundle.getMessage(Installer.class, "MajorReleaseCheck.dontShowAgain"),
                            false);
                    String message =
                        NbBundle
                            .getMessage(Installer.class, "MajorReleaseCheck.message", latest, gephiVersion);
                    int option = JOptionPane.showConfirmDialog(null, new Object[] {message, checkbox},
                        NbBundle.getMessage(Installer.class, "MajorReleaseCheck.newVersion"),
                        JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
                    NbPreferences.forModule(Installer.class)
                        .putBoolean("check_latest_version", !checkbox.isSelected());
                    if (option == JOptionPane.OK_OPTION) {
                        Desktop.getDesktop().browse(new URI("http://gephi.org/users/download/"));
                    }
                }
            } catch (Exception ex) {
                Logger.getLogger("").warning("Error while checking latest Gephi version");
            } finally {
                try {
                    if (reader != null) {
                        reader.close();
                    }
                    if (stream != null) {
                        stream.close();
                    }
                } catch (IOException e) {

                }
            }
        }
    
<no_super_class>