Corrected duplicate code identified by CPD
checkstyle correction