auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private FreeIpaHealthCheckClient buildFreeIpaHealthCheckClient(HttpClientConfig clientConfig, int port, String basePath, Map<String, String> headers, FreeIpaHealthCheckRpcListener listener) throws FreeIpaClientException, MalformedURLException { Client restClient; try { restClient = RestClientUtil.createClient(clientConfig.getServerCert(), clientConfig.getClientCert(), clientConfig.getClientKey(), connetionTimeoutMillis, readTimeoutMillis, restDebug); } catch (Exception e) { throw new FreeIpaClientException("Unable to create clietn for freeipa health checks", e); } URL freeIpaHealthCheckUrl = getIpaHealthCheckUrl(clientConfig, port, basePath); return new FreeIpaHealthCheckClient(restClient, freeIpaHealthCheckUrl, headers, listener); }

Target:
private FreeIpaHealthCheckClient buildFreeIpaHealthCheckClient(HttpClientConfig clientConfig, int port, String basePath, Map<String, String> headers, FreeIpaHealthCheckRpcListener listener) throws FreeIpaClientException, MalformedURLException { Client restClient; try { restClient = RestClientUtil.createClient(clientConfig.getServerCert(), clientConfig.getClientCert(), clientConfig.getClientKey(), connetionTimeoutMillis, readTimeoutMillis, restDebug); } catch (Exception e) { throw new FreeIpaClientException("Unable to create client for FreeIPA health checks", e); } URL freeIpaHealthCheckUrl = getIpaHealthCheckUrl(clientConfig, port, basePath); return new FreeIpaHealthCheckClient(restClient, freeIpaHealthCheckUrl, headers, listener); }
Source:
public void whenHeadlessMode_thenImagesWork() { boolean result = false; try (FileInputStream inStream = new FileInputStream(IN_FILE); FileOutputStream outStream = new FileOutputStream(OUT_FILE)) { BufferedImage inputImage = ImageIO.read(inStream); result = ImageIO.write(inputImage, FORMAT, outStream); } catch (IOException e) { LOGGER.error(e.getMessage()); } assertThat(result).isTrue(); }

Target:
public void whenHeadlessMode_thenImagesWork() throws IOException { boolean result = false; try (InputStream inStream = HeadlessModeUnitTest.class.getResourceAsStream(IN_FILE); FileOutputStream outStream = new FileOutputStream(OUT_FILE)) { BufferedImage inputImage = ImageIO.read(inStream); result = ImageIO.write(inputImage, FORMAT, outStream); } assertThat(result).isTrue(); }
Source:
public List<NameValuePair> toUrlParams() { return new ArrayList<NameValuePair>(0); }

Target:
public List<NameValuePair> toUrlParams() { return Collections.emptyList(); }
Source:
public IStatus validateChange(final IResourceDelta delta, final IProgressMonitor monitor) { final ISarosSession currentSession = session; if (currentSession == null) return Status.OK_STATUS; Set<IReferencePoint> sharedReferencePoints = session.getReferencePoints(); for (IReferencePoint referencePoint : sharedReferencePoints) { IContainer referencePointDelegate = ResourceConverter.getDelegate(referencePoint); IResourceDelta referencePointDelta = delta.findMember(referencePointDelegate.getFullPath()); final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(referencePoint, currentSession); if (referencePointDelta != null) { continue; } try { delta.accept(visitor); } catch (CoreException e) { log.warn( "error occurred during delta visitation, some resources might have not been checked", e); } if (!currentSession.hasWriteAccess() && visitor.isModifyingResources()) return MODIFYING_RESOURCES_ERROR_STATUS; if (visitor.isDeletingProject()) return DELETE_PROJECT_ERROR_STATUS; if (visitor.isMovingProject()) return MOVE_OR_RENAME_PROJECT_ERROR_STATUS; } return Status.OK_STATUS; }

Target:
public IStatus validateChange(final IResourceDelta delta, final IProgressMonitor monitor) { final ISarosSession currentSession = session; if (currentSession == null) return Status.OK_STATUS; Set<IReferencePoint> sharedReferencePoints = session.getReferencePoints(); for (IReferencePoint referencePoint : sharedReferencePoints) { IContainer referencePointDelegate = ResourceConverter.getDelegate(referencePoint); IResourceDelta referencePointDelta = delta.findMember(referencePointDelegate.getFullPath()); if (referencePointDelta == null) { continue; } final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(referencePoint, currentSession); try { referencePointDelta.accept(visitor); } catch (CoreException e) { log.warn( "error occurred during delta visitation, some resources might have not been checked", e); } if (!currentSession.hasWriteAccess() && visitor.isModifyingResources()) return MODIFYING_RESOURCES_ERROR_STATUS; if (visitor.isDeletingProject()) return DELETE_PROJECT_ERROR_STATUS; if (visitor.isMovingProject()) return MOVE_OR_RENAME_PROJECT_ERROR_STATUS; } return Status.OK_STATUS; }
Source:
private void configureActionProvider( String protocol, String host, String port, String contextRoot) { setProperty("org.codice.ddf.external.hostname", host); setProperty("org.codice.ddf.external.httpPort", port); setProperty("org.codice.ddf.external.httpsPort", port); setProperty("org.codice.ddf.external.protocol", protocol); setProperty("org.codice.ddf.system.rootContext", contextRoot); }

Target:
private void configureActionProvider( String protocol, String host, String port, String contextRoot) { setProperty(SystemBaseUrl.EXTERNAL_HOST, host); setProperty(SystemBaseUrl.EXTERNAL_PORT, port); setProperty(SystemBaseUrl.EXTERNAL_HTTPS_PORT, port); setProperty(SystemBaseUrl.EXTERNAL_PROTOCOL, protocol); setProperty(SystemBaseUrl.ROOT_CONTEXT, contextRoot); }
Source:
public String toString() { return "SizeCommand{" + '}'; }

Target:
public String toString() { return "SizeCommand{}"; }
Source:
public int hashCode() { return Arrays.hashCode(new Object[]{actionClass, metadataType}); }

