Program: 58376
Project: 58376
Buggy source:
private boolean generateAztecBinary(){
  int i, j, k, bytes;
  int curtable, newtable, lasttable, chartype, maplength, blocks;
  int[] charmap=new int[2 * inputBytes.length];
  int[] typemap=new int[2 * inputBytes.length];
  int[] blockType=new int[inputBytes.length + 1];
  int[] blockLength=new int[inputBytes.length + 1];
  int weight;
  maplength=0;
  if (inputDataType == DataType.GS1) {
    charmap[maplength]=0;
    typemap[maplength++]=8;
    charmap[maplength]=400;
    typemap[maplength++]=8;
  }
  if ((inputDataType == DataType.ECI) && (eciMode != 3)) {
    int flagNumber=6;
    if (eciMode < 100000) {
      flagNumber=5;
    }
    if (eciMode < 10000) {
      flagNumber=4;
    }
    if (eciMode < 1000) {
      flagNumber=3;
    }
    if (eciMode < 100) {
      flagNumber=2;
    }
    if (eciMode < 10) {
      flagNumber=1;
    }
    charmap[maplength]=0;
    typemap[maplength++]=8;
    charmap[maplength]=400 + flagNumber;
    typemap[maplength++]=8;
  }
  for (i=0; i < inputBytes.length; i++) {
    if ((inputDataType == DataType.GS1) && ((inputBytes[i] & 0xFF) == '[')) {
      charmap[maplength]=0;
      typemap[maplength++]=8;
      charmap[maplength]=400;
      typemap[maplength++]=8;
    }
 else {
      if ((inputBytes[i] & 0xFF) > 0x7F) {
        charmap[maplength]=(inputBytes[i] & 0xFF);
        typemap[maplength++]=32;
      }
 else {
        charmap[maplength]=AztecSymbolChar[(inputBytes[i] & 0xFF)];
        typemap[maplength++]=AztecCodeSet[(inputBytes[i] & 0xFF)];
      }
    }
  }
  i=0;
  do {
    if (((charmap[i] == 300) && (charmap[i + 1] == 11)) && ((typemap[i] == 8) && (typemap[i + 1] == 8))) {
      charmap[i]=2;
      typemap[i]=8;
      for (j=i + 1; j < maplength; j++) {
        charmap[i + j]=charmap[i + j + 1];
        typemap[i + j]=typemap[i + j + 1];
      }
      maplength--;
    }
    if (((charmap[i] == 302) && (charmap[i + 1] == 1)) && ((typemap[i] == 24) && (typemap[i + 1] == 23))) {
      charmap[i]=3;
      typemap[i]=8;
      for (j=i + 1; j < maplength; j++) {
        charmap[i + j]=charmap[i + j + 1];
        typemap[i + j]=typemap[i + j + 1];
      }
      maplength--;
    }
    if (((charmap[i] == 301) && (charmap[i + 1] == 1)) && ((typemap[i] == 24) && (typemap[i + 1] == 23))) {
      charmap[i]=4;
      typemap[i]=8;
      for (j=i + 1; j < maplength; j++) {
        charmap[i + j]=charmap[i + j + 1];
        typemap[i + j]=typemap[i + j + 1];
      }
      maplength--;
    }
    if (((charmap[i] == 21) && (charmap[i + 1] == 1)) && ((typemap[i] == 8) && (typemap[i + 1] == 23))) {
      charmap[i]=5;
      typemap[i]=8;
      for (j=i + 1; j < maplength; j++) {
        charmap[i + j]=charmap[i + j + 1];
        typemap[i + j]=typemap[i + j + 1];
      }
      maplength--;
    }
    i++;
  }
 while (i < (maplength - 1));
  blocks=1;
  blockType[0]=typemap[0];
  blockLength[0]=1;
  for (i=1; i < maplength; i++) {
    if (typemap[i] == typemap[i - 1]) {
      blockLength[blocks - 1]++;
    }
 else {
      blocks++;
      blockType[blocks - 1]=typemap[i];
      blockLength[blocks - 1]=1;
    }
  }
  if ((blockType[0] & 1) != 0) {
    blockType[0]=1;
  }
  if ((blockType[0] & 2) != 0) {
    blockType[0]=2;
  }
  if ((blockType[0] & 4) != 0) {
    blockType[0]=4;
  }
  if ((blockType[0] & 8) != 0) {
    blockType[0]=8;
  }
  if (blocks > 1) {
    for (i=1; i < blocks; i++) {
      if ((blockType[i] & blockType[i - 1]) != 0) {
        blockType[i]=(blockType[i] & blockType[i - 1]);
      }
    }
    if ((blockType[blocks - 1] & 1) != 0) {
      blockType[blocks - 1]=1;
    }
    if ((blockType[blocks - 1] & 2) != 0) {
      blockType[blocks - 1]=2;
    }
    if ((blockType[blocks - 1] & 4) != 0) {
      blockType[blocks - 1]=4;
    }
    if ((blockType[blocks - 1] & 8) != 0) {
      blockType[blocks - 1]=8;
    }
    for (i=blocks - 2; i > 0; i--) {
      if ((blockType[i] & blockType[i + 1]) != 0) {
        blockType[i]=(blockType[i] & blockType[i + 1]);
      }
    }
    for (i=1; i < blocks; i++) {
      if ((blockType[i] & 8) != 0) {
        blockType[i]=8;
      }
      if ((blockType[i] & 4) != 0) {
        blockType[i]=4;
      }
      if ((blockType[i] & 2) != 0) {
        blockType[i]=2;
      }
      if ((blockType[i] & 1) != 0) {
        blockType[i]=1;
      }
    }
    i=0;
    do {
      if (blockType[i] == blockType[i + 1]) {
        blockLength[i]+=blockLength[i + 1];
        for (j=i + 1; j < blocks - 1; j++) {
          blockType[j]=blockType[j + 1];
          blockLength[j]=blockLength[j + 1];
        }
        blocks--;
      }
 else {
        i++;
      }
    }
 while (i < blocks - 1);
  }
  j=0;
  for (i=0; i < blocks; i++) {
    if ((blockLength[i] < 3) && (blockType[i] != 32)) {
      for (k=0; k < blockLength[i]; k++) {
        typemap[j + k]=blockType[i] + 64;
      }
    }
 else {
      for (k=0; k < blockLength[i]; k++) {
        typemap[j + k]=blockType[i];
      }
    }
    j+=blockLength[i];
  }
  if (typemap[0] == 65) {
    typemap[0]=1;
  }
  for (i=0; i < maplength; i++) {
    if ((charmap[i] >= 300) && (charmap[i] < 400)) {
      curtable=typemap[i];
      if (curtable > 64) {
        curtable-=64;
      }
switch (charmap[i]) {
case 300:
switch (curtable) {
case 8:
          charmap[i]=1;
        break;
case 4:
      charmap[i]=14;
    break;
}
break;
case 301:
switch (curtable) {
case 8:
charmap[i]=17;
break;
case 16:
charmap[i]=12;
break;
}
break;
case 302:
switch (curtable) {
case 8:
charmap[i]=19;
break;
case 16:
charmap[i]=13;
break;
}
break;
}
}
}
binary_string="String_Node_Str";
if (debug) {
System.out.print("String_Node_Str");
}
curtable=1;
lasttable=1;
for (i=0; i < maplength; i++) {
newtable=curtable;
if ((typemap[i] != curtable) && (charmap[i] < 400)) {
if (curtable == 3) {
curtable=lasttable;
newtable=lasttable;
}
if (typemap[i] > 64) {
switch (typemap[i]) {
case (64 + 1):
switch (curtable) {
case 2:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
case 4:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 16:
binary_string+=quadbit[15];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
}
break;
case (64 + 2):
switch (curtable) {
case 1:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 4:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
}
break;
case (64 + 4):
switch (curtable) {
case 1:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 2:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
}
break;
case (64 + 8):
switch (curtable) {
case 1:
binary_string+=pentbit[0];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
case 2:
binary_string+=pentbit[0];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
case 4:
binary_string+=pentbit[0];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
case 16:
binary_string+=quadbit[0];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
}
break;
case (64 + 16):
switch (curtable) {
case 1:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 2:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 4:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
}
break;
}
}
 else {
switch (typemap[i]) {
case 1:
switch (curtable) {
case 2:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 4:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
}
break;
case 2:
switch (curtable) {
case 1:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 4:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
}
break;
case 4:
switch (curtable) {
case 1:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 2:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
}
break;
case 8:
switch (curtable) {
case 1:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=8;
break;
case 2:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=8;
break;
case 4:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=8;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=8;
break;
}
break;
case 16:
switch (curtable) {
case 1:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 2:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 4:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
}
break;
case 32:
lasttable=curtable;
switch (curtable) {
case 1:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=3;
break;
case 2:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=3;
break;
case 4:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=3;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=3;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=3;
break;
}
bytes=0;
do {
bytes++;
}
 while (typemap[i + (bytes - 1)] == 32);
bytes--;
if (bytes > 2079) {
error_msg="String_Node_Str";
return false;
}
if (bytes > 31) {
binary_string+="String_Node_Str";
for (weight=0x400; weight > 0; weight=weight >> 1) {
if (((bytes - 31) & weight) != 0) {
binary_string+="String_Node_Str";
}
 else {
binary_string+="String_Node_Str";
}
}
}
 else {
for (weight=0x10; weight > 0; weight=weight >> 1) {
if ((bytes & weight) != 0) {
binary_string+="String_Node_Str";
}
 else {
binary_string+="String_Node_Str";
}
}
}
if (debug) {
System.out.printf("String_Node_Str",bytes);
}
break;
}
}
}
curtable=newtable;
chartype=typemap[i];
if (chartype > 64) {
chartype-=64;
}
switch (chartype) {
case 1:
case 2:
case 4:
case 8:
if (charmap[i] >= 400) {
if (debug) {
System.out.printf("String_Node_Str",charmap[i] - 400);
}
binary_string+=tribit[charmap[i] - 400];
if (charmap[i] != 400) {
binary_string+=eciToBinary();
}
}
 else {
binary_string+=pentbit[charmap[i]];
if (!((chartype == 8) && (charmap[i] == 0))) {
if (debug) {
System.out.printf("String_Node_Str",charmap[i]);
}
}
}
break;
case 16:
binary_string+=quadbit[charmap[i]];
if (debug) {
System.out.printf("String_Node_Str",charmap[i]);
}
break;
case 32:
for (weight=0x80; weight > 0; weight=weight >> 1) {
if ((charmap[i] & weight) != 0) {
binary_string+="String_Node_Str";
}
 else {
binary_string+="String_Node_Str";
}
}
if (debug) {
System.out.printf("String_Node_Str",charmap[i]);
}
break;
}
}
if (debug) {
System.out.printf("String_Node_Str");
}
return true;
}

