Hello, long time listener, first time caller.

I've been at this for some time and seem to be getting no where. I need to create an algorithm that finds the common element(s) in all arrays that has a signature of
that has an efficiency of at most O(knlogn), uses a query array, and accepts as input a collection of arrays. I am aware my time would be better spent learning how to use array lists and hash sets, but I am supposed to use concepts already covered, and these have not been.
I feel like this code should work, but it is returning null for the array of common elements. Which means it obviously is not working correctly. I am hoping someone can help point me in the correct direction. I am also likely going to need hep implementing the sort algorithm, but I wanted to get the part of finding the common elements set first.
Thank you for your time and input