Computer Science ›› 2017, Vol. 44 ›› Issue (11): 69-79.doi: 10.11896/j.issn.1002-137X.2017.11.011

Previous Articles     Next Articles

Method of Java Code Repository Construction Based on UML Relationship

JIANG Ren-he, ZHENG Xiao-mei, ZHU Xiao-qian, PAN Min-xue and ZHANG Tian   

  • Online:2018-12-01 Published:2018-12-01

Abstract: 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.

Key words: Code repository,UML,Graph database,Code query

[1] Neo4j.http://neo4j.com.
[2] Eclipse JDT.http://www.eclipse.org/jdt.
[3] OMG UML,Superstructure.Version2.4.1.http://www.omg.org/spec/UML/2.4.1.
[4] Cypher.http://neo4j.com/docs/stable/cypher-query-lang.html.
[5] FEIJS L,KRIKHAAR R,VAN OMMERING R.A relational approach to support software architecture analysis[J].Software:Practice and Experience,1998,8(4):371-400.
[6] VERBAERE M,HAJIYEV E,DE MOOR O.Improve software quality with semmlecode:an eclipse plugin for semantic code search[C]∥Companion to the 22nd ACM SIGPLAN Confe-rence on Object-oriented Programming Systems and Applications Companion.ACM,2007:880-881.
[7] YAMAGUCHI F,GOLDE N,ARP D,et al.Modeling and discovering vulnerabilities with code property graphs[C]∥Proceedings of the 2014 IEEE Symposium on Security and Privacy.IEEE,2014:590-604.
[8] PANCHENKO,KARSTENS J,PLATTNER H,et al.Precise and scalable querying of syntactical source code patterns using sample code snippets and a database[C]∥Proceedings of the 2011 IEEE 19th International Conference on Program Comprehension.IEEE,2011:41-50.
[9] LINTON M A.Implementing relational views of programs[C]∥Proceedings of the First ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments.ACM,1984:132-140.
[10] CHEN Y,NISHIMOTO M Y,RAMAMOORTHY C V.The c information abstraction system[J].IEEE Transactions on Software Engineering,1990,16(3):325.
[11] CHEN Y,GANSNER E R,KOUTSOFIOS E.A C++ data model supporting reachability analysis and dead code detection[C]∥Proceedings of the 6th European Software Engineering Conference Held Jointly with the 5th ACM SIGSOFT International Symposium on Foundations of Software Engineering.Springer,1997:414-431.
[12] HOLMES R,WALKER R J.Approximate structural contextmatching:an approach to recommend relevant examples[J].IEEE Transactions on Software Engineering,2006,32(12):952-970.
[13] BAJRACHARYA S,NGO T,LINSTEAD E,et al.Sourcerer:a search engine for open source code supporting structure-based search[C]∥Companion to the 21st ACM SIGPLAN Symposium on Object-oriented Programming Systems,Languages,and Applications.ACM,2006:681-682.
[14] BAJRACHARYA S,OSSHER J,OSSHER J.Sourcerer:an infrastructure for largescale collection and analysis of open-source code[J].Science of Computer Programming,2014,9:241-259.
[15] BADROS G.Javaml:A markup language for java source code[J].Computer Networks,2000,3(1):159-177.
[16] AGUIAR,DAVID G,BADROS G.Javaml 2.0:enriching the markup language for java source code[M]∥XML:Aplicac Oese Tecnologias Associadas,2004:1-12.
[17] EICHBERG M,HAUPT M,MEZINI M,et al.Comprehensive software understanding with sextant[C]∥Proceedings of the 21st IEEE International Conference on Software Maintenance.IEEE,2005:315-324.
[18] PANCHENKO,KARSTENS J,PLATTNER H,et al.Precise and scalable querying of syntactical source code patterns using sample code snippets and a database[C]∥Proceedings of the 2011 IEEE 19th International Conference on Program Comprehension.IEEE,2011:41-50.
[19] YAMAGUCHI F,GOLDE N,ARP D,et al.Modeling and discovering vulnerabilities with code property graphs[C]∥Proceedings of the 2014 IEEE Symposium on Security and Privacy.IEEE,2014:590-604.
[20] URMA R,MYCROFT A.Source-code queries with graph databases-with application to programming language usage and evolution[J].Science of Computer Programming,2015,97:127-134.
[21] ZHANG T,PAN M,ZHAO J,et al.An open framework for semantic code queries on heterogeneous repositories[C]∥Proceedings of the 2015 International Symposium on Theoretical Aspects of Software Engineering.IEEE,2015:39-46.

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!