Long Method

Method ProcessBuffer() has a complicated if statement that depict Lond
Method Code smell
so we decomposed proceddBuffer() method to different buffer() for easier
modification and understandability.