for (int idrv = 0; idrv < dev.driverCount(); idrv++) {  IPatchDriver drv = (IPatchDriver) dev.getDriver(idrv); if (drv.supportsPatch(patchString, this.sysex) && (drv instanceof Driver)) { ((Driver) drv).trimSysex(this); setDriver(drv); return true;
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;
    private boolean chooseDriver(Device dev) {        String patchString = getPatchHeader();        for (int idrv = 0; idrv < dev.driverCount(); idrv++) {            // iterating over all Drivers of the given device            IPatchDriver drv = (IPatchDriver) dev.getDriver(idrv);            if (drv.supportsPatch(patchString, this.sysex)                    && (drv instanceof Driver)) {                ((Driver) drv).trimSysex(this);                setDriver(drv);                return true;            }        }        // Unkown patch, try to guess at least the manufacturer        comment = new StringBuffer("Probably a "                + LookupManufacturer.get(sysex[1], sysex[2], sysex[3])                + " Patch, Size: " + sysex.length);        setDriver(AppConfig.getNullDriver());        return false;    }