Target:
public int hashCode() { return Objects.hashCode(actionClass, metadataType); }
Source:
public void testBloomFilterExprFilter() throws Exception { cannotVectorize(); BloomKFilter filter = new BloomKFilter(1500); filter.addString("a-foo"); filter.addString("-foo"); if (!NullHandling.replaceWithDefault()) { filter.addBytes(null, 0, 0); } byte[] bytes = BloomFilterSerializersModule.bloomKFilterToBytes(filter); String base64 = StringUtils.encodeBase64String(bytes); testQuery( StringUtils.format("SELECT COUNT(*) FROM druid.foo WHERE bloom_filter_test(concat(dim2, '-foo'), '%s') = TRUE", base64), ImmutableList.of( Druids.newTimeseriesQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( "v0", "concat(\"dim2\",'-foo')", ValueType.STRING, createExprMacroTable() ) ) .filters( new BloomDimFilter( "v0", BloomKFilterHolder.fromBytes(bytes), null ) ) .aggregators(aggregators(new CountAggregatorFactory("a0"))) .context(TIMESERIES_CONTEXT_DEFAULT) .build() ), ImmutableList.of( new Object[]{5L} ) ); }

Target:
public void testBloomFilterExprFilter() throws Exception { BloomKFilter filter = new BloomKFilter(1500); filter.addString("a-foo"); filter.addString("-foo"); if (!NullHandling.replaceWithDefault()) { filter.addBytes(null, 0, 0); } byte[] bytes = BloomFilterSerializersModule.bloomKFilterToBytes(filter); String base64 = StringUtils.encodeBase64String(bytes); testQuery( StringUtils.format("SELECT COUNT(*) FROM druid.foo WHERE nullif(bloom_filter_test(concat(dim2, '-foo'), '%s'), 1) is null", base64), ImmutableList.of( Druids.newTimeseriesQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) .filters( new ExpressionDimFilter( StringUtils.format( "case_searched(bloom_filter_test(concat(\"dim2\",'-foo'),'%s'),1,isnull(bloom_filter_test(concat(\"dim2\",'-foo'),'%s')))", base64, base64 ), null, createExprMacroTable() ) ) .aggregators(aggregators(new CountAggregatorFactory("a0"))) .context(TIMESERIES_CONTEXT_DEFAULT) .build() ), ImmutableList.of( new Object[]{5L} ) ); }
Source:
public void setAccountNumber(String accountNumber) { this.accountNumber = accountNumber; }

Target:
public void setAccountNumber(String accountNumber) { this.accountNumber = stringOrNull(accountNumber); }
Source:
private Session createJavaMailSession() { Session session; Properties props = new Properties(System.getProperties()); System.out.printf(params.smtpAuth()); props.put("mail.smtp.host",params.smtpServer()); if(params.smtpAuth().equals("true")) { props.put("mail.smtp.auth", params.smtpAuth()); props.put("mail.smtp.starttls.enable", true); props.put("mail.smtp.port", 587); session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(params.smtpUser(), params.smtpPassword()); } }); } else { session = Session.getInstance(props); } return session; }

Target:
private Session createJavaMailSession() { Session session; Properties props = new Properties(System.getProperties()); props.put("mail.smtp.host",params.smtpServer()); if(params.smtpAuth()) { props.put("mail.smtp.auth", params.smtpAuth()); props.put("mail.smtp.starttls.enable", true); props.put("mail.smtp.port", 587); session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(params.smtpUser(), params.smtpPassword()); } }); } else { session = Session.getInstance(props); } return session; }
Source:
public void insertToRealm_InvalidRealmModel() { InvalidRealmModel invalidRealmModel = new InvalidRealmModel(); realm.beginTransaction(); try { realm.insertToRealm(invalidRealmModel); fail("Expected Missing Proxy Class Exception"); } catch (RealmException ignored) { } realm.commitTransaction(); }

Target:
public void insertToRealm_InvalidRealmModel() { InvalidRealmModel invalidRealmModel = new InvalidRealmModel(); realm.beginTransaction(); try { realm.insert(invalidRealmModel); fail("Expected Missing Proxy Class Exception"); } catch (RealmException ignored) { } finally { realm.cancelTransaction(); } }
Source:
public void testRisingEdge() { Latch latch = new Latch(false, Latch.EdgeType.RisingEdge); MockLatch mockLatch = new MockLatch(); latch.addObserver(mockLatch); latch.setValue(true); assertTrue(mockLatch.getEdgeType() == Latch.EdgeType.RisingEdge); }

Target:
public void testRisingEdge() { Latch latch = new Latch(false, Latch.EdgeType.RisingEdge); latch.addObserver(latchTestObserver); verifyEdgeType(null); verifyTimesUpdateWasCalled(0); latch.setValue(true); verifyEdgeType(Latch.EdgeType.RisingEdge); verifyTimesUpdateWasCalled(1); }
Source:
private int tickAllGenerators(LongConsumer timings) { Set<Location> exploded = new HashSet<>(); int supply = 0; for (Map.Entry<Location, EnergyNetComponent> entry : generators.entrySet()) { long timestamp = SlimefunPlugin.getProfiler().newEntry(); Location l = entry.getKey(); EnergyNetComponent component = entry.getValue(); if (component instanceof EnergyNetProvider) { SlimefunItem item = (SlimefunItem) component; try { EnergyNetProvider provider = (EnergyNetProvider) component; Config config = BlockStorage.getLocationInfo(l); int energy = provider.getGeneratedOutput(l, config); if (provider.isChargeable()) { energy += provider.getCharge(l); } if (provider.willExplode(l, config)) { exploded.add(l); BlockStorage.clearBlockInfo(l); Slimefun.runSync(() -> { l.getBlock().setType(Material.LAVA); l.getWorld().createExplosion(l, 0F, false); }); } else { supply += energy; } } catch (Exception | LinkageError t) { exploded.add(l); new ErrorReport(t, l, item); } long time = SlimefunPlugin.getProfiler().closeEntry(l, item, timestamp); timings.accept(time); } else { exploded.add(l); } } generators.keySet().removeAll(exploded); return supply; }

Target:
private int tickAllGenerators(LongConsumer timings) { Set<Location> explodedBlocks = new HashSet<>(); int supply = 0; for (Map.Entry<Location, EnergyNetProvider> entry : generators.entrySet()) { long timestamp = SlimefunPlugin.getProfiler().newEntry(); Location loc = entry.getKey(); EnergyNetProvider provider = entry.getValue(); SlimefunItem item = (SlimefunItem) provider; try { Config config = BlockStorage.getLocationInfo(loc); int energy = provider.getGeneratedOutput(loc, config); if (provider.isChargeable()) { energy += provider.getCharge(loc); } if (provider.willExplode(loc, config)) { explodedBlocks.add(loc); BlockStorage.clearBlockInfo(loc); Slimefun.runSync(() -> { loc.getBlock().setType(Material.LAVA); loc.getWorld().createExplosion(loc, 0F, false); }); } else { supply += energy; } } catch (Exception | LinkageError t) { explodedBlocks.add(loc); new ErrorReport<>(t, loc, item); } long time = SlimefunPlugin.getProfiler().closeEntry(loc, item, timestamp); timings.accept(time); } generators.keySet().removeAll(explodedBlocks); return supply; }
Source:
public int waitFor() { try { int exitValue = processApi.waitFor(process); streamConsumer.await(); return exitValue; } catch (InterruptedException e) { processApi.interrupt(); LOG.error("Interrupted while waiting for process to terminate."); return 1; } finally { streamConsumer.shutdownNow(); } }

