SourceSet (@Nullable final Project project, @NotNull final String name) { if (project == null) { return null; } SourceSetContainer sourceSets = JavaPluginUtil.getSourceSetContainer(project); return sourceSets == null ? null : sourceSets.findByName(name); }