code: private void splitBundlesByType(List<JoinableResourceBundle> bundles) {
  		// Temporary lists (CopyOnWriteArrayList does not support sort())
  		List<JoinableResourceBundle> tmpGlobal = new ArrayList<>();
  		List<JoinableResourceBundle> tmpContext = new ArrayList<>();
  
  		for (JoinableResourceBundle bundle : bundles) {
  			if (bundle.getInclusionPattern().isGlobal()) {
  				tmpGlobal.add(bundle);
  			} else {
  				tmpContext.add(bundle);
  			}
  		}
  
  		// Sort the global bundles
  		Collections.sort(tmpGlobal, new GlobalResourceBundleComparator());
  
  		globalBundles = new CopyOnWriteArrayList<>();
  		globalBundles.addAll(tmpGlobal);
  
  		contextBundles = new CopyOnWriteArrayList<>();
  		contextBundles.addAll(tmpContext);
  
  		initBundlePrefixes();
  
  		initCompositeBundleMap(globalBundles);
  		initCompositeBundleMap(contextBundles);
  	}
docs: Splits the bundles in two lists, one for global lists and other for the
  remaining bundles.