Target:
public int waitFor() { try { int exitValue = processWrapper.waitFor(process); streamConsumer.await(); return exitValue; } catch (InterruptedException e) { processWrapper.interrupt(); LOG.error("Interrupted while waiting for process to terminate."); return 1; } finally { streamConsumer.shutdownNow(); } }
Source:
public void repositoriesWithUrlPropertyInProfile() throws Exception { MavenPomView pomView = loadPoms( "pom-with-repo-property-in-profile.xml" ); List<RepositoryView> rvs = pomView.getAllRepositories(); for ( RepositoryView rv : rvs ) { if ( rv.getName().equals( "repo.one" ) ) { assertThat( rv.getUrl(), equalTo( "<LINK_2>" ) ); } if ( rv.getName().equals( "test.oracle" ) ) { assertThat( rv.getUrl(), equalTo( "<LINK_1>" ) ); } if ( rv.getName().equals( "test.two.oracle" ) ) { assertThat( rv.getUrl(), equalTo( "<LINK_3>" ) ); } } }

Target:
public void repositoriesWithUrlPropertyInProfile() throws Exception { MavenPomView pomView = loadPoms( "pom-with-repo-property-in-profile.xml" ); List<RepositoryView> rvs = pomView.getAllRepositories(); assertThat( rvs.get( 0 ).getName(), equalTo( "repo.one" ) ); assertThat( rvs.get( 0 ).getUrl(), equalTo( "<LINK_0>" ) ); assertThat( rvs.get( 1 ).getName(), equalTo( "test.oracle.repo" ) ); assertThat( rvs.get( 1 ).getUrl(), equalTo( "<LINK_1>" ) ); assertThat( rvs.get( 2 ).getName(), equalTo( "test.second.oracle.repo" ) ); assertThat( rvs.get( 2 ).getUrl(), equalTo( "<LINK_4>" ) ); }
Source:
public void doScrape() throws Exception { MBeanServerConnection beanConn; JMXConnector jmxc = null; if (hostPort.isEmpty()) { beanConn = ManagementFactory.getPlatformMBeanServer(); } else { String url = "service:jmx:rmi:/ HashMap credential = new HashMap(); credential.put(username, password ); jmxc = JMXConnectorFactory.connect(new JMXServiceURL(url), credential); beanConn = jmxc.getMBeanServerConnection(); } try { Set<ObjectName> mBeanNames = new TreeSet(); for (ObjectName name : whitelistObjectNames) { mBeanNames.addAll(beanConn.queryNames(name, null)); } for (ObjectName name : blacklistObjectNames) { mBeanNames.removeAll(beanConn.queryNames(name, null)); } for (ObjectName name : mBeanNames) { scrapeBean(beanConn, name); } } finally { if (jmxc != null) { jmxc.close(); } } }

Target:
public void doScrape() throws Exception { MBeanServerConnection beanConn; JMXConnector jmxc = null; if (hostPort.isEmpty()) { beanConn = ManagementFactory.getPlatformMBeanServer(); } else { String url = "service:jmx:rmi:/ HashMap credential = null; if(username != null && username.length() != 0 && password != null && password.length() != 0) { credential = new HashMap(); List<String> credent = new ArrayList<String>(); credent.add(username); credent.add(password); credential.put("javax.management.remote.JMXConnector.CREDENTIALS", credent); } jmxc = JMXConnectorFactory.connect(new JMXServiceURL(url), credential); beanConn = jmxc.getMBeanServerConnection(); } try { Set<ObjectName> mBeanNames = new TreeSet(); for (ObjectName name : whitelistObjectNames) { mBeanNames.addAll(beanConn.queryNames(name, null)); } for (ObjectName name : blacklistObjectNames) { mBeanNames.removeAll(beanConn.queryNames(name, null)); } for (ObjectName name : mBeanNames) { scrapeBean(beanConn, name); } } finally { if (jmxc != null) { jmxc.close(); } } }
Source:
public CHProfileConfig setProfile(String profile) { validateProfileName(profile); this.profile = profile; return this; }

Target:
CHProfileConfig setProfile(String profile) { validateProfileName(profile); this.profile = profile; return this; }
Source:
public void merge(List<? extends Diff> differences, boolean leftToRight, Registry mergerRegistry) { Preconditions .checkState(getMergeMode().isLeftToRight(isLeftEditable(), isRightEditable()) == leftToRight); if (!differences.isEmpty()) { updateDiffStateAdapter(differences.get(0)); } if (getMergeMode() == MergeMode.LEFT_TO_RIGHT || getMergeMode() == MergeMode.RIGHT_TO_LEFT) { mergeAll(differences, leftToRight, mergerRegistry); } else if (getMergeMode() == MergeMode.ACCEPT || getMergeMode() == MergeMode.REJECT) { List<Diff> diffToMarkAsMerged = newArrayList(); List<Diff> diffToCopyFromLeftToRight = newArrayList(); List<Diff> diffToCopyFromRightToLeft = newArrayList(); for (Diff diff : differences) { MergeOperation mergeAction = getMergeMode().getMergeAction(diff, isLeftEditable(), isRightEditable()); if (mergeAction == MergeOperation.MARK_AS_MERGE) { diffToMarkAsMerged.add(diff); } else { if (isLeftEditable() && leftToRight) { diffToCopyFromRightToLeft.add(diff); } else { diffToCopyFromLeftToRight.add(diff); } } } mergeAll(diffToCopyFromLeftToRight, leftToRight, mergerRegistry); mergeAll(diffToCopyFromRightToLeft, !leftToRight, mergerRegistry); markAllAsMerged(diffToMarkAsMerged, getMergeMode(), mergerRegistry); } else { throw new IllegalStateException(); } }

Target:
public void merge(List<? extends Diff> differences, boolean leftToRight, Registry mergerRegistry) { Preconditions .checkState(getMergeMode().isLeftToRight(isLeftEditable(), isRightEditable()) == leftToRight); if (getMergeMode() == MergeMode.LEFT_TO_RIGHT || getMergeMode() == MergeMode.RIGHT_TO_LEFT) { mergeAll(differences, leftToRight, mergerRegistry); } else if (getMergeMode() == MergeMode.ACCEPT || getMergeMode() == MergeMode.REJECT) { List<Diff> diffToMarkAsMerged = newArrayList(); List<Diff> diffToCopyFromLeftToRight = newArrayList(); List<Diff> diffToCopyFromRightToLeft = newArrayList(); for (Diff diff : differences) { MergeOperation mergeAction = getMergeMode().getMergeAction(diff, isLeftEditable(), isRightEditable()); if (mergeAction == MergeOperation.MARK_AS_MERGE) { diffToMarkAsMerged.add(diff); } else { if (isLeftEditable() && leftToRight) { diffToCopyFromRightToLeft.add(diff); } else { diffToCopyFromLeftToRight.add(diff); } } } mergeAll(diffToCopyFromLeftToRight, leftToRight, mergerRegistry); mergeAll(diffToCopyFromRightToLeft, !leftToRight, mergerRegistry); markAllAsMerged(diffToMarkAsMerged, getMergeMode(), mergerRegistry); } else { throw new IllegalStateException(); } }
Source:
public Optional<AcceptorCacheDigest> updatesSinceCacheKey(AcceptorCacheKey cacheKey) throws InvalidAcceptorCacheKeyException { lock.readLock().lock(); try { if (cacheKey.equals(latestAcceptorCacheKey)) { return Optional.empty(); } Long cacheKeyTimestamp = cacheKeyToTimestamp.getIfPresent(cacheKey); if (cacheKeyTimestamp == null) { throw new InvalidAcceptorCacheKeyException(cacheKey); } Map<Client, Long> diff = clientsByLatestTimestamp.asMap().tailMap(cacheKeyTimestamp).values().stream() .flatMap(Collection::stream) .collect(Collectors.toMap(WithSeq::value, WithSeq::seq)); return Optional.of(ImmutableAcceptorCacheDigest.builder() .newCacheKey(latestAcceptorCacheKey) .updates(diff) .build()); } finally { lock.readLock().unlock(); } }

Target:
public Optional<AcceptorCacheDigest> updatesSinceCacheKey(AcceptorCacheKey cacheKey) throws InvalidAcceptorCacheKeyException { lock.readLock().lock(); try { if (cacheKey.equals(latestAcceptorCacheKey)) { return Optional.empty(); } Long cacheKeyTimestamp = cacheKeyToTimestamp.getIfPresent(cacheKey); if (cacheKeyTimestamp == null) { throw new InvalidAcceptorCacheKeyException(cacheKey); } Map<Client, Long> diff = clientsByLatestTimestamp.asMap().tailMap(cacheKeyTimestamp, false).values() .stream() .flatMap(Collection::stream) .collect(Collectors.toMap(WithSeq::value, WithSeq::seq)); return Optional.of(ImmutableAcceptorCacheDigest.builder() .newCacheKey(latestAcceptorCacheKey) .updates(diff) .build()); } finally { lock.readLock().unlock(); } }
Source:
private PhoenixConnection getConnectionWithTableOrderPreservingMutationState() throws SQLException { Connection con = driver.connect(url, new Properties()); PhoenixConnection phxCon = new PhoenixConnection(con.unwrap(PhoenixConnection.class)); Map<TableRef,Map<ImmutableBytesPtr,MutationState.RowMutationState>> mutations = Maps.newTreeMap(new TableRefComparator()); phxCon.getMutationState().setMutationsTestOnly(mutations); return phxCon; }

Target:
private PhoenixConnection getConnectionWithTableOrderPreservingMutationState() throws SQLException { Connection con = driver.connect(url, new Properties()); PhoenixConnection phxCon = new PhoenixConnection(con.unwrap(PhoenixConnection.class)); final Map<TableRef,Map<ImmutableBytesPtr,MutationState.RowMutationState>> mutations = Maps.newTreeMap(new TableRefComparator()); return new PhoenixConnection(phxCon) { protected MutationState newMutationState(int maxSize) { return new MutationState(maxSize, this, mutations); }; }; }
Source:
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); if (igniteInstanceName.contains(NODE_1_CONS_ID)) { failingOnNodeJoinSpi.setIpFinder(sharedStaticIpFinder); failingOnNodeJoinSpi.setJoinTimeout(60_000); cfg.setDiscoverySpi(failingOnNodeJoinSpi); } cfg.setConsistentId(igniteInstanceName); if (igniteInstanceName.contains("client")) cfg.setClientMode(true); else { cfg.setDataStorageConfiguration( new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setInitialSize(10500000) .setMaxSize(6659883008L) .setPersistenceEnabled(false) ) ); } if (igniteInstanceName.equals(NODE_4_DIFF_STATIC_CONFIG) || igniteInstanceName.equals("clientWithDiffConfig")) cfg.setCacheConfiguration( prepareStaticCacheCfg(STATIC_CACHE_NAME_1), prepareStaticCacheCfg(STATIC_CACHE_NAME_2) ); else cfg.setCacheConfiguration( prepareStaticCacheCfg(STATIC_CACHE_NAME_1), prepareStaticCacheCfg(STATIC_CACHE_NAME_3) ); return cfg; }

Target:
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); if (igniteInstanceName.contains(NODE_1_CONS_ID)) { failingOnNodeJoinSpi.setIpFinder(sharedStaticIpFinder); failingOnNodeJoinSpi.setJoinTimeout(60_000); cfg.setDiscoverySpi(failingOnNodeJoinSpi); } cfg.setConsistentId(igniteInstanceName); if (igniteInstanceName.contains("client")) cfg.setClientMode(true); else { cfg.setDataStorageConfiguration( new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setInitialSize(10500000) .setMaxSize(6659883008L) .setPersistenceEnabled(false) ) ); } if (igniteInstanceName.equals(NODE_4_DIFF_STATIC_CONFIG) || igniteInstanceName.equals(CLIENT_WITH_DIFF_CONFIG)) cfg.setCacheConfiguration( prepareStaticCacheCfg(STATIC_CACHE_NAME_1), prepareStaticCacheCfg(STATIC_CACHE_NAME_2) ); else cfg.setCacheConfiguration( prepareStaticCacheCfg(STATIC_CACHE_NAME_1), prepareStaticCacheCfg(STATIC_CACHE_NAME_3) ); return cfg; }
Source:
private OrderedPropertyValues getOrderedPropertyValues( KernelStatement state, NodeItem node, DefinedProperty changedProperty, int[] indexPropertyIds ) { DefinedProperty[] values = new DefinedProperty[indexPropertyIds.length]; Cursor<PropertyItem> propertyCursor = readOps.nodeGetProperties( state, node ); while ( propertyCursor.next() ) { PropertyItem property = propertyCursor.get(); int k = ArrayUtils.indexOf( indexPropertyIds, property.propertyKeyId() ); if ( k >= 0 ) { values[k] = indexPropertyIds[k] == changedProperty.propertyKeyId() ? changedProperty : Property.property( indexPropertyIds[k], property.value() ); } } return OrderedPropertyValues.of( values ); }

