摘要(英) |
In the software development process, developers often fail to update comments due to development needs, leading to inconsistencies between code and comments. Additionally, with frequent code changes, the temporal nature of comments causes the history of comments to be difficult to retain completely in the latest version of the code, which is crucial for future software maintenance.
Traditional code commenting methods have many drawbacks, such as the inability to leave long messages, lack of support for multimedia comments, and difficulty in tracking changes to code and comments. To address these issues, this thesis proposes a tool named Message Box, an extension of the GeekyNote tagging system, aimed at automatically integrating historical information and combining Git messages to provide code change history tracking and management. This tool resolves the consistency issues between code and comments, and can integrate various types of information as well as store HTML tags, images, videos, and other data, making the presentation of information more readable. Additionally, by incorporating Git timeline data, Message Box addresses the temporal nature of comments, preventing past information from disappearing in the latest project versions.
The design and implementation of Message Box demonstrate a new way to manage the historical changes of code and comments, significantly improving software development efficiency and code maintainability. It reduces the risk of inconsistencies and obsolescence of comments, provides detailed change history records, and facilitates developers in tracing and understanding changes. |
參考文獻 |
[1] Y. -P. Cheng, W. -N. Hsiung, Y. -S. Wu and L. -H. Chen, "GeekyNote: A Technical Documentation Tool with Coverage, Backtracking, Traces, and Couplings," 2020 IEEE/ACM 42nd International Conference on Software Engineering: Companion Proceedings (ICSE-Companion), Seoul, Korea (South), 2020, pp. 73-76.
[2] E. Aghajani et al., "Software Documentation Issues Unveiled," 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE), Montreal, QC, Canada, 2019, pp. 1199-1210, doi: 10.1109/ICSE.2019.00122.
[3] S. Haiduc, J. Aponte, L. Moreno and A. Marcus, "On the Use of Automated Text Summarization Techniques for Summarizing Source Code," 2010 17th Working Conference on Reverse Engineering, Beverly, MA, USA, 2010, pp. 35-44, doi: 10.1109/WCRE.2010.13.
[4] L. Moreno, J. Aponte, G. Sridhara, A. Marcus, L. Pollock and K. Vijay-Shanker, "Automatic generation of natural language summaries for Java classes," 2013 21st International Conference on Program Comprehension (ICPC), San Francisco, CA, USA, 2013, pp. 23-32, doi: 10.1109/ICPC.2013.6613830.
[5] S. H. Tan, D. Marinov, L. Tan and G. T. Leavens, "@tComment: Testing Javadoc Comments to Detect Comment-Code Inconsistencies," 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation, Montreal, QC, Canada, 2012, pp. 260-269, doi: 10.1109/ICST.2012.106.
[6] Tan L, Yuan D, Krishna G, et al. 2007. iComment: Bugs or bad comments? ACM SIGOPS Operating Systems Review. ACM, 41(6): 145–158.
[7] “Git Commit” [Online]. Available: https://www.git-scm.com/docs/git-commit. [Accessed 12 6 2024]
[8] D. Steidl, B. Hummel and E. Juergens, "Quality analysis of source code comments," 2013 21st International Conference on Program Comprehension (ICPC), San Francisco, CA, USA, 2013, pp. 83-92, doi: 10.1109/ICPC.2013.6613836.
[9] P. Chatterjee, B. Gause, H. Hedinger and L. Pollock, "Extracting Code Segments and Their Descriptions from Research Articles," 2017 IEEE/ACM 14th International Conference on Mining Software Repositories (MSR), Buenos Aires, Argentina, 2017, pp. 91-101, doi: 10.1109/MSR.2017.10.
[10] B. Yang, Z. Liping and Z. Fengrong, "A Survey on Research of Code Comment" in Proceedings of the 2019 3rd International Conference on Management Engineering Software Engineering and Service Sciences(ICMSS 2019), New York, NY, USA:Association for Computing Machinery, pp. 45-51.
[11] X. Song, H. Sun, X. Wang and J. Yan, "A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques," in IEEE Access, vol. 7, pp. 111411-111428, 2019, doi: 10.1109/ACCESS.2019.2931579.
[12] C. Zhang, J. Wang, Q. Zhou, T. Xu, K. Tang, H. Gui, et al., "A survey of automatic source code summarization", Symmetry, vol. 14, no. 3, pp. 471, 2022.
[13] X. Xia, L. Bao, D. Lo, Z. Xing, A. E. Hassan and S. Li, "Measuring Program Comprehension: A Large-Scale Field Study with Professionals," in IEEE Transactions on Software Engineering, vol. 44, no. 10, pp. 951-976, 1 Oct. 2018, doi: 10.1109/TSE.2017.2734091.
[14] A. J. Ko, et al., “An exploratory study of how developers seek, relate, and collect relevant information during software maintenance tasks,” IEEE Trans. Softw. Eng., vol. 32, no. 12, pp. 971–987, Dec. 2006.
[15] R. Minelli, A. Mocci, and M. Lanza, “I know what you did last summer—an investigation of how developers spend their time,” in Proc. 23rd IEEE Int. Conf. Program Comprehension, 2015, pp. 25–35.
[16] “Code Commenting: Common Mistakes and Their Solutions and Tools!” [Online]. Available: https://www.linkedin.com/pulse/code-commenting-common-mistakes-solutions-tools-knowlio/. [Accessed 12 6 2024]
[17] “Best practices for writing code comments” [Online]. Available: https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/. [Accessed 12 6 2024]
[18] “MongoDB” [Online]. Available: https://www.mongodb.com/. [Accessed 12 6 2024]
[19] “Gitamine” [Online]. Available: https://github.com/pvigier/gitamine [Accessed 12 6 2024]
[20] “Levenshtein distance” [Online] Available: https://en.wikipedia.org/wiki/Levenshtein_distance [Accessed 12 6 2024]
[21] “VSCode” [Online] Available: https://code.visualstudio.com/docs [Accessed 29 6 2024] |