Student or educator? Sign up with your school email and get 6 months of Pro free.
Cited by 376

The DOI matches its Crossref record; 7 of the 7 references it cites were found in a registry or an index.

Learning natural coding conventions

Open access
Allamanis, Miltiadis, Barr, Earl T., Bird, Christian, Sutton, Charles·2014·Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering

Abstract

Every programmer has a characteristic style, ranging from preferences about identifier naming to preferences about object relationships and design patterns. Coding conventions define a consistent syntactic style, fostering readability and hence maintainability. When collaborating, programmers strive to obey a project’s coding conventions. However, one third of reviews of changes contain feedback about coding conventions, indicating that programmers do not always follow them and that project members care deeply about adherence. Unfortunately, programmers are often unaware of coding conventions because inferring them requires a global view, one that aggregates the many local decisions programmers make and identifies emergent consensus on style. We present NATURALIZE, a framework that learns the style of a codebase, and suggests revisions to improve stylistic consistency. NATURALIZE builds on recent work in applying statistical natural language processing to source code. We apply NATURALIZE to suggest natural identifier names and formatting conventions. We present four tools focused on ensuring natural code during development and release management, including code review. NATURALIZE achieves 94 % accuracy in its top suggestions for identifier names. We used NATURALIZE to generate 18 patches for 5 open source projects: 14 were accepted.

Overview

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1145/2635868.2635883

Cites

7 of 7 references verified0 citation errors · 0 not checkable

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 7 references

