replaced local vars of type StringBuffer with StringBuilder