auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private String getTopListFeed(OkHttpClient client, String country, int limit) throws IOException { String url = "<LINK_0>"+limit+"/explicit=true/json"; <START> Log.d(LOG, "Feed URL "+String.format(url, country)); <END> Request.Builder httpReq = new Request.Builder() .header("User-Agent", ClientConfig.USER_AGENT) .url(String.format(url, country)); try (Response response = client.newCall(httpReq.build()).execute()) { if (response.isSuccessful()) { return response.body().string(); } String prefix = context.getString(R.string.error_msg_prefix); throw new IOException(prefix + response); } }</code><technical_language>Please add spaces next + sign</technical_language>

Target:
private String getTopListFeed(OkHttpClient client, String country, int limit) throws IOException { String url = "<LINK_0>"+limit+"/explicit=true/json"; Log.d(TAG, "Feed URL " + String.format(url, country)); Request.Builder httpReq = new Request.Builder() .header("User-Agent", ClientConfig.USER_AGENT) .url(String.format(url, country)); try (Response response = client.newCall(httpReq.build()).execute()) { if (response.isSuccessful()) { return response.body().string(); } String prefix = context.getString(R.string.error_msg_prefix); throw new IOException(prefix + response); } }
Source:
<code>private void createParameterNameRow(Composite parent, IWidgetValueProperty textProp) { { <START> Label l = new Label(parent, SWT.NONE); <END> l.setText( Messages.ParameterEditor_Name); l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); Text t = new Text(parent, SWT.BORDER); GridData gd = new GridData(GridData.FILL_HORIZONTAL); t.setLayoutData(gd); TextPasteHandler.createFor(t); IEMFEditValueProperty modelProp = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.PARAMETER__NAME); context.bindValue(textProp.observeDelayed(200, t), modelProp.observeDetail(getMaster())); } Button chooseParameterButton = new Button(parent, SWT.PUSH | SWT.FLAT); chooseParameterButton.setText(Messages.ModelTooling_Common_FindEllipsis); chooseParameterButton.setImage(createImage(ResourceProvider.IMG_Obj16_zoom)); chooseParameterButton.addSelectionListener(new ChooseParameterButtonSelectionListener()); chooseParameterButton.setLayoutData(new GridData()); }</code><technical_language>Do letter variables</technical_language>

Target:
private void createParameterNameRow(Composite parent, IWidgetValueProperty textProp) { { Label commandParameterIdLabel = new Label(parent, SWT.NONE); commandParameterIdLabel.setText(Messages.ParameterEditor_Command_Parameter_ID); commandParameterIdLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); Text commandParameterIdValue = new Text(parent, SWT.BORDER); GridData gd = new GridData(GridData.FILL_HORIZONTAL); commandParameterIdValue.setLayoutData(gd); TextPasteHandler.createFor(commandParameterIdValue); IEMFEditValueProperty modelProp = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.PARAMETER__NAME); context.bindValue(textProp.observeDelayed(200, commandParameterIdValue), modelProp.observeDetail(getMaster())); } Button chooseParameterButton = new Button(parent, SWT.PUSH | SWT.FLAT); chooseParameterButton.setText(Messages.ModelTooling_Common_FindEllipsis); chooseParameterButton.setImage(createImage(ResourceProvider.IMG_Obj16_zoom)); chooseParameterButton.addSelectionListener(new ChooseParameterButtonSelectionListener()); chooseParameterButton.setLayoutData(new GridData()); }
Source:
<code><START> public LogicalPlan load(final String queryId){ <END> final File storedPlanFile = new File(planFolderPath + queryId + ".plan"); try { final DataFileReader<LogicalPlan> dataFileReader = new DataFileReader<LogicalPlan>(storedPlanFile, datumReader); LogicalPlan plan = null; plan = dataFileReader.next(plan); return plan; } catch (final IOException e) { e.printStackTrace(); return null; } }</code><technical_language>throws IOException</technical_language>

