nus-yam/ex-repair huggingface dataset:
Program: 20267
Project: 20267
Buggy source:
@Test public void checkAbilityToStartServiceUsingCapabilitiesAndFlags(){
  File app=ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  DesiredCapabilities caps=new DesiredCapabilities();
  caps.setCapability(PLATFORM_NAME,"String_Node_Str");
  caps.setCapability(FULL_RESET,true);
  caps.setCapability(NEW_COMMAND_TIMEOUT,60);
  caps.setCapability(APP_PACKAGE,"String_Node_Str");
  caps.setCapability(APP_ACTIVITY,"String_Node_Str");
  caps.setCapability(APP,app.getAbsolutePath());
  caps.setCapability(CHROMEDRIVER_EXECUTABLE,getPathToChromeDriverBinary());
  service=new AppiumServiceBuilder().withArgument(CALLBACK_ADDRESS,testIP).withArgument(SESSION_OVERRIDE).withArgument(PRE_LAUNCH).withCapabilities(caps).build();
  service.start();
  assertTrue(service.isRunning());
}

Fixed version (ground truth):
@Test public void checkAbilityToStartServiceUsingCapabilitiesAndFlags(){
  File app=ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  DesiredCapabilities caps=new DesiredCapabilities();
  caps.setCapability(PLATFORM_NAME,"String_Node_Str");
  caps.setCapability(FULL_RESET,true);
  caps.setCapability(NEW_COMMAND_TIMEOUT,60);
  caps.setCapability(APP_PACKAGE,"String_Node_Str");
  caps.setCapability(APP_ACTIVITY,"String_Node_Str");
  caps.setCapability(APP,app.getAbsolutePath());
  caps.setCapability(CHROMEDRIVER_EXECUTABLE,chromeManager.getBinaryPath());
  service=new AppiumServiceBuilder().withArgument(CALLBACK_ADDRESS,testIP).withArgument(SESSION_OVERRIDE).withArgument(PRE_LAUNCH).withCapabilities(caps).build();
  service.start();
  assertTrue(service.isRunning());
}
Program: 20270
Project: 20270
Buggy source:
@Override public Response execute(Command command) throws WebDriverException, IOException {
  if (DriverCommand.NEW_SESSION.equals(command.getName())) {
    serviceOptional.ifPresent(driverService -> {
      try {
        driverService.start();
      }
 catch (      IOException e) {
        throw new WebDriverException(e.getMessage(),e);
      }
    }
);
  }
  Response response;
  try {
    response=NEW_SESSION.equals(command.getName()) ? createSession(command) : super.execute(command);
  }
 catch (  Throwable t) {
    Throwable rootCause=Throwables.getRootCause(t);
    if (rootCause instanceof ConnectException && rootCause.getMessage().contains("String_Node_Str")) {
      throw serviceOptional.map(service -> {
        if (service.isRunning()) {
          return new WebDriverException("String_Node_Str",rootCause);
        }
        return new WebDriverException("String_Node_Str",rootCause);
      }
).orElseGet((Supplier<WebDriverException>)() -> new WebDriverException(rootCause.getMessage(),rootCause));
    }
    throwIfUnchecked(t);
    throw new WebDriverException(t);
  }
 finally {
    if (DriverCommand.QUIT.equals(command.getName())) {
      serviceOptional.ifPresent(DriverService::stop);
    }
  }
  if (DriverCommand.NEW_SESSION.equals(command.getName()) && getCommandCodec() instanceof W3CHttpCommandCodec) {
    setCommandCodec(new AppiumW3CHttpCommandCodec());
    getAdditionalCommands().forEach(this::defineCommand);
  }
  return response;
}

Fixed version (ground truth):
@Override public Response execute(Command command) throws WebDriverException {
  if (DriverCommand.NEW_SESSION.equals(command.getName())) {
    serviceOptional.ifPresent(driverService -> {
      try {
        driverService.start();
      }
 catch (      IOException e) {
        throw new WebDriverException(e.getMessage(),e);
      }
    }
);
  }
  Response response;
  try {
    response=NEW_SESSION.equals(command.getName()) ? createSession(command) : super.execute(command);
  }
 catch (  Throwable t) {
    Throwable rootCause=Throwables.getRootCause(t);
    if (rootCause instanceof ConnectException && rootCause.getMessage().contains("String_Node_Str")) {
      throw serviceOptional.map(service -> {
        if (service.isRunning()) {
          return new WebDriverException("String_Node_Str",rootCause);
        }
        return new WebDriverException("String_Node_Str",rootCause);
      }
).orElseGet((Supplier<WebDriverException>)() -> new WebDriverException(rootCause.getMessage(),rootCause));
    }
    throwIfUnchecked(t);
    throw new WebDriverException(t);
  }
 finally {
    if (DriverCommand.QUIT.equals(command.getName())) {
      serviceOptional.ifPresent(DriverService::stop);
    }
  }
  if (DriverCommand.NEW_SESSION.equals(command.getName()) && getCommandCodec() instanceof W3CHttpCommandCodec) {
    setCommandCodec(new AppiumW3CHttpCommandCodec());
    getAdditionalCommands().forEach(this::defineCommand);
  }
  return response;
}
Program: 20271
Project: 20271
Buggy source:
/** 
 * initialization.
 */
@BeforeClass public static void beforeClass(){
  service=AppiumDriverLocalService.buildDefaultService();
  service.start();
  if (service == null || !service.isRunning()) {
    throw new AppiumServerHasNotBeenStartedLocallyException("String_Node_Str");
  }
  File appDir=new File("String_Node_Str");
  File app=new File(appDir,"String_Node_Str");
  DesiredCapabilities capabilities=new DesiredCapabilities();
  capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME,AutomationName.APPIUM);
  capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"String_Node_Str");
  capabilities.setCapability(MobileCapabilityType.APP,app.getAbsolutePath());
  driver=new AndroidDriver<>(service.getUrl(),capabilities);
}

Fixed version (ground truth):
/** 
 * initialization.
 */
