private int findBase(int index, Node[] nodes){
		int base = baseBuffer.get(index);
		if(base < 0) {
			return base;
		}

		while(true) {
			boolean collision = false;	// already taken?
			for(Node node : nodes) {
				/*
				 * NOTE:
				 * Originally, nextIndex is base + node.getKey(). But to reduce construction time, we use index + base + node.getKey().
				 * However, this makes array bigger. If there is a need to compat the file dat.dat, it's possbile to modify here and there.
				 * Although the size of jar file doesn't change, memory consumption will be smaller.
				 */
				int nextIndex = index + base + node.getKey();

				if(baseBuffer.capacity() <= nextIndex) {
					int newLength = nextIndex + 1;
					IntBuffer newBaseBuffer = ByteBuffer.allocate(newLength * 4).asIntBuffer();
					baseBuffer.rewind();
					newBaseBuffer.put(baseBuffer);
					baseBuffer = newBaseBuffer;
					IntBuffer newCheckBuffer = ByteBuffer.allocate(newLength * 4).asIntBuffer();
					checkBuffer.rewind();
					newCheckBuffer.put(checkBuffer);
					checkBuffer = newCheckBuffer;
				}

				if(baseBuffer.get(nextIndex) != 0) {	// already taken
					base++;	// check next base value
					collision = true;
					break;
				}
			}

			if(!collision){
				break;	// if there is no collision, found proper base value. Break the while loop.
			}

		}

		for(Node node : nodes) {
			baseBuffer.put(index + base + node.getKey(), node.getKey() == TERMINATING_CHARACTER ? -1 : 1);	// Set -1 if key is terminating character. Set default base value 1 if not.
		}

		return base;
	}