nus-yam/ex-repair huggingface dataset:
Program: 19120
Project: 19120
Buggy source:
@Override public boolean onPreDraw(){
  searchPanel.getViewTreeObserver().removeOnPreDrawListener(this);
  int revealRadius=((ViewGroup)searchPanel.getParent()).getHeight();
  Animator show=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),0f,revealRadius);
  show.setDuration(250L);
  show.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
  show.start();
  return false;
}

Fixed version (ground truth):
@Override public boolean onPreDraw(){
  searchPanel.getViewTreeObserver().removeOnPreDrawListener(this);
  final ViewGroup searchPanelParent=(ViewGroup)searchPanel.getParent();
  final int revealRadius=(int)Math.hypot(searchPanelParent.getWidth(),searchPanelParent.getHeight());
  Animator show=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),0f,revealRadius);
  show.setDuration(250L);
  show.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
  show.start();
  return false;
}
Program: 19121
Project: 19121
Buggy source:
/** 
 * On Lollipop+ perform a circular animation (a contracting circular mask) when hiding the search panel.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void doExitAnim(){
  final View searchPanel=findViewById(R.id.search_panel);
  int revealRadius=(int)Math.sqrt(Math.pow(searchPanel.getWidth(),2) + Math.pow(searchPanel.getHeight(),2));
  Animator shrink=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),revealRadius,0f);
  shrink.setDuration(200L);
  shrink.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
  shrink.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      searchPanel.setVisibility(View.INVISIBLE);
      ActivityCompat.finishAfterTransition(SearchActivity.this);
    }
  }
);
  shrink.start();
  findViewById(R.id.scrim).animate().alpha(0f).setDuration(200L).setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in)).start();
}

Fixed version (ground truth):
/** 
 * On Lollipop+ perform a circular animation (a contracting circular mask) when hiding the search panel.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void doExitAnim(){
  final View searchPanel=findViewById(R.id.search_panel);
  final int revealRadius=(int)Math.hypot(searchPanel.getWidth(),searchPanel.getHeight());
  Animator shrink=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),revealRadius,0f);
  shrink.setDuration(200L);
  shrink.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
  shrink.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      searchPanel.setVisibility(View.INVISIBLE);
      ActivityCompat.finishAfterTransition(SearchActivity.this);
    }
  }
);
  shrink.start();
  findViewById(R.id.scrim).animate().alpha(0f).setDuration(200L).setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in)).start();
}
Program: 19122
Project: 19122
Buggy source:
/** 
 * On Lollipop+ perform a circular reveal animation (an expanding circular mask) when showing the search panel.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void doEnterAnim(){
  View scrim=findViewById(R.id.scrim);
  scrim.animate().alpha(1f).setDuration(500L).setInterpolator(AnimationUtils.loadInterpolator(this,android.R.interpolator.fast_out_slow_in)).start();
  final View searchPanel=findViewById(R.id.search_panel);
  if (searchPanel != null) {
    searchPanel.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
      @Override public boolean onPreDraw(){
        searchPanel.getViewTreeObserver().removeOnPreDrawListener(this);
        int revealRadius=((ViewGroup)searchPanel.getParent()).getHeight();
        Animator show=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),0f,revealRadius);
        show.setDuration(250L);
        show.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
        show.start();
        return false;
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * On Lollipop+ perform a circular reveal animation (an expanding circular mask) when showing the search panel.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void doEnterAnim(){
  View scrim=findViewById(R.id.scrim);
  scrim.animate().alpha(1f).setDuration(500L).setInterpolator(AnimationUtils.loadInterpolator(this,android.R.interpolator.fast_out_slow_in)).start();
  final View searchPanel=findViewById(R.id.search_panel);
  if (searchPanel != null) {
    searchPanel.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
      @Override public boolean onPreDraw(){
        searchPanel.getViewTreeObserver().removeOnPreDrawListener(this);
        final ViewGroup searchPanelParent=(ViewGroup)searchPanel.getParent();
        final int revealRadius=(int)Math.hypot(searchPanelParent.getWidth(),searchPanelParent.getHeight());
        Animator show=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),0f,revealRadius);
        show.setDuration(250L);
        show.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
        show.start();
        return false;
      }
    }
);
  }
}
Program: 19123
Project: 19123
Buggy source:
@Override public boolean onPreDraw(){
  searchPanel.getViewTreeObserver().removeOnPreDrawListener(this);
  int revealRadius=((ViewGroup)searchPanel.getParent()).getHeight();
  Animator show=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),0f,revealRadius);
  show.setDuration(250L);
  show.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
  show.start();
  return false;
}

Fixed version (ground truth):
@Override public boolean onPreDraw(){
  searchPanel.getViewTreeObserver().removeOnPreDrawListener(this);
  final ViewGroup searchPanelParent=(ViewGroup)searchPanel.getParent();
  final int revealRadius=(int)Math.hypot(searchPanelParent.getWidth(),searchPanelParent.getHeight());
  Animator show=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),0f,revealRadius);
  show.setDuration(250L);
  show.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
  show.start();
  return false;
}
Program: 19124
Project: 19124
Buggy source:
/** 
 * On Lollipop+ perform a circular animation (a contracting circular mask) when hiding the search panel.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void doExitAnim(){
  final View searchPanel=findViewById(R.id.search_panel);
  int revealRadius=(int)Math.sqrt(Math.pow(searchPanel.getWidth(),2) + Math.pow(searchPanel.getHeight(),2));
  Animator shrink=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),revealRadius,0f);
  shrink.setDuration(200L);
  shrink.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
  shrink.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      searchPanel.setVisibility(View.INVISIBLE);
      ActivityCompat.finishAfterTransition(SearchActivity.this);
    }
  }
);
  shrink.start();
  findViewById(R.id.scrim).animate().alpha(0f).setDuration(200L).setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in)).start();
}

Fixed version (ground truth):
/** 
 * On Lollipop+ perform a circular animation (a contracting circular mask) when hiding the search panel.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void doExitAnim(){
  final View searchPanel=findViewById(R.id.search_panel);
  final int revealRadius=(int)Math.hypot(searchPanel.getWidth(),searchPanel.getHeight());
  Animator shrink=ViewAnimationUtils.createCircularReveal(searchPanel,searchPanel.getRight(),searchPanel.getTop(),revealRadius,0f);
  shrink.setDuration(200L);
  shrink.setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in));
  shrink.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      searchPanel.setVisibility(View.INVISIBLE);
      ActivityCompat.finishAfterTransition(SearchActivity.this);
    }
  }
);
  shrink.start();
  findViewById(R.id.scrim).animate().alpha(0f).setDuration(200L).setInterpolator(AnimationUtils.loadInterpolator(SearchActivity.this,android.R.interpolator.fast_out_slow_in)).start();
}
Program: 19125
Project: 19125
Buggy source:
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
}

Fixed version (ground truth):
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(mAccountName)).check(matches(isDisplayed()));
}
Program: 19126
Project: 19126
Buggy source:
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(),ACCOUNT_NAME);
  mStubLoginAndAuth=new StubLoginAndAuth(ACCOUNT_NAME,true,true);
  LoginAndAuthProvider.setStubLoginAndAuth(mStubLoginAndAuth);
}

Fixed version (ground truth):
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  mAccountName=LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
  mStubLoginAndAuth=new StubLoginAndAuth(mAccountName,true,true);
  LoginAndAuthProvider.setStubLoginAndAuth(mStubLoginAndAuth);
}
Program: 19127
Project: 19127
Buggy source:
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
}

Fixed version (ground truth):
/** 
 * This will fail if there is no available account on the device
 */
