Musnad Ahmad
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.
حَدَّثَنَا عَبْدُ الرَّحْمَنِ، أَخْبَرَنَا سُفْيَانُ، عَنْ مَنْصُورٍ، عَنِ الْحَكَمِ، عَمَّنْ سَمِعَ عَلِيًّا، رَضِيَ اللَّهُ عَنْهُ وَابْنَ مَسْعُودٍ يَقُولَانِ قَضَى رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ بِالْجِوَارِ.
Grade: Hasan because of corroborating evidence; this is a da'eef isnad] (Darussalam)
Reference