The Police & Criminal Evidence Act 1984 (section 1, sub-paras 2 & 3), provides police with the power to stop and search.
'he has reasonable grounds for suspecting that he will find stolen or prohibited articles'
'a constable may search any person or vehicle for stolen or prohibited articles'
The Home Office has a code of practice for stop and search.
In the scenario described my assumption is that the police are there to prevent or detect the crime, ergo they had relevant intelligence related to the timings and location of the crimes. Therefore paragraphs 2.4 and 2.4A of the code would be applicable.
In summary the code has the following in 2.4/2.4A (edited for the context of the scenario):
Reasonable grounds for suspicion should normally be linked to accurate and current intelligence or information...this would include reports from members of the public or other officers describing...crimes committed, for example, property stolen in a theft or burglary.
...Targeting searches in a particular area at specified crime problems not only increases their effectiveness but also minimises inconvenience to law-abiding members of the public. It also helps in justifying the use of searches both to those who are searched and to the public...
There may well be further justifications in such a scenario depending on answers to initial questions, behaviour, body language etc.