anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: thelastpickle/cassandra-reaper
Issue: table repair fails when limited on one DC 

I am using reaper 2.3.1, OSS 3.11.10.
If I schedule a repair on a table which is replicated to 2 DCs, rf 3, and limit it to be run in one DC only, the repair fails with:
"`Replica set changed for segment 3d13c51f-283b-11ec-af04-a9ec581eeeb8 on range io.cassandrareaper.core.Segment@28d0f9f0`"

I've tried a different table, same error. No issues running repairs without limiting to a DC.
Thanks!

Changed files:
src/server/src/main/java/io/cassandrareaper/service/RepairRunService.java

diff --git a/src/server/src/main/java/io/cassandrareaper/service/RepairRunService.java b/src/server/src/main/java/io/cassandrareaper/service/RepairRunService.java
index 41314eb2..021c9c73 100644
--- a/src/server/src/main/java/io/cassandrareaper/service/RepairRunService.java
+++ b/src/server/src/main/java/io/cassandrareaper/service/RepairRunService.java
@@ -204,7 +204,8 @@ public final class RepairRunService {
           Segment.builder()
                  .withBaseRange(segment.getBaseRange())
                  .withTokenRanges(segment.getTokenRanges())
-                 .withReplicas(getDCsByNodeForRepairSegment(targetCluster, segment, repairUnit.getKeyspaceName()))
+                 .withReplicas(getDCsByNodeForRepairSegment(
+                    targetCluster, segment, repairUnit.getKeyspaceName(), repairUnit))
                  .build());
     }
 
