Skip to main content

An Approach to Retrieving Similar Source Codes by Control Structure and Method Identifiers

  • Conference paper
Web Technologies and Applications (APWeb 2013)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 7808))

Included in the following conference series:

  • 4518 Accesses

Abstract

In this paper, we present an approach to improve source code retrieval using the structure of control statements. We develop a lexical parser that extracts structural information for each method including control statements and method identifiers. We present a source code retrieval model, named “derived structure retrieval model,” in which a retrieval conditions are defined as a sequence of control statements and/or method identifiers, and meaningful search conditions are derived from the given sequence. Experiments on the source code of Struts 2 Core show that the derived structure retrieval model outperforms the vector space retrieval model.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Baxter, I.D., Yahin, A., Moura, L., Sant’Anna, M., Bier, L.: Clone detection using abstract syntax trees. In: Proc. of the 14th International Conference on Software Maintenance, pp. 368–377 (November 1998)

    Google Scholar 

  2. Kamiya, T., Kusumoto, S., Inoue, K.: CCFinder: A multi-linguistic tokenbased code clone detection system for large scale source code. IEEE Transactions on Software Engineering 28(7), 654–670 (2002)

    Article  Google Scholar 

  3. Marcus, A., Maletic, J.: Identification of high-level concept clones in source code. In: Proc. of the 16th International Conference on Automated Software Engineering, pp. 107–114 (November 2001)

    Google Scholar 

  4. Mayland, J., Leblanc, C., Merlo, E.M.: Experiment on the automatic detection of function clones in a software system using metrics. In: Proc. of the 12th International Conference on Software Maintenance, pp. 244–253 (November 1996)

    Google Scholar 

  5. Ouddan, A.M., Essafi, H.: A Multilanguage Source Code Retrieval System Using Structural-Semantic Fingerprints. International Journal of Computer and Information Science and Engineering, 96–101 (Spring 2007)

    Google Scholar 

  6. Salton, G., Buckley, C.: Term-Weighting approaches in automatic text retrieval. Information Processing and Management 24(5), 513–523 (1988)

    Article  Google Scholar 

  7. Struts - The Apache Software Foundation (2012), http://struts.apache.org/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Udagawa, Y. (2013). An Approach to Retrieving Similar Source Codes by Control Structure and Method Identifiers. In: Ishikawa, Y., Li, J., Wang, W., Zhang, R., Zhang, W. (eds) Web Technologies and Applications. APWeb 2013. Lecture Notes in Computer Science, vol 7808. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37401-2_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-37401-2_26

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-37400-5

  • Online ISBN: 978-3-642-37401-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics