                         for f_hash, details in self.alignments.hashes_to_frame.items()
                         if details[0] == frame_fullname]
          rename_count = 0
          for f_hash, idx in frame_faces:
              face_name, face_ext = self.faces.items[f_hash]
              old = face_name + face_ext
              new = "{}_{}{}".format(frame, idx, face_ext)
              if old == new:
                  logger.trace("Face does not require renaming: '%s'", old)
                  continue
 
</s> remove                        if details[0] == frame_fullname]
 </s> add                        for frame_name, idx in details.items()
                       if frame_name == frame_fullname] </s> remove             for action in ("temp", "final"):
 </s> add             rename_files.append((old, new))
        for action in ("temp", "final"):
            for files in rename_files:
                old, new = files </s> remove         frame_faces = [(f_hash, details[1])
 </s> add         frame_faces = list()
        frame_faces = [(f_hash, idx) </s> remove 
            if self.alignments.frame_has_multiple_faces(frame):
                if self.type == "faces":
                    # Add correct alignments index for moving faces
                    retval = (retval, idx)
                logger.trace("Returning: '%s'", retval)
                yield retval
 </s> add             for frame, idx in frame_idx:
                if self.alignments.frame_has_multiple_faces(frame):
                    if self.type == "faces":
                        # Add correct alignments index for moving faces
                        retval = (retval, idx)
                    logger.trace("Returning: '%s'", retval)
                    yield retval
            faces = self.faces.items[f_hash]
            if len(faces) == 1:
                face_name, face_ext = faces[0]
            else:
                face_name, face_ext = self.check_multi_hashes(faces, frame, idx)
                         for f_hash, details in self.alignments.hashes_to_frame.items()
                         if details[0] == frame_fullname]
          rename_count = 0
          for f_hash, idx in frame_faces:
            faces = self.faces.items[f_hash]
            if len(faces) == 1:
                face_name, face_ext = faces[0]
            else:
                face_name, face_ext = self.check_multi_hashes(faces, frame, idx)
              old = face_name + face_ext
              new = "{}_{}{}".format(frame, idx, face_ext)
              if old == new:
                  logger.trace("Face does not require renaming: '%s'", old)
                  continue
keep keep keep keep replace keep keep keep keep keep
 Alignments tool: Filename clash bugfix 
tools/lib_alignments/jobs.py