6d8625611ff936bab56d15a2b36e0aba7e54612e,src/python/pants/java/junit/junit_xml_parser.py,,parse_failed_targets,#Any#Any#Any#,130

Before Change


  for name in os.listdir(junit_xml_dir):
    if _JUNIT_XML_MATCHER.match(name):
      try:
        path = os.path.join(junit_xml_dir, name)
        xml = XmlParser.from_file(path)
        failures = int(xml.get_attribute("testsuite", "failures"))
        errors = int(xml.get_attribute("testsuite", "errors"))
        if failures or errors:

After Change


    except (XmlParser.XmlError, ValueError) as e:
      error_handler(ParseError(path, e))

  if os.path.isdir(junit_xml_path):
    for name in os.listdir(junit_xml_path):
      if _JUNIT_XML_MATCHER.match(name):
        parse_junit_xml_file(os.path.join(junit_xml_path, name))
  else:
    parse_junit_xml_file(junit_xml_path)

  return dict(failed_targets)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pantsbuild/pants
Commit Name: 6d8625611ff936bab56d15a2b36e0aba7e54612e
Time: 2017-03-30
Author: benjyw@gmail.com
File Name: src/python/pants/java/junit/junit_xml_parser.py
Class Name:
Method Name: parse_failed_targets


Project Name: Pinafore/qb
Commit Name: 1be7ed32b7f84d4988d81b813446b4b359c277ba
Time: 2018-04-26
Author: sjtufs@gmail.com
File Name: qanta/buzzer/eval.py
Class Name:
Method Name: eval


Project Name: dhlab-epfl/dhSegment
Commit Name: a4217c8986523a59dd9b764467fc21b29dd572ba
Time: 2018-08-31
Author: sofia.oliveiraares@epfl.ch
File Name: train.py
Class Name:
Method Name: run