Mining Key Classes in Java Projects by Examining a Very Small Number of Classes: A Complex Network-Based Approach

Key classes have become excellent starting points for developers to understand unknown software systems. Up to now, a variety of approaches have been proposed to mine key classes in a software project. Many of them are based on a network representation (namely, software networks) of the software pro...

Full description

Bibliographic Details
Main Authors: Hao Li, Tian Wang, Weifeng Pan, Muchou Wang, Chunlai Chai, Pengyu Chen, Jiale Wang, Jing Wang
Format: Article
Language:English
Published: IEEE 2021-01-01
Series:IEEE Access
Subjects:
Online Access:https://ieeexplore.ieee.org/document/9351963/
id doaj-026653beaeaf44bcba832a95e417b147
record_format Article
spelling doaj-026653beaeaf44bcba832a95e417b1472021-03-30T15:23:48ZengIEEEIEEE Access2169-35362021-01-019280762808810.1109/ACCESS.2021.30584509351963Mining Key Classes in Java Projects by Examining a Very Small Number of Classes: A Complex Network-Based ApproachHao Li0https://orcid.org/0000-0002-5240-7959Tian Wang1Weifeng Pan2https://orcid.org/0000-0001-6355-1385Muchou Wang3Chunlai Chai4Pengyu Chen5Jiale Wang6Jing Wang7School of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou, ChinaWenzhou University Library, Wenzhou University, Wenzhou, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou, ChinaZhuoyue Honors College, Hangzhou Dianzi University, Hangzhou, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou, ChinaSchool of Software and Communication Engineering, Jiangxi University of Finance and Economics, Nanchang, ChinaKey classes have become excellent starting points for developers to understand unknown software systems. Up to now, a variety of approaches have been proposed to mine key classes in a software project. Many of them are based on a network representation (namely, software networks) of the software projects. However, the software networks they used are usually un-weighted and un-directed, which is not consistent with the reality in a real software project where the coupling actually has direction and strength. Worse still, the number of key class candidates returned by existing approaches is usually very large. Thus, it is usually infeasible for developers to start the comprehension process from these classes, especially when there are tight time and resource constraints. To tackle these problems, in this paper, we propose an approach named MinClass, to Mine key Classes in Java projects by examining a very small number of classes. First, the software structure at the class level is represented by a weighted directed software network, which considers both the coupling strength and direction between every pair of classes. Second, we propose a new metric, OSE (One-order Structural Entropy), and use it to calculate the importance of each class in the system. Finally, we sort classes in descending order according to their OSE values, and a small number of top-ranked classes are treated as the key class candidates identified by MinClass. Experiments are performed on six open-source Java projects, and comparison studies with other eight state-of-the-art approaches are also performed. Results show that, although no one method performs best in all software systems, MinClass is the most promising one. It performs best in the whole set of software systems according to the average ranking of the Friedman test. Thus, MinClass is a valuable technique that can be used to mine the key classes.https://ieeexplore.ieee.org/document/9351963/Complex networkkey classesstatic analysisprogram comprehensions
collection DOAJ
language English
format Article
sources DOAJ
author Hao Li
Tian Wang
Weifeng Pan
Muchou Wang
Chunlai Chai
Pengyu Chen
Jiale Wang
Jing Wang
spellingShingle Hao Li
Tian Wang
Weifeng Pan
Muchou Wang
Chunlai Chai
Pengyu Chen
Jiale Wang
Jing Wang
Mining Key Classes in Java Projects by Examining a Very Small Number of Classes: A Complex Network-Based Approach
IEEE Access
Complex network
key classes
static analysis
program comprehensions
author_facet Hao Li
Tian Wang
Weifeng Pan
Muchou Wang
Chunlai Chai
Pengyu Chen
Jiale Wang
Jing Wang
author_sort Hao Li
title Mining Key Classes in Java Projects by Examining a Very Small Number of Classes: A Complex Network-Based Approach
title_short Mining Key Classes in Java Projects by Examining a Very Small Number of Classes: A Complex Network-Based Approach
title_full Mining Key Classes in Java Projects by Examining a Very Small Number of Classes: A Complex Network-Based Approach
title_fullStr Mining Key Classes in Java Projects by Examining a Very Small Number of Classes: A Complex Network-Based Approach
title_full_unstemmed Mining Key Classes in Java Projects by Examining a Very Small Number of Classes: A Complex Network-Based Approach
title_sort mining key classes in java projects by examining a very small number of classes: a complex network-based approach
publisher IEEE
series IEEE Access
issn 2169-3536
publishDate 2021-01-01
description Key classes have become excellent starting points for developers to understand unknown software systems. Up to now, a variety of approaches have been proposed to mine key classes in a software project. Many of them are based on a network representation (namely, software networks) of the software projects. However, the software networks they used are usually un-weighted and un-directed, which is not consistent with the reality in a real software project where the coupling actually has direction and strength. Worse still, the number of key class candidates returned by existing approaches is usually very large. Thus, it is usually infeasible for developers to start the comprehension process from these classes, especially when there are tight time and resource constraints. To tackle these problems, in this paper, we propose an approach named MinClass, to Mine key Classes in Java projects by examining a very small number of classes. First, the software structure at the class level is represented by a weighted directed software network, which considers both the coupling strength and direction between every pair of classes. Second, we propose a new metric, OSE (One-order Structural Entropy), and use it to calculate the importance of each class in the system. Finally, we sort classes in descending order according to their OSE values, and a small number of top-ranked classes are treated as the key class candidates identified by MinClass. Experiments are performed on six open-source Java projects, and comparison studies with other eight state-of-the-art approaches are also performed. Results show that, although no one method performs best in all software systems, MinClass is the most promising one. It performs best in the whole set of software systems according to the average ranking of the Friedman test. Thus, MinClass is a valuable technique that can be used to mine the key classes.
topic Complex network
key classes
static analysis
program comprehensions
url https://ieeexplore.ieee.org/document/9351963/
work_keys_str_mv AT haoli miningkeyclassesinjavaprojectsbyexaminingaverysmallnumberofclassesacomplexnetworkbasedapproach
AT tianwang miningkeyclassesinjavaprojectsbyexaminingaverysmallnumberofclassesacomplexnetworkbasedapproach
AT weifengpan miningkeyclassesinjavaprojectsbyexaminingaverysmallnumberofclassesacomplexnetworkbasedapproach
AT muchouwang miningkeyclassesinjavaprojectsbyexaminingaverysmallnumberofclassesacomplexnetworkbasedapproach
AT chunlaichai miningkeyclassesinjavaprojectsbyexaminingaverysmallnumberofclassesacomplexnetworkbasedapproach
AT pengyuchen miningkeyclassesinjavaprojectsbyexaminingaverysmallnumberofclassesacomplexnetworkbasedapproach
AT jialewang miningkeyclassesinjavaprojectsbyexaminingaverysmallnumberofclassesacomplexnetworkbasedapproach
AT jingwang miningkeyclassesinjavaprojectsbyexaminingaverysmallnumberofclassesacomplexnetworkbasedapproach
_version_ 1724179483244625920