Buggy code:
public class AdminComponentMonitorPortlet extends GenericVelocityPortlet { private static final Logger log = LoggerFactory . getLogger ( AdminComponentMonitorPortlet . class ) ; private static final String VIEW_DEFAULT = "//WEB-INF//templates//administration//component_monitor.vm" ; private static final String VIEW_EDIT = "//WEB-INF//templates//administration//component_monitor_edit.vm" ; private static final String VIEW_NEW = "//WEB-INF//templates//administration//component_monitor_new.vm" ; private static final String VIEW_UPDATES = "//WEB-INF//templates//administration//updates.vm" ; private static final String VIEW_UPDATES_EDIT = "//WEB-INF//templates//administration//updates_edit.vm" ; private IngridJobHandler jobHandler ; private UpgradeClient upgradeClient ; public void init ( PortletConfig config ) throws PortletException { } public void doView ( RenderRequest request , RenderResponse response ) throws IOException , PortletException { IngridResourceBundle messages = new IngridResourceBundle ( getPortletConfig ( ) . getResourceBundle ( request . getLocale ( ) ) , request . getLocale ( ) ) ; Context context = getContext ( request ) ; context . put ( "MESSAGES" , messages ) ; context . put ( "UtilsString" , new UtilsString ( ) ) ; response . setTitle ( messages . getString ( "component.monitor.title" ) ) ; AdminComponentMonitorForm cf = ( ( AdminComponentMonitorForm ) ( Utils . getActionForm ( request , SESSION_KEY , AdminComponentMonitorForm . class ) ) ) ; context . put ( "actionForm" , cf ) ; AdminComponentUpdateForm cfUpdate = ( ( AdminComponentUpdateForm ) ( Utils . getActionForm ( request , AdminComponentUpdateForm . SESSION_KEY , AdminComponentUpdateForm . class ) ) ) ; context . put ( "actionFormUpdate" , cfUpdate ) ; String action = request . getParameter ( PARAM_ACTION ) ; <START_BUG> if ( action == null ) { <END_BUG> checkForUpgradeClient ( ) ; request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_DEFAULT ) ; String sortColumn = request . getParameter ( "sortColumn" ) ; boolean ascending = ( ( request . getParameter ( "desc" ) ) == null ) || ( ! ( request . getParameter ( "desc" ) . equals ( "true" ) ) ) ; context . put ( "sortColumn" , sortColumn ) ; context . put ( "sortAsc" , new Boolean ( ascending ) ) ; context . put ( "jobHandler" , jobHandler ) ; context . put ( "filterMap" , new HashMap ( ) ) ; if ( "exportCSV" . equals ( request . getParameter ( "mode" ) ) ) { context . put ( "exportLink" , ( "//ingrid-portal-apps//filehelper//file?" + ( jobHandler . csvExportFile ) ) ) ; } } else if ( action . equals ( "viewEdit" ) ) { String id = request . getParameter ( "id" ) ; if ( id != null ) { context . put ( "mode" , "edit" ) ; initActionForm ( cf , id , context ) ; if ( ! ( jobHandler . isMonitorJob ( id ) ) ) context . put ( "disableSaving" , "true" ) ; context . put ( "componentTypes" , jobHandler . getComponentTypes ( ) ) ; request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_EDIT ) ; } else { if ( AdminComponentMonitorPortlet . log . isDebugEnabled ( ) ) { AdminComponentMonitorPortlet . log . debug ( "Error<seq2seq4repair_space>getting<seq2seq4repair_space>job<seq2seq4repair_space>(id<seq2seq4repair_space>=<seq2seq4repair_space>null)" ) ; } } } else if ( action . equals ( "viewNew" ) ) { cf . clear ( ) ; context . put ( "componentTypes" , jobHandler . getComponentTypes ( ) ) ; context . put ( "mode" , "new" ) ; request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_NEW ) ; } else if ( action . equals ( "addContact" ) ) { context . put ( "componentTypes" , jobHandler . getComponentTypes ( ) ) ; context . put ( "mode" , request . getParameter ( "mode" ) ) ; request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_EDIT ) ; } else if ( action . equals ( "deleteContact" ) ) { context . put ( "mode" , request . getParameter ( "mode" ) ) ; context . put ( "componentTypes" , jobHandler . getComponentTypes ( ) ) ; request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_EDIT ) ; } else if ( action . equals ( "update" ) ) { cf . clear ( ) ; String id = request . getParameter ( "id" ) ; initActionForm ( cf , id , context ) ; context . put ( "mode" , request . getParameter ( "mode" ) ) ; context . put ( "disableSaving" , request . getParameter ( "disableSaving" ) ) ; context . put ( "componentTypes" , jobHandler . getComponentTypes ( ) ) ; request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_EDIT ) ; } else if ( action . equals ( "reshow" ) ) { context . put ( "mode" , request . getParameter ( "mode" ) ) ; context . put ( "disableSaving" , request . getParameter ( "disableSaving" ) ) ; context . put ( "componentTypes" , jobHandler . getComponentTypes ( ) ) ; request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_EDIT ) ; } else if ( action . equals ( "editAfterNew" ) ) { String id = request . getParameter ( "id" ) ; String type = request . getParameter ( "type" ) ; context . put ( "mode" , "new" ) ; cf . setInput ( FIELD_ID , request . getParameter ( "id" ) ) ; cf . setInput ( FIELD_TYPE , request . getParameter ( "type" ) ) ; cf . setInput ( FIELD_TIMEOUT , "30000" ) ; cf . setInput ( FIELD_INTERVAL , "1800" ) ; if ( jobHandler . jobExists ( id ) ) { cf . setError ( FIELD_ID , "component.monitor.form.error.duplicate.id" ) ; } if ( jobHandler . jobTypeOnlyOnce ( request . getParameter ( "type" ) ) ) { cf . setError ( FIELD_TYPE , "component.monitor.form.error.single.job" ) ; } if ( cf . hasErrors ( ) ) { context . put ( "type" , type ) ; context . put ( "componentTypes" , jobHandler . getComponentTypes ( ) ) ; request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_NEW ) ; } else { request . setAttribute ( PARAM_VIEW_PAGE , AdminComponentMonitorPortlet . VIEW_EDIT ) ; } }

Fix:
if ( ( action == null ) || ( ( action . length ( ) ) == 0 ) ) {