Program: 137398
Project: 137398
Buggy source:
/** 
 * DOC msjian Comment method "setUp".
 * @throws java.lang.Exception
 */
@Before public void setUp() throws Exception {
  DataExplorerTestHelper.initDataExplorer();
  patternExplorer=new PatternExplorer();
  PatternMatchingIndicator indicator=mock(PatternMatchingIndicator.class);
  when(indicator.eClass()).thenReturn(null);
  ModelElement element=mock(ModelElement.class);
  when(element.getName()).thenReturn("String_Node_Str");
  when(indicator.getAnalyzedElement()).thenReturn(element);
  indicator.setAnalyzedElement(element);
  DbmsLanguage dbmsLanguage=mock(DbmsLanguage.class);
  when(dbmsLanguage.getRegexPatternString(indicator)).thenReturn(RES_VALIED_ROWS);
  when(dbmsLanguage.quote(anyString())).thenReturn("String_Node_Str");
  when(dbmsLanguage.regularFunctionBodyWithReturnValue(anyString(),anyString())).thenReturn("String_Node_Str");
  when(dbmsLanguage.notRegularFunctionBodyWithReturnValue(anyString(),anyString())).thenReturn("String_Node_Str");
  when(dbmsLanguage.where()).thenReturn("String_Node_Str");
  when(dbmsLanguage.and()).thenReturn("String_Node_Str");
  when(dbmsLanguage.from()).thenReturn("String_Node_Str");
  when(dbmsLanguage.or()).thenReturn("String_Node_Str");
  when(dbmsLanguage.isNull()).thenReturn("String_Node_Str");
  Analysis analysis=DataExplorerTestHelper.getAnalysis(indicator,dbmsLanguage);
  patternExplorer.setAnalysis(analysis);
  ChartDataEntity cdEntity=mock(ChartDataEntity.class);
  when(cdEntity.getIndicator()).thenReturn(indicator);
  PowerMockito.mockStatic(IndicatorEnum.class);
  when(IndicatorEnum.findIndicatorEnum(indicator.eClass())).thenReturn(IndicatorEnum.RowCountIndicatorEnum);
  patternExplorer.setEnitty(cdEntity);
  Expression instantiatedExpression=mock(Expression.class);
  when(dbmsLanguage.getInstantiatedExpression(indicator)).thenReturn(instantiatedExpression);
  when(instantiatedExpression.getBody()).thenReturn("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * DOC msjian Comment method "setUp".
 * @throws java.lang.Exception
 */
@Before public void setUp() throws Exception {
  DataExplorerTestHelper.initDataExplorer();
  patternExplorer=new PatternExplorer();
  PatternMatchingIndicator indicator=mock(PatternMatchingIndicator.class);
  when(indicator.eClass()).thenReturn(null);
  ModelElement element=mock(ModelElement.class);
  when(element.getName()).thenReturn("String_Node_Str");
  when(indicator.getAnalyzedElement()).thenReturn(element);
  indicator.setAnalyzedElement(element);
  DbmsLanguage dbmsLanguage=mock(DbmsLanguage.class);
  when(dbmsLanguage.getRegexPatternString(indicator)).thenReturn(RES_VALIED_ROWS);
  when(dbmsLanguage.quote(anyString())).thenReturn("String_Node_Str");
  when(dbmsLanguage.regexLike(anyString(),anyString())).thenReturn("String_Node_Str");
  when(dbmsLanguage.regexNotLike(anyString(),anyString())).thenReturn("String_Node_Str");
  when(dbmsLanguage.getFunctionReturnValue()).thenReturn("String_Node_Str");
  when(dbmsLanguage.where()).thenReturn("String_Node_Str");
  when(dbmsLanguage.and()).thenReturn("String_Node_Str");
  when(dbmsLanguage.from()).thenReturn("String_Node_Str");
  when(dbmsLanguage.or()).thenReturn("String_Node_Str");
  when(dbmsLanguage.isNull()).thenReturn("String_Node_Str");
  Analysis analysis=DataExplorerTestHelper.getAnalysis(indicator,dbmsLanguage);
  patternExplorer.setAnalysis(analysis);
  ChartDataEntity cdEntity=mock(ChartDataEntity.class);
  when(cdEntity.getIndicator()).thenReturn(indicator);
  PowerMockito.mockStatic(IndicatorEnum.class);
  when(IndicatorEnum.findIndicatorEnum(indicator.eClass())).thenReturn(IndicatorEnum.RowCountIndicatorEnum);
  patternExplorer.setEnitty(cdEntity);
  Expression instantiatedExpression=mock(Expression.class);
  when(dbmsLanguage.getInstantiatedExpression(indicator)).thenReturn(instantiatedExpression);
  when(instantiatedExpression.getBody()).thenReturn("String_Node_Str");
}