Why would a guy insult his female friend in the group of friends but compliments her when they are in two?

He feels nervous with her alone. He never explains why. He denies that he likes her more than a friend.
Why would a guy insult his female friend in the group of friends but compliments her when they are in two?
Post Opinion