{"type":"ScholarlyArticle","title":"Positive and Unlabeled Learning for Detecting Software Functional Clones with Adversarial Training","authors":[{"name":"Hui-Hui Wei","slug":"hui-hui-wei","given":"Hui-Hui","family":"Wei","affiliation":"National Key Laboratory for Novel Software Technology , Nanjing University Collaborative Innovation Center of Novel Software Technology and Industrialization Nanjing 210023 , China"},{"name":"Ming Li","slug":"ming-li","given":"Ming","family":"Li","affiliation":"National Key Laboratory for Novel Software Technology , Nanjing University Collaborative Innovation Center of Novel Software Technology and Industrialization Nanjing 210023 , China"}],"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.","doi":"10.24963/ijcai.2018/394","url":"https://ijcai.org/proceedings/2018/394","pdf":"https://ijcai.org/proceedings/2018/0394.pdf","markdown":"https://ijcai.org/proceedings/2018/394.md","bibtex":"https://ijcai.org/proceedings/2018/bibtex/394","volume":{"slug":"2018","title":"Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2018","url":"https://ijcai.org/proceedings/2018/","year":2018,"location":"Stockholm","dates":"13-19 July 2018","editors":"Jérôme Lang","isbn":"978-0-9992411-2-7","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2018"},"section":"Machine Learning","track":"Main track","number":394,"pages":{"first":2840,"last":2846},"keywords":["Machine Learning: Semi-Supervised Learning","Multidisciplinary Topics and Applications: Knowledge-based Software Engineering"],"videos":[],"references":[{"position":1,"raw":"[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.","title":"On finding duplication and near-duplication in large software systems","authors":"Brenda S Baker","year":"1995","venue":"Proceedings of the 2nd Working Conference on Reverse Engineering","doi":null,"url":null,"internal_url":null},{"position":2,"raw":"[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.","title":"Language-independent clone detection applied to plagiarism detection","authors":"Romain Brixtel, Mathieu Fontaine, Boris Lesner, Cyril Bazin, Romain Robbes","year":"2010","venue":"Proceedings of the 10th IEEE International Working Conference on Source Code Analysis and Manipulation","doi":null,"url":null,"internal_url":null},{"position":3,"raw":"[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.","title":"Convex formulation for learning from positive and unlabeled data","authors":"Marthinus Christoffel Du Plessis, Gang Niu, Masashi Sugiyama","year":"2015","venue":"Proceedings of the 32nd International Conference on Machine Learning","doi":null,"url":null,"internal_url":null},{"position":4,"raw":"[Goodfellow et al., 2014] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014.","title":"Explaining and harnessing adversarial examples","authors":"Ian J Goodfellow, Jonathon Shlens, Christian Szegedy","year":"2014","venue":null,"doi":null,"url":null,"internal_url":null},{"position":5,"raw":"[Goodfellow et al., 2015] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harness- ing adversarial examples. International conference on learning representations, 2015.","title":"Explaining and harnessing adversarial examples","authors":"Ian J Goodfellow, Jonathon Shlens, Christian Szegedy","year":"2015","venue":"International conference on learning representations","doi":null,"url":null,"internal_url":null},{"position":6,"raw":"[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.","title":"DECKARD: scalable and accurate tree-based detection of code clones","authors":"Jiang","year":"2007","venue":"Proceedings of the 29th International Conference on Software Engineering","doi":null,"url":null,"internal_url":null},{"position":7,"raw":"[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.","title":"Ccfinder: A multilinguistic tokenbased code clone detection system for large scale source code","authors":"Toshihiro Kamiya, Shinji Kusumoto, Katsuro Inoue","year":"2002","venue":"IEEE Transactions on Software Engineering","doi":null,"url":null,"internal_url":null},{"position":8,"raw":"[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.","title":"Partially supervised classification of text documents","authors":"Bing Liu, Wee Sun Lee, Philip S Yu, Xiaoli Li","year":"2002","venue":"Proceedings of the 19th International Conference on Machine Learning","doi":null,"url":null,"internal_url":null},{"position":9,"raw":"[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.","title":"Adversarial training methods for semisupervised text classification","authors":"Miyato","year":"2016","venue":"arXiv: Machine Learning","doi":null,"url":null,"internal_url":null},{"position":10,"raw":"[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.","title":"Convolutional neural networks over tree structures for programming language processing","authors":"Lili Mou, Ge Li, Lu Zhang, Tao Wang, Zhi Jin","year":"2016","venue":"Proceedings of the 13th AAAI Conference on Artificial Intelligence","doi":null,"url":null,"internal_url":null},{"position":11,"raw":"[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.","title":"A survey on software clone detection research","authors":"Chanchal Kumar, Roy, James R Cordy","year":"2007","venue":"Queen's School of Computing TR","doi":null,"url":null,"internal_url":null},{"position":12,"raw":"[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.","title":"NICAD: accurate detection of near-miss intentional clones using flexible pretty-printing and code normalization","authors":"Chanchal Kumar, Roy, James R Cordy","year":"2008","venue":"Proceedings of the 16th IEEE International Conference on Program Comprehension","doi":null,"url":null,"internal_url":null},{"position":13,"raw":"[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.","title":"Sourcerercc: scaling code clone detection to big-code","authors":"Hitesh Sajnani, Vaibhav Saini, Jeffrey Svajlenko, Chanchal K Roy, Cristina V Lopes","year":"2016","venue":"Proceedings of the 38th International Conference on Software Engineering","doi":null,"url":null,"internal_url":null},{"position":14,"raw":"[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.","title":"Semisupervised classification based on classification from positive and unlabeled data","authors":"Tomoya Sakai, Marthinus Christoffel Du Plessis, Gang Niu, Masashi Sugiyama","year":"2017","venue":"Proceedings of the 34th International Conference on Machine Learning","doi":null,"url":null,"internal_url":null},{"position":15,"raw":"[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.","title":"Manning. Semi-supervised recursive autoencoders for predicting sentiment distributions","authors":"Richard Socher, Jeffrey Pennington, Eric H Huang, Andrew Y Ng, Christopher D","year":"2011","venue":"Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing","doi":null,"url":null,"internal_url":null},{"position":16,"raw":"[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.","title":"Towards a big data curated benchmark of inter-project code clones","authors":"Jeffrey Svajlenko, Judith F Islam, Iman Keivanloo, Chanchal Kumar Roy, Mohammad Mamun, Mia","year":"2014","venue":"30th IEEE International Conference on Software Maintenance and Evolution","doi":null,"url":null,"internal_url":null},{"position":17,"raw":"[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.","title":"Supervised deep features for software functional clone detection by exploiting lexical and syntactical information in source code","authors":"Li ; ] Huihui Wei, Ming Wei, Li","year":"2017","venue":"Proceedings of the 26th International Joint Conference on Artificial Intelligence","doi":null,"url":null,"internal_url":"/proceedings/2017/423"},{"position":18,"raw":"[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.","title":"Deep learning code fragments for code clone detection","authors":"Martin White, Michele Tufano, Christopher Vendome, Denys Poshyvanyk","year":"2016","venue":"Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering","doi":null,"url":null,"internal_url":null},{"position":19,"raw":"[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.","title":"Semi-supervised auc optimization without guessing labels of unlabeled data","authors":"Zheng Xie, Ming Li","year":"2018","venue":"Proceedings of the 32nd AAAI Conference on Artificial Intelligence","doi":null,"url":null,"internal_url":null},{"position":20,"raw":"[Zaremba and Sutskever, 2014] Wojciech Zaremba and Ilya Sutskever. Learning to execute. CoRR, abs/1410.4615, 2014.","title":"Learning to execute","authors":"Wojciech Zaremba, Ilya Sutskever","year":"2014","venue":null,"doi":null,"url":null,"internal_url":null}],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}