auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void start(final BundleContext context) throws Exception { super.start(context); ResourcesPlugin.getWorkspace().addResourceChangeListener(SONARLINT_PROJECT_EVENT_LISTENER); ResourcesPlugin.getWorkspace().addResourceChangeListener(SONARLINT_CHANGE_LISTENER, IResourceChangeEvent.POST_CHANGE); logListener = new SonarLintConsoleLogger(); SonarLintLogger.get().addLogListener(logListener); prefListener = event -> { if (event.getProperty().equals(PreferencesUtils.PREF_MARKER_SEVERITY)) { try { MarkerUtils.updateAllSonarMarkerSeverity(); } catch (CoreException e) { SonarLintLogger.get().error("Unable to update marker severity", e); } } }; getPreferenceStore().addPropertyChangeListener(prefListener); SonarLintLogger.get().info("Starting SonarLint for Eclipse " + SonarLintUtils.getPluginVersion()); checkServersStatus(); new CheckForUpdatesJob().schedule((long) 10 * 1000); analyzeOpenedFiles(); }

Target:
public void start(final BundleContext context) throws Exception { super.start(context); ResourcesPlugin.getWorkspace().addResourceChangeListener(SONARLINT_CHANGE_LISTENER, IResourceChangeEvent.POST_CHANGE); ResourcesPlugin.getWorkspace().addResourceChangeListener(SONARLINT_PROJECT_EVENT_LISTENER); logListener = new SonarLintConsoleLogger(); SonarLintLogger.get().addLogListener(logListener); prefListener = event -> { if (event.getProperty().equals(PreferencesUtils.PREF_MARKER_SEVERITY)) { try { MarkerUtils.updateAllSonarMarkerSeverity(); } catch (CoreException e) { SonarLintLogger.get().error("Unable to update marker severity", e); } } }; getPreferenceStore().addPropertyChangeListener(prefListener); SonarLintLogger.get().info("Starting SonarLint for Eclipse " + SonarLintUtils.getPluginVersion()); checkServersStatus(); new CheckForUpdatesJob().schedule((long) 10 * 1000); analyzeOpenedFiles(); subscribeToNotifications(); }
Source:
public Optional<? extends ConnectorPageSource> createPageSource( Configuration configuration, ConnectorSession session, Path path, long start, long length, long fileSize, Storage storage, Map<String, String> tableParameters, List<HiveColumnHandle> columns, TupleDomain<HiveColumnHandle> effectivePredicate, DateTimeZone hiveStorageTimeZone, HiveFileContext hiveFileContext) { if (!PageInputFormat.class.getSimpleName().equals(storage.getStorageFormat().getInputFormat())) { return Optional.empty(); } FSDataInputStream inputStream; try { inputStream = hdfsEnvironment.getFileSystem(session.getUser(), path, configuration).openFile(path, hiveFileContext); } catch (Exception e) { if (nullToEmpty(e.getMessage()).trim().equals("Filesystem closed") || e instanceof FileNotFoundException) { throw new PrestoException(HIVE_CANNOT_OPEN_SPLIT, e); } throw new PrestoException(HIVE_CANNOT_OPEN_SPLIT, splitError(e, path, start, length), e); } try { PageFilePageSource pageFilePageSource = new PageFilePageSource(inputStream, start, length, fileSize, blockEncodingSerde, columns); return Optional.of(pageFilePageSource); } catch (Throwable e) { try { inputStream.close(); } catch (IOException ignored) { } if (e instanceof PrestoException) { throw (PrestoException) e; } String message = splitError(e, path, start, length); if (e instanceof PageFileCorruptionException) { throw new PrestoException(HIVE_BAD_DATA, message, e); } throw new PrestoException(HIVE_CANNOT_OPEN_SPLIT, message, e); } }

Target:
public Optional<? extends ConnectorPageSource> createPageSource( Configuration configuration, ConnectorSession session, Path path, long start, long length, long fileSize, Storage storage, Map<String, String> tableParameters, List<HiveColumnHandle> columns, TupleDomain<HiveColumnHandle> effectivePredicate, DateTimeZone hiveStorageTimeZone, HiveFileContext hiveFileContext) { if (!PageInputFormat.class.getSimpleName().equals(storage.getStorageFormat().getInputFormat())) { return Optional.empty(); } FSDataInputStream inputStream; try { inputStream = hdfsEnvironment.getFileSystem(session.getUser(), path, configuration).openFile(path, hiveFileContext); } catch (Exception e) { if (nullToEmpty(e.getMessage()).trim().equals("Filesystem closed") || e instanceof FileNotFoundException) { throw new PrestoException(HIVE_CANNOT_OPEN_SPLIT, e); } throw new PrestoException(HIVE_CANNOT_OPEN_SPLIT, splitError(e, path, start, length), e); } try { PageFilePageSource pageFilePageSource = new PageFilePageSource(inputStream, start, length, fileSize, blockEncodingSerde, columns); return Optional.of(pageFilePageSource); } catch (Throwable e) { try { inputStream.close(); } catch (IOException ignored) { } propagateIfPossible(e, PrestoException.class); throw new PrestoException(HIVE_CANNOT_OPEN_SPLIT, splitError(e, path, start, length), e); } }
Source:
protected ToStringHelper string() { return Objects.toStringHelper(this) .add("id", id).add("account", account).add("displayText", displayText) .add("domain", domain).add("domainId", domainId).add("name", name).add("state", state); }

Target:
protected ToStringHelper string() { return Objects.toStringHelper(this).omitNullValues() .add("id", id).add("account", account).add("displayText", displayText) .add("domain", domain).add("domainId", domainId).add("name", name).add("state", state); }
Source:
private int getFlexFecHeaderOffset() { return this.getHeaderLength(); }

Target:
public int getFlexFecHeaderOffset() { return getOffset() + this.getHeaderLength(); }
Source:
void flushOnLaunch(final ErrorReportApiClient errorReportApiClient) { final List<File> crashReports = findLaunchCrashReports(); if (crashReports.isEmpty() && config.getLaunchCrashThresholdMs() > 0) { flushAsync(errorReportApiClient); } else { completed = false; HandlerThread handlerThread = new HandlerThread("Bugsnag Launch Crash Thread"); handlerThread.start(); Handler handler = new Handler(handlerThread.getLooper()); handler.post(new Runnable() { @Override public void run() { Logger.info("Attempting to send launch crash reports"); for (File crashReport : crashReports) { flushErrorReport(crashReport, errorReportApiClient); } Logger.info("Delivered all launch crash reports"); completed = true; } }); long waitMs = 0; while (!completed && waitMs < LAUNCH_CRASH_TIMEOUT_MS) { try { Thread.sleep(LAUNCH_CRASH_POLL_MS); waitMs += LAUNCH_CRASH_POLL_MS; } catch (InterruptedException e) { Logger.warn("Interrupted while waiting for launch crash report request"); } } handlerThread.quit(); Logger.info("Continuing with Bugsnag initialisation"); } }

