public DiffStyler setFiles(final Collection<GitHubFile> files) {
        diffs.clear();
        if (files == null || files.isEmpty()) {
            return this;
        }

        for (GitHubFile file : files) {
            String patch = file.patch();
            if (TextUtils.isEmpty(patch)) {
                continue;
            }

            int start = 0;
            int length = patch.length();
            int end = nextLine(patch, start, length);
            List<CharSequence> lines = new ArrayList<>();
            while (start < length) {
                lines.add(patch.substring(start, end));
                start = end + 1;
                end = nextLine(patch, start, length);
            }
            diffs.put(file.filename(), lines);
        }
        return this;
    }
Set files to styler

@param files
@return this styler
app/src/main/java/com/github/pockethub/android/ui/commit/DiffStyler.java