Buggy code:
public class PluginsView extends Controller { private DBService db ; private MetricActivator ma ; private PluginAdmin pa ; StringBuilder e = new StringBuilder ( ) ; String reqParAction = "action" ; String reqParHashcode = "pluginHashcode" ; String reqParPropName = "propertyName" ; String reqParPropDescr = "propertyDescription" ; String reqParPropType = "propertyType" ; String reqParPropValue = "propertyValue" ; String reqParShowProp = "showProperties" ; String reqParShowActv = "showActivators" ; String actValInstall = "installPlugin" ; String actValUninstall = "uninstallPlugin" ; String actValSync = "syncPlugin" ; String actValReqAddProp = "createProperty" ; String actValReqUpdProp = "updateProperty" ; String actValConAddProp = "confirmProperty" ; String actValConRemProp = "removeProperty" ; String reqValAction = "" ; String reqValHashcode = null ; String reqValPropName = null ; String reqValPropDescr = null ; String reqValPropType = null ; String reqValPropValue = null ; boolean reqValShowProp = false ; boolean reqValShowActv = false ; PluginInfo selPI = null ; @ Inject public PluginsView ( @ Assisted BundleContext bundlecontext , DBService db , MetricActivator ma , PluginAdmin pa ) { } @ Action ( uri = "//index" , template = "index.html" , method = "GET" ) public void indexGet ( HttpServletRequest req , VelocityContext vc ) { } @ Action ( uri = "//index" , template = "index.html" , method = "POST" ) public void indexPost ( HttpServletRequest req , VelocityContext vc ) { } @ Action ( uri = "//" , template = "index.html" , method = "GET" ) public void homeGet ( HttpServletRequest req , VelocityContext vc ) { } @ Action ( uri = "//" , template = "index.html" , method = "POST" ) public void render ( HttpServletRequest req , VelocityContext vc ) { } public String getPluginClass ( PluginInfo i ) { } private void initializeRequest ( HttpServletRequest req ) { } private void intializeSelPI ( ) { } private void generateHTML ( VelocityContext vc ) { vc . put ( "reqValAction" , reqValAction ) ; vc . put ( "reqValHashcode" , reqValHashcode ) ; vc . put ( "reqValPropName" , reqValPropName ) ; vc . put ( "reqValPropDesc" , reqValPropDescr ) ; vc . put ( "reqValPropType" , reqValPropType ) ; vc . put ( "reqValPropValue" , reqValPropValue ) ; vc . put ( "reqValShowProp" , reqValShowProp ) ; vc . put ( "reqValShowActv" , reqValShowActv ) ; vc . put ( "content" , "plugins//content.html" ) ; if ( ( e . length ( ) ) > 0 ) { vc . put ( "errors" , e ) ; vc . put ( "errorList" , "plugins//errors.html" ) ; } if ( ( selPI ) != null ) { vc . put ( "plugin" , selPI ) ; } if ( ( selPI ) != null ) { if ( ( selPI . installed ) && ( ( reqValAction . equals ( actValReqAddProp ) ) || ( reqValAction . equals ( actValReqUpdProp ) ) ) ) { vc . put ( "createProperty" , "plugins//createProperty.html" ) ; boolean update = selPI . hasConfProp ( reqValPropName , reqValPropType ) ; vc . put ( "update" , update ) ; vc . put ( "ConfigurationTypes" , ConfigurationType . values ( ) ) ; } else { vc . put ( "pluginPage" , "plugins//plugin.html" ) ; if ( selPI . installed ) { List < Metric > metrics = pa . getPlugin ( selPI ) . getAllSupportedMetrics ( ) ; <START_BUG> vc . put ( "metrics" , metrics ) ; <END_BUG> Set < PluginConfiguration > config = Plugin . getPluginByHashcode ( selPI . getHashcode ( ) ) . getConfigurations ( ) ; vc . put ( "pluginConfigs" , config ) ; } } } else { Collection < PluginInfo > l = pa . listPlugins ( ) ; vc . put ( "list" , "plugins//list.html" ) ; vc . put ( "pluginList" , l ) ; } } No newline ; at end ; of file ; }

Fix:
vc . put ( "PluginMetrics" , metrics ) ;