Move Diagnosis class to java.