<commit_before>package lan.dk.podcastserver.service.factory;

import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by kevin on 25/01/2016 for Podcast Server
 */
@Service
public class ProcessBuilderFactory {

    public ProcessBuilder newProcessBuilder(String... command) { return new ProcessBuilder(command); }
    public ProcessBuilder newProcessBuilder(List<String> command) {
        return new ProcessBuilder(command);
    }

}<commit_msg>test(downloader.rtmp): expand testing<commit_after>package lan.dk.podcastserver.service.factory;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.lang.reflect.Field;
import java.util.List;

/**
 * Created by kevin on 25/01/2016 for Podcast Server
 */
@Slf4j
@Service
public class ProcessBuilderFactory {

    public ProcessBuilder newProcessBuilder(String... command) { return new ProcessBuilder(command); }
    public ProcessBuilder newProcessBuilder(List<String> command) {
        return new ProcessBuilder(command);
    }

    public int pidOf(Process p) {
        try {
            if (p.getClass().getSimpleName().contains("UNIXProcess")) {
                Field pidField = p.getClass().getDeclaredField("pid");
                pidField.setAccessible(true);
                return pidField.getInt(p);
            }
        } catch (IllegalAccessException | NoSuchFieldException ignored) {}
        return -1;
    }
}
{'fraction_non_alphanumeric': 0.10311418685121107, 'fraction_numerical': 0.01384083044982699, 'mean_word_length': 3.5046728971962615, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6275091', 'n_tokens_mistral': 417, 'n_tokens_neox': 399, 'n_words': 90}