%A JIANG Ren-he, ZHENG Xiao-mei, ZHU Xiao-qian, PAN Min-xue and ZHANG Tian %T Method of Java Code Repository Construction Based on UML Relationship %0 Journal Article %D 2017 %J Computer Science %R 10.11896/j.issn.1002-137X.2017.11.011 %P 69-79 %V 44 %N 11 %U {https://www.jsjkx.com/CN/abstract/article_16647.shtml} %8 2018-12-01 %X Relationship information is the most important information representing code structure and semantics,such as inheritance,aggregation,composition,dependency,call and creation.This paper provided a method constructing source repositories based on relationships defined in UML2 for better comprehension and reuse of the open source code.The graph database is used as the implementation plantform of the approach,and the abstract syntax tree is adopted as the base of graph schema.In addition,the schema is designed specifically according to the Java language so that semantics can be well presented.The key point of the approach is that the relationship definitions are prescribed strictly according to the UML2.4 specifications,which is an ISO version,so that the differentiation between different language communities about the comprehension of relationship can be eliminated.Each category of the relationships was studied and the corresponding recognition algorithms were designed.During the construction of the repository,the relationships are added as different kind of edges.The evaluation experiments of 9 open source projects were conducted to illustrate the expansion of the code graph and the consumed space.At last,two simple case studies of querying on the repository were given.