Target:
private OrderedPropertyValues getOrderedPropertyValues( KernelStatement state, NodeItem node, DefinedProperty changedProperty, int[] indexPropertyIds ) { DefinedProperty[] values = new DefinedProperty[indexPropertyIds.length]; Cursor<PropertyItem> propertyCursor = readOps.nodeGetProperties( state, node ); while ( propertyCursor.next() ) { PropertyItem property = propertyCursor.get(); int k = ArrayUtils.indexOf( indexPropertyIds, property.propertyKeyId() ); if ( k >= 0 ) { values[k] = indexPropertyIds[k] == changedProperty.propertyKeyId() ? changedProperty : Property.property( indexPropertyIds[k], property.value() ); } } if ( changedProperty != NO_SUCH_PROPERTY ) { int k = ArrayUtils.indexOf( indexPropertyIds, changedProperty.propertyKeyId() ); if ( k >= 0 ) { values[k] = changedProperty; } } return OrderedPropertyValues.of( values ); }
Source:
protected void fetchRemoteData() { fetchCategories(); WordPress.getRestClientUtils().getGeneralSettings( mSite.getSiteId(), new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { AppLog.d(AppLog.T.API, "Received response to Settings REST request."); credentialsVerified(true); mRemoteSettings.localTableId = mSite.getId(); deserializeDotComRestResponse(mSite, response); if (!mRemoteSettings.equals(mSettings)) { final Map<String, String> currentPostFormats = mSettings.postFormats; boolean location = mSettings.location; boolean optimizeImaged = mSettings.optimizedImage; mSettings.copyFrom(mRemoteSettings); mSettings.postFormats = currentPostFormats; mSettings.location = location; mSettings.optimizedImage = optimizeImaged; SiteSettingsTable.saveSettings(mSettings); notifyUpdatedOnUiThread(null); } } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error response to Settings REST request: " + error); notifyUpdatedOnUiThread(error); } }); }

Target:
protected void fetchRemoteData() { fetchCategories(); WordPress.getRestClientUtils().getGeneralSettings( mSite.getSiteId(), new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { AppLog.d(AppLog.T.API, "Received response to Settings REST request."); credentialsVerified(true); mRemoteSettings.localTableId = mSite.getId(); deserializeDotComRestResponse(mSite, response); if (!mRemoteSettings.equals(mSettings)) { final Map<String, String> currentPostFormats = mSettings.postFormats; boolean location = mSettings.location; boolean optimizedImage = mSettings.optimizedImage; mSettings.copyFrom(mRemoteSettings); mSettings.postFormats = currentPostFormats; mSettings.location = location; mSettings.optimizedImage = optimizedImage; SiteSettingsTable.saveSettings(mSettings); notifyUpdatedOnUiThread(null); } } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error response to Settings REST request: " + error); notifyUpdatedOnUiThread(error); } }); }
Source:
public void onReceive(Context context, Intent data) { DataHandler dh = KissApplication.getDataHandler(context); ShortcutProvider sp = dh.getShortcutProvider(); if (sp == null) return; String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME); Log.d("onReceive", "Received shortcut " + name); if (sp.findByName(name) != null || dh.getContactProvider().findByName(name) != null || dh.getAppProvider().findByName(name) != null ) { Log.d("onReceive", "Duplicated shortcut " + name + ", ignoring"); return; } Intent target = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT); if (target.getAction() == null) { target.setAction(Intent.ACTION_VIEW); } ShortcutPojo pojo = createPojo(name); pojo.intentUri = target.toUri(0); Bitmap icon = (Bitmap) data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON); if (icon != null) { Log.d("onReceive", "Shortcut " + name + " has embedded icon"); pojo.icon = icon; } else { ShortcutIconResource sir = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE); if (sir != null) { Log.d("onReceive", "Received icon package name " + sir.packageName); Log.d("onReceive", "Received icon resource name " + sir.resourceName); pojo.packageName = sir.packageName; pojo.resourceName = sir.resourceName; } else { Log.d("onReceive", "Invalid shortcut " + name + ", ignoring"); return; } } dh.addShortcut(pojo); }

