docs: public  TreeSet<DocSim> duplicate(ArrayList<Documents> docs) throws Exception {
  		this.docs = docs;
  		dsMap = new TreeSet<DocSim>();
  		feature();
  		dup = new boolean[docs.size()];
  		mergeto = new int[docs.size()];
  		ThreadPoolExecutor pool = new ThreadPoolExecutor(numThreads, numThreads, 1000,
  				TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
  
  
  
  		jobs=new AtomicInteger();
  		int total = 0;
  		for(int i=0;i<docs.size()-1;i++) {
  			if(dup[i]){				
  				continue;
  			}
  			for(int k=0;k<=lenDiffThresh;k++){
  				int idx = features[i].size()-lenDiffThresh/2+k;
  				if(idx<0||idx>=lenGroup.size())
  					continue;
  				TIntHashSet g = lenGroup.get(idx);
  				TIntIterator it = g.iterator();
  				for(int t=g.size();t>0;t--){
  					int j = it.next();
  					if(dup[j]||j==i){
  						continue;
  					}
  					CalcSimilarity cs = new CalcSimilarity(i,j);
  					total++;
  					pool.execute(cs);
  				}
  			}
  		}
  		
  		while(jobs.get()<total){
  			Thread.sleep(10);
  		}
  		pool.shutdown();
  		
  		HashMap<Integer,ArrayList<Integer>>  map =   new HashMap<Integer,ArrayList<Integer>> ();
  		for(int id1=0;id1<docs.size();id1++){
  			if(!dup[id1]){
  				ArrayList<Integer> li = new ArrayList<Integer>();
  				li.add(id1);
  				map.put(id1, li);
  			}
  		}
  		for(int id1=0;id1<docs.size();id1++){
  			if(dup[id1]){
  				int root = findroot(id1);
  				map.get(root).add(id1);
  			}
  		}
  		TreeSet<DocSim> mapp =new TreeSet<DocSim>();
  		Iterator<Entry<Integer, ArrayList<Integer>>> it = map.entrySet().iterator();
  		while(it.hasNext()){
  			Entry<Integer, ArrayList<Integer>> el = it.next();
  			DocSim d = new DocSim(el.getValue());
  			mapp.add(d);
  		}
  		return mapp;
  	}