|
PCART
v1.4
Automated Repair of Python API Parameter Compatibility Issues
|
Static mapping class for lib API definitions 库API定义静态匹配类 More...
Public Member Functions | |
| def | __init__ (self) |
| Initialize the fuzzy matcher 初始化模糊匹配器 More... | |
| def | fmatch (self, callAPI, libAPIs) |
| Fuzzy match the called API against the library API definitions 将调用API与库API定义进行模糊匹配 More... | |
Public Attributes | |
| alias | |
| The alias name used when no direct match is found 未找到直接匹配时使用的别名 More... | |
Static mapping class for lib API definitions 库API定义静态匹配类
Definition at line 15 of file fuzzyMatch.py.
| def __init__ | ( | self | ) |
Initialize the fuzzy matcher 初始化模糊匹配器
Definition at line 18 of file fuzzyMatch.py.
| def fmatch | ( | self, | |
| callAPI, | |||
| libAPIs | |||
| ) |
Fuzzy match the called API against the library API definitions 将调用API与库API定义进行模糊匹配
Matches by the last segment of the API name. If no match is found and the last segment matches a Python built-in method, returns empty list. Otherwise, records the callAPI as a potential alias. 按API名称的最后一个字段进行匹配。未匹配且是Python内置方法时返回空列表, 否则将callAPI作为可能的别名记录。
fmatch既可以在抽取阶段的匹配使用,也可以在分析变更阶段使用
| callAPI | The called API string (dotted name) |
| libAPIs | List of library API definition strings |
Definition at line 37 of file fuzzyMatch.py.
| alias |
The alias name used when no direct match is found 未找到直接匹配时使用的别名
Definition at line 21 of file fuzzyMatch.py.