@BeforeClass public static void beforeClass(){
  service=AppiumDriverLocalService.buildDefaultService();
  service.start();
  if (service == null || !service.isRunning()) {
    throw new AppiumServerHasNotBeenStartedLocallyException("String_Node_Str");
  }
  File appDir=new File("String_Node_Str");
  File app=new File(appDir,"String_Node_Str");
  DesiredCapabilities capabilities=new DesiredCapabilities();
  capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME,AutomationName.ANDROID_UIAUTOMATOR2);
  capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"String_Node_Str");
  capabilities.setCapability(MobileCapabilityType.APP,app.getAbsolutePath());
  driver=new AndroidDriver<>(service.getUrl(),capabilities);
}
Program: 20272
Project: 20272
Buggy source:
/** 
 * It creates a built instance of   {@link PointOption} which takes x and y coordinates.This is offset from the upper left corner of the screen.
 * @param xOffset is x value.
 * @param yOffset is y value.
 * @return a built option
 */
public static PointOption point(int xOffset,int yOffset){
  return new PointOption().coordinates(xOffset,yOffset);
}

Fixed version (ground truth):
/** 
 * It creates a built instance of   {@link PointOption} which takes x and y coordinates.This is offset from the upper left corner of the screen.
 * @param xOffset is x value.
 * @param yOffset is y value.
 * @return a built option
 */
public static PointOption point(int xOffset,int yOffset){
  return new PointOption().withCoordinates(xOffset,yOffset);
}
Program: 20273
Project: 20273
Buggy source:
@Test public void invalidOptionsArgumentsShouldFailOnAltering() throws Exception {
  final List<Runnable> invalidOptions=new ArrayList<>();
  invalidOptions.add(() -> waitOptions(ofMillis(-1)));
  invalidOptions.add(() -> new ElementOption().coordinates(0,0).withElement(null));
  invalidOptions.add(() -> new PointOption().coordinates(0,-1));
  invalidOptions.add(() -> new PointOption().coordinates(-1,0));
  invalidOptions.add(() -> new WaitOptions().withDuration(null));
  invalidOptions.add(() -> tapOptions().withTapsCount(-1));
  invalidOptions.add(() -> longPressOptions().withDuration(null));
  invalidOptions.add(() -> longPressOptions().withDuration(ofMillis(-1)));
  for (  Runnable item : invalidOptions) {
    assertThat(item,failsWith(RuntimeException.class));
  }
}

Fixed version (ground truth):
@Test public void invalidOptionsArgumentsShouldFailOnAltering() throws Exception {
  final List<Runnable> invalidOptions=new ArrayList<>();
  invalidOptions.add(() -> waitOptions(ofMillis(-1)));
  invalidOptions.add(() -> new ElementOption().withCoordinates(0,0).withElement(null));
  invalidOptions.add(() -> new PointOption().withCoordinates(0,-1));
  invalidOptions.add(() -> new PointOption().withCoordinates(-1,0));
  invalidOptions.add(() -> new WaitOptions().withDuration(null));
  invalidOptions.add(() -> tapOptions().withTapsCount(-1));
  invalidOptions.add(() -> longPressOptions().withDuration(null));
  invalidOptions.add(() -> longPressOptions().withDuration(ofMillis(-1)));
  for (  Runnable item : invalidOptions) {
    assertThat(item,failsWith(RuntimeException.class));
  }
}
Program: 20274
Project: 20274
Buggy source:
@Test public void longPressOptionsShouldBuildProperly() throws Exception {
  final Map<String,Object> actualOpts=longPressOptions().withElement(element(DUMMY_ELEMENT).coordinates(0,0)).withDuration(ofMillis(1)).build();
  final Map<String,Object> expectedOpts=new HashMap<>();
  expectedOpts.put("String_Node_Str",((HasIdentity)DUMMY_ELEMENT).getId());
  expectedOpts.put("String_Node_Str",0);
  expectedOpts.put("String_Node_Str",0);
  expectedOpts.put("String_Node_Str",1L);
  assertThat(actualOpts.entrySet(),everyItem(isIn(expectedOpts.entrySet())));
  assertThat(expectedOpts.entrySet(),everyItem(isIn(actualOpts.entrySet())));
}

Fixed version (ground truth):
@Test public void longPressOptionsShouldBuildProperly() throws Exception {
  final Map<String,Object> actualOpts=longPressOptions().withElement(element(DUMMY_ELEMENT).withCoordinates(0,0)).withDuration(ofMillis(1)).build();
  final Map<String,Object> expectedOpts=new HashMap<>();
  expectedOpts.put("String_Node_Str",((HasIdentity)DUMMY_ELEMENT).getId());
  expectedOpts.put("String_Node_Str",0);
  expectedOpts.put("String_Node_Str",0);
  expectedOpts.put("String_Node_Str",1L);
  assertThat(actualOpts.entrySet(),everyItem(isIn(expectedOpts.entrySet())));
  assertThat(expectedOpts.entrySet(),everyItem(isIn(actualOpts.entrySet())));
}
Program: 20275
Project: 20275
Buggy source:
/** 
 * Press and hold the at an elements upper-left corner, offset by the given amount, until the contextmenu event has fired.
 * @param el       element to long-press.
 * @param x        x offset.
 * @param y        y offset.
 * @param duration of the long-press. Minimum time resolution unit is one millisecond.
 * @return this TouchAction, for chaining.
 * @deprecated use {@link #longPress(LongPressOptions)} instead
 */
@Deprecated public TouchAction longPress(WebElement el,int x,int y,Duration duration){
  return longPress(longPressOptions().withOffset(WebElementOption.element(el,x,y)).withDuration(duration));
}

Fixed version (ground truth):
/** 
 * Press and hold the at an elements upper-left corner, offset by the given amount, until the contextmenu event has fired.
 * @param el       element to long-press.
 * @param x        x offset.
 * @param y        y offset.
 * @param duration of the long-press. Minimum time resolution unit is one millisecond.
 * @return this TouchAction, for chaining.
 * @deprecated use {@link #longPress(LongPressOptions)} instead
 */
@Deprecated public T longPress(WebElement el,int x,int y,Duration duration){
  return longPress(longPressOptions().withOffset(WebElementOption.element(el,x,y)).withDuration(duration));
}
Program: 20276
Project: 20276
Buggy source:
/** 
 * Creates a new mobile element locator. It instantiates   {@link WebElement}using @AndroidFindBy (-s), @iOSFindBy (-s) and @FindBy (-s) annotation sets
 * @param searchContext     The context to use when finding the element
 * @param by                a By locator strategy
 * @param shouldCache       is the flag that signalizes that elements whichare found once should be cached
 * @param duration          is a POJO which contains timeout parameters for the element to be searched
 * @param originalDuration  is a POJO which contains timeout parameters from page object which contains the element
 */
