Added Javadoc for copied code