{"title":"Java代码中隐藏家族型相关性的检测","authors":"Alin-Petru Roşu, Petru Florin Mihancea","doi":"10.1109/SCAM55253.2022.00022","DOIUrl":null,"url":null,"abstract":"Family polymorphism is an object-oriented programming feature which facilitates the definition of groups of classes (families) that are allowed to be used together while statically forbidding them to be mixed with classes outside their families. Unfortunately, this feature has not been yet adopted by mainstream industrial-strength programming languages. Consequently, in Java, the idea of non-mixable families is prone to be implemented in a statically unsafe fashion, affecting the programs' intelligibility. In order to support program comprehension, we present an approach to detect code fragments where types of references are correlated within a family; nonetheless, these correlations are hidden behind the references' declarations. We obtained promising results during the initial design and evaluation iterations, based on the analysis of a software system where the presence of families was previously reported.","PeriodicalId":138287,"journal":{"name":"2022 IEEE 22nd International Working Conference on Source Code Analysis and Manipulation (SCAM)","volume":"25 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Towards the Detection of Hidden Familial Type Correlations in Java Code\",\"authors\":\"Alin-Petru Roşu, Petru Florin Mihancea\",\"doi\":\"10.1109/SCAM55253.2022.00022\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Family polymorphism is an object-oriented programming feature which facilitates the definition of groups of classes (families) that are allowed to be used together while statically forbidding them to be mixed with classes outside their families. Unfortunately, this feature has not been yet adopted by mainstream industrial-strength programming languages. Consequently, in Java, the idea of non-mixable families is prone to be implemented in a statically unsafe fashion, affecting the programs' intelligibility. In order to support program comprehension, we present an approach to detect code fragments where types of references are correlated within a family; nonetheless, these correlations are hidden behind the references' declarations. We obtained promising results during the initial design and evaluation iterations, based on the analysis of a software system where the presence of families was previously reported.\",\"PeriodicalId\":138287,\"journal\":{\"name\":\"2022 IEEE 22nd International Working Conference on Source Code Analysis and Manipulation (SCAM)\",\"volume\":\"25 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-10-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 IEEE 22nd International Working Conference on Source Code Analysis and Manipulation (SCAM)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/SCAM55253.2022.00022\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE 22nd International Working Conference on Source Code Analysis and Manipulation (SCAM)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SCAM55253.2022.00022","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Towards the Detection of Hidden Familial Type Correlations in Java Code
Family polymorphism is an object-oriented programming feature which facilitates the definition of groups of classes (families) that are allowed to be used together while statically forbidding them to be mixed with classes outside their families. Unfortunately, this feature has not been yet adopted by mainstream industrial-strength programming languages. Consequently, in Java, the idea of non-mixable families is prone to be implemented in a statically unsafe fashion, affecting the programs' intelligibility. In order to support program comprehension, we present an approach to detect code fragments where types of references are correlated within a family; nonetheless, these correlations are hidden behind the references' declarations. We obtained promising results during the initial design and evaluation iterations, based on the analysis of a software system where the presence of families was previously reported.