File: rename_with.js

package info (click to toggle)
libnb-platform18-java 12.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 729,800 kB
  • sloc: java: 5,059,097; xml: 574,432; php: 78,788; javascript: 29,039; ansic: 10,278; sh: 6,386; cpp: 4,612; jsp: 3,643; sql: 1,097; makefile: 540; objc: 288; perl: 277; haskell: 93
file content (100 lines) | stat: -rw-r--r-- 2,655 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
function Person(name) {
    this.realname = name;

    this.hello = function() {
        return this.realname;
    };
}

var pe = new Person("John"); 
with (pe) { //rename;8;man;9:var man =;10:(man) {,11:man.hello(),12:man.realname
    pe.hello(); //rename;11;greeting;11:pe.greeting();4:this.greeting;87:passanger.greeting
    pe.realname = "Doe";
}
var control = {};

superGlobal = 1;

function drawResolvedFixedChart(object) {


    var data = [];
    var lastDate = new Date();
    with(lastDate){
        lastDate = 1; //rename;13;dat;22:var dat;23:(dat);24:dat = 1;28:dat =;43:dat.getTime
    }
    for (var d in object) {
        var stamp = +object[d][0];
        lastDate = new Date(stamp);
        console.log(data[d]);

    }

    control = Util.set({
        'action': 'print',
        'dat': {
            'foo': {
                'dummy': {
                    'really': true,
                    value: superGlobal
                }
            }
        },
        'postprocess': {'start': {'start': new Date(lastDate.getTime() - 60 * 86400000)}}
    });
}

with (window) {
    superGlobal = 2; //rename;11;s_global;48:s_global = ;39:value: s_global;16:s_global = 1
    drawResolvedFixedChart({}); //rename;11;paint;18: function paint(;49:paint({})
}
window.test = {
    name: {
        firstname: "John",
        lastName: "Smith"
    }
};

function Synergy() {
    var synergy = this; 
    this.defaultCookiesExpiration = 7;

    synergy.modal = { //rename;16;dialog;62:synergy.dialog;74:(this.dialog);81:this.dialog.in
        modalBody: "#modal-body",
        show: function() { //rename;11;display;64:display: f;75:display()
            $(this.modal).modal('toggle');
        },
        innerObject: {
            innerName: 2,
            show: function() {
            }
        }
    };

    with (this.modal) {
        show();
        with(window.test.name){ //rename;29;n_ame;76:window.test.n_ame;52:n_ame: {
            lastName = "Doe"; //rename;18;surname;77:surname = ;54:surname: "Smith
        }
    }

    with (this.modal.innerObject) {
        show(); //rename;11;open;82:open();69:open: function(
    }

    var cc = new Car();
    with (cc) { //rename;12;_car;85:_car = ;86:(_car);88:_car.add
        passanger.hello(); //rename;12;psngr;87:psngr.hello;96:this.psngr
        cc.addPassanger(new Person("Jane")); //rename;31;Human;88:new Human;96:new Human;9:new Human;1:function Human(
    }
}


function Car() { //rename;12;Auto;93:function Auto(;85:new Auto(
    this.topSpeed = 200;
    this.hp = 150;
    this.passanger = new Person("Mike");
    this.addPassanger= function(){};
    this.go = function() {
    };
}