Lump near Patella

Patient: I have a hard lump behind my left patella, which occasionally pops out to the right side of my knee cap. It only hurts when the lump pops out, but when I push it back “under” my knee cap, the pain in gone. My knee will also lock when the lump has popped out to the side. Nothing is showing up in x rays, which rules out loose fragments. What could this lump be?

Doctor: