Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3084226.3084259acmotherconferencesArticle/Chapter ViewAbstractPublication PageseaseConference Proceedingsconference-collections
research-article

Revisiting Assert Use in GitHub Projects

Published: 15 June 2017 Publication History

Abstract

Assertions are often used to test the assumptions that developers have about a program. An assertion contains a boolean expression which developers believe to be true at a particular program point. It throws an error if the expression is not satisfied, which helps developers to detect and correct bugs. Since assertions make developer assumptions explicit, assertions are also believed to improve under-standability of code. Recently, Casalnuovo et al. analyse C and C++ programs to understand the relationship between assertion usage and defect occurrence. Their results show that asserts have a small effect on reducing the density of bugs and developers often add asserts to methods they have prior knowledge of and larger ownership. In this study, we perform a partial replication of the above study on a large dataset of Java projects from GitHub (185 projects, 20 million LOC, 4 million commits, 0.2 million files and 1 million methods). We collect metrics such as number of asserts, number of defects, number of developers and number of lines changed to a method, and examine the relationship between asserts and defect occurrence. We also analyse relationship between developer experience and ownership and the number of asserts. Furthermore, we perform a study of what are different types of asserts added and why they are added by developers. We find that asserts have a small yet significant relationship with defect occurrence and developers who have added asserts to methods often have higher ownership of and experience with the methods than developers who did not add asserts.

References

