I'm definitely not quoting a code here, but the 'rule of thumb' I was taught is that you could drill a hole of a diameter up to 1/3 the nominal width of the joist within an area 3x the nominal width from a bearing point, in the center of the joist. Off center holes had more restrictive rules as to size, but I can't remember them.