<commit_before>package com.github.dreamhead.moco.runner.watcher;

import com.google.common.base.Function;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.IOException;

public class Java7Watcher implements Watcher {
    private static Logger logger = LoggerFactory.getLogger(Java7Watcher.class);
    private static WatcherService service = new WatcherService();
    private final Function<File, Void> listener;
    private final File file;

    public Java7Watcher(final Function<File, Void> listener, final File file) {
        this.listener = listener;
        this.file = file;
    }

    @Override
    public synchronized void start() {
        try {
            if (!service.isRunning()) {
                service.start();
            }

            service.register(file, listener);
        } catch (IOException ignored) {
        }
    }

    @Override
    public void stop() {
    }
}<commit_msg>threw exception when fail to start service<commit_after>package com.github.dreamhead.moco.runner.watcher;

import com.github.dreamhead.moco.MocoException;
import com.google.common.base.Function;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.IOException;

public class Java7Watcher implements Watcher {
    private static Logger logger = LoggerFactory.getLogger(Java7Watcher.class);
    private static WatcherService service = new WatcherService();
    private final Function<File, Void> listener;
    private final File file;

    public Java7Watcher(final Function<File, Void> listener, final File file) {
        this.listener = listener;
        this.file = file;
    }

    @Override
    public synchronized void start() {
        try {
            if (!service.isRunning()) {
                service.start();
            }

            service.register(file, listener);
        } catch (IOException e) {
            throw new MocoException(e);
        }
    }

    @Override
    public void stop() {
    }
}
{'fraction_non_alphanumeric': 0.0935788949726232, 'fraction_numerical': 0.004977600796416127, 'mean_word_length': 2.7360594795539033, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6747585', 'n_tokens_mistral': 569, 'n_tokens_neox': 550, 'n_words': 145}