Entry<String, List<String>> entry = iterator.next();
String bank = entry.getKey();
List<String> patchNumList = entry.getValue();
if (patchNumList.isEmpty()) {
MidiRecordSession session = midiDeviceProvider.openSession();
List<PopupContainer> popupList =
guiHandler.storePatch(table, bank, null);
String sysex = midiDeviceProvider.closeSession(session);
handleXmlstore(xmlstores, bank, null, popupList, sysex);
} else {
int incr = (patchNumList.size() / 4) + 1;
for (int i = 0; i < patchNumList.size(); i += incr) {
MidiRecordSession session =
midiDeviceProvider.openSession();
String patchNum = patchNumList.get(i);
List<PopupContainer> popupList =
guiHandler.storePatch(table, bank, patchNum);
String sysex = midiDeviceProvider.closeSession(session);