Program: 48164
Project: 48164
Buggy source:
public Result getResult(){
  if (result == 0x00000000)   return WSHelper.makeResultOK();
  if (result == 0xD0000001)   return WSHelper.makeResultUnknownError("String_Node_Str");
  if (result == 0xD0000002)   return WSHelper.makeResultUnknownError("String_Node_Str");
  if (result == 0xD0000003)   return WSHelper.makeResultUnknownError("String_Node_Str");
  if (result == 0xE0000001)   return WSHelper.makeResultUnknownError("String_Node_Str");
  if (result == 0xE0000002)   return WSHelper.makeResultUnknownError("String_Node_Str");
  if (result == 0xE0000003)   return WSHelper.makeResultUnknownError("String_Node_Str");
  if (result == 0xE0000006)   return WSHelper.makeResultUnknownError("String_Node_Str");
  if ((result & 0xFFFC0000) == 0xF0000000) {
    byte[] sw=new byte[]{(byte)((result >> 8) & 0xFF),(byte)(result & 0xFF)};
    String msg=CardCommandStatus.getMessage(sw);
    int type=(result >> 16) & 0xFFFF;
    if (type == 0xF000)     return WSHelper.makeResultUnknownError("String_Node_Str" + msg);
    if (type == 0xF001)     return WSHelper.makeResultUnknownError("String_Node_Str" + msg);
    if (type == 0xF002)     return WSHelper.makeResultUnknownError("String_Node_Str" + msg);
    if (type == 0xF003)     return WSHelper.makeResultUnknownError("String_Node_Str" + msg);
  }
  if (result == 0xF0100001)   return WSHelper.makeResultUnknownError("String_Node_Str");
  if (result == 0xF0100002)   return WSHelper.makeResultError(ECardConstants.Minor.IFD.NO_CARD,"String_Node_Str");
  if (result == 0xF0200001)   return WSHelper.makeResultError(ECardConstants.Minor.IFD.CANCELLATION_BY_USER,"String_Node_Str");
  if (result == 0xF0200002)   return WSHelper.makeResultError(ECardConstants.Minor.IFD.TIMEOUT_ERROR,"String_Node_Str");
  String hexStringResult=ByteUtils.toHexString(IntegerUtils.toByteArray(result));
  logger.warn("String_Node_Str",hexStringResult);
  return WSHelper.makeResultUnknownError(null);
}

Fixed version (ground truth):
public Result getResult(){
switch (result) {
case 0x00000000:
    return WSHelper.makeResultOK();
case 0xD0000001:
  return WSHelper.makeResultUnknownError("String_Node_Str");
case 0xD0000002:
return WSHelper.makeResultUnknownError("String_Node_Str");
case 0xD0000003:
return WSHelper.makeResultUnknownError("String_Node_Str");
case 0xE0000001:
return WSHelper.makeResultUnknownError("String_Node_Str");
case 0xE0000002:
return WSHelper.makeResultUnknownError("String_Node_Str");
case 0xE0000003:
return WSHelper.makeResultUnknownError("String_Node_Str");
case 0xE0000006:
return WSHelper.makeResultUnknownError("String_Node_Str");
case 0xF0100001:
return WSHelper.makeResultUnknownError("String_Node_Str");
case 0xF0100002:
return WSHelper.makeResultError(ECardConstants.Minor.IFD.NO_CARD,"String_Node_Str");
case 0xF0200001:
return WSHelper.makeResultError(ECardConstants.Minor.IFD.CANCELLATION_BY_USER,"String_Node_Str");
case 0xF0200002:
return WSHelper.makeResultError(ECardConstants.Minor.IFD.TIMEOUT_ERROR,"String_Node_Str");
default :
{
if ((result & 0xFFFC0000) == 0xF0000000) {
byte[] sw=new byte[]{(byte)((result >> 8) & 0xFF),(byte)(result & 0xFF)};
String msg=CardCommandStatus.getMessage(sw);
int type=(result >> 16) & 0xFFFF;
switch (type) {
case 0xF000:
return WSHelper.makeResultUnknownError("String_Node_Str" + msg);
case 0xF001:
return WSHelper.makeResultUnknownError("String_Node_Str" + msg);
case 0xF002:
return WSHelper.makeResultUnknownError("String_Node_Str" + msg);
case 0xF003:
return WSHelper.makeResultUnknownError("String_Node_Str" + msg);
}
}
String hexStringResult=ByteUtils.toHexString(IntegerUtils.toByteArray(result));
logger.warn("String_Node_Str",hexStringResult);
return WSHelper.makeResultUnknownError(null);
}
}
}