Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3297156.3297227acmotherconferencesArticle/Chapter ViewAbstractPublication PagescsaiConference Proceedingsconference-collections
research-article

Exploring Violations of Programming Styles: Insights from Open Source Projects

Published: 08 December 2018 Publication History

Abstract

Software project is usually a huge cooperative teamwork, programmers in the project usually have to read the code written by others and understand its implementation. A uniform and clean programming style could ensure the readability and maintainability of the project source code, especially when it becomes a legacy project. However, each programmer has his own programming habit and because of the heavy developing tasks, the programming style of the software project is far from satisfactory. Programming style does not resemble software defects which has a serious effect on program executing. Therefore, many programmers ignore the programming style directly instead of improving it. Programming style should be checked before new features are merged into software projects, just like software testing. Developing with the size of software project, some special programming style rules are violated more seriously, which need be highly focused. Furthermore, one of ultimate targets in software quality engineering is to check the programming style automatically with analysis tools because the software projects usually have an enormous quantity of source code. In this paper, static source code analysis is used for detecting the programming style problems. The source file directly or the class files generated by the compiler are scanned then the abstract syntax tree for the source code is generated. With the help of abstract syntax tree, it is possible to detect code snippets that violate the programming style rules by traverse the tree. Our method employs the static code analysis tools to analyze several Java open source projects, and find that the programming style problems which are violated most. According to our method, each problem is also explained from personal habits, JDK version, and other aspects later. Considering all of the analysis results, a special ruleset that is recommended to pay more attention to in the future software developing is proposed. At last, programming style should be highly valued in software development processes in further project management.

References

[1]
Anon, Google Java Style Guide. Available at: https://google.github.io/styleguide/javaguide.html {Accessed October 14, 2018}.
[2]
Anon, Table of Contents. Alibaba-Java-Coding-Guidelines. Available at: https://alibaba.github.io/Alibaba-Java-Coding-Guidelines/ {Accessed October 14, 2018}.
[3]
Fowler, M., Beck, K., Brant, J., Opdyke, W. and Roberts, D., 1999. Refactoring: improving the design of existing code. Addison-Wesley Professional.
[4]
Tufano, M., Palomba, F., Bavota, G., Oliveto, R., Di Penta, M., De Lucia, A. and Poshyvanyk, D., 2015, May. When and why your code starts to smell bad. In Proceedings of the 37th International Conference on Software Engineering-Volume 1 (pp. 403--414). IEEE Press.
[5]
Butler, S., Wermelinger, M. and Yu, Y., 2015, May. A survey of the forms of Java reference names. In Program Comprehension (ICPC), 2015 IEEE 23rd International Conference on (pp. 196--206). IEEE.
[6]
Moha, N., Gueheneuc, Y.G. and Duchien, A.F., 2010. Decor: A method for the specification and detection of code and design smells. IEEE Transactions on Software Engineering (TSE), 36(1), pp.20--36.
[7]
Khatiwada, S., Kelly, M. and Mahmoud, A., 2016, May. Stac: A tool for static textual analysis of code. In Program Comprehension (ICPC), 2016 IEEE 24th International Conference on (pp. 1--3). IEEE.
[8]
Aniche, M., Bavota, G., Treude, C., Van Deursen, A. and Gerosa, M.A., 2016, October. A validated set of smells in model-view-controller architectures. In Software Maintenance and Evolution (ICSME), 2016 IEEE International Conference on (pp. 233--243). IEEE.
[9]
Sae-Lim, N., Hayashi, S. and Saeki, M., 2017, September. How Do Developers Select and Prioritize Code Smells? A Preliminary Study. In Software Maintenance and Evolution (ICSME), 2017 IEEE International Conference on (pp. 484--488). IEEE.
[10]
Müller, S.C. and Fritz, T., 2016, May. Using (bio) metrics to predict code quality online. In Software Engineering (ICSE), 2016 IEEE/ACM 38th International Conference on (pp. 452--463). IEEE.
[11]
Project, A.T., Apache Tomcat®. Apache Tomcat® - Welcome! Available at: http://tomcat.apache.org/ {Accessed October 14, 2018}.
[12]
alibaba, 2018. alibaba/druid. GitHub. Available at: https://github.com/alibaba/druid {Accessed October 14, 2018}.
[13]
Anon, Apache RocketMQ. Apache RocketMQ. Available at: https://rocketmq.apache.org/ {Accessed October 14, 2018}.
[14]
Anon, Apache Dubbo. Available at: http://dubbo.incubator.apache.org/en-us/ {Accessed October 14, 2018}.

Cited By

View all
  • (2023)Eastwood-Tidy: C Linting for Automated Code Style Assessment in Programming CoursesProceedings of the 54th ACM Technical Symposium on Computer Science Education V. 110.1145/3545945.3569817(799-805)Online publication date: 2-Mar-2023
  • (2022)Bibliometric Analysis of the Application of Artificial Intelligence Techniques to the Management of Innovation ProjectsApplied Sciences10.3390/app12221174312:22(11743)Online publication date: 18-Nov-2022
  • (2020)Transitioning to a Large-Scale Distributed Programming Course2020 IEEE 32nd Conference on Software Engineering Education and Training (CSEE&T)10.1109/CSEET49119.2020.9206239(1-6)Online publication date: Nov-2020

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Other conferences
CSAI '18: Proceedings of the 2018 2nd International Conference on Computer Science and Artificial Intelligence
December 2018
641 pages
ISBN:9781450366069
DOI:10.1145/3297156
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

In-Cooperation

  • Shenzhen University: Shenzhen University

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 08 December 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code review
  2. Programming style
  3. Static source code analysis

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

CSAI '18

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)2
Reflects downloads up to 23 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Eastwood-Tidy: C Linting for Automated Code Style Assessment in Programming CoursesProceedings of the 54th ACM Technical Symposium on Computer Science Education V. 110.1145/3545945.3569817(799-805)Online publication date: 2-Mar-2023
  • (2022)Bibliometric Analysis of the Application of Artificial Intelligence Techniques to the Management of Innovation ProjectsApplied Sciences10.3390/app12221174312:22(11743)Online publication date: 18-Nov-2022
  • (2020)Transitioning to a Large-Scale Distributed Programming Course2020 IEEE 32nd Conference on Software Engineering Education and Training (CSEE&T)10.1109/CSEET49119.2020.9206239(1-6)Online publication date: Nov-2020

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media