cannot find the slice.log and raw-slice.log , but they are in the log
#python3 slicer4j.py -j ../benchmarks/SliceMe/target/SliceMe-1.0.0.jar -o /app/output -b SliceMe:17 -m "SliceMe" -d
Instrumenting the JAR Instrumented jar is at: /app/output/SliceMe-1.0.0_i.jar Running the instrumented JAR Running instrumented JAR
Slicing from line SliceMe:17 Slice source code lines: /app/output/slice.log Raw slice: /app/output/raw-slice.log Slice graph: /app/output/slice-graph.pdf Slice with dependencies: /app/output/slice-dependencies.log root@2608077c71cd:/app/Slicer4J/scripts# cat /app/output/slice.log cat: /app/output/slice.log: No such file or directory root@2608077c71cd:/app/Slicer4J/scripts# cat /app/output/raw-slice.log cat: /app/output/raw-slice.log: No such file or directory`
Hi @YLChen-007 , can you please inspect all the logs in the output folder? one of them may contain an error message explaining the problem.
Hi @khaled-e-a ,thoes are my all log in the output folder. I saw a NullPointException.
file structure:
toollearning/Slicer4J/output/graph-debug.log toollearning/Slicer4J/output/instr-classes.txt toollearning/Slicer4J/output/instr-debug.log toollearning/Slicer4J/output/jar-size.txt toollearning/Slicer4J/output/slice-file.log toollearning/Slicer4J/output/static-log.log toollearning/Slicer4J/output/trace_full.log toollearning/Slicer4J/output/trace.log toollearning/Slicer4J/output/trace.log_icdg.log
all log:
filename
toollearning/Slicer4J/output/graph-debug.log
filecontent
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/app/Slicer4J/Slicer4J/target/slicer4j-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/app/Slicer4J/Slicer4J/target/lib/slf4j-simple-1.7.5.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 [org.slf4j.impl.SimpleLoggerFactory] [main] INFO Slicer - main (216): Started Slicer4J [main] INFO Slicer - main (261): Reading trace [main] INFO Parser - expandTrace (102): Abs path for static-log /app/output/static-log.log [main] INFO Parser - expandTrace (156): Done parsing [main] WARN Parser - readFile (66): Writing out trace file is disabled! [main] INFO Slicer - main (266): Started graph construction [main] INFO DynamicControlFlowGraph - createDCFG (86): Trace size: 6 [main] INFO DynamicControlFlowGraph - createDCFG (96): Progress: 0/6 (0), time: 0.0 [main] INFO Slicer - main (270): Finished graph construction [main] INFO Slicer - terminate (491): Time: 0.468005075
filename
toollearning/Slicer4J/output/instr-classes.txt
filecontent
PThread SliceMe
filename
toollearning/Slicer4J/output/instr-debug.log
filecontent
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/app/Slicer4J/Slicer4J/target/slicer4j-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/app/Slicer4J/Slicer4J/target/lib/slf4j-simple-1.7.5.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 [org.slf4j.impl.SimpleLoggerFactory] [main] INFO Slicer - main (216): Started Slicer4J [main] INFO JimpleWriter - initialize (17): Initializing Instrumenter [main] INFO JimpleWriter - initialize (30): Initialization done [main] INFO JimpleWriter - start (37): Running packs ... [main] INFO JimpleWriter - start (39): Writing output ... [main] INFO JimpleWriter - start (41): Output written ... [main] INFO JavaInstrumenter - initialize (72): Initializing Instrumenter [main] INFO JavaInstrumenter - initialize (92): Initialization done [main] INFO JavaInstrumenter - start (247): Running packs ... [main] INFO JavaInstrumenter - start (251): Writing names of instrumented classes ... [main] INFO JavaInstrumenter - start (270): Writing output ... [main] INFO JavaInstrumenter - start (272): Output written ... [main] INFO JavaInstrumenter - start (274): Writing log file... [main] INFO JavaInstrumenter - start (286): Number of Jimple statements (jarSize): 51 [main] INFO JavaInstrumenter - start (287): Writing JAR [main] INFO JavaInstrumenter - start (289): Soot file: /app/Slicer4J/scripts/sootOutput [main] INFO JavaInstrumenter - start (290): Soot file is directory?: true [main] INFO JavaInstrumenter - start (302): Writing size file ... [main] INFO JavaInstrumenter - start (314): Number of classes: 6 [main] INFO JavaInstrumenter - start (341): Instrumentation done: file wrote /app/output/SliceMe-1.0.0_i.jar [main] INFO Slicer - terminate (491): Time: 0.821801653
filename
toollearning/Slicer4J/output/jar-size.txt
filecontent
Number of Jimple statements (jarSize): 51
filename
toollearning/Slicer4J/output/slice-file.log
filecontent
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/app/Slicer4J/Slicer4J/target/slicer4j-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/app/Slicer4J/Slicer4J/target/lib/slf4j-simple-1.7.5.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 [org.slf4j.impl.SimpleLoggerFactory]
[main] INFO Slicer - main (216): Started Slicer4J
usage: java -jar Slicer4j/target/slicer4j-jar-with-dependencies.jar
-ctrl,--Control-only Track control dependence only
-d,--debug Enable debug
-data,--data-only Track data-flow dependence only
-f,--framework
filename
toollearning/Slicer4J/output/static-log.log
filecontent
{"<PThread: void
filename
toollearning/Slicer4J/output/trace_full.log
filecontent
Slicer caught exception: java.lang.NullPointerException SLICING: ZLIB: eJyzsDLUNTQEESZAAgAVJQLI Shutting down VM SLICING: ZLIB: eJwDAAAAAAE=
filename
toollearning/Slicer4J/output/trace.log
filecontent
SLICING: ZLIB: eJyzsDLUNTQEESZAAgAVJQLI SLICING: ZLIB: eJwDAAAAAAE=
filename
toollearning/Slicer4J/output/trace.log_icdg.log
filecontent
0, void main(java.lang.String[]), SliceMe, $stack2 = lengthof args:THREAD:1:LINENO:4:FILE:SliceMe:PRED:[]:SUCC:[1 (FLOW_EDGE)]:TID:1 1, void main(java.lang.String[]), SliceMe, if $stack2 <= 0 goto parsed = null:THREAD:1:LINENO:4:FILE:SliceMe:PRED:[0 (FLOW_EDGE)]:SUCC:[2 (FLOW_EDGE)]:TID:1 2, void main(java.lang.String[]), SliceMe, parsed = null:THREAD:1:LINENO:7:FILE:SliceMe:PRED:[1 (FLOW_EDGE)]:SUCC:[3 (FLOW_EDGE)]:TID:1 3, void main(java.lang.String[]), SliceMe, $stack4 = <java.lang.System: java.io.PrintStream out>:THREAD:1:LINENO:9:FILE:SliceMe:PRED:[2 (FLOW_EDGE)]:SUCC:[4 (FLOW_EDGE)]:TID:1 4, void main(java.lang.String[]), SliceMe, $stack3 = lengthof parsed:THREAD:1:LINENO:9:FILE:SliceMe:PRED:[3 (FLOW_EDGE)]:SUCC:[5 (FLOW_EDGE)]:TID:1 5, void main(java.lang.String[]), SliceMe, virtualinvoke $stack4.<java.io.PrintStream: void println(int)>($stack3):THREAD:1:LINENO:9:FILE:SliceMe:PRED:[4 (FLOW_EDGE)]:SUCC:[]:TID:1