

def process_archive(temp_folder, jar):
    jar_basename = os.path.splitext(os.path.basename(jar))[0]
    filepath_hash = hex(hash(jar))[(- 8):]
    name = ('%s_%s' % (jar_basename, filepath_hash))
    jar_stat = os.stat(jar)
    archive_folder = os.path.join(temp_folder, name)
    os.mkdir(archive_folder)
    unaar = None
    if jar.endswith('.aar'):
        unaar = _unzip(jar)
        jar = os.path.join(unaar, 'classes.jar')
    unjar = _unzip(jar)
    classes = _class_files(unjar)
    info = _javap_public(classes)
    infos = _split_info_into_infos(info)
    _write_infos_to_temp(archive_folder, jar_stat, infos)
    shutil.rmtree(unjar)
    if (unaar is not None):
        shutil.rmtree(unaar)
    return archive_folder

dataset/ETHPy150Open JakeWharton/jardiff/jardiff.py process_archive/original