781363ed1e4397645494d07ce45f3e2ad0d766d6,mozregression/network.py,,url_links,#Any#Any#Any#,64
Before Change
return True
// do not return a generator but an array, so we can store it for later use
return [link.get("href")
for link in soup.findAll("a")
if match(link.get("href"))]
After Change
// do not return a generator but an array, so we can store it for later use
result = []
for link in soup.findAll("a"):
href = link.get("href")
// return "relative" part of the url only
if href.startswith("/"):
if href.endswith("/"):
href = href.strip("/").rsplit("/", 1)[-1] + "/"
else:
href = href.rsplit("/", 1)[-1]
if match(href):
result.append(href)
return result
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: mozilla/mozregression
Commit Name: 781363ed1e4397645494d07ce45f3e2ad0d766d6
Time: 2015-10-21
Author: j.parkouss@gmail.com
File Name: mozregression/network.py
Class Name:
Method Name: url_links
Project Name: CellProfiler/CellProfiler
Commit Name: 711a56a2d456b0707b5c045777d67b06bdc4b7b8
Time: 2013-05-01
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/groups.py
Class Name: Groups
Method Name: get_groupings
Project Name: ray-project/ray
Commit Name: c9f13b0833ee499a074f15192a6eaf7a6513a296
Time: 2020-08-13
Author: ekhliang@gmail.com
File Name: python/ray/worker.py
Class Name:
Method Name: get_gpu_ids