JCR-2094 : Refactoring and Reformat code source