<commit_before>package com.ctrip.ops.sysdev.configs;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;

import org.yaml.snakeyaml.Yaml;

public class HangoutConfig {
//    private static final Logger logger = Logger.getLogger(HangoutConfig.class
//            .getName());

    public static Map parse(String filename) throws FileNotFoundException {
        Yaml yaml = new Yaml();
        if (filename.startsWith("http://") || filename.startsWith("https://")) {
            URL httpUrl;
            URLConnection connection;
            httpUrl = new URL(filename);
            connection = httpUrl.openConnection();
            connection.connect();
            return (Map) yaml.load(connection.getInputStream());
        } else {
            FileInputStream input;
            input = new FileInputStream(new File(filename));
            return (Map) yaml.load(input);
        }
    }
}<commit_msg>intellij suggest<commit_after>package com.ctrip.ops.sysdev.configs;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;

import org.yaml.snakeyaml.Yaml;

@SuppressWarnings("rawtypes")
public class HangoutConfig {
    private static final String HTTP = "http://";
    private static final String HTTPS = "https://";
//    private static final Logger logger = Logger.getLogger(HangoutConfig.class.getName());

    @SuppressWarnings("NestedMethodCall")
    public static Map parse(String filename) throws IOException {
        Yaml yaml = new Yaml();
        if (HangoutConfig.HTTP.startsWith(filename) || filename.startsWith(HangoutConfig.HTTPS)) {
            URL httpUrl;
            URLConnection connection;
            httpUrl = new URL(filename);
            connection = httpUrl.openConnection();
            connection.connect();
            return (Map) yaml.load(connection.getInputStream());
        } else {
            FileInputStream input = new FileInputStream(new File(filename));
            return (Map) yaml.load(input);
        }
    }
}
{'fraction_non_alphanumeric': 0.11070280202112999, 'fraction_numerical': 0.0, 'mean_word_length': 2.8480565371024733, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6539707', 'n_tokens_mistral': 590, 'n_tokens_neox': 582, 'n_words': 139}