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
    const newTreeMove = moveTreeNode(
202
        tree,
203
        current.index,
204
        currentPath,
205
        next.index,
206
        nextPath
207
    );
208
209
    let flatMove = treeToFlatList(newTreeMove);
210
211
    // remove root-node
212
    if (!showTreeRootNode) {
213
        flatMove = flatMove.shift();
214
    }
215
216
    const record = state.get(stateKey);
217
    const updated = record.merge({
218
        data: flatMove,
219
        currentRecords: flatMove,
220
        treeData: newTreeMove,
221
        proxy: flatMove,
222
        lastUpdate: generateLastUpdate()
223
    });
224
225
    return state.setIn([stateKey], updated);
226
};
227
228
export const setTreeNodeVisibility = (state, {
229
    id, showTreeRootNode, stateKey
230
}) => {
231
232
    const flat = state.getIn([stateKey, 'data']);
233
    const tree = state.getIn([stateKey, 'treeData']);
234
235
    const currentVisibility = !!flat
236
        .find(node => node.get('_id') === id).get('_hideChildren');
237
238
    const path = [-1, ...getTreePathFromId(flat, id)];
239
240
    const updatedTree = setTreeValue(
@@ 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