Source:
<code>public static boolean isScannerInformationEmpty(IResource resource) { if (resource == null) { return true; } IProject project = resource.getProject(); CProjectDescriptionManager mngr = CProjectDescriptionManager.getInstance(); ICProjectDescription des = mngr.getProjectDescription(project, false); if(des != null){ ICConfigurationDescription indexCfg = des.getDefaultSettingConfiguration(); if(indexCfg != null){ <START> if (!ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(project) || <END> !mngr.isNewStyleCfg(indexCfg)) { return oldIsScannerInformationEmpty(resource); } if (indexCfg instanceof ILanguageSettingsProvidersKeeper) { List<String> languageIds = LanguageSettingsManager.getLanguages(resource, indexCfg); for (String langId : languageIds) { List<ICLanguageSettingEntry> entries = LanguageSettingsProvidersSerializer.getSettingEntriesByKind(indexCfg, resource, langId, ICSettingEntry.INCLUDE_PATH | ICSettingEntry.MACRO | ICSettingEntry.INCLUDE_FILE | ICSettingEntry.MACRO_FILE); if (!(entries == null || entries.isEmpty())) { return false; } } return true; } else { ICLanguageSetting lSetting = indexCfg.getLanguageSettingForFile(resource.getProjectRelativePath(), false); if(lSetting != null && lSetting instanceof CLanguageSettingCache){ if(!((CLanguageSettingCache)lSetting).containsDiscoveredScannerInfo()) lSetting = null; } if(lSetting != null){ ICLanguageSettingEntry[] entries = lSetting.getSettingEntries(ICSettingEntry.INCLUDE_PATH); if(entries.length != 0) return false; entries = lSetting.getSettingEntries(ICSettingEntry.MACRO); if(entries.length != 0) return false; entries = lSetting.getSettingEntries(ICSettingEntry.INCLUDE_FILE); if(entries.length != 0) return false; entries = lSetting.getSettingEntries(ICSettingEntry.MACRO_FILE); if(entries.length != 0) return false; } } } } return true; }</code><technical_language>This place is correct check for LSP legacy support</technical_language>

Target:
public static boolean isScannerInformationEmpty(IResource resource) { if (resource == null) { return true; } IProject project = resource.getProject(); CProjectDescriptionManager mngr = CProjectDescriptionManager.getInstance(); ICProjectDescription des = mngr.getProjectDescription(project, false); if(des != null){ ICConfigurationDescription indexCfg = des.getDefaultSettingConfiguration(); if(indexCfg != null){ if (!mngr.isNewStyleCfg(indexCfg)) { return oldIsScannerInformationEmpty(resource); } if (ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(project) && indexCfg instanceof ILanguageSettingsProvidersKeeper) { List<String> languageIds = LanguageSettingsManager.getLanguages(resource, indexCfg); for (String langId : languageIds) { List<ICLanguageSettingEntry> entries = LanguageSettingsProvidersSerializer.getSettingEntriesByKind(indexCfg, resource, langId, ICSettingEntry.INCLUDE_PATH | ICSettingEntry.MACRO | ICSettingEntry.INCLUDE_FILE | ICSettingEntry.MACRO_FILE); if (!(entries == null || entries.isEmpty())) { return false; } } return true; } else { ICLanguageSetting lSetting = indexCfg.getLanguageSettingForFile(resource.getProjectRelativePath(), false); if(lSetting != null && lSetting instanceof CLanguageSettingCache){ if(!((CLanguageSettingCache)lSetting).containsDiscoveredScannerInfo()) lSetting = null; } if(lSetting != null){ ICLanguageSettingEntry[] entries = lSetting.getSettingEntries(ICSettingEntry.INCLUDE_PATH); if(entries.length != 0) return false; entries = lSetting.getSettingEntries(ICSettingEntry.MACRO); if(entries.length != 0) return false; entries = lSetting.getSettingEntries(ICSettingEntry.INCLUDE_FILE); if(entries.length != 0) return false; entries = lSetting.getSettingEntries(ICSettingEntry.MACRO_FILE); if(entries.length != 0) return false; } } } } return true; }