public AppiumElementLocator(SearchContext searchContext,By by,boolean shouldCache,TimeOutDuration duration,TimeOutDuration originalDuration){
  this.searchContext=searchContext;
  this.shouldCache=shouldCache;
  this.timeOutDuration=duration;
  this.originalTimeOutDuration=originalDuration;
  this.by=by;
  this.exceptionMessageIfElementNotFound="String_Node_Str" + by.toString();
}

Fixed version (ground truth):
/** 
 * Creates a new mobile element locator. It instantiates   {@link WebElement}using @AndroidFindBy (-s), @iOSFindBy (-s) and @FindBy (-s) annotation sets
 * @param searchContext     The context to use when finding the element
 * @param by                a By locator strategy
 * @param shouldCache       is the flag that signalizes that elements whichare found once should be cached
 * @param duration          is a POJO which contains timeout parameters for the element to be searched
 */
public AppiumElementLocator(SearchContext searchContext,By by,boolean shouldCache,TimeOutDuration duration){
  this.searchContext=searchContext;
  this.shouldCache=shouldCache;
  this.duration=duration;
  this.by=by;
  this.exceptionMessageIfElementNotFound="String_Node_Str" + by.toString();
}
Program: 20277
Project: 20277
Buggy source:
private <T extends Object>T waitFor(Supplier<T> supplier){
  WaitingFunction<T> function=new WaitingFunction<>();
  try {
    FluentWait<Supplier<T>> wait=new FluentWait<>(supplier).ignoring(NoSuchElementException.class);
    wait.withTimeout(timeOutDuration.getTime(),timeOutDuration.getTimeUnit());
    return wait.until(function);
  }
 catch (  TimeoutException e) {
    if (function.foundStaleElementReferenceException != null) {
      throw StaleElementReferenceException.class.cast(function.foundStaleElementReferenceException);
    }
    throw e;
  }
}

Fixed version (ground truth):
private <T>T waitFor(Supplier<T> supplier){
  WaitingFunction<T> function=new WaitingFunction<>();
  try {
    FluentWait<Supplier<T>> wait=new FluentWait<>(supplier).ignoring(NoSuchElementException.class);
    wait.withTimeout(duration.getTime(),duration.getTimeUnit());
    return wait.until(function);
  }
 catch (  TimeoutException e) {
    if (function.foundStaleElementReferenceException != null) {
      throw StaleElementReferenceException.class.cast(function.foundStaleElementReferenceException);
    }
    throw e;
  }
}
Program: 20278
Project: 20278
Buggy source:
@Override public CacheableLocator createLocator(AnnotatedElement annotatedElement){
  TimeOutDuration customDuration;
  if (annotatedElement.isAnnotationPresent(WithTimeout.class)) {
    WithTimeout withTimeout=annotatedElement.getAnnotation(WithTimeout.class);
    customDuration=new TimeOutDuration(withTimeout.time(),withTimeout.unit());
  }
 else {
    customDuration=timeOutDuration;
  }
  builder.setAnnotated(annotatedElement);
  By by=builder.buildBy();
  if (by != null) {
    return new AppiumElementLocator(searchContext,by,builder.isLookupCached(),customDuration,timeOutDuration);
  }
  return null;
}

Fixed version (ground truth):
@Override public CacheableLocator createLocator(AnnotatedElement annotatedElement){
  TimeOutDuration customDuration;
  if (annotatedElement.isAnnotationPresent(WithTimeout.class)) {
    WithTimeout withTimeout=annotatedElement.getAnnotation(WithTimeout.class);
    customDuration=new TimeOutDuration(withTimeout.time(),withTimeout.unit());
  }
 else {
    customDuration=duration;
  }
  builder.setAnnotated(annotatedElement);
  By byResult=builder.buildBy();
  return ofNullable(byResult).map(by -> new AppiumElementLocator(searchContext,by,builder.isLookupCached(),customDuration)).orElse(null);
}
Program: 20279
Project: 20279
Buggy source:
/** 
 * Creates a new mobile element locator factory.
 * @param searchContext     The context to use when finding the element
 * @param timeOutDuration   is a POJO which contains timeout parameters for the element to be searched
 * @param builder           is handler of Appium-specific page object annotations
 */
public AppiumElementLocatorFactory(SearchContext searchContext,TimeOutDuration timeOutDuration,AppiumByBuilder builder){
  this.searchContext=searchContext;
  this.timeOutDuration=timeOutDuration;
  this.builder=builder;
}

Fixed version (ground truth):
/** 
 * Creates a new mobile element locator factory.
 * @param searchContext     The context to use when finding the element
 * @param duration   is a POJO which contains timeout parameters for the element to be searched
 * @param builder    is handler of Appium-specific page object annotations
 */
public AppiumElementLocatorFactory(SearchContext searchContext,TimeOutDuration duration,AppiumByBuilder builder){
  this.searchContext=searchContext;
  this.duration=duration;
  this.builder=builder;
}
Program: 20281
Project: 20281
Buggy source:
/** 
 * @return the choromedriver file which depends on platform.
 */
public static File getChromeDriver(){
  Path resultPath;
  Platform current=getCurrent();
  if (current.is(WINDOWS)) {
    resultPath=ROOT_TEST_PATH.resolve("String_Node_Str");
  }
 else   if (current.is(MAC)) {
    resultPath=ROOT_TEST_PATH.resolve("String_Node_Str");
  }
 else {
    resultPath=ROOT_TEST_PATH.resolve("String_Node_Str");
  }
  return resultPath.toFile();
}

Fixed version (ground truth):
/** 
 * @return the choromedriver file which depends on platform.
 */
public static File getChromeDriver(){
  Platform current=getCurrent();
  if (current.is(WINDOWS)) {
    return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  }
 else   if (current.is(MAC)) {
    return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  }
 else {
    return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  }
}
Program: 20282
Project: 20282
Buggy source:
@Test public void test(){
  driver.get("String_Node_Str");
  searchTextField.sendKeys("String_Node_Str");
  btnK.click();
  Assert.assertNotEquals(0,foundLinks.size());
}

