resess / Slicer4J

Slicer4J is an accurate, low-overhead dynamic slicer for Java programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

does not find line number if the slicing criterion is in the test class

soneyahossain opened this issue · comments

I am trying to generate the dynamic slice for the junit assertions in a test class of the joda-time subject. However, the script throws error such as:

looking for LINENO:324:FILE:org.joda.time.tz.TestBuilder
None
Traceback (most recent call last):
File "run_benchmarks.py", line 207, in
run_slicer4j(project, jar_name, project_arg, extra_libs, sc_file, slice_line)
File "run_benchmarks.py", line 148, in run_slicer4j
line = sc.split(", ")[0]
AttributeError: 'NoneType' object has no attribute 'split'

Is it because the tool does not instrument test classes? Not sure if I am making any mistake, any help would be highly appreciated!

At the moment, Slicer4J requires all classes to be in the packaged jar. So you can only slice from either the main classes, or modify the build system to include the test classes into the jar to be sliced.