Buggy code:
@ Service ( "nginxService" ) public class NginxServiceImpl implements NginxService { private static final Logger LOGGER = LoggerFactory . getLogger ( NginxServiceImpl . class ) ; private static DynamicIntProperty adminServerPort = DynamicPropertyFactory . getInstance ( ) . getIntProperty ( "server.port" , 8099 ) ; private static DynamicIntProperty dyupsPort = DynamicPropertyFactory . getInstance ( ) . getIntProperty ( "dyups.port" , 8081 ) ; @ Resource private SlbRepository slbRepository ; @ Resource private GroupRepository groupRepository ; @ Resource private NginxConfService nginxConfService ; @ Resource private NginxServerDao nginxServerDao ; @ Resource private RollingTrafficStatus rollingTrafficStatus ; private Logger logger = LoggerFactory . getLogger ( NginxServiceImpl . class ) ; @ Override public NginxResponse writeToDisk ( ) throws Exception { } @ Override public boolean writeALLToDisk ( Long slbId ) throws Exception { } @ Override public List < NginxResponse > writeALLToDiskListResult ( Long slbId ) throws Exception { } public boolean writeALLToDisk ( Long slbId , List < NginxResponse > responses ) throws Exception { } @ Override public NginxResponse load ( ) throws Exception { } @ Override public List < NginxResponse > loadAll ( Long slbId ) throws Exception { } @ Override public List < NginxResponse > writeAllAndLoadAll ( Long slbId ) throws Exception { } @ Override public NginxResponse dyopsLocal ( String upsName , String upsCommands ) throws Exception { } @ Override public List < NginxResponse > dyops ( Long slbId , List < DyUpstreamOpsData > dyups ) throws Exception { } @ Override public NginxServerStatus getStatus ( ) throws Exception { } @ Override public List < NginxServerStatus > getStatusAll ( Long slbId ) throws Exception { } @ Override public List < ReqStatus > getTrafficStatusBySlb ( Long slbId , int count , boolean aggregatedByGroup , boolean aggregatedBySlbServer ) throws Exception { } private List < ReqStatus > getTrafficStatusBySlb ( Long slbId , int count ) throws Exception { } private List < ReqStatus > aggregateByKey ( List < ReqStatus > raw , boolean group , boolean slbServer , Long slbId ) { } private String genKey ( ReqStatus reqStatus , boolean group , boolean slbServer ) { final DateFormat formatter = new SimpleDateFormat ( "yyyyMMddHHmm" ) ; String time = formatter . format ( reqStatus . getTime ( ) ) ; if ( group ) <START_BUG> return ( time + "-" ) + ( reqStatus . getGroupName ( ) ) ; <END_BUG> if ( slbServer ) return ( time + "-" ) + ( reqStatus . getHostName ( ) ) ; return time + "" ; } @ Override public List < ReqStatus > getTrafficStatusBySlb ( String groupName , Long slbId , int count ) throws Exception { } @ Override public List < ReqStatus > getLocalTrafficStatus ( int count ) { } @ Override public List < ReqStatus > getLocalTrafficStatus ( String groupName , int count ) { } private void writeConfToDisk ( Long slbId , int version , NginxOperator nginxOperator ) throws Exception { } private static String buildRemoteUrl ( String ip ) { } private void writeNginxConf ( Long slbId , int version , NginxOperator nginxOperator ) throws Exception { } private void writeServerConf ( Long slbId , int version , NginxOperator nginxOperator ) throws Exception { } private void writeUpstreamConf ( Long slbId , int version , NginxOperator nginxOperator ) throws Exception { } private void cleanConfOnDisk ( Long slbId , int version , NginxOperator nginxOperator ) throws Exception { } }

Fix:
return ( time + "-" ) + ( reqStatus . getGroupId ( ) ) ;