Program: 140228
Project: 140228
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:
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){
  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);
}
}