A Framework for Measuring Java Couple Based on Program Slicing Technique
Li Bi · Chinese Journal of Computers · 2001
Object oriented software metrics is one of the important research directions in software engineering domain, and is widely used in software quality assurement,software testing, and software reuse, etc. Coupling and cohesiveness are two important properties in object oriented software metrics, and we can evaluate software module or system by measuring their coupling and cohesive properties. People usually use basic statistical or information flow method to measure object oriented properties to study object oriented metrics, such as basic metric, CK metrics and Aoki metrics etc, but there are many limitations in these basic methods. Especially, they are faulty in many facets. So we introduce a new measuring method more suitable for object oriented program in this paper. First, we study all coupling relationship existing in Java program source codes, and find that there are three kinds of coupling relationship, i.e., interact coupling, inheritance coupling and component coupling. We find it very suitable to study interact coupling by computing the program slices, so we establish measure equations by the number of elements in the join set or in the union set of the two slices. We measure coupling between two variables,two methods,two classes,or two pakages by computing program slices with respect to them. Then, a new framework based on program slicing technique is introduced to measure coupling in Java. Finally, a kind of more precise object oriented metric method than those based on information flow is obtained by measuring coupling relationship in object oriented programs.