error ..cannot merge

guess problem inside getMergeDirection()..