Program: 6267
Project: 6267
Buggy source:
public boolean HWM_SW_Measure(int test_size){
  int ts=Native.rdMem(Const.IO_CNT);
  int te=Native.rdMem(Const.IO_CNT);
  int to=te - ts;
  boolean error=false;
  System.out.print(test_size);
  test_vector[test_size]=0x7fffffff;
  int bc1=bit_count1(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  bit_count1(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  System.out.print("String_Node_Str");
  System.out.print(te - ts - to);
  int bc2=bit_count2(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  bit_count2(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  System.out.print("String_Node_Str");
  System.out.print(te - ts - to);
  int sm=search_max(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  search_max(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  System.out.print("String_Node_Str");
  System.out.print(te - ts - to);
  int bchw1=bcms.bitcount(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  int bchw2=bcms.bitcount(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  int bchw_time=te - ts - to;
  int smhw1=bcms.maxsearch(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  int smhw2=bcms.maxsearch(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  int smhw_time=te - ts - to;
  System.out.print("String_Node_Str");
  System.out.print(bchw_time);
  System.out.println("String_Node_Str");
  if (smhw_time != bchw_time) {
    System.out.print("String_Node_Str");
    System.out.print(bchw_time);
    System.out.print("String_Node_Str");
    System.out.print(smhw_time);
    System.out.println("String_Node_Str");
    error=true;
  }
  if ((bc1 != bc2) || (bc1 != bchw1) || (bc1 != bchw2)) {
    System.out.print("String_Node_Str");
    System.out.print(bc1);
    System.out.print("String_Node_Str");
    System.out.print(bc2);
    System.out.print("String_Node_Str");
    System.out.print(bchw1);
    System.out.print("String_Node_Str");
    System.out.print(bchw2);
    System.out.println("String_Node_Str");
    error=true;
  }
  if ((sm != smhw1) || (sm != smhw2)) {
    System.out.print("String_Node_Str");
    System.out.print(sm);
    System.out.print("String_Node_Str");
    System.out.print(smhw1);
    System.out.print("String_Node_Str");
    System.out.print(smhw2);
    System.out.println("String_Node_Str");
    error=true;
  }
  return error;
}

Fixed version (ground truth):
public boolean HWM_SW_Measure(int test_size){
  int ts=Native.rdMem(Const.IO_CNT);
  int te=Native.rdMem(Const.IO_CNT);
  int to=te - ts;
  boolean error=false;
  System.out.print(test_size);
  test_vector[test_size]=0x7fffffff;
  mac(test_size,test_vector,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  mac(test_size,test_vector,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  System.out.print("String_Node_Str");
  System.out.print(te - ts - to);
  int bc1=bit_count1(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  bit_count1(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  System.out.print("String_Node_Str");
  System.out.print(te - ts - to);
  int bc2=bit_count2(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  bit_count2(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  System.out.print("String_Node_Str");
  System.out.print(te - ts - to);
  int sm=search_max(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  search_max(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  System.out.print("String_Node_Str");
  System.out.print(te - ts - to);
  int bchw1=bcms.bitcount(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  int bchw2=bcms.bitcount(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  int bchw_time=te - ts - to;
  int smhw1=bcms.maxsearch(test_size,test_vector);
  ts=Native.rdMem(Const.IO_CNT);
  int smhw2=bcms.maxsearch(test_size,test_vector);
  te=Native.rdMem(Const.IO_CNT);
  int smhw_time=te - ts - to;
  System.out.print("String_Node_Str");
  System.out.print(bchw_time);
  System.out.println("String_Node_Str");
  if (smhw_time != bchw_time) {
    System.out.print("String_Node_Str");
    System.out.print(bchw_time);
    System.out.print("String_Node_Str");
    System.out.print(smhw_time);
    System.out.println("String_Node_Str");
    error=true;
  }
  if ((bc1 != bc2) || (bc1 != bchw1) || (bc1 != bchw2)) {
    System.out.print("String_Node_Str");
    System.out.print(bc1);
    System.out.print("String_Node_Str");
    System.out.print(bc2);
    System.out.print("String_Node_Str");
    System.out.print(bchw1);
    System.out.print("String_Node_Str");
    System.out.print(bchw2);
    System.out.println("String_Node_Str");
    error=true;
  }
  if ((sm != smhw1) || (sm != smhw2)) {
    System.out.print("String_Node_Str");
    System.out.print(sm);
    System.out.print("String_Node_Str");
    System.out.print(smhw1);
    System.out.print("String_Node_Str");
    System.out.print(smhw2);
    System.out.println("String_Node_Str");
    error=true;
  }
  return error;
}