Buggy code:
public class RelativeQueryRTStrategy implements IEDCAnalysisStrategy { private EDCDetectionController controller ; private double perfReqThreshold ; private double perfReqConfidence ; private double perfReqRelativeQueryRT ; private double perfReqRelativeQueryRTDiff ; private long numUsers ; private Dataset hierarchyResponseTimes ; private Dataset singleUserResponseTimes ; private Dataset multiUserResponseTimes ; private Dataset singleUserQueries ; private Dataset multiUserQueries ; private Dataset stackTraceQueries ; private Dataset singleUserThreadTracing ; private Dataset multiUserThreadTracing ; private Dataset stackTraces ; boolean validData = false ; String invalidDataMessage = "" ; @ Override public void init ( Properties problemDetectionConfiguration , EDCDetectionController controller ) { } @ Override public void setMeasurementData ( DatasetCollection data ) { validData = false ; ParameterSelection selectHierarchyExp = new ParameterSelection ( ) . select ( KEY_EXPERIMENT_NAME , NAME_HIERARCHY_EXP ) ; ParameterSelection selectSingleUserExp = new ParameterSelection ( ) . select ( KEY_EXPERIMENT_NAME , NAME_SINGLE_USER_EXP ) ; ParameterSelection selectMultiUserExp = new ParameterSelection ( ) . select ( KEY_EXPERIMENT_NAME , NAME_MAIN_EXP ) ; ParameterSelection selectStackTraceExp = new ParameterSelection ( ) . select ( KEY_EXPERIMENT_NAME , NAME_STACK_TRACE_EXP ) ; Dataset rtDataset = data . getDataSet ( ResponseTimeRecord . class ) ; if ( ( rtDataset == null ) || ( ( rtDataset . size ( ) ) == 0 ) ) { invalidDataMessage = "Instrumentation<seq2seq4repair_space>achieved<seq2seq4repair_space>no<seq2seq4repair_space>response<seq2seq4repair_space>time<seq2seq4repair_space>results<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>scope!" ; return ; } hierarchyResponseTimes = selectHierarchyExp . applyTo ( rtDataset ) ; singleUserResponseTimes = selectSingleUserExp . applyTo ( rtDataset ) ; multiUserResponseTimes = selectMultiUserExp . applyTo ( rtDataset ) ; Dataset sqlDataset = data . getDataSet ( SQLQueryRecord . class ) ; for ( SQLQueryRecord record : sqlDataset . getRecords ( SQLQueryRecord . class ) ) { <START_BUG> record . setQueryString ( LpeStringUtils . getGeneralizedQuery ( record . getQueryString ( ) ) ) ; <END_BUG> } if ( ( sqlDataset == null ) || ( ( sqlDataset . size ( ) ) == 0 ) ) { invalidDataMessage = "Instrumentation<seq2seq4repair_space>achieved<seq2seq4repair_space>no<seq2seq4repair_space>query<seq2seq4repair_space>results<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>scope!" ; return ; } singleUserQueries = selectSingleUserExp . applyTo ( sqlDataset ) ; multiUserQueries = selectMultiUserExp . applyTo ( sqlDataset ) ; stackTraceQueries = selectStackTraceExp . applyTo ( sqlDataset ) ; Dataset ttDataset = data . getDataSet ( ThreadTracingRecord . class ) ; if ( ( ttDataset == null ) || ( ( ttDataset . size ( ) ) == 0 ) ) { invalidDataMessage = "Instrumentation<seq2seq4repair_space>achieved<seq2seq4repair_space>no<seq2seq4repair_space>thread<seq2seq4repair_space>tracing<seq2seq4repair_space>results<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>scope!" ; return ; } singleUserThreadTracing = selectSingleUserExp . applyTo ( ttDataset ) ; multiUserThreadTracing = selectMultiUserExp . applyTo ( ttDataset ) ; Dataset stDataset = data . getDataSet ( StackTraceRecord . class ) ; if ( ( stDataset == null ) || ( ( stDataset . size ( ) ) == 0 ) ) { invalidDataMessage = "Instrumentation<seq2seq4repair_space>achieved<seq2seq4repair_space>no<seq2seq4repair_space>stack<seq2seq4repair_space>trace<seq2seq4repair_space>results<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>scope!" ; return ; } stackTraces = selectStackTraceExp . applyTo ( stDataset ) ; validData = true ; } @ Override public SpotterResult analyze ( ) { } private Set < String > getCriticalServlets ( MethodCallSet servletQueryHierarchy ) { } private Map < String , Double > getReqViolatingQueries ( MethodCallSet servletQueryHierarchy ) { } private void filterViolatingReqQueriesBySingleUserTest ( Map < String , Double > violatingReqQueriesART , MethodCallSet servletQueryHierarchy , MethodCallSet singleUserServletQueryHierarchy ) { } private SpotterResult generateResult ( MethodCallSet servletQueryHierarchy , MethodCallSet singleUserServletQueryHierarchy , Map < String , Double > violatingReqQueriesART ) { } private void createCharts ( String servlet , String query , long numMaxUsers , NumericPairList < Long , Long > multiUserServletRTs , NumericPairList < Long , Long > multiUserQueryRTs , NumericPairList < Long , Long > singleUserServletRTs , NumericPairList < Long , Long > singleUserQueryRTs , SpotterResult result ) { } }

Fix:
record . setQueryString ( LpeStringUtils . getGeneralizedQuery ( record . getQueryString ( ) . replace ( "#sc#" , ";" ) ) ) ;