Fixed version (ground truth):
@Test public void test(){
  driver.get("String_Node_Str");
  searchTextField.sendKeys("String_Node_Str");
  btnG.click();
  Assert.assertNotEquals(0,foundLinks.size());
}
Program: 20283
Project: 20283
Buggy source:
@Override public CacheableLocator createLocator(AnnotatedElement annotatedElement){
  TimeOutDuration customDuration;
  if (annotatedElement.isAnnotationPresent(WithTimeout.class)) {
    WithTimeout withTimeout=annotatedElement.getAnnotation(WithTimeout.class);
    customDuration=new TimeOutDuration(withTimeout.time(),withTimeout.unit());
  }
 else {
    customDuration=duration;
  }
  builder.setAnnotated(annotatedElement);
  By byResult=builder.buildBy();
  return ofNullable(byResult).map(by -> new AppiumElementLocator(searchContext,by,builder.isLookupCached(),customDuration)).orElse(null);
}

Fixed version (ground truth):
@Override public @Nullable CacheableLocator createLocator(AnnotatedElement annotatedElement){
  TimeOutDuration customDuration;
  if (annotatedElement.isAnnotationPresent(WithTimeout.class)) {
    WithTimeout withTimeout=annotatedElement.getAnnotation(WithTimeout.class);
    customDuration=new TimeOutDuration(withTimeout.time(),withTimeout.unit());
  }
 else {
    customDuration=duration;
  }
  builder.setAnnotated(annotatedElement);
  By byResult=builder.buildBy();
  return ofNullable(byResult).map(by -> new AppiumElementLocator(searchContext,by,builder.isLookupCached(),customDuration)).orElse(null);
}
Program: 20284
Project: 20284
Buggy source:
/** 
 * @return the choromedriver file which depends on platform.
 */
public static File getChromeDriver(){
  Platform current=getCurrent();
  if (current.is(WINDOWS)) {
    return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  }
 else   if (current.is(MAC)) {
    return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  }
 else {
    return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  }
}

Fixed version (ground truth):
/** 
 * @return the choromedriver file which depends on platform.
 */
public static File getChromeDriver(){
  Platform current=getCurrent();
  if (current.is(WINDOWS)) {
    return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  }
 else   if (current.is(MAC)) {
    return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
  }
  return ROOT_TEST_PATH.resolve("String_Node_Str").toFile();
}
Program: 20285
Project: 20285
Buggy source:
@Test public void defaultTimeOutTest(){
  assertThat(format(MESSAGE,DEFAULT_TIMEOUT,DEFAULT_TIMEUNIT),abs(getExpectedMillis(DEFAULT_TIMEOUT,DEFAULT_TIMEUNIT) - getBenchmark(() -> stubElements.size())),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF));
  timeOutDuration.setTime(15500000,MICROSECONDS);
  assertThat(format(MESSAGE,15500000,MICROSECONDS),abs(getExpectedMillis(15500000,MICROSECONDS) - getBenchmark(() -> stubElements.size())),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF));
  timeOutDuration.setTime(3,SECONDS);
  assertThat(format(MESSAGE,3,SECONDS),abs(getExpectedMillis(3,SECONDS) - getBenchmark(() -> stubElements.size())),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF));
}

Fixed version (ground truth):
@Test public void defaultTimeOutTest(){
  assertThat(format(MESSAGE,DEFAULT_TIMEOUT,DEFAULT_TIMEUNIT),getPerformanceDiff(getExpectedMillis(DEFAULT_TIMEOUT,DEFAULT_TIMEUNIT),() -> stubElements.size()),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF_MS));
  timeOutDuration.setTime(15500000,MICROSECONDS);
  assertThat(format(MESSAGE,15500000,MICROSECONDS),getPerformanceDiff(getExpectedMillis(15500000,MICROSECONDS),() -> stubElements.size()),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF_MS));
  timeOutDuration.setTime(3,SECONDS);
  assertThat(format(MESSAGE,3,SECONDS),getPerformanceDiff(getExpectedMillis(3,SECONDS),() -> stubElements.size()),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF_MS));
}
Program: 20286
Project: 20286
Buggy source:
@Test public void withCustomizedTimeOutTest(){
  assertThat(format(MESSAGE,DEFAULT_TIMEOUT,DEFAULT_TIMEUNIT),abs(getExpectedMillis(DEFAULT_TIMEOUT,DEFAULT_TIMEUNIT) - getBenchmark(() -> stubElements.size())),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF));
  assertThat(format(MESSAGE,5,SECONDS),abs(getExpectedMillis(5,SECONDS) - getBenchmark(() -> stubElements2.size())),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF));
  timeOutDuration.setTime(15500000,MICROSECONDS);
  assertThat(format(MESSAGE,15500000,MICROSECONDS),abs(getExpectedMillis(15500000,MICROSECONDS) - getBenchmark(() -> stubElements.size())),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF));
  assertThat(format(MESSAGE,5,SECONDS),abs(getExpectedMillis(5,SECONDS) - getBenchmark(() -> stubElements2.size())),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF));
}

Fixed version (ground truth):
@Test public void withCustomizedTimeOutTest(){
  assertThat(format(MESSAGE,DEFAULT_TIMEOUT,DEFAULT_TIMEUNIT),getPerformanceDiff(getExpectedMillis(DEFAULT_TIMEOUT,DEFAULT_TIMEUNIT),() -> stubElements.size()),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF_MS));
  assertThat(format(MESSAGE,5,SECONDS),getPerformanceDiff(getExpectedMillis(5,SECONDS),() -> stubElements2.size()),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF_MS));
  timeOutDuration.setTime(15500000,MICROSECONDS);
  assertThat(format(MESSAGE,15500000,MICROSECONDS),getPerformanceDiff(getExpectedMillis(15500000,MICROSECONDS),() -> stubElements.size()),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF_MS));
  assertThat(format(MESSAGE,5,SECONDS),getPerformanceDiff(getExpectedMillis(5,SECONDS),() -> stubElements2.size()),lessThanOrEqualTo(ACCEPTABLE_TIME_DIFF_MS));
}
Program: 20287
Project: 20287
Buggy source:
default String getPlatformName(){
  Object platformName=ofNullable(getSessionDetail("String_Node_Str")).orElseGet(() -> getSessionDetail("String_Node_Str"));
  return ofNullable(platformName).map(Object::toString).orElse(null);
}

Fixed version (ground truth):
/** 
 * @return name of the current mobile platform.
 */
default String getPlatformName(){
  Object platformName=ofNullable(getSessionDetail("String_Node_Str")).orElseGet(() -> getSessionDetail("String_Node_Str"));
  return ofNullable(platformName).map(Object::toString).orElse(null);
}
Program: 20288
Project: 20288
Buggy source:
default String getAutomationName(){
  return ofNullable(getSessionDetail("String_Node_Str")).map(Object::toString).orElse(null);
}