Target:
public void onReceive(Context context, Intent data) { DataHandler dh = KissApplication.getDataHandler(context); ShortcutsProvider sp = dh.getShortcutsProvider(); if (sp == null) return; String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME); Log.d("onReceive", "Received shortcut " + name); if (sp != null && sp.findByName(name) != null || dh.getContactsProvider().findByName(name) != null || dh.getAppProvider().findByName(name) != null ) { Log.d("onReceive", "Duplicated shortcut " + name + ", ignoring"); return; } Intent target = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT); if (target.getAction() == null) { target.setAction(Intent.ACTION_VIEW); } ShortcutsPojo pojo = createPojo(name); pojo.intentUri = target.toUri(0); Bitmap icon = (Bitmap) data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON); if (icon != null) { Log.d("onReceive", "Shortcut " + name + " has embedded icon"); pojo.icon = icon; } else { ShortcutIconResource sir = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE); if (sir != null) { Log.d("onReceive", "Received icon package name " + sir.packageName); Log.d("onReceive", "Received icon resource name " + sir.resourceName); pojo.packageName = sir.packageName; pojo.resourceName = sir.resourceName; } else { Log.d("onReceive", "Invalid shortcut " + name + ", ignoring"); return; } } dh.addShortcut(pojo); }
Source:
public void sendsHttpRequestAndProcessesHttpBinaryResponse() throws Exception { new FakeRequest() .withStatus(HttpURLConnection.HTTP_OK) .withReason(REASON_OK) .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN) .withBody(BODY_HOW_ARE_YOU.getBytes()) .uri().path(PATH_HELLO_ALL).back() .method(Request.POST) .fetch().as(RestResponse.class) .assertStatus(HttpURLConnection.HTTP_OK) .assertHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN) .assertBinary(Matchers.equalTo(BODY_HOW_ARE_YOU.getBytes())); }

