文章目录

  • 前言
  • [TSE 2019] - Mining Fix Patterns for FindBugs Violations
    • 1 作者
    • 2 摘要
    • 3 具体工作
  • QA1: 和2013年的PAR有什么区别?
  • 总结

标题:
[今日阅读] 软件自动修复 + ML

前言

在此阅读 [TSE 2019] - Mining Fix Patterns for FindBugs Violations,简要记录。

[TSE 2019] - Mining Fix Patterns for FindBugs Violations

1 作者

Kui Liu, Dongsun Kim, Tegawend´e F. Bissyand´ e, Shin Yoo, and Yves Le Traon

2 摘要

Several static analysis tools, such as Splint or FindBugs, have been proposed to the software development community to help detect security vulnerabilities or bad programming practices. However, the adoption of these tools is hindered by their high false positive rates. If the false positive rate is too high, developers may get acclimated to violation reports from these tools, causing concrete and severe bugs being overlooked.

现在静态工具误报率高, false positive rate :假阳率,就是本来没病,但是检查结果是有病。

参考:假阳性率 https://baike.baidu.com/item/假阳性率/6345776?fr=aladdin

Fortunately, some violations are actually addressed and resolved by developers. We claim that those violations that are recurrently fixed are likely to be true positives, and an automated approach can learn to repair similar unseen violations. However, there is lack of a systematic way to investigate the distributions on existing violations and fixed ones in the wild, that can provide insights into prioritizing violations for developers, and an effective way to mine code and fix patterns which can help developers easily understand the reasons of leading violations and how to fix them.

但是一部分violations 已经得到了解决。所以现在作者先去学这些violation都是怎么被修复的,然后去挖掘代码和修复模板来帮助开发人员理解导致violation的原因,并知道怎么去修复。

true positives:真阳。(真正) 本来有错,实际也有错。

参考:[转载]True(False) Positives (Negatives) 的含义和翻译 http://blog.sciencenet.cn/blog-605185-617068.html
True (False) Positives (Negatives) 相关概念 https://blog.csdn.net/opensourcesdr/article/details/73334302

In this paper, we first collect and track a large number of fixed and unfixed violations across revisions of software. The empirical analyses reveal that there are discrepancies in the distributions of violations that are detected and those that are fixed, in terms of occurrences, spread and categories, which can provide insights into prioritizing violations.

先收集,然后观察到一些信息,可以用来指导修复violation。

To automatically identify patterns in violations and their fixes, we propose an approach that utilizes convolutional neural networks to learn features and clustering to regroup similar instances. We then evaluate the usefulness of the identified fix patterns by applying them to unfixed violations. The results show that developers will accept and merge a majority (69/116) of fixes generated from the inferred fix patterns. It is also noteworthy that the yielded patterns are applicable to four real bugs in the Defects4J major benchmark for software testing and automated repair.

具体方法:用CNN去学特征,用聚类方法去给相似的实例分组。

然后去将找到的fix pattern用来修复还未被修复的violation。

结果表明能修复 116个 里面的69个。(都被开发者接受)

感觉这个有点牛啊。

而且对Defects4J也有效。(不过只能修4个,因为总共就能用findbugs检测到14个。)

3 具体工作

After collecting violation fixing changes from a large number of projects using an AST differencing tool [16], we mine developer fix patterns for static analysis violations. The approach encodes a fixing change into a vector space using Word2Vec [17], extracts discriminating features using Convolutional Neural Networks (CNNs) [18] and regroups similar changes into a cluster using X-means clustering algorithm [19]. We then evaluate the suitability of the mined fix patterns by applying them to 1) a subset of unfixed violations in our subjects, to 2) a subset of faults in Defects4J [20] and to 3) a subset of violations in 10 open source Java projects.

1)从大量项目里面收集violation 修复补丁; 这里使用AST 差分工具
2)将修复补丁编码成一个矢量空间];这里使用的是Word2Vec;并用CNN来提取差异特征
3)基于提取的特征,用x-means聚类算法来重组相似补丁。

感觉真的挺难的。

code patterns:是为了观察有哪些violation对应的代码已经被修复或者还没被修复。
fix patterns:是为了提取violation被修复的模式。

具体怎么应用呢?
先通过violation报的代码提示,得到对应的修复模式,然后应用此模式。

For each relevant bug, we consider the fix patterns
associated to their violation types, and manually generate
the patches. When the generated patch candidate can (1)
pass the failed test cases of the corresponding bug and
(2) FindBugs cannot identify any violation at the same
position, then the matched fix pattern is regarded as a
positive fix pattern for this bug.

注意,是人为应用补丁。

QA1: 和2013年的PAR有什么区别?

PAR:

We manually inspected more than 60,000 human-written patches and found there are several common fix patterns.

PAR是人为提取的模板。

总共提取了10个模板,针对某个可疑语句,需要先做一个context check,看适不适合用某个模板。

如果适合,就应用之。

总结

第一次看这个。。还是有点复杂的,看了1个小时20分钟。枯了