Target:
public LogicalPlan load(final String queryId) throws IOException { final File storedPlanFile = new File(planStorePath, queryId + ".plan"); final DataFileReader<LogicalPlan> dataFileReader = new DataFileReader<LogicalPlan>(storedPlanFile, datumReader); LogicalPlan plan = null; plan = dataFileReader.next(plan); return plan; }
Source:
<code><START> private OvfDataUpdater(){ <END> ovfManager = new OvfManager(); proccessedIdsInfo = new LinkedList<Guid>(); proccessedOvfGenerationsInfo = new LinkedList<Long>(); }</code><technical_language>missing space () {</technical_language>

Target:
private OvfDataUpdater() { ovfManager = new OvfManager(); }
Source:
<code>private void onNext() { if (mClientCertificateCheckBox.isChecked()) { onManualSetup(); return; } final String email = mEmailView.getText().toString(); String[] emailParts = splitEmail(email); String domain = emailParts[1]; mProvider = findProviderForDomain(domain); if (mProvider == null) { <START> new AccountDiscovery().discover(email, new Function1<AccountDiscovery.DiscoveredSettings, Unit>() { <END> @Override public Unit invoke(AccountDiscovery.DiscoveredSettings settings) { if (settings == null) { onManualSetup(); } else { onSetupWithSettings(email, mPasswordView.getText().toString(), settings.getIncoming(), settings.getOutgoing()); } return null; } }); return; } if (mProvider.note != null) { showDialog(DIALOG_NOTE); } else { finishAutoSetup(); } }</code><technical_language>find invoking a constructor static factory method a class, proper dependency injection principles. lots of code this. try do new code</technical_language>

Target:
private void onNext() { if (mClientCertificateCheckBox.isChecked()) { onManualSetup(); return; } final String email = mEmailView.getText().toString(); new AutoDiscoveryTask().execute(email); }
Source:
<code>public void incompatibleLockFile() throws IOException { File lockFile = new File(realmConfig.getPath() + ".lock"); assertTrue(lockFile.exists()); FileOutputStream fooStream = new FileOutputStream(lockFile, false); fooStream.write("Boom".getBytes()); fooStream.close(); try { DynamicRealm.getInstance(realm.getConfiguration()); fail(); <START> } catch (RealmError e) { <END> assertTrue(e.getMessage().contains("Info size doesn't match")); } finally { lockFile.delete(); } }</code><technical_language>e -> expected</technical_language>

Target:
public void incompatibleLockFile() throws IOException { File lockFile = new File(realmConfig.getPath() + ".lock"); assertTrue(lockFile.exists()); FileOutputStream fooStream = new FileOutputStream(lockFile, false); fooStream.write("Boom".getBytes()); fooStream.close(); try { DynamicRealm.getInstance(realm.getConfiguration()); fail(); } catch (RealmError expected) { assertTrue(expected.getMessage().contains("Info size doesn't match")); } finally { lockFile.delete(); } }
Source:
<code>public void clientReset_manualTriggerAllowSessionToRestart() { SyncUser user = createTestUser(); String url = "realm://objectserver.realm.io/~/myrealm"; final AtomicReference<SyncConfiguration> configRef = new AtomicReference<>(null); final SyncConfiguration config = configFactory.createSyncConfigurationBuilder(user , url) .errorHandler(new SyncSession.ErrorHandler() { @Override public void onError(SyncSession session, ObjectServerError error) { final ClientResetRequiredError handler = (ClientResetRequiredError) error; looperThread.closeTestRealms(); handler.executeClientReset(); <START> assertFalse(handler.getOriginalFile().exists()); <END> assertTrue(handler.getBackupFile().exists()); looperThread.postRunnable(new Runnable() { @Override public void run() { SyncConfiguration config = configRef.get(); Realm instance = Realm.getInstance(config); looperThread.addTestRealm(instance); try { SyncManager.getSession(config).downloadAllServerChanges(); looperThread.testComplete(); } catch (InterruptedException e) { fail(e.toString()); } } }); } }) .build(); configRef.set(config); Realm realm = Realm.getInstance(config); looperThread.addTestRealm(realm); SyncManager.simulateClientReset(SyncManager.getSession(config)); }</code><technical_language>include asserts in Runnable, otherwise, log assertion failure, calling looperThread.testComplete();</technical_language>

Target:
public void clientReset_manualTriggerAllowSessionToRestart() { SyncUser user = createTestUser(); String url = "realm://objectserver.realm.io/~/myrealm"; final AtomicReference<SyncConfiguration> configRef = new AtomicReference<>(null); final SyncConfiguration config = configFactory.createSyncConfigurationBuilder(user , url) .errorHandler(new SyncSession.ErrorHandler() { @Override public void onError(SyncSession session, ObjectServerError error) { final ClientResetRequiredError handler = (ClientResetRequiredError) error; looperThread.closeTestRealms(); handler.executeClientReset(); looperThread.postRunnable(new Runnable() { @Override public void run() { assertFalse(handler.getOriginalFile().exists()); assertTrue(handler.getBackupFile().exists()); SyncConfiguration config = configRef.get(); Realm instance = Realm.getInstance(config); looperThread.addTestRealm(instance); try { SyncManager.getSession(config).downloadAllServerChanges(); looperThread.testComplete(); } catch (InterruptedException e) { fail(e.toString()); } } }); } }) .build(); configRef.set(config); Realm realm = Realm.getInstance(config); looperThread.addTestRealm(realm); SyncManager.simulateClientReset(SyncManager.getSession(config)); }
Source:
<code>private static boolean getReadPermission(int permission) { <START> return permission / 4 % 2 == 1; <END> }</code><technical_language>bit-operators test for bits in permission bitmask :) Executable is 0b001 = 1 Writable is 0b010 = 2 Readable is 0b100 = 4 replace this with: java return permission & 4;</technical_language>

Target:
private static boolean getReadPermission(int permission) { return (permission & 4) == 4; }
Source:
<code>private void checkIdentifier(IdentifierTree identifier) { <START> if (identifier.symbol().enclosingClass() != null <END> && identifier.symbol().enclosingClass().type().is("java.lang.System") && identifier.symbolType().is("java.io.InputStream") && identifier.name().equals("in") && !isClosingStream(identifier.parent())) { reportIssue(identifier); } }</code><technical_language>I store enclosingClass in a variable, recompute twice</technical_language>

Target:
private void checkIdentifier(IdentifierTree identifier) { Symbol.TypeSymbol enclosingClass = identifier.symbol().enclosingClass(); if (enclosingClass != null && enclosingClass.type().is("java.lang.System") && identifier.symbolType().is("java.io.InputStream") && identifier.name().equals("in") && !isClosingStream(identifier.parent())) { reportIssue(identifier); } }
Source:
<code><START> public boolean isTap() { <END> return this.isTap; }</code><technical_language>tapSource != null</technical_language>

Target:
public boolean isTap() { return this.tapSource != null; }
Source:
<code>private final Object createValue() { if (getType() == BOOLEAN) { return random.nextBoolean(); } if (getType() == BIGINT) { return random.nextLong(); } if (getType() == INTEGER) { return random.nextInt(); } if (getType() == SMALLINT) { return (short) random.nextInt(); } if (getType() == TINYINT) { return (byte) random.nextInt(); } if (getType() == DATE) { return new SqlDate(random.nextInt()); } if (getType() == TIMESTAMP) { return new SqlTimestamp(random.nextLong(), TimeZoneKey.UTC_KEY); } if (getType() == REAL) { return random.nextFloat(); } if (getType() == DOUBLE) { return random.nextDouble(); } if (getType() instanceof DecimalType) { if (Decimals.isShortDecimal(getType())) { return new SqlDecimal(BigInteger.valueOf(random.nextLong() % 10_000_000_000L), SHORT_DECIMAL_TYPE.getPrecision(), SHORT_DECIMAL_TYPE.getScale()); } else { return new SqlDecimal(BigInteger.valueOf(random.nextLong() % 10_000_000_000L), LONG_DECIMAL_TYPE.getPrecision(), LONG_DECIMAL_TYPE.getScale()); } } if (getType() == VARCHAR) { <START> if (typeSignature.equals("varchar_dictionary")) { <END> return Strings.repeat("0", MAX_STRING); } return randomAsciiString(random); } throw new UnsupportedOperationException("Unsupported type: " + getType()); }</code><technical_language>rename MAX_STRING MAX_STRING_LENGTH for clarity - change randomAsciiString maxLength parameter - randomAsciiString method private - of MAX_STRING_LENGTH in batch benchmark, e.g. 10 if (getType() == VARCHAR) { if (typeSignature.equals("varchar_dictionary")) { return Strings.repeat("0", MAX_STRING_LENGTH); } return randomAsciiString(random, MAX_STRING_LENGTH); } private static String randomAsciiString(Random random, int maxLength) { char[] = new char[random.nextInt(maxLength)]; for (int i = 0; i < value.length; i++) { value[i] = (char) random.nextInt(Byte.MAX_VALUE); } return new String(value); }</technical_language>

