Source:
<code>public static void acceptResourceResolverVisitor(@NotNull AndroidFacet facet, @NotNull ResourceFolderVisitor visitor) { IdeaAndroidProject ideaAndroidProject = facet.getIdeaAndroidProject(); <START> if (ideaAndroidProject != null) { <END> assert facet.isGradleProject(); AndroidProject project = ideaAndroidProject.getDelegate(); Collection<BuildTypeContainer> buildTypes = project.getBuildTypes(); Collection<ProductFlavorContainer> productFlavors = project.getProductFlavors(); Set<SourceProvider> selectedProviders = Sets.newHashSet(); selectedProviders.add(facet.getBuildTypeSourceProvider()); for (ResourceFolderRepository repository : getResourceFolderRepositoryFromSourceSet(facet, facet.getBuildTypeSourceProvider())) { visitor.visitResourceFolder(repository, true); } selectedProviders.add(facet.getMultiFlavorSourceProvider()); for (ResourceFolderRepository repository : getResourceFolderRepositoryFromSourceSet(facet, facet.getMultiFlavorSourceProvider())) { visitor.visitResourceFolder(repository, true); } for (BuildTypeContainer buildType : buildTypes) { if (selectedProviders.add(buildType.getSourceProvider())) { for (ResourceFolderRepository repository : getResourceFolderRepositoryFromSourceSet(facet, buildType.getSourceProvider())) { visitor.visitResourceFolder(repository, false); } } } for (ProductFlavorContainer productFlavor : productFlavors) { if (selectedProviders.add(productFlavor.getSourceProvider())) { for (ResourceFolderRepository repository : getResourceFolderRepositoryFromSourceSet(facet, productFlavor.getSourceProvider())) { visitor.visitResourceFolder(repository, false); } } } } else { visitor.visitResourceFolder(AppResourceRepository.getAppResources(facet, true), true); } }</code><technical_language>swap if else clause, return out of method in IdeaAndroidProject == null case, this get rid of indentation level</technical_language>

Target:
public static void acceptResourceResolverVisitor(@NotNull AndroidFacet facet, @NotNull ResourceFolderVisitor visitor) { IdeaAndroidProject ideaAndroidProject = facet.getIdeaAndroidProject(); if (ideaAndroidProject == null) { visitor.visitResourceFolder(AppResourceRepository.getAppResources(facet, true), true); return; } assert facet.isGradleProject(); AndroidProject project = ideaAndroidProject.getDelegate(); Collection<BuildTypeContainer> buildTypes = project.getBuildTypes(); Collection<ProductFlavorContainer> productFlavors = project.getProductFlavors(); Set<SourceProvider> selectedProviders = Sets.newHashSet(); selectedProviders.add(facet.getBuildTypeSourceProvider()); for (ResourceFolderRepository repository : getResourceFolderRepositoiesFromSourceSet(facet, facet.getBuildTypeSourceProvider())) { visitor.visitResourceFolder(repository, true); } selectedProviders.add(facet.getMultiFlavorSourceProvider()); for (ResourceFolderRepository repository : getResourceFolderRepositoiesFromSourceSet(facet, facet.getMultiFlavorSourceProvider())) { visitor.visitResourceFolder(repository, true); } for (BuildTypeContainer buildType : buildTypes) { if (selectedProviders.add(buildType.getSourceProvider())) { for (ResourceFolderRepository repository : getResourceFolderRepositoiesFromSourceSet(facet, buildType.getSourceProvider())) { visitor.visitResourceFolder(repository, false); } } } for (ProductFlavorContainer productFlavor : productFlavors) { if (selectedProviders.add(productFlavor.getSourceProvider())) { for (ResourceFolderRepository repository : getResourceFolderRepositoiesFromSourceSet(facet, productFlavor.getSourceProvider())) { visitor.visitResourceFolder(repository, false); } } } }