Fix import and syntax errors in java files, but didn'
t test if the code actually works