[1]
Last accessed - Jan 31, 2016. TIOBE Programming Community index Jan 2016. http://www.tiobe.com/tiobe-index/.
[2]
Giuliano Antoniol, Gerardo Casazza, Massimiliano Di Penta, and Roberto Fiutem. 2001. Object-oriented design patterns recovery. Journal of Systems and Software 59, 2 (2001), 181--196.
[3]
Maria Teresa Baldassarre, Jeffrey Carver, Oscar Dieste, and Natalia Juristo. 2014. Replication Types: Towards a Shared Taxonomy. In EASE. 18:1--18:4.
[4]
Benoit Baudry, Yves Le Traon, and Jean-Marc Jézéquel. 2001. Robustness and Diagnosability of OO Systems Designed by Contracts. In METRICS. 272.
[5]
Gabriele Bavota, Gerardo Canfora, Massimiliano Di Penta, Rocco Oliveto, and Sebastiano Panichella. 2015. How the Apache Community Upgrades Dependencies: An Evolutionary Study. Empirical Software Engineering 20, 5 (2015), 1275--1317.
[6]
Andrew Begel and Beth Simon. 2008. Novice Software Developers, All over Again. In ICER. 3--14.
[7]
Christian Bird, Nachiappan Nagappan, Brendan Murphy, Harald Gall, and Premkumar Devanbu. 2011. Don'T Touch My Code!: Examining the Effects of Ownership on Software Quality. In ESEC/FSE. 4--14.
[8]
Tegawendé F. Bissyandé, David Lo, Lingxiao Jiang, Laurent Réveillère, Jacques Klein, and Yves Le Traon. 2013. Got issues? Who cares about it? A large scale investigation of issue trackers from GitHub. In ISSRE. 188--197.
[9]
Tegawendé F. Bissyandé, Ferdian Thung, David Lo, Lingxiao Jiang, and Laurent Réveillère. 2013. Popularity, Interoperability, and Impact of Programming Languages in 100,000 Open Source Projects. In COMPSAC. 303--312.
[10]
L. C. Briand, Y. Labiche, and H. Sun. 2002. Investigating the Use of Analysis Contracts to Support Fault Isolation in Object Oriented Code. In ISSTA. 70--80.
[11]
A Colin Cameron and Pravin K Trivedi. 2013. Regression Analysis of Count Data. Number 53. Cambridge Univrsity Press.
[12]
Casey Casalnuovo, Prem Devanbu, Abilio Oliveira, Vladimir Filkov, and Baishakhi Ray. 2015. Assert Use in GitHub Projects. In ICSE. 755--766.
[13]
Stephen Cass. Last accessed - September 30, 2016. The 2015 Top Ten Programming Languages. http://spectrum.ieee.org/computing/software/the-2015-top-ten-programming-languages.
[14]
P. Chalin. 2005. Logical foundations of program assertions: what do practitioners want?. In SEFM. 383--392.
[15]
Jacob Cohen, Patricia Cohen, Stephen G. West, and Leona S. Aiken. 2003. Applied Multiple Regression/correlation Analysis for the Behavioral Sciences. Lawrence Erlbaum (2003).
[16]
Cleyton V. C. de Magalhães, Fabio Q. B. da Silva, and Ronnie E. S. Santos. 2014. Investigations About Replication of Empirical Studies in Software Engineering: Preliminary Findings from a Mapping Study. In EASE. 37:1--37:10.
[17]
Samuel M. Donadelli, Yue Cai Zhu, and Peter C. Rigby. 2015. Organizational Volatility and Post-release Defects: A Replication Case Study Using Data from Google Chrome. In MSR. 391--395.
[18]
Hakan Erdogmus, Maurizio Morisio, and Marco Torchiano. 2005. On the Effectiveness of the Test-First Approach to Programming. TSE 31, 3 (2005), 226--237.
[19]
H. Christian Estler, Carlo A. Furia, Martin Nordio, Marco Piccioni, and Bertrand Meyer. 2014. FM 2014: Formal Methods: 19th International Symposium. Springer International Publishing, Chapter Contracts in Practice, 230--246.
[20]
Cormac Flanagan, K. Rustan M. Leino, Mark Lillibridge, Greg Nelson, James B. Saxe, and Raymie Stata. 2002. Extended Static Checking for Java. In PLDI. 234--245.
[21]
Matthieu Foucault, Jean-Rémy Falleri, and Xavier Blanc. 2014. Code Ownership in Open-source Software. In EASE. 39:1--39:9.
[22]
Davide Fucci, Burak Turhan, and Markku Oivo. 2014. Conformance Factor in Test-driven Development: Initial Results from an Enhanced Replication. In EASE. 22:1--22:4.
[23]
Timothy S. Gegg-Harrison, Gary R. Bunce, Rebecca D. Ganetzky, Christina M. Olson, and Joshua D. Wilson. 2003. Studying Program Correctness by Constructing Contracts. In ITiCSE. 129--133.
[24]
Michaela Greiler, Kim Herzig, and Jacek Czerwonka. 2015. Code Ownership and Software Quality: A Replication Study. In MSR. 2--12.
[25]
C. A. R. Hoare. 1969. An Axiomatic Basis for Computer Programming. Commun. ACM 12, 10 (1969), 576--580.
[26]
David Hovemeyer and William Pugh. 2004. Finding Bugs is Easy. SIGPLAN Notices 39, 12 (2004), 92--106.
[27]
David Hovemeyer and William Pugh. 2007. Finding More Null Pointer Bugs, but Not Too Many. In PASTE. 9--14.
[28]
Jing Jiang, David Lo, Jia-Huan He, Xin Xia, Pavneet Singh Kochhar, and Li Zhang. 2017. Why and how developers fork what from whom in GitHub. Empirical Software Engineering 22, 1 (2017), 547--578.
[29]
Eirini Kalliamvakou, Georgios Gousios, Kelly Blincoe, Leif Singer, Daniel M. German, and Daniela Damian. 2014. The Promises and Perils of Mining GitHub. In MSR. 92--101.
[30]
Pavneet Singh Kochhar, Tegawendé F. Bissyandé, David Lo, and Lingxiao Jiang. 2013. Adoption of Software Testing in Open Source Projects-A Preliminary Study on 50, 000 Projects. In CSMR. 353--356.
[31]
Pavneet Singh Kochhar, Tegawendé F. Bissyandé, David Lo, and Lingxiao Jiang. 2013. An Empirical Study of Adoption of Software Testing in Open Source Projects. In QSIC. 103--112.
[32]
Pavneet Singh Kochhar, Dinusha Wijedasa, and David Lo. 2016. A Large Scale Study of Multiple Programming Languages and Code Quality. In SANER. 563--573.
[33]
Gunnar Kudrjavets, Nachiappan Nagappan, and Thomas Ball. 2006. Assessing the Relationship Between Software Assertions and Faults: An Empirical Investigation. In ISSRE. 204--212.
[34]
Thomas D. LaToza, Gina Venolia, and Robert DeLine. 2006. Maintaining Mental Models: A Study of Developer Work Habits. In ICSE. 492--501.
[35]
Paul Luo Li, Andrew J. Ko, and Jiamin Zhu. 2015. What Makes a Great Software Engineer?. In ICSE. 700--710.
[36]
Bella Martin, Bruce Hanington, and Bruce M. Hanington. 2012. Universal Methods of Design: 100 Ways to Research Complex Problems, Develop Innovative Ideas, and Design Effective Solutions. Rockport,.
[37]
Bertrand Meyer. 1992. Applying "Design by Contract". Computer 25, 10 (1992), 40--51.
[38]
Audris Mockus. 2010. Organizational Volatility and Its Effects on Software Defects. In FSE. 117--126.
[39]
M. M. Muller, R. Typke, and O. Hagner. 2002. Two controlled experiments concerning the usefulness of assertions as a means for programming. In ICSM. 84--92.
[40]
Mangala Gowri Nanda and Saurabh Sinha. 2009. Accurate Interprocedural Null-Dereference Analysis for Java. In ICSE. 133--143.
[41]
Nadia Polikarpova, Ilinca Ciupa, and Bertrand Meyer. 2009. A Comparative Study of Programmer-written and Automatically Inferred Contracts. In ISSTA. 93--104.
[42]
Daryl Posnett, Vladimir Filkov, and Premkumar Devanbu. 2011. Ecological Inference in Empirical Software Engineering. In ASE. 362--371.
[43]
R. Premraj and K. Herzig. 2011. Network Versus Code Metrics to Predict Defects: A Replication Study. In ESEM. 215--224.
[44]
Foyzur Rahman, Daryl Posnett, and Premkumar Devanbu. 2012. Recalling the "Imprecision" of Cross-project Defect Prediction. In FSE. 61:1--61:11.
[45]
Foyzur Rahman, Daryl Posnett, Israel Herraiz, and Premkumar Devanbu. 2013. Sample Size vs. Bias in Defect Prediction. In ESEC/FSE. 147--157.
[46]
Baishakhi Ray, Daryl Posnett, Vladimir Filkov, and Premkumar Devanbu. 2014. A Large Scale Study of Programming Languages and Code Quality in Github. In FSE. 155--165.
[47]
Todd W. Schiller, Kellen Donohue, Forrest Coward, and Michael D. Ernst. 2014. Case Studies and Tools for Contract Specifications. In ICSE. 596--607.
[48]
Alan Shalloway and James R Trott. 2004. Design patterns explained: a new perspective on object-oriented design. Pearson Education.
[49]
M. Sivasakthi and R. Rajendran. 2011. Learning difficulties of 'object-oriented programming paradigm using Java': students' perspective. Indian Journal of Science and Technology 4, 8 (2011), 983--985.
[50]
Phit-Huan Tan, Choo-Yee Ting, and Siew-Woei Ling. 2009. Learning Difficulties in Programming Courses: Undergraduates' Perspective and Perception. In ICCTD. 42--46.
[51]
John Vlissides, Richard Helm, Ralph Johnson, and Erich Gamma. 1995. Design patterns: Elements of reusable object-oriented software. Reading: Addison-Wesley 49, 120 (1995), 11.
[52]
Yun Zhang, David Lo, Pavneet Singh Kochhar, Xin Xia, Quanlai Li, and Jianling Sun. 2017. Detecting similar repositories on GitHub. In SANER. 13--23.
[53]
Thomas Zimmermann and Nachiappan Nagappan. 2008. Predicting Defects Using Network Analysis on Dependency Graphs. In ICSE. 531--540.

