Update gendefaultparam, genpolicy tools and corresponding test case: fix bug follow comment #9 issue 391