src/vs/workbench/services/extensions/common/abstractExtensionService.ts/ExtensionRunningLocationClassifier/determineRunningLocation
class ExtensionRunningLocationClassifier:	public determineRunningLocation(localExtensions: IExtensionDescription[], remoteExtensions: IExtensionDescription[]): Map<string, ExtensionRunningLocation> {
		const allExtensionKinds = new Map<string, ExtensionKind[]>();
		localExtensions.forEach(ext => allExtensionKinds.set(ExtensionIdentifier.toKey(ext.identifier), this.getExtensionKind(ext)));
		remoteExtensions.forEach(ext => allExtensionKinds.set(ExtensionIdentifier.toKey(ext.identifier), this.getExtensionKind(ext)));

		const localExtensionsSet = new Set<string>();
		localExtensions.forEach(ext => localExtensionsSet.add(ExtensionIdentifier.toKey(ext.identifier)));

		const localUnderDevelopmentExtensionsSet = new Set<string>();
		localExtensions.forEach((ext) => {
			if (ext.isUnderDevelopment) {
				localUnderDevelopmentExtensionsSet.add(ExtensionIdentifier.toKey(ext.identifier));
			}
		});

		const remoteExtensionsSet = new Set<string>();
		remoteExtensions.forEach(ext => remoteExtensionsSet.add(ExtensionIdentifier.toKey(ext.identifier)));

		const remoteUnderDevelopmentExtensionsSet = new Set<string>();
		remoteExtensions.forEach((ext) => {
			if (ext.isUnderDevelopment) {
				remoteUnderDevelopmentExtensionsSet.add(ExtensionIdentifier.toKey(ext.identifier));
			}
		});

		const pickRunningLocation = (extensionIdentifier: ExtensionIdentifier): ExtensionRunningLocation => {
			const isInstalledLocally = localExtensionsSet.has(ExtensionIdentifier.toKey(extensionIdentifier));
			const isInstalledRemotely = remoteExtensionsSet.has(ExtensionIdentifier.toKey(extensionIdentifier));

			const isLocallyUnderDevelopment = localUnderDevelopmentExtensionsSet.has(ExtensionIdentifier.toKey(extensionIdentifier));
			const isRemotelyUnderDevelopment = remoteUnderDevelopmentExtensionsSet.has(ExtensionIdentifier.toKey(extensionIdentifier));

			let preference = ExtensionRunningPreference.None;
			if (isLocallyUnderDevelopment && !isRemotelyUnderDevelopment) {
				preference = ExtensionRunningPreference.Local;
			} else if (isRemotelyUnderDevelopment && !isLocallyUnderDevelopment) {
				preference = ExtensionRunningPreference.Remote;
			}

			const extensionKinds = allExtensionKinds.get(ExtensionIdentifier.toKey(extensionIdentifier)) || [];
			return this.pickRunningLocation(extensionKinds, isInstalledLocally, isInstalledRemotely, preference);
		};

		const runningLocation = new Map<string, ExtensionRunningLocation>();
		localExtensions.forEach(ext => runningLocation.set(ExtensionIdentifier.toKey(ext.identifier), pickRunningLocation(ext.identifier)));
		remoteExtensions.forEach(ext => runningLocation.set(ExtensionIdentifier.toKey(ext.identifier), pickRunningLocation(ext.identifier)));
		return runningLocation;
	}