final boolean separateFile = isSeparateFile(sourceName, normalizedSourceName);
final URI sourceUri = URI.create(normalizedSourceName).normalize();
if (config.isCacheInstrumentedCode() && instrumentedScriptCache.containsKey(sourceUri)) {
final ScriptData data = instrumentedScriptCache.get(sourceUri);
scriptDataList.add(data);
return data.getInstrumentedSourceCode();
}
final ScriptData data = addNewScriptData(sourceCode, separateFile, sourceUri);
final String instrumentedCode = instrument(lineNumber, data);
data.setInstrumentedSourceCode(instrumentedCode);
maybeCache(sourceUri, data);
maybeWriteInstrumentedCodeToDisk(separateFile, sourceUri, instrumentedCode);
return instrumentedCode;