-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlang_39.diff
26 lines (25 loc) · 1.66 KB
/
lang_39.diff
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
diff --git src/java/org/apache/commons/lang3/StringUtils.java b/src/java/org/apache/commons/lang3/StringUtils.java
index 14563aa6..442c6156 100644
--- a/src/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/java/org/apache/commons/lang3/StringUtils.java
@@ -3603,7 +3603,20 @@ public class StringUtils {
* @since 2.4
*/
private static String replaceEach(String text, String[] searchList, String[] replacementList,
- boolean repeat, int timeToLive)
+ boolean repeat, int timeToLive) { // defects4j.instrumentation
+ if (Boolean.parseBoolean(System.getProperty("defects4j.instrumentation.enabled"))) { // defects4j.instrumentation
+ try { // defects4j.instrumentation
+ return replaceEach_original(text, searchList, replacementList, repeat, timeToLive); // defects4j.instrumentation
+ } catch (NullPointerException e) { // defects4j.instrumentation
+ throw new RuntimeException("[Defects4J_BugReport_Violation]"); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } else { // defects4j.instrumentation
+ return replaceEach_original(text, searchList, replacementList, repeat, timeToLive); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } // defects4j.instrumentation
+
+ private static String replaceEach_original(String text, String[] searchList, String[] replacementList, // defects4j.instrumentation
+ boolean repeat, int timeToLive) // defects4j.instrumentation
{
// mchyzer Performance note: This creates very few new objects (one major goal)