If it is joist in bending, then the repair should generally be full length, using bolts, not nails. If the member is in tension or compression only (truss member) you can "scab" repairs onto the side, usually 18 inches beyond the break or splice point, and nailed at 4 inches o.c. staggered top and bottom. Check the stresses before you do that though, so that you can size the nails. Generally won't be less than 12d nail though. The National Design Standard (NDS)for wood in the US, provides guidelines for the shear capacity of nails, thru-bolts, and lag bolts in wood. If you don't have access to a copy, you might try a local university.
These are very general guidelines and you should make sure you check the stresses and if you have questions, check with a local structural engineer to check the analysis and code provisions.
Good luck.