Source:
<code>private CleanerTransformations getDefaultCleanerTransformations(HTMLCleanerConfiguration configuration) { <START> CleanerTransformations defaultTransformations = new TrimAttributeCleanerTransformations(); <END> TrimAttributeTagTransformation tt = new TrimAttributeTagTransformation(HTMLConstants.TAG_B, HTMLConstants.TAG_STRONG, false); defaultTransformations.addTransformation(tt); tt = new TrimAttributeTagTransformation(HTMLConstants.TAG_I, HTMLConstants.TAG_EM, false); defaultTransformations.addTransformation(tt); tt = new TrimAttributeTagTransformation(HTMLConstants.TAG_U, HTMLConstants.TAG_INS, false); defaultTransformations.addTransformation(tt); tt = new TrimAttributeTagTransformation(HTMLConstants.TAG_S, HTMLConstants.TAG_DEL, false); defaultTransformations.addTransformation(tt); tt = new TrimAttributeTagTransformation(HTMLConstants.TAG_STRIKE, HTMLConstants.TAG_DEL, false); defaultTransformations.addTransformation(tt); tt = new TrimAttributeTagTransformation(HTMLConstants.TAG_CENTER, HTMLConstants.TAG_P, false); tt.addAttributeTransformation(HTMLConstants.ATTRIBUTE_STYLE, "text-align:center"); defaultTransformations.addTransformation(tt); String restricted = configuration.getParameters().get(HTMLCleanerConfiguration.RESTRICTED); if ("true".equalsIgnoreCase(restricted)) { tt = new TrimAttributeTagTransformation(HTMLConstants.TAG_SCRIPT, HTMLConstants.TAG_PRE, false); defaultTransformations.addTransformation(tt); tt = new TrimAttributeTagTransformation(HTMLConstants.TAG_STYLE, HTMLConstants.TAG_PRE, false); defaultTransformations.addTransformation(tt); } return defaultTransformations; }</code><technical_language>Name sounds weird, for suggested class name change</technical_language>

Target:
private CleanerTransformations getDefaultCleanerTransformations(HTMLCleanerConfiguration configuration) { CleanerTransformations defaultTransformations = new TrimAttributeCleanerTransformations(); TagTransformation tt = new TagTransformation(HTMLConstants.TAG_B, HTMLConstants.TAG_STRONG, false); defaultTransformations.addTransformation(tt); tt = new TagTransformation(HTMLConstants.TAG_I, HTMLConstants.TAG_EM, false); defaultTransformations.addTransformation(tt); tt = new TagTransformation(HTMLConstants.TAG_U, HTMLConstants.TAG_INS, false); defaultTransformations.addTransformation(tt); tt = new TagTransformation(HTMLConstants.TAG_S, HTMLConstants.TAG_DEL, false); defaultTransformations.addTransformation(tt); tt = new TagTransformation(HTMLConstants.TAG_STRIKE, HTMLConstants.TAG_DEL, false); defaultTransformations.addTransformation(tt); tt = new TagTransformation(HTMLConstants.TAG_CENTER, HTMLConstants.TAG_P, false); tt.addAttributeTransformation(HTMLConstants.ATTRIBUTE_STYLE, "text-align:center"); defaultTransformations.addTransformation(tt); String restricted = configuration.getParameters().get(HTMLCleanerConfiguration.RESTRICTED); if ("true".equalsIgnoreCase(restricted)) { tt = new TagTransformation(HTMLConstants.TAG_SCRIPT, HTMLConstants.TAG_PRE, false); defaultTransformations.addTransformation(tt); tt = new TagTransformation(HTMLConstants.TAG_STYLE, HTMLConstants.TAG_PRE, false); defaultTransformations.addTransformation(tt); } return defaultTransformations; }