question: public IVariable [ ] extractRobotDebugVariables ( final int stackTraceId , final Map < String , Object > newVariables ) { final RobotDebugVariablesContext currentVariablesContext = findCurrentVariablesContext ( stackTraceId ) ; Map < String , IVariable > previousVariablesMap = initPreviousVariablesState ( currentVariablesContext ) ; final Map < String , IVariable > nonGlobalVariablesMap = new LinkedHashMap < > ( ) ; if ( previousVariablesMap == null ) { initNewNonGlobalVariables ( newVariables , nonGlobalVariablesMap ) ; } else { initVariablesComparingWithPreviousState ( newVariables , previousVariablesMap , nonGlobalVariablesMap ) ; } final LinkedList < IVariable > currentVariablesList = createCurrentVariablesList ( nonGlobalVariablesMap ) ; saveCurrentVariablesState ( stackTraceId , currentVariablesContext , nonGlobalVariablesMap ) ; return currentVariablesList . toArray ( new IVariable [ currentVariablesList . size ( ) ] ) ; }
target:  Extract and sort variables for given StackTrace level. Every level of StackTrace has its own context in previousVariables map. Current variables are compared with previous state. If current level of StackTrace has not any previous state, then previous state will be variables from level below. This is for saving previous order of variables in higher levels.