for (int idrv = 0; idrv < dev.driverCount(); idrv++) { IPatchDriver drv = (IPatchDriver) dev.getDriver(idrv);  if (drv.supportsPatch(patchString, sysex)) return drv;
for (int idev = 0; idev < AppConfig.deviceCount(); idev++) {  Device dev = AppConfig.getDevice(idev); for (int idrv = 0; idrv < dev.driverCount(); idrv++) { IPatchDriver drv = (IPatchDriver) dev.getDriver(idrv);  if (drv.supportsPatch(patchString, sysex)) return drv; }
    public static IDriver chooseDriver(byte[] sysex, Device dev) {        String patchString = getPatchHeader(sysex);        for (int idrv = 0; idrv < dev.driverCount(); idrv++) {            IPatchDriver drv = (IPatchDriver) dev.getDriver(idrv);            // Inner Loop, iterating over all Drivers of a device            if (drv.supportsPatch(patchString, sysex))                return drv;        }        return null;    }