Robust algorithmic binding to arbitrary fragment of program code

Бесплатный доступ

When solving a task, a programmer actively interacts with a finite set of code fragments. The information about their locations is important for quick navigation, for other developers, and as a kind of documentation. Integrated development environments (IDEs) provide tools for marking code fragments with labels, displaying lists of labels, and using these labels for quick navigation. However, they often lose the correspondence between the label and the marked place when the code is edited, in particular when changes are made outside the IDE. In previous works, the authors propose a tool to be integrated into various IDEs for ``binding'' to large syntactic entities of a program and building a~markup that is robust to code editing. The description of the marked element is built on the basis of the abstract syntax tree (AST) of the program. Later it is used to algorithmically search for the element in an edited code. The search has a success rate from 99 to 100.. This article aims at robust algorithmic binding to an~arbitrary section of the code. For binding to a single-line code fragment, we propose an extension of the model describing the marked fragment, and an additional search algorithm. We also propose an algorithm for embedding nodes corresponding to multi-line fragments in an AST. We show that the correctness of the AST is not violated by these embeddings. Bindings to randomly selected lines were made in the code of three large C. projects. Manual check of these lines search results in~the edited code has confirmed that the bindings are robust to code editing.

Еще

Program markup, algorithmic binding to program code, software development, abstract syntax tree, code similarity measurement

Короткий адрес: https://sciup.org/143178556

IDR: 143178556

