The posted code is missing the import statements, the class definition and the definitions for all the variables.
It is not possible to compile and test the code without them.