Target:
private final Object createValue() { if (getType() == BOOLEAN) { return random.nextBoolean(); } if (getType() == BIGINT) { return random.nextLong(); } if (getType() == INTEGER) { return random.nextInt(); } if (getType() == SMALLINT) { return (short) random.nextInt(); } if (getType() == TINYINT) { return (byte) random.nextInt(); } if (getType() == DATE) { return new SqlDate(random.nextInt()); } if (getType() == TIMESTAMP) { return new SqlTimestamp(random.nextLong(), TimeZoneKey.UTC_KEY); } if (getType() == REAL) { return random.nextFloat(); } if (getType() == DOUBLE) { return random.nextDouble(); } if (getType() instanceof DecimalType) { if (Decimals.isShortDecimal(getType())) { return new SqlDecimal(BigInteger.valueOf(random.nextLong() % 10_000_000_000L), SHORT_DECIMAL_TYPE.getPrecision(), SHORT_DECIMAL_TYPE.getScale()); } else { return new SqlDecimal(BigInteger.valueOf(random.nextLong() % 10_000_000_000L), LONG_DECIMAL_TYPE.getPrecision(), LONG_DECIMAL_TYPE.getScale()); } } if (getType() == VARCHAR) { if (typeSignature.equals("varchar_dictionary")) { return Strings.repeat("0", MAX_STRING_LENGTH); } return randomAsciiString(random, MAX_STRING_LENGTH); } throw new UnsupportedOperationException("Unsupported type: " + getType()); }
Source:
<code>public void testReplicationFailure() throws Exception { Cache<?, ?> cache = cache(0); ControlledRpcManager controlledRpcManager = ControlledRpcManager.replaceRpcManager(cache); Future<Void> future = fork(() -> { controlledRpcManager.expectCommand(VersionedPrepareCommand.class).fail(); controlledRpcManager.expectCommand(RollbackCommand.class).send().receiveAll(); }); try { TransactionManager tm = cache(0).getAdvancedCache().getTransactionManager(); tm.begin(); cache(0).put("k0", "v"); Exceptions.expectException(RollbackException.class, tm::commit); } finally { future.get(30, TimeUnit.SECONDS); <START> controlledRpcManager.revertRpcManager(); <END> } }</code><technical_language>I put future.get() try block, revertRpcManager() skipped if times out. WDYT moving tx in fork() expectCommand()+future.get() in try body, other tests do way</technical_language>

Target:
public void testReplicationFailure() throws Exception { Cache<?, ?> cache = cache(0); ControlledRpcManager controlledRpcManager = ControlledRpcManager.replaceRpcManager(cache); try { Future<Void> future = fork(() -> { controlledRpcManager.expectCommand(VersionedPrepareCommand.class).fail(); controlledRpcManager.expectCommand(RollbackCommand.class).send().receiveAll(); }); TransactionManager tm = cache(0).getAdvancedCache().getTransactionManager(); tm.begin(); cache(0).put("k0", "v"); Exceptions.expectException(RollbackException.class, tm::commit); future.get(30, TimeUnit.SECONDS); } finally { controlledRpcManager.revertRpcManager(); } }
Source:
<code>private AppiumDriver getDriverSafe() { WebDriver driver = getDriver(); if (driver instanceof EventFiringWebDriver) { driver = ((EventFiringWebDriver) driver).getWrappedDriver(); <START> if (driver instanceof AppiumDriver) { <END> return (AppiumDriver) driver; } } throw new ClassCastException("Appium Driver can not be casted from the actual driver."); }</code><technical_language>if AppiumDriver<?> driver = (AppiumDriver<?>) getDriverSafe(); is sense in if (driver instanceof AppiumDriver)</technical_language>

Target:
private WebDriver getDriverSafe() { WebDriver driver = getDriver(); if (driver instanceof EventFiringWebDriver) { driver = ((EventFiringWebDriver) driver).getWrappedDriver(); } return driver; }
Source:
<code>public static ConfigParser parse() { LOGGER.entering(); <START> if (parser == null) { <END> parser = new ConfigParser(); } LOGGER.exiting(parser.toString()); return parser; }</code><technical_language>@sundaramrajendran Yes, I bug now. Thanks! This said, I ConfigParser needs a more changes. 1. call readConfigFileContents in constructor. 2. wait call readConfigFileContents invocation of parse 3. setConfigFile return ConfigParser instance more a builder. E.g. - ConfigParser.setConfigFile(file).parse().getInt(key) 4. Subsequent calls setConfigFile change static of configFile parse called</technical_language>

Target:
public static ConfigParser parse() { LOGGER.entering(); if (configuration == null) { try { readConfigFileContents(); } catch (IOException e) { throw new ConfigParserException(e); } } LOGGER.exiting(parser.toString()); return parser; }
Source:
<code>protected void dropCycle(Integer cycle) { WireStore store = queue.storeForCycle(cycle, queue.epoch(), false); if (store == null) { return; } File file = store.file(); if (file == null || !file.exists()) { return; } log.info("Deleting Chronicle file: according to retention: {}", file::getAbsolutePath, () -> retention); try { queue.release(store); if (IS_WIN) { try { Thread.sleep(1000); <START> } catch (InterruptedException ie) <END> } Files.delete(file.toPath()); queue.refreshDirectlyListing(); log.debug(file + " deleted"); } catch (IOException | SecurityException e) { log.warn("Unable to delete Chronicle file: {}, {}", file::getAbsolutePath, e::getMessage); } }</code><technical_language>} catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); }</technical_language>