Target:
void flushOnLaunch(final ErrorReportApiClient errorReportApiClient) { final List<File> crashReports = findLaunchCrashReports(); if (crashReports.isEmpty() && config.getLaunchCrashThresholdMs() > 0) { flushAsync(errorReportApiClient); } else { flushOnLaunchCompleted = false; Async.run(new Runnable() { @Override public void run() { Logger.info("Attempting to send launch crash reports"); for (File crashReport : crashReports) { flushErrorReport(crashReport, errorReportApiClient); } Logger.info("Delivered all launch crash reports"); flushOnLaunchCompleted = true; } }); long waitMs = 0; while (!flushOnLaunchCompleted && waitMs < LAUNCH_CRASH_TIMEOUT_MS) { try { Thread.sleep(LAUNCH_CRASH_POLL_MS); waitMs += LAUNCH_CRASH_POLL_MS; } catch (InterruptedException e) { Logger.warn("Interrupted while waiting for launch crash report request"); } } Logger.info("Continuing with Bugsnag initialisation"); } }
Source:
public void setUpPerTest() { userAnonymizedRepository.deleteAll(); JUnitUtil.setUpRepositoryMock(mockUserRepository); JUnitUtil.setUpRepositoryMock(mockMessageSourceRepository); Map<Class<?>, Repository<?, ?>> repositoriesMap = new HashMap<>(); repositoriesMap.put(User.class, mockUserRepository); repositoriesMap.put(MessageSource.class, mockMessageSourceRepository); repositoriesMap.put(UserAnonymized.class, userAnonymizedRepository); JUnitUtil.setUpRepositoryProviderMock(repositoriesMap); try (CryptoSession cryptoSession = CryptoSession.start(password)) { richard = JUnitUtil.createRichard(); } when(mockUserRepository.findOne(richard.getId())).thenReturn(richard); }

Target:
public void setUpPerTest() { try (CryptoSession cryptoSession = CryptoSession.start(password)) { richard = JUnitUtil.createRichard(); } reset(userRepository); }
Source:
private synchronized void refreshSockets() { refreshAperture(); int n = pendingSockets + activeSockets.holder.size(); if (n < targetAperture && !activeFactories.holder.isEmpty()) { logger.debug("aperture is below target {}, adding sockets", n, targetAperture, targetAperture - n); addSockets(targetAperture - n); } else if (targetAperture < activeSockets.holder.size()) { logger.debug("aperture is above target {}, quicking 1 socket", n, targetAperture); quickSlowestRS(); } long now = Clock.now(); if (now - lastRefresh >= refreshPeriod) { if (eventListener != null) { eventListener.socketsRefreshStart(); } long prev = refreshPeriod; refreshPeriod = (long) Math.min(refreshPeriod * 1.5, maxRefreshPeriod); logger.debug("Bumping refresh period, {}->{}", prev / 1000, refreshPeriod / 1000); if (prev != refreshPeriod && eventListener != null) { eventListener.socketRefreshPeriodChanged(prev, refreshPeriod, Clock.unit()); } lastRefresh = now; addSockets(1); if (eventListener != null) { eventListener.socketsRefreshCompleted(Clock.elapsedSince(now), Clock.unit()); } } }

Target:
private synchronized void refreshSockets() { refreshAperture(); int n = pendingSockets + activeSockets.size(); if (n < targetAperture && !activeFactories.holder.isEmpty()) { logger.debug("aperture is below target {}, adding sockets", n, targetAperture, targetAperture - n); addSockets(targetAperture - n); } else if (targetAperture < activeSockets.size()) { logger.debug("aperture is above target {}, quicking 1 socket", n, targetAperture); quickSlowestRS(); } long now = Clock.now(); if (now - lastRefresh >= refreshPeriod) { if (eventListener != null) { eventListener.socketsRefreshStart(); } long prev = refreshPeriod; refreshPeriod = (long) Math.min(refreshPeriod * 1.5, maxRefreshPeriod); logger.debug("Bumping refresh period, {}->{}", prev / 1000, refreshPeriod / 1000); if (prev != refreshPeriod && eventListener != null) { eventListener.socketRefreshPeriodChanged(prev, refreshPeriod, Clock.unit()); } lastRefresh = now; addSockets(1); if (eventListener != null) { eventListener.socketsRefreshCompleted(Clock.elapsedSince(now), Clock.unit()); } } }
Source:
private String getPriceProviderTooltipString() { String selectedCurrencyCode = model.getPriceFeedService().getCurrencyCode(); MarketPrice selectedMarketPrice = model.getPriceFeedService().getMarketPrice(selectedCurrencyCode); if (selectedMarketPrice == null) { return ""; } return Res.get("mainView.marketPrice.tooltip", "Bisq Price Index for " + selectedCurrencyCode, "", DisplayUtils.formatTime(new Date(selectedMarketPrice.getTimestampSec())), model.getPriceFeedService().getProviderNodeAddress()); }

Target:
private String getPriceProviderTooltipString() { String selectedCurrencyCode = model.getPriceFeedService().getCurrencyCode(); MarketPrice selectedMarketPrice = model.getPriceFeedService().getMarketPrice(selectedCurrencyCode); return Res.get("mainView.marketPrice.tooltip", "Bisq Price Index for " + selectedCurrencyCode, "", selectedMarketPrice != null ? DisplayUtils.formatTime(new Date(selectedMarketPrice.getTimestampSec())) : Res.get("shared.na"), model.getPriceFeedService().getProviderNodeAddress()); }
Source:
private void addSuggestion(Map<Account.Id, AccountInfo> map, Account account, AccountInfo info, VisibilityControl visibilityControl) throws OrmException { if (map.containsKey(account.getId())) { return; } if (!account.isActive()) { return; } if (visibilityControl.isVisible(account)) { map.put(account.getId(), info); } }