Cited By

View all
  • (2024)An exploratory study of software artifacts on GitHub from the lens of documentationInformation and Software Technology10.1016/j.infsof.2024.107425(107425)Online publication date: Feb-2024
  • (2023)Operationalizing validity of empirical software engineering studiesEmpirical Software Engineering10.1007/s10664-023-10370-328:6Online publication date: 13-Nov-2023
  • (2021)The e-ACSL perspective on runtime assertion checkingProceedings of the 5th ACM International Workshop on Verification and mOnitoring at Runtime EXecution10.1145/3464974.3468451(8-12)Online publication date: 12-Jul-2021
  • Show More Cited By

Index Terms

  1. Revisiting Assert Use in GitHub Projects

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    EASE '17: Proceedings of the 21st International Conference on Evaluation and Assessment in Software Engineering
    June 2017
    405 pages
    ISBN:9781450348041
    DOI:10.1145/3084226
    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

    • School of Computing, BTH: Blekinge Institute of Technology - School of Computing

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 15 June 2017

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Assertions
    2. GitHub
    3. Replication Study

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    EASE'17

    Acceptance Rates

    Overall Acceptance Rate 71 of 232 submissions, 31%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)22
    • Downloads (Last 6 weeks)4
    Reflects downloads up to 09 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)An exploratory study of software artifacts on GitHub from the lens of documentationInformation and Software Technology10.1016/j.infsof.2024.107425(107425)Online publication date: Feb-2024
    • (2023)Operationalizing validity of empirical software engineering studiesEmpirical Software Engineering10.1007/s10664-023-10370-328:6Online publication date: 13-Nov-2023
    • (2021)The e-ACSL perspective on runtime assertion checkingProceedings of the 5th ACM International Workshop on Verification and mOnitoring at Runtime EXecution10.1145/3464974.3468451(8-12)Online publication date: 12-Jul-2021
    • (2021)Characterizing the Usage, Evolution and Impact of Java Annotations in PracticeIEEE Transactions on Software Engineering10.1109/TSE.2019.291051647:5(969-986)Online publication date: 1-May-2021
    • (2021)An Empirical Study of Refactorings and Technical Debt in Machine Learning SystemsProceedings of the 43rd International Conference on Software Engineering10.1109/ICSE43902.2021.00033(238-250)Online publication date: 22-May-2021
    • (2021)Refactorings and technical debt in docker projectsProceedings of the 36th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE51524.2021.9678585(781-791)Online publication date: 15-Nov-2021
    • (2020)Bitcoin’s APIs in Open-Source Projects: Security Usability EvaluationElectronics10.3390/electronics90710779:7(1077)Online publication date: 30-Jun-2020
    • (2020)On the Evaluation of the Security Usability of Bitcoin's APIsProceedings of the 24th International Conference on Evaluation and Assessment in Software Engineering10.1145/3383219.3383277(405-412)Online publication date: 15-Apr-2020
    • (2020)An Analysis of GitLab's Users and Projects Networks2020 10th International Symposium onTelecommunications (IST)10.1109/IST50524.2020.9345844(194-200)Online publication date: 15-Dec-2020
    • (2020)An Empirical Study on the Use and Misuse of Java 8 StreamsFundamental Approaches to Software Engineering10.1007/978-3-030-45234-6_5(97-118)Online publication date: 25-Apr-2020
    • Show More Cited By

    View Options

    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