Program: 31388
Project: 31388
Buggy source:
private void poolFieldArtifacts(int compareMethodIndex,int thisClassIndex,int recordClassIndex,RecordMetadata m,IntList keyColumnIndices){
  typeMap.clear();
  fieldIndices.clear();
  fieldNameIndices.clear();
  fieldTypeIndices.clear();
  fieldRecordAccessorIndices.clear();
  methodMap.clear();
  for (int i=0, n=keyColumnIndices.size(); i < n; i++) {
    String fieldType;
    String getterName;
    String comparatorClass;
    String comparatorDesc=null;
switch (m.getColumn(keyColumnIndices.getQuick(i)).getType()) {
case BOOLEAN:
      fieldType="String_Node_Str";
    getterName="String_Node_Str";
  comparatorClass="String_Node_Str";
break;
case BYTE:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case DOUBLE:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case FLOAT:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case INT:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case LONG:
case DATE:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case SHORT:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case STRING:
getterName="String_Node_Str";
fieldType="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case SYMBOL:
getterName="String_Node_Str";
fieldType="String_Node_Str";
comparatorClass="String_Node_Str";
comparatorDesc="String_Node_Str";
break;
default :
throw new JournalUnsupportedTypeException(m.getColumn(keyColumnIndices.getQuick(i)).getType());
}
int nameIndex;
int typeIndex=typeMap.get(fieldType);
if (typeIndex == -1) {
typeMap.put(fieldType,typeIndex=asm.poolUtf8(fieldType));
}
fieldTypeIndices.add(typeIndex);
fieldNameIndices.add(nameIndex=asm.poolUtf8().put('f').put(i).$());
fieldIndices.add(asm.poolField(thisClassIndex,asm.poolNameAndType(nameIndex,typeIndex)));
int methodIndex=methodMap.get(getterName);
if (methodIndex == -1) {
methodMap.put(getterName,methodIndex=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8(getterName),asm.poolUtf8("String_Node_Str" + fieldType))));
}
fieldRecordAccessorIndices.add(methodIndex);
int comparatorIndex=comparatorMap.get(comparatorClass);
if (comparatorIndex == -1) {
int cc=asm.poolClass(asm.poolUtf8(comparatorClass));
int nt=asm.poolNameAndType(compareMethodIndex,comparatorDesc == null ? asm.poolUtf8().put('(').put(fieldType).put(fieldType).put("String_Node_Str").$() : asm.poolUtf8(comparatorDesc));
comparatorIndex=asm.poolMethod(cc,nt);
}
comparatorAccessorIndices.add(comparatorIndex);
}
}

Fixed version (ground truth):
private void poolFieldArtifacts(int compareMethodIndex,int thisClassIndex,int recordClassIndex,RecordMetadata m,IntList keyColumnIndices){
  typeMap.clear();
  fieldIndices.clear();
  fieldNameIndices.clear();
  fieldTypeIndices.clear();
  fieldRecordAccessorIndices.clear();
  comparatorAccessorIndices.clear();
  methodMap.clear();
  for (int i=0, n=keyColumnIndices.size(); i < n; i++) {
    String fieldType;
    String getterName;
    String comparatorClass;
    String comparatorDesc=null;
switch (m.getColumn(keyColumnIndices.getQuick(i)).getType()) {
case BOOLEAN:
      fieldType="String_Node_Str";
    getterName="String_Node_Str";
  comparatorClass="String_Node_Str";
break;
case BYTE:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case DOUBLE:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case FLOAT:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case INT:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case LONG:
case DATE:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case SHORT:
fieldType="String_Node_Str";
getterName="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case STRING:
getterName="String_Node_Str";
fieldType="String_Node_Str";
comparatorClass="String_Node_Str";
break;
case SYMBOL:
getterName="String_Node_Str";
fieldType="String_Node_Str";
comparatorClass="String_Node_Str";
comparatorDesc="String_Node_Str";
break;
default :
throw new JournalUnsupportedTypeException(m.getColumn(keyColumnIndices.getQuick(i)).getType());
}
int nameIndex;
int typeIndex=typeMap.get(fieldType);
if (typeIndex == -1) {
typeMap.put(fieldType,typeIndex=asm.poolUtf8(fieldType));
}
fieldTypeIndices.add(typeIndex);
fieldNameIndices.add(nameIndex=asm.poolUtf8().put('f').put(i).$());
fieldIndices.add(asm.poolField(thisClassIndex,asm.poolNameAndType(nameIndex,typeIndex)));
int methodIndex=methodMap.get(getterName);
if (methodIndex == -1) {
methodMap.put(getterName,methodIndex=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8(getterName),asm.poolUtf8("String_Node_Str" + fieldType))));
}
fieldRecordAccessorIndices.add(methodIndex);
int comparatorIndex=comparatorMap.get(comparatorClass);
if (comparatorIndex == -1) {
int cc=asm.poolClass(asm.poolUtf8(comparatorClass));
int nt=asm.poolNameAndType(compareMethodIndex,comparatorDesc == null ? asm.poolUtf8().put('(').put(fieldType).put(fieldType).put("String_Node_Str").$() : asm.poolUtf8(comparatorDesc));
comparatorIndex=asm.poolMethod(cc,nt);
}
comparatorAccessorIndices.add(comparatorIndex);
}
}