Fixed version (ground truth):
private boolean generateAztecBinary(){
  int i, j, k, bytes;
  int curtable, newtable, lasttable, chartype, maplength, blocks;
  int[] charmap=new int[2 * inputBytes.length];
  int[] typemap=new int[2 * inputBytes.length];
  int[] blockType=new int[inputBytes.length + 1];
  int[] blockLength=new int[inputBytes.length + 1];
  int weight;
  maplength=0;
  if (inputDataType == DataType.GS1) {
    charmap[maplength]=0;
    typemap[maplength++]=8;
    charmap[maplength]=400;
    typemap[maplength++]=8;
  }
  if ((inputDataType == DataType.ECI) && (eciMode != 3)) {
    int flagNumber=6;
    if (eciMode < 100000) {
      flagNumber=5;
    }
    if (eciMode < 10000) {
      flagNumber=4;
    }
    if (eciMode < 1000) {
      flagNumber=3;
    }
    if (eciMode < 100) {
      flagNumber=2;
    }
    if (eciMode < 10) {
      flagNumber=1;
    }
    charmap[maplength]=0;
    typemap[maplength++]=8;
    charmap[maplength]=400 + flagNumber;
    typemap[maplength++]=8;
  }
  for (i=0; i < inputBytes.length; i++) {
    if ((inputDataType == DataType.GS1) && ((inputBytes[i] & 0xFF) == '[')) {
      charmap[maplength]=0;
      typemap[maplength++]=8;
      charmap[maplength]=400;
      typemap[maplength++]=8;
    }
 else {
      if ((inputBytes[i] & 0xFF) > 0x7F) {
        charmap[maplength]=(inputBytes[i] & 0xFF);
        typemap[maplength++]=32;
      }
 else {
        charmap[maplength]=AztecSymbolChar[(inputBytes[i] & 0xFF)];
        typemap[maplength++]=AztecCodeSet[(inputBytes[i] & 0xFF)];
      }
    }
  }
  i=0;
  do {
    if (((charmap[i] == 300) && (charmap[i + 1] == 11)) && ((typemap[i] == 8) && (typemap[i + 1] == 8))) {
      charmap[i]=2;
      typemap[i]=8;
      for (j=i + 1; j < maplength; j++) {
        charmap[i + j]=charmap[i + j + 1];
        typemap[i + j]=typemap[i + j + 1];
      }
      maplength--;
    }
    if (((charmap[i] == 302) && (charmap[i + 1] == 1)) && ((typemap[i] == 24) && (typemap[i + 1] == 23))) {
      charmap[i]=3;
      typemap[i]=8;
      for (j=i + 1; j < maplength; j++) {
        charmap[i + j]=charmap[i + j + 1];
        typemap[i + j]=typemap[i + j + 1];
      }
      maplength--;
    }
    if (((charmap[i] == 301) && (charmap[i + 1] == 1)) && ((typemap[i] == 24) && (typemap[i + 1] == 23))) {
      charmap[i]=4;
      typemap[i]=8;
      for (j=i + 1; j < maplength; j++) {
        charmap[i + j]=charmap[i + j + 1];
        typemap[i + j]=typemap[i + j + 1];
      }
      maplength--;
    }
    if (((charmap[i] == 21) && (charmap[i + 1] == 1)) && ((typemap[i] == 8) && (typemap[i + 1] == 23))) {
      charmap[i]=5;
      typemap[i]=8;
      for (j=i + 1; j < maplength; j++) {
        charmap[i + j]=charmap[i + j + 1];
        typemap[i + j]=typemap[i + j + 1];
      }
      maplength--;
    }
    i++;
  }
 while (i < (maplength - 1));
  blocks=1;
  blockType[0]=typemap[0];
  blockLength[0]=1;
  for (i=1; i < maplength; i++) {
    if (typemap[i] == typemap[i - 1]) {
      blockLength[blocks - 1]++;
    }
 else {
      blocks++;
      blockType[blocks - 1]=typemap[i];
      blockLength[blocks - 1]=1;
    }
  }
  if ((blockType[0] & 1) != 0) {
    blockType[0]=1;
  }
  if ((blockType[0] & 2) != 0) {
    blockType[0]=2;
  }
  if ((blockType[0] & 4) != 0) {
    blockType[0]=4;
  }
  if ((blockType[0] & 8) != 0) {
    blockType[0]=8;
  }
  if (blocks > 1) {
    for (i=1; i < blocks; i++) {
      if ((blockType[i] & blockType[i - 1]) != 0) {
        blockType[i]=(blockType[i] & blockType[i - 1]);
      }
    }
    if ((blockType[blocks - 1] & 1) != 0) {
      blockType[blocks - 1]=1;
    }
    if ((blockType[blocks - 1] & 2) != 0) {
      blockType[blocks - 1]=2;
    }
    if ((blockType[blocks - 1] & 4) != 0) {
      blockType[blocks - 1]=4;
    }
    if ((blockType[blocks - 1] & 8) != 0) {
      blockType[blocks - 1]=8;
    }
    for (i=blocks - 2; i > 0; i--) {
      if ((blockType[i] & blockType[i + 1]) != 0) {
        blockType[i]=(blockType[i] & blockType[i + 1]);
      }
    }
    for (i=1; i < blocks; i++) {
      if ((blockType[i] & 8) != 0) {
        blockType[i]=8;
      }
      if ((blockType[i] & 4) != 0) {
        blockType[i]=4;
      }
      if ((blockType[i] & 2) != 0) {
        blockType[i]=2;
      }
      if ((blockType[i] & 1) != 0) {
        blockType[i]=1;
      }
    }
    for (i=1; i < blocks - 1; i++) {
      if ((blockType[i - 1] == 32) && (blockLength[i] < 4)) {
        int nonBinaryLength=blockLength[i];
        for (int l=i; ((l < blocks) && (blockType[l] != 32)); l++) {
          nonBinaryLength+=blockLength[l];
        }
        if (nonBinaryLength < 4) {
          blockType[i]=32;
        }
      }
    }
    i=0;
    do {
      if (blockType[i] == blockType[i + 1]) {
        blockLength[i]+=blockLength[i + 1];
        for (j=i + 1; j < blocks - 1; j++) {
          blockType[j]=blockType[j + 1];
          blockLength[j]=blockLength[j + 1];
        }
        blocks--;
      }
 else {
        i++;
      }
    }
 while (i < blocks - 1);
  }
  j=0;
  for (i=0; i < blocks; i++) {
    if ((blockLength[i] < 3) && (blockType[i] != 32)) {
      for (k=0; k < blockLength[i]; k++) {
        typemap[j + k]=blockType[i] + 64;
      }
    }
 else {
      for (k=0; k < blockLength[i]; k++) {
        typemap[j + k]=blockType[i];
      }
    }
    j+=blockLength[i];
  }
  if (typemap[0] == 65) {
    typemap[0]=1;
  }
  for (i=0; i < maplength; i++) {
    if ((charmap[i] >= 300) && (charmap[i] < 400)) {
      curtable=typemap[i];
      if (curtable > 64) {
        curtable-=64;
      }
switch (charmap[i]) {
case 300:
switch (curtable) {
case 8:
          charmap[i]=1;
        break;
case 4:
      charmap[i]=14;
    break;
}
break;
case 301:
switch (curtable) {
case 8:
charmap[i]=17;
break;
case 16:
charmap[i]=12;
break;
}
break;
case 302:
switch (curtable) {
case 8:
charmap[i]=19;
break;
case 16:
charmap[i]=13;
break;
}
break;
}
}
}
binary_string="String_Node_Str";
if (debug) {
System.out.print("String_Node_Str");
}
curtable=1;
lasttable=1;
for (i=0; i < maplength; i++) {
newtable=curtable;
if ((typemap[i] != curtable) && (charmap[i] < 400)) {
if (curtable == 32) {
curtable=lasttable;
newtable=lasttable;
}
if (typemap[i] > 64) {
switch (typemap[i]) {
case (64 + 1):
switch (curtable) {
case 2:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
case 4:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 16:
binary_string+=quadbit[15];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
}
break;
case (64 + 2):
switch (curtable) {
case 1:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 4:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
}
break;
case (64 + 4):
switch (curtable) {
case 1:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 2:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
}
break;
case (64 + 8):
switch (curtable) {
case 1:
binary_string+=pentbit[0];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
case 2:
binary_string+=pentbit[0];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
case 4:
binary_string+=pentbit[0];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
case 16:
binary_string+=quadbit[0];
if (debug) {
System.out.printf("String_Node_Str");
}
break;
}
break;
case (64 + 16):
switch (curtable) {
case 1:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 2:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 4:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
}
break;
}
}
 else {
switch (typemap[i]) {
case 1:
switch (curtable) {
case 2:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 4:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=1;
break;
}
break;
case 2:
switch (curtable) {
case 1:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 4:
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[28];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=2;
break;
}
break;
case 4:
switch (curtable) {
case 1:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 2:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=4;
break;
}
break;
case 8:
switch (curtable) {
case 1:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=8;
break;
case 2:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=8;
break;
case 4:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=8;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=8;
break;
}
break;
case 16:
switch (curtable) {
case 1:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 2:
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 4:
binary_string+=pentbit[29];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[30];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=16;
break;
}
break;
case 32:
lasttable=curtable;
switch (curtable) {
case 1:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=32;
break;
case 2:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=32;
break;
case 4:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=32;
break;
case 8:
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=32;
break;
case 16:
binary_string+=quadbit[14];
if (debug) {
System.out.printf("String_Node_Str");
}
binary_string+=pentbit[31];
if (debug) {
System.out.printf("String_Node_Str");
}
newtable=32;
break;
}
bytes=0;
do {
bytes++;
}
 while (typemap[i + (bytes - 1)] == 32);
bytes--;
if (bytes > 2079) {
error_msg="String_Node_Str";
return false;
}
if (bytes > 31) {
binary_string+="String_Node_Str";
for (weight=0x400; weight > 0; weight=weight >> 1) {
if (((bytes - 31) & weight) != 0) {
binary_string+="String_Node_Str";
}
 else {
binary_string+="String_Node_Str";
}
}
}
 else {
for (weight=0x10; weight > 0; weight=weight >> 1) {
if ((bytes & weight) != 0) {
binary_string+="String_Node_Str";
}
 else {
binary_string+="String_Node_Str";
}
}
}
if (debug) {
System.out.printf("String_Node_Str",bytes);
}
break;
}
}
}
curtable=newtable;
chartype=typemap[i];
if (chartype > 64) {
chartype-=64;
}
switch (chartype) {
case 1:
case 2:
case 4:
case 8:
if (charmap[i] >= 400) {
if (debug) {
System.out.printf("String_Node_Str",charmap[i] - 400);
}
binary_string+=tribit[charmap[i] - 400];
if (charmap[i] != 400) {
binary_string+=eciToBinary();
}
}
 else {
binary_string+=pentbit[charmap[i]];
if (!((chartype == 8) && (charmap[i] == 0))) {
if (debug) {
System.out.printf("String_Node_Str",charmap[i]);
}
}
}
break;
case 16:
binary_string+=quadbit[charmap[i]];
if (debug) {
System.out.printf("String_Node_Str",charmap[i]);
}
break;
case 32:
for (weight=0x80; weight > 0; weight=weight >> 1) {
if ((charmap[i] & weight) != 0) {
binary_string+="String_Node_Str";
}
 else {
binary_string+="String_Node_Str";
}
}
if (debug) {
System.out.printf("String_Node_Str",charmap[i]);
}
break;
}
}
if (debug) {
System.out.printf("String_Node_Str");
}
return true;
}