String checkDevice = ((Device) PatchEdit.appConfig.getDevice(checkloop)).getClass().getName();
String checkDevice = ((Device) AppConfig.getDevice(checkloop)).getClass().getName();
    private void checkResponseData(byte[] answerData, int msgsize, int midiout, int midiin, int devID) {	StringBuffer responseString = new StringBuffer("F0");	for (int k = 1; k < msgsize; k++) {	    if ((answerData[k] < 16) && (answerData[k] >= 0))		responseString.append("0");	    responseString.append(Integer.toHexString(0xff  & answerData[k]));	}	//  ErrorMsg.reportStatus ("ResponseString "+responseString);	boolean found = false;	Enumeration synthisenum = PatchEdit.devConfig.IDStrings();	// synthisenum.reset();	while (synthisenum.hasMoreElements()) {	    String se = (String) synthisenum.nextElement();	    // ErrorMsg.reportStatus ("Checking "+se.getManufacturerName ()	    //+" "+se.getModelName ());	    if (checkInquiry(responseString, se)) {		// Check, wether the driver is already in the list		boolean dontadd = false;		for (int checkloop = 0; checkloop < PatchEdit.appConfig.deviceCount(); checkloop++) {		    String checkDevice = ((Device) PatchEdit.appConfig.getDevice(checkloop)).getClass().getName();		    if (checkDevice.equalsIgnoreCase(PatchEdit.devConfig.classNameForIDString(se))) {			dontadd = true; // Oh, its already there....		    }		}		if (!dontadd) { // add it only, if it is not in the list		    String cls = PatchEdit.devConfig.classNameForIDString(se);		    Device useDevice = PatchEdit.appConfig.addDevice(cls);		    ErrorMsg.reportStatus("MidiOut: " + midiout					  + ", MidiIn: " + midiin					  + ", devID: " + devID);		    useDevice.setPort(midiout);		    useDevice.setInPort(midiin);		    useDevice.setDeviceID(devID + 1);		    if (pb != null)			pb.setNote("Found " + useDevice.getManufacturerName()				   + " " + useDevice.getModelName());		}		found = true;		model.fireTableDataChanged();	    }	}	if (!found) {	    anyUnknown = true;	    report += "Unknown Synthesizer found:\n"		+ " According to the manufacturer ID it is made by "		+ LookupManufacturer.get(answerData[5], answerData[6], answerData[7])		+ "\n It is connected on the Output Port: "		+ MidiUtil.getOutputMidiDeviceInfo(midiout).toString()		+ " with Device ID: "		+ devID + 1		+ "\n The Input Port was: "		+ MidiUtil.getInputMidiDeviceInfo(midiin).toString()		+ "\n Complete answer was: ";	    for (int x = 0; x < msgsize; x++) {		report += " ";		if ((0xff & (int) answerData[x]) < 0x10)		    report += "0";		report += Integer.toHexString(0xff & (int) answerData[x]);		if ((answerData[x] & 0xff) == 0xf7) break;	    }	    report += "\n";	}    }