@FlakyTest @Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(mAccountName)).check(matches(isDisplayed()));
}
Program: 19128
Project: 19128
Buggy source:
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(),ACCOUNT_NAME);
  mStubLoginAndAuth=new StubLoginAndAuth(ACCOUNT_NAME,false,true);
  LoginAndAuthProvider.setStubLoginAndAuth(mStubLoginAndAuth);
}

Fixed version (ground truth):
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  mAccountName=LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
  mStubLoginAndAuth=new StubLoginAndAuth(mAccountName,false,true);
  LoginAndAuthProvider.setStubLoginAndAuth(mStubLoginAndAuth);
}
Program: 19129
Project: 19129
Buggy source:
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
}

Fixed version (ground truth):
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(mAccountName)).check(matches(isDisplayed()));
}
Program: 19130
Project: 19130
Buggy source:
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(),true);
  AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(),ACCOUNT_NAME);
}

Fixed version (ground truth):
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(),true);
  mAccountName=LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
}
Program: 19131
Project: 19131
Buggy source:
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
}

Fixed version (ground truth):
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(mAccountName)).check(matches(isDisplayed()));
}
Program: 19132
Project: 19132
Buggy source:
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(),false);
  AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(),ACCOUNT_NAME);
}

Fixed version (ground truth):
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(),false);
  mAccountName=LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
}
Program: 19133
Project: 19133
Buggy source:
@Override public void onAuthFailure(String accountName){
  LOGD(TAG,"String_Node_Str" + accountName);
  refreshAccountDependantData();
}

Fixed version (ground truth):
@Override public void onAuthFailure(String accountName){
  LOGD(TAG,"String_Node_Str" + accountName);
  refreshAccountDependantData();
  mAppNavigationViewAsDrawer.updateNavigationItems();
}
Program: 19134
Project: 19134
Buggy source:
@Override public boolean canSwipeRefreshChildScrollUp(){
  if (mWideMode) {
    return ViewCompat.canScrollVertically(mScrollViewWide,-1);
  }
  if (mViewPagerScrollState == ViewPager.SCROLL_STATE_DRAGGING) {
    return true;
  }
  for (  MyScheduleSingleDayFragment fragment : mMyScheduleSingleDayFragments) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
      if (!fragment.getUserVisibleHint()) {
        continue;
      }
    }
    return ViewCompat.canScrollVertically(fragment.getListView(),-1);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean canSwipeRefreshChildScrollUp(){
  if (mWideMode) {
    return ViewCompat.canScrollVertically(mScrollViewWide,-1);
  }
  for (  MyScheduleSingleDayFragment fragment : mMyScheduleSingleDayFragments) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
      if (!fragment.getUserVisibleHint()) {
        continue;
      }
    }
    return ViewCompat.canScrollVertically(fragment.getListView(),-1);
  }
  return false;
}
Program: 19135
Project: 19135
Buggy source:
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
}

