bc03a98e3086793af25f0ce5fde068932052344d,src/python/pants/backend/jvm/tasks/ivy_task_mixin.py,IvyResolveFingerprintStrategy,compute_fingerprint,#IvyResolveFingerprintStrategy#Any#,37

Before Change


      hasher.update(str(managed_jar_dependencies_artifacts.id))
    if isinstance(target, JarLibrary):
      hasher.update(target.payload.fingerprint())
      return hasher.hexdigest()
    if isinstance(target, JvmTarget):
      if target.payload.excludes:
        hasher.update(target.payload.fingerprint(field_keys=("excludes",)))
        return hasher.hexdigest()

After Change


    self._confs = sorted(confs or [])

  def compute_fingerprint(self, target):
    hash_elements_for_target = []

    if isinstance(target, JarLibrary):
      managed_jar_dependencies_artifacts = JarDependencyManagement.global_instance().for_target(target)
      if managed_jar_dependencies_artifacts:
        hash_elements_for_target.append(str(managed_jar_dependencies_artifacts.id))

      hash_elements_for_target.append(target.payload.fingerprint())
    elif isinstance(target, JvmTarget) and target.payload.excludes:
      hash_elements_for_target.append(target.payload.fingerprint(field_keys=("excludes",)))
    else:
      pass

    if not hash_elements_for_target:
      return None

    hasher = sha1()
    for conf in self._confs:
      hasher.update(conf)

    for element in hash_elements_for_target:
      hasher.update(element)

    return hasher.hexdigest()

  def __hash__(self):
    return hash((type(self), "-".join(self._confs)))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: bc03a98e3086793af25f0ce5fde068932052344d
Time: 2016-02-16
Author: nhoward@twopensource.com
File Name: src/python/pants/backend/jvm/tasks/ivy_task_mixin.py
Class Name: IvyResolveFingerprintStrategy
Method Name: compute_fingerprint


Project Name: nipy/dipy
Commit Name: 429c3f1388c776788a6174deb9b020cce13b5a98
Time: 2013-07-22
Author: Samuel.St-Jean@usherbrooke.ca
File Name: dipy/data/fetcher.py
Class Name:
Method Name: check_md5


Project Name: jazzband/django-debug-toolbar
Commit Name: 48ff898685826a5c37e1914d05ad59408b267528
Time: 2016-11-07
Author: mejiaa@amazon.com
File Name: debug_toolbar/panels/sql/forms.py
Class Name: SQLSelectForm
Method Name: make_hash