Fixed a bug in ChooseMetricsForm and solved several Checkstyle issues