Buggy code:
public class BeanShellSampler extends BeanShellTestElement implements Sampler { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final long serialVersionUID = 3 ; public static final String FILENAME = "BeanShellSampler.filename" ; public static final String SCRIPT = "BeanShellSampler.query" ; public static final String PARAMETERS = "BeanShellSampler.parameters" ; public static final String INIT_FILE = "beanshell.sampler.init" ; public static final String RESET_INTERPRETER = "BeanShellSampler.resetInterpreter" ; protected String getInitFileProperty ( ) { } public String getLabel ( ) { } public String getScript ( ) { } public String getFilename ( ) { } public String getParameters ( ) { } public boolean isResetInterpreter ( ) { } public SampleResult sample ( Entry e ) { SampleResult res = new SampleResult ( ) ; boolean isSuccessful = false ; res . setSampleLabel ( getLabel ( ) ) ; res . sampleStart ( ) ; final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter ( ) ; if ( bshInterpreter == null ) { res . sampleEnd ( ) ; res . setResponseCode ( "503" ) ; res . setResponseMessage ( "BeanShell<seq2seq4repair_space>Interpreter<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ; res . setSuccessful ( false ) ; return res ; } try { String request = getScript ( ) ; String fileName = getFilename ( ) ; if ( ( fileName . length ( ) ) == 0 ) { res . setSamplerData ( request ) ; } else { res . setSamplerData ( fileName ) ; } bshInterpreter . set ( "Label" , getLabel ( ) ) ; bshInterpreter . set ( "FileName" , getFilename ( ) ) ; bshInterpreter . set ( "SampleResult" , res ) ; bshInterpreter . set ( "Parameters" , getParameters ( ) ) ; bshInterpreter . set ( "bsh.args" , JOrphanUtils . split ( getParameters ( ) , "<seq2seq4repair_space>" ) ) ; bshInterpreter . set ( "ResponseCode" , "200" ) ; bshInterpreter . set ( "ResponseMessage" , "OK" ) ; bshInterpreter . set ( "IsSuccess" , true ) ; JMeterContext jmctx = JMeterContextService . getContext ( ) ; JMeterVariables vars = jmctx . getVariables ( ) ; bshInterpreter . set ( "ctx" , jmctx ) ; bshInterpreter . set ( "vars" , vars ) ; res . setDataType ( TEXT ) ; Object bshOut ; if ( ( fileName . length ( ) ) == 0 ) { bshOut = bshInterpreter . eval ( request ) ; } else { bshOut = bshInterpreter . source ( fileName ) ; } if ( bshOut != null ) { String out = bshOut . toString ( ) ; res . setResponseData ( out . getBytes ( ) ) ; } res . setResponseCode ( bshInterpreter . get ( "ResponseCode" ) . toString ( ) ) ; res . setResponseMessage ( bshInterpreter . get ( "ResponseMessage" ) . toString ( ) ) ; isSuccessful = Boolean . valueOf ( bshInterpreter . get ( "IsSuccess" ) . toString ( ) ) . booleanValue ( ) ; } catch ( NoClassDefFoundError ex ) { BeanShellSampler . log . error ( ( "BeanShell<seq2seq4repair_space>Jar<seq2seq4repair_space>missing?<seq2seq4repair_space>" + ( ex . toString ( ) ) ) ) ; res . setResponseCode ( "501" ) ; res . setResponseMessage ( ex . toString ( ) ) ; <START_BUG> response . setStopThread ( true ) ; <END_BUG> } catch ( Exception ex ) { BeanShellSampler . log . warn ( ex . toString ( ) ) ; res . setResponseCode ( "500" ) ; res . setResponseMessage ( ex . toString ( ) ) ; } res . sampleEnd ( ) ; res . setSuccessful ( isSuccessful ) ; return res ; } }

Fix:
res . setStopThread ( true ) ;