The 367th line seems a clone of the 382th line.
Can you help me to remove (or refactor) these repeated lines?