Program: 79904
Project: 79904
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_key_missing,container,false);
  Button needKey=view.findViewById(R.id.needKeyButton);
  needKey.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      Intent browser=new Intent(Intent.ACTION_VIEW,Uri.parse("String_Node_Str"));
      startActivity(browser);
    }
  }
);
  Button openSettings=view.findViewById(R.id.openSettingsButton);
  openSettings.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      if (callback != null)       callback.openSettings();
    }
  }
);
  final SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(getActivity());
  final Boolean limited=settings.getBoolean("String_Node_Str",false);
  final int limit=settings.getInt("String_Node_Str",5);
  if (limited) {
    int used=settings.getInt("String_Node_Str",0);
    TextView wundergroundTest=view.findViewById(R.id.testWunderground);
    wundergroundTest.setText(String.format(getString(R.string.test_wunderground_limit),used,limit));
  }
  Button testWunderground=view.findViewById(R.id.testWundergroundButton);
  testWunderground.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      int used=settings.getInt("String_Node_Str",0);
      if (used >= limit)       Toast.makeText(getActivity().getApplicationContext(),getString(R.string.passed_limit_error),Toast.LENGTH_LONG).show();
 else       if (callback != null)       callback.testWunderground();
    }
  }
);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_key_missing,container,false);
  Button needKey=view.findViewById(R.id.needKeyButton);
  needKey.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      Intent browser=new Intent(Intent.ACTION_VIEW,Uri.parse("String_Node_Str"));
      startActivity(browser);
    }
  }
);
  Button openSettings=view.findViewById(R.id.openSettingsButton);
  openSettings.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      if (callback != null)       callback.openSettings();
    }
  }
);
  final SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(getActivity());
  final Boolean limited=settings.getBoolean("String_Node_Str",false);
  final int limit=settings.getInt("String_Node_Str",5);
  if (limited) {
    int used=settings.getInt("String_Node_Str",0);
    TextView wundergroundTest=view.findViewById(R.id.testWunderground);
    wundergroundTest.setText(String.format(getString(R.string.test_wunderground_limit),used,limit));
  }
  Button testWunderground=view.findViewById(R.id.testWundergroundButton);
  testWunderground.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      int used=settings.getInt("String_Node_Str",0);
      if (settings.getBoolean("String_Node_Str",false) && used >= limit)       Toast.makeText(getActivity().getApplicationContext(),getString(R.string.passed_limit_error),Toast.LENGTH_LONG).show();
 else       if (callback != null)       callback.testWunderground();
    }
  }
);
  return view;
}