Fix performance issues identified through static analysis

- Mixed StringBuilder and string concatenation

- Use of StringBuilder/Buffer when string concatenation suffices

- Manual array to collection copy

- Unnecessary boxing/unboxing

- Use of constructor of Boolean

- Redundant call to toString()

- Static field access through instance reference