Target:
protected void dropCycle(Integer cycle) { WireStore store = queue.storeForCycle(cycle, queue.epoch(), false); if (store == null) { return; } File file = store.file(); if (file == null || !file.exists()) { return; } log.info("Deleting Chronicle file: according to retention: {}", file::getAbsolutePath, () -> retention); try { queue.release(store); if (IS_WIN) { try { Thread.sleep(1000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } } Files.delete(file.toPath()); queue.refreshDirectlyListing(); log.debug(file + " deleted"); } catch (IOException | SecurityException e) { log.warn("Unable to delete Chronicle file: {}, {}", file::getAbsolutePath, e::getMessage); } }
Source:
<code>private void launchWithNoteId() { if (isFinishing() || getIntent() == null) return; if (getIntent().hasExtra(NotificationsUtils.ARG_PUSH_AUTH_TOKEN)) { Bundle extras = getIntent().getExtras(); String token = extras.getString(NotificationsUtils.ARG_PUSH_AUTH_TOKEN, ""); String title = extras.getString(NotificationsUtils.ARG_PUSH_AUTH_TITLE, ""); String message = extras.getString(NotificationsUtils.ARG_PUSH_AUTH_MESSAGE, ""); long expires = extras.getLong(NotificationsUtils.ARG_PUSH_AUTH_EXPIRES, 0); long now = System.currentTimeMillis() / 1000; if (expires > 0 && now > expires) { ToastUtils.showToast(this, R.string.push_auth_expired, ToastUtils.Duration.LONG); AnalyticsTracker.track(AnalyticsTracker.Stat.PUSH_AUTHENTICATION_EXPIRED); } else { NotificationsUtils.showPushAuthAlert(this, token, title, message); } } mViewPager.setCurrentItem(WPMainTabAdapter.TAB_NOTIFS); boolean shouldShowKeyboard = getIntent().getBooleanExtra(NotificationsListFragment.NOTE_INSTANT_REPLY_EXTRA, false); <START> if (GCMIntentService.getNotificationsMap().size() == 1) { <END> String noteId = getIntent().getStringExtra(NotificationsListFragment.NOTE_ID_EXTRA); if (!TextUtils.isEmpty(noteId)) { NotificationsListFragment.openNote(this, noteId, shouldShowKeyboard, false); } } GCMIntentService.clearNotificationsMap(); }</code><technical_language>This kinda bugged in a previous PR I want picky - I guess I feel picky :) Is avoid exposing notification map of GCMIntentService (ie: private), add methods GCMIntentService supply desired functionality? a big deal, I get a minor red flag I object exposed need be</technical_language>

Target:
private void launchWithNoteId() { if (isFinishing() || getIntent() == null) return; if (getIntent().hasExtra(NotificationsUtils.ARG_PUSH_AUTH_TOKEN)) { Bundle extras = getIntent().getExtras(); String token = extras.getString(NotificationsUtils.ARG_PUSH_AUTH_TOKEN, ""); String title = extras.getString(NotificationsUtils.ARG_PUSH_AUTH_TITLE, ""); String message = extras.getString(NotificationsUtils.ARG_PUSH_AUTH_MESSAGE, ""); long expires = extras.getLong(NotificationsUtils.ARG_PUSH_AUTH_EXPIRES, 0); long now = System.currentTimeMillis() / 1000; if (expires > 0 && now > expires) { ToastUtils.showToast(this, R.string.push_auth_expired, ToastUtils.Duration.LONG); AnalyticsTracker.track(AnalyticsTracker.Stat.PUSH_AUTHENTICATION_EXPIRED); } else { NotificationsUtils.showPushAuthAlert(this, token, title, message); } } mViewPager.setCurrentItem(WPMainTabAdapter.TAB_NOTIFS); boolean shouldShowKeyboard = getIntent().getBooleanExtra(NotificationsListFragment.NOTE_INSTANT_REPLY_EXTRA, false); if (GCMIntentService.getNotificationsCount() == 1) { String noteId = getIntent().getStringExtra(NotificationsListFragment.NOTE_ID_EXTRA); if (!TextUtils.isEmpty(noteId)) { NotificationsListFragment.openNote(this, noteId, shouldShowKeyboard, false); } } GCMIntentService.clearNotifications(); }
Source:
<code>private synchronized void addSockets(int numberOfNewSocket) { int n = numberOfNewSocket; <START> if (n > activeFactories.holder.size()) { <END> n = activeFactories.holder.size(); logger.debug("addSockets({}) restricted by the number of factories, i.e. addSockets({})", numberOfNewSocket, n); } Random rng = ThreadLocalRandom.current(); while (n > 0) { int size = activeFactories.holder.size(); if (size == 1) { ReactiveSocketClient factory = activeFactories.holder.get(0); if (factory.availability() > 0.0) { activeFactories.remove(0); pendingSockets++; factory.connect().subscribe(new SocketAdder(factory)); } break; } ReactiveSocketClient factory0 = null; ReactiveSocketClient factory1 = null; int i0 = 0; int i1 = 0; for (int i = 0; i < EFFORT; i++) { i0 = rng.nextInt(size); i1 = rng.nextInt(size - 1); if (i1 >= i0) { i1++; } factory0 = activeFactories.holder.get(i0); factory1 = activeFactories.holder.get(i1); if (factory0.availability() > 0.0 && factory1.availability() > 0.0) { break; } } if (factory0.availability() < factory1.availability()) { n--; pendingSockets++; if (i1 < size - 1) { activeFactories.set(i1, activeFactories.holder.get(size - 1)); } activeFactories.remove(size - 1); factory1.connect().subscribe(new SocketAdder(factory1)); } else { n--; pendingSockets++; if (i0 < size - 1) { activeFactories.set(i0, activeFactories.holder.get(size - 1)); } activeFactories.remove(size - 1); factory0.connect().subscribe(new SocketAdder(factory0)); } } }</code><technical_language>adding a size method in ActiveList</technical_language>

