/*
Gets the currentWindow, Window number starts from 0.
177842
private int getCurrentRecord()
    {
        //Get the current time
        long currentTime = System.currentTimeMillis();

        //How far along has the test run?
        long currentDuration=currentTime-startTime;
        //How far along the test are we?
        double currentRelativePosition=(currentDuration/1000d)/testDurationInSeconds;
        //determine the position of the test window
        double currentRecordRaw=currentRelativePosition*(numKeys-windowSize);

        Long currentRecord=Math.round(currentRecordRaw);

        return currentRecord.intValue();
    }
447616
function getWindowsVersion () {
    return spawn('ver').then(function (output) {
        var match = /\[Version (.*)\]\s*$/.exec(output);
        return Version.fromString(match[1]);
    }).fail(function () {
        return Version.fromString(os.release());
    });
}
538570
function getWindowForElement(element) {
  const e = element.documentElement || element;
  const doc = e.ownerDocument;
  return doc.defaultView;
}
1220971
def gotoPrevious(self):
        
        index = self._currentPanel.currentIndex() - 1
        if index < 0:
            index = self._currentPanel.count() - 1
        
        self._currentPanel.setCurrentIndex(index)
935824
def gotoNext(self):
        
        index = self._currentPanel.currentIndex() + 1
        if ( self._currentPanel.count() == index ):
            index = 0
            
        self._currentPanel.setCurrentIndex(index)
625267
def __get_window(self, hWnd):
        
        window = Window(hWnd)
        if window.get_pid() == self.get_pid():
            window.set_process( self.get_process() )
        if window.get_tid() == self.get_tid():
            window.set_thread( self.get_thread() )
        return window
805999
function getWindowScrollPosition() {
  invariant(canUseDOM, 'Cannot get current scroll position without a DOM');

  return {
    x: window.pageXOffset || document.documentElement.scrollLeft,
    y: window.pageYOffset || document.documentElement.scrollTop
  };
}
1215107
private SimpleWindowState restoreWindowState() {
		SimpleWindowState laststate = null;
		final String statestr = preferences.get(prefnzPrefix+PREF_WINDOW_STATE, null);
		if (logger.isDebugEnabled()) logger.debug("Restoring preference "+PREF_WINDOW_STATE+"=" + statestr);
		if (statestr != null) {
			SimpleWindowState state = null;
			try {
				state = SimpleWindowState.valueOf(statestr);
			} catch (final IllegalArgumentException e) {	state = null; }
			if (state != null) {
				switch (state) {
				case ICONFIED: this.setExtendedState(Frame.ICONIFIED);	break;
				case NORMAL: this.setExtendedState(Frame.NORMAL); break;
				case MAXIMIZED: this.setExtendedState(Frame.MAXIMIZED_BOTH); break;
				default:
					logger.error("Invalid window state (nothing will changed): " + statestr);
				}
			}
			laststate = state;
		}
		return laststate;
	}
566794
function getDebuggableWindows(host, port) {
        if (!host) {
            host = "127.0.0.1";
        }
        if (!port) {
            port = 9222;
        }
        var def = new $.Deferred();
        var request = new XMLHttpRequest();
        request.open("GET", "http://" + host + ":" + port + "/json");
        request.onload = function onLoad() {
            var sockets = JSON.parse(request.response);
            def.resolve(sockets);
        };
        request.onerror = function onError() {
            def.reject(request.response);
        };

        request.send(null);

        return def.promise();
    }
309882
function currentWord(x) {
    if ((x.b.data.wordWindow["0"] === token) &&
        (x.a === tag)) {
        return 1;
    }
    return 0;
  }
351537
def setActiveWindow(self, win):
        
        self._setProperty('_NET_ACTIVE_WINDOW', [1, X.CurrentTime, win.id],
                          win)
726104
def step_prev(self):
        """"""
        window_start = around(self.parent.value('window_start') -
                              self.parent.value('window_length') /
                              self.parent.value('window_step'), 2)
        if window_start < 0:
            return
        self.parent.overview.update_position(window_start)
1160737
def getWindow(self):
        
        if self.getPID() != -1:
            return PlatformManager.getWindowTitle(PlatformManager.getWindowByPID(self.getPID()))
        else:
            return ""
358356
public JFrame getMainWindow()
    {
        if (mainWindow == null)
        {
            mainWindow = new JFrame();
            mainWindow.setTitle("Swing Browser");
            mainWindow.setVisible(true);
            mainWindow.setBounds(new Rectangle(0, 0, 583, 251));
            mainWindow.setContentPane(getMainPanel());
            mainWindow.addWindowListener(new java.awt.event.WindowAdapter()
            {
                public void windowClosing(java.awt.event.WindowEvent e)
                {
                    mainWindow.setVisible(false);
                    System.exit(0);
                }
            });
        }
        return mainWindow;
    }
800787
def get(self, end_ix):
        
        if self.most_recent_ix == end_ix:
            return self.current

        target = end_ix - self.cal_start - self.offset + 1
        self.current = self.window.seek(target)

        self.most_recent_ix = end_ix
        return self.current
178071
function getWHIgnoreDisplay() {
  for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
    args[_key2] = arguments[_key2];
  }

  var val = void 0;
  var elem = args[0];
  // in case elem is window
  // elem.offsetWidth === undefined
  if (elem.offsetWidth !== 0) {
    val = getWH.apply(undefined, args);
  } else {
    swap(elem, cssShow, function () {
      val = getWH.apply(undefined, args);
    });
  }
  return val;
}
483140
function() {
            var $el = this.element,
                header = $el.hasClass( "ui-header" ),
                offset = Math.abs( $el.offset().top - this.window.scrollTop() );
            if ( !header ) {
                offset = Math.round( offset - this.window.height() + $el.outerHeight() ) - 60;
            }
            return offset;
        }