<commit_before># -*- coding: utf8 -*-
import os
import stat
from os.path import exists, expanduser, join

from core.conf.constants import SHORTCUT
from core.conf.logconfig import logger


def check_cooja(cooja_dir):
    """
    This function checks if Cooja.java already contains the required modification.

    :param cooja_dir: Cooja's directory
    :return: True if the modification is present else False
    """
    pattern = 'if (args.length > 0 && args[0].startsWith("-hidden="))'
    with open(join(cooja_dir, 'java', 'org', 'contikios', 'cooja', 'Cooja.java')) as f:
        source = f.read()
    for line in source.split('\n'):
        if pattern in line:
            return True<commit_msg>Added desktop shortcut creation (2)<commit_after># -*- coding: utf8 -*-
from os.path import exists, expanduser, join

from core.conf.logconfig import logger


def check_cooja(cooja_dir):
    """
    This function checks if Cooja.java already contains the required modification.

    :param cooja_dir: Cooja's directory
    :return: True if the modification is present else False
    """
    pattern = 'if (args.length > 0 && args[0].startsWith("-hidden="))'
    with open(join(cooja_dir, 'java', 'org', 'contikios', 'cooja', 'Cooja.java')) as f:
        source = f.read()
    for line in source.split('\n'):
        if pattern in line:
            return True
{'fraction_non_alphanumeric': 0.12509197939661515, 'fraction_numerical': 0.0051508462104488595, 'mean_word_length': 3.2902208201892744, 'pattern_counts': {'":': 0, '<': 3, '<?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': '726985', 'n_tokens_mistral': 428, 'n_tokens_neox': 424, 'n_words': 139}