PyRequirement (@NotNull String line) { final Matcher matcher = REQUIREMENT.matcher(line); if (matcher.matches()) { final String name = matcher.group(NAME_GROUP); final List<PyRequirementVersionSpec> versionSpecs = parseVersionSpecs(matcher.group(REQUIREMENT_VERSIONS_SPECS_GROUP)); final List<String> installOptions = calculateRequirementInstallOptions(matcher); final String extras = matcher.group(REQUIREMENT_EXTRAS_GROUP); if (extras == null) { return new PyRequirementImpl(name, versionSpecs, installOptions, ""); } else { return new PyRequirementImpl(name, versionSpecs, installOptions, extras); } } return null; }