nus-yam/ex-repair huggingface dataset:
Program: 34144
Project: 34144
Buggy source:
@Override protected String doInBackground(String... usernames){
  String message="String_Node_Str";
  String TAG="String_Node_Str";
  try {
    GCMRegistrar.checkDevice(CamerasActivity.this);
    Log.i(TAG,"String_Node_Str");
    GCMRegistrar.checkManifest(CamerasActivity.this);
    Log.i(TAG,"String_Node_Str");
    String regId=GCMRegistrar.getRegistrationId(CamerasActivity.this);
    String AppUserEmail=null;
    String AppUserPassword=null;
    String Operation=null;
    String Manufacturer=null;
    String Model=null;
    String SerialNo=null;
    String ImeiNo=null;
    String Fingureprint=null;
    String MacAddress=null;
    String BlueToothName=null;
    String AppVersion=null;
    try {
      SharedPreferences sharedPrefs=PreferenceManager.getDefaultSharedPreferences(CamerasActivity.this);
      AppUserEmail=sharedPrefs.getString("String_Node_Str",null);
      AppUserPassword=sharedPrefs.getString("String_Node_Str",null);
      Operation="String_Node_Str";
      Manufacturer=android.os.Build.MANUFACTURER;
      Model=android.os.Build.MODEL;
      SerialNo=android.os.Build.SERIAL;
      ImeiNo=((android.telephony.TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();
      Fingureprint=android.os.Build.FINGERPRINT;
      WifiManager manager=(WifiManager)getSystemService(Context.WIFI_SERVICE);
      WifiInfo info=manager.getConnectionInfo();
      MacAddress=info.getMacAddress();
      BlueToothName=BluetoothAdapter.getDefaultAdapter().getName();
      AppVersion=(getPackageManager().getPackageInfo(getPackageName(),0)).versionName;
    }
 catch (    Exception ee) {
    }
    Log.i(TAG,"String_Node_Str" + regId + "String_Node_Str");
    if (regId.equals("String_Node_Str")) {
      GCMRegistrar.register(CamerasActivity.this,Constants.GCM_SENDER_ID);
      return "String_Node_Str";
    }
 else     if (!GCMRegistrar.isRegisteredOnServer(CamerasActivity.this)) {
    }
 else {
      GCMRegistrar.setRegisteredOnServer(CamerasActivity.this,true);
      return regId;
    }
  }
 catch (  Exception e) {
    Log.e(TAG,e.toString() + "String_Node_Str" + Log.getStackTraceString(e));
    message=e.toString();
    if (Constants.isAppTrackingEnabled)     BugSenseHandler.sendException(e);
  }
catch (  Error e) {
    if (Constants.isAppTrackingEnabled)     BugSenseHandler.sendExceptionMessage(TAG,"String_Node_Str",new Exception(Log.getStackTraceString(e)));
  }
  return message;
}

Fixed version (ground truth):
@Override protected String[] doInBackground(String... arg0){
  try {
    DbAppUser dbUser=new DbAppUser(CamerasActivity.this);
    AppData.appUsers=dbUser.getAllAppUsers(1000);
    final String[] userEmailArray=new String[AppData.appUsers.size()];
    for (int count=0; count < AppData.appUsers.size(); count++) {
      userEmailArray[count]=AppData.appUsers.get(count).getEmail();
      if (AppData.appUsers.get(count).getIsDefault()) {
        defaultUserIndex=count;
      }
    }
    return userEmailArray;
  }
 catch (  Exception e) {
    Log.e(TAG,e.getMessage(),e);
    if (Constants.isAppTrackingEnabled) {
      BugSenseHandler.sendException(e);
    }
  }
  return null;
}
Program: 34146
Project: 34146
Buggy source:
@Override public boolean onNavigationItemSelected(int itemPosition,long itemId){
  try {
    for (    AppUser user : AppData.appUsers) {
      user.setIsDefault(false);
    }
    DbAppUser dbUser=new DbAppUser(CamerasActivity.this);
    dbUser.updateAllIsDefaultFalse();
    AppUser user=AppData.appUsers.get(itemPosition);
    user.setIsDefault(true);
    dbUser.updateAppUser(user);
    AppData.defaultUser=user;
    AppData.evercamCameraList=new DbCamera(CamerasActivity.this).getCamerasByOwner(user.getUsername(),500);
    removeAllCameraViews();
    addAllCameraViews(true);
    new LoadCameraListTask(AppData.defaultUser,CamerasActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    if (totalCamerasInGrid == 0 && refresh != null) {
      refresh.setActionView(null);
      refresh.setActionView(R.layout.actionbar_indeterminate_progress);
    }
  }
 catch (  Exception e) {
    Log.e(TAG,e.getMessage(),e);
    if (Constants.isAppTrackingEnabled) {
      BugSenseHandler.sendException(e);
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onNavigationItemSelected(int itemPosition,long itemId){
  try {
    for (    AppUser user : AppData.appUsers) {
      user.setIsDefault(false);
    }
    DbAppUser dbUser=new DbAppUser(CamerasActivity.this);
    dbUser.updateAllIsDefaultFalse();
    AppUser user=AppData.appUsers.get(itemPosition);
    user.setIsDefault(true);
    dbUser.updateAppUser(user);
    AppData.defaultUser=user;
    AppData.evercamCameraList=new DbCamera(CamerasActivity.this).getCamerasByOwner(user.getUsername(),500);
    Log.d(TAG,"String_Node_Str" + AppData.evercamCameraList.size());
    removeAllCameraViews();
    addAllCameraViews(true);
    new LoadCameraListTask(AppData.defaultUser,CamerasActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    if (totalCamerasInGrid == 0 && refresh != null) {
      refresh.setActionView(null);
      refresh.setActionView(R.layout.actionbar_indeterminate_progress);
    }
  }
 catch (  Exception e) {
    Log.e(TAG,e.getMessage(),e);
    if (Constants.isAppTrackingEnabled) {
      BugSenseHandler.sendException(e);
    }
  }
  return false;
}
Program: 34148
Project: 34148
Buggy source:
public void onCreateCustom(SQLiteDatabase db){
  String CREATE_TABLE_Cameras="String_Node_Str" + TABLE_CAMERA + "String_Node_Str"+ KEY_ID+ "String_Node_Str"+ "String_Node_Str"+ KEY_CAMERA_ID+ "String_Node_Str"+ "String_Node_Str"+ KEY_CAMERA_NAME+ "String_Node_Str"+ "String_Node_Str"+ KEY_OWNER+ "String_Node_Str"+ "String_Node_Str"+ KEY_USERNAME+ "String_Node_Str"+ "String_Node_Str"+ KEY_PASSWORD+ "String_Node_Str"+ "String_Node_Str"+ KEY_TIMEZONE+ "String_Node_Str"+ "String_Node_Str"+ KEY_VENDOR+ "String_Node_Str"+ "String_Node_Str"+ KEY_MODEL+ "String_Node_Str"+ "String_Node_Str"+ KEY_MAC+ "String_Node_Str"+ "String_Node_Str"+ KEY_EXTERNAL_JPG_URL+ "String_Node_Str"+ "String_Node_Str"+ KEY_INTERNAL_JPG_URL+ "String_Node_Str"+ "String_Node_Str"+ KEY_EXTERNAL_RTSP_URL+ "String_Node_Str"+ "String_Node_Str"+ KEY_INTERNAL_RTSP_URL+ "String_Node_Str"+ "String_Node_Str"+ KEY_STATUS+ "String_Node_Str"+ "String_Node_Str"+ KEY_HAS_CREDENTIAL+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ KEY_CAMERA_ID+ "String_Node_Str"+ "String_Node_Str";
  db.execSQL(CREATE_TABLE_Cameras);
}

Fixed version (ground truth):
public void onCreateCustom(SQLiteDatabase db){
  String CREATE_TABLE_Cameras="String_Node_Str" + TABLE_CAMERA + "String_Node_Str"+ KEY_ID+ "String_Node_Str"+ "String_Node_Str"+ KEY_CAMERA_ID+ "String_Node_Str"+ "String_Node_Str"+ KEY_CAMERA_NAME+ "String_Node_Str"+ "String_Node_Str"+ KEY_OWNER+ "String_Node_Str"+ "String_Node_Str"+ KEY_USERNAME+ "String_Node_Str"+ "String_Node_Str"+ KEY_PASSWORD+ "String_Node_Str"+ "String_Node_Str"+ KEY_TIMEZONE+ "String_Node_Str"+ "String_Node_Str"+ KEY_VENDOR+ "String_Node_Str"+ "String_Node_Str"+ KEY_MODEL+ "String_Node_Str"+ "String_Node_Str"+ KEY_MAC+ "String_Node_Str"+ "String_Node_Str"+ KEY_EXTERNAL_JPG_URL+ "String_Node_Str"+ "String_Node_Str"+ KEY_INTERNAL_JPG_URL+ "String_Node_Str"+ "String_Node_Str"+ KEY_EXTERNAL_RTSP_URL+ "String_Node_Str"+ "String_Node_Str"+ KEY_INTERNAL_RTSP_URL+ "String_Node_Str"+ "String_Node_Str"+ KEY_STATUS+ "String_Node_Str"+ "String_Node_Str"+ KEY_HAS_CREDENTIAL+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ KEY_CAMERA_ID+ "String_Node_Str"+ KEY_OWNER+ "String_Node_Str"+ "String_Node_Str";
  db.execSQL(CREATE_TABLE_Cameras);
}
Program: 34149
Project: 34149
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + loadingStatus + "String_Node_Str"+ cookies+ "String_Node_Str"+ isLocal+ "String_Node_Str"+ camera+ "String_Node_Str"+ id+ "String_Node_Str"+ cameraId+ "String_Node_Str"+ name+ "String_Node_Str"+ owner+ "String_Node_Str"+ username+ "String_Node_Str"+ password+ "String_Node_Str"+ timezone+ "String_Node_Str"+ vendor+ "String_Node_Str"+ model+ "String_Node_Str"+ mac+ "String_Node_Str"+ externalSnapshotUrl+ "String_Node_Str"+ internalSnapshotUrl+ "String_Node_Str"+ externalRtspUrl+ "String_Node_Str"+ internalRtspUrl+ "String_Node_Str"+ status+ "String_Node_Str"+ hasCredentials+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + loadingStatus + "String_Node_Str"+ cookies+ "String_Node_Str"+ isLocal+ "String_Node_Str"+ id+ "String_Node_Str"+ cameraId+ "String_Node_Str"+ name+ "String_Node_Str"+ owner+ "String_Node_Str"+ username+ "String_Node_Str"+ password+ "String_Node_Str"+ timezone+ "String_Node_Str"+ vendor+ "String_Node_Str"+ model+ "String_Node_Str"+ mac+ "String_Node_Str"+ externalSnapshotUrl+ "String_Node_Str"+ internalSnapshotUrl+ "String_Node_Str"+ externalRtspUrl+ "String_Node_Str"+ internalRtspUrl+ "String_Node_Str"+ status+ "String_Node_Str"+ hasCredentials+ "String_Node_Str";
}
Program: 34150
Project: 34150
Buggy source:
@Override protected Boolean doInBackground(Void... params){
  try {
    boolean updateDB=false;
    Log.d(TAG,"String_Node_Str");
    ArrayList<Camera> cameras=User.getCameras(user.getUsername(),true);
    ArrayList<EvercamCamera> evercamCameras=new ArrayList<EvercamCamera>();
    for (    io.evercam.Camera camera : cameras) {
      evercamCameras.add(new EvercamCamera().convertFromEvercam(camera));
    }
    Log.d(TAG,"String_Node_Str");
    for (    EvercamCamera camera : evercamCameras) {
      if (!AppData.evercamCameraList.contains(camera)) {
        updateDB=true;
        break;
      }
    }
    Log.d(TAG,"String_Node_Str");
    if (!updateDB) {
      for (      EvercamCamera camera : AppData.evercamCameraList) {
        if (!evercamCameras.contains(camera)) {
          updateDB=true;
          break;
        }
      }
    }
    Log.d(TAG,"String_Node_Str");
    if (updateDB) {
      reload=true;
      AppData.evercamCameraList=evercamCameras;
      DbCamera dbCamera=new DbCamera(camerasActivity);
      dbCamera.deleteCameraByOwner(user.getUsername());
      for (      EvercamCamera camera : AppData.evercamCameraList) {
        dbCamera.addCamera(camera);
      }
    }
    return true;
  }
 catch (  EvercamException e) {
    Log.e(TAG,e.getMessage());
  }
  return false;
}

Fixed version (ground truth):
@Override protected Boolean doInBackground(Void... params){
  try {
    boolean updateDB=false;
    Log.d(TAG,"String_Node_Str");
    ArrayList<Camera> cameras=User.getCameras(user.getUsername(),true);
    ArrayList<EvercamCamera> evercamCameras=new ArrayList<EvercamCamera>();
    for (    io.evercam.Camera camera : cameras) {
      evercamCameras.add(new EvercamCamera().convertFromEvercam(camera));
    }
    Log.d(TAG,"String_Node_Str");
    for (    EvercamCamera camera : evercamCameras) {
      if (!AppData.evercamCameraList.contains(camera)) {
        updateDB=true;
        break;
      }
    }
    Log.d(TAG,"String_Node_Str");
    if (!updateDB) {
      for (      EvercamCamera camera : AppData.evercamCameraList) {
        if (!evercamCameras.contains(camera)) {
          updateDB=true;
          break;
        }
      }
    }
    Log.d(TAG,"String_Node_Str");
    if (updateDB) {
      reload=true;
      AppData.evercamCameraList=evercamCameras;
      DbCamera dbCamera=new DbCamera(camerasActivity);
      dbCamera.deleteCameraByOwner(user.getUsername());
      Iterator<EvercamCamera> iterator=AppData.evercamCameraList.iterator();
      while (iterator.hasNext()) {
        dbCamera.addCamera(iterator.next());
      }
    }
    return true;
  }
 catch (  EvercamException e) {
    Log.e(TAG,e.getMessage());
  }
  return false;
}
Program: 34151
Project: 34151
Buggy source:
@Override public void onSlideMenuItemClick(int itemId){
  try {
switch (itemId) {
case R.id.slidemenu_logout:
      new LogoutTask(CamerasActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    break;
case R.id.slidemenu_about:
  new Handler().postDelayed(new Runnable(){
    @Override public void run(){
      startActivity(new Intent(CamerasActivity.this,AboutDialog.class));
    }
  }
,slideoutMenuAnimationTime);
break;
case R.id.slidemenu_settings:
new Handler().postDelayed(new Runnable(){
@Override public void run(){
  startActivity(new Intent(CamerasActivity.this,CameraPrefsActivity.class));
}
}
,slideoutMenuAnimationTime);
break;
case R.id.slidemenu_manage:
new Handler().postDelayed(new Runnable(){
@Override public void run(){
startActivity(new Intent(CamerasActivity.this,ManageAccountsActivity.class));
isUsersAccountsActivityStarted=true;
}
}
,slideoutMenuAnimationTime);
break;
}
}
 catch (Exception e) {
Log.e(TAG,e.toString(),e);
UIUtils.getAlertDialog(this,"String_Node_Str","String_Node_Str" + e.toString());
}
}

Fixed version (ground truth):
@Override public void onSlideMenuItemClick(int itemId){
  try {
    if (slideMenu.isShown()) {
      slideMenu.hide();
    }
switch (itemId) {
case R.id.slidemenu_logout:
      logOutUser();
    break;
case R.id.slidemenu_about:
  new Handler().postDelayed(new Runnable(){
    @Override public void run(){
      startActivity(new Intent(CamerasActivity.this,AboutDialog.class));
    }
  }
,slideoutMenuAnimationTime);
break;
case R.id.slidemenu_settings:
new Handler().postDelayed(new Runnable(){
@Override public void run(){
  startActivity(new Intent(CamerasActivity.this,CameraPrefsActivity.class));
}
}
,slideoutMenuAnimationTime);
break;
case R.id.slidemenu_manage:
new Handler().postDelayed(new Runnable(){
@Override public void run(){
startActivity(new Intent(CamerasActivity.this,ManageAccountsActivity.class));
isUsersAccountsActivityStarted=true;
}
}
,slideoutMenuAnimationTime);
break;
}
}
 catch (Exception e) {
Log.e(TAG,e.toString(),e);
UIUtils.getAlertDialog(this,"String_Node_Str","String_Node_Str" + e.toString());
}
}
Program: 34152
Project: 34152
Buggy source:
@Override protected Boolean doInBackground(Void... params){
  try {
    ApiKeyPair userKeyPair=API.requestUserKeyPairFromEvercam(username,password);
    String userApiKey=userKeyPair.getApiKey();
    String userApiId=userKeyPair.getApiId();
    API.setUserKeyPair(userApiKey,userApiId);
    User evercamUser=new User(username);
    newUser=new AppUser();
    newUser.setUsername(username);
    newUser.setPassword(password);
    newUser.setIsDefault(true);
    newUser.setCountry(evercamUser.getCountry());
    newUser.setEmail(evercamUser.getEmail());
    newUser.setApiKey(userApiKey);
    newUser.setApiId(userApiId);
    return true;
  }
 catch (  EvercamException e) {
    Log.e(TAG,e.toString());
    errorMessage=e.getMessage();
  }
  return false;
}

Fixed version (ground truth):
@Override protected Boolean doInBackground(Void... params){
  Log.v(TAG,"String_Node_Str");
  try {
    ApiKeyPair userKeyPair=API.requestUserKeyPairFromEvercam(username,password);
    String userApiKey=userKeyPair.getApiKey();
    String userApiId=userKeyPair.getApiId();
    API.setUserKeyPair(userApiKey,userApiId);
    Log.v(TAG,"String_Node_Str");
    User evercamUser=new User(username);
    Log.v(TAG,"String_Node_Str");
    newUser=new AppUser();
    newUser.setUsername(username);
    newUser.setPassword(password);
    newUser.setIsDefault(true);
    newUser.setCountry(evercamUser.getCountry());
    newUser.setEmail(evercamUser.getEmail());
    newUser.setApiKey(userApiKey);
    newUser.setApiId(userApiId);
    Log.v(TAG,"String_Node_Str");
    return true;
  }
 catch (  EvercamException e) {
    Log.e(TAG,e.toString());
    errorMessage=e.getMessage();
  }
  return false;
}
Program: 34153
Project: 34153
Buggy source:
public void attemptLogin(){
  if (loginTask != null) {
    return;
  }
  usernameEdit.setError(null);
  passwordEdit.setError(null);
  username=usernameEdit.getText().toString();
  password=passwordEdit.getText().toString();
  boolean cancel=false;
  View focusView=null;
  if (TextUtils.isEmpty(password)) {
    passwordEdit.setError(getString(R.string.error_password_required));
    focusView=passwordEdit;
    cancel=true;
  }
 else   if (password.contains("String_Node_Str")) {
    passwordEdit.setError(getString(R.string.error_invalid_password));
    focusView=passwordEdit;
    cancel=true;
  }
  if (TextUtils.isEmpty(username)) {
    usernameEdit.setError(getString(R.string.error_username_required));
    focusView=usernameEdit;
    cancel=true;
  }
 else   if (username.contains("String_Node_Str")) {
    usernameEdit.setError(getString(R.string.please_use_username));
    focusView=usernameEdit;
    cancel=true;
  }
 else   if (username.contains("String_Node_Str")) {
    usernameEdit.setError(getString(R.string.error_invalid_username));
    focusView=usernameEdit;
    cancel=true;
  }
  if (cancel) {
    focusView.requestFocus();
  }
 else {
    showProgressDialog();
    loginTask=new LoginTask();
    loginTask.execute();
  }
}

Fixed version (ground truth):
public void attemptLogin(){
  if (loginTask != null) {
    return;
  }
  usernameEdit.setError(null);
  passwordEdit.setError(null);
  username=usernameEdit.getText().toString();
  password=passwordEdit.getText().toString();
  boolean cancel=false;
  View focusView=null;
  if (TextUtils.isEmpty(password)) {
    passwordEdit.setError(getString(R.string.error_password_required));
    focusView=passwordEdit;
    cancel=true;
  }
 else   if (password.contains("String_Node_Str")) {
    passwordEdit.setError(getString(R.string.error_invalid_password));
    focusView=passwordEdit;
    cancel=true;
  }
  if (TextUtils.isEmpty(username)) {
    usernameEdit.setError(getString(R.string.error_username_required));
    focusView=usernameEdit;
    cancel=true;
  }
 else   if (username.contains("String_Node_Str")) {
    usernameEdit.setError(getString(R.string.please_use_username));
    focusView=usernameEdit;
    cancel=true;
  }
 else   if (username.contains("String_Node_Str")) {
    usernameEdit.setError(getString(R.string.error_invalid_username));
    focusView=usernameEdit;
    cancel=true;
  }
  if (cancel) {
    focusView.requestFocus();
  }
 else {
    showProgressDialog();
    Log.v(TAG,"String_Node_Str");
    loginTask=new LoginTask();
    loginTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
  }
}
Program: 34154
Project: 34154
Buggy source:
@Override protected void onPostExecute(final Boolean success){
  loginTask=null;
  dismissProgressDialog();
  if (success) {
    DbAppUser dbUser=new DbAppUser(LoginActivity.this);
    if (dbUser.getAppUserByUsername(newUser.getUsername()) != null) {
      dbUser.deleteAppUserByUsername(newUser.getUsername());
    }
    dbUser.updateAllIsDefaultFalse();
    dbUser.addAppUser(newUser);
    AppData.defaultUser=newUser;
    PrefsManager.saveUserEmail(sharedPrefs,newUser.getEmail());
    startCamerasActivity();
  }
 else {
    Toast toast=Toast.makeText(getApplicationContext(),errorMessage,Toast.LENGTH_SHORT);
    toast.setGravity(Gravity.CENTER,0,0);
    toast.show();
    passwordEdit.setText(null);
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(final Boolean success){
  Log.v(TAG,"String_Node_Str");
  loginTask=null;
  dismissProgressDialog();
  if (success) {
    DbAppUser dbUser=new DbAppUser(LoginActivity.this);
    if (dbUser.getAppUserByUsername(newUser.getUsername()) != null) {
      dbUser.deleteAppUserByUsername(newUser.getUsername());
    }
    dbUser.updateAllIsDefaultFalse();
    dbUser.addAppUser(newUser);
    AppData.defaultUser=newUser;
    PrefsManager.saveUserEmail(sharedPrefs,newUser.getEmail());
    startCamerasActivity();
  }
 else {
    Toast toast=Toast.makeText(getApplicationContext(),errorMessage,Toast.LENGTH_SHORT);
    toast.setGravity(Gravity.CENTER,0,0);
    toast.show();
    passwordEdit.setText(null);
  }
}
Program: 34155
Project: 34155
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (Constants.isAppTrackingEnabled) {
    BugSenseHandler.initAndStartSession(SignUpActivity.this,Constants.bugsense_ApiKey);
  }
  setContentView(R.layout.activity_sign_up);
  initialPage();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (Constants.isAppTrackingEnabled) {
    BugSenseHandler.initAndStartSession(SignUpActivity.this,Constants.bugsense_ApiKey);
  }
  setContentView(R.layout.activity_sign_up);
  setEvercamDeveloperKeypair();
  initialPage();
}
Program: 34157
Project: 34157
Buggy source:
@Override public void nextTuple(){
  if (!loaded || pauseBetweenLoads > -1) {
    collector.emit(FLOW_LOADER_STREAM,new Values(flows));
    if (pauseBetweenLoads > -1) {
      try {
        Thread.sleep(pauseBetweenLoads);
      }
 catch (      InterruptedException e) {
        throw new RuntimeException(e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void nextTuple(){
  if (!loaded || pauseBetweenLoads > -1) {
    collector.emit(FLOW_LOADER_STREAM,new Values(flows));
    loaded=true;
    if (pauseBetweenLoads > -1) {
      try {
        Thread.sleep(pauseBetweenLoads);
      }
 catch (      InterruptedException e) {
        throw new RuntimeException(e);
      }
    }
  }
}
Program: 34158
Project: 34158
Buggy source:
public static void main(String args[]) throws AlreadyAliveException, InvalidTopologyException, IllegalAccessException, InstantiationException {
  Rule rule=new Rule("String_Node_Str").setCriteria(new Criteria(){
    @Override public boolean matches(    Event event){
      return event.get("String_Node_Str").getValue().equals("String_Node_Str");
    }
  }
).setEnabled(true).setExpirationPolicy(Policy.COUNT).setExpirationThreshold(1).setGroupBy(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"})).setTriggerPolicy(Policy.COUNT).setTriggerThreshold(1).setTriggerFunction("String_Node_Str");
  TopologyBuilder builder=new TopologyBuilder();
  builder.setSpout("String_Node_Str",new MockEventGeneratorSpout(10));
  builder.setSpout("String_Node_Str",new RuleLoaderSpout(rule,RULE_STREAM));
  builder.setBolt("String_Node_Str",new GroupingBolt(RULE_STREAM)).shuffleGrouping("String_Node_Str").allGrouping("String_Node_Str",RULE_STREAM);
  builder.setBolt("String_Node_Str",new WindowingAlertingBolt(RULE_STREAM)).fieldsGrouping("String_Node_Str",new Fields("String_Node_Str")).allGrouping("String_Node_Str",RULE_STREAM);
  StormTopology topology=builder.createTopology();
  Config conf=new Config();
  conf.setNumWorkers(20);
  conf.setMaxSpoutPending(5000);
  conf.setDebug(false);
  LocalCluster cluster=new LocalCluster();
  cluster.submitTopology("String_Node_Str",conf,topology);
}

Fixed version (ground truth):
public static void main(String args[]) throws AlreadyAliveException, InvalidTopologyException, IllegalAccessException, InstantiationException {
  Rule rule=new Rule("String_Node_Str").setCriteria(new Criteria(){
    @Override public boolean matches(    Event event){
      return event.get("String_Node_Str").getValue().equals("String_Node_Str");
    }
  }
).setEnabled(true).setEvictionPolicy(Policy.TIME).setEvictionThreshold(5).setGroupBy(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"})).setTriggerPolicy(Policy.COUNT).setTriggerThreshold(10).setTriggerFunction("String_Node_Str");
  TopologyBuilder builder=new TopologyBuilder();
  builder.setSpout("String_Node_Str",new MockEventGeneratorSpout(10));
  builder.setSpout("String_Node_Str",new RuleLoaderSpout(rule,RULE_STREAM));
  builder.setBolt("String_Node_Str",new GroupingBolt(RULE_STREAM)).shuffleGrouping("String_Node_Str").allGrouping("String_Node_Str",RULE_STREAM);
  builder.setBolt("String_Node_Str",new WindowingAlertingBolt(RULE_STREAM)).fieldsGrouping("String_Node_Str",new Fields("String_Node_Str")).allGrouping("String_Node_Str",RULE_STREAM);
  StormTopology topology=builder.createTopology();
  Config conf=new Config();
  conf.setNumWorkers(20);
  conf.setMaxSpoutPending(5000);
  conf.setDebug(false);
  LocalCluster cluster=new LocalCluster();
  cluster.submitTopology("String_Node_Str",conf,topology);
}
Program: 34160
Project: 34160
Buggy source:
public Rule setTriggerFunction(String groovyTriggerFunction){
  this.groovyTriggerFunction=TRIGGER_WRAPPER_BEGIN + "String_Node_Str" + id+ "String_Node_Str"+ groovyTriggerFunction+ "String_Node_Str";
  return this;
}

Fixed version (ground truth):
public Rule setTriggerFunction(String groovyTriggerFunction){
  this.groovyTriggerFunction=TRIGGER_WRAPPER_BEGIN + "String_Node_Str" + id+ "String_Node_Str"+ "String_Node_Str"+ groovyTriggerFunction+ "String_Node_Str";
  return this;
}
Program: 34161
Project: 34161
Buggy source:
public Object invokeTriggerFunction(List<WindowBufferItem> events){
  return triggerFunction.invokeMethod("String_Node_Str",events);
}

Fixed version (ground truth):
public Object invokeTriggerFunction(List<WindowBufferItem> events){
  return triggerFunction.trigger(events);
}
Program: 34162
Project: 34162
Buggy source:
public void initTriggerFunction(){
  ClassLoader parent=Thread.currentThread().getContextClassLoader();
  GroovyClassLoader loader=new GroovyClassLoader(parent);
  Class groovyClass=loader.parseClass(groovyTriggerFunction);
  try {
    triggerFunction=(GroovyObject)groovyClass.newInstance();
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public void initTriggerFunction(){
  ClassLoader parent=Thread.currentThread().getContextClassLoader();
  GroovyClassLoader loader=new GroovyClassLoader(parent);
  Class groovyClass=loader.parseClass(groovyTriggerFunction);
  try {
    triggerFunction=(TriggerFunction)groovyClass.newInstance();
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 34163
Project: 34163
Buggy source:
@Override public int hashCode(){
  int result=id != null ? id.hashCode() : 0;
  result=31 * result + (criteria != null ? criteria.hashCode() : 0);
  result=31 * result + (enabled ? 1 : 0);
  result=31 * result + (triggerPolicy != null ? triggerPolicy.hashCode() : 0);
  result=31 * result + (expirationPolicy != null ? expirationPolicy.hashCode() : 0);
  result=31 * result + triggerThreshold;
  result=31 * result + expirationThreshold;
  result=31 * result + (groupBy != null ? groupBy.hashCode() : 0);
  result=31 * result + (triggerFunction != null ? triggerFunction.hashCode() : 0);
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=id != null ? id.hashCode() : 0;
  result=31 * result + (criteria != null ? criteria.hashCode() : 0);
  result=31 * result + (enabled ? 1 : 0);
  result=31 * result + (triggerPolicy != null ? triggerPolicy.hashCode() : 0);
  result=31 * result + (evictionPolicy != null ? evictionPolicy.hashCode() : 0);
  result=31 * result + triggerThreshold;
  result=31 * result + evictionThreshold;
  result=31 * result + (groupBy != null ? groupBy.hashCode() : 0);
  result=31 * result + (triggerFunction != null ? triggerFunction.hashCode() : 0);
  return result;
}
Program: 34164
Project: 34164
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Rule rule=(Rule)o;
  if (enabled != rule.enabled)   return false;
  if (expirationThreshold != rule.expirationThreshold)   return false;
  if (triggerThreshold != rule.triggerThreshold)   return false;
  if (criteria != null ? !criteria.equals(rule.criteria) : rule.criteria != null)   return false;
  if (expirationPolicy != rule.expirationPolicy)   return false;
  if (groupBy != null ? !groupBy.equals(rule.groupBy) : rule.groupBy != null)   return false;
  if (id != null ? !id.equals(rule.id) : rule.id != null)   return false;
  if (triggerFunction != null ? !triggerFunction.equals(rule.triggerFunction) : rule.triggerFunction != null)   return false;
  if (triggerPolicy != rule.triggerPolicy)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Rule rule=(Rule)o;
  if (enabled != rule.enabled)   return false;
  if (evictionThreshold != rule.evictionThreshold)   return false;
  if (triggerThreshold != rule.triggerThreshold)   return false;
  if (criteria != null ? !criteria.equals(rule.criteria) : rule.criteria != null)   return false;
  if (evictionPolicy != rule.evictionPolicy)   return false;
  if (groupBy != null ? !groupBy.equals(rule.groupBy) : rule.groupBy != null)   return false;
  if (id != null ? !id.equals(rule.id) : rule.id != null)   return false;
  if (triggerFunction != null ? !triggerFunction.equals(rule.triggerFunction) : rule.triggerFunction != null)   return false;
  if (triggerPolicy != rule.triggerPolicy)   return false;
  return true;
}
Program: 34165
Project: 34165
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + id + '\''+ "String_Node_Str"+ criteria+ "String_Node_Str"+ enabled+ "String_Node_Str"+ triggerPolicy+ "String_Node_Str"+ expirationPolicy+ "String_Node_Str"+ triggerThreshold+ "String_Node_Str"+ expirationThreshold+ "String_Node_Str"+ groupBy+ "String_Node_Str"+ triggerFunction+ '}';
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + id + '\''+ "String_Node_Str"+ criteria+ "String_Node_Str"+ enabled+ "String_Node_Str"+ triggerPolicy+ "String_Node_Str"+ evictionPolicy+ "String_Node_Str"+ triggerThreshold+ "String_Node_Str"+ evictionThreshold+ "String_Node_Str"+ groupBy+ "String_Node_Str"+ triggerFunction+ '}';
}
Program: 34166
Project: 34166
Buggy source:
public GroovyObject getTriggerFunctionGroovy(){
  return triggerFunction;
}

Fixed version (ground truth):
public TriggerFunction getTriggerFunctionGroovy(){
  return triggerFunction;
}
Program: 34167
Project: 34167
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + groupedIndex + '\''+ "String_Node_Str"+ events.size()+ "String_Node_Str"+ events+ "String_Node_Str"+ expirationTicks+ "String_Node_Str"+ triggerTicks+ '}';
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + groupedIndex + '\''+ "String_Node_Str"+ events.size()+ "String_Node_Str"+ events+ "String_Node_Str"+ evictionTicks+ "String_Node_Str"+ evictionTicks+ '}';
}
Program: 34168
Project: 34168
Buggy source:
public void testGetSummoners() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummoners(SUMMONER_NAME_1,SUMMONER_NAME_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetSummoners() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummoners(SUMMONER_NAME_1,SUMMONER_NAME_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34169
Project: 34169
Buggy source:
public void testGetMaps() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMaps().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetMaps() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMaps().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34170
Project: 34170
Buggy source:
public void testGetSummonerSpell() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getSummonerSpell(1,SpellData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetSummonerSpell() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getSummonerSpell(1,SpellData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34171
Project: 34171
Buggy source:
public void testGetMastery() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMastery(4353,MasteryData.SANITIZED_DESCRIPTION).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetMastery() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMastery(4353,MasteryData.SANITIZED_DESCRIPTION).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34172
Project: 34172
Buggy source:
public void testGetMatchDetails() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMatch(handler.getMatchHistory(SUMMONER_ID_2).get(1,MINUTES).get(0).getMatchId()).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetMatchDetails() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMatch(handler.getMatchHistory(SUMMONER_ID_2).get(1,MINUTES).get(0).getMatchId()).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34173
Project: 34173
Buggy source:
public void testGetStatSummary() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getStatsSummary(SUMMONER_ID_1,Season.SEASON3).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetStatSummary() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getStatsSummary(SUMMONER_ID_1,Season.SEASON3).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34174
Project: 34174
Buggy source:
public void testGetRunePages() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getRunePages(SUMMONER_ID_2).get(1,MINUTES);
    handler.getRunePagesMultipleUsers(SUMMONER_ID_2,SUMMONER_ID_1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetRunePages() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getRunePages(SUMMONER_ID_2).get(1,MINUTES);
    handler.getRunePagesMultipleUsers(SUMMONER_ID_2,SUMMONER_ID_1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34175
Project: 34175
Buggy source:
public void testGetChampions() throws Exception {
  try {
    handler.getChampions(ChampData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetChampions() throws Exception {
  try {
    handler.getChampions(ChampData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34176
Project: 34176
Buggy source:
public void testGetMasteries() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMasteries(MasteryData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetMasteries() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMasteries(MasteryData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34177
Project: 34177
Buggy source:
public void testGetItem() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getItem(2003,ItemData.CONSUME_ON_FULL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetItem() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getItem(2003,ItemData.CONSUME_ON_FULL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34178
Project: 34178
Buggy source:
public void testGetChampion() throws Exception {
  try {
    handler.getChampion(1,ChampData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetChampion() throws Exception {
  try {
    handler.getChampion(1,ChampData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34179
Project: 34179
Buggy source:
public void testGetItems() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getItemList(ItemData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetItems() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getItemList(ItemData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34180
Project: 34180
Buggy source:
public void testGetMasteryPages() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getMasteryPages(SUMMONER_ID_1).get(1,MINUTES);
    handler.getMasteryPagesMultipleUsers(SUMMONER_ID_1,SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetMasteryPages() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getMasteryPages(SUMMONER_ID_1).get(1,MINUTES);
    handler.getMasteryPagesMultipleUsers(SUMMONER_ID_1,SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34181
Project: 34181
Buggy source:
public void testGetChallenger() throws Exception {
  try {
    handler.getChallenger(QueueType.RANKED_SOLO_5x5).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetChallenger() throws Exception {
  try {
    handler.getChallenger(QueueType.RANKED_SOLO_5x5).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34182
Project: 34182
Buggy source:
public void testGetRunes() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getRuneList(ItemData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetRunes() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getRuneList(ItemData.ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34183
Project: 34183
Buggy source:
public void testGetBasicChampData() throws Exception {
  try {
    List<BasicChampData> euwBasicChampDatas=handler.getBasicChampData().get(1,MINUTES);
    assertNotNull(euwBasicChampDatas);
    assertFalse(euwBasicChampDatas.isEmpty());
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetBasicChampData() throws Exception {
  try {
    List<BasicChampData> euwBasicChampDatas=handler.getBasicChampData().get(1,MINUTES);
    assertNotNull(euwBasicChampDatas);
    assertFalse(euwBasicChampDatas.isEmpty());
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34184
Project: 34184
Buggy source:
public void testGetLeagues() throws Exception {
  try {
    handler.getLeagues(SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetLeagues() throws Exception {
  try {
    handler.getLeagues(SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34185
Project: 34185
Buggy source:
public void testGetRune() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getRune(5235,ItemData.HIDE_FROM_ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetRune() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getRune(5235,ItemData.HIDE_FROM_ALL).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34186
Project: 34186
Buggy source:
public void testGetRecentGames() throws Exception {
  try {
    handler.getRecentGames(SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetRecentGames() throws Exception {
  try {
    handler.getRecentGames(SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34187
Project: 34187
Buggy source:
public void testGetLeagueEntries() throws Exception {
  try {
    handler.getLeagueEntries(SUMMONER_ID_1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetLeagueEntries() throws Exception {
  try {
    handler.getLeagueEntries(SUMMONER_ID_1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34188
Project: 34188
Buggy source:
public void testGetLeagueEntriesByTeam() throws Exception {
  try {
    handler.getLeagueEntries(TEAM_ID).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetLeagueEntriesByTeam() throws Exception {
  try {
    handler.getLeagueEntries(TEAM_ID).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34189
Project: 34189
Buggy source:
public void testGetVersions() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getVersions().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetVersions() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getVersions().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34190
Project: 34190
Buggy source:
public void testGetFeaturedGames(){
  handler.featuredGamesHandler.getFeaturedGames();
}

Fixed version (ground truth):
public void testGetFeaturedGames(){
  try {
    handler.featuredGamesHandler.getFeaturedGames();
  }
 catch (  RuntimeException ex) {
    if (throwForward(ex)) {
      throw ex;
    }
  }
}
Program: 34191
Project: 34191
Buggy source:
public void testGetNames() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummonerName(SUMMONER_ID_2).get(1,MINUTES);
    handler.getSummonerNames(SUMMONER_ID_1,SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetNames() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummonerName(SUMMONER_ID_2).get(1,MINUTES);
    handler.getSummonerNames(SUMMONER_ID_1,SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34192
Project: 34192
Buggy source:
public void testGetLeaguesByTeam() throws Exception {
  try {
    handler.getLeagues(TEAM_ID).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetLeaguesByTeam() throws Exception {
  try {
    handler.getLeagues(TEAM_ID).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34193
Project: 34193
Buggy source:
public void testGetRealm() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getRealm().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetRealm() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getRealm().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34194
Project: 34194
Buggy source:
public void testGetLocalizedMessages() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getLocalizedMessages().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetLocalizedMessages() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getLocalizedMessages().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34195
Project: 34195
Buggy source:
public void testGetRankedStats() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getRankedStats(SUMMONER_ID_1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetRankedStats() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getRankedStats(SUMMONER_ID_1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34196
Project: 34196
Buggy source:
public void testGetTeams() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getTeams(SUMMONER_ID_1).get(1,MINUTES);
    handler.getTeams(TEAM_ID).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetTeams() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getTeams(SUMMONER_ID_1).get(1,MINUTES);
    handler.getTeams(TEAM_ID).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34197
Project: 34197
Buggy source:
public void testGetSummoner() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummoner(SUMMONER_NAME_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetSummoner() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummoner(SUMMONER_NAME_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}