secure-software-engineering / upcy

UpCy automatically finds compatible updates for Maven dependencies.
Apache License 2.0
7 stars 0 forks source link

[ERROR] Empty Class names for application - Empty shrinked CG #14

Open AndresPradoVelarde opened 5 months ago

AndresPradoVelarde commented 5 months ago

Hello, I have a problem when I run the last command when it should give me the .csv with the results, but it throws the following error, apparently the error indicates that it tries to open the class dependency-graph.json but it does not find anything. Before indicating if it is because it should be in the target, the reason why I changed the path is because when I run the command, it deletes the entire target folder and tells me that there is no dependency-graph.json:

Captura de pantalla 2024-03-23 155953

`andresprado@AndresPrado:~/Proyectos/java11-examples$ java -cp /home/andresprado/Proyectos/upcy/target/upcy-1.6.2-SNAPSHOT.jar de.upb.upcy.update.MainMavenComputeUpdateSuggestion -dg /home/andresprado/Proyectos/java11-examples/dependency-graph.json -gav org.apiguardian:apiguardian-api:1.0.0 -module /home/andresprado/Proyectos/java11-examples -targetGav org.apiguardian:apiguardian-api:1.1.2 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/andresprado/Proyectos/upcy/target/lib/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/andresprado/Proyectos/upcy/target/lib/slf4j-simple-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/andresprado/Proyectos/upcy/target/lib/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] 15:57:41.184 [main] INFO d.u.u.u.b.PipelineRunner - Working on project: /home/andresprado/Proyectos/java11-examples/pom.xml 15:57:41.189 [main] INFO d.u.u.b.m.MavenInvokerProject - Maven project discovered: '/home/andresprado/Proyectos/java11-examples/pom.xml' 15:57:43.763 [main] INFO d.u.u.u.b.PipelineRunner - Successfully build initial with clean compile install 15:57:43.767 [main] INFO d.u.u.u.b.PipelineRunner - Create Callable for /home/andresprado/Proyectos/java11-examples/pom.xml 15:57:43.771 [main] INFO d.u.u.u.b.PipelineRunner - Found #0 projects to build 15:57:43.772 [pool-1-thread-1] INFO d.u.u.u.b.PipelineRunner - Running on file: /home/andresprado/Proyectos/java11-examples/pom.xml, with projectName: java11-examples 15:57:43.775 [pool-1-thread-1] INFO d.u.u.b.m.MavenInvokerProject - Maven project discovered: '/home/andresprado/Proyectos/java11-examples/pom.xml' 15:57:43.775 [pool-1-thread-1] INFO d.u.u.u.b.Pipeline - Building project: java11-examples 15:57:47.680 [main] INFO d.u.u.u.b.PipelineRunner - Done on project: /home/andresprado/Proyectos/java11-examples/pom.xml 15:57:47.958 [main] INFO d.u.u.u.r.RecommendationAlgorithm - Connected successfully to Neo4j 15:57:48.118 [main] INFO d.u.u.u.r.RecommendationAlgorithm - jsonDepGraph: /home/andresprado/Proyectos/java11-examples/dependency-graph.json 15:57:48.192 [main] ERROR d.u.u.u.r.RecommendationAlgorithm - Empty Class names for application 15:57:48.206 [main] INFO d.u.u.u.r.BlossomGraphCreator - Created blossom graph with v:6 and e:9 15:57:48.207 [main] INFO d.u.u.u.r.CGBuilder - [Analysis] START Analysis of [] 15:57:48.207 [main] INFO d.u.u.u.r.CGBuilder - [Setup] Started

15:57:48.208 [main] INFO d.u.u.u.r.CGBuilder - [Soot] Setting Up Soot ...

15:57:48.275 [main] INFO d.u.u.u.r.CGBuilder - [Setup] Complete 0 15:57:48.275 [main] INFO d.u.u.u.r.CGBuilder - [Analysis] Start

15:57:49.451 [main] INFO d.u.u.u.r.CGBuilder - [Analysis] Took 1 15:57:49.454 [main] ERROR d.u.u.u.r.RecommendationAlgorithm - Empty shrinked CG Exception in thread "main" java.lang.IllegalArgumentException: graph must contain the start vertex at org.jgrapht.traverse.CrossComponentIterator.(CrossComponentIterator.java:135) at org.jgrapht.traverse.CrossComponentIterator.(CrossComponentIterator.java:98) at org.jgrapht.traverse.BreadthFirstIterator.(BreadthFirstIterator.java:64) at de.upb.upcy.update.recommendation.RecommendationAlgorithm.getSimpleUpdateSuggestion(RecommendationAlgorithm.java:253) at de.upb.upcy.update.recommendation.RecommendationAlgorithm.run(RecommendationAlgorithm.java:214) at de.upb.upcy.update.MainMavenComputeUpdateSuggestion.handleModule(MainMavenComputeUpdateSuggestion.java:135) at de.upb.upcy.update.MainMavenComputeUpdateSuggestion.main(MainMavenComputeUpdateSuggestion.java:96)`

Java version: openjdk 11.0.22 2024-01-16 OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1) OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode, sharing)

Maven version: Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: /opt/apache-maven-3.9.6 Java version: 11.0.22, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: en, platform encoding: UTF-8 OS name: "linux", version: "5.15.146.1-microsoft-standard-wsl2", arch: "amd64", family: "unix"

Docker version: Docker version 25.0.3, build 4debf41

anddann commented 5 months ago

Hi, does the dependency-graph file exist in the specified folder?

anddann commented 5 months ago

Do you build the code yourself or do you use the docker container?

AndresPradoVelarde commented 5 months ago

Hi @anddann thanks for getting back to me, regarding the questions: 1.Yes, I just referenced it elsewhere, because when I run the command it does a process which deletes the target with the dependency_graph and at the end it tells me that there is no such file. image

  1. Regarding to the build if I make them (mvn clean install) c:
anddann commented 5 months ago

Can you create the dependency-graph separately running mvn com.github.ferstl:depgraph-maven-plugin:4.0.1:graph -DshowVersions -DshowGroupIds -DshowDuplicates -DshowConflicts -DgraphFormat=json copy it from target to another directory and then call UpCy with the path to the copied dependency-graph.

anddann commented 5 months ago

Can you upload the java11-example somewhere such that I can use it do debug and reproduce the error? Can you also post the generated dependency graph?