计算机应用与软件2026,Vol.43Issue(1):1-8,32,9.DOI:10.3969/j.issn.1000-386x.2026.01.001
基于数据流分析的冗余空值检查检测方法
DETECTING REDUNDANT NULL CHECKS BASED ON DATA FLOW ANALYSIS
摘要
Abstract
Redundant null check can result in dead code,hinder code comprehension and efficiency,and indicate that the program may contain bugs.This paper proposes RedDetector,an approach to detect redundant null checks based on data flow analysis.This approach could detect more redundant null checks by enhancing dataflow analysis.We collected 35 popular GitHub projects and manually collected their redundant null checks into a data set.Based on the data set,compared with a state-of-the-art tool,the precision and recall of the unreachable null check statements detected by RedDetector increased by 83.7 and 54.4 percentage points respectively.The precision and recall of the certainly-reachable null check statements detected by RedDetector increased by 75.4 and 44.7 percentage points.关键词
死代码/数据流分析/空值检查Key words
Dead code/Dataflow analysis/Null check分类
信息技术与安全科学引用本文复制引用
谢东方,黄凯锋,陈碧欢,赵文耘..基于数据流分析的冗余空值检查检测方法[J].计算机应用与软件,2026,43(1):1-8,32,9.基金项目
国家自然科学基金项目(61802067). (61802067)