public void updateBinaryIndexedTree(int binaryIndexedTree[], int val, int index){
        while(index < binaryIndexedTree.length){
            binaryIndexedTree[index] += val;
            index = getNext(index);
        }
    }
Start from index+1 if you updating index in original array. Keep adding this value 
for next node till you reach outside range of tree
src/com/interview/tree/FenwickTree.java