Program: 140193
Project: 140193
Buggy source:
public static void compositeIndicatorMap(IndicatorUnit indicatorUnit){
  Color tempColor=null;
  Object tempObject=null;
  IndicatorEnum type=indicatorUnit.getType();
  Indicator indicator=indicatorUnit.getIndicator();
  if (!indicator.getInstantiatedExpressions().isEmpty()) {
switch (type) {
case RowCountIndicatorEnum:
      tempColor=COLOR_ROW_COUNT;
    tempObject=((RowCountIndicator)indicator).getCount();
  break;
case NullCountIndicatorEnum:
tempColor=COLOR_NULL_COUNT;
tempObject=((NullCountIndicator)indicator).getNullCount();
break;
case DistinctCountIndicatorEnum:
tempColor=COLOR_DISTIN_CTCOUNT;
tempObject=((DistinctCountIndicator)indicator).getDistinctValueCount();
break;
case UniqueIndicatorEnum:
tempColor=COLOR_UNIQUE_COUNT;
tempObject=(((UniqueCountIndicator)indicator).getUniqueValueCount());
break;
case DuplicateCountIndicatorEnum:
tempColor=COLOR_DUPLICATE_COUNT;
tempObject=((DuplicateCountIndicator)indicator).getDuplicateValueCount();
break;
case BlankCountIndicatorEnum:
tempColor=COLOR_BLANKCOUNT;
tempObject=((BlankCountIndicator)indicator).getBlankCount();
break;
case MinLengthIndicatorEnum:
tempColor=COLOR_MIN_LENGTH;
tempObject=((MinLengthIndicator)indicator).getLength();
break;
case MaxLengthIndicatorEnum:
tempColor=COLOR_MAX_LENGTH;
tempObject=((MaxLengthIndicator)indicator).getLength();
break;
case AverageLengthIndicatorEnum:
tempColor=COLOR_AVERAGE_LENGTH;
tempObject=((AverageLengthIndicator)indicator).getAverageLength();
break;
case FrequencyIndicatorEnum:
case LowFrequencyIndicatorEnum:
FrequencyIndicator frequency=(FrequencyIndicator)indicator;
Set<Object> valueSet=frequency.getDistinctValues();
if (valueSet == null) {
break;
}
FrequencyExt[] frequencyExt=new FrequencyExt[valueSet.size()];
int i=0;
for (Object o : valueSet) {
frequencyExt[i]=new FrequencyExt();
frequencyExt[i].setKey(o);
frequencyExt[i].setValue(frequency.getCount(o));
frequencyExt[i].setFrequency(frequency.getFrequency(o));
i++;
}
tempColor=null;
tempObject=frequencyExt;
break;
case MeanIndicatorEnum:
tempColor=null;
tempObject=((MeanIndicator)indicator).getMean();
break;
case MedianIndicatorEnum:
tempColor=null;
tempObject=((MedianIndicator)indicator).getMedian();
break;
case MinValueIndicatorEnum:
tempColor=null;
tempObject=((MinValueIndicator)indicator).getValue();
break;
case MaxValueIndicatorEnum:
tempColor=null;
tempObject=((MaxValueIndicator)indicator).getValue();
break;
case LowerQuartileIndicatorEnum:
tempColor=null;
tempObject=((LowerQuartileIndicator)indicator).getValue();
break;
case UpperQuartileIndicatorEnum:
tempColor=null;
tempObject=((UpperQuartileIndicator)indicator).getValue();
break;
case RegexpMatchingIndicatorEnum:
case SqlPatternMatchingIndicatorEnum:
tempColor=null;
PatternMatchingExt patternExt=new PatternMatchingExt();
patternExt.setMatchingValueCount(((PatternMatchingIndicator)indicator).getMatchingValueCount());
patternExt.setNotMatchingValueCount(((PatternMatchingIndicator)indicator).getNotMatchingValueCount());
tempObject=patternExt;
break;
case ModeIndicatorEnum:
tempColor=null;
tempObject=((ModeIndicator)indicator).getMode();
default :
}
indicatorUnit.setExcuted(true);
indicatorUnit.setColor(tempColor);
indicatorUnit.setValue(tempObject);
}
}

Fixed version (ground truth):
public static void compositeIndicatorMap(IndicatorUnit indicatorUnit){
  Object tempObject=null;
  IndicatorEnum type=indicatorUnit.getType();
  Indicator indicator=indicatorUnit.getIndicator();
  if (!indicator.getInstantiatedExpressions().isEmpty()) {
switch (type) {
case RowCountIndicatorEnum:
      tempObject=((RowCountIndicator)indicator).getCount();
    break;
case NullCountIndicatorEnum:
  tempObject=((NullCountIndicator)indicator).getNullCount();
break;
case DistinctCountIndicatorEnum:
tempObject=((DistinctCountIndicator)indicator).getDistinctValueCount();
break;
case UniqueIndicatorEnum:
tempObject=(((UniqueCountIndicator)indicator).getUniqueValueCount());
break;
case DuplicateCountIndicatorEnum:
tempObject=((DuplicateCountIndicator)indicator).getDuplicateValueCount();
break;
case BlankCountIndicatorEnum:
tempObject=((BlankCountIndicator)indicator).getBlankCount();
break;
case MinLengthIndicatorEnum:
tempObject=((MinLengthIndicator)indicator).getLength();
break;
case MaxLengthIndicatorEnum:
tempObject=((MaxLengthIndicator)indicator).getLength();
break;
case AverageLengthIndicatorEnum:
tempObject=((AverageLengthIndicator)indicator).getAverageLength();
break;
case FrequencyIndicatorEnum:
case LowFrequencyIndicatorEnum:
FrequencyIndicator frequency=(FrequencyIndicator)indicator;
Set<Object> valueSet=frequency.getDistinctValues();
if (valueSet == null) {
break;
}
FrequencyExt[] frequencyExt=new FrequencyExt[valueSet.size()];
int i=0;
for (Object o : valueSet) {
frequencyExt[i]=new FrequencyExt();
frequencyExt[i].setKey(o);
frequencyExt[i].setValue(frequency.getCount(o));
frequencyExt[i].setFrequency(frequency.getFrequency(o));
i++;
}
tempObject=frequencyExt;
break;
case MeanIndicatorEnum:
tempObject=((MeanIndicator)indicator).getMean();
break;
case MedianIndicatorEnum:
tempObject=((MedianIndicator)indicator).getMedian();
break;
case MinValueIndicatorEnum:
tempObject=((MinValueIndicator)indicator).getValue();
break;
case MaxValueIndicatorEnum:
tempObject=((MaxValueIndicator)indicator).getValue();
break;
case LowerQuartileIndicatorEnum:
tempObject=((LowerQuartileIndicator)indicator).getValue();
break;
case UpperQuartileIndicatorEnum:
tempObject=((UpperQuartileIndicator)indicator).getValue();
break;
case RegexpMatchingIndicatorEnum:
case SqlPatternMatchingIndicatorEnum:
PatternMatchingExt patternExt=new PatternMatchingExt();
patternExt.setMatchingValueCount(((PatternMatchingIndicator)indicator).getMatchingValueCount());
patternExt.setNotMatchingValueCount(((PatternMatchingIndicator)indicator).getNotMatchingValueCount());
tempObject=patternExt;
break;
case ModeIndicatorEnum:
tempObject=((ModeIndicator)indicator).getMode();
default :
}
indicatorUnit.setExcuted(true);
indicatorUnit.setValue(tempObject);
}
}