void (BidirectionalMap<PropertiesFile, PropertiesFile> parents, List<? extends PropertiesFile> files, Map<PropertiesFile, Set<String>> keysUpToParent, Map<PropertiesFile, Map<String, String>> propertiesFilesNamesMaps, InspectionManager manager, RefManager refManager, ProblemDescriptionsProcessor processor) { for (PropertiesFile file : files) { final Set<String> filePropertyKeys = new HashSet<>(propertiesFilesNamesMaps.get(file).keySet()); PropertiesFile parent = parents.get(file); while (parent != null) { final Collection<String> commonKeys = ContainerUtil.intersection(propertiesFilesNamesMaps.get(parent).keySet(), filePropertyKeys); for (final String commonKey : commonKeys) { final IProperty property = file.findPropertyByKey(commonKey); assert property != null; final String propertyValue = property.getValue(); if (propertyValue == null) { continue; } final String parentPropertyValue = propertiesFilesNamesMaps.get(parent).get(commonKey); if (parentPropertyValue == null) { continue; } final int occurrences = JavaI18nUtil.getPropertyValuePlaceholdersCount(propertyValue); final int parentOccurrences = JavaI18nUtil.getPropertyValuePlaceholdersCount(parentPropertyValue); if (occurrences != parentOccurrences) { final String problemDescriptorString = JavaI18nBundle.message("inconsistent.bundle.property.inconsistent.placeholders", parentOccurrences, parent.getName()); final PsiElement propertyPsiElement = property.getPsiElement(); processor.addProblemElement(refManager.getReference(file.getContainingFile()), manager.createProblemDescriptor(propertyPsiElement, problemDescriptorString, true, LocalQuickFix.EMPTY_ARRAY, ProblemHighlightType.GENERIC_ERROR_OR_WARNING) ); } } filePropertyKeys.removeAll(commonKeys); parent = parents.get(parent); } } }