[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/2970276.2970363acmconferencesArticle/Chapter ViewAbstractPublication PagesaseConference Proceedingsconference-collections
short-paper

Mining revision histories to detect cross-language clones without intermediates

Published: 25 August 2016 Publication History

Abstract

To attract more users on different platforms, many projects release their versions in multiple programming languages (e.g., Java and C#). They typically have many code snippets that implement similar functionalities, i.e., cross-language clones. Programmers often need to track and modify cross-language clones consistently to maintain similar functionalities across different language implementations. In literature, researchers have proposed approaches to detect cross- language clones, mostly for languages that share a common intermediate language (such as the .NET language family) so that techniques for detecting single-language clones can be applied. As a result, those approaches cannot detect cross-language clones for many projects that are not implemented in a .NET language. To overcome the limitation, in this paper, we propose a novel approach, CLCMiner, that detects cross-language clones automatically without the need of an intermediate language. Our approach mines such clones from revision histories, which reflect how programmers maintain cross-language clones in practice. We have implemented a prototype tool for our approach and conducted an evaluation on five open source projects that have versions in Java and C#. The results show that CLCMiner achieves high accuracy and point to promising future work.

References

[1]
Antlr. http://www.antlr.org.
[2]
Lucene. http://lucene.apache.org.
[3]
F. Al-Omari, I. Keivanloo, C. K. Roy, and J. Rilling. Detecting clones across microsoft .net programming languages. In Proc. WCRE, pages 405–414, 2012.
[4]
S. Bellon, R. Koschke, G. Antoniol, J. Krinke, and E. Merlo. Comparison and evaluation of clone detection tools. TSE, 33(9):577–591, 2007.
[5]
C. Bird, P. C. Rigby, E. T. Barr, D. J. Hamilton, D. M. Germán, and P. T. Devanbu. The promises and perils of mining git. In MSR, pages 1–10, 2009.
[6]
R. Fanta and V. Rajlich. Removing clones from the code. J. of Software Maintenance, 11(4):223–243, 1999.
[7]
T. Gˆırba, S. Ducasse, A. Kuhn, R. Marinescu, and D. Ratiu. Using concept analysis to detect co-change patterns. In Proc. ESEC/FSE, pages 83–89, 2007.
[8]
Z. S. Harris. Distributional structure. Word, 10(2-3):146–162, 1954.
[9]
L. Jiang, G. Misherghi, Z. Su, and S. Glondu. DECKARD: scalable and accurate tree-based detection of code clones. In ICSE, pages 96–105, 2007.
[10]
L. Jiang and Z. Su. Automatic mining of functionally equivalent code fragments via random testing. In Proc. ISSTA, pages 81–92, 2009.
[11]
E. Jürgens, F. Deissenboeck, and B. Hummel. Clonedetective - A workbench for clone detection research. In Proc. ICSE, pages 603–606, 2009.
[12]
T. Kamiya, S. Kusumoto, and K. Inoue. CCFinder: A multilinguistic token-based code clone detection system for large scale source code. IEEE Transaction on Software Engineering, 28(7):654–670, 2002.
[13]
C. J. Kapser and M. W. Godfrey. “cloning considered harmful” considered harmful: Patterns of cloning in software. ESME, 13(6):645–692, Dec 2008.
[14]
K. Kontogiannis, P. K. Linos, and K. Wong. Comprehension and maintenance of large-scale multi-language software applications. In Proc. ICSM, pages 497–500, 2006.
[15]
N. A. Kraft, B. W. Bonds, and R. K. Smith. Cross-language clone detection. In Proc. SEKE, pages 54–59, 2008.
[16]
S. McIntosh, B. Adams, M. Nagappan, and A. E. Hassan. Mining co-change information to understand when build changes are necessary. In Proc. ICSME, pages 241–250, 2014.
[17]
S. Meng, X. Wang, L. Zhang, and H. Mei. A history-based matching approach to identification of framework evolution. In ICSE, pages 353–363, 2012.
[18]
H. Peng, L. Mou, G. Li, Y. Liu, L. Zhang, and Z. Jin. Building program vector representations for deep learning. In Knowledge Science, Engineering and Management (KSEM), pages 547–553, 2015.
[19]
C. K. Roy and J. R. Cordy. A survey on software clone detection research. Queen’s School of Computing TR, 541(115):64–68, 2007.
[20]
S. Wang, D. Lo, and L. Jiang. Understanding widespread changes: A taxonomic study. In 17th CSMR, pages 5–14, 2013.
[21]
T. Zimmermann, P. Weißgerber, S. Diehl, and A. Zeller. Mining version histories to guide software changes. In Proc. ICSE, pages 563–572, 2004.

Cited By

View all
  • (2024)An Empirical Study on Cross-language Clone BugsProceedings of the 2024 IEEE/ACM 46th International Conference on Software Engineering: Companion Proceedings10.1145/3639478.3643075(280-281)Online publication date: 14-Apr-2024
  • (2024)MtdScout: Complementing the Identification of Insecure Methods in Android Apps via Source-to-Bytecode Signature Generation and Tree-based Layered Search2024 IEEE 9th European Symposium on Security and Privacy (EuroS&P)10.1109/EuroSP60621.2024.00045(724-740)Online publication date: 8-Jul-2024
  • (2023)Improving Cross-Language Code Clone Detection via Code Representation Learning and Graph Neural NetworksIEEE Transactions on Software Engineering10.1109/TSE.2023.331179649:11(4846-4868)Online publication date: Nov-2023
  • Show More Cited By

Index Terms

  1. Mining revision histories to detect cross-language clones without intermediates

      Recommendations

      Comments

      Please enable JavaScript to view thecomments powered by Disqus.

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      ASE '16: Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering
      August 2016
      899 pages
      ISBN:9781450338455
      DOI:10.1145/2970276
      • General Chair:
      • David Lo,
      • Program Chairs:
      • Sven Apel,
      • Sarfraz Khurshid
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 25 August 2016

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. cross-language clone
      2. diff
      3. revision history

      Qualifiers

      • Short-paper

      Conference

      ASE'16
      Sponsor:

      Acceptance Rates

      Overall Acceptance Rate 82 of 337 submissions, 24%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)8
      • Downloads (Last 6 weeks)2
      Reflects downloads up to 19 Dec 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)An Empirical Study on Cross-language Clone BugsProceedings of the 2024 IEEE/ACM 46th International Conference on Software Engineering: Companion Proceedings10.1145/3639478.3643075(280-281)Online publication date: 14-Apr-2024
      • (2024)MtdScout: Complementing the Identification of Insecure Methods in Android Apps via Source-to-Bytecode Signature Generation and Tree-based Layered Search2024 IEEE 9th European Symposium on Security and Privacy (EuroS&P)10.1109/EuroSP60621.2024.00045(724-740)Online publication date: 8-Jul-2024
      • (2023)Improving Cross-Language Code Clone Detection via Code Representation Learning and Graph Neural NetworksIEEE Transactions on Software Engineering10.1109/TSE.2023.331179649:11(4846-4868)Online publication date: Nov-2023
      • (2023) ZC 3 : Zero-Shot Cross-Language Code Clone Detection 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00210(875-887)Online publication date: 11-Sep-2023
      • (2022)C4Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension10.1145/3524610.3527911(413-424)Online publication date: 16-May-2022
      • (2022)Inferring Bug Signatures to Detect Real BugsIEEE Transactions on Software Engineering10.1109/TSE.2020.299697548:2(571-584)Online publication date: 1-Feb-2022
      • (2021)How does Migrating to Kotlin Impact the Run-time Efficiency of Android Apps?2021 IEEE 21st International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM52516.2021.00014(36-46)Online publication date: Sep-2021
      • (2021)Interactive cross-language code retrieval with auto-encodersProceedings of the 36th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE51524.2021.9678929(167-178)Online publication date: 15-Nov-2021
      • (2019)CLCDSAProceedings of the 34th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE.2019.00099(1026-1037)Online publication date: 10-Nov-2019
      • (2019)Structural and Nominal Cross-Language Clone DetectionFundamental Approaches to Software Engineering10.1007/978-3-030-16722-6_14(247-263)Online publication date: 4-Apr-2019
      • Show More Cited By

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media