首页 | 官方网站   微博 | 高级检索  
     

适用于分布式静态检测的Java代码依赖性分析技术
引用本文:韩承锋,唐云善,杨维永.适用于分布式静态检测的Java代码依赖性分析技术[J].计算机系统应用,2019,28(3):133-139.
作者姓名:韩承锋  唐云善  杨维永
作者单位:南京南瑞信息通信科技有限公司,南京,210003;南京南瑞信息通信科技有限公司,南京,210003;南京南瑞信息通信科技有限公司,南京,210003
基金项目:国家电网公司科学技术项目(调度自动化软件安全漏洞与风险实验能力提升关键技术研究)
摘    要:为满足Java静态分布式检测系统对Java程序源代码解耦分包的需求,解决代码检测单节点单进程运行耗时过长问题,实现分布式检测系统单任务多节点并行运行的目的,本文提出了Java源代码文件间依赖性分析方法.该方法以生成源代码文件抽象语法树的方式抽取文件文本信息,遍历分析抽象语法树,获取文件与其他源代码文件类依赖关系,再通过定位类所在的文件方式得到文件与文件之间依赖关系.同时,以无入边顶点的带环有向图表示文件间依赖关系图,本文提出的方法基于该图进行了文件间解耦的分析.最后,通过对示例程序逐步剖析的实验以及对数个开源工具源代码解耦拆分的实验,验证了本文提出的文件间依赖性分析方法的可行性.

关 键 词:文件依赖性分析  Java程序  JavaParser  依赖关系图  分布式静态检测
收稿时间:2018/8/31 0:00:00
修稿时间:2018/9/26 0:00:00

Java Code Dependency Analysis Technique for Distributed Static Detection System
HAN Cheng-Feng,TANG Yun-Shan and YANG Wei-Yong.Java Code Dependency Analysis Technique for Distributed Static Detection System[J].Computer Systems& Applications,2019,28(3):133-139.
Authors:HAN Cheng-Feng  TANG Yun-Shan and YANG Wei-Yong
Affiliation:NARI Group Corporation Information & Communication Technology Company, Nanjing 210003, China,NARI Group Corporation Information & Communication Technology Company, Nanjing 210003, China and NARI Group Corporation Information & Communication Technology Company, Nanjing 210003, China
Abstract:In order to meet the requirements of Java static distributed detection system for decoupling and subcontracting Java program source code package, Java source code file dependency analysis method was proposed. This method is part of single-task multi-node parallel-running distributed detection system which could solve the problem that it takes long time for single-task single-node single-process code detection. The method extracted the Java source code file text information by generating its abstract syntax tree. Then, the method traverses and parses the abstract syntax tree to obtain the file''s dependent classes which were not declared in the file. Finally, the dependency relationship between two files was obtained by locating the files where the dependent classes were declared in. The directed cyclic graph with no incident edge vertices was proposed to represent the dependency graph among files. The Java program source code package was decoupled by analyzing the dependency graph. At last, the feasibility of the proposed Java source code file dependency analysis method is verified by two experiments. The first experiment is the step-by-step result analysis of a sample program package. The second experiment is verifying the correctness of decoupling result of several open source tools'' source code packages.
Keywords:file dependency analysis  Java  JavaParser  denpendency graph  distributed static detection
本文献已被 万方数据 等数据库收录!
点击此处可从《计算机系统应用》浏览原始摘要信息
点击此处可从《计算机系统应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号