def _test_paths_for_executable(paths, test_file):
    for directory in paths:
        file_path = os.path.join(directory, test_file)
        if os.path.exists(file_path) and os.access(file_path, os.X_OK):
            return file_path
dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/sublime-github/lib/git.py/_test_paths_for_executable/original