def METHOD_NAME(self, sources: list, dry_run: bool = False):
    pattern = re.compile(SOURCE_CODE_FILE_PATTERN)
    good = []
    bad = []
    # Check sources for invalid filenames
    for source in sources:
        basename = os.path.basename(source)
        if not pattern.match(basename):
            new_basename = self._fix_filename(basename)
            if not pattern.match(new_basename):
                self.logger.error(f"Unable to fix name for {basename}")
                return False
            bad.append((source, basename, new_basename))
        else:
            good.append(source)
    # Notify about errors or replace all occurrences
    if dry_run:
        if len(bad) > 0:
            self.logger.error(f"Found {len(bad)} incorrectly named files")
            self.logger.info(bad)
            return False
    else:
        # Replace occurrences in text files
        for source, old, new in bad:
            self._replace_occurrence(sources, old, new)
        # Rename files
        for source, old, new in bad:
            shutil.move(source, source.replace(old, new))
    return True