@@ -214,7 +215,8 @@ public final class RepairRunService {
   private Map<String, String> getDCsByNodeForRepairSegment(
       Cluster cluster,
       Segment segment,
-      String keyspace) throws ReaperException {
+      String keyspace,
+      RepairUnit repairUnit) throws ReaperException {
 
     final int maxAttempts = 2;
     for (int attempt = 0; attempt < maxAttempts; attempt++) {
@@ -224,7 +226,13 @@ public final class RepairRunService {
         Collection<String> nodes = clusterFacade.tokenRangeToEndpoint(cluster, keyspace, segment);
         Map<String, String> dcByNode = Maps.newHashMap();
         nodes.forEach(node -> dcByNode.put(node, EndpointSnitchInfoProxy.create(jmxConnection).getDataCenter(node)));
-        return dcByNode;
+        if (repairUnit.getDatacenters().isEmpty()) {
+          return dcByNode;
+        } else {
+          return dcByNode.entrySet().stream()
+            .filter(entry -> repairUnit.getDatacenters().contains(entry.getValue()))
+            .collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue()));
+        }
       } catch (RuntimeException e) {
         if (attempt < maxAttempts - 1) {
           LOG.warn("Failed getting replicas for token range {}. Attempt {} of {}",
Repository: adobe-consulting-services/acs-aem-commons
Issue: 3.7.0 breaks system notifications. 

Hello, 

I upgraded ACS commons from 3.4.0 to latest 3.7.0 on an AEM 6.2 instance. Now the notification feature does not work and throws an exception. I downgraded to 3.6.2 and the feature works on that version. Are there plans to fix this in 3.7.x next release? 

```
Error during include of component '/apps/acs-commons/components/utilities/system-notifications'

Error Message:

java.lang.ExceptionInInitializerError
Processing Info:

Page	=	/etc/acs-commons/notifications/test	
Resource Path	=	/etc/acs-commons/notifications/test/jcr:content	
Cell	=	system-notifications	
Cell Search Path	=	system-notifications	
Component Path	=	/apps/acs-commons/components/utilities/system-notifications	
Sling Request Progress:

```

[Full exception ](https://gist.github.com/cru-Luis-Rodriguez/e398029b0ba3ce7ccb9e6300595b2c82)

Changed files:
bundle/src/main/java/com/adobe/acs/commons/xss/package-info.java, bundle/src/test/java/com/adobe/acs/commons/xss/XSSFunctionsTest.java, bundle/src/main/java/com/adobe/acs/commons/xss/XSSFunctions.java

diff --git a/bundle/src/main/java/com/adobe/acs/commons/xss/XSSFunctions.java b/bundle/src/main/java/com/adobe/acs/commons/xss/XSSFunctions.java
index dbc4802b3..a573af401 100644
--- a/bundle/src/main/java/com/adobe/acs/commons/xss/XSSFunctions.java
+++ b/bundle/src/main/java/com/adobe/acs/commons/xss/XSSFunctions.java
@@ -20,7 +20,7 @@
 package com.adobe.acs.commons.xss;
 
 import aQute.bnd.annotation.ProviderType;
-import org.apache.sling.xss.XSSAPI;
+import com.adobe.granite.xss.XSSAPI;
 import tldgen.Function;
 
 import java.util.regex.Pattern;
diff --git a/bundle/src/main/java/com/adobe/acs/commons/xss/package-info.java b/bundle/src/main/java/com/adobe/acs/commons/xss/package-info.java
index 7fd084c83..76348868f 100644
--- a/bundle/src/main/java/com/adobe/acs/commons/xss/package-info.java
+++ b/bundle/src/main/java/com/adobe/acs/commons/xss/package-info.java
@@ -20,6 +20,6 @@
 /**
  * XSS JSP Functions.
  */
-@aQute.bnd.annotation.Version("2.0.0")
+@aQute.bnd.annotation.Version("3.0.0")
 @tldgen.TagLibrary(value = "http://www.adobe.com/consulting/acs-aem-commons/xss", descriptorFile = "xss.tld")
 package com.adobe.acs.commons.xss;
\\ No newline at end of file
diff --git a/bundle/src/test/java/com/adobe/acs/commons/xss/XSSFunctionsTest.java b/bundle/src/test/java/com/adobe/acs/commons/xss/XSSFunctionsTest.java
index 1d6b01be1..d14d5f19f 100644
--- a/bundle/src/test/java/com/adobe/acs/commons/xss/XSSFunctionsTest.java
+++ b/bundle/src/test/java/com/adobe/acs/commons/xss/XSSFunctionsTest.java
@@ -19,8 +19,8 @@
  */
 package com.adobe.acs.commons.xss;
 
+import com.adobe.granite.xss.XSSAPI;
 import org.apache.commons.lang.RandomStringUtils;
-import org.apache.sling.xss.XSSAPI;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
Repository: adobe-consulting-services/acs-aem-commons
Issue: Dispatcher Flush Rules Multi-Path Flush uses comma as delimiter

1.9.0 introduced a new feature that allows chaining of flush paths using commas. This makes it hard to parse Flush Rules from the provided sling:OsgiConfigs..

`prop.rules.hierarchical="[regex=/abs-path&/foo&/bar,regex2=abs-path2]"`

Change to use `&` as the path delimiter

`prop.rules.hierarchical="[regex=/abs-path&/foo&/bar,regex2=abs-path2]"`


Changed files:
bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImpl.java
bundle/src/test/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImplTest.java

diff --git a/bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImpl.java b/bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImpl.java
index 7d6b0b2d8..36a140d5f 100644
--- a/bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImpl.java
+++ b/bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImpl.java
@@ -265,7 +265,7 @@ public class DispatcherFlushRulesImpl implements Preprocessor {
 
         for (final Map.Entry<String, String> entry : configuredRules.entrySet()) {
             final Pattern pattern = Pattern.compile(entry.getKey());
-            rules.put(pattern, entry.getValue().split(","));
+            rules.put(pattern, entry.getValue().split("&"));
         }
 
         return rules;
diff --git a/bundle/src/test/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImplTest.java b/bundle/src/test/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImplTest.java
index 87543457a..ebf085a99 100644
--- a/bundle/src/test/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImplTest.java
+++ b/bundle/src/test/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImplTest.java
@@ -116,7 +116,7 @@ public class DispatcherFlushRulesImplTest {
         validFlushRules.put("/a/.*", "/b");
         validFlushRules.put("/b/.*", "/c");
         validFlushRules.put("/c/d/.*", "/e/f");
-        validFlushRules.put("/c/a/.*", "/e/f,/g/h");
+        validFlushRules.put("/c/a/.*", "/e/f&/g/h");
 
         final Map<Pattern, String[]> expected = new LinkedHashMap<Pattern, String[]>();
         expected.put(Pattern.compile("/a/.*"), new String[] { "/b" });
@@ -431,5 +431,4 @@ public class DispatcherFlushRulesImplTest {
 
         verifyNoMoreInteractions(dispatcherFlusher);
     }
-
 }
Repository: adobe-consulting-services/acs-aem-commons
Issue: AEM Environment Indicator displays twice on /cf#

AEM Env indicator renders twice for /cf loaded pages since both the /cf and the page are candidates for indicator injection. This does not look bad when it is just a bar since they overlap one another and you cant tell, but the custom tab example displays 2 tabs.

Tenatively going to reject add any requests refers whose path is /cf 


Changed files:
bundle/src/main/java/com/adobe/acs/commons/wcm/impl/AemEnvironmentIndicatorFilter.java

diff --git a/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/AemEnvironmentIndicatorFilter.java b/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/AemEnvironmentIndicatorFilter.java
index 01daa3ab6..7abd9166a 100644
--- a/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/AemEnvironmentIndicatorFilter.java
+++ b/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/AemEnvironmentIndicatorFilter.java
@@ -192,8 +192,10 @@ public class AemEnvironmentIndicatorFilter implements Filter {
         } else if (StringUtils.endsWith(request.getHeader("Referer"), "/editor.html" + request.getRequestURI())) {
             // Do not apply to pages loaded in the TouchUI editor.html
             return false;
+        } else if (StringUtils.endsWith(request.getHeader("Referer"), "/cf")) {
+            // Do not apply to pages loaded in the Classic Content Finder
+            return false;
         }
-
         return true;
     }