Target:
public void sendsHttpRequestAndProcessesHttpBinaryResponse() throws Exception { final byte[] content = "Binary body content".getBytes(); this.generateMainRequest() .withBody(content) .uri().path("/binContent").back() .method(Request.POST) .fetch().as(RestResponse.class) .assertStatus(HttpURLConnection.HTTP_OK) .assertHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN) .assertBinary(Matchers.equalTo(content)); }
Source:
protected void clearContent() { fXYPresentationProvider.clear(); getSwtChart().getAxisSet().getXAxis(0).getTick().setFormat(null); super.clearContent(); }

Target:
protected void clearContent() { getSwtChart().getAxisSet().getXAxis(0).getTick().setFormat(null); super.clearContent(); }
Source:
private void runMoves(final String firstContextId, final String secondContextId) { String srcId = firstContextId; String destId = secondContextId; for (int i = 0; i < iterations; i++) { final Set<LongRange> srcRangeSet = partitionManager.getRangeSet(srcId, SimpleEMTask.KEY); final long numToMove = getNumUnits(srcRangeSet) / 2; LOG.info("Move partitions of total size " + numToMove + " from " + srcId + " to " + destId); final Set<LongRange> rangeSetToMove = getRangeSetToMove(srcId, destId, srcRangeSet, numToMove); for (final LongRange range : rangeSetToMove) { LOG.info("- " + range + ", size: " + (range.getMaximumLong() - range.getMinimumLong() + 1)); } final boolean[] moveSucceeded = {false}; try (final TraceScope moveTraceScope = Trace.startSpan("simpleMove", Sampler.ALWAYS)) { emService.move(SimpleEMTask.KEY, rangeSetToMove, srcId, destId, new EventHandler<AvroElasticMemoryMessage>() { @Override public void onNext(final AvroElasticMemoryMessage emMsg) { synchronized (SimpleEMDriver.this) { moveSucceeded[0] = emMsg.getResultMsg().getResult().equals(Result.SUCCESS) ? true : false; LOG.info("Move " + emMsg.getOperationId() + (moveSucceeded[0] ? " succeeded" : " failed")); SimpleEMDriver.this.notifyAll(); } } }); } final String tmpContextId = srcId; srcId = destId; destId = tmpContextId; synchronized (this) { try { wait(periodMillis); if (!moveSucceeded[0]) { throw new RuntimeException("Move failed on iteration " + i); } } catch (InterruptedException e) { throw new RuntimeException("Move wait interrupted on iteration " + i, e); } } } }

Target:
private void runMoves(final String firstContextId, final String secondContextId) { String srcId = firstContextId; String destId = secondContextId; for (int i = 0; i < iterations; i++) { final Set<LongRange> srcRangeSet = partitionManager.getRangeSet(srcId, SimpleEMTask.KEY); final long numToMove = getNumUnits(srcRangeSet) / 2; LOG.info("Move partitions of total size " + numToMove + " from " + srcId + " to " + destId); final Set<LongRange> rangeSetToMove = getRangeSetToMove(srcId, destId, srcRangeSet, numToMove); for (final LongRange range : rangeSetToMove) { LOG.info("- " + range + ", size: " + (range.getMaximumLong() - range.getMinimumLong() + 1)); } final boolean[] moveSucceeded = {false}; try (final TraceScope moveTraceScope = Trace.startSpan("simpleMove", Sampler.ALWAYS)) { emService.move(SimpleEMTask.KEY, rangeSetToMove, srcId, destId, new EventHandler<AvroElasticMemoryMessage>() { @Override public void onNext(final AvroElasticMemoryMessage emMsg) { synchronized (SimpleEMDriver.this) { moveSucceeded[0] = emMsg.getResultMsg().getResult().equals(Result.SUCCESS) ? true : false; LOG.info("Move " + emMsg.getOperationId() + (moveSucceeded[0] ? " succeeded" : " failed")); SimpleEMDriver.this.notifyAll(); } } }); } final String tmpContextId = srcId; srcId = destId; destId = tmpContextId; synchronized (this) { try { wait(periodMillis); if (!moveSucceeded[0]) { throw new RuntimeException("Move failed on iteration " + i); } } catch (final InterruptedException e) { throw new RuntimeException("Move wait interrupted on iteration " + i, e); } } } }
Source:
public boolean isProcessable(final long wallClockTime) { if (state() == State.CLOSED || state() == State.CLOSING) { log.info("Stream task is already in state, skip adding records to it.", id(), state()); return false; } if (partitionGroup.allPartitionsBuffered()) { idleStartTime = RecordQueue.UNKNOWN; return true; } else if (partitionGroup.numBuffered() > 0) { if (idleStartTime == RecordQueue.UNKNOWN) { idleStartTime = wallClockTime; } if (wallClockTime - idleStartTime >= maxTaskIdleMs) { enforcedProcessingSensor.record(); return true; } else { return false; } } else { idleStartTime = RecordQueue.UNKNOWN; return false; } }

