4 research outputs found

    Parallel Paths Analysis Using Function Call Graphs

    Get PDF
    Call graphs have been used widely in different software engineering areas. Since call graphs provide us with detailed information about the structure of software elements and components and how they are connected with each other, they could be used in detecting specific structures and patterns in the code such as malware, code clones, unreachable code, and many other software symptoms that could be searched by their structural features. In this work, we have analyzed parallel paths in function call graphs in three Java open-source projects. Parallel paths emerge when there is more than one path between two nodes in the call graph. We investigated the reasons such paths are created and used for and also the problems that result in removing them. Moreover, we have used the results of our analyses to find instances of parallel paths in the projects that we analyzed and suggest some changes to developers based on that. Based on our results, we found three categories of problems associated with parallel paths and four categories of usages of them

    JavaScript Dead Code Identification, Elimination, and Empirical Assessment

    Get PDF
    Web apps are built by using a combination of HTML, CSS, and JavaScript. While building modern web apps, it is common practice to make use of third-party libraries and frameworks, as to improve developers' productivity and code quality. Alongside these benefits, the adoption of such libraries results in the introduction of JavaScript dead code, i.e., code implementing unused functionalities. The costs for downloading and parsing dead code can negatively contribute to the loading time and resource usage of web apps. The goal of our study is two-fold. First, we present Lacuna, an approach for automatically detecting and eliminating JavaScript dead code from web apps. The proposed approach supports both static and dynamic analyses, it is extensible and can be applied to any JavaScript code base, without imposing constraints on the coding style or on the use of specific JavaScript constructs. Secondly, by leveraging Lacuna we conduct an experiment to empirically evaluate the run-time overhead of JavaScript dead code in terms of energy consumption, performance, network usage, and resource usage in the context of mobile web apps. We applied Lacuna four times on 30 mobile web apps independently developed by third-party developers, each time eliminating dead code according to a different optimization level provided by Lacuna. Afterward, each different version of the web app is executed on an Android device, while collecting measures to assess the potential run-time overhead caused by dead code. Experimental results, among others, highlight that the removal of JavaScript dead code has a positive impact on the loading time of mobile web apps, while significantly reducing the number of bytes transferred over the network

    A graph-based approach to detect unreachable methods in Java software

    No full text
    In this paper, we have defined a static approach named DUM (Detecting Unreachable Methods) that works on Java byte-code and detects unreachable methods by traversing a graph-based representation of the software to be analyzed. To assess the validity of our approach, we have implemented it in a prototype software system. Both our approach and prototype have been validated on four open-source software. Results have shown the correctness, the completeness, and the accuracy of the methods that our solution detected as unreachable. We have also compared our solution with: JTombstone and Google CodePro AnalytiX. This comparison suggested that DUM outperforms baselines

    A graph-based approach to detect unreachable methods in Java software

    No full text
    In this paper, we have defined a static approach named DUM (Detecting Unreachable Methods) that works on Java byte-code and detects unreachable methods by traversing a graph-based representation of the software to be analyzed. To assess the validity of our approach, we have implemented it in a prototype software system. Both our approach and prototype have been validated on four open-source software. Results have shown the correctness, the completeness, and the accuracy of the methods that our solution detected as unreachable. We have also compared our solution with: JTombstone and Google CodePro AnalytiX. This comparison suggested that DUM outperforms baselines
    corecore