isFirst = true;
for(StateMachine sm : uClass.getStateMachines())
{
for (State state : sm.getStates())
{
<BUG>if (state.getActivity() != null)
{</BUG>
if (isFirst)
{
output.append(StringFormatter.format("if"));

isFirst = true;
for(StateMachine sm : uClass.getStateMachines())
{
for (State state : sm.getStates())
{
for (Activity activity : state.getActivities())
{
if (isFirst)
{
output.append(StringFormatter.format("if"));
