Computer Science ›› 2024, Vol. 51 ›› Issue (11A): 230900121-10.doi: 10.11896/jsjkx.230900121

• Computer Software & Architecture • Previous Articles     Next Articles

Study on Information Enhancement Method of API Structural Pattern Based on EBRCG

ZHONG Linhui1, ZHU Yanxia1,2, HUANG Qixuan1, QU Qiaoqiao1, XIA Zihao1, ZHENG Yi1   

  1. 1 School of Computer Information Engineering,Jiangxi Normal University,Nanchang 330022,China
    2 Tongcheng Teachers College,Tongcheng,Anhui 231400,China
  • Online:2024-11-16 Published:2024-11-13
  • About author:ZHONG Linhui,born in 1974,Ph.D,associate professor,is a member of CCF(No.09772M).His main research interests include software architecture,software evolution,and maintenance.
    ZHENG Yi, born in 1974,master. His main research interests include computer system architecture and the development of software and hardware platforms for embedded systems.
  • Supported by:
    National Natural Science Foundation of China(62062039,61966017),Jiangxi Province Natural Science Foundation(20212BAB202017,20224BAB202013,20212BAB202018) and School Education Reform Project(JXSDJG2044).

Abstract: A method for enhancing API structural pattern information is proposed in response to issues such as lack of structural information and high redundancy in API call modes.The method is based on the extended branch-reserving call graph(EBRCG),which is used to represent method structural information in Java open source project source code.In the EBRCG,API call statements,branch statements(which treat if statements and all loop statements as branch statements),switch-case multi-branch statements,and exception statements are considered.The EBRCG pruning algorithm is proposed to obtain code structures for specific API call modes.Additionally,clustering and sorting methods are used to filter multiple code structure information for API call modes,and representative API call mode code structures are selected.To validate the effectiveness of this method,three sets of experiments are compared with the TextRank method.The results show that the proposed method can effectively obtain code structures for API call modes,more accurately describing API usage than the TextRank method.This method has certain research significance and provides a reference for software developers.

Key words: API invocation pattern, Extended branch-reserving call graph, Code structure, K-Means clustering

CLC Number: 

  • TP311
