Program: 140573
Project: 140573
Buggy source:
public static void compositeIndicatorMap(IndicatorUnit indicatorUnit){
  Color tempColor=null;
  Object tempObject=null;
  IndicatorEnum type=indicatorUnit.getType();
  Indicator indicator=indicatorUnit.getIndicator();
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));
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:
tempColor=null;
PatternMatchingExt patternExt=new PatternMatchingExt();
patternExt.setMatchingValueCount(((PatternMatchingIndicator)indicator).getMatchingValueCount());
patternExt.setNotMatchingValueCount(((PatternMatchingIndicator)indicator).getNotMatchingValueCount());
tempObject=patternExt;
default :
}
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();
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));
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;
default :
}
indicatorUnit.setColor(tempColor);
indicatorUnit.setValue(tempObject);
}