def IsSameFile(changed_src_file_path, file_path_in_log):
  """Guesses if the two files are the same.

  Args:
    changed_src_file_path (str): Full path of a file committed to git repo.
    file_path_in_log (str): Path of a file appearing in a failure log. It might
        not be a full path.

  Returns:
    True if the two files are likely the same, otherwise False. Eg.:
      True: (chrome/test/base/chrome_process_util.h, base/chrome_process_util.h)
      True: (a/b/x.cc, a/b/x.cc)
      False: (c/x.cc, a/b/c/x.cc)
  """
  changed_src_file_path_lower = changed_src_file_path.lower()
  file_path_in_log_lower = file_path_in_log.lower()

  if changed_src_file_path_lower == file_path_in_log_lower:
    return True
  return changed_src_file_path_lower.endswith('/%s' % file_path_in_log_lower)