Fixed version (ground truth):
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(mAccountName)).check(matches(isDisplayed()));
}
Program: 19136
Project: 19136
Buggy source:
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(),ACCOUNT_NAME);
  mStubLoginAndAuth=new StubLoginAndAuth(ACCOUNT_NAME,true,true);
  LoginAndAuthProvider.setStubLoginAndAuth(mStubLoginAndAuth);
}

Fixed version (ground truth):
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  mAccountName=LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
  mStubLoginAndAuth=new StubLoginAndAuth(mAccountName,true,true);
  LoginAndAuthProvider.setStubLoginAndAuth(mStubLoginAndAuth);
}
Program: 19137
Project: 19137
Buggy source:
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
}

Fixed version (ground truth):
/** 
 * This will fail if there is no available account on the device
 */
@FlakyTest @Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(mAccountName)).check(matches(isDisplayed()));
}
Program: 19138
Project: 19138
Buggy source:
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(),ACCOUNT_NAME);
  mStubLoginAndAuth=new StubLoginAndAuth(ACCOUNT_NAME,false,true);
  LoginAndAuthProvider.setStubLoginAndAuth(mStubLoginAndAuth);
}

Fixed version (ground truth):
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  mAccountName=LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
  mStubLoginAndAuth=new StubLoginAndAuth(mAccountName,false,true);
  LoginAndAuthProvider.setStubLoginAndAuth(mStubLoginAndAuth);
}
Program: 19139
Project: 19139
Buggy source:
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
}

Fixed version (ground truth):
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(mAccountName)).check(matches(isDisplayed()));
}
Program: 19140
Project: 19140
Buggy source:
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(),true);
  AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(),ACCOUNT_NAME);
}

Fixed version (ground truth):
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(),true);
  mAccountName=LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
}
Program: 19141
Project: 19141
Buggy source:
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
}

Fixed version (ground truth):
@Test public void accountName_IsDisplayed(){
  NavigationUtils.showNavigation();
  onView(withText(mAccountName)).check(matches(isDisplayed()));
}
Program: 19142
Project: 19142
Buggy source:
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(),false);
  AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(),ACCOUNT_NAME);
}

Fixed version (ground truth):
@Override protected void beforeActivityLaunched(){
  SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(),true);
  SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(),false);
  mAccountName=LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
}
Program: 19143
Project: 19143
Buggy source:
@Override public void onAuthFailure(String accountName){
  LOGD(TAG,"String_Node_Str" + accountName);
  refreshAccountDependantData();
}

Fixed version (ground truth):
@Override public void onAuthFailure(String accountName){
  LOGD(TAG,"String_Node_Str" + accountName);
  refreshAccountDependantData();
  mAppNavigationViewAsDrawer.updateNavigationItems();
}
Program: 19144
Project: 19144
Buggy source:
@Override public boolean canSwipeRefreshChildScrollUp(){
  if (mWideMode) {
    return ViewCompat.canScrollVertically(mScrollViewWide,-1);
  }
  if (mViewPagerScrollState == ViewPager.SCROLL_STATE_DRAGGING) {
    return true;
  }
  for (  MyScheduleSingleDayFragment fragment : mMyScheduleSingleDayFragments) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
      if (!fragment.getUserVisibleHint()) {
        continue;
      }
    }
    return ViewCompat.canScrollVertically(fragment.getListView(),-1);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean canSwipeRefreshChildScrollUp(){
  if (mWideMode) {
    return ViewCompat.canScrollVertically(mScrollViewWide,-1);
  }
  for (  MyScheduleSingleDayFragment fragment : mMyScheduleSingleDayFragments) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
      if (!fragment.getUserVisibleHint()) {
        continue;
      }
    }
    return ViewCompat.canScrollVertically(fragment.getListView(),-1);
  }
  return false;
}
Program: 19145
Project: 19145
Buggy source:
@Override public void deregisterHideableHeaderView(View hideableHeaderView){
  mHeaderViewImpl.deregisterHideableHeaderView(hideableHeaderView);
}

Fixed version (ground truth):
@Override public void deregisterHideableHeaderView(View hideableHeaderView){
  if (mHeaderViewImpl != null) {
    mHeaderViewImpl.deregisterHideableHeaderView(hideableHeaderView);
  }
}
Program: 19146
Project: 19146
Buggy source:
@Override public Toolbar getActionBarToolbar(){
  return mHeaderViewImpl.getActionBarToolbar();
}

Fixed version (ground truth):
@Override public Toolbar getActionBarToolbar(){
  if (mHeaderViewImpl != null) {
    return mHeaderViewImpl.getActionBarToolbar();
  }
 else {
    return null;
  }
}
Program: 19147
Project: 19147
Buggy source:
@Override public void registerHideableHeaderView(View hideableHeaderView){
  mHeaderViewImpl.registerHideableHeaderView(hideableHeaderView);
}

Fixed version (ground truth):
@Override public void registerHideableHeaderView(View hideableHeaderView){
  if (mHeaderViewImpl != null) {
    mHeaderViewImpl.registerHideableHeaderView(hideableHeaderView);
  }
}
Program: 19148
Project: 19148
Buggy source:
private void updateSwipeRefreshProgressBarTop(){
  if (mSwipeRefreshLayout == null) {
    return;
  }
  if (mActionBarShown) {
    mSwipeRefreshLayout.setProgressBarTop(mProgressBarTopWhenActionBarShown);
  }
 else {
    mSwipeRefreshLayout.setProgressBarTop(0);
  }
}