Fixed version (ground truth):
/** 
 * @return current automation name.
 */
default String getAutomationName(){
  return ofNullable(getSessionDetail("String_Node_Str")).map(Object::toString).orElse(null);
}
Program: 20289
Project: 20289
Buggy source:
public static <Ex extends Throwable>Matcher<IThrowingRunnable<Ex>> failsWith(final Class<Ex> throwableType,final Matcher<? super Ex> throwableMatcher){
  return new FailsWithMatcher<>(allOf(instanceOf(throwableType),throwableMatcher));
}

Fixed version (ground truth):
public static <E extends Throwable>Matcher<IThrowingRunnable<E>> failsWith(final Class<E> throwableType,final Matcher<? super E> throwableMatcher){
  return new FailsWithMatcher<>(allOf(instanceOf(throwableType),throwableMatcher));
}
Program: 20290
Project: 20290
Buggy source:
@Override protected boolean matchesSafely(final IThrowingRunnable<Ex> runnable){
  try {
    runnable.run();
    return false;
  }
 catch (  final Throwable ex) {
    return matcher.matches(ex);
  }
}

Fixed version (ground truth):
@Override protected boolean matchesSafely(final IThrowingRunnable<E> runnable){
  try {
    runnable.run();
    return false;
  }
 catch (  final Throwable ex) {
    return matcher.matches(ex);
  }
}
Program: 20291
Project: 20291
Buggy source:
private FailsWithMatcher(final Matcher<? super Ex> matcher){
  this.matcher=matcher;
}

Fixed version (ground truth):
private FailsWithMatcher(final Matcher<? super E> matcher){
  this.matcher=matcher;
}
Program: 20292
Project: 20292
Buggy source:
@Test public void moveToOptionsShouldBuildProperly() throws Exception {
  final Map<String,Object> actualOpts=new MoveToOptions().withElement(dummyElement).withRelativeOffset(-1,-1).build();
  final Map<String,Object> expectedOpts=new HashMap<>();
  expectedOpts.put("String_Node_Str",((HasIdentity)dummyElement).getId());
  expectedOpts.put("String_Node_Str",-1);
  expectedOpts.put("String_Node_Str",-1);
  assertThat(actualOpts.entrySet(),everyItem(isIn(expectedOpts.entrySet())));
  assertThat(expectedOpts.entrySet(),everyItem(isIn(actualOpts.entrySet())));
}

Fixed version (ground truth):
@Test public void moveToOptionsShouldBuildProperly() throws Exception {
  final Map<String,Object> actualOpts=new MoveToOptions().withElement(DUMMY_ELEMENT).withRelativeOffset(-1,-1).build();
  final Map<String,Object> expectedOpts=new HashMap<>();
  expectedOpts.put("String_Node_Str",((HasIdentity)DUMMY_ELEMENT).getId());
  expectedOpts.put("String_Node_Str",-1);
  expectedOpts.put("String_Node_Str",-1);
  assertThat(actualOpts.entrySet(),everyItem(isIn(expectedOpts.entrySet())));
  assertThat(expectedOpts.entrySet(),everyItem(isIn(actualOpts.entrySet())));
}
Program: 20293
Project: 20293
Buggy source:
@Test public void invalidRelativePositionOptionsShouldFailOnBuild() throws Exception {
  final List<ActionOptions> invalidOptions=new ArrayList<>();
  invalidOptions.add(new MoveToOptions());
  invalidOptions.forEach(opts -> assertThat(opts::build,failsWith(IllegalArgumentException.class)));
}

Fixed version (ground truth):
@Test public void invalidRelativePositionOptionsShouldFailOnBuild() throws Exception {
  final List<ActionOptions> invalidOptions=new ArrayList<>();
  invalidOptions.add(new MoveToOptions());
  for (  ActionOptions opts : invalidOptions) {
    assertThat(opts::build,failsWith(IllegalArgumentException.class));
  }
}
Program: 20294
Project: 20294
Buggy source:
@Test public void pressOptionsShouldBuildProperly() throws Exception {
  final Map<String,Object> actualOpts=new PressOptions().withElement(dummyElement).build();
  final Map<String,Object> expectedOpts=new HashMap<>();
  expectedOpts.put("String_Node_Str",((HasIdentity)dummyElement).getId());
  assertThat(actualOpts.entrySet(),everyItem(isIn(expectedOpts.entrySet())));
  assertThat(expectedOpts.entrySet(),everyItem(isIn(actualOpts.entrySet())));
}

Fixed version (ground truth):
@Test public void pressOptionsShouldBuildProperly() throws Exception {
  final Map<String,Object> actualOpts=new PressOptions().withElement(DUMMY_ELEMENT).build();
  final Map<String,Object> expectedOpts=new HashMap<>();
  expectedOpts.put("String_Node_Str",((HasIdentity)DUMMY_ELEMENT).getId());
  assertThat(actualOpts.entrySet(),everyItem(isIn(expectedOpts.entrySet())));
  assertThat(expectedOpts.entrySet(),everyItem(isIn(actualOpts.entrySet())));
}
Program: 20295
Project: 20295
Buggy source:
@Test public void invalidAbsolutePositionOptionsShouldFailOnBuild() throws Exception {
  final List<ActionOptions> invalidOptions=new ArrayList<>();
  invalidOptions.add(new PressOptions().withElement(dummyElement).withAbsoluteOffset(0,0));
  invalidOptions.add(new LongPressOptions().withRelativeOffset(0,0));
  invalidOptions.add(new TapOptions());
  invalidOptions.add(new TapOptions().withAbsoluteOffset(0,0).withRelativeOffset(0,0));
  invalidOptions.forEach(opts -> assertThat(opts::build,failsWith(IllegalArgumentException.class)));
}

