PCART  v1.4
Automated Repair of Python API Parameter Compatibility Issues
Public Member Functions | Public Attributes | List of all members
fuzzyMatch Class Reference

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...
 

Detailed Description

Static mapping class for lib API definitions 库API定义静态匹配类

Definition at line 15 of file fuzzyMatch.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Initialize the fuzzy matcher 初始化模糊匹配器

Definition at line 18 of file fuzzyMatch.py.

Member Function Documentation

◆ fmatch()

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既可以在抽取阶段的匹配使用,也可以在分析变更阶段使用

Parameters
callAPIThe called API string (dotted name)
libAPIsList of library API definition strings
Returns
List of matching API definition strings, or empty list

Definition at line 37 of file fuzzyMatch.py.

Member Data Documentation

◆ alias

alias

The alias name used when no direct match is found 未找到直接匹配时使用的别名

Definition at line 21 of file fuzzyMatch.py.


The documentation for this class was generated from the following file: