LPS-43321 Specify fromIndex as it can replace wrong tag if two identical tags exist in file
LPS-43321 Remove unused parameter
LPS-43321 Fix using incorrect variable
LPS-43321 Source formatting
LPS-43321 Source formatting - incorrect whitespace