To me there is a difference between code and effect. If you are reading the documentation, you know which code is used to which effect so you will tend to use the code structure of the documentation to reach the same effect, if which case you will have problems with patents. If you are reverse engineering, you are going from the same effect (reaching the same function and suppressing a specific error) but you are less likely to use the same path to it. Maybe different functions will be called to the same purpose.