Program: 21089
Project: 21089
Buggy source:
/** 
 * Test   {@link FuzzyRowFilter} to make sure that a String that matches the following regex ismatched: '.{8}-fuzzy-row-suffix'
 */
@Test public void testFuzzyRowFilter() throws IOException {
  if (!IntegrationTests.isBigtable()) {
    return;
  }
  final String rowSuffix="String_Node_Str";
  final byte[] qualA=dataHelper.randomData("String_Node_Str");
  byte[] value=Bytes.toBytes("String_Node_Str");
  byte[] missKey1=dataHelper.randomData("String_Node_Str","String_Node_Str");
  byte[] missKey2=dataHelper.randomData("String_Node_Str","String_Node_Str");
  byte[] missKey3=dataHelper.randomData("String_Node_Str","String_Node_Str");
  byte[] hitKey1=dataHelper.randomData("String_Node_Str",rowSuffix);
  byte[] hitKey2=dataHelper.randomData("String_Node_Str",rowSuffix);
  StringBuilder filterString=new StringBuilder();
  int size=8 + rowSuffix.length();
  byte[] filterBytes=new byte[size];
  for (int i=0; i < 8; i++) {
    filterString.append("String_Node_Str");
    filterBytes[i]=1;
  }
  filterString.append(rowSuffix);
  for (int i=0; i < rowSuffix.length(); i++) {
    filterBytes[i + 8]=0;
  }
  FuzzyRowFilter fuzzyFilter=new FuzzyRowFilter(Arrays.asList(new Pair<byte[],byte[]>(Bytes.toBytesBinary(filterString.toString()),filterBytes)));
  ByteArrayComparable sizeComparable=new RegexStringComparator(String.format("String_Node_Str",size));
  Scan scan=new Scan();
  scan.setFilter(fuzzyFilter);
  Table table=getTable();
  List<Put> puts=new ArrayList<>();
  for (  byte[] key : Arrays.asList(missKey1,missKey2,missKey3,hitKey1,hitKey2)) {
    puts.add(new Put(key).addColumn(COLUMN_FAMILY,qualA,value));
  }
  table.put(puts);
  try (ResultScanner scanner=table.getScanner(scan)){
    assertNextEquals(scanner,hitKey1);
    assertNextEquals(scanner,hitKey2);
    Assert.assertNull(scanner.next());
  }
 }

Fixed version (ground truth):
/** 
 * Test   {@link FuzzyRowFilter} to make sure that a String that matches the following regex ismatched: '.{8}-fuzzy-row-suffix'
 */
@Test public void testFuzzyRowFilter() throws IOException {
  if (!IntegrationTests.isBigtable()) {
    return;
  }
  final String rowSuffix="String_Node_Str";
  final byte[] qualA=dataHelper.randomData("String_Node_Str");
  byte[] value=Bytes.toBytes("String_Node_Str");
  byte[] missKey1=dataHelper.randomData("String_Node_Str","String_Node_Str");
  byte[] missKey2=dataHelper.randomData("String_Node_Str","String_Node_Str");
  byte[] missKey3=dataHelper.randomData("String_Node_Str","String_Node_Str");
  byte[] hitKey1=dataHelper.randomData("String_Node_Str",rowSuffix);
  byte[] hitKey2=dataHelper.randomData("String_Node_Str",rowSuffix);
  byte[] hitKey3=dataHelper.randomData("String_Node_Str",rowSuffix);
  byte[] hitKey4=dataHelper.randomData("String_Node_Str",rowSuffix);
  StringBuilder filterString=new StringBuilder();
  int size=8 + rowSuffix.length();
  byte[] filterBytes=new byte[size];
  for (int i=0; i < 8; i++) {
    filterString.append("String_Node_Str");
    filterBytes[i]=1;
  }
  filterString.append(rowSuffix);
  for (int i=0; i < rowSuffix.length(); i++) {
    filterBytes[i + 8]=0;
  }
  FuzzyRowFilter fuzzyFilter=new FuzzyRowFilter(Arrays.asList(new Pair<byte[],byte[]>(Bytes.toBytesBinary(filterString.toString()),filterBytes)));
  Scan scan=new Scan();
  scan.setFilter(fuzzyFilter);
  Table table=getTable();
  List<Put> puts=new ArrayList<>();
  for (  byte[] key : Arrays.asList(missKey1,missKey2,missKey3,hitKey1,hitKey2,hitKey3,hitKey4)) {
    puts.add(new Put(key).addColumn(COLUMN_FAMILY,qualA,value));
  }
  table.put(puts);
  try (ResultScanner scanner=table.getScanner(scan)){
    assertNextEquals(scanner,hitKey1);
    assertNextEquals(scanner,hitKey2);
    assertNextEquals(scanner,hitKey3);
    assertNextEquals(scanner,hitKey4);
    Assert.assertNull(scanner.next());
  }
 }