GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 30-34 lines in 2 locations

src/reducers/actionHelpers/datasource.js 2 locations

@@ 204-237 (lines=34) @@
201
        current.index,
202
        currentPath,
203
        next.index,
204
        nextPath
205
    );
206
207
    let flatMove = treeToFlatList(newTreeMove);
208
209
    // remove root-node
210
    if (!showTreeRootNode) {
211
        flatMove = flatMove.shift();
212
    }
213
214
    const record = state.get(stateKey);
215
    const updated = record.merge({
216
        data: flatMove,
217
        currentRecords: flatMove,
218
        treeData: newTreeMove,
219
        proxy: flatMove,
220
        lastUpdate: generateLastUpdate()
221
    });
222
223
    return state.setIn([stateKey], updated);
224
};
225
226
export const setTreeNodeVisibility = (state, {
227
    id, showTreeRootNode, stateKey
228
}) => {
229
230
    const flat = state.getIn([stateKey, 'data']);
231
    const tree = state.getIn([stateKey, 'treeData']);
232
233
    const currentVisibility = !!flat
234
        .find(node => node.get('_id') === id).get('_hideChildren');
235
236
    const path = [-1, ...getTreePathFromId(flat, id)];
237
238
    const updatedTree = setTreeValue(
239
        tree, path, { _hideChildren: !currentVisibility }
240
    );
@@ 31-60 (lines=30) @@
28
        gridType: gridType || 'grid',
29
        currentRecords: keyedCurr
30
            ? keyedCurr
31
            : keyedData,
32
        lastUpdate: generateLastUpdate()
33
    }));
34
};
35
36
export const setPartialTreeData = (state, {
37
    data, parentId, showTreeRootNode, stateKey
38
}) => {
39
40
    const tree = state.getIn([stateKey, 'treeData']);
41
    const flat = state.getIn([stateKey, 'data']);
42
    const pathToNode = [
43
        -1, ...getTreePathFromId(flat, parentId)
44
    ];
45
    const updatedTree = setTreeValue(
46
        tree, pathToNode, { children: data }
47
    );
48
49
    let updatedFlat = treeToFlatList(updatedTree);
50
51
    if (!showTreeRootNode) {
52
        updatedFlat = updatedFlat.shift();
53
    }
54
55
    const record = state.get(stateKey).merge({
56
        data: updatedFlat,
57
        currentRecords: updatedFlat,
58
        treeData: updatedTree,
59
        proxy: updatedFlat,
60
        total: updatedFlat.count(),
61
        lastUpdate: generateLastUpdate()
62
    });
63