class AutoAppyTransformer implements Runnable {

    private static final long DEFAULT_DELAY = 500;  //ms
    private final Function function;
    private final AppearanceUIController controller;
    private ScheduledExecutorService executor;

    public AutoAppyTransformer(Function function) {
        this.controller = Lookup.getDefault().lookup(AppearanceUIController.class);
        this.function = function;
    }

    public void start() {
        executor = Executors.newSingleThreadScheduledExecutor(r -> new Thread(r, "Appearance Auto Transformer"));
        executor.scheduleWithFixedDelay(this, 0, getDelayInMs(), TimeUnit.MILLISECONDS);
    }

    public void stop() {<FILL_FUNCTION_BODY>}

    @Override
    public void run() {
        controller.transform(function);
    }

    public boolean isRunning() {
        return executor != null;
    }

    private long getDelayInMs() {
        return DEFAULT_DELAY;
    }
}

        if (executor != null && !executor.isShutdown()) {
            executor.shutdown();
        }
        executor = null;
    
<no_super_class>