Giter Site home page Giter Site logo

java-callgraph's People

Contributors

chrstphlbr avatar gousiosg avatar matthieu-vergne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-callgraph's Issues

Inside actionPerformed couldn't involve to call graph

Hi,

when i run java-CallGraph getTweets method inside jar doesn't involve to call graph.

jar file source code like that:

button1.addActionListener(new ActionListener() {

                    public void actionPerformed(ActionEvent arg0) {


                        JTextArea textArea = new **JTextArea(getTweets("#XXX"));**                           
                        textArea.setLineWrap(true);  
                        textArea.setWrapStyleWord(true);
                        textArea.setBounds(500, 500, 500, 500);


                        JScrollPane jScrollPane1 = new JScrollPane(textArea);
                        jScrollPane1.setBounds(500, 500, 500, 500);

                        JOptionPane.showMessageDialog(null, jScrollPane1, "Tweets",  
                                JOptionPane.CLOSED_OPTION);


                    }
                });

Update to documentation

I would kindly request to upload the snapshot release in any maven repository.

Here is the sample procedure to follow:
http://maven.apache.org/guides/mini/guide-ibiblio-upload.html

I need the maven upload because i would like to use the latest snapshot release of BCEL.

Also could you please update the documentation of Compile section - https://github.com/gousiosg/java-callgraph#compile for the fact that 3 jars are created. Two executable and one standard maven release javacg-0.1-SNAPSHOT.jar.

Class or method calls of dependencies

I wonder if this tool can analyze calls to dependencies in the pom.xml of program analyzed. I tried and found all result only contained calls to its own classed or Java core packages like java.lang, java.io.
If not, is it feasible to create an executable JAR with dependencies using Maven and process this JAR with the javacg-0.1-SNAPSHOT-static.jar ?
Could someone please tell me how to make that? Thanks a lot!

Certain types of method calls are missing

In these cases, the method call is missing:

  1. Interface and implementation class methods
  2. Runnable implementation class thread call
  3. lambda expression (including thread call, etc.)
  4. The parent class calls the implementation method of the subclass
  5. The subclass calls the implementation method of the parent class

I added support for the above types, you can see my fork:
https://github.com/Adrninistrator/java-callgraph

Field reference graphs?

I'm looking for a tool that can read one class file and show which methods reference other class variables and methods in the same class. The purpose is to find places where I can split a class. If a class variable is referenced by three methods and they don't reference other variables, then I can move this set to a new class. Your java-callgraph product is the closest I have found. Do you know if the functionality that I'm looking for is possible to implement?

remove System.out.println

can you remove System.out.println in method ClassVisitor.visitConstantPool() ? It could be good to let user to decide how to print information, for example use logger

Error: Could not find or load main class :jar.batik-all.jar:jar.xml-apis-ext.jar

When trying to generate a dynamic call graph for my spring boot project I got this error:
Error: Could not find or load main class :jar.batik-all.jar:jar.xml-apis-ext.jar

1- The command that I ran:
java -Xbootclasspath:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:jar/batik-all.jar:jar/xml-apis-ext.jar -javaagent:target/javacg-0.1-SNAPSHOT-dycg-agent.jar="incl=org.apache.batik.,org.w3c.;" -jar dacapo-9.12-bach.jar batik -s small | tail -n 10

2- The example that I followed:
https://github.com/gousiosg/java-callgraph#examples

Maven install error

I downloaded the package, installed it with maven 3.8.1, then it have these errors:


Test set: gr.gousiosg.javacg.RunCucumberTest

Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.187 sec <<< FAILURE!
Retrieve nested lambdas(Lambda) Time elapsed: 0.141 sec <<< ERROR!
java.lang.RuntimeException: Cannot found: M:NestedLambdaTest:lambda$lambda$methodA$2$1() (D)Runner:run(NestedLambdaTest)
at gr.gousiosg.javacg.StepDefinitions.the_result_should_contain(StepDefinitions.java:45)
at ?.the result should contain:(gr/gousiosg/javacg/lambda.feature:69)

Could someone please tell me how to fix it? Thanks a lot!

Showing results for Junit test suite?

Hello,
This project is awesome, I found it the most straightforward among all of the others.
I tested java -jar javacg-0.1-SNAPSHOT-static.jar against a maven project and everything was good except that no result for Junit test suite is generated. Is that basically possible in this project? If not, could you please provide me with information that how can I add this feature into the project?
Thanks.

Visualize graph? Add graphviz graph format?

Hey, nice concise tool!

Do you think it would be useful/easy to write the result in graphviz format? that way it would have a rudimentary way to visualize the graph. Maybe I missed something in the docs but the only output I saw is text based.

Maybe changing the current format, or adding a flag parameter, although I see it's currently straight to the point.

I might get some time to do it myself, at least for the static part.

Let me know what you think.

add feature to trace native func

my project need a func to get callgraph, but it omit the native func cause it doesn't has call-graph in jar, but we need know which is native func while analyzing.
i think it's a nice func and i modifed the code to get that feature

Java Version

From reading the documentation, it requires the XBootClassPath flag.

Can this still be run on Java 1.8 even though it does not support that option?

Cant find classes.jar in Java1.8

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar.
When i want to use dynamic modes, I cant find classes.jar in 1.8.x JRE on Mac os.

Static call analysis: overwriting and implementing calls

In order to see, what may be called from what, two further types of method calls seem to me important: (1.) a method is overwritten by another one. (this is not just a true call, but however, I think java-callgraph could do so, since the overwriting method is executed instead of the overwritten one.)
(2.) an interface method is implemented by a concrete method. (java-callgraph is already listing calls of interface method. So for completeness (respective to the given jars) I want to see also the implementing methods.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.