The software systems become more and more complex in nowadays.It is cost to develop and maintain these software systems.However,it is difficult for most programmers to figure out every details.If software mining is leveraged,it can assist programmers develop better,improving software quality,ensuring software development efficiency,and improving user experience.Due to the various problem in real projects,it is necessary to mining value pattern in large data.The programmers tend to share the code on the open source community.Hence,the open source community contains large code and text data.However,the programmers face two problems:the one is how to understand the semantic of code,because the open source code is poorly documented.The other is how to recommend the answer of programming questions,because the cost of trying a possible solution is high.Therefore,we assist programmers from the two following aspects based on open source community.Firstly,for understanding code snippets,we could automatically generate comments based on the pattern mining from the open source community.Furthermore,we propose a new attention mechanism based on the structure of code.Experiment results show our proposed model could generated more readable comments than previous work,which also contains more semantic information.Secondly,for best program answer recommendation,we mining the program related questions in open source community,and explore the best answer pattern from two aspects,one is multi-view learning and the other is local and global consistency.Based on these,the question of programmers could be solve more efficient.Experiment studies show our proposed methods outperform previous work in many evaluation indexes. |