Fixed version (ground truth):
private void updateSwipeRefreshProgressBarTop(){
  if (mSwipeRefreshLayout == null) {
    return;
  }
  int progressBarStartMargin=getResources().getDimensionPixelSize(R.dimen.swipe_refresh_progress_bar_start_margin);
  int progressBarEndMargin=getResources().getDimensionPixelSize(R.dimen.swipe_refresh_progress_bar_end_margin);
  int top=mActionBarShown ? mProgressBarTopWhenActionBarShown : 0;
  mSwipeRefreshLayout.setProgressViewOffset(false,top + progressBarStartMargin,top + progressBarEndMargin);
}
Program: 19149
Project: 19149
Buggy source:
private void trySetupSwipeRefresh(){
  mSwipeRefreshLayout=(SwipeRefreshLayout)findViewById(R.id.swipe_refresh_layout);
  if (mSwipeRefreshLayout != null) {
    mSwipeRefreshLayout.setColorScheme(R.color.refresh_progress_1,R.color.refresh_progress_2,R.color.refresh_progress_3,R.color.refresh_progress_4);
    mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
      @Override public void onRefresh(){
        requestDataRefresh();
      }
    }
);
    if (mSwipeRefreshLayout instanceof MultiSwipeRefreshLayout) {
      MultiSwipeRefreshLayout mswrl=(MultiSwipeRefreshLayout)mSwipeRefreshLayout;
      mswrl.setCanChildScrollUpCallback(this);
    }
  }
}

Fixed version (ground truth):
private void trySetupSwipeRefresh(){
  mSwipeRefreshLayout=(SwipeRefreshLayout)findViewById(R.id.swipe_refresh_layout);
  if (mSwipeRefreshLayout != null) {
    mSwipeRefreshLayout.setColorSchemeResources(R.color.refresh_progress_1,R.color.refresh_progress_2,R.color.refresh_progress_3);
    mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
      @Override public void onRefresh(){
        requestDataRefresh();
      }
    }
);
    if (mSwipeRefreshLayout instanceof MultiSwipeRefreshLayout) {
      MultiSwipeRefreshLayout mswrl=(MultiSwipeRefreshLayout)mSwipeRefreshLayout;
      mswrl.setCanChildScrollUpCallback(this);
    }
  }
}
Program: 19150
Project: 19150
Buggy source:
public static void showWiFiDialog(Activity activity){
  FragmentManager fm=activity.getFragmentManager();
  FragmentTransaction ft=fm.beginTransaction();
  Fragment prev=fm.findFragmentByTag("String_Node_Str");
  if (prev != null) {
    ft.remove(prev);
  }
  ft.addToBackStack(null);
  new WiFiDialog(isWiFiEnabled(activity)).show(ft,"String_Node_Str");
}

Fixed version (ground truth):
public static void showWiFiDialog(Activity activity){
  FragmentManager fm=activity.getFragmentManager();
  FragmentTransaction ft=fm.beginTransaction();
  Fragment prev=fm.findFragmentByTag("String_Node_Str");
  if (prev != null) {
    ft.remove(prev);
  }
  ft.addToBackStack(null);
  WiFiDialog.newInstance(isWiFiEnabled(activity)).show(ft,"String_Node_Str");
}
Program: 19152
Project: 19152
Buggy source:
@Override protected void onCancelled(Bitmap bitmap){
  super.onCancelled(bitmap);
synchronized (mPauseWorkLock) {
    mPauseWorkLock.notifyAll();
  }
}

Fixed version (ground truth):
@Override protected void onCancelled(){
  super.onCancelled();
synchronized (mPauseWorkLock) {
    mPauseWorkLock.notifyAll();
  }
}
Program: 19153
Project: 19153
Buggy source:
public void isEqualTo(Node node){
  check("String_Node_Str",node).that(actual().checkTreeEquals(node)).isNull();
}

Fixed version (ground truth):
@Override public void isEqualTo(Object o){
  check().that(actual()).isInstanceOf(Node.class);
  Node node=(Node)o;
  check("String_Node_Str",node).that(actual().checkTreeEquals(node)).isNull();
}
Program: 19154
Project: 19154
Buggy source:
private void validateExpressionType(Node n){
switch (n.getToken()) {
case NAME:
    validateNameType(n);
  break;
case CALL:
if (!n.getFirstChild().isSuper()) {
  validateCallType(n);
}
break;
default :
expectSomeTypeInformation(n);
}
}

Fixed version (ground truth):
private void validateExpressionType(Node n){
switch (n.getToken()) {
case NAME:
    validateNameType(n);
  break;
case CALL:
if (!n.getFirstChild().isSuper()) {
  validateCallType(n);
}
break;
case SPREAD:
break;
default :
expectSomeTypeInformation(n);
}
}
Program: 19157
Project: 19157
Buggy source:
/** 
 * Look at the   {@code extends} clause to find the instance type being extended.Returns  {@code null} if there is no such clause, and unknown if the type cannotbe determined.
 */
