Checkingin Java Graph sample implementation