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 = 37-44 lines in 2 locations

js/map.js 2 locations

@@ 430-473 (lines=44) @@
427
        data = urlarg.split('|');
428
    }
429
430
    data.map(function (dataitem) {
431
        dataitem = dataitem.split(':');
432
        if (dataitem.length < 3 || dataitem.length > 5) {
433
            return;
434
        }
435
436
        var m = {
437
                alpha: dataitem[0],
438
                id: alpha2id(dataitem[0]),
439
                name: null,
440
                coords: null,
441
                r: 0
442
            },
443
            index = 1,
444
            lat,
445
            lon;
446
447
        if (m.id < 0) {
448
            return;
449
        }
450
451
        lat = parseFloat(dataitem[index]);
452
        lon = parseFloat(dataitem[index + 1]);
453
        if (Coordinates.valid(lat, lon)) {
454
            index += 2;
455
            m.coords = new google.maps.LatLng(lat, lon);
456
        } else {
457
            m.coords = Coordinates.fromString(dataitem[index]);
458
            index += 1;
459
        }
460
        if (!m.coords) {
461
            return;
462
        }
463
464
        m.r = repairRadius(parseFloat(dataitem[index]), 0);
465
        index = index + 1;
466
467
        if (index < dataitem.length &&
468
                /^([a-zA-Z0-9-_]*)$/.test(dataitem[index])) {
469
            m.name = dataitem[index];
470
        }
471
472
        markers.push(m);
473
    });
474
475
    return markers;
476
}
@@ 551-587 (lines=37) @@
548
        return markers;
549
    }
550
551
    raw_ids.split(':').map(function (id_string) {
552
        var m = {id: null, name: null, coords: null, r: 0},
553
            raw_data,
554
            data,
555
            lat,
556
            lon;
557
558
        m.id = parseInt(id_string, 10);
559
        if (m.id === null || m.id < 0 || m.id >= 26 * 10) {
560
            return;
561
        }
562
563
        raw_data = Cookies.get('marker' + m.id);
564
        if (raw_data === null || raw_data === undefined) {
565
            return;
566
        }
567
568
        data = raw_data.split(':');
569
        if (data.length !== 4) {
570
            return;
571
        }
572
573
        lat = parseFloat(data[0]);
574
        lon = parseFloat(data[1]);
575
        if (Coordinates.valid(lat, lon)) {
576
            return;
577
        }
578
        m.coords = new google.LatLng(lat, lon);
579
580
        m.r = repairRadius(parseFloat(data[2]), 0);
581
582
        if (/^([a-zA-Z0-9-_]*)$/.test(data[3])) {
583
            m.name = data[3];
584
        }
585
586
        markers.push(m);
587
    });
588
589
    return markers;
590
}