e6fca77674554e516cfb358d1b395986acd3f7e7,src/python/pants/java/distribution/distribution.py,DistributionLocator,cached,#Any#Any#Any#Any#,397

Before Change



    key = (minimum_version, maximum_version, jdk)
    dist = cls._CACHE.get(key)
    if not dist:
      dist = cls._scan_constraint_match(minimum_version, maximum_version, jdk)
      if not dist:
        dist = cls.locate(minimum_version=minimum_version,
                          maximum_version=maximum_version,
                          jdk=jdk)
      cls._CACHE[key] = dist
    return dist

  @classmethod
  def locate(cls, minimum_version=None, maximum_version=None, jdk=False):

After Change


                                   maximum_version=maximum_version,
                                   jdk=jdk)
    except _Locator.Error as e:
      raise cls.Error("Problem locating a java distribution: {}".format(e))

  options_scope = "jvm-distributions"

  @classmethod
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: e6fca77674554e516cfb358d1b395986acd3f7e7
Time: 2016-05-02
Author: john.sirois@gmail.com
File Name: src/python/pants/java/distribution/distribution.py
Class Name: DistributionLocator
Method Name: cached


Project Name: streamlit/streamlit
Commit Name: 8166563234323a086cd5045dee6eb88f05ce39bf
Time: 2019-11-18
Author: monchier@users.noreply.github.com
File Name: lib/streamlit/util.py
Class Name:
Method Name: open_browser


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 2998b90908d488aa4e5f4dc6ae9f749427de3c6b
Time: 2015-07-01
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/rackspace/rackspace_disk.py
Class Name: RackspaceRemoteDisk
Method Name: GetDevicePath