'Analyze if we can cluster the responses and do it.'

def _clusterData(self, widg):

    data = []
    for resp in self.responses:
        if resp[0]:
            reqid = resp[1]
            historyItem = self.historyItem.read(reqid)
            data.append(historyItem.response)
    if data:
        distance_function_selector(self.w3af, data)
    else:
        msg = 'There    are    no    HTTP    responses    available    to    cluster.'
        dlg = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK, msg)
        opt = dlg.run()
        dlg.destroy()