Target:
private void addSuggestion(Map<Account.Id, AccountInfo> map, Account account, AccountInfo info, VisibilityControl visibilityControl) throws OrmException { if (!map.containsKey(account.getId()) && account.isActive() && visibilityControl.isVisibleTo(account)) { map.put(account.getId(), info); } }
Source:
private String getJobCoordinationZkPath(Config config) { JobConfig jobConfig = new JobConfig(config); String appId = new ApplicationConfig(config).getGlobalAppId(); String jobName = jobConfig.getName().isDefined() ? jobConfig.getName().get() : DEFAULT_JOB_NAME; String jobId = jobConfig.getJobId().isDefined() ? jobConfig.getJobId().get() : String.valueOf(System.currentTimeMillis()); return String.format(JOB_COORDINATOR_ZK_PATH_FORMAT, appId, jobName, jobId); }

Target:
private String getJobCoordinationZkPath(Config config) { JobConfig jobConfig = new JobConfig(config); String appId = new ApplicationConfig(config).getGlobalAppId(); String jobName = jobConfig.getName().isDefined() ? jobConfig.getName().get() : DEFAULT_JOB_NAME; String jobId = jobConfig.getJobId().isDefined() ? jobConfig.getJobId().get() : DEFAULT_JOB_ID; return String.format(JOB_COORDINATOR_ZK_PATH_FORMAT, appId, jobName, jobId); }
Source:
public float getFloat() { return delegate.getFloat(); }

Target:
public float getFloat() { if (isNullResult) { throw new IllegalStateException("Cannot return primitive float for Null Value"); } return delegate.getFloat(); }
Source:
private void processMessageBody(final Message message) throws XMLStreamException, IOException { boolean isLarge = false; for (int i = 0; i < reader.getAttributeCount(); i++) { String attributeName = reader.getAttributeLocalName(i); if (XmlDataConstants.MESSAGE_IS_LARGE.equals(attributeName)) { isLarge = Boolean.parseBoolean(reader.getAttributeValue(i)); } } reader.next(); ActiveMQServerLogger.LOGGER.debug("XMLStreamReader impl: " + reader); if (isLarge) { tempFileName = UUID.randomUUID().toString() + ".tmp"; ActiveMQServerLogger.LOGGER.debug("Creating temp file " + tempFileName + " for large message."); try (OutputStream out = new FileOutputStream(tempFileName)) { getMessageBodyBytes(new MessageBodyBytesProcessor() { @Override public void processBodyBytes(byte[] bytes) throws IOException { out.write(bytes); } }); } FileInputStream fileInputStream = new FileInputStream(tempFileName); BufferedInputStream bufferedInput = new BufferedInputStream(fileInputStream); ((ClientMessage) message).setBodyInputStream(bufferedInput); } else { getMessageBodyBytes(new MessageBodyBytesProcessor() { @Override public void processBodyBytes(byte[] bytes) throws IOException { message.getBodyBuffer().writeBytes(bytes); } }); } }

Target:
private void processMessageBody(final Message message) throws XMLStreamException, IOException { boolean isLarge = false; for (int i = 0; i < reader.getAttributeCount(); i++) { String attributeName = reader.getAttributeLocalName(i); if (XmlDataConstants.MESSAGE_IS_LARGE.equals(attributeName)) { isLarge = Boolean.parseBoolean(reader.getAttributeValue(i)); } } reader.next(); if (logger.isDebugEnabled()) { logger.debug("XMLStreamReader impl: " + reader); } if (isLarge) { tempFileName = UUID.randomUUID().toString() + ".tmp"; if (logger.isDebugEnabled()) { logger.debug("Creating temp file " + tempFileName + " for large message."); } try (OutputStream out = new FileOutputStream(tempFileName)) { getMessageBodyBytes(new MessageBodyBytesProcessor() { @Override public void processBodyBytes(byte[] bytes) throws IOException { out.write(bytes); } }); } FileInputStream fileInputStream = new FileInputStream(tempFileName); BufferedInputStream bufferedInput = new BufferedInputStream(fileInputStream); ((ClientMessage) message).setBodyInputStream(bufferedInput); } else { getMessageBodyBytes(new MessageBodyBytesProcessor() { @Override public void processBodyBytes(byte[] bytes) throws IOException { message.getBodyBuffer().writeBytes(bytes); } }); } }
Source:
public void start(StartContext context) throws StartException { preStart(context); serverService.getValue().registerListener(this); try { final InetSocketAddress socketAddress = binding.getValue().getSocketAddress(); openListener = createOpenListener(); final ChannelListener<AcceptingChannel<StreamConnection>> acceptListener = ChannelListeners.openListenerAdapter(openListener); HttpHandler handler = serverService.getValue().getRoot(); for(HandlerWrapper wrapper : listenerHandlerWrappers) { handler = wrapper.wrap(handler); } openListener.setRootHandler(handler); startListening(worker.getValue(), socketAddress, acceptListener); registerBinding(); } catch (IOException e) { cleanFailedStart(); if (e instanceof BindException) { final StringBuilder sb = new StringBuilder().append(e.getMessage()); final InetSocketAddress socketAddress = binding.getValue().getSocketAddress(); if (socketAddress != null) sb.append(" ").append(socketAddress); throw new StartException(sb.toString()); } else { throw new StartException("Could not start http listener", e); } } }

Target:
public void start(StartContext context) throws StartException { preStart(context); serverService.getValue().registerListener(this); try { final InetSocketAddress socketAddress = binding.getValue().getSocketAddress(); openListener = createOpenListener(); final ChannelListener<AcceptingChannel<StreamConnection>> acceptListener = ChannelListeners.openListenerAdapter(openListener); HttpHandler handler = serverService.getValue().getRoot(); for(HandlerWrapper wrapper : listenerHandlerWrappers) { handler = wrapper.wrap(handler); } openListener.setRootHandler(handler); startListening(worker.getValue(), socketAddress, acceptListener); registerBinding(); } catch (IOException e) { cleanFailedStart(); if (e instanceof BindException) { final StringBuilder sb = new StringBuilder().append(e.getLocalizedMessage()); final InetSocketAddress socketAddress = binding.getValue().getSocketAddress(); if (socketAddress != null) sb.append(" ").append(socketAddress); throw new StartException(sb.toString()); } else { throw UndertowLogger.ROOT_LOGGER.couldNotStartListener(name, e); } } }
Source:
public Optional<AuthorData> createFrom(DataHolder dataHolder) { if (!(dataHolder instanceof ItemStack)) { return Optional.absent(); } if (!(((ItemStack) dataHolder).getItem() == Items.written_book)) { return Optional.absent(); } if (!((ItemStack) dataHolder).hasTagCompound()) { return Optional.absent(); } final String rawAuthor = ((ItemStack) dataHolder).getTagCompound().getString("author"); final AuthorData data = create(); data.setValue(Texts.of(rawAuthor)); return Optional.of(data); }