[1]DE ROOVER C,LÄMMEL R,PEK E.Multi-dimensional ex-ploration of api usage[C]//2013 21st International Conference on Program Comprehension(ICPC).IEEE,2013:152-161.
[2]LIZ,WU J Z,LI M S.Study on Key Issues in API Usage[J].Journal of Software,2018,29(6):1716-1738.
[3]KO A J,MYERS B A,AUNG H H.Six learning barriers in end-user programming systems[C]//2004 IEEE Symposium on Vi-sual Languages-Human Centric Computing.IEEE,2004:199-206.
[4]PARNAS D L,MADEY J,IGLEWSKIM.Precise documentation of well-structured programs[J].IEEE Transactions on Software Engineering,1994,20(12):948-976.
[5]ROBILLARD M P,DELINE R.A field study of API learning obstacles[J].Empirical Software Engineering,2011,16:703-732.
[6]LAZAR D,CHEN H,WANG X,et al.Why does cryptographic software fail? A case study and open problems[C]//Proceedings of 5th Asia-Pacific Workshop on Systems.2014:1-7.
[7]EGELE M,BRUMLEY D,FRATANTONIO Y,et al.An em-pirical study of cryptographic misuse in android applications[C]//Proceedings of the 2013 ACM SIGSAC conference on Computer & communications security.2013:73-84.
[8]GEORGIEV M,IYENGAR S,JANA S,et al.The most dangerous code in the world:validating SSL certificates in non-browser software[C]//Proceedings of the 2012 ACM Conference on Computer and Communications Security.2012:38-49.
[9]FAHL S,HARBACH M,PERLH,et al.Rethinking SSL development in an appified world[C]//Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security.2013:49-60.
[10]ROBILLARD M P,BODDEN E,KAWRYKOWD,et al.Auto-mated API property inference techniques[J].IEEE Transactions on Software Engineering,2012,39(5):613-637.
[11]NIU H,KEIVANLOO I,ZOU Y.API usage pattern recommendation for software development[J].Journal of Systems and Software,2017,129:127-139.
[12]WANG J,DANG Y,ZHANG H,et al.Mining succinct andhigh-coverage API usage patterns from source code[C]//2013 10th Working Conference on Mining Software Repositories(MSR).IEEE,2013:319-328.
[13]ZHONG H,XIE T,ZHANG L,et al.MAPO:Mining and recommending API usage patterns[C]//23rd European Conference(ECOOP 2009).Genoa,Italy,Springer Berlin Heidelberg,2009:318-343.
[14]FOWKES J,SUTTON C.Parameter-free probabilistic API mi-ning across GitHub[C]//Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering.2016:254-265.
[15]ACHARYA M,XIE T,PEI J,et al.Mining API patterns as partial orders from source code:from usage scenarios to specifications[C]//Proceedings of the the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering.2007:25-34.
[16]ZHAO W,ZHANG L,LIU Y,et al.SNIAFL:towards a static non-interactive approach to feature location[C]//International Conference of Software Engineering.ICSE,2004.
[17]TREUDE C,ROBILLARD M P.Augmenting API documenta-tion with insights from stack overflow[C]//Proceedings of the 38th International Conference on Software Engineering.2016:392-403.
[18]WU Y C,MAR L W,JIAUH C.Codocent:Support API usage with code example and API documentation[C]//2010 Fifth International Conference on Software Engineering Advances.IEEE,2010:135-140.
[19]HOFFMAN D,STROOPER P.API documentation with execut-able examples[J].Journal of Systems and Software,2003,66(2):143-156.
[20]STYLOS J,FAULRING A,YANG Z,et al.Improving API do-cumentation using API usage information[C]//2009 IEEE Symposium on Visual Languages and Human-Centric Computing(VL/HCC).IEEE,2009:119-126.
[21]SUBRAMANIAN S,INOZEMTSEVA L,HOLMES R.LiveAPI documentation[C]//Proceedings of the 36th International Conference on Software Engineering.2014:643-652.
[22]CHEN C,ZHANG K.Who asked what:Integrating crowd-sourced faqs into api documentation[C]//Companion Proceedings of the 36th International Conference on Software Engineering.2014:456-459.
[23]KIM J,LEE S,HWANGS W,et al.Enriching documents with examples:A corpus mining approach[J].ACM Transactions on Information Systems(TOIS),2013,31(1):1-27.
[24]MOVER S,SANKARANARAYANAN S,OLSENR B P,et al.Mining framework usage graphs from app corpora[C]//2018 IEEE 25th International Conference on Software Analysis,Evolution and Reengineering(SANER).IEEE,2018:277-289.
[25]ZHANG J,JIANG H,REN Z,et al.Enriching API documentation with code samples and usage scenarios from crowd know-ledge[J].IEEE Transactions on Software Engineering,2019,47(6):1299-1314.
[26]FENG X,YANG Q H.The Collaborative Filtering Algorithmfor Information Enhancement Combined with Knowledge Graph[J].Journal of Jiangxi Normal University:Natural Science Edition,2022,46(4):386-393.(in Chinese)
冯祥,杨庆红.结合知识图谱进行信息强化的协同过滤算法[J].江西师范大学学报(自然科学版) ,2022,46(4):386-393.
[27]HARTIGAN J A,WONGM A.Algorithm AS 136:A k-meansclustering algorithm[J].Journal of the Royal Statistical Society.Series C(Applied Statistics),1979,28(1):100-108.
[28]SALVADOR S,CHAN P.Determining the number of clusters/segments in hierarchical clustering/segmentation algorithms[C]//16th IEEE International Conference on Tools with Artificial Intelligence.IEEE,2004:576-584.
[29]ROUSSEEUW P J.Silhouettes:a graphical aid to the interpretation and validation of cluster analysis[J].Journal of Computational and Applied Mathematics,1987,20:53-65.
[30]KIM J,LEE S,HWANGS W,et al.Enriching documents with examples:A corpus mining approach[J].ACM Transactions on Information Systems(TOIS),2013,31(1):1-27.
[31]ZHONG L H,QI J,YE H T,et al.The Study on the Method for Matching the Software Evolutionary Style Based on Multi-Dimensional Evolutionary Tree[J].Journal of Jiangxi Normal University:Natural Science Edition,2021,45(1):55-59.(in Chinese)
钟林辉,齐杰,叶海涛,等.基于多维属性演化树的软件演化风格匹配方法研究[J].江西师范大学学报(自然科学版),2021,45(1):55-59.
[1] XU Shou-kun, NI Chu-han, JI Chen-chen, LI Ning. Image Caption of Safety Helmets Wearing in Construction Scene Based on YOLOv3 [J]. Computer Science, 2020, 47(8): 233-240.
[2] YAO Li-shuang, LIU Dan, PEI Zuo-fei, WANG Yun-feng. Real-time Network Traffic Prediction Model Based on EMD and Clustering [J]. Computer Science, 2020, 47(11A): 316-320.
[3] HOU Yuan-yuan, HE Ru-han, LI Min, CHEN Jia. Clothing Image Retrieval Method Combining Convolutional Neural Network Multi-layerFeature Fusion and K-Means Clustering [J]. Computer Science, 2019, 46(6A): 215-221.
[4] HU Meng-qi, ZHENG Ji-ming. Blind Image Identification Algorithm Based on HSV Quantized Color Feature and SURF Detector [J]. Computer Science, 2019, 46(11A): 268-272.
[5] BAO Zhi-qiang, ZHAO Yuan-yuan, ZHAO Yan, HU Xiao-tian, GAO Fan. Segmentation of Baidu Takeaway Customer Based on RFA Model and Cluster Analysis [J]. Computer Science, 2018, 45(11A): 436-438.
[6] LI Peng-qing, LI Yang-ding, DENG Xue-lian, LI Yong-gang, FANG Yue. Spectral Clustering Algorithm Based on SimRank Score [J]. Computer Science, 2018, 45(11A): 458-461.
[7] WANG Ping-xin, LIU Qiang, YANG Xi-bei and MI Ju-sheng. Three-way Clustering Analysis Based on Dynamic Neighborhood [J]. Computer Science, 2018, 45(1): 62-66.
[8] HAI Mo and ZHANG You. Performance Comparison of Clustering Algorithms in Spark [J]. Computer Science, 2017, 44(Z6): 414-418.
[9] WANG Hong-jie and SHI Yan-wen. K-Means Clustering Algorithm Based on Initial Center Optimization and Feature Weighted [J]. Computer Science, 2017, 44(Z11): 457-459.
[10] FU Kun, WU Yi-jian, PENG Xin and ZHAO Wen-yun. Feature Location Method Based on Sub-graph Searching [J]. Computer Science, 2017, 44(4): 56-59.
[11] LI Wei-jiang, WANG Zhen-zhen and YU Zheng-tao. Micro-blog Topic Detection Method Integrating BTM Topic Model and K-means Clustering [J]. Computer Science, 2017, 44(2): 257-261.
[12] GAO Man, HAN Yong, CHEN Ge, ZHANG Xiao-lei and LI Jie. Computational Model of Average Travel Speed Based on K-means Algorithms [J]. Computer Science, 2016, 43(Z6): 422-424.
[13] ZHANG Qun, WANG Hong-jun and WANG Lun-wen. Short Text Clustering Algorithm Combined with Context Semantic Information [J]. Computer Science, 2016, 43(Z11): 443-446.
[14] LI Meng-jie, XIE Qiang and DING Qiu-lin. Orthogonal Non-negative Matrix Factorization for K-means Clustering [J]. Computer Science, 2016, 43(5): 204-208.
[15] WANG Long, WANG Jia-lun, CHENG Zhuan-li, LI Ran and ZHANG Yin. Personalized Medicine Recommendation Based on Tensor Decomposition [J]. Computer Science, 2015, 42(5): 225-229.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!