if ((actions.size() > 0) || (commonActions.size() > 0)) {
if (actions.size() > 0 || commonActions.size() > 0) {
    public void writeXML(PrintWriter out, int indent) {        XMLUtil.printIndent(out, indent++);        out.print("<step id=\"" + getId() + "\"");        if ((name != null) && (name.length() > 0)) {            out.print(" name=\"" + name + "\"");        }        out.println(">");        Iterator iter = metaAttributes.entrySet().iterator();        while (iter.hasNext()) {            Map.Entry entry = (Map.Entry) iter.next();            XMLUtil.printIndent(out, indent);            out.print("<meta name=\"");            out.print(entry.getKey());            out.print("\">");            out.print(entry.getValue());            out.println("</meta>");        }        if (preFunctions.size() > 0) {            XMLUtil.printIndent(out, indent++);            out.println("<pre-functions>");            for (int i = 0; i < preFunctions.size(); i++) {                FunctionDescriptor function = (FunctionDescriptor) preFunctions.get(i);                function.writeXML(out, indent);            }            XMLUtil.printIndent(out, --indent);            out.println("</pre-functions>");        }        if (permissions.size() > 0) {            XMLUtil.printIndent(out, indent++);            out.println("<external-permissions>");            for (int i = 0; i < permissions.size(); i++) {                PermissionDescriptor permission = (PermissionDescriptor) permissions.get(i);                permission.writeXML(out, indent);            }            XMLUtil.printIndent(out, --indent);            out.println("</external-permissions>");        }        if ((actions.size() > 0) || (commonActions.size() > 0)) {            XMLUtil.printIndent(out, indent++);            out.println("<actions>");            // special serialization common-action elements            for (int i = 0; i < commonActions.size(); i++) {                out.println("<common-action id=\"" + commonActions.get(i) + "\" />");            }            for (int i = 0; i < actions.size(); i++) {                ActionDescriptor action = (ActionDescriptor) actions.get(i);                action.writeXML(out, indent);            }            XMLUtil.printIndent(out, --indent);            out.println("</actions>");        }        if (postFunctions.size() > 0) {            XMLUtil.printIndent(out, indent++);            out.println("<post-functions>");            for (int i = 0; i < postFunctions.size(); i++) {                FunctionDescriptor function = (FunctionDescriptor) postFunctions.get(i);                function.writeXML(out, indent);            }            XMLUtil.printIndent(out, --indent);            out.println("</post-functions>");        }        XMLUtil.printIndent(out, --indent);        out.println("</step>");    }