Developers often encounter unfamiliar code during software maintenance which consumes a significant amount of time for comprehension, especially for novice programmers. Automated techniques that analyze a source code and present key information to the developers can lead to an effective comprehension of the code. Researchers have come up with automated code summarization techniques that focus on code summarization by generating brief summaries rather than aiding its comprehension. Existing debuggers represent the execution states of the program but they do not show the complete execution at a single point. Studies have revealed that the effort required for program comprehension can be reduced if novice programmers are provided with worked examples. Hence, we propose COSPEX (Comprehension using Summarization via Program Execution) - an Atom plugin that dynamically extracts key information for every line of code executed and presents it to the developers in the form of an interactive example-like dynamic information instance. As a preliminary evaluation, we presented 14 undergraduates having Python programming experience up to 1 year with a code comprehension task in a user survey. We observed that COSPEX helped novice programmers in program comprehension and improved their understanding of the code execution. The source code and tool are available at: https://bit.ly/3utHOBM, and the demo on Youtube is available at: https://bit.ly/2Sp08xQ.
翻译:开发者在软件维护过程中经常遇到不熟悉的代码,这需要大量时间来理解,特别是新程序员。分析源代码和向开发者提供关键信息的自动化技术可以导致对代码的有效理解。研究人员已经开发出自动代码总称技术,侧重于代码总称,通过生成简要摘要而不是帮助理解代码总称。现有的调试器代表了程序的执行状态,但没有在某一点显示完整的执行过程。研究表明,如果提供新程序员的工作实例,对程序理解所需的努力可以减少。因此,我们提议了COSPEX(通过程序执行来综合使用苏美化)-一个Atom插件,该插件动态地为所执行的每行代码提取关键信息,并以互动实例式动态信息实例的形式将其提交给开发者。作为初步评估,我们向14个拥有Python编程经验的本本子介绍了在用户调查中完成的代码理解任务。我们发现,COSPEX帮助了程序理解程序编程员了解并改进了对代码执行的理解。源代码的代码码码码码和工具:httpHO/DUBI。