> Can Randoop parse Java code into a Sequence object? The Sequence 'parse' method accepts a list of statements in a specific Randoop-defined format, is there a way to read Java code directly?
There is not currently a way to do this. You could likely implement it yourself.
Note that a sequence represents straight-line code (with some other limitations noted below). If you want to parse arbitrary Java code, you would need to extend Randoop's representation of code.
> Can you point us to documentation for the Randoop-defined format for various types of statements, if such exists? The manual gives examples only for method and constructor calls.
> From looking at the Statement parsing code, the format seems to require only actual variables as parameters for method and constructor calls. Is this indeed the case? If so then I assume we will need to transform the input source code by adding auxiliary variables to hold method/constructor calls or other expressions when they are given as parameters to a method/constructor. Is this correct?
Yes. In a Randoop-generated test, every statement is one of:
* a call to a void method, or
* an assignment to a variable. The right-hand side is a primitive or a single operation on previously-defined variables.
The Sequence data structure is designed to represent this structure.
I hope this helps. Good luck with using Randoop in your project. Let us know if you have further questions.
-Mike