I'm having a difficult time reproducing the error you described, Artur.
  Here's what I've done so far:

1. I fixed so that it should produce javadocs with
properly-indented pseudocode for you to read.

2. I fixed a bug in that occurs when no trees of a given
return type exist for any possible size (a common situation I would

3. I hacked up a modification of symbolic regression erc.params to do
some atomic typing.  The types are nil (the default), float and float2
(for no good reason -- they're just symbols).  The objective here was
to add a return type (float) which had no terminal, and a return type
(float2) which had no nonterminals.

sin(float) -> nil
cos(nil) -> float
exp(float2) -> nil
X() -> float2
X() -> nil
add(nil,nil) -> nil
sub(nil,nil) -> nil
mul(nil,nil) -> nil
div(nil, nil) -> nil

Seems to work fine.  Here are the files.  Try java ec.Evolve -file