-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmath_81.diff
29 lines (28 loc) · 1.97 KB
/
math_81.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
27
28
29
diff --git a/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java b/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java
index 2d0d72f22..e17680275 100644
--- a/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java
+++ b/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java
@@ -186,10 +186,21 @@ public class EigenDecompositionImpl implements EigenDecomposition {
* @exception InvalidMatrixException (wrapping a {@link
* org.apache.commons.math.ConvergenceException} if algorithm fails to converge
*/
- public EigenDecompositionImpl(final double[] main, double[] secondary,
- final double splitTolerance)
- throws InvalidMatrixException {
+ public EigenDecompositionImpl(final double[] main, double[] secondary, final double splitTolerance) // defects4j.instrumentation
+ throws InvalidMatrixException { // defects4j.instrumentation
+ if (Boolean.parseBoolean(System.getProperty("defects4j.instrumentation.enabled"))) { // defects4j.instrumentation
+ try { // defects4j.instrumentation
+ this.init_original(main, secondary, splitTolerance); // defects4j.instrumentation
+ } catch (ArrayIndexOutOfBoundsException e) { // defects4j.instrumentation
+ throw new RuntimeException("[Defects4J_BugReport_Violation]"); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } else { // defects4j.instrumentation
+ this.init_original(main, secondary, splitTolerance); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } // defects4j.instrumentation
+ private void init_original(final double[] main, double[] secondary, final double splitTolerance) // defects4j.instrumentation
+ throws InvalidMatrixException { // defects4j.instrumentation
this.main = main.clone();
this.secondary = secondary.clone();
transformer = null;