<commit_before>import bs4
from collections import OrderedDict
import os
import re
import requests
import tempfile
from selinon import StoragePool
from shutil import rmtree

from .base import AnalysesBaseHandler
from f8a_worker.utils import cwd, TimedCommand
from f8a_worker.errors import TaskError


class MavenPopularAnalyses(AnalysesBaseHandler):
    """Analyse top maven popular projects."""

    _BASE_URL = 'http://mvnrepository.com'
    _MAX_PAGES = 10

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.projects = OrderedDict()
        self.nprojects = 0

    @staticmethod
    def _find_versions(project_page, latest_version_only=False):<commit_msg>Docstrings added to the maven_popular_analyses module<commit_after>"""Analyse top maven popular projects."""

import bs4
from collections import OrderedDict
import os
import re
import requests
import tempfile
from selinon import StoragePool
from shutil import rmtree

from .base import AnalysesBaseHandler
from f8a_worker.utils import cwd, TimedCommand
from f8a_worker.errors import TaskError


class MavenPopularAnalyses(AnalysesBaseHandler):
    """Analyse top maven popular projects."""

    _BASE_URL = 'http://mvnrepository.com'
    _MAX_PAGES = 10

    def __init__(self, *args, **kwargs):
        """Create and instance of this analyse handler."""
        super().__init__(*args, **kwargs)
        self.projects = OrderedDict()
        self.nprojects = 0

    @staticmethod
    def _find_versions(project_page, latest_version_only=False):
{'fraction_non_alphanumeric': 0.07881136950904392, 'fraction_numerical': 0.007751937984496124, 'mean_word_length': 4.4734982332155475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5552961', 'n_tokens_mistral': 474, 'n_tokens_neox': 443, 'n_words': 136}