8000 GitHub - wangcwangc/CallGraph: Call graph analysis for Java project
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wangcwangc/CallGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Call Graph

Introduction

The project aims to generate a call graph for Java JAR files or .class files using ASM. The call graph includes every call path from source to target, providing researchers with a lightweight tool to obtain a project's call graph. The project's call graph achieves the precision of Class Hierarchy Analysis (CHA).

How to Use

Install the Project

mvn clean package install

Import the Project

Firstly, import the project into your Java project using Maven. Add the following dependency to your pom.xml file:

<dependency>
    <groupId>xmu.lab</groupId>
    <artifactId>callGraph</artifactId>
    <version>0.0.2-SNAPSHOT</version>
</dependency>

Execute Call Graph Analysis

In your Java code, call the following method to perform call graph analysis:

        CallGraph callGraph = CallGraph.getInstance();
        ArrayList<String> jarPaths = new ArrayList<>();
        jarPaths.add(directoryUrl.getPath());
        callGraph.addPaths(jarPaths);
        callGraph.create();
        Set<MethodCall> methodCalls = callGraph.getMethodCalls();

Features

  • ASM Integration: Utilizes ASM to parse Java bytecode for accurate call graph generation.
  • CHA: Achieves the precision of Class Hierarchy Analysis for a comprehensive view of the project's dependencies.
  • Class and JAR Analysis: Supports the analysis of individual classes or entire JAR packages.

TODO

  • Optimization: Explore opportunities to enhance the performance and accuracy of call graph generation.
  • Documentation: Expand and improve project documentation for better usability.

About

Call graph analysis for Java project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0