Program: 133280
Project: 133280
Buggy source:
static String encode(BigInteger plain){
  String plain_string=plain.toString();
  int length=plain_string.length();
  int[] plain_string_10=new int[ReedSolomon.base_10_length];
  for (int i=0; i < length; i++) {
    plain_string_10[i]=(int)plain_string.charAt(i) - (int)'0';
  }
  int codeword_length=0;
  int[] codeword=new int[ReedSolomon.initial_codeword.length];
  do {
    int new_length=0;
    int digit_32=0;
    for (int i=0; i < length; i++) {
      digit_32=digit_32 * 10 + plain_string_10[i];
      if (digit_32 >= 32) {
        plain_string_10[new_length]=digit_32 >> 5;
        digit_32&=31;
        new_length+=1;
      }
 else       if (new_length > 0) {
        plain_string_10[new_length]=0;
        new_length+=1;
      }
    }
    length=new_length;
    codeword[codeword_length]=digit_32;
    codeword_length+=1;
  }
 while (length > 0);
  int[] p={0,0,0,0};
  for (int i=ReedSolomon.base_32_length - 1; i >= 0; i--) {
    final int fb=codeword[i] ^ p[3];
    p[3]=p[2] ^ ReedSolomon.gmult(30,fb);
    p[2]=p[1] ^ ReedSolomon.gmult(6,fb);
    p[1]=p[0] ^ ReedSolomon.gmult(9,fb);
    p[0]=ReedSolomon.gmult(17,fb);
  }
  System.arraycopy(p,0,codeword,ReedSolomon.base_32_length,ReedSolomon.initial_codeword.length - ReedSolomon.base_32_length);
  StringBuilder cypher_string_builder=new StringBuilder();
  for (int i=0; i < 17; i++) {
    final int codework_index=ReedSolomon.codeword_map[i];
    final int alphabet_index=codeword[codework_index];
    cypher_string_builder.append(ReedSolomon.alphabet.charAt(alphabet_index));
    if ((i & 3) == 3 && i < 13) {
      cypher_string_builder.append('-');
    }
  }
  return cypher_string_builder.toString();
}

Fixed version (ground truth):
public static String encode(BigInteger plain){
  String plain_string=plain.toString();
  int length=plain_string.length();
  int[] plain_string_10=new int[ReedSolomon.base_10_length];
  for (int i=0; i < length; i++) {
    plain_string_10[i]=(int)plain_string.charAt(i) - (int)'0';
  }
  int codeword_length=0;
  int[] codeword=new int[ReedSolomon.initial_codeword.length];
  do {
    int new_length=0;
    int digit_32=0;
    for (int i=0; i < length; i++) {
      digit_32=digit_32 * 10 + plain_string_10[i];
      if (digit_32 >= 32) {
        plain_string_10[new_length]=digit_32 >> 5;
        digit_32&=31;
        new_length+=1;
      }
 else       if (new_length > 0) {
        plain_string_10[new_length]=0;
        new_length+=1;
      }
    }
    length=new_length;
    codeword[codeword_length]=digit_32;
    codeword_length+=1;
  }
 while (length > 0);
  int[] p={0,0,0,0};
  for (int i=ReedSolomon.base_32_length - 1; i >= 0; i--) {
    final int fb=codeword[i] ^ p[3];
    p[3]=p[2] ^ ReedSolomon.gmult(30,fb);
    p[2]=p[1] ^ ReedSolomon.gmult(6,fb);
    p[1]=p[0] ^ ReedSolomon.gmult(9,fb);
    p[0]=ReedSolomon.gmult(17,fb);
  }
  System.arraycopy(p,0,codeword,ReedSolomon.base_32_length,ReedSolomon.initial_codeword.length - ReedSolomon.base_32_length);
  StringBuilder cypher_string_builder=new StringBuilder();
  for (int i=0; i < 17; i++) {
    final int codework_index=ReedSolomon.codeword_map[i];
    final int alphabet_index=codeword[codework_index];
    cypher_string_builder.append(ReedSolomon.alphabet.charAt(alphabet_index));
    if ((i & 3) == 3 && i < 13) {
      cypher_string_builder.append('-');
    }
  }
  return cypher_string_builder.toString();
}