public static List<NearbyPlace> addDefaultImages(List<NearbyPlace> nearByPlaces,
            String contextPath) throws CitysearchException {
        if (nearByPlaces != null && !nearByPlaces.isEmpty()) {
            List<String> imageList = Utils.getImages(contextPath);
            if (imageList != null && !imageList.isEmpty()) {
                ArrayList<Integer> indexList = new ArrayList<Integer>(3);
                Random randomizer = new Random();
                for (int i = 0; i < nearByPlaces.size(); i++) {
                    NearbyPlace nbp = nearByPlaces.get(i);
                    String imageUrl = nbp.getAdImageURL();
                    if (StringUtils.isBlank(imageUrl)) {
                        int index = 0;
                        do {
                            index = randomizer.nextInt(imageList.size());
                        } while (indexList.contains(index));
                        indexList.add(index);
                        imageUrl = imageList.get(index);
                        nbp.setAdImageURL(imageUrl);
                    }
                    nearByPlaces.set(i, nbp);
                }
            }
        }
        return nearByPlaces;
    }