Target:
public Optional<AuthorData> createFrom(DataHolder dataHolder) { if (!(dataHolder instanceof ItemStack)) { return Optional.absent(); } if (((ItemStack) dataHolder).getItem() != Items.written_book) { return Optional.absent(); } if (!((ItemStack) dataHolder).hasTagCompound()) { return Optional.absent(); } final String rawAuthor = ((ItemStack) dataHolder).getTagCompound().getString("author"); return Optional.of(create().setValue(Texts.of(rawAuthor))); }
Source:
public void test_relativeYearFraction( DayCount dayCount, int y1, int m1, int d1, int y2, int m2, int d2, Double value) { double expected = (value == SIMPLE_30_360 ? calc360(y1, m1, d1, y2, m2, d2) : value); LocalDate date1 = LocalDate.of(y1, m1, d1); LocalDate date2 = LocalDate.of(y2, m2, d2); assertEquals(dayCount.relativeYearFraction(date1, date2), expected, 0d); }

Target:
public void test_relativeYearFraction( DayCount dayCount, int y1, int m1, int d1, int y2, int m2, int d2, Double value) { double expected = (value == SIMPLE_30_360 ? calc360(y1, m1, d1, y2, m2, d2) : value); LocalDate date1 = LocalDate.of(y1, m1, d1); LocalDate date2 = LocalDate.of(y2, m2, d2); assertEquals(dayCount.relativeYearFraction(date1, date2), expected, TOLERANCE_ZERO); }
Source:
private RemoteServerDialog(RemoteServerDialogForm form, RemoteServer.Test serverTester) { this.form = form; this.form.onConnect(server -> { form.setTestingConnection(); new SwingWorker<Response<Boolean>, Void>() { @Override protected Response<Boolean> doInBackground() { return serverTester.test(server); } @Override protected void done() { try { Response<Boolean> response = get(); if (response.isSuccess()) { triggerConnect(server); form.hideDialog(); } else showError( response.isRedirection() ? "Redirection detected" : response.isUnauthorized() ? "Wrong credentials" : response.isNotFound() ? "Aggregate not found" : "", response.isRedirection() ? "Unexpected error" : "Configuration error" ); } catch (InterruptedException ignore) { } catch (ExecutionException e) { if (e.getCause() != null) { showError(e.getCause().getMessage(), "Unexpected error"); } } form.unsetTestingConnection(); form.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } }.execute(); }); }

Target:
private RemoteServerDialog(RemoteServerDialogForm form, RemoteServer.Test serverTester) { this.form = form; this.form.onConnect(server -> { form.setTestingConnection(); new SwingWorker<Response<Boolean>, Void>() { @Override protected Response<Boolean> doInBackground() { return serverTester.test(server); } @Override protected void done() { try { Response<Boolean> response = get(); if (response.isSuccess()) { triggerConnect(server); form.hideDialog(); } else showError( response.isRedirection() ? "Redirection detected" : response.isUnauthorized() ? "Wrong credentials" : response.isNotFound() ? "Aggregate not found" : "", response.isRedirection() ? "Unexpected error" : "Configuration error" ); } catch (InterruptedException ignore) { } catch (ExecutionException e) { if (e.getCause() != null) { showError(e.getCause().getMessage(), "Unexpected error"); } } form.unsetTestingConnection(); } }.execute(); }); }
Source:
public void computeAABB(AABB aabb, Transform xf, int childIndex) { assert childIndex < m_count; final Vec2 lower = aabb.lowerBound; final Vec2 upper = aabb.upperBound; int i1 = childIndex; int i2 = childIndex + 1; if (i2 == m_count) { i2 = 0; } final Vec2 vi1 = m_vertices[i1]; final Vec2 vi2 = m_vertices[i2]; final Rotation xfq = xf.q; final Vec2 xfp = xf.p; float v1x = (xfq.c * vi1.x - xfq.s * vi1.y) + xfp.x; float v1y = xfq.s * vi1.x + xfq.c * vi1.y + xfp.y; float v2x = (xfq.c * vi2.x - xfq.s * vi2.y) + xfp.x; float v2y = xfq.s * vi2.x + xfq.c * vi2.y + xfp.y; lower.x = v1x < v2x ? v1x : v2x; lower.y = v1y < v2y ? v1y : v2y; upper.x = v1x > v2x ? v1x : v2x; upper.y = v1y > v2y ? v1y : v2y; }

Target:
public void computeAABB(AABB aabb, Transform xf, int childIndex) { assert childIndex < m_count; final Vec2 lower = aabb.lowerBound; final Vec2 upper = aabb.upperBound; int i1 = childIndex; int i2 = childIndex + 1; if (i2 == m_count) { i2 = 0; } final Vec2 vi1 = m_vertices[i1]; final Vec2 vi2 = m_vertices[i2]; final Rotation xfq = xf.q; final Vec2 xfp = xf.p; float v1x = (xfq.c * vi1.x - xfq.s * vi1.y) + xfp.x; float v1y = (xfq.s * vi1.x + xfq.c * vi1.y) + xfp.y; float v2x = (xfq.c * vi2.x - xfq.s * vi2.y) + xfp.x; float v2y = xfq.s * vi2.x + xfq.c * vi2.y + xfp.y; lower.x = v1x < v2x ? v1x : v2x; lower.y = v1y < v2y ? v1y : v2y; upper.x = v1x > v2x ? v1x : v2x; upper.y = v1y > v2y ? v1y : v2y; }
Source:
public File persist( final IncrementalIndex index, final Interval dataInterval, File outDir, IndexSpec indexSpec, ProgressIndicator progress, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory ) throws IOException { if (index.isEmpty()) { throw new IAE("Trying to persist an empty index!"); } final DateTime firstTimestamp = index.getMinTime(); final DateTime lastTimestamp = index.getMaxTime(); if (!(dataInterval.contains(firstTimestamp) && dataInterval.contains(lastTimestamp))) { throw new IAE( "interval[%s] does not encapsulate the full range of timestamps[%s, %s]", dataInterval, firstTimestamp, lastTimestamp ); } FileUtils.forceMkdir(outDir); log.info("Starting persist for interval[%s], rows[%,d]", dataInterval, index.size()); return merge( Collections.<IndexableAdapter>singletonList( new IncrementalIndexAdapter( dataInterval, index, indexSpec.getBitmapSerdeFactory().getBitmapFactory() ) ), false, index.getMetricAggs(), outDir, indexSpec, progress, segmentWriteOutMediumFactory ); }

