s = s.substring(s.lastIndexOf('.') + 1, s.lastIndexOf("Device"));
try { s = s.substring(s.lastIndexOf('.') + 1, s.lastIndexOf("Device")); } catch (StringIndexOutOfBoundsException ex) {}
    private Preferences getDeviceNode(String s) {	ErrorMsg.reportStatus("getDeviceNode: " + s);	s = s.substring(s.lastIndexOf('.') + 1, s.lastIndexOf("Device"));	ErrorMsg.reportStatus("getDeviceNode: -> " + s);	int i;	try {	    for (i = 0; prefsDev.nodeExists(s + "#" + i); i++)		;		// do nothing	    return prefsDev.node(s + "#" + i);	} catch (BackingStoreException e) {	    ErrorMsg.reportStatus(e);	    return null;	}    }