0f4d5b5c067ac7c5b9023d25dbb743b0470ef65a,src/python/twitter/pants/tasks/junit_run.py,JUnitRun,calculate_tests,#JUnitRun#Any#,109

Before Change


    tests = set()
    for target in targets:
      if is_java(target) and is_test(target):
        tests.update(self.normalize(test, target.target_base) for test in target.sources
                     if is_test_file(test))
    return tests

After Change


  def calculate_tests(self, targets):
    for target in targets:
      if (is_java(target) or is_scala(target)) and is_test(target):
        for test in target.sources:
          for cls in self.normalize(test, target.target_base):
            yield cls

  def normalize(self, classname_or_file, basedir=None):
    components = classname_or_file.split("//", 2)
    classname = components[0]
    methodname = "//" + components[1] if len(components) == 2 else ""
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 8

Instances


Project Name: pantsbuild/pants
Commit Name: 0f4d5b5c067ac7c5b9023d25dbb743b0470ef65a
Time: 2012-02-16
Author: jsirois@twitter.com
File Name: src/python/twitter/pants/tasks/junit_run.py
Class Name: JUnitRun
Method Name: calculate_tests


Project Name: deepmipt/DeepPavlov
Commit Name: 3b3f8bd00c463e441600673141ff2de608880c9a
Time: 2018-02-05
Author: yoptar@gmail.com
File Name: deeppavlov/datasets/dialog_dataset.py
Class Name: DialogDataset
Method Name: batch_generator


Project Name: pantsbuild/pants
Commit Name: 27058005b2c8b1125fd47c24c90eae7fee3415e0
Time: 2014-02-19
Author: jsirois@twitter.com
File Name: src/python/twitter/pants/tasks/listtargets.py
Class Name: ListTargets
Method Name: _addresses


Project Name: allenai/allennlp
Commit Name: c0cb3275d7e2b25e4965763f7f83e7a89ef7c0e4
Time: 2018-01-31
Author: joelgrus@gmail.com
File Name: allennlp/data/iterators/basic_iterator.py
Class Name: BasicIterator
Method Name: _create_batches


Project Name: pantsbuild/pants
Commit Name: 3f490de2c61c51cdf7cb78c8217842d2a9232758
Time: 2017-04-04
Author: stuhood@twitter.com
File Name: src/python/pants/engine/legacy/change_calculator.py
Class Name: EngineChangeCalculator
Method Name: iter_changed_target_addresses