_portletExporter.exportLocks(context, root);
</BUG>
if (exportPermissions) {
_permissionExporter.exportPortletDataPermissions(context);
}
<BUG>_portletExporter.exportRatings(context, root);

_portletExporter.exportTags(context, root);

try {</BUG>
if (exportTheme) {

}
context.setScopeGroupId(previousScopeGroupId);
if (exportCategories) {
exportCategories(context);
}
_portletExporter.exportComments(context, rootElement);
_portletExporter.exportLocks(context, rootElement);
if (exportPermissions) {
_permissionExporter.exportPortletDataPermissions(context);
}
_portletExporter.exportRatings(context, rootElement);
_portletExporter.exportTags(context, rootElement);
if (exportTheme) {