Target:
private synchronized void addSockets(int numberOfNewSocket) { int n = numberOfNewSocket; if (n > activeFactories.size()) { n = activeFactories.size(); logger.debug("addSockets({}) restricted by the number of factories, i.e. addSockets({})", numberOfNewSocket, n); } Random rng = ThreadLocalRandom.current(); while (n > 0) { int size = activeFactories.size(); if (size == 1) { ReactiveSocketClient factory = activeFactories.holder.get(0); if (factory.availability() > 0.0) { activeFactories.remove(0); pendingSockets++; factory.connect().subscribe(new SocketAdder(factory)); } break; } ReactiveSocketClient factory0 = null; ReactiveSocketClient factory1 = null; int i0 = 0; int i1 = 0; for (int i = 0; i < EFFORT; i++) { i0 = rng.nextInt(size); i1 = rng.nextInt(size - 1); if (i1 >= i0) { i1++; } factory0 = activeFactories.holder.get(i0); factory1 = activeFactories.holder.get(i1); if (factory0.availability() > 0.0 && factory1.availability() > 0.0) { break; } } if (factory0.availability() < factory1.availability()) { n--; pendingSockets++; if (i1 < size - 1) { activeFactories.set(i1, activeFactories.holder.get(size - 1)); } activeFactories.remove(size - 1); factory1.connect().subscribe(new SocketAdder(factory1)); } else { n--; pendingSockets++; if (i0 < size - 1) { activeFactories.set(i0, activeFactories.holder.get(size - 1)); } activeFactories.remove(size - 1); factory0.connect().subscribe(new SocketAdder(factory0)); } } }
Source:
<code>private synchronized void regenerateMdsDataBundle(boolean startBundle, String... moduleNames) { LOGGER.info("Regenerating the mds entities bundle"); ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); clearModulesCache(moduleNames); cleanEntitiesBundleCachedClasses(); boolean constructed = mdsConstructor.constructEntities(); if (!constructed) { return; } LOGGER.info("Updating mds data provider"); mdsDataProvider.updateDataProvider(); File dest = new File(monitor.bundleLocation()); if (dest.exists()) { LOGGER.info("Waiting for entities context"); monitor.waitForEntitiesContext(); } File tmpBundleFile; try { LOGGER.info("Generating bundle jar"); tmpBundleFile = generate(); LOGGER.info("Generated bundle jar"); } catch (IOException e) { throw new MdsException("Unable to generate entities bundle", e); } FileUtils.deleteQuietly(dest); try { FileUtils.copyFile(tmpBundleFile, dest); } catch (IOException e) { LOGGER.error("Unable to copy the mds-entities bundle to the bundle directory. Installing from temp directory", e); dest = tmpBundleFile; } monitor.stopEntitiesBundle(); stopModulesForCoreBundleRefresh(moduleNames); try { monitor.start(dest, false); } finally { FileUtils.deleteQuietly(tmpBundleFile); } refreshModules(moduleNames); if (startBundle) { monitor.start(); } startModulesForCoreBundleRefresh(moduleNames); ThreadSuspender.sleep(2000); <START> Thread.currentThread().setContextClassLoader(currentClassLoader); <END> }</code><technical_language>Do this in finally</technical_language>

Target:
private synchronized void regenerateMdsDataBundle(boolean startBundle, String... moduleNames) { LOGGER.info("Regenerating the mds entities bundle"); ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); clearModulesCache(moduleNames); cleanEntitiesBundleCachedClasses(); boolean constructed = mdsConstructor.constructEntities(); if (!constructed) { return; } LOGGER.info("Updating mds data provider"); mdsDataProvider.updateDataProvider(); File dest = new File(monitor.bundleLocation()); if (dest.exists()) { LOGGER.info("Waiting for entities context"); monitor.waitForEntitiesContext(); } File tmpBundleFile; try { LOGGER.info("Generating bundle jar"); tmpBundleFile = generate(); LOGGER.info("Generated bundle jar"); } catch (IOException e) { throw new MdsException("Unable to generate entities bundle", e); } FileUtils.deleteQuietly(dest); try { FileUtils.copyFile(tmpBundleFile, dest); } catch (IOException e) { LOGGER.error("Unable to copy the mds-entities bundle to the bundle directory. Installing from temp directory", e); dest = tmpBundleFile; } monitor.stopEntitiesBundle(); stopModulesForCoreBundleRefresh(moduleNames); try { monitor.start(dest, false); } finally { FileUtils.deleteQuietly(tmpBundleFile); } refreshModules(moduleNames); if (startBundle) { monitor.start(); } startModulesForCoreBundleRefresh(moduleNames); ThreadSuspender.sleep(2000); } finally { Thread.currentThread().setContextClassLoader(currentClassLoader); } }
Source:
<code>public void testDebuggerStopsAtBreakpoint() throws CoreException, IOException { <START> new ProjectExplorer().getProject("nodejs-ex").getProjectItem("server.js").open(); <END> new WaitUntil(new EditorWithTitleIsActive("server.js")); TextEditor editor = new TextEditor("server.js"); setLineBreakpoint(editor, BREAKPOINT_LINE); triggerDebugSession(); try { new WaitUntil(new EditorWithTitleIsActive("server.js"), TimePeriod.LONG); new WaitUntil(new CursorPositionIsOnLine(editor, BREAKPOINT_LINE)); } catch (WaitTimeoutExpiredException e) { Assert.fail("Debugger hasn't stopped on breakpoint"); } }</code><technical_language>ProjectExplorer is open</technical_language>

Target:
public void testDebuggerStopsAtBreakpoint() throws CoreException, IOException { ProjectExplorer pe = new ProjectExplorer(); pe.open(); pe.getProject(OpenShiftResources.NODEJS_GIT_NAME).getProjectItem("server.js").open(); new WaitUntil(new EditorWithTitleIsActive("server.js")); TextEditor editor = new TextEditor("server.js"); setLineBreakpoint(editor, BREAKPOINT_LINE); triggerDebugSession(); try { new WaitUntil(new EditorWithTitleIsActive("server.js"), TimePeriod.LONG); new WaitUntil(new CursorPositionIsOnLine(editor, BREAKPOINT_LINE)); } catch (WaitTimeoutExpiredException e) { Assert.fail("Debugger hasn't stopped on breakpoint"); } }
Source:
<code>public Iterator<Entry<Integer>> iterator(boolean sorted) { if (sorted) { throw new UnsupportedOperationException("sorted iterator is not supported yet"); } return new Iterator<Entry<Integer>>() { int cur = -1; boolean findNext = false; { cur = findNext(); } @Override public boolean hasNext() { if (findNext) { cur = findNext(); findNext = false; } <START> return cur != -1; <END> } private int findNext() { for (int i = cur + 1; i < cardinalityWithMissingValue; i++) { if (isUsedSlot(i)) { return i; } } return -1; } @Override public Entry<Integer> next() { if (cur == -1) { throw new NoSuchElementException(); } findNext = true; final Object[] values = new Object[aggregators.length]; final int recordOffset = cur * recordSize; for (int i = 0; i < aggregators.length; i++) { values[i] = aggregators[i].get(valBuffer, recordOffset + aggregatorOffsets[i]); } return new Entry<>(cur - 1, values); } }; }</code><technical_language>Suggested cur >= 0</technical_language>