@Nullable private ObjectType findSuperClassFromNodes(Node extendsNode,@Nullable JSDocInfo info){
  if (extendsNode.isEmpty()) {
    return null;
  }
  JSType ctorType=extendsNode.getJSType();
  if (ctorType == null) {
    if (extendsNode.isQualifiedName()) {
      TypedVar var=currentScope.getVar(extendsNode.getQualifiedName());
      if (var != null) {
        ctorType=var.getType();
      }
    }
 else {
      if (info == null || !info.hasBaseType()) {
        report(JSError.make(extendsNode,DYNAMIC_EXTENDS_WITHOUT_JSDOC));
      }
    }
  }
  if (ctorType != null && (ctorType.isConstructor() || ctorType.isInterface())) {
    return ctorType.toMaybeFunctionType().getInstanceType();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Look at the   {@code extends} clause to find the instance type being extended.Returns  {@code null} if there is no such clause, and unknown if the type cannotbe determined.
 */
@Nullable private ObjectType findSuperClassFromNodes(Node extendsNode,@Nullable JSDocInfo info){
  if (extendsNode.isEmpty()) {
    return null;
  }
  JSType ctorType=extendsNode.getJSType();
  if (ctorType == null) {
    if (extendsNode.isQualifiedName()) {
      TypedVar var=currentScope.getVar(extendsNode.getQualifiedName());
      if (var != null) {
        ctorType=var.getType();
      }
      if (ctorType == null) {
        return ObjectType.cast(typeRegistry.getType(currentScope,extendsNode.getQualifiedName(),extendsNode.getSourceFileName(),extendsNode.getLineno(),extendsNode.getCharno()));
      }
    }
 else {
      if (info == null || !info.hasBaseType()) {
        report(JSError.make(extendsNode,DYNAMIC_EXTENDS_WITHOUT_JSDOC));
      }
    }
  }
  if (ctorType != null && (ctorType.isConstructor() || ctorType.isInterface())) {
    return ctorType.toMaybeFunctionType().getInstanceType();
  }
  return null;
}
Program: 19159
Project: 19159
Buggy source:
public void testClassSuperConstructorParameterMismatch(){
  testTypes(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),"String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
public void testClassSuperConstructorParameterMismatch(){
  testTypes(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),lines("String_Node_Str","String_Node_Str","String_Node_Str"));
}
Program: 19160
Project: 19160
Buggy source:
/** 
 * Returns true if this is a global this type. 
 */
public final boolean isGlobalThisType(){
  return this == registry.getNativeType(JSTypeNative.GLOBAL_THIS);
}

Fixed version (ground truth):
/** 
 * Returns true if this is a global this type. 
 */
public final boolean isGlobalThisType(){
  return areIdentical(this,registry.getNativeType(JSTypeNative.GLOBAL_THIS));
}
Program: 19161
Project: 19161
Buggy source:
/** 
 * A generic implementation meant to be used as a helper for common getLeastSupertype implementations.
 */
static JSType getLeastSupertype(JSType thisType,JSType thatType){
  boolean areEquivalent=thisType.isEquivalentTo(thatType);
  return areEquivalent ? thisType : filterNoResolvedType(thisType.registry.createUnionType(thisType,thatType));
}

Fixed version (ground truth):
/** 
 * A generic implementation meant to be used as a helper for common getLeastSupertype implementations.
 */
@SuppressWarnings("String_Node_Str") static JSType getLeastSupertype(JSType thisType,JSType thatType){
  boolean areEquivalent=thisType.isEquivalentTo(thatType);
  return areEquivalent ? thisType : filterNoResolvedType(thisType.registry.createUnionType(thisType,thatType));
}
Program: 19162
Project: 19162
Buggy source:
/** 
 * Null-safe version of toMaybeFunctionType().
 */
public static FunctionType toMaybeFunctionType(JSType type){
  return type == null ? null : type.toMaybeFunctionType();
}

Fixed version (ground truth):
/** 
 * Null-safe version of toMaybeFunctionType(). 
 */
@SuppressWarnings("String_Node_Str") public static FunctionType toMaybeFunctionType(JSType type){
  return type == null ? null : type.toMaybeFunctionType();
}
Program: 19163
Project: 19163
Buggy source:
/** 
 * Tests whether   {@code this} and {@code that} are meaningfullycomparable using shallow comparison. By meaningfully, we mean compatible types that are not rejected by step 1 of the definition of the Strict Equality Comparison Algorithm (11.9.6, page 56&ndash;57) of the ECMA-262 specification.<p>
 */
public final boolean canTestForShallowEqualityWith(JSType that){
  if (isEmptyType() || that.isEmptyType()) {
    return isSubtypeOf(that) || that.isSubtypeOf(this);
  }
  JSType inf=getGreatestSubtype(that);
  return !inf.isEmptyType() || inf == registry.getNativeType(JSTypeNative.LEAST_FUNCTION_TYPE);
}

Fixed version (ground truth):
/** 
 * Tests whether   {@code this} and {@code that} are meaningfullycomparable using shallow comparison. By meaningfully, we mean compatible types that are not rejected by step 1 of the definition of the Strict Equality Comparison Algorithm (11.9.6, page 56&ndash;57) of the ECMA-262 specification.<p>
 */
public final boolean canTestForShallowEqualityWith(JSType that){
  if (isEmptyType() || that.isEmptyType()) {
    return isSubtypeOf(that) || that.isSubtypeOf(this);
  }
  JSType inf=getGreatestSubtype(that);
  return !inf.isEmptyType() || areIdentical(inf,registry.getNativeType(JSTypeNative.LEAST_FUNCTION_TYPE));
}
Program: 19164
Project: 19164
Buggy source:
public final boolean isEmptyType(){
  return isNoType() || isNoObjectType() || isNoResolvedType()|| (registry.getNativeFunctionType(JSTypeNative.LEAST_FUNCTION_TYPE) == this);
}

Fixed version (ground truth):
public final boolean isEmptyType(){
  return isNoType() || isNoObjectType() || isNoResolvedType()|| areIdentical(this,registry.getNativeFunctionType(JSTypeNative.LEAST_FUNCTION_TYPE));
}
Program: 19166
Project: 19166
Buggy source:
/** 
 * Computes the restricted type of this type knowing that the  {@code ToBoolean} predicate has a specific value. For more informationabout the  {@code ToBoolean} predicate, see{@link #getPossibleToBooleanOutcomes}.
 * @param outcome the value of the {@code ToBoolean} predicate
 * @return the restricted type, or the Any Type if the underlying type couldnot have yielded this ToBoolean value TODO(user): Move this method to the SemanticRAI and use the visit method of types to get the restricted type.
 */
public JSType getRestrictedTypeGivenToBooleanOutcome(boolean outcome){
  if (outcome && this == getNativeType(JSTypeNative.UNKNOWN_TYPE)) {
    return getNativeType(JSTypeNative.CHECKED_UNKNOWN_TYPE);
  }
  BooleanLiteralSet literals=getPossibleToBooleanOutcomes();
  if (literals.contains(outcome)) {
    return this;
  }
 else {
    return getNativeType(JSTypeNative.NO_TYPE);
  }
}

Fixed version (ground truth):
/** 
 * Computes the restricted type of this type knowing that the  {@code ToBoolean} predicate has a specific value. For more informationabout the  {@code ToBoolean} predicate, see{@link #getPossibleToBooleanOutcomes}.
 * @param outcome the value of the {@code ToBoolean} predicate
 * @return the restricted type, or the Any Type if the underlying type couldnot have yielded this ToBoolean value TODO(user): Move this method to the SemanticRAI and use the visit method of types to get the restricted type.
 */
public JSType getRestrictedTypeGivenToBooleanOutcome(boolean outcome){
  if (outcome && areIdentical(this,getNativeType(JSTypeNative.UNKNOWN_TYPE))) {
    return getNativeType(JSTypeNative.CHECKED_UNKNOWN_TYPE);
  }
  BooleanLiteralSet literals=getPossibleToBooleanOutcomes();
  if (literals.contains(outcome)) {
    return this;
  }
 else {
    return getNativeType(JSTypeNative.NO_TYPE);
  }
}
Program: 19167
Project: 19167
Buggy source:
/** 
 * Computes the subset of   {@code this} and {@code that} types undershallow inequality.
 * @return A pair containing the restricted type of {@code this} as the firstcomponent and the restricted type of  {@code that} as the secondelement. The returned pair is never  {@code null} even though itscomponents may be  {@code null}
 */
public TypePair getTypesUnderShallowInequality(JSType that){
  if (that.isUnionType()) {
    TypePair p=that.toMaybeUnionType().getTypesUnderShallowInequality(this);
    return new TypePair(p.typeB,p.typeA);
  }
  if (isNullType() && that.isNullType() || isVoidType() && that.isVoidType()) {
    return new TypePair(null,null);
  }
 else {
    return new TypePair(this,that);
  }
}

Fixed version (ground truth):
/** 
 * Computes the subset of   {@code this} and {@code that} types undershallow inequality.
 * @return A pair containing the restricted type of {@code this} as the firstcomponent and the restricted type of  {@code that} as the secondelement. The returned pair is never  {@code null} even though itscomponents may be  {@code null}
 */
public TypePair getTypesUnderShallowInequality(JSType that){
  if (that.isUnionType()) {
    TypePair p=that.toMaybeUnionType().getTypesUnderShallowInequality(this);
    return new TypePair(p.typeB,p.typeA);
  }
  if ((isNullType() && that.isNullType()) || (isVoidType() && that.isVoidType())) {
    return new TypePair(null,null);
  }
 else {
    return new TypePair(this,that);
  }
}
Program: 19169
Project: 19169
Buggy source:
public static boolean isEquivalent(JSType typeA,JSType typeB){
  return (typeA == null || typeB == null) ? typeA == typeB : typeA.isEquivalentTo(typeB);
}

Fixed version (ground truth):
public static boolean isEquivalent(JSType typeA,JSType typeB){
  return (typeA == null || typeB == null) ? areIdentical(typeA,typeB) : typeA.isEquivalentTo(typeB);
}
Program: 19170
Project: 19170
Buggy source:
public final boolean isUnresolvedOrResolvedUnknown(){
  return isNoResolvedType() || isNamedType() && isUnknownType();
}

Fixed version (ground truth):
public final boolean isUnresolvedOrResolvedUnknown(){
  return isNoResolvedType() || (isNamedType() && isUnknownType());
}
Program: 19171
Project: 19171
Buggy source:
private void checkProtoCycle(ErrorReporter reporter){
  JSType referencedType=getReferencedType();
  if (referencedType == this) {
    handleTypeCycle(reporter);
  }
}

Fixed version (ground truth):
private void checkProtoCycle(ErrorReporter reporter){
  JSType referencedType=getReferencedType();
  if (areIdentical(referencedType,this)) {
    handleTypeCycle(reporter);
  }
}
Program: 19172
Project: 19172
Buggy source:
private void checkEnumElementCycle(ErrorReporter reporter){
  JSType referencedType=getReferencedType();
  if (referencedType instanceof EnumElementType && ((EnumElementType)referencedType).getPrimitiveType() == this) {
    handleTypeCycle(reporter);
  }
}

Fixed version (ground truth):
private void checkEnumElementCycle(ErrorReporter reporter){
  JSType referencedType=getReferencedType();
  if (referencedType instanceof EnumElementType && areIdentical(this,((EnumElementType)referencedType).getPrimitiveType())) {
    handleTypeCycle(reporter);
  }
}
Program: 19174
Project: 19174
Buggy source:
/** 
 * @return Whether the given property access is on 'this' or a static property on a class. 
 */
private boolean isCandidatePropertyDefinition(Node n){
  Node target=n.getFirstChild();
  return target.isThis() || isConstructor(target);
}

Fixed version (ground truth):
/** 
 * @return Whether the given node is a @private property declaration that is not marked constant.
 */
private boolean isCandidatePropertyDefinition(Node n){
  if (!NodeUtil.isLhsOfAssign(n)) {
    return false;
  }
  Node target=n.getFirstChild();
  if (!(target.isThis() || isConstructor(target))) {
    return false;
  }
  JSDocInfo info=NodeUtil.getBestJSDocInfo(n);
  return info != null && info.getVisibility() == Visibility.PRIVATE && !info.isConstant() && !info.hasTypedefType() && !info.hasEnumParameterType() && !info.isInterface() && !isFunctionProperty(n);
}
Program: 19175
Project: 19175
Buggy source:
@Override public void visit(NodeTraversal t,Node n,Node parent){
switch (n.getToken()) {
case SCRIPT:
    reportMissingConst(t);
  break;
case GETELEM:
case GETPROP:
Node lastChild=n.getLastChild();
if (!lastChild.isString()) {
return;
}
String propName=lastChild.getString();
if (isCandidatePropertyDefinition(n) && isNonConstCheckablePrivatePropDecl(n)) {
candidates.add(n);
}
 else if (isModificationOp(n)) {
modified.add(propName);
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override public void visit(NodeTraversal t,Node n,Node parent){
switch (n.getToken()) {
case SCRIPT:
    reportMissingConst(t);
  break;
case GETELEM:
case GETPROP:
Node lastChild=n.getLastChild();
if (!lastChild.isString()) {
return;
}
String propName=lastChild.getString();
if (isCandidatePropertyDefinition(n)) {
candidates.add(n);
}
 else if (isModificationOp(n)) {
modified.add(propName);
}
break;
default :
break;
}
}
Program: 19176
Project: 19176
Buggy source:
private void processAllFiles(Deque<ScriptDescription> scriptDescriptions,Iterable<Node> scriptNodes){
  for (  Node c : scriptNodes) {
    checkState(c.isScript(),c);
    NodeTraversal.traverse(compiler,c,new UnwrapGoogLoadModule());
    pushScript(new ScriptDescription());
    currentScript.rootNode=c;
    scriptDescriptions.addLast(currentScript);
    NodeTraversal.traverse(compiler,c,new ScriptPreprocessor());
    NodeTraversal.traverse(compiler,c,new ScriptRecorder());
    popScript();
  }
  reportUnrecognizedRequires();
  if (compiler.hasHaltingErrors()) {
    return;
  }
  for (  Node c : scriptNodes) {
    pushScript(scriptDescriptions.removeFirst());
    NodeTraversal.traverse(compiler,c,new ScriptUpdater());
    popScript();
  }
}

Fixed version (ground truth):
private void processAllFiles(Deque<ScriptDescription> scriptDescriptions,Iterable<Node> scriptNodes){
  for (  Node c : scriptNodes) {
    checkState(c.isScript(),c);
    if (c.isFromExterns() && !NodeUtil.isFromTypeSummary(c)) {
      continue;
    }
    NodeTraversal.traverse(compiler,c,new UnwrapGoogLoadModule());
    pushScript(new ScriptDescription());
    currentScript.rootNode=c;
    scriptDescriptions.addLast(currentScript);
    NodeTraversal.traverse(compiler,c,new ScriptPreprocessor());
    NodeTraversal.traverse(compiler,c,new ScriptRecorder());
    popScript();
  }
  reportUnrecognizedRequires();
  if (compiler.hasHaltingErrors()) {
    return;
  }
  for (  Node c : scriptNodes) {
    if (c.isFromExterns() && !NodeUtil.isFromTypeSummary(c)) {
      continue;
    }
    pushScript(scriptDescriptions.removeFirst());
    NodeTraversal.traverse(compiler,c,new ScriptUpdater());
    popScript();
  }
}
Program: 19177
Project: 19177
Buggy source:
public void testIjsModule(){
  allowExternsChanges();
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected(lines("String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
public void testIjsModule(){
  allowExternsChanges();
  test(new String[]{lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),lines("String_Node_Str","String_Node_Str","String_Node_Str")},new String[]{lines("String_Node_Str","String_Node_Str")});
}
Program: 19178
Project: 19178
Buggy source:
public void testExternsReferencesToGoogModuleTypesAreRewritten(){
  CompilerOptions options=createCompilerOptions();
  options.setClosurePass(true);
  options.setCheckTypes(true);
  test(options,new String[]{LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")},(String[])null);
}

Fixed version (ground truth):
public void testExternsReferencesToGoogModuleTypesAreRewritten(){
  CompilerOptions options=createCompilerOptions();
  options.setClosurePass(true);
  options.setCheckTypes(true);
  test(options,new String[]{LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")},(String[])null);
}
Program: 19179
Project: 19179
Buggy source:
Node processAstRoot(ProgramTree rootNode){
  Node scriptNode=newNode(Token.SCRIPT);
  for (  ParseTree child : rootNode.sourceElements) {
    scriptNode.addChildToBack(transform(child));
  }
  parseDirectives(scriptNode);
  boolean isGoogModule=isGoogModuleFile(scriptNode);
  if (isGoogModule || features.has(Feature.MODULES)) {
    Node moduleNode=newNode(Token.MODULE_BODY);
    setSourceInfo(moduleNode,rootNode);
    moduleNode.addChildrenToBack(scriptNode.removeChildren());
    scriptNode.addChildToBack(moduleNode);
    if (isGoogModule) {
      scriptNode.putBooleanProp(Node.GOOG_MODULE,true);
    }
  }
  return scriptNode;
}

Fixed version (ground truth):
Node processAstRoot(ProgramTree rootNode){
  Node scriptNode=newNode(Token.SCRIPT);
  for (  ParseTree child : rootNode.sourceElements) {
    scriptNode.addChildToBack(transform(child));
  }
  parseDirectives(scriptNode);
  boolean isGoogModule=isGoogModuleFile(scriptNode);
  if (isGoogModule || features.has(Feature.MODULES)) {
    Node moduleNode=newNode(Token.MODULE_BODY);
    setSourceInfo(moduleNode,rootNode);
    moduleNode.addChildrenToBack(scriptNode.removeChildren());
    scriptNode.addChildToBack(moduleNode);
    if (isGoogModule) {
      scriptNode.putBooleanProp(Node.GOOG_MODULE,true);
    }
 else {
      scriptNode.putBooleanProp(Node.ES6_MODULE,true);
    }
  }
  return scriptNode;
}
Program: 19181
Project: 19181
Buggy source:
@Override protected void setUp() throws Exception {
  super.setUp();
  enableTypeCheck();
  enableClosurePass();
  enableClosurePassForExpected();
  enableRewriteClosureCode();
  setLanguage(LanguageMode.ECMASCRIPT_2015,LanguageMode.ECMASCRIPT5_STRICT);
  enableClosurePass();
  configuration=DEFAULT_CONFORMANCE;
  ignoreWarnings(DiagnosticGroups.MISSING_PROPERTIES);
}

Fixed version (ground truth):
@Override protected void setUp() throws Exception {
  super.setUp();
  enableTypeCheck();
  enableClosurePass();
  enableClosurePassForExpected();
  enableRewriteClosureCode();
  setLanguage(LanguageMode.ECMASCRIPT_2015,LanguageMode.ECMASCRIPT5_STRICT);
  configuration=DEFAULT_CONFORMANCE;
  ignoreWarnings(DiagnosticGroups.MISSING_PROPERTIES);
}
Program: 19184
Project: 19184
Buggy source:
protected final void assertTypeNotEquals(String msg,JSType a,JSType b){
  Asserts.assertTypeNotEquals(msg,a,b);
}

Fixed version (ground truth):
protected final void assertTypeNotEquals(JSType a,JSType b){
  Asserts.assertTypeNotEquals(a,b);
}
Program: 19186
Project: 19186
Buggy source:
/** 
 * Gets a   {@link Property} given the node that references it; the {@link Property} is createdif it does not already exist.
 * @return A {@link Property}, or null if the provided node is not a qualified name.
 */
private Property getOrCreateProperty(Node propNode){
  if (!propNode.isQualifiedName()) {
    return null;
  }
  String propName=propNode.isGetProp() ? propNode.getLastChild().getString() : propNode.getQualifiedName();
  if (propertyMap.containsKey(propName)) {
    return propertyMap.get(propName);
  }
  Property property=new Property(propName);
  propertyMap.put(propName,property);
  if (propNode.isGetProp()) {
    Property parentProperty=getOrCreateProperty(propNode.getFirstChild());
    if (parentProperty != null) {
      parentProperty.children.add(property);
    }
  }
  return property;
}

Fixed version (ground truth):
/** 
 * Gets a   {@link Property} given the node that references it; the {@link Property} is createdif it does not already exist.
 * @return A {@link Property}, or null if the provided node is not a qualified name.
 */
private Property getOrCreateProperty(Node propNode){
  if (!propNode.isQualifiedName()) {
    return null;
  }
  String propName=propNode.isGetProp() ? propNode.getLastChild().getString() : propNode.getQualifiedName();
  Property property=propertyMap.computeIfAbsent(propName,name -> new Property(name));
  if (propNode.isGetProp()) {
    Property parentProperty=getOrCreateProperty(propNode.getFirstChild());
    if (parentProperty != null) {
      parentProperty.children.add(property);
    }
  }
  return property;
}