检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]解放军理工大学指挥信息系统学院,江苏南京210007 [2]全军军事训练软件测评中心,江苏南京210007
出 处:《解放军理工大学学报(自然科学版)》2015年第6期518-523,共6页Journal of PLA University of Science and Technology(Natural Science Edition)
基 金:国家863计划资助项目(2009AA012402)
摘 要:为了发现代码中可能存在的潜在错误,通过探究一种典型的开源Java静态代码分析工具FindBugs的实现原理,分析此工具在函数返回值缺陷检测模式的实现机制,进而发现其在检测自定义函数返回值上的不足。通过分析FindBugs源代码并且针对此函数返回值缺陷模式具有的不足进行相应地改进,并将改进后的检测工具对被测代码进行检验。通过检验发现,改进前的检测工具无法对自定义的函数返回值进行检测,改进后能够检测到忽略自定义函数返回值问题,且提供一些错误提示信息。改进后的代码分析工具能够有效地检测到此类函数返回值问题,避免了潜在bug的发生,一定程度上提高了代码的质量。To find possible potential errors that may exist in the code using static analysis FindBugs,a typical static code analysis tool was introduced and its operation mechanism in Return Defect Pattern analyzed to find its shortage.Due to the shortage of the bug pattern,the source of FindBugs was analyzed and modified to detect the detected code,with the finding that the modified tool can detect user-defined method return value and shows some message about the bugs.The results of analysis indicafe that the modified tool can detect the problem of ignoring user-defined method return value and can avoid potential bugs and improve the quality of code to some extent.
关 键 词:FindBugs 静态分析工具 检测器 返回值 字节码
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.222