Buggy code:
protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } public class ExecutionEngineThread extends Thread { String jobID = null ; String modelID = null ; public boolean OctaveExecutionSuccessful = false ; public boolean WholeJobFinishedSuccessful = true ; String outputLog = "" ; String analysisDataMovementLog = "" ; String outputFolderURLPath = "http:////api.wiki-health.org:55555//healthbook//as//getFile?path=" ; ArrayList < ASInput > inputList = new ArrayList < ASInput > ( ) ; ArrayList < ASOutput > outputList = new ArrayList < ASOutput > ( ) ; public void run ( ) { System . out . println ( "Hello<seq2seq4repair_space>from<seq2seq4repair_space>a<seq2seq4repair_space>thread!" ) ; String modelRepository = "F://model_repository//" + ( modelID ) ; String tmpfolderPath = ( "F://model_repository//" + ( modelID ) ) + "//" ; String jobfolderPath = ( "F://job_folder//" + ( jobID ) ) + "//" ; if ( ! ( new File ( modelRepository ) . exists ( ) ) ) { modelRepository = ServerConfigUtil . getConfigValue ( modelRepository ) ; String tmpFolder = ServerConfigUtil . getConfigValue ( tmpRepository ) ; UUID uuid = UUID . randomUUID ( ) ; tmpfolderPath = ( tmpFolder + ( uuid . toString ( ) ) ) + "//" ; modelRepository = modelRepository + ( modelID ) ; if ( new File ( tmpfolderPath ) . exists ( ) ) { new File ( tmpfolderPath ) . delete ( ) ; } try { FileUtils . copyDirectory ( new File ( modelRepository ) , new File ( tmpfolderPath ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } String jobFolder = ServerConfigUtil . getConfigValue ( jobDir ) ; jobfolderPath = ( jobFolder + ( jobID ) ) + "//" ; } outputFolderURLPath = ( ( ( outputFolderURLPath ) + "//" ) + ( jobID ) ) + "//" ; File folder = new File ( tmpfolderPath ) ; File jobFolder = new File ( jobfolderPath ) ; if ( ! ( jobFolder . exists ( ) ) ) { jobFolder . mkdir ( ) ; } AnalysisServiceDAO asDao = new AnalysisServiceDAO ( ) ; AnalysisResult result = asDao . getJobResultByID ( jobID ) ; try { AnalysisWrapperUtil awU = new AnalysisWrapperUtil ( ) ; StringWriter stdout = new StringWriter ( ) ; OctaveEngineFactory octaveFactory = new OctaveEngineFactory ( ) ; octaveFactory . setWorkingDir ( folder ) ; OctaveEngine octave = octaveFactory . getScriptEngine ( ) ; try { octave . setWriter ( stdout ) ; octave . eval ( "addpath(\"signal_package\")" ) ; octave . eval ( "addpath(\"general_package\")" ) ; for ( ASInput input : inputList ) { if ( input . getType ( ) . equals ( "string" ) ) { OctaveString octaveInput = new OctaveString ( ( ( String ) ( input . getSource ( ) ) ) ) ; octave . put ( input . getName ( ) , octaveInput ) ; } } String mainFunctionString = awU . createMainFunction ( "main" , inputList , outputList ) ; System . out . println ( ( "mainFunctionString:" + mainFunctionString ) ) ; octave . eval ( mainFunctionString ) ; OctaveExecutionSuccessful = true ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; System . out . println ( ex . getMessage ( ) ) ; outputLog = ( outputLog ) + ( ex . getMessage ( ) ) ; analysisDataMovementLog = ( analysisDataMovementLog ) + ( ex . getMessage ( ) ) ; OctaveExecutionSuccessful = false ; WholeJobFinishedSuccessful = false ; } if ( OctaveExecutionSuccessful ) { for ( int i = 0 ; i < ( outputList . size ( ) ) ; i ++ ) { ASOutput output = outputList . get ( i ) ; if ( ( output . getType ( ) . equalsIgnoreCase ( sensordataType ) ) && ( ! ( output . getDataAction ( ) . equalsIgnoreCase ( dataaction_ignore ) ) ) ) { OctaveCell octaveResult = ( ( OctaveCell ) ( octave . get ( output . getName ( ) ) ) ) ; <START_BUG> List < JsonDataPoints > datapointsList = awU . unwrapOctaveSensorData ( octaveResult ) ; <END_BUG> if ( datapointsList == null ) { System . out . println ( "some<seq2seq4repair_space>problem---:datapointsList<seq2seq4repair_space>==<seq2seq4repair_space>null" ) ; } else { DBtoJsonUtil dbtoJUtil = new DBtoJsonUtil ( ) ; HBaseDataImport importData = new HBaseDataImport ( ) ; DatastreamDAO dsDao = new DatastreamDAO ( ) ; String datastreamID = output . getSource ( ) ; importData . setData_points ( datapointsList ) ; HBaseDatapointDAO importDao = new HBaseDatapointDAO ( ) ; Datastream datastream = dsDao . getDatastream ( datastreamID , true , false ) ; importData . setDatastream_id ( datastream . getStreamId ( ) ) ; try { importData . setDatastream ( dbtoJUtil . convertDatastream ( datastream , null ) ) ; int totalStoredByte = importDao . importDatapointsDatapoints ( importData ) ; analysisDataMovementLog = ( ( ( ( ( analysisDataMovementLog ) + "<p>Data<seq2seq4repair_space>Stored<seq2seq4repair_space>Successfully<seq2seq4repair_space>for<seq2seq4repair_space>datastream<seq2seq4repair_space>ID:<seq2seq4repair_space>" ) + datastreamID ) + ",<seq2seq4repair_space>total<seq2seq4repair_space>bytes:" ) + totalStoredByte ) + "<//p>" ; output . setValue ( datastream . getTitle ( ) ) ; outputList . set ( i , output ) ; System . out . println ( totalStoredByte ) ; } catch ( ErrorCodeException ex ) { WholeJobFinishedSuccessful = false ; if ( ex . getErrorCode ( ) . equals ( Input_data_contains_invalid_unit_id ) ) { analysisDataMovementLog = ( ( analysisDataMovementLog ) + "<p>Contains<seq2seq4repair_space>Invalid<seq2seq4repair_space>UnitID" ) + "<//p>" ; } else { analysisDataMovementLog = ( ( analysisDataMovementLog ) + "<p>Internal<seq2seq4repair_space>Error<seq2seq4repair_space>unknown<seq2seq4repair_space>type" ) + "<//p>" ; } } catch ( Exception ex ) { WholeJobFinishedSuccessful = false ; ex . printStackTrace ( ) ; analysisDataMovementLog = ( ( analysisDataMovementLog ) + "<p>Internal<seq2seq4repair_space>Error" ) + "<//p>" ; } } } else if ( output . getType ( ) . equalsIgnoreCase ( fileType ) ) { OctaveString fileOutput = ( ( OctaveString ) ( octave . get ( output . getName ( ) ) ) ) ; File outputFile = new File ( ( tmpfolderPath + ( fileOutput . getString ( ) ) ) ) ;

Fix:
List < JsonDataPoints > datapointsList = awU . unwrapOctaveSensorData ( octaveResult , null ) ;