rem: var makeRequest = function() { var url = new java.net.URL(this.url); var connection = url.openConnection();  for(header in this.headers) connection.addRequestProperty(header, this.headers[header]); connection.connect();  for(i=0;;i++) { headerName = connection.getHeaderFieldKey(i); headerValue = connection.getHeaderField(i); if(!headerName && !headerValue) break; if(headerName) this.responseHeaders[headerName] = headerValue; } this.readyState = 4; this.status = parseInt(connection.responseCode); this.statusText = connection.responseMessage; var stream = new java.io.InputStreamReader(connection.getInputStream()); var buffer = new java.io.BufferedReader(stream); var line; while((line = buffer.readLine()) != null) this.responseText += line; try { this.responseXML = new DOMDocument(this.responseText); } catch(e) { this.responseXML = null; } this.onreadystatechange(); }; 
add: function makeRequest(){ var url = new java.net.URL(this.url), connection = url.openConnection();   for (var header in this.headers) connection.addRequestProperty(header, this.headers[header]);  connection.connect();   for (i=0; ; i++) { var headerName = connection.getHeaderFieldKey(i); var headerValue = connection.getHeaderField(i); if (!headerName && !headerValue) break; if (headerName) this.responseHeaders[headerName] = headerValue; }  this.readyState = 4; this.status = parseInt(connection.responseCode); this.statusText = connection.responseMessage;  var stream = new java.io.InputStreamReader( connection.getInputStream()), buffer = new java.io.BufferedReader(stream), line;  while ((line = buffer.readLine()) != null) this.responseText += line;  try { this.responseXML = new DOMDocument(this.responseText); } catch(e) { this.responseXML = null; }  this.onreadystatechange(); } 
context: 		  var makeRequest = function() {		    var url = new java.net.URL(this.url);		    var connection = url.openConnection();		    // Add headers to Java connection		    for(header in this.headers) connection.addRequestProperty(header, this.headers[header]);		    connection.connect();		    // Stick the response headers into responseHeaders		    for(i=0;;i++) { 		      headerName = connection.getHeaderFieldKey(i); 		      headerValue = connection.getHeaderField(i); 		      if(!headerName && !headerValue) break; 		      if(headerName) this.responseHeaders[headerName] = headerValue;		    }	      this.readyState = 4;        this.status = parseInt(connection.responseCode);        this.statusText = connection.responseMessage;        var stream = new java.io.InputStreamReader(connection.getInputStream());        var buffer = new java.io.BufferedReader(stream);        var line;        while((line = buffer.readLine()) != null) this.responseText += line;        try {          this.responseXML = new DOMDocument(this.responseText);        } catch(e) {          this.responseXML = null;        }        this.onreadystatechange();		  };
meta: 1471	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1471/de71a046e619884292b122ddcf1401ad9932a5c7/env.js/buggy/build/runtest/env.js