Research works printed but not linked: 62

  1. 10.1109/SCAM.2011.18 · doi:10.1109/scam.2011.18
  2. A. Abran , P. Bourque , R. Dupuis , J. W. Moore , and L. L. Tripp . Guide to the Software Engineering Body of Knowledge - SWEBOK . IEEE Press , Piscataway, NJ, USA , 2004 version edition, 2004. A. Abran, P. Bourque, R. Dupuis, J. W. Moore, and L. L. Tripp. Guide to the Software Engineering Body of Knowledge - SWEBOK. IEEE Press, Piscataway, NJ, USA, 2004 version edition, 2004.
  3. 10.1147/rd.281.0002 · DOI · Paper page
  4. M. Allamanis and C. Sutton . Mining source code repositories at massive scale using language modeling . In Proceedings of the Tenth International Workshop on Mining Software Repositories , pages 207– 216 . IEEE Press, 2013. M. Allamanis and C. Sutton. Mining source code repositories at massive scale using language modeling. In Proceedings of the Tenth International Workshop on Mining Software Repositories, pages 207–216. IEEE Press, 2013.
  5. N. Anquetil and T. Lethbridge . Assessing the relevance of identifier names in a legacy software system . In Proceedings of the 1998 Conference of the Centre for Advanced Studies on Collaborative Research , page 4 , 1998 . N. Anquetil and T. Lethbridge. Assessing the relevance of identifier names in a legacy software system. In Proceedings of the 1998 Conference of the Centre for Advanced Studies on Collaborative Research, page 4, 1998.
  6. 10.1002/(SICI)1096-908X(199905/06)11:3%3C201::AID-SMR192%3E3.0.CO;2-1 · doi:10.1002/(sici)1096-908x(199905/06)11:3<201::aid-smr192>3.0.co;2-1
  7. C. Arthur . Apple’s SSL iPhone vulnerability: How did it happen, and what next? bit.ly/1bJ7aSa , 2014 . Visited Mar 2014. C. Arthur. Apple’s SSL iPhone vulnerability: How did it happen, and what next? bit.ly/1bJ7aSa, 2014. Visited Mar 2014.
  8. M. I. S. R. Association et al. MISRA-C 2012: Guidelines for the Use of the C Language in Critical Systems. ISBN 9781906400118 , 2012 . M. I. S. R. Association et al. MISRA-C 2012: Guidelines for the Use of the C Language in Critical Systems. ISBN 9781906400118, 2012.
  9. 10.5555/2486788.2486882 · doi:10.5555/2486788.2486882
  10. 10.5555/2188385.2188395 · doi:10.5555/2188385.2188395 · Paper page
  11. T. J. Biggerstaff , B. G. Mitbander , and D. Webster . The concept assignment problem in program understanding . In Proceedings of the 15th International Conference on Software Engineering , pages 482– 498 . IEEE Computer Society Press, 1993. T. J. Biggerstaff, B. G. Mitbander, and D. Webster. The concept assignment problem in program understanding. In Proceedings of the 15th International Conference on Software Engineering, pages 482–498. IEEE Computer Society Press, 1993.
  12. 10.1007/s10664-012-9201-4 · DOI
  13. 10.1109/ICSM.2008.4658076 · DOI
  14. F. P. Brooks. The Mythical Man-Month. Addison-Wesley Reading 1975. F. P. Brooks. The Mythical Man-Month. Addison-Wesley Reading 1975. · DOI
  15. M. Broy , F. Deißenböck , and M. Pizka . A holistic approach to software quality at work . In Proc. 3rd World Congress for Software Quality (3WCSQ) , 2005 . M. Broy, F. Deißenböck, and M. Pizka. A holistic approach to software quality at work. In Proc. 3rd World Congress for Software Quality (3WCSQ), 2005.
  16. 10.1145/1595696.1595728 · DOI · Paper page
  17. 10.1109/TSE.2009.70 · DOI · Paper page
  18. 10.5555/850948.853439 · doi:10.5555/850948.853439
  19. 10.5555/230386.230390 · doi:10.5555/230386.230390
  20. 10.3115/981863.981904 · DOI · Paper page
  21. 10.1109/WPC.2005.14 · DOI
  22. S. Dowdy , S. Wearden , and D. Chilko . Statistics for Research , volume 512 . John Wiley & Sons , 2011 . S. Dowdy, S. Wearden, and D. Chilko. Statistics for Research, volume 512. John Wiley & Sons, 2011.
  23. Eclipse-Contributors. Eclipse JDT. http://www.eclipse.org/jdt/ , 2013 . Visited September 9, 2013. Eclipse-Contributors. Eclipse JDT. http://www.eclipse.org/jdt/, 2013. Visited September 9, 2013.
  24. 10.1145/1985441.1985449 · doi:10.1145/1985441.1985449
  25. 10.1145/1882291.1882315 · DOI
  26. GitHub. JUnit Pull Request #834. bit.ly/O8bmjM , 2014 . Visited Mar 2014. GitHub. JUnit Pull Request #834. bit.ly/O8bmjM, 2014. Visited Mar 2014.
  27. GitHub. libgdx Pull Request #1400. bit.ly/O8aBqV , 2014 . Visited Mar 2014. GitHub. libgdx Pull Request #1400. bit.ly/O8aBqV, 2014. Visited Mar 2014.
  28. S. Gupta , S. Malik , L. Pollock , and K. Vijay-Shanker . Part-of-speech tagging of program identifiers for improved text-based software engineering tools . In International Conference on Program Comprehension , pages 3– 12 . IEEE, 2013. S. Gupta, S. Malik, L. Pollock, and K. Vijay-Shanker. Part-of-speech tagging of program identifiers for improved text-based software engineering tools. In International Conference on Program Comprehension, pages 3–12. IEEE, 2013.
  29. 10.1016/j.infsof.2003.09.016 · DOI
  30. A. Hindle , E. T. Barr , Z. Su , M. Gabel , and P. Devanbu . On the naturalness of software . In International Conference on Software Engineering (ICSE) , pages 837– 847 . IEEE, 2012. A. Hindle, E. T. Barr, Z. Su, M. Gabel, and P. Devanbu. On the naturalness of software. In International Conference on Software Engineering (ICSE), pages 837–847. IEEE, 2012.
  31. 10.1016/j.scico.2009.02.005 · doi:10.1016/j.scico.2009.02.005
  32. 10.1007/978-3-642-03013-0_14 · DOI
  33. D. Jurafsky and J. H. Martin . Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics and Speech Recognition . Prentice Hall , 2 nd edition, 2009 . D. Jurafsky and J. H. Martin. Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics and Speech Recognition. Prentice Hall, 2nd edition, 2009.
  34. 10.1145/146370.146380 · DOI · Paper page
  35. A. Langley . Apple’s SSL/ TLS bug. bit.ly/MMvx6b , 2014 . Visited Mar 2014. A. Langley. Apple’s SSL/TLS bug. bit.ly/MMvx6b, 2014. Visited Mar 2014.
  36. 10.1109/SCAM.2006.31 · DOI
  37. 10.1002/smr.v19:4 · doi:10.1002/smr.v19:4
  38. 10.1109/ICPC.2006.51 · DOI
  39. B. Liblit , A. Begel , and E. Sweetser . Cognitive perspectives on the role of naming in computer programs . In Annual Psychology of Programming Workshop , 2006 . B. Liblit, A. Begel, and E. Sweetser. Cognitive perspectives on the role of naming in computer programs. In Annual Psychology of Programming Workshop, 2006.
  40. C.-Y. Lin . Rouge : A package for automatic evaluation of summaries . In Text Summarization Branches Out: Proceedings of the ACL-04 Workshop , pages 74– 81 , 2004 . C.-Y. Lin. Rouge: A package for automatic evaluation of summaries. In Text Summarization Branches Out: Proceedings of the ACL-04 Workshop, pages 74–81, 2004.
  41. C. J. Maddison and D. Tarlow . Structured generative models of natural source code. arXiv preprint arXiv:1401.0514 , 2014 . C. J. Maddison and D. Tarlow. Structured generative models of natural source code. arXiv preprint arXiv:1401.0514, 2014. · arXiv
  42. 10.1016/0306-4573(91)90066-U · DOI · Paper page
  43. D. Movshovitz-Attias and W. W. Cohen . Natural language models for predicting programming comments . In Proc of the ACL , 2013 . D. Movshovitz-Attias and W. W. Cohen. Natural language models for predicting programming comments. In Proc of the ACL, 2013.
  44. 10.1109/ESEM.2007.87 · DOI
  45. 10.5555/2337223.2337232 · doi:10.5555/2337223.2337232
  46. 10.1145/2491411.2491458 · DOI · Paper page
  47. 10.1145/1082983.1083151 · doi:10.1145/1082983.1083151
  48. Oracle. Code Conventions for the Java Programming Language. http://www.oracle.com/technetwork/ java/codeconv-138413 .html, 1999 . Visited September 2, 2013. Oracle. Code Conventions for the Java Programming Language. http://www.oracle.com/technetwork/ java/codeconv-138413.html, 1999. Visited September 2, 2013.
  49. 10.1109/MS.2004.17 · DOI
  50. 10.1109/ICPC.2007.22 · DOI
  51. 10.1145/2491411.2491444 · DOI · Paper page
  52. 10.1109/MS.2009.161 · DOI · Paper page
  53. 10.1109/TSE.1984.5010283 · DOI · Paper page
  54. W. Strunk Jr and E. White . The Elements of Style . Macmillan , New York , 3 rd edition, 1979 . W. Strunk Jr and E. White. The Elements of Style. Macmillan, New York, 3rd edition, 1979.
  55. A. Takang , P. Grubb , and R. Macredie . The effects of comments and identifier names on program comprehensibility: an experiential study . Journal of Program Languages , 4 ( 3 ): 143 – 167 , 1996 . A. Takang, P. Grubb, and R. Macredie. The effects of comments and identifier names on program comprehensibility: an experiential study. Journal of Program Languages, 4(3):143–167, 1996.
  56. A. A. Takang , P. A. Grubb , and R. D. Macredie . The effects of comments and identifier names on program comprehensibility: an experimental investigation . J. Prog. Lang. , 4 ( 3 ): 143 – 167 , 1996 . A. A. Takang, P. A. Grubb, and R. D. Macredie. The effects of comments and identifier names on program comprehensibility: an experimental investigation. J. Prog. Lang., 4(3):143–167, 1996.
  57. 10.1109/ASE.2011.6100098 · doi:10.1109/ase.2011.6100098
  58. J. Wang , Y. Dang , H. Zhang , K. Chen , T. Xie , and D. Zhang . Mining succinct and high-coverage API usage patterns from source code . In Proceedings of the Tenth International Workshop on Mining Software Repositories , pages 319– 328 . IEEE Press, 2013. J. Wang, Y. Dang, H. Zhang, K. Chen, T. Xie, and D. Zhang. Mining succinct and high-coverage API usage patterns from source code. In Proceedings of the Tenth International Workshop on Mining Software Repositories, pages 319–328. IEEE Press, 2013.
  59. 10.1109/WCRE.2011.15 · DOI
  60. 10.1257/jep.10.2.105 · DOI · Paper page
  61. C. Zhang , J. Yang , Y. Zhang , J. Fan , X. Zhang , J. Zhao , and P. Ou . Automatic parameter recommendation for practical api usage . In Proceedings of the 34th International Conference on Software Engineering , pages 826– 836 . IEEE Press, 2012. C. Zhang, J. Yang, Y. Zhang, J. Fan, X. Zhang, J. Zhao, and P. Ou. Automatic parameter recommendation for practical api usage. In Proceedings of the 34th International Conference on Software Engineering, pages 826–836. IEEE Press, 2012.
  62. 10.1007/978-3-642-03013-0_15 · DOI · Paper page

Cited by

Metadata

Authors
Allamanis, M., Barr, E. T., Bird, C., & Sutton, C.
Venue
Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering
Publisher
ACM
Published
2014-11-11
Pages
281-293
OpenAlex
W2140609933
Cited by
376
References
7
FWCI
25.08
Type
conference paper
Language
en
Open access
green

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.