e6fca77674554e516cfb358d1b395986acd3f7e7,src/python/pants/java/distribution/distribution.py,DistributionLocator,locate,#Any#Any#Any#Any#,441

Before Change


    else:
      error_format = ("Failed to locate a {} distribution with minimum_version {}, "
                      "maximum_version {}")
    raise cls.Error(error_format.format("JDK" if jdk else "JRE", minimum_version, maximum_version))

  @classmethod
  def _linux_java_homes(cls):
    for java_dist_dir in cls._JAVA_DIST_DIRS:

After Change


    key = (minimum_version, maximum_version, jdk)
    dist = self._cache.get(key)
    if not dist:
      dist = self._scan_constraint_match(minimum_version, maximum_version, jdk)
      if not dist:
        dist = self._locate(minimum_version=minimum_version,
                            maximum_version=maximum_version,
                            jdk=jdk)
      self._cache[key] = dist
    return dist

  def _locate(self, minimum_version=None, maximum_version=None, jdk=False):
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: locate


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 0d646d103590b367c28d1e9588edca610b361e1f
Time: 2016-02-12
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/providers/rackspace/rackspace_disk.py
Class Name: RackspaceRemoteDisk
Method Name: _Create


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 0d646d103590b367c28d1e9588edca610b361e1f
Time: 2016-02-12
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py
Class Name: RackspaceVirtualMachine
Method Name: _PostCreate


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: locate