For migrates gone-wrong, or other unpredicted and unwanted situations, the system may believe that files should be in places where they are not. The just-in-time mode of this module can identify failed file requests, and then use some rules to try and find the missing file. As configured in the file_ownage settings, This could be from a nearby directory, a nested subfolder, recursive directory scans, or a remote web request and fetch. The idea being that if the file is not where it was expected, we look in a number of other places to fill it in, then patch up the system and the problem has gone.
When this process runs in just-in-time mode, it leverages (and requires) the stage_file_proxy module. This module extends and overrides stage_file_proxy behaviour so that instead of just 'fetching' the expected file from a nominated remote server, we search in a few extra places in a few extra ways.
Internally, this module replaces the 'service' that stage_file_proxy uses to 'fetch' things.