Target:
public boolean isProcessable(final long wallClockTime) { if (state() == State.CLOSED || state() == State.CLOSING) { log.info("Stream task is already in state, skip processing it.", id(), state()); return false; } if (partitionGroup.allPartitionsBuffered()) { idleStartTime = RecordQueue.UNKNOWN; return true; } else if (partitionGroup.numBuffered() > 0) { if (idleStartTime == RecordQueue.UNKNOWN) { idleStartTime = wallClockTime; } if (wallClockTime - idleStartTime >= maxTaskIdleMs) { enforcedProcessingSensor.record(); return true; } else { return false; } } else { idleStartTime = RecordQueue.UNKNOWN; return false; } }
Source:
public ImmutableList<RateAccrualPeriod> createAccrualPeriods( Schedule accrualSchedule, Schedule paymentSchedule, ReferenceData refData) { DoubleArray resolvedGearings = firstNonNull(gearing, ALWAYS_1).resolveValues(accrualSchedule); DoubleArray resolvedSpreads = firstNonNull(spread, ALWAYS_0).resolveValues(accrualSchedule); DateAdjuster fixingDateAdjuster = fixingDateOffset.resolve(refData); Function<SchedulePeriod, Schedule> resetScheduleFn = getResetPeriods().map(rp -> getIndex().getCurrency().equals(CNY) && rp.getResetFrequency().equals(P1W) ? rp.createSchedule(RollConventions.NONE, refData) : rp.createSchedule(accrualSchedule.getRollConvention(), refData)).orElse(null); Function<LocalDate, IborIndexObservation> iborObservationFn = index.resolve(refData); Optional<SchedulePeriod> scheduleInitialStub = accrualSchedule.getInitialStub(); Optional<SchedulePeriod> scheduleFinalStub = accrualSchedule.getFinalStub(); ImmutableList.Builder<RateAccrualPeriod> accrualPeriods = ImmutableList.builder(); for (int i = 0; i < accrualSchedule.size(); i++) { SchedulePeriod period = accrualSchedule.getPeriod(i); RateComputation rateComputation = createRateComputation( period, fixingDateAdjuster, resetScheduleFn, iborObservationFn, i, scheduleInitialStub, scheduleFinalStub, refData); double yearFraction = period.yearFraction(dayCount, accrualSchedule); accrualPeriods.add(new RateAccrualPeriod( period, yearFraction, rateComputation, resolvedGearings.get(i), resolvedSpreads.get(i), negativeRateMethod)); } return accrualPeriods.build(); }

Target:
public ImmutableList<RateAccrualPeriod> createAccrualPeriods( Schedule accrualSchedule, Schedule paymentSchedule, ReferenceData refData) { DoubleArray resolvedGearings = firstNonNull(gearing, ALWAYS_1).resolveValues(accrualSchedule); DoubleArray resolvedSpreads = firstNonNull(spread, ALWAYS_0).resolveValues(accrualSchedule); DateAdjuster fixingDateAdjuster = fixingDateOffset.resolve(refData); Function<SchedulePeriod, Schedule> resetScheduleFn = getResetPeriods().map(rp -> accrualSchedule.getFrequency().isMonthBased() && rp.getResetFrequency().isWeekBased() ? rp.createSchedule(RollConventions.NONE, refData) : rp.createSchedule(accrualSchedule.getRollConvention(), refData)) .orElse(null); Function<LocalDate, IborIndexObservation> iborObservationFn = index.resolve(refData); Optional<SchedulePeriod> scheduleInitialStub = accrualSchedule.getInitialStub(); Optional<SchedulePeriod> scheduleFinalStub = accrualSchedule.getFinalStub(); ImmutableList.Builder<RateAccrualPeriod> accrualPeriods = ImmutableList.builder(); for (int i = 0; i < accrualSchedule.size(); i++) { SchedulePeriod period = accrualSchedule.getPeriod(i); RateComputation rateComputation = createRateComputation( period, fixingDateAdjuster, resetScheduleFn, iborObservationFn, i, scheduleInitialStub, scheduleFinalStub, refData); double yearFraction = period.yearFraction(dayCount, accrualSchedule); accrualPeriods.add(new RateAccrualPeriod( period, yearFraction, rateComputation, resolvedGearings.get(i), resolvedSpreads.get(i), negativeRateMethod)); } return accrualPeriods.build(); }
Source:
public T setTosAndPrivacyPolicyUrls(@NonNull String tosUrl, @NonNull String privacyPolicyUrl) { mTosUrl = tosUrl; mPrivacyPolicyUrl = privacyPolicyUrl; return (T) this; }

Target:
public T setTosAndPrivacyPolicyUrls(@NonNull String tosUrl, @NonNull String privacyPolicyUrl) { Preconditions.checkNotNull(tosUrl, "tosUrl cannot be null"); Preconditions.checkNotNull(privacyPolicyUrl, "privacyPolicyUrl cannot be null"); mTosUrl = tosUrl; mPrivacyPolicyUrl = privacyPolicyUrl; return (T) this; }
Source:
public long nextRowGroupSize(long outPos) { if (maxPaddingSize <= 0) { return rowGroupSize; } long remaining = dfsBlockSize - (outPos % dfsBlockSize); if (isPaddingNeeded(remaining)) { remaining = dfsBlockSize; } if (rowGroupSize < remaining - maxPaddingSize) { return rowGroupSize - maxPaddingSize/2; } else { return remaining - maxPaddingSize/2; } }

Target:
public long nextRowGroupSize(long outPos) { if (maxPaddingSize <= 0) { return rowGroupSize; } long remaining = dfsBlockSize - (outPos % dfsBlockSize); if (isPaddingNeeded(remaining)) { remaining = dfsBlockSize; } if (rowGroupSize < remaining - maxPaddingSize) { return rowGroupSize; } else { return remaining - maxPaddingSize/2; } }
Source:
public Map<String, String[]> getParameterMap() { if (body == null) { return super.getParameterMap(); } Map<String, String[]> params = new HashMap<>(); if (RequestMethod.POST.name().equals(getMethod()) || RequestMethod.PUT.name().equals(getMethod())) { if (getContentType() != null && getContentType().contains("application/x-www-form-urlencoded")) { fillParams(params, new String(body, Charset.forName(Citrus.CITRUS_FILE_ENCODING))); } else { return super.getParameterMap(); } } else { fillParams(params, getQueryString()); } return params; }

Target:
public Map<String, String[]> getParameterMap() { if (body == null) { return super.getParameterMap(); } Map<String, String[]> params = new HashMap<>(); if (RequestMethod.POST.name().equals(getMethod()) || RequestMethod.PUT.name().equals(getMethod())) { if (getContentType() != null && getContentType().startsWith("application/x-www-form-urlencoded")) { fillParams(params, new String(body, Charset.forName(Citrus.CITRUS_FILE_ENCODING))); } else { return super.getParameterMap(); } } else { fillParams(params, getQueryString()); } return params; }
Source:
public List<VDS> filter(List<VDS> hosts, VM vm, Map<String, String> parameters, List<String> messages) { if (vm.isHostedEngine()) { List<VDS> hostsToRunOn = new ArrayList<VDS>(); for (VDS host : hosts) { int haScore = host.getDynamicData().getHighlyAvailableScore(); if (haScore > 0) { hostsToRunOn.add(host); log.debugFormat("Host {0} wasn't filtered out as it has a score of {1}", host.getName(), haScore); } else { log.debugFormat("Host {0} was filtered out as it doesn't have a positive score (the score is {1})", host.getName(), haScore); } } if (hostsToRunOn.isEmpty()) { messages.add(VdcBllMessages.ACTION_TYPE_FAILED_NO_HA_VDS.name()); } return hostsToRunOn; } else { return hosts; } }