Список литературы Robust algorithmic binding to arbitrary fragment of program code

  • Schröer M., Koschke R.. “Recording, visualising and understanding developer programming behaviour”, 2021 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) (11 May 2021, Honolulu, HI, USA), 2021, pp. 561–566. https://doi.org/10.1109/SANER50967.2021.00066
  • Ciborowska A., Chakarov A., Pandita R.. “Contemporary COBOL: developers’ perspectives on defects and defect location”, 2021 IEEE International Conference on Software Maintenance and Evolution (ICSME) (27 Sept.–1 Oct. 2021, Luxembourg), 2021, pp. 227–238. https://doi.org/10.1109/ICSME52107.2021.00027
  • Parnin C., Rugaber S.. “Resumption strategies for interrupted programming tasks”, Software Quality Journal, 19:1 (2011), pp. 5–34. https://doi.org/10.1007/s11219-010-9104-9
  • Badreddin O., Khandoker R., Forward A., Masmali O., Lethbridge T. C. “A decade of software design and modeling: a survey to uncover trends of the practice”, Proceedings of the 21th ACM/IEEE International Conference on Model Driven Engineering Languages and Systems, MODELS’18 (14–19 October 2018, Copenhagen, Denmark), ACM, New York, NY, 2018, ISBN 978-1-4503-4949-9, pp. 245–255. https://doi.org/10.1145/3239372.3239389
  • Storey M.-A., Ryall J., Singer J., Myers D., Cheng L.-T., Muller M.. “How software developers use tagging to support reminding and refinding”, IEEE Trans. Softw. Eng., 35:4 (2009), pp. 470–483. https://doi.org/10.1109/TSE.2009.15
  • Guzzi A., Hattori L., Lanza M., Pinzger M., A. van Deursen. “Collective code bookmarks for program comprehension”, 2011 IEEE 19th International Conference on Program Comprehension (22–24 June 2011, Kingston, ON, Canada), 2011, pp. 101–110. https://doi.org/10.1109/ICPC.2011.19
  • Goloveshkin A. V., Mikhalkovich S. S.. “Tolerant parsing with a special kind of “Any” symbol: the algorithm and practical application”, Proc. ISP RAS, 30:4 (2018), pp. 7–28. https://doi.org/10.15514hM/tItNSpP:/R/AmSi.-m20a1t8h-n3e0t(.4r)u-/1tisp344
  • Goloveshkin A. V.. “Tolerant parsing using modified LR(1) and LL(1) algorithms with embedded “Any” symbol”, Proc. ISP RAS, 31:3 (2019), pp. 7–28. https://doi.org/10.15514hM/tItNSpP:/R/AmSi.-m20a1t9h-n3e1t(.3r)u-/1tisp418
  • Goloveshkin A., Mikhalkovich S.. “Using improved context-based code description for robust algorithmic binding to changing code”, Procedia Computer Science, 193 (2021), pp. 239–249. https://doi.org/10.1016/j.procs.2021.10.024
  • A. V. Goloveshkin, S. S. Mikhalkovich “Binding to an arbitrary section of the program in the task of markup of program code”, Sovremennyye informatsionnyye tekhnologii: tendentsii i perspektivy razvitiya, Materialy XXVI nauchnoy konferentsii (18-–19 aprelya 2019 g., Yuzhnyy federal’nyy universitet, Rostov-na-Donu, Rossiya), Yuzhnyy federal’nyy universitet, Rostov-na-Donu–Taganrog, 2019, ISBN 978-5-9275-3139-4, pp. 86–89 (In Russian).
  • A. L. Fuksman Technological Aspects of Software System Design, Statistika, M., 1979 (In Russian).
  • Kiczales G., Hilsdale E., Hugunin J., Kersten M., Palm J., Griswold W. G. “An overview of AspectJ”, ECOOP 2001 — Object-Oriented Programming, 15th European Conference (18–22 June 2001, Budapest, Hungary), LNCS, vol. 2072, Springer-Verlag, Berlin, 2001, ISBN 978-3-540-45337-6, pp. 327–354. https://doi.org/10.1007/3-540-45337-7_18
  • Schaefer I., Bettini L., Bono V., Damiani F., Tanzarella N. “Delta-oriented programming of software product lines”, Software Product Lines: Going Beyond, 14th International Conference SPLC 2010 (13–17 September 2010, Jeju Island, South Korea), LNCS, vol. 6287, Springer-Verlag, Berlin, 2010, ISBN 978-3-642-15578-9, pp. 77–91. https://doi.org/10.1007/978-3-642-15579-6_6
  • Apel S., Kästner C., Lengauer C.. “Language-independent and automated software composition: the FeatureHouse experience”, IEEE Trans. Softw. Eng., 39:1 (2013), pp. 63–79. https://doi.org/10.1109/TSE.2011.120
  • Kanai S. Customize code generation using IBM Rational Rhapsody for C++, IBM Support. hUtRtpLs://www.ibm.com/support/pages/customize-code-generation-using-ibm-rational-rhapsody-c
  • S.Yu. Kalinin, I. A. Kolokolov, A. N. Litvinenko. “Applying AOP concepts to the development of extendable applications”, Izvestiya Yuzhnogo federal’nogo universiteta. Tekhnicheskiye nauki, 103:2 (2010), pp. 58–68 (In Russian). [RSCI]
  • M. S. Malevannyy, S. S. Mikhalkovich “Programming environment support for navigating through aspects of program code”, Sovremennyye informatsionnyye tekhnologii: tendentsii i perspektivy razvitiya, Materialy konferentsii (17–18 aprelya 2014 g., Yuzhnyy federal’nyy universitet, Rostov-na-Donu, Rossiya), Yuzhnyy federal’nyy universitet, Rostov-na-Donu, 2014, ISBN 978-5-9275-1227-0, pp. 275–276 (In Russian).
  • Malevannyy M. S., Mikhalkovich S. S.. “Context-based model for concern markup of a source code”, Proc. ISP RAS, 28:2 (2016), pp. 63–78. https://doi.org/10.15514hM/tItNSpP:/R/AmSi.-m20a1t6h-n2e8t(.2r)u-/4tisp20
  • Malevannyy M. S., Mikhalkovich S. S. “Robust binding to syntactic elements in a changing code”, Proceedings of the 12th Central and Eastern European Software Engineering Conference in Russia, CEE-SECR’16 (28–29 October 2016, Moscow, Russia), ACM, New York, NY, USA, 2016, ISBN 978-1-4503-4884-3, 8 pp. https://doi.org/10.1145/3022211.3022225
  • Roy C. K., Cordy J. R., Koschke R.. “Comparison and evaluation of code clone detection techniques and tools: a qualitative approach”, Science of Computer Programming, 74:7 (2009), pp. 470–495. https://doi.org/10.1016/j.scico.2009.02.007
  • Rattan D., Bhatia R., Singh M.. “Software clone detection: a systematic review”, Information and Software Technology, 55:7 (2013), pp. 1165–1199. https://doi.org/10.1016/j.infsof.2013.01.008
  • Walker A., Cerny T., Song E.. “Open-source tools and benchmarks for code-clone detection: past, present, and future trends”, SIGAPP Appl. Comput. Rev., 19:4 (2019), pp. 28–39. https://doi.org/10.1145/3381307.3381310
  • Novak M., Joy M., Kermek D.. “Source-code similarity detection anddetection tools used in academia: a systematic review”, ACM Trans. Comput. Educ., 19:3 (2019), 27, 37 pp. https://doi.org/10.1145/3313290
  • Cheers H., Lin Y., Smith S.P.. “Evaluating the robustness of source code plagiarism detection tools to pervasive plagiarism-hiding modifications”, Empirical Software Engineering, 26 (2021), 83, 62 pp. https://doi.org/10.1007/s10664-021-09990-4
  • Luan S., Yang D., Barnaby C., Sen K., Chandra S.. “Aroma: code recommendation via structural code search”, Proc. ACM Program. Lang., 3:OOPSLA (2019), 152, 28 pp. https://doi.org/10.1145/3360578
  • Dotzler G., Philippsen M. “Move-optimized source code tree differencing”, Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, ASE’16 (3–7 September 2016, Singapore), ACM, New York, NY, USA, 2016, ISBN 978-1-4503-3845-5, pp. 660–671. https://doi.org/10.1145/2970276.2970315
  • Frick V., Grassauer T., Beck F., Pinzger M.. “Generating accurate and compact edit scripts using tree differencing”, 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME) (23–29 Sept. 2018, Madrid, Spain), pp. 264–274. https://doi.org/10.1109/ICSME.2018.00036
  • Kim M., Notkin D., Grossman D., Wilson G.. “Identifying and summarizing systematic code changes via rule inference”, IEEE Transactions on Software Engineering, 39:1 (2013), pp. 45–62. https://doi.org/10.1109/TSE.2012.16
  • Ragkhitwetsagul C., Krinke J., Clark D.. “A comparison of code similarity analysers”, Empirical Software Engineering, 23:4 (2018), pp. 2464–2519. https://doi.org/10.1007/s10664-017-9564-7
  • Brody S., Alon U., Yahav E.. “A structural model for contextual code changes”, Proc. ACM Program. Lang., 4:OOPSLA (2020), 215, 28 pp. https://doi.org/10.1145/3428283
  • Asaduzzaman M., Roy C. K., Schneider K. A., Penta M. D. “LHDiff:a language-independent hybrid approach for tracking source code lines”, 2013 IEEE International Conference on Software Maintenance (22–28 Sept. 2013, Eindhoven, Netherlands), 2013, ISBN 978-0-7695-4981-1, pp. 230–239. https://doi.org/10.1109/ICSM.2013.34
  • Moonen L. “Generating robust parsers using island grammars”, Proceedings of the 8th Working Conference on Reverse Engineering (2–5 Oct. 2001, Stuttgart, Germany), IEEE Computer Society, Washington, DC, USA, 2001, ISBN 0-7695-1303-4, pp. 13–22. https://doi.org/10.1109/WCRE.2001.957806
  • Van Den Brand M., Sellink M.P. A., Verhoef C. “Obtaining a COBOL grammar from legacy code for reengineering purposes”, Proceedings of the 2nd International Conference on Theory and Practice of Algebraic Specifications (25–26 September 1997, Amsterdam, The Netherlands), eWiC, BCS Learning & Development Ltd., Swindon, UK, 1997, ISBN 3-540-76228-0, pp. 1–16. https://doi.org/10.14236/EWIC/AL1997.6
  • Oliver J., Cheng C., Chen Y. “TLSH – a locality sensitive hash”, Proceedings of the 2013 Fourth Cybercrime and Trustworthy Computing Workshop, CTC’13 (21–22 Nov. 2013, Sydney, NSW, Australia), IEEE Computer Society, Washington, DC, USA, 2013, pp. 7–13. https://doi.org/10.1109/CTC.2013.9
  • V. I. Levenshtein. “Binary codes capable of correcting deletions, insertions, and reversals”, Dokl. Akad. Nauk SSSR, 163:4 (1965), pp. 845–848 (In Russian). MhttNp://mi.mathnet.ru/dan31411
Еще
Статья научная