<commit_before>package stream.flarebot.flarebot.util;

import stream.flarebot.flarebot.FlareBot;
import stream.flarebot.flarebot.objects.Report;
import stream.flarebot.flarebot.objects.ReportStatus;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.*;

public final class ReportManager {

    private ReportManager(){
    }

    Map<String, Set<Report>> reports = new HashMap<>();

    public Set<Report> getGuildReports(String guildID) {
        Set<Report> reports = this.reports.getOrDefault(guildID, new HashSet<>());
        try {
            SQLController.runSqlTask(conn -> {
                ResultSet set = conn.createStatement().executeQuery("SELECT * FROM reports WHERE guild_id = " + guildID);
                while (set.next()) {
                    if (reports.stream().filter(r -> {
                        try {
                            return r.getId() == set.getInt("id");
                        } catch (SQLException e) {<commit_msg>Import<commit_after>package stream.flarebot.flarebot.util;

import stream.flarebot.flarebot.FlareBot;
import stream.flarebot.flarebot.objects.Report;
import stream.flarebot.flarebot.objects.ReportStatus;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.*;
import java.util.stream.Collectors;

public final class ReportManager {

    private ReportManager(){
    }

    Map<String, Set<Report>> reports = new HashMap<>();

    public Set<Report> getGuildReports(String guildID) {
        Set<Report> reports = this.reports.getOrDefault(guildID, new HashSet<>());
        try {
            SQLController.runSqlTask(conn -> {
                ResultSet set = conn.createStatement().executeQuery("SELECT * FROM reports WHERE guild_id = " + guildID);
                while (set.next()) {
                    if (reports.stream().filter(r -> {
                        try {
                            return r.getId() == set.getInt("id");
                        } catch (SQLException e) {
{'fraction_non_alphanumeric': 0.11747430249632893, 'fraction_numerical': 0.0, 'mean_word_length': 2.5120274914089347, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, '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': '6540088', 'n_tokens_mistral': 586, 'n_tokens_neox': 547, 'n_words': 116}