class HitsUI implements StatisticsUI {

    private final StatSettings settings = new StatSettings();
    private HitsPanel panel;
    private Hits hits;

    @Override
    public JPanel getSettingsPanel() {
        panel = new HitsPanel();
        return panel;
    }

    @Override
    public void setup(Statistics statistics) {<FILL_FUNCTION_BODY>}

    @Override
    public void unsetup() {
        if (panel != null) {
            hits.setEpsilon(panel.getEpsilon());
            hits.setUndirected(!panel.isDirected());
            settings.save(hits);
        }
        panel = null;
        hits = null;
    }

    @Override
    public Class<? extends Statistics> getStatisticsClass() {
        return Hits.class;
    }

    @Override
    public String getValue() {
        return null;
    }

    @Override
    public String getDisplayName() {
        return NbBundle.getMessage(getClass(), "HitsUI.name");
    }

    @Override
    public String getCategory() {
        return StatisticsUI.CATEGORY_NETWORK_OVERVIEW;
    }

    @Override
    public int getPosition() {
        return 500;
    }

    @Override
    public String getShortDescription() {
        return NbBundle.getMessage(getClass(), "HitsUI.shortDescription");
    }

    private static class StatSettings {

        private double epsilon = 0.0001;

        private void save(Hits stat) {
            this.epsilon = stat.getEpsilon();
        }

        private void load(Hits stat) {
            stat.setEpsilon(epsilon);
        }
    }
}

        this.hits = (Hits) statistics;
        if (panel != null) {
            settings.load(hits);
            panel.setEpsilon(hits.getEpsilon());
            panel.setDirected(!hits.getUndirected());
        }
    
<no_super_class>