Question d’entretien chez SEB AB

when would I consider abstracting code to its own method/pattern