Target:
public Iterator<Entry<Integer>> iterator(boolean sorted) { if (sorted) { throw new UnsupportedOperationException("sorted iterator is not supported yet"); } return new Iterator<Entry<Integer>>() { int cur = -1; boolean findNext = false; { cur = findNext(); } @Override public boolean hasNext() { if (findNext) { cur = findNext(); findNext = false; } return cur >= 0; } private int findNext() { for (int i = cur + 1; i < cardinalityWithMissingValue; i++) { if (isUsedSlot(i)) { return i; } } return -1; } @Override public Entry<Integer> next() { if (cur < 0) { throw new NoSuchElementException(); } findNext = true; final Object[] values = new Object[aggregators.length]; final int recordOffset = cur * recordSize; for (int i = 0; i < aggregators.length; i++) { values[i] = aggregators[i].get(valBuffer, recordOffset + aggregatorOffsets[i]); } return new Entry<>(cur - 1, values); } }; }
Source:
<code><V> void submitLocalResult(final LongKeyOperation<V> operation, final Map<Long, V> localOutput, final List<LongRange> failedRanges) { final int numRemainingSubOps = operation.commitResult(localOutput, failedRanges); <START> if (!operation.isFromLocalClient()) { <END> if (numRemainingSubOps == 0) { sendResultToOrigin(operation); } } else { try { if (!operation.waitOperation(TIMEOUT_MS)) { LOG.log(Level.SEVERE, "Operation timeout. OpId: {0}", operation.getOperationId()); } else { LOG.log(Level.FINE, "Operation successfully finished. OpId: {0}", operation.getOperationId()); } } catch (final InterruptedException e) { LOG.log(Level.SEVERE, "Interrupted while waiting for executing remote operation", e); } finally { deregisterOp(operation.getOperationId()); } } }</code><technical_language>If call sendResultToOrigin(operation) 1) operation is local client, 2) operations complete, change follows? try { // L104 if (!operation.waitOperation(TIMEOUT_MS)) { // L106 } else { // L108 if (!operation.isFromLocalClient()) { sendResultToOrigin(operation); } } } catch (final InterruptedException e) { // .. } I a good idea synchronize a CountdownLatch for current value, especially check is 0, is terminating condition of await(). do think</technical_language>

Target:
<V> void submitLocalResult(final LongKeyOperation<V> operation, final Map<Long, V> localOutput, final List<LongRange> failedRanges) { final int numRemainingSubOps = operation.commitResult(localOutput, failedRanges); LOG.log(Level.FINEST, "Local sub operation succeed. OpId: {0}, numRemainingSubOps: {1}", new Object[]{operation.getOperationId(), numRemainingSubOps}); if (!operation.isFromLocalClient()) { if (numRemainingSubOps == 0) { sendResultToOrigin(operation); } } else { try { if (!operation.waitOperation(TIMEOUT_MS)) { LOG.log(Level.SEVERE, "Operation timeout. OpId: {0}", operation.getOperationId()); } else { LOG.log(Level.FINE, "Operation successfully finished. OpId: {0}", operation.getOperationId()); } } catch (final InterruptedException e) { LOG.log(Level.SEVERE, "Interrupted while waiting for executing remote operation", e); } finally { deregisterOp(operation.getOperationId()); } } }
Source:
<code>public void beforeCompletion() { int lastIndexProcessed = -1; <START> Synchronization[] copiedPreJcaSyncs = (Synchronization[]) preJcaSyncs.toArray(new Synchronization[] {}); <END> while ((lastIndexProcessed < preJcaSyncs.size() - 1)) { synchronized (preJcaSyncs) { if (copiedPreJcaSyncs.length != preJcaSyncs.size()) { copiedPreJcaSyncs = (Synchronization[]) preJcaSyncs.toArray(new Synchronization[] {}); } } lastIndexProcessed = lastIndexProcessed + 1; Synchronization preJcaSync = copiedPreJcaSyncs[lastIndexProcessed]; if (TransactionLogger.ROOT_LOGGER.isTraceEnabled()) { TransactionLogger.ROOT_LOGGER.trace("JCAOrderedLastSynchronizationList.preJcaSyncs.before_completion - Class: " + preJcaSync.getClass() + " HashCode: " + preJcaSync.hashCode() + " toString: " + preJcaSync); } preJcaSync.beforeCompletion(); } lastIndexProcessed = -1; Synchronization[] copiedJcaSyncs = (Synchronization[]) preJcaSyncs.toArray(new Synchronization[] {}); while ((lastIndexProcessed < preJcaSyncs.size() - 1)) { synchronized (preJcaSyncs) { if (copiedJcaSyncs.length != preJcaSyncs.size()) { copiedJcaSyncs = (Synchronization[]) preJcaSyncs.toArray(new Synchronization[] {}); } } lastIndexProcessed = lastIndexProcessed + 1; Synchronization jcaSync = copiedJcaSyncs[lastIndexProcessed]; if (TransactionLogger.ROOT_LOGGER.isTraceEnabled()) { TransactionLogger.ROOT_LOGGER.trace("JCAOrderedLastSynchronizationList.jcaSyncs.before_completion - Class: " + jcaSync.getClass() + " HashCode: " + jcaSync.hashCode() + " toString: " + jcaSync); } jcaSync.beforeCompletion(); } }</code><technical_language>I understand this copy is necessary? do index (rather iterator) based iteration of preJcaSync</technical_language>

Target:
public void beforeCompletion() { int lastIndexProcessed = 0; while ((lastIndexProcessed < preJcaSyncs.size())) { Synchronization preJcaSync = preJcaSyncs.get(lastIndexProcessed); if (TransactionLogger.ROOT_LOGGER.isTraceEnabled()) { TransactionLogger.ROOT_LOGGER.trace("JCAOrderedLastSynchronizationList.preJcaSyncs.before_completion - Class: " + preJcaSync.getClass() + " HashCode: " + preJcaSync.hashCode() + " toString: " + preJcaSync); } preJcaSync.beforeCompletion(); lastIndexProcessed = lastIndexProcessed + 1; } lastIndexProcessed = 0; while ((lastIndexProcessed < jcaSyncs.size())) { Synchronization jcaSync = jcaSyncs.get(lastIndexProcessed); if (TransactionLogger.ROOT_LOGGER.isTraceEnabled()) { TransactionLogger.ROOT_LOGGER.trace("JCAOrderedLastSynchronizationList.jcaSyncs.before_completion - Class: " + jcaSync.getClass() + " HashCode: " + jcaSync.hashCode() + " toString: " + jcaSync); } jcaSync.beforeCompletion(); lastIndexProcessed = lastIndexProcessed + 1; } }
Source:
<code>public File exportAsCSV(final int studyId, final int datasetId, final Set<Integer> instanceIds, final int collectionOrderId) { this.studyValidator.validate(studyId, false); this.datasetValidator.validateDataset(studyId, datasetId, false); final Study study = this.studyDataManager.getStudy(studyId); <START> final DataSet dataSet = this.studyDataManager.getDataSet(datasetId); <END> final List<StudyInstance> selectedDatasetInstances = getSelectedDatasetInstances(studyId, datasetId, instanceIds); try { return this.generateCSVFiles(study, dataSet, selectedDatasetInstances, collectionOrderId); } catch (final IOException e) { final BindingResult errors = new MapBindingResult(new HashMap<String, String>(), Integer.class.getName()); errors.reject("cannot.exportAsCSV.dataset", ""); throw new ResourceNotFoundException(errors.getAllErrors().get(0)); } }</code><technical_language>Do this object DataSet, please getDataset new DatasetService in middleware. Also, new get function, retrieve StudyInstances getSelectedDatasetInstances needed filter object</technical_language>

Target:
public File exportAsCSV(final int studyId, final int datasetId, final Set<Integer> instanceIds, final int collectionOrderId) { this.studyValidator.validate(studyId, false); this.datasetValidator.validateDataset(studyId, datasetId, false); this.instanceValidator.validate(datasetId, instanceIds); final Study study = this.studyDataManager.getStudy(studyId); final DatasetDTO dataSet = this.datasetService.getDataset(studyId, datasetId); final List<StudyInstance> selectedDatasetInstances = getSelectedDatasetInstances(dataSet.getInstances(), instanceIds); try { return this.generateCSVFiles(study, dataSet, selectedDatasetInstances, collectionOrderId); } catch (final IOException e) { final BindingResult errors = new MapBindingResult(new HashMap<String, String>(), Integer.class.getName()); errors.reject("cannot.exportAsCSV.dataset", ""); throw new ResourceNotFoundException(errors.getAllErrors().get(0)); } }
Source:
<code>public ProcessKillResponseDto killProcess(String workspaceId, int pid) throws ServerException { try { return requestFactory .fromUrl(serverEndpoint + "/" + pid) .useDeleteMethod() .addQueryParam("token", machineTokenProvider.getToken(workspaceId)) .setAuthorizationHeader("none") .request() .asDto(ProcessKillResponseDto.class); <START> } catch (IOException <END> | ConflictException | BadRequestException | UnauthorizedException | NotFoundException | MachineTokenException | ForbiddenException e) { throw new ServerException(e); } }</code><technical_language>I variant simpler } catch (IOException | ApiException | MachineTokenException e) ... }</technical_language>

