GithubHelp home page GithubHelp logo

ucla-seal / grafter Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 1.0 53.7 MB

Automated Transplantation and Differential Testing for Clones (ICSE 2017)

License: BSD 3-Clause "New" or "Revised" License

Java 93.45% HTML 6.42% Haskell 0.03% Shell 0.10%
automated-testing differential-testing code-transplantation code-clones

grafter's Introduction

Grafter

Automated Transplantation and Differential Testing for Clones (ICSE 2017)

Summary of Grafter

Code clones are common in software. When applying similar edits to clones, developers often find it difficult to examine the runtime behavior of clones. The problem is exacerbated when some clones are tested, while their counterparts are not. To reuse tests for similar but not identical clones, Grafter transplants one clone to its counterpart by (1) identifying variations in identifier names, types, and method call targets, (2) resolving compilation errors caused by such variations through code transformation, and (3) inserting stub code to transfer input data and intermediate output values for examination. To help developers examine behavioral differences between clones, Grafter supports fine-grained differential testing at both the test outcome level and the intermediate program state level. In our evaluation on three open source projects, Grafter successfully reuses tests in 94% of clone pairs without inducing build errors, demonstrating its automated code transplantation capability. To examine the robustness of Grafter, we systematically inject faults using a mutation testing tool, Major, and detect behavioral differences induced by seeded faults. Compared with a static cloning bug finder, Grafter detects 31% more mutants using the test-level comparison and almost 2X more using the state-level comparison. This result indicates that Grafter should effectively complement static cloning bug finders.

Team

This project is developed by Professor Miryung Kim's Software Engineering and Analysis Laboratory at UCLA. If you encounter any problems, please open an issue or feel free to contact us:

Tianyi Zhang: was a PhD student at UCLA and now an assistant professor at Purdue; [email protected]

Miryung Kim: Professor at UCLA; [email protected]

How to cite

Please refer to our ICSE'17 paper, Automated transplantation and differential testing for clones for more details.

Bibtex

@inproceedings{10.1109/ICSE.2017.67, author = {Zhang, Tianyi and Kim, Miryung}, title = {Automated Transplantation and Differential Testing for Clones}, year = {2017}, isbn = {9781538638682}, publisher = {IEEE Press}, url = {https://doi.org/10.1109/ICSE.2017.67}, doi = {10.1109/ICSE.2017.67}, booktitle = {Proceedings of the 39th International Conference on Software Engineering}, pages = {665โ€“676}, numpages = {12}, location = {Buenos Aires, Argentina}, series = {ICSE '17} }

DOI Link

Slides

You can find ICSE 2017 slides here.

Demo Paper

You can find our demo paper here.

grafter's People

Contributors

miryung avatar tianyi-zhang avatar

Stargazers

 avatar

Forkers

le-fang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.