import logging


def check_entries_and_report_duplicates(class_entries):
    """
    Scans given dict with class entries and prints information about duplicate entries

    :return 0 if there no duplicates, 1 otherwise
    """

    rc = 0
    for class_entry in class_entries.keys():
        class_entry_jars = class_entries[class_entry]
        if len(class_entry_jars) > 1:
            logging.error("%s is present in (%s)" % (class_entry, ", ".join(class_entry_jars)))
            rc = 1
    return rc