Abstract

Recently, topic modeling-based source code comprehension has become one of the research hotspots. Researchers mine functional topics from source code with topic modeling techniques, and use these functional topics to help developers comprehend the functional concerns of a software system and the corresponding implementations in source code. However, because diverse kinds of topics, including functional topics and other noisy topics, are mixed together in the raw topics mined from source code, developers have to identify functional topics manually. The manual identification process is difficult and time-consuming due to the fact that only basic information (e.g. associated words) is provided by previous approaches. In this paper, we propose a topic modeling and static analysis-based approach to obtain functional topics from source code. Firstly, we execute source code preprocessing with a series of Filtering Heuristics, and then mine raw topics from source code using topic modeling techniques. Then, we conduct static analysis on source code to obtain structural relationships, based on which we propose a novel metric called Topic Cohesion to identify functional topics from the raw topics. Finally, we locate source code elements that implement the topics, and generate topic descriptions using source code comments for the developers to comprehend the topics. Experiments on a set of open source software show that our approach can effectively obtain functional topics and their associated information, which helps developer comprehend the functional concerns of a software system and the corresponding implementations in source code.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.