// Path: GerritStats/src/main/java/com/holmsted/gerrit/GerritStatParser.java
// public static class ParserContext {
//     final GerritVersion version;
// 
//     ParserContext(@Nonnull GerritVersion version) {
//         this.version = version;
//     }
// }
// 
// Path: GerritCommon/src/main/java/com/holmsted/json/JsonUtils.java
// public final class JsonUtils {
// 
//     @Nonnull
//     public static JSONObject readJsonString(String jsonString) {
//         return new JSONObject(new JSONTokener(jsonString));
//     }
// 
//     @Nonnull
//     public static List<String> readStringArray(JSONArray array) {
//         List<String> list = new ArrayList<>();
//         for (int i = 0; i < array.length(); ++i) {
//             list.add(array.getString(i));
//         }
//         return list;
//     }
// 
//     private JsonUtils() {
//     }
// }


import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import com.holmsted.gerrit.GerritStatParser.ParserContext;
import com.holmsted.json.JsonUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

        @SuppressWarnings("PMD")
        public PatchSet(int number,
                        @Nullable String revision,
                        @Nonnull List<String> parents,
                        @Nullable String ref,
                        @Nullable Identity uploader,
                        long createdOnDate,
                        @Nullable Identity author,
                        boolean isDraft,
                        @Nonnull PatchSetKind kind,
                        @Nonnull List<Approval> approvals,
                        @Nonnull List<PatchSetComment> comments,
                        int sizeInsertions,
                        int sizeDeletions) {
            this.number = number;
            this.revision = revision;
            this.parents = parents;
            this.ref = ref;
            this.uploader = uploader;
            this.createdOnDate = createdOnDate;
            this.author = author;
            this.isDraft = isDraft;
            this.kind = kind;
            this.approvals = ImmutableList.copyOf(approvals);
            this.comments = ImmutableList.copyOf(comments);
            this.sizeInsertions = sizeInsertions;
            this.sizeDeletions = sizeDeletions;
        }

// Path: GerritStats/src/main/java/com/holmsted/gerrit/GerritStatParser.java
// public static class ParserContext {
//     final GerritVersion version;
// 
//     ParserContext(@Nonnull GerritVersion version) {
//         this.version = version;
//     }
// }
// 
// Path: GerritCommon/src/main/java/com/holmsted/json/JsonUtils.java
// public final class JsonUtils {
// 
//     @Nonnull
//     public static JSONObject readJsonString(String jsonString) {
//         return new JSONObject(new JSONTokener(jsonString));
//     }
// 
//     @Nonnull
//     public static List<String> readStringArray(JSONArray array) {
//         List<String> list = new ArrayList<>();
//         for (int i = 0; i < array.length(); ++i) {
//             list.add(array.getString(i));
//         }
//         return list;
//     }
// 
//     private JsonUtils() {
//     }
// }


// Path: GerritStats/src/main/java/com/holmsted/gerrit/Commit.java
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import com.holmsted.gerrit.GerritStatParser.ParserContext;
import com.holmsted.json.JsonUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;


        @SuppressWarnings("PMD")
        public PatchSet(int number,
                        @Nullable String revision,
                        @Nonnull List<String> parents,
                        @Nullable String ref,
                        @Nullable Identity uploader,
                        long createdOnDate,
                        @Nullable Identity author,
                        boolean isDraft,
                        @Nonnull PatchSetKind kind,
                        @Nonnull List<Approval> approvals,
                        @Nonnull List<PatchSetComment> comments,
                        int sizeInsertions,
                        int sizeDeletions) {
            this.number = number;
            this.revision = revision;
            this.parents = parents;
            this.ref = ref;
            this.uploader = uploader;
            this.createdOnDate = createdOnDate;
            this.author = author;
            this.isDraft = isDraft;
            this.kind = kind;
            this.approvals = ImmutableList.copyOf(approvals);
            this.comments = ImmutableList.copyOf(comments);
            this.sizeInsertions = sizeInsertions;
            this.sizeDeletions = sizeDeletions;
        }

        static List<PatchSet> fromJsonArray(@Nullable JSONArray patchSetsJson, @Nonnull ParserContext context) {