# Path: lib/utilities.py
# TOKENIZER = None
# ACK_LANGUAGE_MAP = {
#     'c': 'cc',
#     'c++': 'cpp',
#     'c#': 'csharp',
#     'objective-c': 'objc',
#     'ojective-c++': 'objcpp',
# }
# def get_cache_hits():
# def get_loc(path, files=None):
# def search(
#     pattern, path, recursive=True, whole=False, ignorecase=False, include=None,
#     exclude=None
# ):
# def url_to_json(url, headers={}):
# def get_repo_path(repo_id, repositories_dir):
# def clone(owner, name, directory, date=None):
# def read(jsonfile):
# def parse_datetime_delta(datetime_delta):
# def is_cloneable(owner, name):
# def get_files(path, language):


import distutils.spawn
import importlib
import multiprocessing
import os
import shutil
import sys
import types
import traceback
import attributes
from datetime import datetime
from lib import utilities
                itempath = os.path.join(repository_path, item)
                if os.path.isdir(itempath):
                    repository_path = itempath
                    break
        else:
            (repo_owner, repo_name) = self.database.get(
                '''
                    SELECT u.login, p.name
                    FROM projects p
                        JOIN users u ON u.id = p.owner_id
                    WHERE p.id = {0}
                '''.format(project_id)
            )
            if not (repo_owner or repo_name):
                raise ValueError('Invalid project ID {0}.'.format(project_id))

            last_commit_date = self.database.get(
                '''
                    SELECT DATE(c.created_at)
                    FROM project_commits pc
                        JOIN commits c ON c.id = pc.commit_id
                    WHERE pc.project_id = {0}
                    ORDER BY c.created_at DESC
                    LIMIT 1
                '''.format(project_id)
            )

            if last_commit_date is None:
                last_commit_date = self.today


# Path: lib/utilities.py
# TOKENIZER = None
# ACK_LANGUAGE_MAP = {
#     'c': 'cc',
#     'c++': 'cpp',
#     'c#': 'csharp',
#     'objective-c': 'objc',
#     'ojective-c++': 'objcpp',
# }
# def get_cache_hits():
# def get_loc(path, files=None):
# def search(
#     pattern, path, recursive=True, whole=False, ignorecase=False, include=None,
#     exclude=None
# ):
# def url_to_json(url, headers={}):
# def get_repo_path(repo_id, repositories_dir):
# def clone(owner, name, directory, date=None):
# def read(jsonfile):
# def parse_datetime_delta(datetime_delta):
# def is_cloneable(owner, name):
# def get_files(path, language):


# Path: lib/attributes.py
import distutils.spawn
import importlib
import multiprocessing
import os
import shutil
import sys
import types
import traceback
import attributes
from datetime import datetime
from lib import utilities

                itempath = os.path.join(repository_path, item)
                if os.path.isdir(itempath):
                    repository_path = itempath
                    break
        else:
            (repo_owner, repo_name) = self.database.get(
                '''
                    SELECT u.login, p.name
                    FROM projects p
                        JOIN users u ON u.id = p.owner_id
                    WHERE p.id = {0}
                '''.format(project_id)
            )
            if not (repo_owner or repo_name):
                raise ValueError('Invalid project ID {0}.'.format(project_id))

            last_commit_date = self.database.get(
                '''
                    SELECT DATE(c.created_at)
                    FROM project_commits pc
                        JOIN commits c ON c.id = pc.commit_id
                    WHERE pc.project_id = {0}
                    ORDER BY c.created_at DESC
                    LIMIT 1
                '''.format(project_id)
            )

            if last_commit_date is None:
                last_commit_date = self.today


            repository_path = utilities.clone(