Target:
public File persist( final IncrementalIndex index, final Interval dataInterval, File outDir, IndexSpec indexSpec, ProgressIndicator progress, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory ) throws IOException { if (index.isEmpty()) { throw new IAE("Trying to persist an empty index!"); } final DateTime firstTimestamp = index.getMinTime(); final DateTime lastTimestamp = index.getMaxTime(); if (!(dataInterval.contains(firstTimestamp) && dataInterval.contains(lastTimestamp))) { throw new IAE( "interval[%s] does not encapsulate the full range of timestamps[%s, %s]", dataInterval, firstTimestamp, lastTimestamp ); } FileUtils.forceMkdir(outDir); log.info("Starting persist for interval[%s], rows[%,d]", dataInterval, index.size()); return merge( Collections.singletonList( new IncrementalIndexAdapter( dataInterval, index, indexSpec.getBitmapSerdeFactory().getBitmapFactory() ) ), false, index.getMetricAggs(), outDir, indexSpec, progress, segmentWriteOutMediumFactory ); }
Source:
public Response getDatabaseSegmentDataSourceSegments( @PathParam("dataSourceName") String dataSourceName, @QueryParam("full") String full, List<Interval> intervals ) { List<DataSegment> segments = null; try { segments = metadataStorageCoordinator.getUsedSegmentsForIntervals(dataSourceName, intervals); } catch (IOException ex) { return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ex.getMessage()).build(); } Response.ResponseBuilder builder = Response.status(Response.Status.OK); if (full != null) { return builder.entity(segments).build(); } return builder.entity( Iterables.transform( segments, new Function<DataSegment, Object>() { @Override public Object apply(DataSegment segment) { return segment.getIdentifier(); } } ) ).build(); }

Target:
public Response getDatabaseSegmentDataSourceSegments( @PathParam("dataSourceName") String dataSourceName, @QueryParam("full") String full, List<Interval> intervals ) { List<DataSegment> segments = null; try { segments = metadataStorageCoordinator.getUsedSegmentsForIntervals(dataSourceName, intervals); } catch (IOException ex) { return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ex.getMessage()).build(); } Response.ResponseBuilder builder = Response.status(Response.Status.OK); if (full != null) { return builder.entity(segments).build(); } return builder.entity( Iterables.transform( segments, new Function<DataSegment, String>() { @Override public String apply(DataSegment segment) { return segment.getIdentifier(); } } ) ).build(); }
Source:
public void onSocialLoginSuccess(String accessToken, String backend, Task task) { environment.getAnalyticsProvider().trackUserLogin(backend); tryToSetUIInteraction(false); task.setProgressDialog(activityLoginBinding.progress.progressIndicator); }

Target:
public void onSocialLoginSuccess(String accessToken, String backend, Task task) { tryToSetUIInteraction(false); task.setProgressDialog(activityLoginBinding.progress.progressIndicator); }
Source:
public Builder retriesForConnectionFailures(Integer retriesConnectionFailures) { checkNotNull(retriesConnectionFailures, "retriesConnectionFailures"); if (retriesConnectionFailures < 1) { throw new IllegalArgumentException("retriesConnectionFailure should be one or more"); } client.retriesForConnectionFailures = retriesConnectionFailures; return this; }

Target:
public Builder retriesForConnectionFailures(Integer retriesConnectionFailures) { if (retriesConnectionFailures < 1) { throw new IllegalArgumentException("retriesConnectionFailure should be one or more"); } client.retriesForConnectionFailures = retriesConnectionFailures; return this; }
Source:
public StageResult processAckOnMaster(List<DistStageAck> acks) { StageResult result = super.processAckOnMaster(acks); if (result.isError()) return result; Report.Test test = createTest(testName); int testIteration = test.getIterations().size(); for (ListenersAck ack : Projections.castProject(acks, ListenersAck.class)) { if (ack.stats != null) test.addStatistics(testIteration, ack.getSlaveIndex(), Collections.singletonList(ack.stats)); } return StageResult.SUCCESS; }

Target:
public StageResult processAckOnMaster(List<DistStageAck> acks) { StageResult result = super.processAckOnMaster(acks); if (result.isError()) return result; Report.Test test = createTest(testName, null); if (test != null) { int testIteration = test.getIterations().size(); for (ListenersAck ack : Projections.castProject(acks, ListenersAck.class)) { if (ack.stats != null) test.addStatistics(testIteration, ack.getSlaveIndex(), Collections.singletonList(ack.stats)); } } return StageResult.SUCCESS; }
Source:
public void setSelectionRange(int beginIndex, int endIndex) { if (fTableItemCount > 0) { int begin = Math.min(beginIndex, fTableItemCount - 1); begin = Math.max(begin, 0); int end = Math.min(endIndex, fTableItemCount - 1); end = Math.max(end, 0); fSelectedBeginRank = begin; fSelectedEventRank = end; if ((begin < fTableTopEventRank + fFrozenRowCount && begin >= fFrozenRowCount) || (begin >= fTableTopEventRank + fFullyVisibleRows)) { int lastPageTopEntryRank = Math.max(0, fTableItemCount - fFullyVisibleRows); fTableTopEventRank = Math.max(0, Math.min(lastPageTopEntryRank, begin - fFrozenRowCount - fFullyVisibleRows / 2)); } if (fFullyVisibleRows < fTableItemCount) { fSlider.setSelection(fTableTopEventRank); } refreshTable(); } }

