// Path: src/main/java/uk/org/okapibarcode/util/Arrays.java
// public static boolean contains(int[] array, int value) {
//     for (int i = 0; i < array.length; i++) {
//         if (array[i] == value) {
//             return true;
//         }
//     }
//     return false;
// }
// 
// Path: src/main/java/uk/org/okapibarcode/util/Arrays.java
// public static int[] insertArray(int[] original, int index, int[] inserted) {
//     int[] modified = new int[original.length + inserted.length];
//     System.arraycopy(original, 0, modified, 0, index);
//     System.arraycopy(inserted, 0, modified, index, inserted.length);
//     System.arraycopy(original, index, modified, index + inserted.length, modified.length - index - inserted.length);
//     return modified;
// }


import static uk.org.okapibarcode.util.Arrays.contains;
import static uk.org.okapibarcode.util.Arrays.insertArray;
import java.awt.geom.Ellipse2D;
import java.util.Arrays;

     * @return the primary data for this MaxiCode symbol
     */
    public String getPrimary() {
        return primaryData;
    }

    /** {@inheritDoc} */
    @Override
    protected void encode() {

        eciProcess();

        // mode 2 -> mode 3 if postal code isn't strictly numeric
        if (mode == 2) {
            for (int i = 0; i < 10 && i < primaryData.length(); i++) {
                if ((primaryData.charAt(i) < '0') || (primaryData.charAt(i) > '9')) {
                    mode = 3;
                    break;
                }
            }
        }

        // initialize the set and character arrays
        processText();

        // start building the codeword array, starting with a copy of the character data
        // insert primary message if this is a structured carrier message; insert mode otherwise
        codewords = Arrays.copyOf(character, character.length);
        if (mode == 2 || mode == 3) {
            int[] primary = getPrimaryCodewords();

// Path: src/main/java/uk/org/okapibarcode/util/Arrays.java
// public static boolean contains(int[] array, int value) {
//     for (int i = 0; i < array.length; i++) {
//         if (array[i] == value) {
//             return true;
//         }
//     }
//     return false;
// }
// 
// Path: src/main/java/uk/org/okapibarcode/util/Arrays.java
// public static int[] insertArray(int[] original, int index, int[] inserted) {
//     int[] modified = new int[original.length + inserted.length];
//     System.arraycopy(original, 0, modified, 0, index);
//     System.arraycopy(inserted, 0, modified, index, inserted.length);
//     System.arraycopy(original, index, modified, index + inserted.length, modified.length - index - inserted.length);
//     return modified;
// }


// Path: src/main/java/uk/org/okapibarcode/backend/MaxiCode.java
import static uk.org.okapibarcode.util.Arrays.contains;
import static uk.org.okapibarcode.util.Arrays.insertArray;
import java.awt.geom.Ellipse2D;
import java.util.Arrays;

     * @return the primary data for this MaxiCode symbol
     */
    public String getPrimary() {
        return primaryData;
    }

    /** {@inheritDoc} */
    @Override
    protected void encode() {

        eciProcess();

        // mode 2 -> mode 3 if postal code isn't strictly numeric
        if (mode == 2) {
            for (int i = 0; i < 10 && i < primaryData.length(); i++) {
                if ((primaryData.charAt(i) < '0') || (primaryData.charAt(i) > '9')) {
                    mode = 3;
                    break;
                }
            }
        }

        // initialize the set and character arrays
        processText();

        // start building the codeword array, starting with a copy of the character data
        // insert primary message if this is a structured carrier message; insert mode otherwise
        codewords = Arrays.copyOf(character, character.length);
        if (mode == 2 || mode == 3) {
            int[] primary = getPrimaryCodewords();

            codewords = insertArray(codewords, 0, primary);