Target:
public List<VDS> filter(List<VDS> hosts, VM vm, Map<String, String> parameters, List<String> messages) { if (vm.isHostedEngine()) { List<VDS> hostsToRunOn = new ArrayList<VDS>(); for (VDS host : hosts) { int haScore = host.getHighlyAvailableScore(); if (haScore > 0) { hostsToRunOn.add(host); log.debugFormat("Host {0} wasn't filtered out as it has a score of {1}", host.getName(), haScore); } else { log.debugFormat("Host {0} was filtered out as it doesn't have a positive score (the score is {1})", host.getName(), haScore); } } if (hostsToRunOn.isEmpty()) { messages.add(VdcBllMessages.ACTION_TYPE_FAILED_NO_HA_VDS.name()); } return hostsToRunOn; } else { return hosts; } }
Source:
private void updateFavorites() { ObservableList<SelectableResource> lst = FXCollections.observableArrayList(); if (ps.getMetadata() != null) { lst.addAll(ps.getMetadata().getAvailableTypes() .stream() .map(r -> new SelectableResource(r, null)) .collect(Collectors.toList())); } lst.forEach(sr -> sr.selectedProperty().addListener( (p, o, n) -> cs.getSelectedTypes().setAll( favoritesList.getItems() .filtered(SelectableResource::getSelected))) ); favoritesList.setItems(lst); }

Target:
private void updateFavorites() { if (ps.getMetadata() != null) { items.setAll(ps.getMetadata().getAvailableTypes() .stream() .map(r -> new ResourceAdapter(r, null)) .collect(Collectors.toList())); } }
Source:
public Object postProcess(Object bean, String beanName, Method method, List<Annotation> annotations) { String channelName = MessagingAnnotationUtils.resolveAttribute(annotations, AnnotationUtils.VALUE, String.class); Assert.hasText(channelName, "The channel ('value' attribute of @InboundChannelAdapter) can't be empty."); MessageSource<?> messageSource = null; try { messageSource = createMessageSource(bean, beanName, method); } catch (NoSuchBeanDefinitionException e) { if (this.logger.isDebugEnabled()) { this.logger.debug("Skipping endpoint creation; " + e.getMessage() + "; perhaps due to some '@Conditional' annotation."); } return null; } MessageChannel channel; try { channel = this.channelResolver.resolveDestination(channelName); } catch (DestinationResolutionException e) { channel = new DirectChannel(); this.beanFactory.registerSingleton(channelName, channel); channel = (MessageChannel) this.beanFactory.initializeBean(channel, channelName); } Assert.notNull(channel, "failed to resolve channel '" + channelName + "'"); SourcePollingChannelAdapter adapter = new SourcePollingChannelAdapter(); adapter.setOutputChannel(channel); adapter.setSource(messageSource); configurePollingEndpoint(adapter, annotations); return adapter; }

Target:
public Object postProcess(Object bean, String beanName, Method method, List<Annotation> annotations) { String channelName = MessagingAnnotationUtils.resolveAttribute(annotations, AnnotationUtils.VALUE, String.class); Assert.hasText(channelName, "The channel ('value' attribute of @InboundChannelAdapter) can't be empty."); MessageSource<?> messageSource = null; try { messageSource = createMessageSource(bean, beanName, method); } catch (NoSuchBeanDefinitionException e) { if (this.logger.isDebugEnabled()) { this.logger.debug("Skipping endpoint creation; " + e.getMessage() + "; perhaps due to some '@Conditional' annotation."); } return null; } SourcePollingChannelAdapter adapter = new SourcePollingChannelAdapter(); adapter.setOutputChannelName(channelName); adapter.setSource(messageSource); configurePollingEndpoint(adapter, annotations); return adapter; }
Source:
public static Deserializer getDeserializer(Configuration configuration, Properties schema) { String name = getDeserializerClassName(schema); Deserializer deserializer = createDeserializer(getDeserializerClass(name)); configuration = copy(configuration); initializeDeserializer(configuration, deserializer, schema); return deserializer; }

Target:
public static Deserializer getDeserializer(Configuration configuration, Properties schema) { String name = getDeserializerClassName(schema); Deserializer deserializer = createDeserializer(getDeserializerClass(name)); initializeDeserializer(configuration, deserializer, schema); return deserializer; }
Source:
protected AbstractDownlinkRequest(LwM2mPath path) { if (path == null){ throw new InvalidRequestException("path is mandatory"); } if (path.isRoot()) { throw new InvalidRequestException("downlink request cannot target root path: " + path.toString()); } if (path.isResourceInstance()) { throw new InvalidRequestException( "downlink request cannot target resource instance path: " + path.toString()); } this.path = path; }

Target:
protected AbstractDownlinkRequest(LwM2mPath path) { if (path == null) throw new InvalidRequestException("path is mandatory"); if (path.isRoot()) throw new InvalidRequestException("downlink request cannot target root path: " + path.toString()); if (path.isResourceInstance()) throw new InvalidRequestException( "downlink request cannot target resource instance path: " + path.toString()); this.path = path; }
Source:
public String extractClusterManagerAddress(Stack stack) { if (stack.getLoadBalancers() != null && stack.getLoadBalancers().size() != 0) { return (stack.getLoadBalancers().stream() .filter(lb -> lb.getType() == LoadBalancerType.PUBLIC).findAny() .orElse(stack.getLoadBalancers().iterator().next())) .getFqdn(); } String fqdn = stack.getFqdn(); if (fqdn != null) { return fqdn; } String clusterManagerIp = stack.getClusterManagerIp(); if (clusterManagerIp != null) { return clusterManagerIp; } return extractClusterManagerIp(stack.getId()); }

Target:
public String extractClusterManagerAddress(Stack stack) { String fqdn = loadBalancerConfigService.getLoadBalancerUserFacingFQDN(stack.getId()); fqdn = isEmpty(fqdn) ? stack.getFqdn() : fqdn; if (isNotEmpty(fqdn)) { return fqdn; } String clusterManagerIp = stack.getClusterManagerIp(); if (isNotEmpty(clusterManagerIp)) { return clusterManagerIp; } return extractClusterManagerIp(stack.getId()); }