Target:
public void setSelectionRange(int beginIndex, int endIndex) { if (fTableItemCount > 0) { int begin = Math.max(Math.min(beginIndex, fTableItemCount - 1), 0); int end = Math.max(Math.min(endIndex, fTableItemCount - 1), 0); int selection = fSelectedBeginRank != begin ? begin : end; fSelectedBeginRank = begin; fSelectedEventRank = end; if ((selection < fTableTopEventRank + fFrozenRowCount && selection >= fFrozenRowCount) || (selection >= fTableTopEventRank + fFullyVisibleRows)) { int lastPageTopEntryRank = Math.max(0, fTableItemCount - fFullyVisibleRows); fTableTopEventRank = Math.max(0, Math.min(lastPageTopEntryRank, selection - fFrozenRowCount - fFullyVisibleRows / 2)); } if (fFullyVisibleRows < fTableItemCount) { fSlider.setSelection(fTableTopEventRank); } refreshTable(); } }
Source:
public void retrieveEdit() throws Exception { RestResponse r = adminSession.get(urlEdit()); assertThat(r.getStatusCode()).isEqualTo(SC_NO_CONTENT); assertThat(modifier.createEdit(change, ps)).isEqualTo(RefUpdate.Result.NEW); Optional<ChangeEdit> edit = editUtil.byChange(change); assertThat(modifier.modifyFile(edit.get(), FILE_NAME, CONTENT_NEW)) .isEqualTo(RefUpdate.Result.FORCED); edit = editUtil.byChange(change); EditInfo info = toEditInfo(false); assertThat(info.commit.commit).isEqualTo(edit.get().getRevision().get()); assertThat(info.commit.parents.size()).isEqualTo(1); edit = editUtil.byChange(change); editUtil.delete(edit.get()); r = adminSession.get(urlEdit()); assertThat(r.getStatusCode()).isEqualTo(SC_NO_CONTENT); }

Target:
public void retrieveEdit() throws Exception { RestResponse r = adminSession.get(urlEdit()); assertThat(r.getStatusCode()).isEqualTo(SC_NO_CONTENT); assertThat(modifier.createEdit(change, ps)).isEqualTo(RefUpdate.Result.NEW); Optional<ChangeEdit> edit = editUtil.byChange(change); assertThat(modifier.modifyFile(edit.get(), FILE_NAME, CONTENT_NEW)) .isEqualTo(RefUpdate.Result.FORCED); edit = editUtil.byChange(change); EditInfo info = toEditInfo(false); assertThat(info.commit.commit).isEqualTo(edit.get().getRevision().get()); assertThat(info.commit.parents).hasSize(1); edit = editUtil.byChange(change); editUtil.delete(edit.get()); r = adminSession.get(urlEdit()); assertThat(r.getStatusCode()).isEqualTo(SC_NO_CONTENT); }
Source:
private JPanel pnlOnVertex(){ CategorizedPoint point = (CategorizedPoint) getLegend(); JRadioButton bVertex = new JRadioButton(ON_VERTEX); bVertex.addActionListener( EventHandler.create(ActionListener.class, point, "setOnVertex")); bVertex.addActionListener( EventHandler.create(ActionListener.class, this, "onClickVertex")); boolean onVertex = ((PointSymbolizer)point.getSymbolizer()).isOnVertex(); bVertex.setSelected(onVertex); JRadioButton bCentroid = new JRadioButton(ON_CENTROID); bCentroid.addActionListener( EventHandler.create(ActionListener.class, point, "setOnCentroid")); bCentroid.addActionListener( EventHandler.create(ActionListener.class, this, "onClickCentroid")); bCentroid.setSelected(!onVertex); ButtonGroup bg = new ButtonGroup(); bg.add(bVertex); bg.add(bCentroid); JPanel jp = new JPanel(); jp.add(bVertex); jp.add(bCentroid); return jp; }

Target:
private JPanel pnlOnVertex(){ CategorizedPoint point = (CategorizedPoint) getLegend(); JRadioButton bVertex = new JRadioButton(I18N.tr(ON_VERTEX)); bVertex.addActionListener( EventHandler.create(ActionListener.class, point, "setOnVertex")); bVertex.addActionListener( EventHandler.create(ActionListener.class, this, "onClickVertex")); boolean onVertex = ((PointSymbolizer)point.getSymbolizer()).isOnVertex(); bVertex.setSelected(onVertex); JRadioButton bCentroid = new JRadioButton(I18N.tr(ON_CENTROID)); bCentroid.addActionListener( EventHandler.create(ActionListener.class, point, "setOnCentroid")); bCentroid.addActionListener( EventHandler.create(ActionListener.class, this, "onClickCentroid")); bCentroid.setSelected(!onVertex); ButtonGroup bg = new ButtonGroup(); bg.add(bVertex); bg.add(bCentroid); JPanel jp = new JPanel(); jp.add(bVertex); jp.add(bCentroid); return jp; }
Source:
public Object getEvidence() { return evidence; }

Target:
public Evidence getEvidence() { return evidence; }
Source:
public Void execute(Context context) { KieSession ksession = ((RegistryContext) context).lookup( KieSession.class ); ProcessInstance processInstance = ksession.getProcessInstance(processInstanceId); DynamicNodeInstance dynamicContext = (DynamicNodeInstance) ((WorkflowProcessInstanceImpl) processInstance).getNodeInstances(true).stream() .filter(ni -> (ni instanceof DynamicNodeInstance) && stage.equals(ni.getNode().getMetaData().get("UniqueId")) || stage.equals(ni.getNodeName())) .findFirst() .orElseThrow(() -> new StageNotFoundException("No stage found with id " + stage)); CaseStage caseStage = caseDef.getCaseStages() .stream() .filter(stage -> stage.getId().equals(dynamicContext.getNode().getMetaData().get("UniqueId"))) .findFirst() .get(); if (!caseStage.getAdHocFragments().stream().anyMatch(fragment -> fragment.getName().equals(fragmentName))) { throw new AdHocFragmentNotFoundException("AdHoc fragment '" + fragmentName + "' not found in case " + ((WorkflowProcessInstanceImpl)processInstance).getCorrelationKey() + " and stage " + stage); } dynamicContext.signalEvent(fragmentName, data); return null; }

Target:
public Void execute(Context context) { KieSession ksession = ((RegistryContext) context).lookup( KieSession.class ); ProcessInstance processInstance = ksession.getProcessInstance(processInstanceId); DynamicNodeInstance dynamicContext = (DynamicNodeInstance) ((WorkflowProcessInstanceImpl) processInstance).getNodeInstances(true).stream() .filter(ni -> (ni instanceof DynamicNodeInstance) && (stage.equals(ni.getNode().getMetaData().get("UniqueId")) || stage.equals(ni.getNodeName()))) .findFirst() .orElseThrow(() -> new StageNotFoundException("No stage found with id " + stage)); CaseStage caseStage = caseDef.getCaseStages() .stream() .filter(stage -> stage.getId().equals(dynamicContext.getNode().getMetaData().get("UniqueId"))) .findFirst() .get(); if (!caseStage.getAdHocFragments().stream().anyMatch(fragment -> fragment.getName().equals(fragmentName))) { throw new AdHocFragmentNotFoundException("AdHoc fragment '" + fragmentName + "' not found in case " + ((WorkflowProcessInstanceImpl)processInstance).getCorrelationKey() + " and stage " + stage); } dynamicContext.signalEvent(fragmentName, data); return null; }
Source:
public void setReadScopes(final Set<String> readScopes) { this.readScopes = Objects.isNull(readScopes) ? Collections.emptySet() : readScopes; }

