I only have access to Scotland 1871 census through ancestry so not original image. However there is only one James Barr born Ayrshire in 1871 census. Parish, Girvan. ED, 1. Page, 4.
Montgomerie Street Girvan Ayrshire
John Barr 41 ag lab born Ireland
Mary ann wife 31 born Glasgow lanarkshire
Elizabeth 5 Girvan
James 4 Girvan