Cross-language source code re-use detection using latent semantic analysis

Enrique Flores, Alberto Barron, Lidia Moreno, Paolo Rosso

Research output: Contribution to journalArticle

9 Citations (Scopus)


Nowadays, Internet is the main source to get information from blogs, encyclopedias, discussion forums, source code repositories, and more resources which are available just one click away. The temptation to re-use these materials is very high. Even source codes are easily available through a simple search on the Web. There is a need of detecting potential instances of source code re-use. Source code re-use detection has usually been approached comparing source codes in their compiled version. When dealing with cross-language source code re-use, traditional approaches can deal only with the programming languages supported by the compiler. We assume that a source code is a piece of text,with its syntax and structure, so we aim at applying models for free text re-use detection to source code. In this paper we compare a Latent Semantic Analysis (LSA) approach with previously used text re-use detection models for measuring cross-language similarity in source code. The LSA-based approach shows slightly better results than the other models, being able to distinguish between re-used and related source codes with a high performance.

Original languageEnglish
Pages (from-to)1708-1725
Number of pages18
JournalJournal of Universal Computer Science
Issue number13
Publication statusPublished - 2015



  • Cross-language re-use detection
  • Latent semantic analysis
  • Plagiarism
  • Source code

ASJC Scopus subject areas

  • Computer Science(all)
  • Theoretical Computer Science

Cite this