1. A method for obfuscating a computer program, the computer program being designed to carry out one or more specified tasks, the method including: compiling a source code representation of the computer program to obtain an object code representation of the computer program; searching the object code representation of the computer program to find first and second object code sequences, the first and second object code sequences being similar, at least in part; modifying the object code representation of the computer program by: inserting a third object code sequence into the object code representation of the computer program, the third object code sequence comprising one or more instructions, and being operable to pass control to the first object code sequence; inserting a branch at the end of the first object code sequence, the branch being operable to: pass control, upon detection of a first predefined condition, to an instruction following the first object code sequence, and to pass control, upon detection of a second predefined condition, to an instruction following the third object code sequence; whereby the third object code sequence is executed in place of the second object code sequence without materially affecting completion of the one or more specified tasks.