[今日阅读] [TSE 2019] - Mining Fix Patterns for FindBugs Violations相关推荐

  1. [软件自动修复领域] 前沿论文阅读(2019年8月12日)

    文章目录 前言 论文列表 Automated Program Repair: A Step towards Software Automation Getafix: Learning to fix b ...

  2. 【有感】今日阅读我知乎轮子哥“vczh”故事有感

    今日阅读我知乎轮子哥故事有感 链接如下:非常励志的故事 进入2012 – 回顾我走过的编程之路 轮子哥号称知乎三大程序员,年薪几十万刀妥妥的. 刚玩知乎不久,进入程序员专栏,经常看到有人提起轮子哥,吾 ...

  3. 未来今日研究所:2019技术趋势报告

    来源:资本实验家 摘要:近期,著名研究机构未来今日研究所(Future Today Institute)发布了<2019技术趋势报告>. 该报告涉及人工智能.网络安全.隐私与数据.交通.先 ...

  4. 【周末阅读】2019自动驾驶十大关键词

    来源:智车科技 作者:曾晶.桂艳琳.唐沛祥 回看过去2019年自动驾驶行业的"关键词",从中感受这一年自动驾驶的变化与趋势. 关键词一:交通强国 2019年9月,中共中央.国务院印 ...

  5. 今日芯声 | 2019搞笑诺贝尔奖来了!奖金获10万亿奖金的是……

    "今日芯声"是读芯术推出的一档简读栏目,汇聚每日国内外最新最热的AI应用资讯,敬请关注. 1.2019搞笑诺贝尔奖揭晓:为什么树袋熊便便是方形,奖金10万亿津巴布韦币 北京时间9月 ...

  6. 英文阅读积累 - 2019年4月

    2019年4月24日 err on the side of... 意为"宁愿过于--:力求" err /ɜː/ 不及物动词,意为"犯错误" forge /fɔː ...

  7. 【今日早报】2019/06/17

    今日看点 ✦ 中国移动公布核心网5G大单,华为中兴爱立信诺基亚中标 ✦ 恒大新能源汽车三大基地落户沈阳,投资1200亿 ✦ 台积电官宣:正式启动2nm工艺研发,全球首家 ✦ 苹果与康卡斯特和Chart ...

  8. [论文阅读]Representative Forgery Mining for Fake Face Detection

    Representative Forgery Mining for Fake Face Detection 文章创新点 提出了一种基于注意力引导的数据增强方法 FAM:一种可以定位出对检测器而言最敏感 ...

  9. 今日热播-2019亚洲物联网技术博览会

    由工业和信息化部.科学技术部.北京电子商会主办的2019世界物联网博览会将于2019年6月28日至30日在建设的全国唯一的国家传感网创新示范区-- 北京国际会展中心举办.是国内首个国家级.规模最大的世 ...

  10. 保健常识小贴士.今日阅读

    家庭营养膳食如何治便秘的良方? 1.苦丁蜜茶治便秘 睡觉前冲好苦丁茶.第二天清晨起床用冷苦丁茶水... 牛奶和豆浆混在一起,同时喝,会有危害吗? 应该不好,动物蛋白和植物蛋白互相影响吸收. 牛奶里面的 ...

最新文章

  1. solidworks经典实例网盘下载_Solidworks自学视频教程(附源文件)讲解详细到位,成就设计高手...
  2. 内置方法-str方法定制变量输出信息
  3. 关于重装系统后或打补丁后不能上网的问题的解决
  4. 向后台接口传递FormData格式的数组对象
  5. python元编程_python元编程详解(3)
  6. 潜伏者与谍报密码(洛谷P1071题题解,Java语言描述)
  7. 【机器学习】机器学习从零到掌握之四 -- 教你使用可视化分析数据
  8. java hibernate 包_hibernatejar包官方下载-Hibernate.jar包下载 --pc6下载站
  9. 【STP】生成树协议及STP 802.1D (上)
  10. 模糊控制(一)模糊控制简介及数学基础
  11. 安卓手机屏幕在电脑上实时同步显示
  12. 如何查看电脑操作系统及系统类型
  13. Java程序员面试宝典笔记记录(终)-第9章海量数据部分笔记
  14. 天猫精灵打开电脑(网络唤醒)
  15. oracle 数据库回收站,Oracle数据库的回收站
  16. js 中实现百分比计算
  17. Survey on Human pose estimation
  18. windows 下如何让一个窗口置顶?
  19. S3C2440上LCD驱动 (FrameBuffer)实例开发讲解
  20. d3.js中svg的下载

热门文章

  1. java计算机毕业设计招聘管理系统源码+系统+mysql数据库+lw文档
  2. implode( -(php),php implode()函数 语法
  3. 寒假集训大作业(一)
  4. 为什么说python是世界上最好的语言-《权力的游戏》告诉你,为啥 Python 是世上最好的语言...
  5. 新手好例子图书馆管理系统Python+MySQL+tkinter图形化界面+源码(注释详细)
  6. Meta:多人联机VR游戏这样拉新
  7. kali中清除历史命令
  8. 【Unity】U3D ARPG游戏制作实例(二)人物基本动作切换
  9. C语言中文网学习进度
  10. 51单片机延时程序的延时时间计算