State tax filing

Actually, what I'm confused is whether my residency is regarded as MA, or any state?  I returned US (not always to MA) several times per year, each time only stay for 3 or 4 days.