Target:
public ProcessKillResponseDto killProcess(String workspaceId, int pid) throws ServerException { try { return requestFactory .fromUrl(serverEndpoint + "/" + pid) .useDeleteMethod() .addQueryParam("token", machineTokenProvider.getToken(workspaceId)) .setAuthorizationHeader("none") .request() .asDto(ProcessKillResponseDto.class); } catch (IOException | ApiException | MachineTokenException e) { throw new ServerException(e); } }
Source:
<code>private static void assertCanSetGridData(Button button) { <START> Assert.isLegal(!DisposeUtils.isDisposed(button)); <END> Assert.isLegal(button.getLayoutData() instanceof GridData, "Button " + button.getText() + " is not layouted with a GridLayout"); }</code><technical_language>needs error message</technical_language>

Target:
private static void assertCanSetGridData(Button button) { Assert.isLegal(!DisposeUtils.isDisposed(button), "Button is disposed"); Assert.isLegal(button.getLayoutData() instanceof GridData, "Button " + button.getText() + " is not layouted with a GridLayout"); }
Source:
<code>public FileSystemConfiguration[] getConfigurations() { if (allConfigurations == null) { List<FileSystemConfiguration> result = new ArrayList<>(registeredContributions.size() + 1); result.add(defaultConfiguration); Iterator iterator = registeredContributions.iterator(); while (iterator.hasNext()) { FileSystemConfiguration configuration = (FileSystemConfiguration) iterator .next(); <START> if (configuration != null) { <END> result.add(configuration); } } allConfigurations = result.toArray(new FileSystemConfiguration[result.size()]); } return allConfigurations; }</code><technical_language>provide a bit deeper rework avoid this null check here? BTW, this idea "allConfigurations" cache questionable I avoid simplify code</technical_language>

Target:
public FileSystemConfiguration[] getConfigurations() { return Stream.concat(Stream.of(defaultConfiguration), registeredContributions.stream()) .toArray(FileSystemConfiguration[]::new); }
Source:
<code>protected void init(ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) { if (attributeExpressionExecutors.length != 3) { throw new ExecutionPlanValidationException("Invalid no of arguments passed to ifThenElse() function, " + "required only 3, but found " + attributeExpressionExecutors.length); }else if(!attributeExpressionExecutors[0].getReturnType().equals(Attribute.Type.BOOL)){ <START> throw new ExecutionPlanValidationException("Input type of ifThenElse function executor " + attributeExpressionExecutors[0].toString() + " should be of type BOOL. " + <END> "Actual Type: " + attributeExpressionExecutors[0].getReturnType().toString()); }else if(!attributeExpressionExecutors[1].getReturnType().equals(attributeExpressionExecutors[2].getReturnType())){ throw new ExecutionPlanValidationException("Return type of ifThenElse function executor " + attributeExpressionExecutors[1].toString() + " and ifThenElse function executor" + attributeExpressionExecutors[2].toString() + "should be of equivalent type. Left executor: " + attributeExpressionExecutors[1].getReturnType() + " Right executor: " + attributeExpressionExecutors[2].getReturnType()); }else{ returnType = attributeExpressionExecutors[1].getReturnType(); } }</code><technical_language>Dont print attributeExpressionExecutors[0].toString(), attribute name write exception as: "Input type of if in ifThenElse function of type BOOL, " + attributeExpressionExecutors[0].getReturnType()</technical_language>

