GithubHelp home page GithubHelp logo

ucla-seal / examplestack Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 103.78 MB

Analyzing and Supporting Adaptation of Online Code Examples (ICSE 2019)

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

HTML 0.12% JavaScript 22.29% CSS 7.00% Java 57.38% R 13.22%
api-usage-pattern code-mining github-mining code-clones chrome code-example-search

examplestack's Introduction

ExampleStack

Analyzing and Supporting Adaptation of Online Code Examples (ICSE 2019)

Summary of ExampleStack

Developers often resort to online Q&A forums such as Stack Overflow (SO) for filling their programming needs. Although code examples on those forums are good starting points, they are often incomplete and inadequate for developers' local program contexts; adaptation of those examples is necessary to integrate them to production code. As a consequence, the process of adapting online code examples is done over and over again, by multiple developers independently. Our work extensively studies these adaptations and variations, serving as the basis for a tool that helps integrate these online code examples in a target context in an interactive manner. We perform a large-scale empirical study about the nature and extent of adaptations and variations of SO snippets. We construct a comprehensive dataset linking SO posts to GitHub counterparts based on clone detection, time stamp analysis, and explicit URL references. We then qualitatively inspect 400 SO examples and their GitHub counterparts and develop a taxonomy of 24 adaptation types. Using this taxonomy, we build an automated adaptation analysis technique on top of GumTree to classify the entire dataset into these types. We build a Chrome extension called ExampleStack that automatically lifts an adaptation-aware template from each SO example and its GitHub counterparts to identify hot spots where most changes happen. A user study with sixteen programmers shows that seeing the commonalities and variations in similar GitHub counterparts increases their confidence about the given SO example, and helps them grasp a more comprehensive view about how to reuse the example differently and avoid common pitfalls.

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: PhD student and now an assistant professor at Purdue; [email protected]

Di Yang: PhD student at UC Irvine and now a software engineer at Microsoft

Crista Lopes: Professor at UC Irvine; [email protected]

Miryung Kim: Professor at UCLA; [email protected]

How to cite

Please refer to our ICSE'19 paper, Analyzing and supporting adaptation of online code examples for more details.

Bibtex

@inproceedings{10.1109/ICSE.2019.00046, author = {Zhang, Tianyi and Yang, Di and Lopes, Crista and Kim, Miryung}, title = {Analyzing and Supporting Adaptation of Online Code Examples}, year = {2019}, publisher = {IEEE Press}, url = {https://doi.org/10.1109/ICSE.2019.00046}, doi = {10.1109/ICSE.2019.00046}, booktitle = {Proceedings of the 41st International Conference on Software Engineering}, pages = {316โ€“327}, numpages = {12}, keywords = {code adaptation, online code examples}, location = {Montreal, Quebec, Canada}, series = {ICSE '19} }

DOI Link

ICSE 2019 Artifact Evaluation Link.

This GitHub project link contains data sets and code for ICSE 2019 artifact evaluation.

examplestack's People

Contributors

miryung avatar tianyi-zhang avatar

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.