Buggy code:
public class BSFSampler extends AbstractSampler { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String FILENAME = "BSFSampler.filename" ; private static final String SCRIPT = "BSFSampler.query" ; private static final String LANGUAGE = "BSFSampler.language" ; private static final String PARAMETERS = "BSFSampler.parameters" ; public BSFSampler ( ) { } public String getFilename ( ) { } public void setFilename ( String newFilename ) { } public String getScript ( ) { } public void setScript ( String newScript ) { } public String getParameters ( ) { } public void setParameters ( String newScript ) { } public String getScriptLanguage ( ) { } public void setScriptLanguage ( String lang ) { } public String getLabel ( ) { } public SampleResult sample ( Entry e ) { final String label = getLabel ( ) ; final String request = getScript ( ) ; final String fileName = getFilename ( ) ; BSFSampler . log . debug ( ( ( label + "<seq2seq4repair_space>" ) + fileName ) ) ; SampleResult res = new SampleResult ( ) ; res . setSampleLabel ( label ) ; FileInputStream is = null ; BSFEngine bsfEngine = null ; BSFManager mgr = new BSFManager ( ) ; res . setResponseCode ( "200" ) ; res . setResponseMessage ( "OK" ) ; res . setSuccessful ( true ) ; res . setDataType ( TEXT ) ; JMeterContext jmctx = JMeterContextService . getContext ( ) ; JMeterVariables vars = jmctx . getVariables ( ) ; Properties props = JMeterUtils . getJMeterProperties ( ) ; res . sampleStart ( ) ; try { mgr . declareBean ( "log" , BSFSampler . log , BSFSampler . log . getClass ( ) ) ; mgr . declareBean ( "Label" , label , String . class ) ; mgr . declareBean ( "FileName" , fileName , String . class ) ; mgr . declareBean ( "Parameters" , getParameters ( ) , String . class ) ; String [ ] args = JOrphanUtils . split ( getParameters ( ) , "<seq2seq4repair_space>" ) ; mgr . declareBean ( "args" , args , args . getClass ( ) ) ; mgr . declareBean ( "SampleResult" , res , res . getClass ( ) ) ; mgr . declareBean ( "ctx" , jmctx , jmctx . getClass ( ) ) ; mgr . declareBean ( "vars" , vars , vars . getClass ( ) ) ; mgr . declareBean ( "props" , props , props . getClass ( ) ) ; bsfEngine = mgr . loadScriptingEngine ( getScriptLanguage ( ) ) ; Object bsfOut = null ; if ( ( fileName . length ( ) ) > 0 ) { res . setSamplerData ( ( "File:<seq2seq4repair_space>" + fileName ) ) ; is = new FileInputStream ( fileName ) ; bsfOut = bsfEngine . eval ( fileName , 0 , 0 , IOUtils . toString ( is ) ) ; } else { <START_BUG> res . setSamplerData ( "[script]" ) ; <END_BUG> bsfOut = bsfEngine . eval ( "script" , 0 , 0 , request ) ; } if ( bsfOut != null ) { res . setResponseData ( bsfOut . toString ( ) . getBytes ( ) ) ; } } catch ( BSFException ex ) { BSFSampler . log . warn ( "BSF<seq2seq4repair_space>error" , ex ) ; res . setSuccessful ( false ) ; res . setResponseCode ( "500" ) ; res . setResponseMessage ( ex . toString ( ) ) ; } catch ( Exception ex ) { BSFSampler . log . warn ( "Problem<seq2seq4repair_space>evaluating<seq2seq4repair_space>the<seq2seq4repair_space>script" , ex ) ; res . setSuccessful ( false ) ; res . setResponseCode ( "500" ) ; res . setResponseMessage ( ex . toString ( ) ) ; } finally { res . sampleEnd ( ) ; IOUtils . closeQuietly ( is ) ; mgr . terminate ( ) ; } return res ; } }

Fix:
res . setSamplerData ( request ) ;