Abstract:Abstract-Interfaces are widely used in Java applications as central design elements for modular programming to increase program reusability and to ease maintainability of software systems. Despite the importance of interfaces and a considerable research effort that has investigated code quality and concrete classes' design, few works have investigated interfaces' design. In this paper, we empirically study interfaces' design and its impact on the design quality of implementing classes (i.e., class cohesion) an… Show more
“…These results, together with Martin's insights [1] and results of previous studies [3], [4], motivated us to investigate and develop an approach to refactor fat APIs using the ISP.…”
Section: Client3mentioning
confidence: 93%
“…In 2013, Abdeen et al [3] investigated empirically the impact of interfaces' quality on the quality of implementing classes. Their results show that violations of the ISP lead to degraded cohesion of the classes that implement fat interfaces.…”
Section: Related Workmentioning
confidence: 99%
“…First, in our previous work [2] we showed that such interfaces are more change-prone than nonfat interfaces. Next, Abdeen et al [3] proved that violations of the ISP lead to degraded cohesion of the components coupled to fat interfaces. Finally, Yamashita et al [4] showed that changes to fat interfaces result in a larger ripple effect.…”
Section: Introductionmentioning
confidence: 99%
“…We measure the compliance with the ISP of an interface through the Interface Cohesion Metric (IUC) as in [2], [3]. To apply the ISP we propose a multiobjective genetic algorithm that, based on the clients' usage of a fat interface, infers the interfaces into which it should be split to conform to the ISP and, hence, with higher IUC values.…”
Abstract-Recent studies have shown that the violation of the Interface Segregation Principle (ISP) is critical for maintaining and evolving software systems. Fat interfaces (i.e., interfaces violating the ISP) change more frequently and degrade the quality of the components coupled to them. According to the ISP the interfaces' design should force no client to depend on methods it does not invoke. Fat interfaces should be split into smaller interfaces exposing only the methods invoked by groups of clients. However, applying the ISP is a challenging task when fat interfaces are invoked differently by many clients.In this paper, we formulate the problem of applying the ISP as a multi-objective clustering problem and we propose a genetic algorithm to solve it. We evaluate the capability of the proposed genetic algorithm with 42,318 public Java APIs whose clients' usage has been mined from the Maven repository. The results of this study show that the genetic algorithm outperforms other search based approaches (i.e., random and simulated annealing approaches) in splitting the APIs according to the ISP.
“…These results, together with Martin's insights [1] and results of previous studies [3], [4], motivated us to investigate and develop an approach to refactor fat APIs using the ISP.…”
Section: Client3mentioning
confidence: 93%
“…In 2013, Abdeen et al [3] investigated empirically the impact of interfaces' quality on the quality of implementing classes. Their results show that violations of the ISP lead to degraded cohesion of the classes that implement fat interfaces.…”
Section: Related Workmentioning
confidence: 99%
“…First, in our previous work [2] we showed that such interfaces are more change-prone than nonfat interfaces. Next, Abdeen et al [3] proved that violations of the ISP lead to degraded cohesion of the components coupled to fat interfaces. Finally, Yamashita et al [4] showed that changes to fat interfaces result in a larger ripple effect.…”
Section: Introductionmentioning
confidence: 99%
“…We measure the compliance with the ISP of an interface through the Interface Cohesion Metric (IUC) as in [2], [3]. To apply the ISP we propose a multiobjective genetic algorithm that, based on the clients' usage of a fat interface, infers the interfaces into which it should be split to conform to the ISP and, hence, with higher IUC values.…”
Abstract-Recent studies have shown that the violation of the Interface Segregation Principle (ISP) is critical for maintaining and evolving software systems. Fat interfaces (i.e., interfaces violating the ISP) change more frequently and degrade the quality of the components coupled to them. According to the ISP the interfaces' design should force no client to depend on methods it does not invoke. Fat interfaces should be split into smaller interfaces exposing only the methods invoked by groups of clients. However, applying the ISP is a challenging task when fat interfaces are invoked differently by many clients.In this paper, we formulate the problem of applying the ISP as a multi-objective clustering problem and we propose a genetic algorithm to solve it. We evaluate the capability of the proposed genetic algorithm with 42,318 public Java APIs whose clients' usage has been mined from the Maven repository. The results of this study show that the genetic algorithm outperforms other search based approaches (i.e., random and simulated annealing approaches) in splitting the APIs according to the ISP.
“…To measure the cohesion of usage patterns, we use the Service Usage Cohesion Metric (SIUC), taken from Perepletchikov et al [17]. SIUC was recently used in [18] to measure the usage cohesion of interfaces in Java OO applications, where, like our definition of a usage pattern, an interface is defined as a group of method An API providing a graphical user interface (GUI) for Java programs AWT An API for providing a platform dependent graphical user interface (GUI) for a Java program …”
Software developers need to cope with complexity of Application Programming Interfaces (APIs) of external libraries or frameworks. However, typical APIs provide several thousands of methods to their client programs, and such large APIs are difficult to learn and use. An API method is generally used within client programs along with other methods of the API of interest. Despite this, co-usage relationships between API methods are often not documented. We propose a technique for mining Multi-Level API Usage Patterns (MLUP) to exhibit the co-usage relationships between methods of the API of interest across interfering usage scenarios. We detect multi-level usage patterns as distinct groups of API methods, where each group is uniformly used across variable client programs, independently of usage contexts. We evaluated our technique through the usage of four APIs having up to 22 client programs per API. For all the studied APIs, our technique was able to detect usage patterns that are, almost all, highly consistent and highly cohesive across a considerable variability of client programs.
A popular recommendation to programmers in object-oriented software is to "program to an interface, not an implementation" (PTI). Expected benefits include increased simplicity from abstraction, decreased dependency on implementations, and higher flexibility. Yet, interfaces must be immutable, excessive class hierarchies can be a form of complexity, and "speculative generality" is a known code smell. To advance the empirical knowledge of PTI, we conducted an empirical investigation that involves 126 Java projects on GitHub, aiming to measuring the decreased dependency benefits (in terms of cochange).
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citationsâcitations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.