Program: 40792
Project: 40792
Buggy source:
/** 
 * Removes duplicate browsers and prepare data based on the MapStrategy
 * @param methodName
 * @return
 */
public static Object[][] getData(String methodName){
  Object[][] returnObject=null;
  List<IBrowserConf> n_browserConf=RetryIAnnotationTransformer.methodBrowser.get(methodName);
  Set<IBrowserConf> browserConfSet=new HashSet<IBrowserConf>(n_browserConf);
  List<IBrowserConf> browserConf=new ArrayList<IBrowserConf>(browserConfSet);
  List<IProperty> prop=RetryIAnnotationTransformer.methodData.get(methodName);
  mapStrategy strategy=RetryIAnnotationTransformer.runStrategy.get(methodName);
  int browserConfsize=browserConf.size();
  int propSize=prop.size();
  int loopCombination;
  int k=0;
switch (strategy) {
case Full:
    loopCombination=browserConfsize * propSize;
  returnObject=new Object[loopCombination][2];
for (int i=0; i < browserConfsize; i++) {
  for (int j=0; j < propSize; j++) {
    returnObject[k][0]=browserConf.get(i);
    returnObject[k][1]=prop.get(j);
    k++;
  }
}
break;
case Optimal:
if (browserConfsize >= propSize) loopCombination=browserConfsize;
 else loopCombination=propSize;
returnObject=new Object[loopCombination][2];
for (int i=0; i < loopCombination; i++) {
Random r=new Random();
if (i >= browserConfsize) {
returnObject[i][0]=browserConf.get(r.nextInt(browserConfsize));
}
 else {
returnObject[i][0]=browserConf.get(i);
}
if (i >= propSize) {
returnObject[i][1]=prop.get(r.nextInt(propSize));
}
 else {
returnObject[i][1]=prop.get(i);
}
}
break;
default :
break;
}
return returnObject;
}

Fixed version (ground truth):
/** 
 * Removes duplicate browsers and prepare data based on the MapStrategy
 * @param methodName
 * @return
 */
public static Object[][] getData(String methodName){
  Object[][] testMethodData=null;
  List<IBrowserConf> browserConfFullList=RetryIAnnotationTransformer.methodBrowser.get(methodName);
  Set<IBrowserConf> browserConfSet=new HashSet<IBrowserConf>(browserConfFullList);
  List<IBrowserConf> browserConfFilteredList=new ArrayList<IBrowserConf>(browserConfSet);
  List<IProperty> testMData=RetryIAnnotationTransformer.methodData.get(methodName);
  mapStrategy strategy=RetryIAnnotationTransformer.runStrategy.get(methodName);
  int browserConfCount=browserConfFilteredList.size();
  int testDataCount=testMData.size();
  int loopCombination;
  int k=0;
switch (strategy) {
case Full:
    loopCombination=browserConfCount * testDataCount;
  testMethodData=new Object[loopCombination][2];
for (int i=0; i < browserConfCount; i++) {
  for (int j=0; j < testDataCount; j++) {
    testMethodData[k][0]=browserConfFilteredList.get(i);
    testMethodData[k][1]=testMData.get(j);
    k++;
  }
}
break;
case Optimal:
if (browserConfCount >= testDataCount) loopCombination=browserConfCount;
 else loopCombination=testDataCount;
testMethodData=new Object[loopCombination][2];
for (int i=0; i < loopCombination; i++) {
Random r=new Random();
if (i >= browserConfCount) {
testMethodData[i][0]=browserConfFilteredList.get(r.nextInt(browserConfCount));
}
 else {
testMethodData[i][0]=browserConfFilteredList.get(i);
}
if (i >= testDataCount) {
testMethodData[i][1]=testMData.get(r.nextInt(testDataCount));
}
 else {
testMethodData[i][1]=testMData.get(i);
}
}
break;
default :
break;
}
return testMethodData;
}