AntBuildModelBase (@NotNull AntBuildFile buildFile) { AntBuildModelBase model = myModelToBuildFileMap.get(buildFile); if (model == null) { synchronized (myModelToBuildFileMap) { model = new AntBuildModelImpl(buildFile); final AntBuildModelBase prev = myModelToBuildFileMap.put(buildFile, model); if (prev != null) { model = prev; myModelToBuildFileMap.put(buildFile, prev); } } } return model; }