SANER 18 论文阅读- Mining stackoverflow for program repair

版权声明:如需转载或引用,请注明出处。 https://blog.csdn.net/weixin_39278265/article/details/82825923

前言

讲真的每天不看一篇论文是真的难受。至少一篇感觉,最基本保证。本文旨在阅读SANER 18 论文 - ”Mining stackoverflow for program repair“

1 基本信息

作者:Xuliang Liu, Hao Zhong

单位:Shanghai Jiao Tong University, China 上海交大。

Hao Zhong的主页:http://www.cs.sjtu.edu.cn/~zhonghao/
Dr. Hao Zhong
钟浩
Associate Professor

I received my Ph.D degree from Peking University in 2009. My Ph.D dissertation was nominated for the distinguished Ph.D dissertation award of China Computer Federation. My PhD advisor is Prof. Hong Mei, and is co-advised by Prof. Lu Zhang and Prof. Tao Xie. After graduation, I joined Institute of Software, Chinese Academy of Sciences as an assistant professor, and was promoted as an associated professor in 2011. From 2012 to 2014, I was a visiting scholar with University of California, Davis, where I worked with Prof. Zhendong Su. In 2014, I joined Shanghai Jiao Tong University. I am a recipient of ACM SIGSOFT Distinguished Paper Award, the best paper award of ASE, and the best paper award of APSEC.

Please submit your high-quality research papers to ASE 2018, COMPSAC 2018, ICSME2018, and SATE2018.

太厉害了,好像还是SATE 2018的评委。
而且08年,09年分别拿过APSEC和ASE的best paper award,不容易,很厉害的。

很多文章:http://www.cs.sjtu.edu.cn/~zhonghao/publist.html#zhong2017grapa

Boosting complete-code tool for partial program
Hao Zhong and Xiaoyin Wang
In Proc. International Conference on Automated Software Engineering (ASE), pages 671-681, 2017.

CMSuggester: Method change suggestion to complement multi-entity edits
Ye Wang, Na Meng, and Hao Zhong
In Proc. The Annual Conference on Software Analysis, Testing and Evolution (SATE), pages to appear, 2018.
[pdf] [BibTeX]

这篇就是SATE 2018

Links

Prof. Tao Xie’s Lab at UIUC
Prof. Zhendong Su’s Lab at UC Davis
Software Engineering Conferences
Advice from Prof. Tao Xie

而且在很多大牛那里进行过研究,很厉害!

2 abstract

In recent years, automatic program repair has been
a hot research topic in the software engineering community,
and many approaches have been proposed.

很熟悉,我平时也这么写,但我觉得不太地道。

An award-wining paper analyzes thousands of manual bug fixes, but summarizes only ten repair templates. Although more bugs are thus repaired, recent studies show such repair templates are still insufficient.

感觉although用的很多。

We notice that programmers often refer to Stack Overflow,
when they repair bugs. With years of accumulation, Stack
Overflow has millions of posts that are potentially useful to
repair many bugs.

这个理由有说服力: programmers often raise questions about bug fixing in StackOverflow. With years of accumulation, Stack Overflow has millions of posts that are potentially useful to repair many bugs.

The observation motives our work towards mining repair templates from Stack Overflow.

motive
英 [ˈməʊtɪv] 美 [ˈmoʊtɪv]
n. 动机,主旨;(艺术作品的)主题,题材
adj. 动机的;运动的;发动的
vt. 促使

我感觉motive这个单词用错了?在牛津和柯林斯词典里面,都只有n,或者adj。 https://fanyi.baidu.com/?aldtype=16047#en/zh/motive

Based on our mined repair patterns, we
derived 13 repair templates. We implemented these repair templates in SOFIX, and conducted evaluations on the widely used
benchmark, Defects4J. Our results show that SOFIX repaired 23
bugs, which are more than existing approaches. After comparing
repaired bugs and templates, we find that SOFIX repaired more
bugs, since it has more repair templates. In addition, our results
also reveal the urgent need for better fault localization techniques

