paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Namesake: A Checker of Lexical Similarity in Identifier Names

Namesake:标识符命名中词汇相似性的检查器
ASE Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering2022匹配度 2/10 · 该论文是面向代码可读性的标识符命名相似性检查工具,属于传统静态分析与软件工程范畴,未涉及用户关注的 ML/Agent 系统静态分析、LLM 与静态分析交叉、浮点程序分析或贝叶斯程序分析。因此与研究方向核心匹配度很低。引用 4 inbox
Naser Al Madi
crossref: 2026-09-12

AI 速览

一句话:提出开源工具 Namesake,检测 Python 程序中标示符命名在拼写、发音或语义上易混淆的组合。

标识符命名是程序理解的重要信息来源,而相似的命名可能妨碍代码理解与维护。本文介绍开源工具 Namesake,用于评估 Python 程序中容易混淆的命名组合。该工具从程序的抽象语法树中提取标识符,拆分复合名称,并对每一对名称在正字法(词形)、语音(发音)和语义(含义)三个维度上计算相似性。若发现可能有问题的标识符组合,工具会连同行号一并标记给程序员。Namesake 可与现有代码风格检查器配合使用,帮助提升命名质量,并能方便地集成到 DevOps 流水线中进行自动化检查与命名评估。摘要未报告用户研究或量化基准结果。

问题
相似或易混淆的标识符命名可能阻碍代码理解,并进一步影响软件维护与演化。
方法
从 Python 程序的抽象语法树提取标识符,拆分复合名称,并在词形、发音和语义三个维度评估名称对的相似性,标记问题组合及其行号。
评估
以开源工具实现和检测能力展示为主,并强调其可与代码风格检查器配合、集成到 DevOps 流水线中;摘要未给出用户研究或量化评测结果。
原文摘要(Abstract)

Identifier naming is one of the main sources of information in program comprehension, where a significant portion of software development time is spent. Previous research shows that similarity in identifier names could potentially hinder code comprehension, and subsequently code maintenance and evolution. In this paper, we present an open-source tool for assessing confusing naming combinations in Python programs. The tool which we call Namesake, flags confusing identifier naming combinations that are similar in orthography (word form), phonology (pronunciation), or semantics (meaning). Our tool extracts identifier names from the abstract syntax tree of a program, splits compound names, and evaluates the similarity of each pair in orthography, phonology, and semantics. Problematic identifier combinations are flagged to programmers along with their line numbers. In combination with existing coding style checkers, Namesake can provide programmers with an additional resource to enhance identifier naming quality. The tool can be integrated easily in DevOps pipelines for automated checking and identifier naming appraisal.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot7264,
  title = {Namesake: A Checker of Lexical Similarity in Identifier Names},
  author = {Naser Al Madi},
  booktitle = {ASE},
  year = {2022},
  doi = {10.1145/3551349.3560441}
}