-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmath_95.diff
25 lines (25 loc) · 1.53 KB
/
math_95.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
diff --git a/src/java/org/apache/commons/math/distribution/FDistributionImpl.java b/src/java/org/apache/commons/math/distribution/FDistributionImpl.java
index e19e97aef..834c46181 100644
--- a/src/java/org/apache/commons/math/distribution/FDistributionImpl.java
+++ b/src/java/org/apache/commons/math/distribution/FDistributionImpl.java
@@ -141,6 +141,20 @@ public class FDistributionImpl
* @return initial domain value
*/
protected double getInitialDomain(double p) {
+ if (Boolean.parseBoolean(System.getProperty("defects4j.instrumentation.enabled"))) { // defects4j.instrumentation
+ double initial = getInitialDomain_original(p); // defects4j.instrumentation
+ double lowerBound = getDomainLowerBound(p); // defects4j.instrumentation
+ double upperBound = getDomainUpperBound(p); // defects4j.instrumentation
+ if (initial < lowerBound || initial > upperBound) { // defects4j.instrumentation
+ throw new RuntimeException("[Defects4J_BugReport_Violation]"); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ return initial; // defects4j.instrumentation
+ } else { // defects4j.instrumentation
+ return getInitialDomain_original(p); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } // defects4j.instrumentation
+
+ protected double getInitialDomain_original(double p) { // defects4j.instrumentation
double ret;
double d = getDenominatorDegreesOfFreedom();
// use mean