ENOfficial
It was narrated from al-Hakam, from someone who heard ‘Ali (رضي الله عنه) and Ibn Mas`ood say: The Messenger of Allah (ﷺ) issued a judgement on the basis of one being the neighbour of the other.
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا عَبْدُ الرَّحْمَنِ، أَخْبَرَنَا سُفْيَانُ، عَنْ مَنْصُورٍ، عَنِ الْحَكَمِ، عَمَّنْ سَمِعَ عَلِيًّا، رَضِيَ اللَّهُ عَنْهُ وَابْنَ مَسْعُودٍ يَقُولَانِ قَضَى رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ بِالْجِوَارِ.
sunnah.com