-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchart_12.diff
24 lines (24 loc) · 1.42 KB
/
chart_12.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
diff --git a/source/org/jfree/chart/plot/MultiplePiePlot.java b/source/org/jfree/chart/plot/MultiplePiePlot.java
index fedc205..7af8a18 100644
--- a/source/org/jfree/chart/plot/MultiplePiePlot.java
+++ b/source/org/jfree/chart/plot/MultiplePiePlot.java
@@ -142,6 +142,19 @@ public class MultiplePiePlot extends Plot implements Cloneable, Serializable {
*/
public MultiplePiePlot(CategoryDataset dataset) {
super();
+ if (Boolean.parseBoolean(System.getProperty("defects4j.instrumentation.enabled"))) { // defects4j.instrumentation
+ init(dataset); // defects4j.instrumentation
+ if (dataset instanceof org.jfree.data.general.AbstractDataset) { // defects4j.instrumentation
+ if (!((org.jfree.data.general.AbstractDataset) dataset).hasListener(this)) { // defects4j.instrumentation
+ throw new RuntimeException("[Defects4J_BugReport_Violation]"); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } else { // defects4j.instrumentation
+ init(dataset); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } // defects4j.instrumentation
+
+ public void init(CategoryDataset dataset) { // defects4j.instrumentation
this.dataset = dataset;
PiePlot piePlot = new PiePlot(null);
this.pieChart = new JFreeChart(piePlot);