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 accessAbstract
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.
Integrity signals
Registry
Cites
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.
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
BLEU: a method for automatic evaluation of machine translation
Papineni, K., Roukos, S., Ward, T., & Zhu, W.-J. (2001) · Proceedings of the 40th Annual Meeting on Association for Computational Linguistics - ACL '02 · doi:10.3115/1073083.1073135 · Cited by 21,344
The magical number seven, plus or minus two: Some limits on our capacity for processing information.
Miller, G. A. (1956) · Psychological Review · doi:10.1037/h0043158 · Cited by 17,812
The magical number 4 in short-term memory: A reconsideration of mental storage capacity
Cowan, N. (2001) · Behavioral and Brain Sciences · doi:10.1017/s0140525x01003922 · Cited by 6,779
Graves, A., Wayne, G., & Danihelka, I. (2014) · arXiv · doi:10.48550/arxiv.1410.5401 · Cited by 1,058
How We Refactor, and How We Know It
Murphy-Hill, E., Parnin, C., & Black, A. P. (2012) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2011.41 · Cited by 547
How Program History Can Improve Code Completion
Robbes, R., & Lanza, M. (2008) · 2008 23rd IEEE/ACM International Conference on Automated Software Engineering · doi:10.1109/ase.2008.42 · Cited by 155 · cited 1×
“Code suggestion and completion tools [18, 35, 52, 53, 62] suggest the next token during editing, often from a few initial characters.”
BackgroundBinkley, D., Davis, M., Lawrie, D., & Morrell, C. (2009) · 2009 IEEE 17th International Conference on Program Comprehension · doi:10.1109/icpc.2009.5090039 · Cited by 115
Research works printed but not linked: 62
- 10.1109/SCAM.2011.18 · doi:10.1109/scam.2011.18
- 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.
- 10.1147/rd.281.0002 · DOI · Paper page
- 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.
- 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.
- 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
- 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.
- 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.
- 10.5555/2486788.2486882 · doi:10.5555/2486788.2486882
- 10.5555/2188385.2188395 · doi:10.5555/2188385.2188395 · Paper page
- 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.
- 10.1007/s10664-012-9201-4 · DOI
- 10.1109/ICSM.2008.4658076 · DOI
- F. P. Brooks. The Mythical Man-Month. Addison-Wesley Reading 1975. F. P. Brooks. The Mythical Man-Month. Addison-Wesley Reading 1975. · DOI
- 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.
- 10.1145/1595696.1595728 · DOI · Paper page
- 10.1109/TSE.2009.70 · DOI · Paper page
- 10.5555/850948.853439 · doi:10.5555/850948.853439
- 10.5555/230386.230390 · doi:10.5555/230386.230390
- 10.3115/981863.981904 · DOI · Paper page
- 10.1109/WPC.2005.14 · DOI
- 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.
- 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.
- 10.1145/1985441.1985449 · doi:10.1145/1985441.1985449
- 10.1145/1882291.1882315 · DOI
- GitHub. JUnit Pull Request #834. bit.ly/O8bmjM , 2014 . Visited Mar 2014. GitHub. JUnit Pull Request #834. bit.ly/O8bmjM, 2014. Visited Mar 2014.
- GitHub. libgdx Pull Request #1400. bit.ly/O8aBqV , 2014 . Visited Mar 2014. GitHub. libgdx Pull Request #1400. bit.ly/O8aBqV, 2014. Visited Mar 2014.
- 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.
- 10.1016/j.infsof.2003.09.016 · DOI
- 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.
- 10.1016/j.scico.2009.02.005 · doi:10.1016/j.scico.2009.02.005
- 10.1007/978-3-642-03013-0_14 · DOI
- 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.
- 10.1145/146370.146380 · DOI · Paper page
- 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.
- 10.1109/SCAM.2006.31 · DOI
- 10.1002/smr.v19:4 · doi:10.1002/smr.v19:4
- 10.1109/ICPC.2006.51 · DOI
- 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.
- 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.
- 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
- 10.1016/0306-4573(91)90066-U · DOI · Paper page
- 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.
- 10.1109/ESEM.2007.87 · DOI
- 10.5555/2337223.2337232 · doi:10.5555/2337223.2337232
- 10.1145/2491411.2491458 · DOI · Paper page
- 10.1145/1082983.1083151 · doi:10.1145/1082983.1083151
- 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.
- 10.1109/MS.2004.17 · DOI
- 10.1109/ICPC.2007.22 · DOI
- 10.1145/2491411.2491444 · DOI · Paper page
- 10.1109/MS.2009.161 · DOI · Paper page
- 10.1109/TSE.1984.5010283 · DOI · Paper page
- 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.
- 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.
- 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.
- 10.1109/ASE.2011.6100098 · doi:10.1109/ase.2011.6100098
- 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.
- 10.1109/WCRE.2011.15 · DOI
- 10.1257/jep.10.2.105 · DOI · Paper page
- 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.
- 10.1007/978-3-642-03013-0_15 · DOI · Paper page
Cited by
code2vec: Learning distributed representations of code
Alon, U., Zilberstein, M., Levy, O., & Yahav, E. (2019) · Proceedings of the ACM on Programming Languages · doi:10.1145/3290353 · Cited by 962
Program Synthesis with Large Language Models
Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. (2021) · arXiv · doi:10.48550/arxiv.2108.07732 · Cited by 388
“Methods aim improving code readability by asking a model trained on a code corpus with good style to predict names of variables and methods in new code [Raychev et al., 2015, Allamanis et al., 2014, Alon et al., 2019].”
MethodSelf-citationAre deep neural networks the best choice for modeling source code?
Hellendoorn, V. J., & Devanbu, P. (2017) · Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering · doi:10.1145/3106237.3106290 · Cited by 292
Tu, Z., Su, Z., & Devanbu, P. (2014) · Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2635868.2635875 · Cited by 238
Big code != big vocabulary: open-vocabulary models for source code
Karampatsis, R.-M., Babii, H., Robbes, R., Sutton, C., & Janes, A. (2020) · Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering · doi:10.1145/3377811.3380342 · Cited by 182
Self-citation
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.