After seeing this paragraph, I have some questions:

  1. Is SOFIX available online? If it is, then I think this paper has the potential to be accepted by Top Journals or Conferences if more experiments are added or the paper is further polished or the methods used are further developed.
  2. It seems the author repeated “repaired more bugs”, which makes it kind of weird.
  3. The urgent need for better FL technique? I am curious about this insight.

3 For the introduction

Zhong and Su [57] complain that it is infeasible to repair
many bugs, since existing approaches provide limited repair
templates

Now I am sure that this paper is based on their prior work/findings. This is important.

For example, the well-known tool, GenProg [42], supports only three types of coarse-grained repair templates such as inserting statements, swapping statements, and deleting statements. To handle the limitation, Kim et al. [17] summarize ten additional repair templates from thousands of human-written patches. However, their repair templates are still limited, both in number and granularity. It is desirable to infer repair templates from more sources

Genprog and PAR are criticized here.

Liu et al. [21] show that it is useful to link Stack Overflow threads with reported bugs

Just like sentences quoated above, this paper is based on not only [57], but also [21].

Challenge 1. It is challenging to effectively extract information
from Stack Overflow, since the data set contains more than 30
million posts. It is even challenging to determine which thread
is worth mining for repair templates

Challenge 2. It is challenging to mine fine-grained repair
templates. Although such templates are useful, it requires
accurate analysis in mining. However, code samples in Stack
Overflow are typically partial programs, and only several tools
provide limited analysis support.

There are two challenges here.

To handle the first challenge, we consider only threads with both buggy and correct code samples, since such threads are more informative. From such threads, our tool links buggy code samples with fixed code samples. Each pair corresponds to a set of feasible repair actions, and our tool further mines repair templates from such actions. To handle the second challenge, we build Abstract Syntax Trees (ASTs) from each pair of code samples, and mine repair patterns from sequences of AST modifications. From such patterns, we derive our repair templates. This paper makes the following contributions:

It seems there are several steps to address the two challenges:

  1. Find both buggy and correct code snippets;
  2. Use ASTs to extract the fine-grained repair templetes.

The first approach, called SOFIX, that mines repair patterns from Stack Overflow, and leverages repair templates that are derived from mined patterns to repair new bugs. SOFIX compares code samples in questions and answers for fine-grained modifications, and mines repair patterns from such modifications.
• From 31,017,891 Stack Overflow posts, SOFIX mined 136 patterns. From these patterns, we manually derived 13 repair templates. Our templates contain repair values from Stack Overflow, and 2 of them are never reported. We implement our templates in SOFIX to repair bugs.
• Evaluations on the widely used benchmark, Defects4J. In total, SOFIX repaired 23 bugs, which are more than previous approaches. We further compared our repaired bugs and our repair templates with previous approaches. Our results show that our additional repair templates and their repair values from Stack Overflow make the improvements.

Three contributions are included:

  1. First approach SOFIX to extract patterns from SO.
  2. 13 patterns are extracted (like an extension of 1))
  3. an empirical evaluation.

Maybe the authors estimate that this paper should be uploaded as soon as possible because of the patch correctness and the trend that more and more studies are targeted at SO.
And maybe this paper still lacks further polish and the results are not that decent?, therefore, the author chose to submit it in SANER rather than ASE/FSE/ICSE/ISSTA.

4 Motivating Example.

在这里插入图片描述

==**Fig. 1: The motivating example**==

在这里插入图片描述

==**Fig. 2: The overview of SOFIX**==

RQ4 concerns the internal and underlying techniques of
SOFIX. Our results highlight the importance of mining from
Stack Overflow, since it is infeasible to repair six bugs without
such mining. In addition, our results show that there is an urgent
requirement for better fault localization techniques, since fault
ranks have significant impacts in repair time.

This is very useful for me.

5 Short end

I have to stop now, cause’ I have to wash and sleep. That’s all for today.

In the near future, if I have time I will re-read it in more depth.

猜你喜欢

转载自blog.csdn.net/weixin_39278265/article/details/82825923