Program: 90384
Project: 90384
Buggy source:
public static void launchBenchmark(int distribution,int N,int repeat,String distdir,int optimisation){
  String Chartsdir=null, Benchmarkdir=null, optdir=null;
  DecimalFormat df=new DecimalFormat("String_Node_Str");
switch (optimisation) {
case 0:
    optdir=distdir + File.separator + "String_Node_Str";
  break;
case 1:
optdir=distdir + File.separator + "String_Node_Str";
break;
case 2:
optdir=distdir + File.separator + "String_Node_Str";
break;
case 3:
optdir=distdir + File.separator + "String_Node_Str";
break;
default :
System.out.println("String_Node_Str");
System.exit(0);
}
Chartsdir=optdir + File.separator + "String_Node_Str";
Benchmarkdir=optdir + File.separator + "String_Node_Str";
try {
boolean success=(new File(Chartsdir).mkdirs());
boolean success2=(new File(Benchmarkdir).mkdirs());
if (success & success2) System.out.println("String_Node_Str");
}
 catch (Exception e) {
e.getMessage();
}
try {
File file=new File(Benchmarkdir + "String_Node_Str");
if (!file.exists()) file.createNewFile();
Date date=new Date();
SimpleDateFormat dateFormatComp;
dateFormatComp=new SimpleDateFormat("String_Node_Str");
String[] op={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
System.out.println("String_Node_Str");
System.out.println("String_Node_Str");
System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + N + "String_Node_Str"+ max+ "String_Node_Str"+ op[optimisation]+ "String_Node_Str"+ dateFormatComp.format(date)+ "String_Node_Str"+ System.getProperty("String_Node_Str")+ "String_Node_Str"+ System.getProperty("String_Node_Str")+ "String_Node_Str"+ System.getProperty("String_Node_Str"));
FileWriter fw=new FileWriter(file.getAbsoluteFile());
bw=null;
bw=new BufferedWriter(fw);
bw.write("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + N + "String_Node_Str"+ max+ "String_Node_Str"+ op[optimisation]+ "String_Node_Str"+ dateFormatComp.format(date)+ "String_Node_Str"+ System.getenv("String_Node_Str")+ "String_Node_Str"+ System.getProperty("String_Node_Str")+ "String_Node_Str"+ System.getProperty("String_Node_Str"));
}
 catch (IOException e) {
e.printStackTrace();
}
for (double k=0.001; k < 1.0; k*=10) {
SizeGraphCoordinates=new ArrayList<Vector<LineChartPoint>>();
OrGraphCoordinates=new ArrayList<Vector<LineChartPoint>>();
AndGraphCoordinates=new ArrayList<Vector<LineChartPoint>>();
XorGraphCoordinates=new ArrayList<Vector<LineChartPoint>>();
for (int i=0; i < nbTechnique; i++) {
SizeGraphCoordinates.add(new Vector<LineChartPoint>());
OrGraphCoordinates.add(new Vector<LineChartPoint>());
AndGraphCoordinates.add(new Vector<LineChartPoint>());
XorGraphCoordinates.add(new Vector<LineChartPoint>());
}
for (double density=k; density < k * 10.0; density+=density) {
if (density >= 0.7) density=0.6;
int SetSize=(int)(max * density);
int data[][]=new int[N][];
int data2[][]=new int[N][];
System.out.println("String_Node_Str" + density);
System.out.println("String_Node_Str");
try {
bw.write("String_Node_Str" + density + "String_Node_Str");
}
 catch (IOException e1) {
e1.printStackTrace();
}
for (int i=0; i < nbTechnique; i++) {
SizeGraphCoordinates.get(i).add(new LineChartPoint(0.0,String.valueOf(density),null));
OrGraphCoordinates.get(i).add(new LineChartPoint(0.0,String.valueOf(density),null));
AndGraphCoordinates.get(i).add(new LineChartPoint(0.0,String.valueOf(density),null));
XorGraphCoordinates.get(i).add(new LineChartPoint(0.0,String.valueOf(density),null));
}
for (int i=0; i < N; i++) {
switch (distribution) {
case 0:
data[i]=zpf.GenartingInts(SetSize,max);
data2[i]=zpf.GenartingInts(SetSize,max);
break;
case 1:
data[i]=uniform.generateUniform(SetSize,max);
data2[i]=uniform.generateUniform(SetSize,max);
break;
case 2:
int[] inter=cdg.generateClustered(1 << (18 / 2),max);
data[i]=IntUtil.unite(inter,cdg.generateClustered(1 << 18,max));
data2[i]=IntUtil.unite(inter,cdg.generateClustered(1 << 18,max));
break;
default :
System.out.println("String_Node_Str");
System.exit(0);
}
Arrays.sort(data[i]);
Arrays.sort(data2[i]);
}
System.out.println("String_Node_Str");
System.out.println("String_Node_Str" + density + "String_Node_Str"+ SetSize);
try {
bw.write("String_Node_Str" + "String_Node_Str" + density + "String_Node_Str"+ SetSize);
}
 catch (IOException e) {
e.printStackTrace();
}
testRoaringBitmap(data.clone(),data2.clone(),repeat,df,optimisation);
testWAH32(data.clone(),data2.clone(),repeat,df,optimisation);
testConciseSet(data.clone(),data2.clone(),repeat,df,optimisation);
testSparseBitmap(data.clone(),data2.clone(),repeat,df,optimisation);
testEWAH64(data.clone(),data2.clone(),repeat,df,optimisation);
System.out.println();
}
if (Chartsdir != null) {
String p=Chartsdir + File.separator;
try {
new LineChartDemo1("String_Node_Str" + k + "String_Node_Str"+ (k * 10),"String_Node_Str",SizeGraphCoordinates,p);
new LineChartDemo1("String_Node_Str" + k + "String_Node_Str"+ (k * 10),"String_Node_Str",OrGraphCoordinates,p);
new LineChartDemo1("String_Node_Str" + k + "String_Node_Str"+ (k * 10),"String_Node_Str",AndGraphCoordinates,p);
new LineChartDemo1("String_Node_Str" + k + "String_Node_Str"+ (k * 10),"String_Node_Str",XorGraphCoordinates,p);
}
 catch (java.awt.HeadlessException e) {
System.out.println("String_Node_Str");
}
}
}
try {
bw.close();
}
 catch (IOException e) {
e.printStackTrace();
}
}

Fixed version (ground truth):
public static void launchBenchmark(int distribution,int N,int repeat,String distdir,int optimisation){
  String Chartsdir=null, Benchmarkdir=null, optdir=null;
  DecimalFormat df=new DecimalFormat("String_Node_Str");
  if (distdir != null) switch (optimisation) {
case 0:
    optdir=distdir + File.separator + "String_Node_Str";
  break;
case 1:
optdir=distdir + File.separator + "String_Node_Str";
break;
case 2:
optdir=distdir + File.separator + "String_Node_Str";
break;
case 3:
optdir=distdir + File.separator + "String_Node_Str";
break;
default :
System.out.println("String_Node_Str");
System.exit(0);
}
if (optdir != null) Chartsdir=optdir + File.separator + "String_Node_Str";
if (optdir != null) Benchmarkdir=optdir + File.separator + "String_Node_Str";
try {
boolean success=(new File(Chartsdir).mkdirs());
boolean success2=(new File(Benchmarkdir).mkdirs());
if (success & success2) System.out.println("String_Node_Str");
}
 catch (Exception e) {
e.getMessage();
}
try {
File file=new File(Benchmarkdir + "String_Node_Str");
if (!file.exists()) file.createNewFile();
Date date=new Date();
SimpleDateFormat dateFormatComp;
dateFormatComp=new SimpleDateFormat("String_Node_Str");
String[] op={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
System.out.println("String_Node_Str");
System.out.println("String_Node_Str");
System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + N + "String_Node_Str"+ max+ "String_Node_Str"+ op[optimisation]+ "String_Node_Str"+ dateFormatComp.format(date)+ "String_Node_Str"+ System.getProperty("String_Node_Str")+ "String_Node_Str"+ System.getProperty("String_Node_Str")+ "String_Node_Str"+ System.getProperty("String_Node_Str"));
FileWriter fw=new FileWriter(file.getAbsoluteFile());
bw=null;
bw=new BufferedWriter(fw);
bw.write("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + N + "String_Node_Str"+ max+ "String_Node_Str"+ op[optimisation]+ "String_Node_Str"+ dateFormatComp.format(date)+ "String_Node_Str"+ System.getenv("String_Node_Str")+ "String_Node_Str"+ System.getProperty("String_Node_Str")+ "String_Node_Str"+ System.getProperty("String_Node_Str"));
}
 catch (IOException e) {
e.printStackTrace();
}
for (double k=0.001; k < 1.0; k*=10) {
SizeGraphCoordinates=new ArrayList<Vector<LineChartPoint>>();
OrGraphCoordinates=new ArrayList<Vector<LineChartPoint>>();
AndGraphCoordinates=new ArrayList<Vector<LineChartPoint>>();
XorGraphCoordinates=new ArrayList<Vector<LineChartPoint>>();
for (int i=0; i < nbTechnique; i++) {
SizeGraphCoordinates.add(new Vector<LineChartPoint>());
OrGraphCoordinates.add(new Vector<LineChartPoint>());
AndGraphCoordinates.add(new Vector<LineChartPoint>());
XorGraphCoordinates.add(new Vector<LineChartPoint>());
}
for (double density=k; density < k * 10.0; density+=density) {
if (density >= 0.7) density=0.6;
int SetSize=(int)(max * density);
int data[][]=new int[N][];
int data2[][]=new int[N][];
System.out.println("String_Node_Str" + density);
System.out.println("String_Node_Str");
try {
bw.write("String_Node_Str" + density + "String_Node_Str");
}
 catch (IOException e1) {
e1.printStackTrace();
}
for (int i=0; i < nbTechnique; i++) {
SizeGraphCoordinates.get(i).add(new LineChartPoint(0.0,String.valueOf(density),null));
OrGraphCoordinates.get(i).add(new LineChartPoint(0.0,String.valueOf(density),null));
AndGraphCoordinates.get(i).add(new LineChartPoint(0.0,String.valueOf(density),null));
XorGraphCoordinates.get(i).add(new LineChartPoint(0.0,String.valueOf(density),null));
}
for (int i=0; i < N; i++) {
switch (distribution) {
case 0:
data[i]=zpf.GenartingInts(SetSize,max);
data2[i]=zpf.GenartingInts(SetSize,max);
break;
case 1:
data[i]=uniform.generateUniform(SetSize,max);
data2[i]=uniform.generateUniform(SetSize,max);
break;
case 2:
int[] inter=cdg.generateClustered(1 << (18 / 2),max);
data[i]=IntUtil.unite(inter,cdg.generateClustered(1 << 18,max));
data2[i]=IntUtil.unite(inter,cdg.generateClustered(1 << 18,max));
break;
default :
System.out.println("String_Node_Str");
System.exit(0);
}
Arrays.sort(data[i]);
Arrays.sort(data2[i]);
}
System.out.println("String_Node_Str");
System.out.println("String_Node_Str" + density + "String_Node_Str"+ SetSize);
try {
bw.write("String_Node_Str" + "String_Node_Str" + density + "String_Node_Str"+ SetSize);
}
 catch (IOException e) {
e.printStackTrace();
}
testRoaringBitmap(data.clone(),data2.clone(),repeat,df,optimisation);
testWAH32(data.clone(),data2.clone(),repeat,df,optimisation);
testConciseSet(data.clone(),data2.clone(),repeat,df,optimisation);
testSparseBitmap(data.clone(),data2.clone(),repeat,df,optimisation);
testEWAH64(data.clone(),data2.clone(),repeat,df,optimisation);
testEWAH32(data.clone(),data2.clone(),repeat,df,optimisation);
System.out.println();
}
if (Chartsdir != null) {
String p=Chartsdir + File.separator;
try {
new LineChartDemo1("String_Node_Str" + k + "String_Node_Str"+ (k * 10),"String_Node_Str",SizeGraphCoordinates,p);
new LineChartDemo1("String_Node_Str" + k + "String_Node_Str"+ (k * 10),"String_Node_Str",OrGraphCoordinates,p);
new LineChartDemo1("String_Node_Str" + k + "String_Node_Str"+ (k * 10),"String_Node_Str",AndGraphCoordinates,p);
new LineChartDemo1("String_Node_Str" + k + "String_Node_Str"+ (k * 10),"String_Node_Str",XorGraphCoordinates,p);
}
 catch (Exception e) {
System.out.println("String_Node_Str");
}
}
}
try {
bw.close();
}
 catch (IOException e) {
e.printStackTrace();
}
}