question: protected void process ( Iterator < IPathID > csvSorted , Iterator < IPathID > dbSorted ) { IPathID db = getNext ( dbSorted ) ; String dbPath = getNameWithoutExt ( db ) ; IPathID csv = getNext ( csvSorted ) ; String csvPath = getNameWithoutExt ( csv ) ; boolean found = false ; while ( ( dbPath != null ) && ( csvPath != null ) ) { int compareResult = dbPath . compareTo ( csvPath ) ; if ( compareResult == 0 ) { process ( csv , db . getID ( ) ) ; csv = getNext ( csvSorted ) ; csvPath = getNameWithoutExt ( csv ) ; found = true ; } else if ( compareResult < 0 ) { db = getNext ( csvSorted ) ; dbPath = getNameWithoutExt ( db ) ; } else { if ( ! found ) { process ( csv , null ) ; } csv = getNext ( csvSorted ) ; csvPath = getNameWithoutExt ( csv ) ; found = false ; } } }
target:  process all items in csvSorted by getting the id that corresponds to path  