Proceedings

Positive and Unlabeled Learning for Detecting Software Functional Clones with Adversarial Training

Download BibTeX Cite

Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence. Main track. Pages 2840-2846.

https://doi.org/10.24963/ijcai.2018/394

Abstract

Software clone detection is an important problem for software maintenance and evolution and it has attracted lots of attentions. However, existing approaches ignore a fact that people would label the pairs of code fragments as \emph{clone} only if they happen to discover the clones while a huge number of undiscovered clone pairs and non-clone pairs are left unlabeled. In this paper, we argue that the clone detection task in the real-world should be formalized as a Positive-Unlabeled (PU) learning problem, and address this problem by proposing a novel positive and unlabeled learning approach, namely CDPU, to effectively detect software functional clones, i.e., pieces of codes with similar functionality but differing in both syntactical and lexical level, where adversarial training is employed to improve the robustness of the learned model to those non-clone pairs that look extremely similar but behave differently. Experiments on software clone detection benchmarks indicate that the proposed approach together with adversarial training outperforms the state-of-the-art approaches for software functional clone detection.

  1. [Baker, 1995] Brenda S. Baker. On finding duplication and near-duplication in large software systems. In Proceedings of the 2nd Working Conference on Reverse Engineering, pages 86-95, Toronto, Canada, 1995.
  2. [Brixtel et al., 2010] Romain Brixtel, Mathieu Fontaine, Boris Lesner, Cyril Bazin, and Romain Robbes. Language-independent clone detection applied to plagia- rism detection. In Proceedings of the 10th IEEE Interna- tional Working Conference on Source Code Analysis and Manipulation, pages 77-86, Timisoara, Romania, 2010.
  3. [du Plessis et al., 2015] Marthinus Christoffel du Plessis, Gang Niu, and Masashi Sugiyama. Convex formulation for learning from positive and unlabeled data. In Pro- ceedings of the 32nd International Conference on Machine Learning, pages 1386-1394, Lille, France, 2015.
  4. [Goodfellow et al., 2014] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014.
  5. [Goodfellow et al., 2015] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harness- ing adversarial examples. International conference on learning representations, 2015.
  6. [Jiang et al., 2007] Lingxiao Jiang, Ghassan Misherghi, Zhendong Su, and Stéphane Glondu. DECKARD: scal- able and accurate tree-based detection of code clones. In Proceedings of the 29th International Conference on Soft- ware Engineering, pages 96-105, Minneapolis, MN, USA, 2007.
  7. [Kamiya et al., 2002] Toshihiro Kamiya, Shinji Kusumoto, and Katsuro Inoue. Ccfinder: A multilinguistic token- based code clone detection system for large scale source code. IEEE Transactions on Software Engineering, 28(7):654-670, 2002.
  8. [Liu et al., 2002] Bing Liu, Wee Sun Lee, Philip S. Yu, and Xiaoli Li. Partially supervised classification of text doc- uments. In Proceedings of the 19th International Confer- ence on Machine Learning, pages 387-394, Sydney, Aus- tralia, 2002.
  9. [Miyato et al., 2016] Takeru Miyato, Andrew M Dai, and Ian J Goodfellow. Adversarial training methods for semi- supervised text classification. arXiv: Machine Learning, 1, 2016.
  10. [Mou et al., 2016] Lili Mou, Ge Li, Lu Zhang, Tao Wang, and Zhi Jin. Convolutional neural networks over tree struc- tures for programming language processing. In Proceed- ings of the 13th AAAI Conference on Artificial Intelligence, pages 1287-1293, Phoenix, Arizona, USA., 2016.
  11. [Roy and Cordy, 2007] Chanchal Kumar Roy and James R Cordy. A survey on software clone detection research. Queen's School of Computing TR, 541(115):64-68, 2007.
  12. [Roy and Cordy, 2008] Chanchal Kumar Roy and James R. Cordy. NICAD: accurate detection of near-miss inten- tional clones using flexible pretty-printing and code nor- malization. In Proceedings of the 16th IEEE International Conference on Program Comprehension, pages 172-181, Amsterdam, The Netherlands, 2008.
  13. [Sajnani et al., 2016] Hitesh Sajnani, Vaibhav Saini, Jeffrey Svajlenko, Chanchal K. Roy, and Cristina V. Lopes. Sourcerercc: scaling code clone detection to big-code. In Proceedings of the 38th International Conference on Soft- ware Engineering, pages 1157-1168, Austin, TX, USA, 2016.
  14. [Sakai et al., 2017] Tomoya Sakai, Marthinus Christoffel du Plessis, Gang Niu, and Masashi Sugiyama. Semi- supervised classification based on classification from pos- itive and unlabeled data. In Proceedings of the 34th Inter- national Conference on Machine Learning, pages 2998- 3006, Sydney, NSW, Australia, 2017.
  15. [Socher et al., 2011] Richard Socher, Jeffrey Pennington, Eric H. Huang, Andrew Y. Ng, and Christopher D. Man- ning. Semi-supervised recursive autoencoders for predict- ing sentiment distributions. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pages 151-161, Edinburgh, UK, 2011.
  16. [Svajlenko et al., 2014] Jeffrey Svajlenko, Judith F. Islam, Iman Keivanloo, Chanchal Kumar Roy, and Moham- mad Mamun Mia. Towards a big data curated bench- mark of inter-project code clones. In 30th IEEE Inter- national Conference on Software Maintenance and Evo- lution, pages 476-480, Victoria, BC, Canada, 2014.
  17. [Wei and Li, 2017] Huihui Wei and Ming Li. Supervised deep features for software functional clone detection by exploiting lexical and syntactical information in source code. In Proceedings of the 26th International Joint Con- ference on Artificial Intelligence, pages 3034-3040, Mel- bourne, Australia, 2017. IJCAI
  18. [White et al., 2016] Martin White, Michele Tufano, Christo- pher Vendome, and Denys Poshyvanyk. Deep learning code fragments for code clone detection. In Proceedings of the 31st IEEE/ACM International Conference on Au- tomated Software Engineering, pages 87-98, Singapore, 2016.
  19. [Xie and Li, 2018] Zheng Xie and Ming Li. Semi-supervised auc optimization without guessing labels of unlabeled data. In Proceedings of the 32nd AAAI Conference on Ar- tificial Intelligence, New Orleans, LA, 2018.
  20. [Zaremba and Sutskever, 2014] Wojciech Zaremba and Ilya Sutskever. Learning to execute. CoRR, abs/1410.4615, 2014.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards