An Approach to Helping Developers Learn Open Source Projects Based on Machine Learning

Zhiyu Sun,Fang Peng,Junrui Guan,Yanchun Sun
DOI: https://doi.org/10.1145/3361242.3361251
2019-01-01
Abstract:Developers usually learn excellent coding methods and design patterns by reading the code from well-known open-source projects, and participate in the development of open-source projects to enhance their programming capabilities. When developers have just joined an existing open-source project development, the first thing to do is to read and understand the project code. However, almost no project will maintain design documentations. Developers can only understand code according to user guide (mainly focus on how to use code but not on how to develop code) or brief code comments, which is relatively difficult for new developers. To help developers learn open-source projects more quickly, we propose an approach to helping developers learn open-source projects based on machine learning. First, we build a code structure graph for the project code by static analysis. Second, we implement a project entries recommendation approach based on clustering and machine learning to recommend project entries suitable for developers to read. Third, we implement a learning path recommendation algorithm. The algorithm recommends learning paths based on function nodes in the code structure graph selected by the developers, helps developers understand open-source projects better. In experiments, we select two famous c++ open-source projects, Lua and Memcache, as examples to perform project learning path recommendation. The experimental results show that our approach save a lot of time for developers to learn open-source projects while maintaining the accuracy of the recommendations.
What problem does this paper attempt to address?