Git Product home page Git Product logo

23_an-empirical-study-of-coding-style-compliance-on-stack-overflow's Introduction

An-Empirical-Study-of-Coding-Style-Compliance-on-Stack-Overflow

Proceedings of the lnternatlonal Conference on Software Engineering and Knowledge Engineering, SEKE, Volume 2023-July, Pages 130-135, 2023 DOI: 10.18293/SEKE2023-125

abstract

Stack Overflow (SO) is one of the world's largest technical Q&A websites, in which many posts contain code snippets. However, these code snippets may not comply with coding style guidelines and result in the problem of low readability and maintainability. To provide a better understanding of this coding style compliance issue for SO users, we plan and conduct an empirical study on SO. Specifically, we collected over 400,000 code snippets from SO in three languages, namely Python, C/C++, and JavaScript. The posts are divided into two types (i.e., question and answer) and analyzed separately. We found that for the question- and answer-type posts, more than 90% and 60% of code snippets contain style violations. The most frequently found violation is syntax errors for Python and indentations for C/C++ and JavaScript. In addition, the results show that with more violations in code snippets, the Score" of Python and C/C++ posts, the FavoriteCount" of C/C++ questions, and the ``CommentCount" of JavaScript questions tend to be lower. The findings of our research indicate that code snippets on SO do not have good coding style compliance. Users, especially programming beginners are supposed to be wary of the potential problems of reusing code snippets on SO.

23_an-empirical-study-of-coding-style-compliance-on-stack-overflow's People

Contributors

skywhite2295 avatar

Watchers

 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.