r scripts for clustering bug data