{"title":"代码纳米模式检测使用深度学习","authors":"Anubhav Trivedi, J. Thakur, Atul Gupta","doi":"10.1145/3385032.3385050","DOIUrl":null,"url":null,"abstract":"Nano-patterns are the method-level code building blocks of the code which can reveal crucial information of the code. In this paper, we present some initial results of our investigation to detect nano-patterns in a Java code using a deep learning approach. For this purpose, first, we generated a method level tagged corpus for 15 nano-patterns using nine open source Java projects. Subsequently, the tagged corpus was used to train a Long Short-Term Memory (LSTM) network to predict the nano-patterns present in the Java code. Our deep learning model gave an average accuracy of 88.3% with an average precision of 74.4% and average recall of 78.3%.","PeriodicalId":382901,"journal":{"name":"Proceedings of the 13th Innovations in Software Engineering Conference on Formerly known as India Software Engineering Conference","volume":"12 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-02-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Code Nano-Pattern Detection using Deep Learning\",\"authors\":\"Anubhav Trivedi, J. Thakur, Atul Gupta\",\"doi\":\"10.1145/3385032.3385050\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Nano-patterns are the method-level code building blocks of the code which can reveal crucial information of the code. In this paper, we present some initial results of our investigation to detect nano-patterns in a Java code using a deep learning approach. For this purpose, first, we generated a method level tagged corpus for 15 nano-patterns using nine open source Java projects. Subsequently, the tagged corpus was used to train a Long Short-Term Memory (LSTM) network to predict the nano-patterns present in the Java code. Our deep learning model gave an average accuracy of 88.3% with an average precision of 74.4% and average recall of 78.3%.\",\"PeriodicalId\":382901,\"journal\":{\"name\":\"Proceedings of the 13th Innovations in Software Engineering Conference on Formerly known as India Software Engineering Conference\",\"volume\":\"12 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-02-27\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 13th Innovations in Software Engineering Conference on Formerly known as India Software Engineering Conference\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3385032.3385050\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 13th Innovations in Software Engineering Conference on Formerly known as India Software Engineering Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3385032.3385050","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Nano-patterns are the method-level code building blocks of the code which can reveal crucial information of the code. In this paper, we present some initial results of our investigation to detect nano-patterns in a Java code using a deep learning approach. For this purpose, first, we generated a method level tagged corpus for 15 nano-patterns using nine open source Java projects. Subsequently, the tagged corpus was used to train a Long Short-Term Memory (LSTM) network to predict the nano-patterns present in the Java code. Our deep learning model gave an average accuracy of 88.3% with an average precision of 74.4% and average recall of 78.3%.