The friendships of the world are oft
Confederacies in vice, or leagues of pleasure;
Ours has severest virtue for its basis,
And such a friendship ends not but with life.
The statement is absolutely true. Friendship or enemity should have no impact on the Justice decided.
One such story is stated below:

Jumman Sheikh was a very bad person because his aunt his aunt had a plot of land in her name and Jumman feed her well, he respected her and behaved well with her. But when the aunt made the plot to his name he ill treated her and did not give her food. Jumman had a good friend named Algu who was a Hindu but still he had maintained his friendship with him. Though they were of two different religion their thinking matched.
But when Jumman’s aunt called the Panchayat; Algu was one of the Panchs who had to listen to both side i.e., of the aunt & his best friend, Jumman's. Jumman thought his friend would take his side but he did not it is because he realized that his friend was wrong.

Jumman was angry and wanted to take revenge, but he lacked oppurtunity. But then got the oppurtunity to be one of the Panchs when the Panchaya was called against Algu; inspite of his thought of taking revenge. Jumman took the side of Algu as he was right.

This shows clearly that either friendship or enemity cannot effect the right judgement of The Panchs (who are considered to think selflessly without any partiality) .