private Repository parseRepository(String lastLine, BufferedReader reader) throws IOException {
        String line = lastLine;
        Matcher matcher = mPlainTextRepositoryItemPattern.matcher(line);
        if (matcher.find()) {
            mRepositoryBuilder.url(matcher.group(1));
            mRepositoryBuilder.name(matcher.group(2));
            String type = matcher.group(3);
            if (Strings.notEmpty(type)) {
                mRepositoryBuilder.type(type);
            }
        }

        // Grab the description which is always on the next line. Also, bubble up the exceptions, no need to handle them this low.
        line = reader.readLine();
        mRepositoryBuilder.description(line);

        return mRepositoryBuilder.build();
    }