nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: GoogleChrome/lighthouse
Pull request #6711 (2018-12-03 17:58:01)

core(url-shim): add intent protocol to NON_NETWORK_PROTOCOLS
<!-- Thank you for submitting a pull request! -->
**Summary**
What kind of change does this PR introduce?
Don't regard an `intent:` request as key request

Is this a bugfix, feature, refactoring, build related change, etc?
Issue been tagged as bug. So bugfix :)

Link any documentation or information that would help understand this change
I'm unsure whether my change/addition goes in the right direction, as I cannot find more detailed information about `intent` protocol/requests

**Related Issues/PRs**
closes https://github.com/GoogleChrome/lighthouse/issues/6660

Cheers
midzer


Patch:
diff --git a/lighthouse-core/lib/url-shim.js b/lighthouse-core/lib/url-shim.js
index 260136058..0bf06d2fa 100644
--- a/lighthouse-core/lib/url-shim.js
+++ b/lighthouse-core/lib/url-shim.js
@@ -209,7 +209,7 @@ URLShim.URL = URL;
 URLShim.URLSearchParams = (typeof self !== 'undefined' && self.URLSearchParams) ||
     require('url').URLSearchParams;
 
-URLShim.NON_NETWORK_PROTOCOLS = ['blob', 'data'];
+URLShim.NON_NETWORK_PROTOCOLS = ['blob', 'data', 'intent'];
 
 URLShim.INVALID_URL_DEBUG_STRING =
     'Lighthouse was unable to determine the URL of some script executions. ' +


Test patch:
diff --git a/lighthouse-core/test/audits/uses-rel-preload-test.js b/lighthouse-core/test/audits/uses-rel-preload-test.js
index 12176f309..6765a7370 100644
--- a/lighthouse-core/test/audits/uses-rel-preload-test.js
+++ b/lighthouse-core/test/audits/uses-rel-preload-test.js
@@ -210,6 +210,18 @@ describe('Performance: uses-rel-preload audit', () => {
     });
   });
 
+  it(`shouldn't suggest preload for protocol intent`, () => {
+    const networkRecords = getMockNetworkRecords();
+    networkRecords[2].protocol = 'intent';
+
+    const artifacts = mockArtifacts(networkRecords, defaultMainResourceUrl);
+    const context = {settings: {}, computedCache: new Map()};
+    return UsesRelPreload.audit(artifacts, context).then(output => {
+      assert.equal(output.rawValue, 0);
+      assert.equal(output.details.items.length, 0);
+    });
+  });
+
   it('does not throw on a real trace/devtools log', async () => {
     const artifacts = {
       URL: {finalUrl: 'https://pwa.rocks/'},
Repository: neo4j-contrib/neo4j-apoc-procedures
Pull request #39 (2016-05-16 15:57:21)

set isCoalescing property on XMLInputFactory in load.xml proc
This is to deal with the case when the text of an element contains the ampersand character.
Without this option when the parser finds and ampersand, it splits the text content into multiple processing events.


Patch:
diff --git a/databases.xml b/databases.xml
index d972d2021..ea9d45893 100644
--- a/databases.xml
+++ b/databases.xml
@@ -4,7 +4,7 @@
     </child>
     <child name="relational">
         <grandchild name="MySQL">
-            MySQL is a relational database
+            MySQL is a database &amp; relational
         </grandchild>
         <grandchild name="Postgres">
             Postgres is a relational database
diff --git a/src/main/java/apoc/load/Xml.java b/src/main/java/apoc/load/Xml.java
index ea8977fbb..7811977be 100644
--- a/src/main/java/apoc/load/Xml.java
+++ b/src/main/java/apoc/load/Xml.java
@@ -31,6 +31,7 @@ public class Xml {
     public Stream<MapResult> xml(@Name("url") String url) {
         try {
             URLConnection urlConnection = new URL(url).openConnection();
+            FACTORY.setProperty("javax.xml.stream.isCoalescing", true);
             XMLStreamReader reader = FACTORY.createXMLStreamReader(urlConnection.getInputStream());
             if (reader.nextTag()==XMLStreamConstants.START_ELEMENT) {
                 return Stream.of(new MapResult(handleElement(reader)));


Test patch:
diff --git a/src/test/java/apoc/util/XmlTest.java b/src/test/java/apoc/util/XmlTest.java
index be99d13f1..b2d1256b7 100644
--- a/src/test/java/apoc/util/XmlTest.java
+++ b/src/test/java/apoc/util/XmlTest.java
@@ -17,7 +17,7 @@ public class XmlTest {
                     "_children=[" +
                     "{_type=child, name=Neo4j, _text=Neo4j is a graph database}, " +
                     "{_type=child, name=relational, _children=[" +
-                      "{_type=grandchild, name=MySQL, _text=MySQL is a relational database}, " +
+                      "{_type=grandchild, name=MySQL, _text=MySQL is a database & relational}, " +
                       "{_type=grandchild, name=Postgres, _text=Postgres is a relational database}]}]}";
     private GraphDatabaseService db;
 	@Before public void setUp() throws Exception {