ModuleData (@NotNull String moduleName) { ModuleData result = null; List<Pair<DataNode<ModuleData>, IdeaModule>> possiblePairs = myModuleNameIndex.get(moduleName); if (possiblePairs != null) { if (possiblePairs.size() == 1) { return possiblePairs.get(0).first.getData(); } else if (possiblePairs.size() > 1) { LOG.warn("Detected duplicate idea module names during import. Use Gradle 4.0+ or consider renaming in Gradle: " + possiblePairs); return possiblePairs.get(0).first.getData(); } } for (GradleBuildParticipant buildParticipant : myBuildParticipants) { result = buildParticipant.findModuleDataByName(moduleName); if (result != null) break; } return result; }