private static Map<Integer, long[]> computeArguments(
      Map<MtasSpanQuery, Map<Integer, Integer>> spansNumberData,
      MtasSpanQuery[] queries, Integer[] docSet) {
    Map<Integer, long[]> args = new HashMap<>();
    for (int q = 0; q < queries.length; q++) {
      Map<Integer, Integer> tmpData = spansNumberData.get(queries[q]);
      long[] tmpList = null;
      for (int docId : docSet) {
        if (tmpData != null && tmpData.containsKey(docId)) {
          if (!args.containsKey(docId)) {
            tmpList = new long[queries.length];
          } else {
            tmpList = args.get(docId);
          }
          tmpList[q] = tmpData.get(docId);
          args.put(docId, tmpList);
        } else if (!args.containsKey(docId)) {
          tmpList = new long[queries.length];
          args.put(docId, tmpList);
        }
      }
    }
    return args;
  }
private static Map < Integer , long [ ] > computeArguments ( Map < MtasSpanQuery , Map < Integer , Integer > > spansNumberData , MtasSpanQuery [ ] queries , Integer [ ] docSet ) { Map < Integer , long [ ] > args = new HashMap < > ( ) ; for ( int q = 0 ; q < queries . length ; q ++ ) { Map < Integer , Integer > tmpData = spansNumberData . get ( queries [ q ] ) ; long [ ] tmpList = null ; for ( int docId : docSet ) { if ( tmpData != null && tmpData . containsKey ( docId ) ) { if ( ! args . containsKey ( docId ) ) { tmpList = new long [ queries . length ] ; } else { tmpList = args . get ( docId ) ; } tmpList [ q ] = tmpData . get ( docId ) ; args . put ( docId , tmpList ) ; } else if ( ! args . containsKey ( docId ) ) { tmpList = new long [ queries . length ] ; args . put ( docId , tmpList ) ; } } } return args ; }
Compute arguments.

@param spansNumberData
the spans number data
@param queries
the queries
@param docSet
the doc set
@return the map