Program: 139650
Project: 139650
Buggy source:
@SuppressWarnings("String_Node_Str") protected String getFreqRowsStatement(){
  String clause="String_Node_Str";
  TdColumn column=(TdColumn)indicator.getAnalyzedElement();
  int javaType=column.getJavaType();
  if (Java2SqlType.isTextInSQL(javaType)) {
    clause=getInstantiatedClause();
  }
 else   if (Java2SqlType.isDateInSQL(javaType)) {
    IndicatorParameters parameters=indicator.getParameters();
    DateGrain dateGrain=parameters.getDateParameters().getDateAggregationType();
switch (dateGrain) {
case DAY:
      clause=dbmsLanguage.extractDay(this.columnName) + dbmsLanguage.equal() + getDayCharacters(entity.getLabel());
case WEEK:
    if (clause.length() == 0) {
      clause=concatWhereClause(clause,dbmsLanguage.extractWeek(this.columnName) + dbmsLanguage.equal() + getWeekCharacters(entity.getLabel()));
    }
case MONTH:
  clause=concatWhereClause(clause,dbmsLanguage.extractMonth(this.columnName) + dbmsLanguage.equal() + getMonthCharacters(dateGrain,entity.getLabel()));
case QUARTER:
if (clause.length() == 0) {
  clause=concatWhereClause(clause,dbmsLanguage.extractQuarter(this.columnName) + dbmsLanguage.equal() + getQuarterCharacters(entity.getLabel()));
}
case YEAR:
clause=concatWhereClause(clause,dbmsLanguage.extractYear(this.columnName) + dbmsLanguage.equal() + getYearCharacters(entity.getLabel()));
break;
case NONE:
default :
clause=getDefaultQuotedStatement("String_Node_Str");
break;
}
}
 else if (Java2SqlType.isNumbericInSQL(javaType)) {
IndicatorParameters parameters=indicator.getParameters();
if (parameters != null) {
Domain bins=parameters.getBins();
if (bins != null) {
final EList<RangeRestriction> ranges=bins.getRanges();
for (RangeRestriction rangeRestriction : ranges) {
if (entity.getLabel() != null && entity.getLabel().equals(rangeRestriction.getName())) {
clause=createWhereClause(rangeRestriction);
break;
}
}
}
 else {
clause=getInstantiatedClause();
}
}
 else {
clause=getInstantiatedClause();
}
}
 else {
clause=getDefaultQuotedStatement("String_Node_Str");
}
return "String_Node_Str" + getFullyQualifiedTableName(column) + dbmsLanguage.where()+ inBrackets(clause)+ andDataFilterClause();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected String getFreqRowsStatement(){
  String clause="String_Node_Str";
  TdColumn column=(TdColumn)indicator.getAnalyzedElement();
  int javaType=column.getJavaType();
  if (Java2SqlType.isTextInSQL(javaType)) {
    clause=getInstantiatedClause();
  }
 else   if (Java2SqlType.isDateInSQL(javaType)) {
    IndicatorParameters parameters=indicator.getParameters();
    DateGrain dateGrain=parameters.getDateParameters().getDateAggregationType();
switch (dateGrain) {
case DAY:
      clause=dbmsLanguage.extractDay(this.columnName) + dbmsLanguage.equal() + getDayCharacters(entity.getLabel());
case WEEK:
    if (clause.length() == 0) {
      clause=concatWhereClause(clause,dbmsLanguage.extractWeek(this.columnName) + dbmsLanguage.equal() + getWeekCharacters(entity.getLabel()));
    }
case MONTH:
  clause=concatWhereClause(clause,dbmsLanguage.extractMonth(this.columnName) + dbmsLanguage.equal() + getMonthCharacters(dateGrain,entity.getLabel()));
case QUARTER:
if (clause.length() == 0) {
  clause=concatWhereClause(clause,dbmsLanguage.extractQuarter(this.columnName) + dbmsLanguage.equal() + getQuarterCharacters(entity.getLabel()));
}
case YEAR:
clause=concatWhereClause(clause,buildWhereClause());
break;
case NONE:
default :
clause=getDefaultQuotedStatement("String_Node_Str");
break;
}
}
 else if (Java2SqlType.isNumbericInSQL(javaType)) {
IndicatorParameters parameters=indicator.getParameters();
if (parameters != null) {
Domain bins=parameters.getBins();
if (bins != null) {
final EList<RangeRestriction> ranges=bins.getRanges();
for (RangeRestriction rangeRestriction : ranges) {
if (entity.getLabel() != null && entity.getLabel().equals(rangeRestriction.getName())) {
clause=createWhereClause(rangeRestriction);
break;
}
}
}
 else {
clause=getInstantiatedClause();
}
}
 else {
clause=getInstantiatedClause();
}
}
 else {
clause=getDefaultQuotedStatement("String_Node_Str");
}
return "String_Node_Str" + getFullyQualifiedTableName(column) + dbmsLanguage.where()+ inBrackets(clause)+ andDataFilterClause();
}