<commit_before>package org.lantern.browser;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Opens the lantern ui in a browser on OSX.
 */
public class OsxBrowser implements LanternBrowser {

    private final Logger log = LoggerFactory.getLogger(getClass());
    
    private static final String CHROME_OSX = 
            "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
    
    public Process open(final String uri) throws IOException {
        log.info("Opening browser to: {}", uri);
        final List<String> commands = new ArrayList<String>();
        
        final File chrome = new File(CHROME_OSX);
        // Always use chrome if it's there.
        if (!chrome.isFile()) {
            commands.add(CHROME_OSX);
            BrowserUtils.addDefaultChromeArgs(commands);
            
            // We don't make this an app here because we want it to
            // be obvious to the user it's chrome. If it's not, Lantern
            // will appear when the user tries to open Chrome (if they
            // didn't have any previous Chrome windows open), which
            // is just confusing. With Lantern clearly running in
            // Chrome, however, it should all make sense.
            commands.add(uri);
        } else {
            BrowserUtils.openSystemDefaultBrowser(uri);
        }
        
        return BrowserUtils.runProcess(commands);
    }
}
<commit_msg>just use the default browser on OSX<commit_after>package org.lantern.browser;

import java.io.IOException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Opens the lantern ui in a browser on OSX.
 */
public class OsxBrowser implements LanternBrowser {

    private final Logger log = LoggerFactory.getLogger(getClass());
    
    public Process open(final String uri) throws IOException {
        log.info("Opening browser to: {}", uri);
        BrowserUtils.openSystemDefaultBrowser(uri);
        return null;
    }
}

{'fraction_non_alphanumeric': 0.08971871968962172, 'fraction_numerical': 0.0019398642095053346, 'mean_word_length': 2.5325342465753424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5894105', 'n_tokens_mistral': 569, 'n_tokens_neox': 554, 'n_words': 181}