Fixed version (ground truth):
@Test public void invalidAbsolutePositionOptionsShouldFailOnBuild() throws Exception {
  final List<ActionOptions> invalidOptions=new ArrayList<>();
  invalidOptions.add(new PressOptions().withElement(DUMMY_ELEMENT).withAbsoluteOffset(0,0));
  invalidOptions.add(new LongPressOptions().withRelativeOffset(0,0));
  invalidOptions.add(new TapOptions());
  invalidOptions.add(new TapOptions().withAbsoluteOffset(0,0).withRelativeOffset(0,0));
  for (  ActionOptions opts : invalidOptions) {
    assertThat(opts::build,failsWith(IllegalArgumentException.class));
  }
}
Program: 20296
Project: 20296
Buggy source:
@Test public void longPressOptionsShouldBuildProperly() throws Exception {
  final Map<String,Object> actualOpts=new LongPressOptions().withElement(dummyElement).withRelativeOffset(0,0).withDuration(Duration.ofMillis(1)).build();
  final Map<String,Object> expectedOpts=new HashMap<>();
  expectedOpts.put("String_Node_Str",((HasIdentity)dummyElement).getId());
  expectedOpts.put("String_Node_Str",0);
  expectedOpts.put("String_Node_Str",0);
  expectedOpts.put("String_Node_Str",1L);
  assertThat(actualOpts.entrySet(),everyItem(isIn(expectedOpts.entrySet())));
  assertThat(expectedOpts.entrySet(),everyItem(isIn(actualOpts.entrySet())));
}

Fixed version (ground truth):
@Test public void longPressOptionsShouldBuildProperly() throws Exception {
  final Map<String,Object> actualOpts=new LongPressOptions().withElement(DUMMY_ELEMENT).withRelativeOffset(0,0).withDuration(Duration.ofMillis(1)).build();
  final Map<String,Object> expectedOpts=new HashMap<>();
  expectedOpts.put("String_Node_Str",((HasIdentity)DUMMY_ELEMENT).getId());
  expectedOpts.put("String_Node_Str",0);
  expectedOpts.put("String_Node_Str",0);
  expectedOpts.put("String_Node_Str",1L);
  assertThat(actualOpts.entrySet(),everyItem(isIn(expectedOpts.entrySet())));
  assertThat(expectedOpts.entrySet(),everyItem(isIn(actualOpts.entrySet())));
}
Program: 20297
Project: 20297
Buggy source:
/** 
 * @param bys is a set of {@link org.openqa.selenium.By} which forms the all possible searching.
 */
