Program: 137748
Project: 137748
Buggy source:
public Map<String,String> getQueryMap(){
  Map<String,String> map=new HashMap<String,String>();
  boolean isSqlEngine=ExecutionLanguage.SQL.equals(this.analysis.getParameters().getExecutionLanguage());
  AnalysisType analysisType=this.analysis.getParameters().getAnalysisType();
  boolean isHive=dbmsLanguage instanceof HiveDbmsLanguage;
  if (!isXml() || !isSqlEngine) {
switch (this.indicatorEnum) {
case RowCountIndicatorEnum:
case NullCountIndicatorEnum:
case BlankCountIndicatorEnum:
case DefValueCountIndicatorEnum:
case UserDefinedIndicatorEnum:
      String sql=getRowsStatement();
    IndicatorDefinition indicatorDefinition=this.indicator.getIndicatorDefinition();
  if (indicatorDefinition instanceof UDIndicatorDefinition) {
    IndicatorCategory category=IndicatorCategoryHelper.getCategory(indicatorDefinition);
    EList<TdExpression> list=((UDIndicatorDefinition)indicatorDefinition).getViewRowsExpression();
    TdExpression tdExp=DbmsLanguage.getSqlExpression(indicatorDefinition,dbmsLanguage.getDbmsName(),list,dbmsLanguage.getDbVersion());
    sql=tdExp.getBody();
    String dataFilterClause=getDataFilterClause();
    sql=sql.replace(GenericSQLHandler.WHERE_CLAUSE,dbmsLanguage.where() + dataFilterClause);
    sql=sql.replace(GenericSQLHandler.AND_WHERE_CLAUSE,PluginConstant.EMPTY_STRING.equals(dataFilterClause) ? PluginConstant.EMPTY_STRING : dbmsLanguage.and() + dataFilterClause);
    String tableName=getFullyQualifiedTableName(this.indicator.getAnalyzedElement());
    sql=sql.replace(GenericSQLHandler.TABLE_NAME,tableName);
    if (IndicatorCategoryHelper.isUserDefRealValue(category)) {
      sql=sql.replace(GenericSQLHandler.UDI_INDICATOR_VALUE,this.indicator.getRealValue().toString());
    }
  }
map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + sql : null);
break;
case UniqueIndicatorEnum:
if (analysisType != AnalysisType.COLUMN_SET) {
if (!isHive) {
map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getRowsStatementWithSubQuery() : null);
}
 else if (!isSqlEngine) {
map.put(MENU_VIEW_ROWS,null);
}
}
map.put(MENU_VIEW_VALUES,isSqlEngine ? getComment(MENU_VIEW_VALUES) + getValuesStatement(this.columnName) : null);
break;
case DistinctCountIndicatorEnum:
map.put(MENU_VIEW_VALUES,isSqlEngine ? getComment(MENU_VIEW_VALUES) + getDistinctValuesStatement(this.columnName) : null);
break;
case DuplicateCountIndicatorEnum:
if (analysisType != AnalysisType.COLUMN_SET) {
if (!isHive) {
map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getRowsStatementWithSubQuery() : null);
}
 else if (!isSqlEngine) {
map.put(MENU_VIEW_ROWS,null);
}
}
map.put(MENU_VIEW_VALUES,isSqlEngine ? getComment(MENU_VIEW_VALUES) + getValuesStatement(this.columnName) : null);
break;
default :
}
}
return map;
}

Fixed version (ground truth):
public Map<String,String> getQueryMap(){
  Map<String,String> map=new HashMap<String,String>();
  boolean isSqlEngine=ExecutionLanguage.SQL.equals(this.analysis.getParameters().getExecutionLanguage());
  AnalysisType analysisType=this.analysis.getParameters().getAnalysisType();
  boolean isHive=dbmsLanguage instanceof HiveDbmsLanguage;
  if (!isXml() || !isSqlEngine) {
switch (this.indicatorEnum) {
case RowCountIndicatorEnum:
case NullCountIndicatorEnum:
case BlankCountIndicatorEnum:
case DefValueCountIndicatorEnum:
case UserDefinedIndicatorEnum:
      IndicatorDefinition indicatorDefinition=this.indicator.getIndicatorDefinition();
    String sql=indicatorDefinition instanceof UDIndicatorDefinition ? getQueryForViewRows(indicatorDefinition) : getRowsStatement();
  map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + sql : null);
break;
case UniqueIndicatorEnum:
if (analysisType != AnalysisType.COLUMN_SET) {
if (!isHive) {
  map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getRowsStatementWithSubQuery() : null);
}
 else if (!isSqlEngine) {
  map.put(MENU_VIEW_ROWS,null);
}
}
map.put(MENU_VIEW_VALUES,isSqlEngine ? getComment(MENU_VIEW_VALUES) + getValuesStatement(this.columnName) : null);
break;
case DistinctCountIndicatorEnum:
map.put(MENU_VIEW_VALUES,isSqlEngine ? getComment(MENU_VIEW_VALUES) + getDistinctValuesStatement(this.columnName) : null);
break;
case DuplicateCountIndicatorEnum:
if (analysisType != AnalysisType.COLUMN_SET) {
if (!isHive) {
map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getRowsStatementWithSubQuery() : null);
}
 else if (!isSqlEngine) {
map.put(MENU_VIEW_ROWS,null);
}
}
map.put(MENU_VIEW_VALUES,isSqlEngine ? getComment(MENU_VIEW_VALUES) + getValuesStatement(this.columnName) : null);
break;
default :
}
}
return map;
}