Target:
public void setReadScopes(final Set<String> readScopes) { this.readScopes = readScopes == null ? Collections.emptySet() : readScopes; }
Source:
protected void postLoad(DAnalysis dAnalysis, Version loadedVersion) { if (loadedVersion.compareTo(MIGRATION_VERSION) < 0) { for (DView dView : dAnalysis.getOwnedViews()) { for (DDiagram dDiagram : Iterables.filter(new DViewQuery(dView).getLoadedRepresentations(), DDiagram.class)) { if (!"SequenceDDiagramSpec".equals(dDiagram.getClass().getSimpleName())) { List<Edge> edgeList = getEdgeList(dDiagram); for (Edge edge : edgeList) { checkAndRepairBendpointsOfEdge(edge); } } } } } }

Target:
protected void postLoad(DAnalysis dAnalysis, Version loadedVersion) { if (loadedVersion.compareTo(MIGRATION_VERSION) < 0) { for (DView dView : dAnalysis.getOwnedViews()) { for (DDiagram dDiagram : Iterables.filter(new DViewQuery(dView).getLoadedRepresentations(), DDiagram.class)) { if ("DSemanticDiagramSpec".equals(dDiagram.getClass().getSimpleName())) { List<Edge> edgeList = getEdgeList(dDiagram); for (Edge edge : edgeList) { checkAndRepairBendpointsOfEdge(edge); } } } } } }
Source:
private RequestCallback getBucketsRequestCallBack() { return new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { JSONArray bucketsArray = JSONParser.parseStrict(response.getText()).isArray(); List<String> bucketNames = new LinkedList<>(); for (int i = 0; i < bucketsArray.size(); i++) { JSONObject bucketObject = bucketsArray.get(i).isObject(); String bucketName = bucketObject.get(NAME_KEY).isString().stringValue(); bucketNames.add(bucketName); } for (String bucketName : bucketNames) { requestNodeSourcesForBucket(bucketName); } CatalogRequestBuilder.this.importFromCatalogPanel.enableNodeSourceListBox(); } @Override public void onError(Request request, Throwable t) { GWT.log("List buckets from catalog failed. Request was " + request.toString(), t); } }; }

Target:
private RequestCallback getBucketsRequestCallBack() { return new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { JSONArray bucketsArray = JSONParser.parseStrict(response.getText()).isArray(); for (int i = 0; i < bucketsArray.size(); i++) { JSONObject bucketObject = bucketsArray.get(i).isObject(); String bucketName = bucketObject.get(NAME_KEY).isString().stringValue(); requestNodeSourcesForBucket(bucketName); } CatalogRequestBuilder.this.importFromCatalogPanel.enableNodeSourceListBox(); } @Override public void onError(Request request, Throwable t) { CatalogRequestBuilder.this.importFromCatalogPanel.setNodeSourceWindowLabelWithError("List buckets from catalog failed", t); } }; }
Source:
protected String getFile(String stack, String filename) throws IOException { if(stack != null && stack.equalsIgnoreCase("publicdns")) { String catalogTemplateUrl = String.format(CATALOG_RESOURCE_URL, stack); Request temp = Request.Get(catalogTemplateUrl); Response res = temp.execute(); Template template = jsonMapper.readValue(res.returnContent().asBytes(), Template.class); if (template.getDefaultVersion() != null && template.getVersionLinks() != null) { String versionUrl = template.getVersionLinks().get(template.getDefaultVersion()); log.debug("Catalog system template versionUrl is: [{}]", versionUrl); Request versionReq = Request.Get(versionUrl); Response versionRes = versionReq.execute(); Template templateVersion = jsonMapper.readValue(versionRes.returnContent().asBytes(), Template.class); if(templateVersion != null) { if(filename!= null && filename.startsWith("docker-")){ return templateVersion.getDockerCompose(); }else if(filename!= null && filename.startsWith("rancher-")){ return templateVersion.getRancherCompose(); } } log.error("Failed to load template version"); } else { log.error("Failed to load template details"); } return null; } else { String resource = String.format(STACK_RESOURCE, stack, filename); InputStream is = getClass().getResourceAsStream(resource); if (is == null) { return null; } return IOUtils.toString(is); } }

Target:
protected String getFile(String stack, String filename) throws IOException { String resource = String.format(STACK_RESOURCE, stack, filename); InputStream is = getClass().getResourceAsStream(resource); if (is == null) { return null; } return IOUtils.toString(is); }
Source:
public void run(){ log.debug("Listening for client commands: "+clientNumber); String result = socket.readLine(); if(result == null) { log.error("Client disconnect, BAIL OUT"); System.exit(-1); } try { JsonObject commandsJSON = parser.parse(result).getAsJsonObject(); Map<Player, PlayerCommand> commands = jsonToPlayerCommands(commandsJSON); for(Player player: commands.keySet()){ registerMove(player, commands.get(player)); } log.debug("Got client commands: "+clientNumber); } catch (Exception e) { log.error("error waiting for commands from client", e); System.exit(-1); } }

Target:
public void run(){ log.debug("Listening for client commands: "+clientNumber); String result = socket.readLine(); if(!socket.isValid()) { log.error("Client disconnect, BAIL OUT"); System.exit(-1); } try { JsonObject commandsJSON = parser.parse(result).getAsJsonObject(); Map<Player, PlayerCommand> commands = jsonToPlayerCommands(commandsJSON); for(Player player: commands.keySet()){ registerMove(player, commands.get(player)); } log.debug("Got client commands: "+clientNumber); } catch (Exception e) { log.error("error waiting for commands from client", e); System.exit(-1); } }
Source:
protected HdfsSinkConnectorConfig(ConfigDef configDef, Map<String, String> props) { super(configDef, props); ConfigDef storageCommonConfigDef = StorageCommonConfig.newConfigDef(STORAGE_CLASS_RECOMMENDER); commonConfig = new StorageCommonConfig(storageCommonConfigDef, originalsStrings()); hiveConfig = new HiveConfig(originalsStrings()); ConfigDef partitionerConfigDef = PartitionerConfig.newConfigDef(PARTITIONER_CLASS_RECOMMENDER); partitionerConfig = new PartitionerConfig(partitionerConfigDef, originalsStrings()); this.name = parseName(originalsStrings()); this.hadoopConfig = new Configuration(); addToGlobal(hiveConfig); addToGlobal(partitionerConfig); addToGlobal(commonConfig); addToGlobal(this); this.url = extractUrl(); try { this.topixRegexCaptureGroup = getString(TOPIC_REGEX_CAPTURE_GROUP_CONFIG) != null ? Pattern.compile(getString(TOPIC_REGEX_CAPTURE_GROUP_CONFIG)) : null; } catch (PatternSyntaxException e) { throw new ConfigException( TOPIC_REGEX_CAPTURE_GROUP_CONFIG + " is an invalid regex pattern: ", e ); } partsToReplace = getPartsToReplace(); }

