1

Is there a simple way to find dead jbase code? A specific example of dead code is something like:

x = "a"
if(x = "a"){
    do some stuff
}
else {
    do some other stuff
}

For the above fragment there is no way the "do some other stuff" could ever be executed. Having a way to identify and find dead code would be very helpful, because older programs are sometimes bloated with lots of dead code, which makes it difficult to figure out what the program is actually doing.

zelinka
  • 3,271
  • 6
  • 29
  • 42

1 Answers1

2

jcover is a utility in jBASE that can assist in detecting dead code during the runtime. I in

https://docs.zumasys.com/jbase/tools/jcover/

If the -x option was used, you can display a list of all the lines of source code not executed with:

LIST jcover_23 NOTEXEC

If the -u option was used, you can display a list of all source items that didn’t have any code executed during the application execution

LIST jcover_23 NOTUSED

Corey
  • 21
  • 1