Program: 140106
Project: 140106
Buggy source:
public static boolean patternRule(IndicatorEnum indicatorType,TdColumn column){
  int javaType=column.getJavaType();
  DataminingType dataminingType=MetadataHelper.getDataminingType(column);
  if (dataminingType == null) {
    dataminingType=MetadataHelper.getDefaultDataminingType(javaType);
  }
switch (indicatorType) {
case CountsIndicatorEnum:
case RowCountIndicatorEnum:
    return true;
case NullCountIndicatorEnum:
  return true;
case DistinctCountIndicatorEnum:
case UniqueIndicatorEnum:
case DuplicateCountIndicatorEnum:
return true;
case BlankCountIndicatorEnum:
case TextIndicatorEnum:
case MinLengthIndicatorEnum:
case MaxLengthIndicatorEnum:
case AverageLengthIndicatorEnum:
if (Java2SqlType.isTextInSQL(javaType)) {
if (dataminingType == DataminingType.NOMINAL || dataminingType == DataminingType.UNSTRUCTURED_TEXT) {
  return true;
}
}
break;
case ModeIndicatorEnum:
case FrequencyIndicatorEnum:
case LowFrequencyIndicatorEnum:
case PatternFreqIndicatorEnum:
case PatternLowFreqIndicatorEnum:
if (dataminingType == DataminingType.NOMINAL || dataminingType == DataminingType.INTERVAL) {
return true;
}
break;
case MeanIndicatorEnum:
case MedianIndicatorEnum:
case BoxIIndicatorEnum:
case IQRIndicatorEnum:
case LowerQuartileIndicatorEnum:
case UpperQuartileIndicatorEnum:
case RangeIndicatorEnum:
if (Java2SqlType.isNumbericInSQL(javaType)) {
if (dataminingType == DataminingType.INTERVAL) {
return true;
}
}
break;
case MinValueIndicatorEnum:
case MaxValueIndicatorEnum:
if (Java2SqlType.isDateInSQL(javaType)) {
if (dataminingType == DataminingType.INTERVAL) {
return true;
}
}
break;
default :
return false;
}
return false;
}

Fixed version (ground truth):
public static boolean patternRule(IndicatorEnum indicatorType,TdColumn column){
  int javaType=column.getJavaType();
  DataminingType dataminingType=MetadataHelper.getDataminingType(column);
  if (dataminingType == null) {
    dataminingType=MetadataHelper.getDefaultDataminingType(javaType);
  }
switch (indicatorType) {
case CountsIndicatorEnum:
case RowCountIndicatorEnum:
    return true;
case NullCountIndicatorEnum:
  return true;
case DistinctCountIndicatorEnum:
case UniqueIndicatorEnum:
case DuplicateCountIndicatorEnum:
return true;
case BlankCountIndicatorEnum:
case TextIndicatorEnum:
case MinLengthIndicatorEnum:
case MaxLengthIndicatorEnum:
case AverageLengthIndicatorEnum:
if (Java2SqlType.isTextInSQL(javaType)) {
if (dataminingType == DataminingType.NOMINAL || dataminingType == DataminingType.UNSTRUCTURED_TEXT) {
  return true;
}
}
break;
case ModeIndicatorEnum:
case FrequencyIndicatorEnum:
case LowFrequencyIndicatorEnum:
case PatternFreqIndicatorEnum:
case PatternLowFreqIndicatorEnum:
if (dataminingType == DataminingType.NOMINAL || dataminingType == DataminingType.INTERVAL) {
return true;
}
break;
case MeanIndicatorEnum:
case MedianIndicatorEnum:
case BoxIIndicatorEnum:
case IQRIndicatorEnum:
case LowerQuartileIndicatorEnum:
case UpperQuartileIndicatorEnum:
if (Java2SqlType.isNumbericInSQL(javaType)) {
if (dataminingType == DataminingType.INTERVAL) {
return true;
}
}
break;
case RangeIndicatorEnum:
case MinValueIndicatorEnum:
case MaxValueIndicatorEnum:
if (Java2SqlType.isNumbericInSQL(javaType) || Java2SqlType.isDateInSQL(javaType)) {
if (dataminingType == DataminingType.INTERVAL) {
return true;
}
}
break;
default :
return false;
}
return false;
}