Target:
protected HdfsSinkConnectorConfig(ConfigDef configDef, Map<String, String> props) { super(configDef, props); ConfigDef storageCommonConfigDef = StorageCommonConfig.newConfigDef(STORAGE_CLASS_RECOMMENDER); commonConfig = new StorageCommonConfig(storageCommonConfigDef, originalsStrings()); hiveConfig = new HiveConfig(originalsStrings()); ConfigDef partitionerConfigDef = PartitionerConfig.newConfigDef(PARTITIONER_CLASS_RECOMMENDER); partitionerConfig = new PartitionerConfig(partitionerConfigDef, originalsStrings()); this.name = parseName(originalsStrings()); this.hadoopConfig = new Configuration(); addToGlobal(hiveConfig); addToGlobal(partitionerConfig); addToGlobal(commonConfig); addToGlobal(this); this.url = extractUrl(); try { String topicRegex = getString(TOPIC_CAPTURE_GROUPS_REGEX_CONFIG); this.topicRegexCaptureGroup = topicRegex != null ? Pattern.compile(topicRegex) : null; } catch (PatternSyntaxException e) { throw new ConfigException( TOPIC_CAPTURE_GROUPS_REGEX_CONFIG + " is an invalid regex pattern: ", e ); } topicDirGroupsMaxIndex = getMaxIndexToReplace(getString(TOPICS_DIR_CONFIG)); logDirGroupsMaxIndex = getMaxIndexToReplace(getString(LOGS_DIR_CONFIG)); validateDirsAndRegex(); }
Source:
public SourceOperator createOperator(DriverContext driverContext) { checkState(!closed, "Factory is already closed"); OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, sourceId, MergeOperator.class.getSimpleName()); if (exchangeClientCache == null) { exchangeClientCache = CacheBuilder.<URI, ExchangeClient>newBuilder() .build(CacheLoader.from(location -> { ExchangeClient exchangeClient = exchangeClientSupplier.get(driverContext.getPipelineContext().localSystemMemoryContext()); exchangeClient.addLocation(location); exchangeClient.noMoreLocations(); return exchangeClient; })); } return new MergeOperator( operatorContext, sourceId, exchangeClientCache, serdeFactory.createPagesSerde(), pageWithPositionComparatorFactory.create(types, sortChannels, sortOrder), outputChannels, outputTypes); }

Target:
public SourceOperator createOperator(DriverContext driverContext) { checkState(!closed, "Factory is already closed"); OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, sourceId, MergeOperator.class.getSimpleName()); return new MergeOperator( operatorContext, sourceId, exchangeClientSupplier, serdeFactory.createPagesSerde(), orderingCompiler.compilePageWithPositionComparator(types, sortChannels, sortOrder), outputChannels, outputTypes); }
Source:
public ConfirmationPageObject enterActivationLink(String email, String password, String wikiURL) { ConfirmationPageObject confirmPage = enterActivationLink(email, password, wikiURL, "english"); return confirmPage; }

Target:
public ConfirmationPageObject enterActivationLink(String email, String password, String wikiURL) { return enterActivationLink(email, password, wikiURL, default_lang); }
Source:
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof Executor && !(bean instanceof ThreadPoolTaskExecutor)) { Method execute = ReflectionUtils.findMethod(bean.getClass(), "execute", Runnable.class); boolean methodFinal = Modifier.isFinal(execute.getModifiers()); boolean classFinal = Modifier.isFinal(bean.getClass().getModifiers()); boolean cglibProxy = !methodFinal && !classFinal; Executor executor = (Executor) bean; try { return createProxy(bean, cglibProxy, executor); } catch (AopConfigException e) { if (cglibProxy) { if (log.isDebugEnabled()) { log.debug("Exception occurred while trying to create a proxy, falling back to JDK proxy", e); } return createProxy(bean, false, executor); } throw e; } } else if (bean instanceof ThreadPoolTaskExecutor) { boolean classFinal = Modifier.isFinal(bean.getClass().getModifiers()); boolean cglibProxy = !classFinal; ThreadPoolTaskExecutor executor = (ThreadPoolTaskExecutor) bean; AsyncProperties asyncProperties = asyncConfigurationProperties(); if (!asyncProperties.getIgnoredBeans().contains(beanName)) { return createThreadPoolTaskExecutorProxy(bean, cglibProxy, executor); } else { log.info("Not instrumenting bean " + beanName); } } return bean; }

Target:
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof Executor && !(bean instanceof ThreadPoolTaskExecutor)) { Method execute = ReflectionUtils.findMethod(bean.getClass(), "execute", Runnable.class); boolean methodFinal = Modifier.isFinal(execute.getModifiers()); boolean classFinal = Modifier.isFinal(bean.getClass().getModifiers()); boolean cglibProxy = !methodFinal && !classFinal; Executor executor = (Executor) bean; try { return createProxy(bean, cglibProxy, executor); } catch (AopConfigException e) { if (cglibProxy) { if (log.isDebugEnabled()) { log.debug("Exception occurred while trying to create a proxy, falling back to JDK proxy", e); } return createProxy(bean, false, executor); } throw e; } } else if (bean instanceof ThreadPoolTaskExecutor) { if (isProxyNeeded(beanName)) { boolean classFinal = Modifier.isFinal(bean.getClass().getModifiers()); boolean cglibProxy = !classFinal; ThreadPoolTaskExecutor executor = (ThreadPoolTaskExecutor) bean; return createThreadPoolTaskExecutorProxy(bean, cglibProxy, executor); } else { log.info("Not instrumenting bean " + beanName); } } return bean; }