Target:
protected void init(ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) { if (attributeExpressionExecutors.length != 3) { throw new ExecutionPlanValidationException("Invalid no of arguments passed to ifThenElse() function, " + "required only 3, but found " + attributeExpressionExecutors.length); }else if(!attributeExpressionExecutors[0].getReturnType().equals(Attribute.Type.BOOL)){ throw new ExecutionPlanValidationException("Input type of if in ifThenElse function should be of type BOOL, but found " + attributeExpressionExecutors[0].getReturnType()); }else if(!attributeExpressionExecutors[1].getReturnType().equals(attributeExpressionExecutors[2].getReturnType())){ throw new ExecutionPlanValidationException("Input type of then in ifThenElse function and else in ifThenElse function should be of equivalent type. but found then type: " + attributeExpressionExecutors[1].getReturnType() + " and else type: " + attributeExpressionExecutors[2].getReturnType()); }else{ returnType = attributeExpressionExecutors[1].getReturnType(); } }
Source:
<code>int unsafeCompareTo( Value other ) { ZonedDateTime that = ((DateTimeValue) other).value; int cmp = Long.compare( value.toEpochSecond(), that.toEpochSecond() ); if ( cmp == 0 ) { <START> cmp = value.toLocalTime().getNano() - that.toLocalTime().getNano(); <END> if ( cmp == 0 ) { cmp = value.toLocalDateTime().compareTo( that.toLocalDateTime() ); if ( cmp == 0 ) { ZoneId thisZone = value.getZone(); ZoneId thatZone = that.getZone(); if ( areDifferentZones( thisZone, thatZone ) ) { cmp = thisZone.getId().compareTo( thatZone.getId() ); } if ( cmp == 0 ) { cmp = value.getChronology().compareTo( that.getChronology() ); } } } } return cmp; }</code><technical_language>do check nanos here, included in that.toLocalTime() part of next comparison</technical_language>

Target:
int unsafeCompareTo( Value other ) { ZonedDateTime that = ((DateTimeValue) other).value; int cmp = Long.compare( value.toEpochSecond(), that.toEpochSecond() ); if ( cmp == 0 ) { cmp = value.toLocalTime().getNano() - that.toLocalTime().getNano(); if ( cmp == 0 ) { cmp = value.toLocalDateTime().compareTo( that.toLocalDateTime() ); if ( cmp == 0 ) { ZoneId thisZone = value.getZone(); ZoneId thatZone = that.getZone(); boolean thisIsOffset = thisZone instanceof ZoneOffset; boolean thatIsOffset = thatZone instanceof ZoneOffset; cmp = Boolean.compare( thatIsOffset, thisIsOffset ); if ( cmp == 0 && areDifferentZones( thisZone, thatZone ) ) { cmp = thisZone.getId().compareTo( thatZone.getId() ); } if ( cmp == 0 ) { cmp = value.getChronology().compareTo( that.getChronology() ); } } } } return cmp; }
Source:
<code>public Double getRowCount(Union rel, RelMetadataQuery mq) { <START> return rel.estimateRowCount(mq); <END> }</code><technical_language>Union.estimateRowCount account case of inputs return null</technical_language>

Target:
public Double getRowCount(Union rel, RelMetadataQuery mq) { double rowCount = 0.0; for (RelNode input : rel.getInputs()) { Double partialRowCount = mq.getRowCount(input); if (partialRowCount == null) { return null; } rowCount += partialRowCount; } if (!rel.all) { rowCount *= 0.5; } return rowCount; }
Source:
<code>public IdToken idTokenWithAudience(String targetAudience, List<IdTokenProvider.Option> options) throws IOException { JsonFactory jsonFactory = OAuth2Utils.JSON_FACTORY; long currentTime = clock.currentTimeMillis(); String assertion = createAssertionForIdToken( jsonFactory, currentTime, tokenServerUri.toString(), targetAudience); GenericData tokenRequest = new GenericData(); tokenRequest.set("grant_type", GRANT_TYPE); tokenRequest.set("assertion", assertion); UrlEncodedContent content = new UrlEncodedContent(tokenRequest); HttpRequestFactory requestFactory = transportFactory.create().createRequestFactory(); HttpRequest request = requestFactory.buildPostRequest(new GenericUrl(tokenServerUri), content); request.setParser(new JsonObjectParser(jsonFactory)); <START> HttpResponse response; <END> response = request.execute(); GenericData responseData = response.parseAs(GenericData.class); String rawToken = OAuth2Utils.validateString(responseData, "id_token", PARSE_ERROR_PREFIX); JsonWebSignature jws = JsonWebSignature.parse(OAuth2Utils.JSON_FACTORY, rawToken); return new IdToken(rawToken, jws); }</code><technical_language>combine this next line</technical_language>

Target:
public IdToken idTokenWithAudience(String targetAudience, List<IdTokenProvider.Option> options) throws IOException { JsonFactory jsonFactory = OAuth2Utils.JSON_FACTORY; long currentTime = clock.currentTimeMillis(); String assertion = createAssertionForIdToken( jsonFactory, currentTime, tokenServerUri.toString(), targetAudience); GenericData tokenRequest = new GenericData(); tokenRequest.set("grant_type", GRANT_TYPE); tokenRequest.set("assertion", assertion); UrlEncodedContent content = new UrlEncodedContent(tokenRequest); HttpRequestFactory requestFactory = transportFactory.create().createRequestFactory(); HttpRequest request = requestFactory.buildPostRequest(new GenericUrl(tokenServerUri), content); request.setParser(new JsonObjectParser(jsonFactory)); HttpResponse response = request.execute(); GenericData responseData = response.parseAs(GenericData.class); String rawToken = OAuth2Utils.validateString(responseData, "id_token", PARSE_ERROR_PREFIX); return IdToken.create(rawToken); }
Source:
<code>default void onShutdown() { <START> throw new AssertionError("deprecated API, should not be invoked"); <END> }</code><technical_language>new AssertionError -> new UnsupportedOperationException</technical_language>

Target:
default void onShutdown() { throw new UnsupportedOperationException("deprecated API, should not be invoked"); }