Implementation of Dynamic Coupling Measurement of Distributed Object Oriented Software Based On Trace Events
Implementation of Dynamic Coupling Measurement of Distributed Object Oriented Software Based On Trace Events
6, December 2011
IMPLEMENTATION OF DYNAMIC COUPLING MEASUREMENT OF DISTRIBUTED OBJECT ORIENTED SOFTWARE BASED ON TRACE EVENTS
S.Babu*, R.M.S.Parvathi**
* Research Scalar, Anna University of Technology, Coimbatore. **Principal, Sengunthar College of engineering for women, Tiruchengode, Namakkal
[email protected] [email protected]
ABSTRACT:
Software metrics are increasingly playing a central role in the planning and control of software development projects. Coupling measures have important applications in software development and maintenance. Existing literature on software metrics is mainly focused on centralized systems, while work in the area of distributed systems, particularly in service-oriented systems, is scarce. Distributed systems with service oriented components are even more heterogeneous networking and execution environment. Traditional coupling measures take into account only static couplings. They do not account for dynamic couplings due to polymorphism and may significantly underestimate the complexity of software and misjudge the need for code inspection, testing and debugging. This is expected to result in poor predictive accuracy of the quality models in distributed Object Oriented systems that utilize static coupling measurements. In order to overcome these issues, we propose a hybrid model in Distributed Object Oriented Software for measure the coupling dynamically. In the proposed method, there are three steps such as Instrumentation process, Post processing and Coupling measurement. Initially the instrumentation process is done. In this process the instrumented JVM that has been modified to trace method calls. During this process, three trace files are created namely .prf, .clp, .svp. In the second step, the information in these file are merged. At the end of this step, the merged detailed trace of each JVM contains pointers to the merged trace files of the other JVM such that the path of every remote call from the client to the server can be uniquely identified. Finally, the coupling metrics are measured dynamically. The implementation results show that the proposed system will effectively measure the coupling metrics dynamically.
Keywords:
Distributed Object Oriented (DOO) Systems, Software Engineering, Dynamic coupling, Static coupling, Instrumentation, Trace events.
1. INTRODUCTION
Software engineering is an engineering discipline that is concerned with all aspects of software production. Software products consist of developed programs and associated documentation.
DOI : 10.5121/ijcsea.2011.1602 11
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
Essential product attributes are maintainability, dependability, efficiency and usability. The software process consists of activities that are involved in developing software products. Basic activities are software specification, development, validation and evolution. Methods are organized ways of producing software. They include suggestions for the process to be followed, the notations to be used, rules governing the system descriptions which are produced and design guidelines. Object-oriented technology is built upon a sound engineering foundation, whose elements are collectively called the object model [1]. This model encompasses many useful software construction features such as abstraction, encapsulation, modularity, inheritance, typing, genericity and dynamic binding. Therefore, object model is useful for understanding problems, communicating with application experts and modelling complex enterprises into a software design [2]. This technology also helps to promote software reusability, maintainability, reliability and performance [3].The popularity of the internet coupled with advances in local area network and high speed network technologies have introduced many new distributed applications. Examples include software in the area of computer supported collaborative work, airline and hotel reservation systems, and banking systems - to name just a few. Object-oriented techniques are often used to cope with the complexity of developing these software systems which have come to be known as distributed object-oriented software systems (DOOSS) [4]. Distributed systems have also become increasingly common as more and more organizations use networks to share resources, enhance communication and increase performance. Examples of these systems range from the Internet, to workstations in a local area network within a building, to processors within a single multiprocessor [5]. In a distributed object-oriented application, classes can run on a separate computer within a network system. So, they should be distributed efficiently among different nodes. [6]. A distributed OO application consists mainly of a set of interacting objects; each one runs on a separate computer within a network system. There have been a large number of projects related to the use of object-oriented approaches for the design of problem solving environments for complex applications in various scientific fields [7]. The object model and distributed technologies are being amalgamated [8]. The advantage is obvious: the complexity and dependencies of the entities can make use of the object model in a distributed system to break down the intensive design process into efficient constructs. Many of the concepts of object-oriented programming are currently finding widespread application in loosely coupled distributed systems. Coupling measures have important applications in software development and maintenance. They are used to help developers, testers and maintainers reason about software complexity and software quality attributes. The current research on modelling and measuring the relationships among software components through coupling analysis is insufficient. Coupling measures are incomplete in their precision of definition and quantitative computation. In particular, current coupling measures do not reflect the differences in and the connections between design level relationships and implementation level connections. Hence, the way coupling is used to solve problems is not satisfactory. Traditional coupling measures take into account onlystatic couplings. They do not account for dynamic couplings due to polymorphism and may significantly underestimate the complexity of software and misjudge the need for code inspection, testing and debugging. Due to inheritance, the class of the object sending or receiving a message may be different from the class implementing the corresponding method. As the use of object-oriented design and programming matures in industry, we observe that inheritance and polymorphism are used more frequently to improve internal reuse in a system and facilitate maintenance. Though no formal survey exists on this matter, this is visible when
12
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
analyzing the increasing number of open source projects, application frameworks, and libraries. The problem is that the static, coupling measures that represent the core indicators of most reported quality models lose precision as more intensive use of inheritance and dynamic binding occurs. This is expected to result in poorer predictive accuracy of the quality models that utilize static coupling measurement. Static analysis cannot capture all the dimensions of object-level coupling, as features of object-oriented programming such as polymorphism, dynamic binding and inheritance in evaluating the run-time behaviour of an application [9]. As per the previous research and experiments, dynamic coupling is more precise than static coupling for systems with unused code [10]. In the proposed system, we are going to calculate the coupling measures dynamically in a Distributed Object Oriented (DOO) system. Dynamic coupling in DOO system means, calculating the coupling dynamically on both clients and server. The rest of the paper is organized as follows: Section 2 deals with some of the recent research works related to the proposed technique. Section 3 explains the Distributed Object Oriented Systems. Section 4 describes the proposed technique for coupling measurement with all necessary mathematical formulations and figures. Section 5 discusses about the experimentation and evaluation results with necessary tables and graphs and section 6 concludes the paper.
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
corresponding to those associations. In other words, in the context of our coupling measurement, method invocations are linked to two distinct class instances and two distinct method instances and messages involve two distinct objects. As expected, method invocations between classes are differentiated from messages between objects. A method name and signature uniquely identifies a method in the context of a specific class and a method invocation must be clearly linked to a method. This is why MethInvocation has associations with both Class and Method. 2.1.1 Sets The first step is to define the basic sets on which to build our definitions. These sets are derived from the data model in Fig.1. C: Set of classes in the system. C can be partitioned into the subsets of application classes (AC), library classes (LC), and framework classes (FC). Some of these subsets may be empty, C= AC LC FC and AC LC FC = ;. Distinguishing such subsets may be important for defining the scope of measurement, as discussed above. O: Set of objects instantiated by the system while executing all scenarios of all use cases (including exceptional use cases, e.g., treating error conditions, which are usually modeled as use cases extending base use cases). M: Set of methods in the system (as identified by their signature). . Lines of code are defined on the set of natural numbers (N).
Fig.1. Class diagram capturing a data model of the dynamic analysis information.
14
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
2.1.2 Relations We now introduce mathematical relations on the sets that are fundamental to the definitions of our measures D and A are relations onto C( C x C). D is the set of descendent classes of a class and A is the set of ancestors of a class. ME is the set of possible messages in the system: ME O x M x N x O x M. Indicated by the domain of ME, a message is described by a source object and method sending the message, a line of code (N), and a target object and method. Note that the sending of a message may not only correspond to a method invocation, but also to the sending of a signal. The message is then asynchronous and on receipt of the signal, the target object triggers the execution of the target method. In Java, an active object (with its own thread of control) would typically have a run() method reading from a queue of signal objects and invoke the appropriate method after reading the next signal in the queue. IV is the set of possible method invocations in the system: IV M x C x M x C. An invocation is characterized by the invoking class and method and the class and method being invoked. Other binary relations will be used in the text and their semantics can be easily derived from their domain and are denoted RDomain. For example, RMC M x C refers to methods being defined in classes, a binary relation from the set of methods to the set of classes. 2.1.3 Consistency Rule The relations IV and ME play a fundamental role in all our measures. In practice, an analysis of sequence diagrams or a dynamic analysis of the code allows us to construct ME. From that information, IV must be derived, but this is not trivial as polymorphism and dynamic binding tend to complicate the mapping. The consistency rule below specifies the dependencies between the two relations and can be used to develop algorithms that derive IV from ME. ((o1c1),(o2c2) Roc) (1N) (o1m1|o2m2) ME (c3A (c1) {c1}, c4 A(c2) {c2}) ((m1c3) RMC ((c5A (c1) {c3})(m1c5) RMC c5 A(c3))) ((m2c4) RMC ) ((c6 A (c2) {c4}) (m2c6) RMC c6 A (c4))) (m1c3, m2c4) IV. 2.1.4 Working Example We now use a small working example, as shown in Fig. 2, to illustrate the definitions above. Though it is assumed that our measures are collected through static and dynamic analysis of code, we use UML to describe a fictitious example, because it is more legible than pseudo code. This example is designed to illustrate the subtleties arising from polymorphism and dynamic binding. Other aspects, such as method signatures, have been intentionally kept simple to focus on polymorphism and dynamic binding.
15
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
The following sets can be derived from Fig. 2: C = {c1, c2, c3, c4, c5} M = {m1, m2, m3} RMC = {(m1, c1), (m2, c2), (m3, c3)}: In order to derive other relevant sets and relations, let us introduce the sequence diagrams in Fig. 3, where each message is numbered. As our fictitious example is represented with UML diagrams, objects are referred to by using the sequence diagram number where they appear and their own identification number (i.e., SDi:objectid). Similarly, we denote the line of code of the method invocation in message tuples as l (SDi:messageid). In the example, we assume that the line of code of the method invocations m3 in messages SD1:1:1, SD1:1:2, and SD1:1:3 are different. Furthermore, since the sequence diagrams do not specify the sender object, source class and source method of the method invocations m1 in messages SD1:1 and SD2:1, the example sets derived below account for only the four (completely specified) messages SD1:1:1, SD1:1:2, SD1:1:3, and SD2:1:1: O = {SD1 : 1; SD1 : 2; SD1 : 3; SD2 : 1; SD2 : 2} ROC = {(SD1 : 1; c1) ; (SD1 : 2; c4) ; (SD1 : 3; c5) ; (SD2 : 1; c1) ; (SD2 : 2; c2)} ME = {(SD1 : 1; m1; l(SD1 : 1:1) ; SD1 : 2; m3); (SD1 : 1; m1; l(SD1 : 1:2) ; SD1 : 3; m3); (SD1 : 1; m1; l(SD1 : 1:3); SD1 : 3; m3); (SD2 : 1; m1; l(SD2 : 1:1); SD2 : 2; m2)} IV = {(m1; c1; m3; c3) ; (m1; c1; m2; c2)}: 2.1.5 Definitions of Measures The measures are all defined as cardinalities of specific sets. They are therefore defined on an absolute scale and are amenable, as far as measurement theory is concerned, to the type of regression analysis performed in Section 4. Those sets are defined below and are given selfexplanatory names, following the notation summarized in Table 2. First, as mentioned above, we
16
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
differentiate the cases where the entity of measurement is the object or the class. Second, as in previous static coupling frameworks [11], we differentiate import from export coupling, that is the direction of coupling for a class or object. For example, we differentiate whether a method executed on an object calls (imports) or is called by (exports) another objects method. Furthermore, orthogonal to the entity of measurement and direction of coupling considered, there are at least three different ways in which the strength of coupling can be measured. First, we provide definitions for import and export coupling when the entity of measurement is the object and the granularity level is the class. Phrases outside and between parentheses capture the situations for import and export coupling, respectively. Dynamic messages. Within a runtime session, it is possible to count the total number of distinct messages sent from (received by) one object to (from) other objects, within the scope considered. That information is then aggregated for all the objects of each class. Two messages are considered to be the same if their source and target classes, the method invoked in the target class, and the statement from which it is invoked in the source class are the same. The latter condition reflects the fact that a different context of invocation is considered to imply a different message. In a UML sequence diagram, this would be represented as distinct messages with identical method invocations but different guard conditions
17
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
. Distinct method invocations. A simpler alternative is to count the number of distinct methods invoked by each method in each object (that invokes methods in each object). Note that this is different from simply counting method invocations as we count each distinct method only once. That information is then aggregated for all the objects of each class. Distinct classes. It is also possible to count only the number of distinct server (client) classes that a method in a given object uses (is used by). That information is then aggregated for all the objects of each class. If we now look at where the calling and called methods are defined and implemented, the entity of measurement is the class and we can provide similar definitions. We then count the number of distinct messages originating from (triggering the executions of) methods in the class, the number of distinct methods invoked by (that invoke) the class methods, and the number of distinct classes from which the class is using methods (that uses its methods). Table 1 show the formal set definitions of the measures when the granularity is the class, and the scope is the system. We provide an intuitive textual explanation only for the first set: IC_OM(c). Other sets can be interpreted in a similar manner.
18
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
IC_OM(c): A set containing all tuples (source method, source class, target method, target class) such that there exists an object o instantiating c (whose coupling is being measured) that sends a message to at least one instance of the target class in order to trigger the execution of the target method. The corresponding metric is simply the cardinality of this set. Note that the source class must be different from the target class (c1 c2), because we are focusing on dependencies that contribute to coupling between classes, not their cohesion (as further discussed in [11], [12].Reflexive method invocations are therefore excluded.
TABLE 2: Example Coupling Sets When the Entity of Measurement is the Class
TABLE 3: Example Coupling Sets When the Entity of Measurement is the Object
TABLE 4: Changed Import Coupling Sets after Adding a New Implementation of m3() in c5
2.1.6 Higher Granularities If we want to measure dynamic coupling at higher levels of granularity, this can be easily defined by performing the union of the coupling sets of a set of classes or objects, depending on the entity of measurement. For example, if the entity of measurement is the class and the level of granularity is the subsystem, then for each subsystem SS there corresponds a subset of classes that it contains, SC 2C, and we can define:
19
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
IC_CM (SS) = (all o SC) IC_CM(c): Similarly, when the entity of measurement is the object: For each use case UC there corresponds a set of participating objects SO 2O (that are involved in the UCs sequence diagram(s)), and we can define: IC_CM (UC) = (all o SO) IC_CM (o): Similar definitions can be provided for all levels of granularity. 2.1.7 Example Returning to our working example in Figs. 2 and 3, we provide below all the nonempty coupling sets. When the entity of measurement as well as the granularity is the class, we obtain the import and export coupling sets illustrated in Table 2. When the entity of measurement is the object, and the granularity is the class, we obtain the coupling sets in Table 4. The export coupling sets for c1 as well as the import coupling sets for c2, c3, c4, and c5 are empty. To gain a better insight into the impact of polymorphism on coupling, let us change the class diagram in Fig. 2 by adding a new implementation of method m3() in c5: RMC = {(m1; c1); (m3; c3); (m3; c5); (m2; c2)}, while keeping the sequence diagrams in Fig.3 unchanged. This results in a new element in IV : IV = {(m1; c1; m3; c3); (m1; c1;m3; c5); (m1; c1; m2; c2)}: The other sets (C, M, O, ROC, and ME) remain unchanged. When the entity of measurement is the class, the new method implementation results in significantly changed import coupling sets for class c1 (see Table 4, where removed elements are struck through, whereas new elements are bolded). Adding a new implementation of an existing method in a subclass has resulted in increased import coupling for class c1. This is because class c1 now imports from one additional class (c5), one additional method (m3() in c5), and one additional distinct method invocation. However, object import coupling (IC_ Ox(c)) remains unchanged, as at the object level, instances of c1 were already importing from c5. In a similar way, the export coupling of class c3 has decreased and the export coupling of class c5 has increased (see Table 5).
TABLE 5: Changed Export Coupling Sets after Adding a New Implementation of m3() in c5 20
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
Impact of merging classes. Assuming c0 is the result of merging c1 and c2, thus transforming system S into S0, for any Coupling measure, we want the following properties to hold at the class and system levels: Coupling (c1) + Coupling (c2) Coupling (c0) Coupling (S) Coupling (S): Taking IC_ CD as an example, we can easily show this property holds: All instances of c1 and c2 in IV s tuples are substituted with c. If there exist tuples of the type (m1; c1; m2; c2) in IV, then they are transformed into tuples of the form (m1; c; m2; c). For IC_Cx measures, since we exclude reflexive method invocations because they do not contribute to coupling then tuples of the form (m1; c; m2; c) disappear because of the merging. Hence: |IC_CD (c)| |IC_CD (c1)| + |IC_CD (c2)| Similar arguments can be made for all other coupling measures.
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
class files are executed by instrumented JVM to generate the execution events. Introspection allows the main application to examine each of its plug-ins for the methods it supports and then call them when appropriate. Without introspection, it could not determine the names and parameter types of those methods. To minimize perturbation, the JVM was modified only to the extent necessary to generate enough trace information to visualize the execution call graph. Introspection procedure is:1. First we have to compile the source code. 2. Then use Reflection to retrieve data members and methods. Finally maintain a Vector to store the retrieved information.
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
filtering option specifies a list of classes to be traced. For this option, the class hierarchy of the object on which the current method is invoked is checked to see whether it belongs to any of the classes specified. If so, the method is traced. Otherwise, the method invocation is simply ignored. Client/server traces generation. The Java remote method invocation (RMI) facility allows one JVM to execute a method on another JVM, which may be executing on a physically distributed processor. To match corresponding entries in the server and client profiles, the modified JVM also records the machine (JVM) names. On the client side, the server machine name on which the call was invoked is recorded. On the server side, the client machine name from which the call originated is also recorded. The client-side port number of the TCP/IP connection used for the remote call is recorded in both the server and the client profiles. The port number is needed to distinguish between remote calls made to the same server from different client JVMs residing on the same physical machine. The identifier of the thread that invoked the remote call is recorded on the client side in order to map the detailed trace entry of the remote method invocation to the corresponding client profile entry. Similarly, the identifier of the thread where the remote call is received is recorded on the server side. Finally, the time stamps the time at which the remote call was invoked on the client and the time at which the call was received on the server are also recorded.
24
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
4 CASE STUDY
This section presents the results of a case study whose objectives are to provide a first empirical validation of the dynamic coupling measures presented above. The first subsection explains in more detail our objectives, the study settings, and the methodology we follow. In subsequent sections quantitative results are presented and interpreted.
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
of change (in SLOC added and deleted) of each class within a given set of consecutive versions was computed. Second, to collect the dynamic coupling measures, test cases provided with the Velocity source code were used to exercise each version of the system. Each test case was executed while the dynamic coupling tracer tool computed the dynamic coupling measures. Third, size and a comprehensive set of static coupling measures of Velocity. Thus, coupling to/from library and framework classes were not included. A first objective of the case study was to determine whether the dynamic coupling measures capture additional dimensions of coupling when compared with static coupling measures. A subsequent, more ambitious objective was to investigate whether dynamic coupling measures are significant indicators of a useful, external quality attribute and are complementary to existing static measures in explaining its variance. Following the methodology described in [15], we first analyzed the descriptive statistics of the dynamic coupling measures. The motivation was to determine whether they show enough variance and whether some of the properties we expected were visible in the data. The next step was to perform a principal component analysis (PCA), the goal of which was to identify what structural dimensions are captured by the dynamic coupling measures and whether these dimensions are at least partly distinct from static coupling measures. It is usual for software product measures to show strong correlations and for apparently different measures to capture similar structural properties. PCA also helps to interpret what measures actually capture and determine whether all measures are necessary for the purpose at hand. In our case, recall that we want to determine whether all xx xC, xx xM, and xx xD measures are necessary, that is, to what extent they are redundant. Due to size constraints, results from the above analyses are only summarized in this paper and fully reported in [14]. In order to investigate their usefulness as quality indicators, we investigate whether dynamic coupling measures are statistically related to change proneness, that is, the extent of change across the versions of the system we used as a case study. To do so, we analyzed the changes (lines of code added and deleted) across the four sub releases of Velocity 1.2. Our goal was to ensure we would only consider correction changes as requirements changes are not driven by design characteristics but mainly by external factors. Sub releases in a major release include only correction changes3 and we were therefore able to factor out requirements changes and obtain more accurate analysis results regarding the impact of coupling on change proneness. The dependent variable (Change) in this study is the total amount of change (source lines of code added and deleted) that has affected each of the 136 application classes participating in the test case executions across the four sub releases of Velocity 1.2. Since none of these classes were added or deleted during the making of the successive releases, the variable Change is a measure of the change proneness of these classes. In this case study context, this can be more precisely defined as their tendency to undergo correction changes. Other possible dependent variables could have been selected, such as the number of changes, but we wanted our dependent variable to somehow reflect the extent of changes as well as their frequency. The above analysis assumes that there is a cause-effect relationship between coupling and change proneness, something which is intuitive because classes that strongly depend on or provide services to other classes are more likely to change, through ripple effects, as a result of changes in the system [16]. Predicting the change proneness of a class (i.e., its volatility) can be used to aid
26
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
design refactoring (e.g., removing hot-spots), choosing among design alternatives or assessing changeability decay [17]. One important issue is that not only do we want our measures to relate to change proneness in a statistically significant way, but we want the effect to be additional or complementary to that of static coupling measures and class size [15], [18]. If some of the dynamic coupling measures remain statistically significant covariates when the static coupling measures and size measures are included as candidate covariates, this subset of dynamic coupling measures is deemed to significantly contribute to change proneness. We consider this to be empirical evidence of the causal effect between dynamic coupling and change proneness, of their practical usefulness and, hence, we consider it to provide an initial empirical validation of the dynamic coupling measures. More details are provided in Section 4.4.
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
4.3.2 Principal Component Analysis (PCA) PCA was then used to analyze the covariance structure of the measures and determine the underlying dimensions they capture. Detailed results, provided in [14], show that coupling is divided along four dimensions: IC Ox, IC Cx, EC Ox, and EC Cx. Thus, all xx xC, xx xM, and xx xD measures belong to identical components when they have identical scope, granularity and entity of measurement, therefore capturing similar properties. This implies that it may be unnecessary to collect all of these measures and, in particular, the xx xD measures that cannot be collected on UML diagrams and which require expensive dynamic code analysis [14] may not be needed. It is interesting to note that this confirms the PCA results4 in an earlier case study on a Smalltalk system. Overall, the PCA analysis indicates that our dynamic coupling measures (especially when the entity of measurement is the object) are not redundant with existing static coupling and size measures. 4.3.3 Dynamic Coupling as an Explanatory Variable of Change Proneness The next step was to analyze the extent to which each of the dynamic coupling measures are related to our dependent variable, change proneness (see Section 4.1). However, since the size (SLOC) of a class is an obvious explanatory variable of Change (SLOC added+deleted), it may be more insightful to determine whether a coupling measure is related to change proneness independently of class size. We therefore tested whether the dynamic coupling measures are significant additional explanatory variables, over and above what has already been accounted for by size. To achieve this, we systematically performed a multiple linear regression involving class size (SLOC) and each of the dynamic coupling measures and then determined whether the regression coefficient for the coupling measure was statistically significant. Details are reported in [14] and can be summarized as follows: There is strong support for the hypotheses that all dynamic export coupling measures are clearly related to change proneness, in addition to what can be explained by size. On the other hand, dynamic import coupling measures do not seem to explain additional variation in change proneness, compared to size alone. Once again, this confirms the results obtained in an earlier case study on a Smalltalk system. The following section evaluates the extent to which the dynamic coupling measures are useful predictors when building the best possible models by using size, static coupling, and dynamic coupling measures as possible model covariates.
5. RELATED WORK
Kai Qian et al [19] have presented a service decoupling metrics for service-oriented distributed software composition. The proposed metrics can be applied in the selection of service component in the service-oriented software design process and to evaluate the service-oriented software as a whole in term of decoupling quality attribute for better software understandability, maintainability, reliability, testability, and reusability. Liguo Yu [20] had presented a method to correlated evolutionary coupling and reference coupling. They studied the evolution of 597 consecutive versions of Linux and measure the evolutionary coupling and reference coupling among 12 kernel modules. They compared 12 pairs of evolutionary coupling data and reference coupling data. The results showed that linear
28
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
correlation existed between evolutionary coupling and reference coupling. They concluded that in Linux, the dependencies between software components induced via the system architecture had noticeable effects on kernel module co-evolution. Pham Thi Quynh et al. [21] Service-oriented systems have become popular and presented many advantages in develop and maintain process. The coupling is the most important attribute of services when they are integrated into a system. In this paper, we propose a suite of metrics to evaluate services quality according to its ability of coupling. We use the coupling metrics to measure the maintainability, reliability, testability, and reusability of services. Our proposed metrics are operated in run-time which bring more exact results. Byron J. Williams and Jeffrey C. Carver [22] have described in the proposed work a systematic literature review of software architecture change characteristics. The results of the systematic review were used to create the Software Architecture Change Characterization Scheme (SACCS). The proposed report addressed the key areas involved in making changes to software architecture. SACCSs purpose is to identify the characteristics of a software change that would have an impact on the high-level software architecture.
6. CONCLUSION
In this paper, we have proposed a new approach to the computation of dynamic coupling measures in DOO systems by introspection and adding trace events into methods. First, we provide formal, operational definitions of coupling measures and analysis. We propose dynamic coupling measures for distributed object-oriented systems i.e., coupling measurement on both clients and server dynamically. We described the classification of dynamic coupling measures. The motivation for those measures is to complement existing measures that are based on static analysis by actually measuring coupling at runtime in the hope of obtaining better decision and prediction models because we account precisely for inheritance, polymorphism and dynamic binding. Admittedly, many other applications of dynamic coupling measures can be envisaged. However, investigating change proneness was used here to gather initial but tangible evidence of the practical interest of such measures. Finally we propose our dynamic coupling measurement techniques which involve Introspection Procedure, Adding trace events into methods of all classes and Predicting Dynamic Behaviour while running the source code. The source code is filtered to arrive the Actual Runtime used Source Code which is then given for any standard coupling technique to get the Dynamic Coupling.
REFERENCES
[1] David Kung, Jerry Gao, Pei Hsia, Yasufumi Toyoshima, Chris Chen, Young-Si Kim, and Young-Kee Song, "Developing an Object-Oriented Software Testing and Maintenance Environment", Communications of the ACM, Vol. 38, No. 10, pp.75-87, oct.1995. J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy and W. Lorenson, Object-Oriented Modeling and Design, Prentice Hall, 1991. I .Graham, "Object-Oriented Methods" Addison-Wesley, 1994. Alan C. Y. Wong, Samuel T chanson, S. C. Cheung and Holger Fuchs, "A Framework for Distributed Object-Oriented Testing", In Proceedings of the IFIP TC6 WG6.1 Joint International Conference on 29
[2]
[3] [4]
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
Formal Description Techniques for Distributed Systems and Communication Protocols (FORTEX) and Protocol Specification, Testing and Verification (PSTV XVII), pp.1-22, 1997. [5] L. Lamport and N. Lynch, "Distributed Computing: models and methods", Handbook of theoretical Computer science, pp.1157-1199, Elseiver Science, 1990. Safwat H. Hamad, Reda A. Ammar, Mohammed E. Khalifa and Ayman El-Dessouky, "A Multi step Approach for Restructuring and Mapping Distributed Object-Oriented Software onto a Multiprocessor System", In proc. of the INFOS2008, March 27-29, 2008 Cairo-Egypt, pp.PAR19PAR23, 2008. N. Koziris, M. Romesis, P. Tsanakas and G. Papakonstantinou, "An Efficient Algorithm for the Physical Mapping of Clustered Task Graphs onto Multiprocessor Architectures", In Proceedings of the 8th EuroPDP, pp. 406-413, Jan.2000. R. S. Chin and S. T. Chanson, "Distributed Object-based programming systems", ACM Computing Surveys, Vol.23, No.1, pp.91-124, 1991. T. W. Ryan, "Distributed object technology: concepts and applications", Prentice Hall, 1997
[6]
[7]
[8]
[9]
[10] A. Kavitha and Dr. A. Shanmugam, "Dynamic Coupling Measurement of Object Oriented Software Using Trace Events", In proc. of the 6th International Symposium of Applied Machine Intelligence and Informatics, 2008 (SAMI 2008), pp. 255-259, Jan. 2008. [11] L.C. Briand, J.W. Daly, and J. Wust, A Unified Framework for Coupling Measurement in ObjectOriented Systems, IEEE Trans. Software Eng., vol. 25, no. 1, pp. 91-121, 1999. [12] L.C. Briand, J. Daly, and J. Wust, A Unified Framework for Cohesion Measurement in ObjectOriented Systems, Empirical Software Eng., vol. 3, no. 1, pp. 65-117, 1998. [13] Jakarta, The Apache Jakarta Project, http://jakarta.apache.org/ ,2003. [14] E. Arisholm, L.C. Briand, and A. Fyen, Dynamic Coupling Measurement for Object-Oriented Software, Technical Report 2003-05, Simula Research Laboratory, http://www.simula.no/ ~erika, 2003. [15] L.C. Briand and J. Wuest, Empirical Studies of Quality Models in Object-Oriented Systems, Advances in Computers, vol. 59, pp. 97- 166, 2002. [16] L.C. Briand, J. Wust, and H. Lounis, Using Coupling Measurement for Impact Analysis in ObjectOriented Systems, Proc. Intl Conf. Software Maintenance (ICSM 99), pp. 475-482, 1999. [17] E. Arisholm, Empirical Assessment of Changeability in Object- Oriented Software, PhD Thesis, Dept. of Informatics, Univ. of Oslo, ISSN 1510-7710, 2001. [18] K. El Emam, S. Benlarbi, N. Goel, and S.N. Rai, The Confounding Effect of Class Size on the Validity of Object-Oriented Metrics, IEEE Trans. Software Eng., vol. 27, no. 7, pp. 630-650, 2001. [19] Kai Qian, Jigang Liu and Frank Tsui, Decoupling Metrics for Services Composition, In Proc. of the 5th IEEE/ACIS International Conference on Computer and Information Science and 1st IEEE/ACIS International Workshop on Component-Based Software Engineering, Software Architecture and Reuse ( ICIS-COMSAR 2006), pp.44-47,2006.
30
International Journal of Computer Science, Engineering and Applications (IJCSEA) Vol.1, No.6, December 2011
[20] Liguo Yu, Understanding component co-evolution with a study on Linux, Journal of Empirical Software Engineering Archive, Vol. 12, No. 2, pp.123-141, Apr. 2007 [21] Pham Thi Quynh and Huynh Quyet Thang ,"Dynamic Coupling Metrics for Service Oriented Software", International Journal of Electrical and Electronics Engineering, Vol. 3, No.5, pp.282-287, 2009. [22] Byron J. Williams and Jeffrey C. Carver, Characterizing Software Architecture Changes: A Systematic Review, Information and Software Technology, Vol.52, No.1, pp. 31-51, Jan.2010.
31