public ByAll(By[] bys){
  super(bys);
  checkNotNull(bys);
  this.bys=Arrays.asList(bys);
  checkArgument(this.bys.isEmpty(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param bys is a set of {@link org.openqa.selenium.By} which forms the all possible searching.
 */
public ByAll(By[] bys){
  super(bys);
  checkNotNull(bys);
  this.bys=Arrays.asList(bys);
  checkArgument(!this.bys.isEmpty(),"String_Node_Str");
}
Program: 20298
Project: 20298
Buggy source:
public AppiumCommandInfo(String url,HttpMethod method){
  super(url,method);
  this.url=url;
  this.method=method;
}

Fixed version (ground truth):
/** 
 * It conntains method and URL of the command.
 * @param url command URL
 * @param method is http-method
 */
public AppiumCommandInfo(String url,HttpMethod method){
  super(url,method);
  this.url=url;
  this.method=method;
}
Program: 20299
Project: 20299
Buggy source:
/** 
 * @return is focus on browser or on native content.
 */
default boolean isBrowser(){
  Object browserName=getSessionDetail("String_Node_Str");
  return ofNullable(browserName != null ? String.valueOf(browserName) : null).orElse(null) != null;
}

Fixed version (ground truth):
/** 
 * @return is focus on browser or on native content.
 */
default boolean isBrowser(){
  Object browserName=getSessionDetail("String_Node_Str");
  return browserName != null && !isBlank(String.valueOf(browserName));
}
Program: 20300
Project: 20300
Buggy source:
@Override public WebDriver context(String name){
  checkNotNull(name,"String_Node_Str");
  execute(DriverCommand.SWITCH_TO_CONTEXT,ImmutableMap.of("String_Node_Str",name));
  return this;
}

Fixed version (ground truth):
@Override public WebDriver context(String name){
  checkNotNull(name,"String_Node_Str");
  execute(DriverCommand.SWITCH_TO_CONTEXT,ImmutableMap.of("String_Node_Str",name));
  currentContext=name;
  return this;
}
Program: 20302
Project: 20302
Buggy source:
default boolean isBrowser(){
  Object browserName=getSessionDetail("String_Node_Str");
  return ofNullable(browserName != null ? String.valueOf(browserName) : null).orElse(null) != null;
}

Fixed version (ground truth):
/** 
 * @return is focus on browser or on native content.
 */
default boolean isBrowser(){
  Object browserName=getSessionDetail("String_Node_Str");
  return ofNullable(browserName != null ? String.valueOf(browserName) : null).orElse(null) != null;
}
Program: 20303
Project: 20303
Buggy source:
protected boolean check(Supplier<DesiredCapabilities> serverCapabilitiesSupplier,Supplier<Capabilities> clientCapabilitiesSupplier,BiPredicate<By,Class<? extends WebElement>> filter,By by,Class<? extends WebElement> clazz){
  AppiumServiceBuilder builder=new AppiumServiceBuilder().withCapabilities(serverCapabilitiesSupplier.get());
  driver=new AppiumDriver<>(builder,clientCapabilitiesSupplier.get());
  ;
  return filter.test(by,clazz);
}

Fixed version (ground truth):
protected boolean check(Supplier<DesiredCapabilities> serverCapabilitiesSupplier,Supplier<Capabilities> clientCapabilitiesSupplier,BiPredicate<By,Class<? extends WebElement>> filter,By by,Class<? extends WebElement> clazz){
  AppiumServiceBuilder builder=new AppiumServiceBuilder().withCapabilities(serverCapabilitiesSupplier.get());
  driver=new AppiumDriver<>(builder,clientCapabilitiesSupplier.get());
  return filter.test(by,clazz);
}
Program: 20304
Project: 20304
Buggy source:
@Test public void swipeTest(){
  MobileElement slider=driver.findElementByClassName("String_Node_Str");
  Dimension size=slider.getSize();
  TouchAction swipe=new TouchAction(driver).press(slider,size.width / 2,size.height / 2).waitAction(2000).moveTo(slider).release();
  swipe.perform();
  assertEquals("String_Node_Str",slider.getAttribute("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void swipeTest(){
  MobileElement slider=driver.findElementByClassName("String_Node_Str");
  Dimension size=slider.getSize();
  TouchAction swipe=new TouchAction(driver).press(slider,size.width / 2 + 2,size.height / 2).waitAction(2000).moveTo(slider,1,size.height / 2).release();
  swipe.perform();
  assertEquals("String_Node_Str",slider.getAttribute("String_Node_Str"));
}
Program: 20305
Project: 20305
Buggy source:
@Test public void multiTouchTest(){
  driver.findElementById("String_Node_Str").sendKeys("String_Node_Str");
  driver.findElementById("String_Node_Str").sendKeys("String_Node_Str");
  MobileElement e=driver.findElementByAccessibilityId("String_Node_Str");
  TouchAction tap=new TouchAction(driver).tap(e).perform();
  MobileElement slider=driver.findElementByClassName("String_Node_Str");
  Dimension size=slider.getSize();
  TouchAction swipe=new TouchAction(driver).press(slider,size.width / 2,size.height / 2).waitAction(2000).moveTo(slider).release();
  new MultiTouchAction(driver).add(tap).add(swipe).perform();
  assertEquals(driver.findElementByXPath("String_Node_Str").getText(),"String_Node_Str");
  assertEquals("String_Node_Str",slider.getAttribute("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void multiTouchTest(){
  MobileElement e=driver.findElementByAccessibilityId("String_Node_Str");
  TouchAction tap1=new TouchAction(driver).tap(e);
  TouchAction tap2=new TouchAction(driver).tap(driver.findElement(MobileBy.IosUIAutomation("String_Node_Str")));
  new MultiTouchAction(driver).add(tap1).add(tap2).perform();
  WebDriverWait waiting=new WebDriverWait(driver,10000);
  assertNotNull(waiting.until(alertIsPresent()));
  driver.switchTo().alert().accept();
}
Program: 20306
Project: 20306
Buggy source:
@Test public void tapTest(){
  driver.findElementById("String_Node_Str").sendKeys("String_Node_Str");
  driver.findElementById("String_Node_Str").sendKeys("String_Node_Str");
  MobileElement e=driver.findElementByAccessibilityId("String_Node_Str");
  new TouchAction(driver).tap(e).perform();
  assertEquals(driver.findElementByXPath("String_Node_Str").getText(),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void tapTest(){
  IOSElement intA=driver.findElementById("String_Node_Str");
  IOSElement intB=driver.findElementById("String_Node_Str");
  intA.clear();
  intB.clear();
  intA.sendKeys("String_Node_Str");
  intB.sendKeys("String_Node_Str");
  MobileElement e=driver.findElementByAccessibilityId("String_Node_Str");
  new TouchAction(driver).tap(e).perform();
  assertEquals(driver.findElementByXPath("String_Node_Str").getText(),"String_Node_Str");
}
Program: 20307
Project: 20307
Buggy source:
/** 
 * Get settings stored for this test session It's probably better to use a convenience function, rather than use this function directly. Try finding the method for the specific setting you want to read.
 * @return JsonObject, a straight-up hash of settings.
 */
default JsonObject getSettings(){
  Map.Entry<String,Map<String,?>> keyValuePair=getSettingsCommand();
  Response response=execute(keyValuePair.getKey(),keyValuePair.getValue());
  JsonParser parser=new JsonParser();
  return (JsonObject)parser.parse(response.getValue().toString());
}

Fixed version (ground truth):
/** 
 * Get settings stored for this test session It's probably better to use a convenience function, rather than use this function directly. Try finding the method for the specific setting you want to read.
 * @return JsonObject, a straight-up hash of settings.
 */
@SuppressAjWarnings("String_Node_Str") default Map<String,Object> getSettings(){
  Map.Entry<String,Map<String,?>> keyValuePair=getSettingsCommand();
  Response response=execute(keyValuePair.getKey(),keyValuePair.getValue());
  return (Map<String,Object>)response.getValue();
}
Program: 20308
Project: 20308
Buggy source:
protected MobileElement newMobileElement(){
  Class<? extends MobileElement> target=mobileElementMap.get(automation);
  if (target == null) {
    target=mobileElementMap.get(platform);
  }
  if (target == null) {
    throw new RuntimeException(new ClassNotFoundException("String_Node_Str" + "String_Node_Str"));
  }
  try {
    Constructor<? extends MobileElement> constructor=target.getDeclaredConstructor();
    constructor.setAccessible(true);
    MobileElement result=constructor.newInstance();
    result.setParent(driver);
    return result;
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
protected MobileElement newMobileElement(){
  Class<? extends MobileElement> target=mobileElementMap.get(automation);
  if (target == null) {
    target=mobileElementMap.get(platform);
  }
  if (target == null) {
    throw new WebDriverException(new ClassNotFoundException("String_Node_Str" + "String_Node_Str"));
  }
  try {
    Constructor<? extends MobileElement> constructor=target.getDeclaredConstructor();
    constructor.setAccessible(true);
    MobileElement result=constructor.newInstance();
    result.setParent(driver);
    return result;
  }
 catch (  Exception e) {
    throw new WebDriverException(e);
  }
}
Program: 20309
Project: 20309
Buggy source:
@Test public void openNotification() throws Exception {
  driver.closeApp();
  driver.openNotifications();
  WebDriverWait wait=new WebDriverWait(driver,20000);
  assertNotEquals(0,wait.until(new Function<WebDriver,List<AndroidElement>>(){
    @Override public List<AndroidElement> apply(    WebDriver input){
      List<AndroidElement> result=driver.findElementsById("String_Node_Str");
      if (result.size() == 0) {
        return null;
      }
      return result;
    }
  }
).size());
}

Fixed version (ground truth):
@Test public void openNotification() throws Exception {
  driver.closeApp();
  driver.openNotifications();
  WebDriverWait wait=new WebDriverWait(driver,20);
  assertNotEquals(0,wait.until(new Function<WebDriver,List<AndroidElement>>(){
    @Override public List<AndroidElement> apply(    WebDriver input){
      List<AndroidElement> result=driver.findElementsById("String_Node_Str");
      if (result.size() == 0) {
        return null;
      }
      return result;
    }
  }
).size());
}
Program: 20310
Project: 20310
Buggy source:
@Test public void ignoreUnimportantViewsTest(){
  driver.ignoreUnimportantViews(true);
  boolean ignoreViews=driver.getSettings().get(Setting.IGNORE_UNIMPORTANT_VIEWS.toString()).getAsBoolean();
  assertTrue(ignoreViews);
  driver.ignoreUnimportantViews(false);
  ignoreViews=driver.getSettings().get(Setting.IGNORE_UNIMPORTANT_VIEWS.toString()).getAsBoolean();
  assertFalse(ignoreViews);
}

Fixed version (ground truth):
@Test public void ignoreUnimportantViewsTest(){
  driver.ignoreUnimportantViews(true);
  assertEquals(true,driver.getSettings().get(Setting.IGNORE_UNIMPORTANT_VIEWS.toString()));
  driver.ignoreUnimportantViews(false);
  assertEquals(false,driver.getSettings().get(Setting.IGNORE_UNIMPORTANT_VIEWS.toString()));
}
Program: 20311
Project: 20311
Buggy source:
private void assertJSONElementContains(Setting setting,int value){
  assertEquals(driver.getSettings().get(setting.toString()).getAsInt(),value);
}

Fixed version (ground truth):
private void assertJSONElementContains(Setting setting,long value){
  assertEquals(driver.getSettings().get(setting.toString()),value);
}
Program: 20312
Project: 20312
Buggy source:
/** 
 * initialization.
 */
@BeforeClass public static void beforeClass() throws Exception {
  service=AppiumDriverLocalService.buildDefaultService();
  service.start();
  if (service == null || !service.isRunning()) {
    throw new RuntimeException("String_Node_Str");
  }
  File appDir=new File("String_Node_Str");
  File app=new File(appDir,"String_Node_Str");
  DesiredCapabilities capabilities=new DesiredCapabilities();
  capabilities.setCapability(MobileCapabilityType.BROWSER_NAME,"String_Node_Str");
  capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.IOS);
  capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,"String_Node_Str");
  capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"String_Node_Str");
  capabilities.setCapability(IOSMobileCapabilityType.LAUNCH_TIMEOUT,500000);
  capabilities.setCapability(MobileCapabilityType.APP,app.getAbsolutePath());
  driver=new AppiumDriver<>(service.getUrl(),capabilities);
}

Fixed version (ground truth):
/** 
 * initialization.
 */
@BeforeClass public static void beforeClass() throws Exception {
  service=AppiumDriverLocalService.buildDefaultService();
  service.start();
  if (service == null || !service.isRunning()) {
    throw new AppiumServerHasNotBeenStartedLocallyException("String_Node_Str");
  }
  File appDir=new File("String_Node_Str");
  File app=new File(appDir,"String_Node_Str");
  DesiredCapabilities capabilities=new DesiredCapabilities();
  capabilities.setCapability(MobileCapabilityType.BROWSER_NAME,"String_Node_Str");
  capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.IOS);
  capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,"String_Node_Str");
  capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"String_Node_Str");
  capabilities.setCapability(IOSMobileCapabilityType.LAUNCH_TIMEOUT,500000);
  capabilities.setCapability(MobileCapabilityType.APP,app.getAbsolutePath());
  driver=new AppiumDriver<>(service.getUrl(),capabilities);
}
Program: 20313
Project: 20313
Buggy source:
/** 
 * @throws {@link org.openqa.selenium.WebDriverException} This method is notapplicable with browser/webview UI.
 * @throws {@link org.openqa.selenium.NoSuchElementException} when no one element is found
 */
default T findElementByAccessibilityId(String using){
  return findElement(MobileSelector.ACCESSIBILITY.toString(),using);
}

Fixed version (ground truth):
/** 
 * @throws WebDriverException This method is not applicable with browser/webview UI.
 * @throws NoSuchElementException when no one element is found
 */
default T findElementByAccessibilityId(String using){
  return findElement(MobileSelector.ACCESSIBILITY.toString(),using);
}
Program: 20314
Project: 20314
Buggy source:
/** 
 * @throws {@link org.openqa.selenium.WebDriverException} This method is notapplicable with browser/webview UI.
 */
default List<T> findElementsByAccessibilityId(String using){
  return findElements(MobileSelector.ACCESSIBILITY.toString(),using);
}

Fixed version (ground truth):
/** 
 * @throws WebDriverException This method is not applicable with browser/webview UI.
 */
default List<T> findElementsByAccessibilityId(String using){
  return findElements(MobileSelector.ACCESSIBILITY.toString(),using);
}
Program: 20315
Project: 20315
Buggy source:
/** 
 * @throws {@link org.openqa.selenium.WebDriverException} This method is notapplicable with browser/webview UI.
 */
default List<T> findElementsByAndroidUIAutomator(String using){
  return findElements(MobileSelector.ANDROID_UI_AUTOMATOR.toString(),using);
}

Fixed version (ground truth):
/** 
 * @throws WebDriverException This method is not applicable with browser/webview UI.
 */
default List<T> findElementsByAndroidUIAutomator(String using){
  return findElements(MobileSelector.ANDROID_UI_AUTOMATOR.toString(),using);
}
Program: 20316
Project: 20316
Buggy source:
/** 
 * @throws {@link org.openqa.selenium.WebDriverException} This method is notapplicable with browser/webview UI.
 * @throws {@link org.openqa.selenium.NoSuchElementException} when no one element is found
 */
default T findElementByAndroidUIAutomator(String using){
  return findElement(MobileSelector.ANDROID_UI_AUTOMATOR.toString(),using);
}

Fixed version (ground truth):
/** 
 * @throws WebDriverException This method is not applicable with browser/webview UI.
 * @throws NoSuchElementException when no one element is found
 */
default T findElementByAndroidUIAutomator(String using){
  return findElement(MobileSelector.ANDROID_UI_AUTOMATOR.toString(),using);
}
Program: 20317
Project: 20317
Buggy source:
/** 
 * @throws {@link org.openqa.selenium.WebDriverException}This method is not applicable with browser/webview UI.
 * @throws {@link org.openqa.selenium.NoSuchElementException} when no one element is found
 */
default T findElementByIosUIAutomation(String using){
  return findElement(MobileSelector.IOS_UI_AUTOMATION.toString(),using);
}

Fixed version (ground truth):
/** 
 * @throws WebDriverException This method is not applicable with browser/webview UI.
 * @throws NoSuchElementException when no one element is found
 */
default T findElementByIosUIAutomation(String using){
  return findElement(MobileSelector.IOS_UI_AUTOMATION.toString(),using);
}
Program: 20318
Project: 20318
Buggy source:
/** 
 * @throws {@link org.openqa.selenium.WebDriverException}This method is not applicable with browser/webview UI.
 */
default List<T> findElementsByIosUIAutomation(String using){
  return findElements(MobileSelector.IOS_UI_AUTOMATION.toString(),using);
}

Fixed version (ground truth):
/** 
 * @throws WebDriverException This method is not applicable with browser/webview UI.
 */
default List<T> findElementsByIosUIAutomation(String using){
  return findElements(MobileSelector.IOS_UI_AUTOMATION.toString(),using);
}