auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void initializeWriteHandleState() { if (!getLedgerMetadata().isClosed() && !(this instanceof ReadOnlyLedgerHandle) && clientCtx.getConf().explicitLacInterval > 0) { explicitLacFlushPolicy = new ExplicitLacFlushPolicy.ExplicitLacFlushPolicyImpl( this, clientCtx); } else { explicitLacFlushPolicy = ExplicitLacFlushPolicy.VOID_EXPLICITLAC_FLUSH_POLICY; } if (clientCtx.getConf().addEntryQuorumTimeoutNanos > 0) { SafeRunnable monitor = new SafeRunnable() { @Override public void safeRun() { monitorPendingAddOps(); } }; this.timeoutFuture = clientCtx.getScheduler().scheduleAtFixedRate( monitor, clientCtx.getConf().timeoutMonitorIntervalSec, clientCtx.getConf().timeoutMonitorIntervalSec, TimeUnit.SECONDS); } }

Target:
protected void initializeWriteHandleState() { if (clientCtx.getConf().explicitLacInterval > 0) { explicitLacFlushPolicy = new ExplicitLacFlushPolicy.ExplicitLacFlushPolicyImpl( this, clientCtx); } else { explicitLacFlushPolicy = ExplicitLacFlushPolicy.VOID_EXPLICITLAC_FLUSH_POLICY; } if (clientCtx.getConf().addEntryQuorumTimeoutNanos > 0) { SafeRunnable monitor = new SafeRunnable() { @Override public void safeRun() { monitorPendingAddOps(); } }; this.timeoutFuture = clientCtx.getScheduler().scheduleAtFixedRate( monitor, clientCtx.getConf().timeoutMonitorIntervalSec, clientCtx.getConf().timeoutMonitorIntervalSec, TimeUnit.SECONDS); } }
Source:
void withPrivateIoThreadPool() { bindConfig(binder).annotatedWith(annotation).to(NettyAsyncHttpClientIoPoolProviderConfig.class); binder.bind(NettyAsyncHttpClientIoPoolProvider.class).annotatedWith(annotation).toProvider(new NettyAsyncHttpClientIoPoolMetaProvider(name, annotation)).in(Scopes.SINGLETON); }

Target:
void withPrivateIoThreadPool() { bindConfig(binder).annotatedWith(annotation).prefixedWith(name).to(NettyIoPoolConfig.class); binder.bind(NettyIoPool.class).annotatedWith(annotation).toProvider(new NettyIoPoolProvider(name, annotation)).in(Scopes.SINGLETON); }
Source:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((resource == null) ? 0 : resource.hashCode()); return result; }

Target:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((parent == null) ? 0 : parent.hashCode()); result = prime * result + ((resource == null) ? 0 : resource.hashCode()); return result; }
Source:
protected Function<E, Object> customFieldExtractor(String field) { if (!field.startsWith(languagePrefix) || !languageParameter.isPresent()) { return null; } String realField = field.replaceFirst(languagePrefix, ""); if (CLE_VALUE.equals(realField) || CLE_ADDITIONAL_VALUE.equals(realField) || CLE_DESCRIPTION.equals(realField)) { return codeListEntry -> codeListEntry.getTranslations() .getText(Mapping.named(realField), languageParameter.get()) .orElse(null); } return null; }

Target:
protected Function<E, Object> customFieldExtractor(String field) { if (!languageParameter.isPresent() || languagePrefix == null || !field.startsWith(languagePrefix)) { return null; } String realField = field.replaceFirst(languagePrefix, ""); if (CLE_VALUE.equals(realField) || CLE_ADDITIONAL_VALUE.equals(realField) || CLE_DESCRIPTION.equals(realField)) { return codeListEntry -> codeListEntry.getTranslations() .getText(Mapping.named(realField), languageParameter.get()) .orElse(null); } return null; }
Source:
public void send(Mail mail) { final Map<String, Object> model = mail.getTemplateModel(); model.put("baseLinkURL", getApplicationUrl()); final String subject = getTranslation(mail.getSubjectMessageKey(), mail.getSubjectMessageArguments()); final String sender = mailProperties.getSender(); if (mail.isSendToTechnicalMail()) { final String body = mailBuilder.buildMailBody(mail.getTemplateName(), model, LOCALE); mailSenderService.sendEmail(sender, List.of(mailProperties.getAdministrator()), subject, body); } else { final List<Person> recipients = getRecipients(mail); if (mail.getMailAttachments().isEmpty()) { if (mail.isSendToEachIndividually()) { recipients.forEach(recipient -> { model.put("recipient", recipient); final String body = mailBuilder.buildMailBody(mail.getTemplateName(), model, LOCALE); mailSenderService.sendEmail(sender, List.of(recipient.getEmail()), subject, body); }); } else { final String body = mailBuilder.buildMailBody(mail.getTemplateName(), model, LOCALE); mailSenderService.sendEmail(sender, getMailAddresses(recipients), subject, body); } } else { if (mail.isSendToEachIndividually()) { recipients.forEach(recipient -> { model.put("recipient", recipient); final String body = mailBuilder.buildMailBody(mail.getTemplateName(), model, LOCALE); mailSenderService.sendEmail(sender, List.of(recipient.getEmail()), subject, body, mail.getMailAttachments()); }); } else { final String body = mailBuilder.buildMailBody(mail.getTemplateName(), model, LOCALE); mailSenderService.sendEmail(sender, getMailAddresses(recipients), subject, body, mail.getMailAttachments()); } } } }

Target:
public void send(Mail mail) { final Map<String, Object> model = mail.getTemplateModel(); model.put("baseLinkURL", getApplicationUrl()); final String subject = getTranslation(mail.getSubjectMessageKey(), mail.getSubjectMessageArguments()); final String sender = mailProperties.getSender(); getRecipients(mail).forEach(recipient -> { model.put("recipient", recipient); final String body = mailContentBuilder.buildMailBody(mail.getTemplateName(), model, LOCALE); mail.getMailAttachments().ifPresentOrElse( mailAttachments -> mailSenderService.sendEmail(sender, List.of(recipient.getEmail()), subject, body, mailAttachments), () -> mailSenderService.sendEmail(sender, List.of(recipient.getEmail()), subject, body)); }); }
Source:
public void enable(CommandSource src) { try { final WorldArchetype archetype1 = Sponge.getRegistry().getType(WorldArchetype.class, "multi-world-test:overnether").orElseGet(() -> WorldArchetype.builder(). from(WorldArchetypes.THE_NETHER) .serializationBehavior(SerializationBehaviors.NONE) .generator(GeneratorTypes.OVERWORLD) .build("multi-world-test:overnether", "Overnether") ); final WorldProperties world1 = Sponge.getServer().createWorldProperties("no-save", archetype1); Sponge.getServer().loadWorld(world1); final WorldArchetype archetype2 = Sponge.getRegistry().getType(WorldArchetype.class, "multi-world-test:overend").orElseGet(() -> WorldArchetype.builder(). from(WorldArchetypes.THE_END) .serializationBehavior(SerializationBehaviors.METADATA_ONLY) .generator(GeneratorTypes.OVERWORLD) .build("multi-world-test:overend", "Overend") ); final WorldProperties world2 = Sponge.getServer().createWorldProperties("metadata-only", archetype2); Sponge.getServer().loadWorld(world2); } catch (IOException e) { e.printStackTrace(); } }

Target:
public void enable(CommandSource src) { try { final Server server = Sponge.getServer(); final WorldArchetype archetypeNoSave = Sponge.getRegistry().getType(WorldArchetype.class, "multi-world-test:overnether").orElseGet(() -> WorldArchetype.builder(). from(WorldArchetypes.THE_NETHER) .serializationBehavior(SerializationBehaviors.NONE) .generator(GeneratorTypes.OVERWORLD) .build("multi-world-test:overnether", "Overnether") ); final WorldProperties worldNoSave = server.createWorldProperties("no-save", archetypeNoSave); server.loadWorld(worldNoSave); final WorldArchetype archetypeMetadataOnly = Sponge.getRegistry().getType(WorldArchetype.class, "multi-world-test:overend").orElseGet(() -> WorldArchetype.builder(). from(WorldArchetypes.THE_END) .serializationBehavior(SerializationBehaviors.METADATA_ONLY) .generator(GeneratorTypes.OVERWORLD) .build("multi-world-test:overend", "Overend") ); final WorldProperties worldMetadataOnly = server.createWorldProperties("metadata-only", archetypeMetadataOnly); server.loadWorld(worldMetadataOnly); } catch (IOException e) { e.printStackTrace(); } }
Source:
public void testUpdateFailureOnReadFromRouter() throws Exception { assumeTrue(!forBackfill); RouterStore store = new RouterStore(accountServiceMetrics, backup, helixStore, new AtomicReference<>(router), forBackfill, TOTAL_NUMBER_OF_VERSION_TO_KEEP); Map<Short, Account> idToRefAccountMap = new HashMap<>(); Map<Short, Map<Short, Container>> idtoRefContainerMap = new HashMap<>(); Set<Short> accountIDSet = new HashSet<>(); AccountTestUtils.generateRefAccounts(idToRefAccountMap, idtoRefContainerMap, accountIDSet, 1, 1); assertUpdateAndFetch(store, idToRefAccountMap, idToRefAccountMap, 1, 1); router.close(); Map<Short, Account> anotherIdToRefAccountMap = new HashMap<>(); AccountTestUtils.generateRefAccounts(anotherIdToRefAccountMap, idtoRefContainerMap, accountIDSet, 1, 1); for (Map.Entry<Short, Account> entry : anotherIdToRefAccountMap.entrySet()) { idToRefAccountMap.put(entry.getKey(), entry.getValue()); } boolean succeeded = store.updateAccounts(anotherIdToRefAccountMap.values()); assertFalse("Update account should fail on read error", succeeded); }

Target:
public void testUpdateFailureOnReadFromRouter() throws Exception { assumeTrue(!forBackfill); RouterStore store = new RouterStore(accountServiceMetrics, backup, helixStore, new AtomicReference<>(router), forBackfill, TOTAL_NUMBER_OF_VERSION_TO_KEEP); Map<Short, Account> idToRefAccountMap = new HashMap<>(); Map<Short, Map<Short, Container>> idtoRefContainerMap = new HashMap<>(); Set<Short> accountIDSet = new HashSet<>(); AccountTestUtils.generateRefAccounts(idToRefAccountMap, idtoRefContainerMap, accountIDSet, 1, 1); assertUpdateAndFetch(store, idToRefAccountMap, idToRefAccountMap, 1, 1); router.clear(); Map<Short, Account> anotherIdToRefAccountMap = new HashMap<>(); AccountTestUtils.generateRefAccounts(anotherIdToRefAccountMap, idtoRefContainerMap, accountIDSet, 1, 1); for (Map.Entry<Short, Account> entry : anotherIdToRefAccountMap.entrySet()) { idToRefAccountMap.put(entry.getKey(), entry.getValue()); } assertFalse("Update account should fail on read error", store.updateAccounts(anotherIdToRefAccountMap.values())); }
Source:
public void setCollection(Object[] items) { if (items == null) { setEntitySummaries(new EntitySummary[0]); } else { EntitySummary[] summaries = new EntitySummary[items.length]; for (int index = 0; index < items.length; index++) { summaries[index] = (EntitySummary)items[index]; } setEntitySummaries(summaries); } }

Target:
public void setCollection(Object[] items) { if (items == null) { setEntitySummaries(new EntitySummary[0]); } else { EntitySummary[] summaries = Arrays.copyOf(items, items.length, EntitySummary[].class); setEntitySummaries(summaries); } }
Source:
public static void setUp() { Assume.assumeTrue(SystemUtils.IS_OS_MAC); final Path scriptFolder = Paths.get("src").resolve("test").resolve("resources"); commands = new ArrayList<>(); commands.add("bash"); commands.add("-c"); commands.add(scriptFolder.resolve("scriptMainProcess.sh").toAbsolutePath().toString() + " \"" + scriptFolder.toAbsolutePath() + "\""); }

Target:
public static void setUp() { Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); final Path scriptFolder = Paths.get("src").resolve("test").resolve("resources"); commands = new ArrayList<>(); commands.add("bash"); commands.add("-c"); commands.add(scriptFolder.resolve("scriptMainProcess.sh").toAbsolutePath().toString() + " \"" + scriptFolder.toAbsolutePath() + "\""); }
Source:
public int compareTo(FileAndName o) { int retVal = getFile().compareTo(o.getFile()); if (retVal == 0) { if (getTraceTypeId() != null) { if (o.getTraceTypeId() != null) { retVal = getTraceTypeId().compareTo(o.getTraceTypeId()); } } } return retVal; }

Target:
public int compareTo(FileAndName o) { int retVal = getFile().compareTo(o.getFile()); if (retVal == 0) { if (getTraceTypeId() != null && o.getTraceTypeId() != null) { retVal = getTraceTypeId().compareTo(o.getTraceTypeId()); } } return retVal; }
Source:
private List<ScreenshotMetadata> getOrReadMetadata() throws IOException { if (mMetadata == null) { File metadataFile = getMetadataFile(); if (metadataFile.exists()) { Gson gson = new Gson(); JsonReader jsonReader = new JsonReader(new FileReader(getMetadataFile())); mMetadata = gson.fromJson(jsonReader, new TypeToken<List<Map<String, Object>>>() { }.getType()); if (mMetadata == null) { mMetadata = new ArrayList<>(); } } else { mMetadata = new ArrayList<>(); } } return mMetadata; }

Target:
private List<ScreenshotMetadata> getOrReadMetadata() throws IOException { if (mMetadata == null) { File metadataFile = getMetadataFile(); if (metadataFile.exists()) { Gson gson = new Gson(); JsonReader jsonReader = new JsonReader(new FileReader(getMetadataFile())); mMetadata = gson.fromJson(jsonReader, new TypeToken<List<ScreenshotMetadata>>() { }.getType()); if (mMetadata == null) { mMetadata = new ArrayList<>(); } } else { mMetadata = new ArrayList<>(); } } return mMetadata; }
Source:
public Privilege[] getPrivileges() { return privileges; }

Target:
public Privilege[] getPrivileges() { return privileges.toArray(new Privilege[privileges.size()]); }
Source:
protected void positionToTimestamp(LogManager manager, String group, String name, long timestamp) { try (LogTailer<Record> tailer = manager.createTailer(group, name)) { int size = manager.getAppender(name).size(); IntStream.range(0, size).boxed().map(partition -> new LogPartition(name, partition)).forEach(lp -> { LogOffset logOffset = tailer.offsetForTimestamp(lp, timestamp); if (logOffset != null) { tailer.seek(logOffset); tailer.commit(); System.out.println( String.format("# Set log %s, group: %s, to offset %s", name, group, logOffset.offset())); } else { System.err.println( String.format("# Could not find an offset for log %s, group: %s", name, group)); } }); } }

Target:
protected boolean positionToTimestamp(LogManager manager, String group, String name, long timestamp) { try (LogTailer<Record> tailer = manager.createTailer(group, name)) { int size = manager.getAppender(name).size(); boolean movedOffset = false; for (int partition = 0; partition < size; partition++) { LogPartition logPartition = new LogPartition(name, partition); LogOffset logOffset = tailer.offsetForTimestamp(logPartition, timestamp); if (logOffset != null) { tailer.seek(logOffset); movedOffset = true; System.out.println( String.format("# Set log %s, group: %s, to offset %s", name, group, logOffset.offset())); } else { System.err.println( String.format("# Could not find an offset for group: %s, partition: %s", group, logPartition)); } } if (movedOffset) { tailer.commit(); return true; } } return false; }
Source:
public T map(int index, ResultSet r, StatementContext ctx) throws SQLException { try { Constructor<T> constructor = c.getDeclaredConstructor(); constructor.setAccessible(true); T result = constructor.newInstance(); if (columns.size() == 0) mapColumns(r.getMetaData(), columns); for (Map.Entry<Integer, String> col : columns.entrySet()) { Integer columnIndex = col.getKey(); String matchCode = col.getValue(); Field field = fields.get(matchCode); if (field != null) field.set(result, r.getObject(columnIndex)); } return result; } catch (Exception e) { throw new IllegalArgumentException(e); } }

Target:
public T map(int index, ResultSet r, StatementContext ctx) throws SQLException { try { Constructor<T> constructor = c.getDeclaredConstructor(); constructor.setAccessible(true); T result = constructor.newInstance(); Map<Integer, String> columns = threadSafeGetColumns(r.getMetaData()); for (Map.Entry<Integer, String> col : columns.entrySet()) { Integer columnIndex = col.getKey(); String matchCode = col.getValue(); Field field = fields.get(matchCode); if (field != null) field.set(result, r.getObject(columnIndex)); } return result; } catch (Exception e) { throw new IllegalArgumentException(e); } }
Source:
public <T> T transaction(TransactionAction<T, D> action) { Handle nested = currentTransaction.get(); if (nested != null) { return nested.inTransaction((h, status) -> action.call(h, h.attach(daoIface))); } else { try { return transactionRetryExecutor.runInterruptible(() -> { try (Handle handle = dbi.open()) { currentTransaction.set(handle); return handle.inTransaction((h, status) -> action.call(h, h.attach(daoIface))); } finally { currentTransaction.set(null); } }); } catch (RetryGiveupException ex) { Throwable innerException = ex.getCause(); throw Throwables.propagate(innerException); } catch (InterruptedException ex) { throw Throwables.propagate(ex); } } }

Target:
public <T> T transaction(TransactionAction<T, D> action) { Handle nested = currentTransaction.get(); if (nested != null) { return nested.inTransaction((h, status) -> action.call(h, h.attach(daoIface))); } else { try { return transactionRetryExecutor.runInterruptible(() -> { try (Handle handle = dbi.open()) { currentTransaction.set(handle); return handle.inTransaction((h, status) -> action.call(h, h.attach(daoIface))); } finally { currentTransaction.set(null); } }); } catch (RetryGiveupException ex) { Throwable innerException = ex.getCause(); throw Throwables.propagate(innerException); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); throw Throwables.propagate(ex); } } }
Source:
public Response add(Driver entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); Context.getDriversManager().addItem(entity); LinkedHashMap<String, Long> link = new LinkedHashMap<>(); link.put("userId", getUserId()); link.put("driverId", entity.getId()); Context.getDataManager().linkObject(link, true); Context.getDriversManager().refreshUserItems(); return Response.ok(entity).build(); }

Target:
public Response add(Driver entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); Context.getDriversManager().addItem(entity); Context.getDataManager().linkObject(User.class, getUserId(), entity.getClass(), entity.getId(), true); Context.getDriversManager().refreshUserItems(); return Response.ok(entity).build(); }
Source:
public void setSubject(ISubject priceSetter) { this.subject = priceSetter; }

Target:
public void setSubject(ISubject priceSetter) { if(priceSetter!=null){ this.isubject = priceSetter; } }
Source:
protected void paintFigure(final Graphics g) { g.setBackgroundColor(getBackgroundColor()); g.setForegroundColor(getForegroundColor()); g.setLineWidth(getLineWidth()); g.setLineStyle(getLineStyle()); final PointList points = calculatePoints(new Rectangle(getBounds())); g.fillPolygon(points); g.drawPolygon(points); }

Target:
protected void paintFigure(final Graphics g) { g.setBackgroundColor(getBackgroundColor()); g.setForegroundColor(getForegroundColor()); g.setLineWidth(getLineWidth()); final PointList points = calculatePoints(new Rectangle(getBounds())); g.fillPolygon(points); g.drawPolygon(points); }
Source:
protected void initializeDataSource() { ITmfTrace trace = getTrace(); if (trace != null) { fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, TmfStateSystemAnalysisModule.class, KernelMemoryAnalysisModule.ID); if (fModule == null) { return; } fModule.schedule(); Chart chart = getSwtChart(); chart.getDisplay().asyncExec(new Runnable() { @Override public void run() { chart.getAxisSet().getYAxis(0).getTick().setFormat(new MemoryFormat()); } }); } fModule.waitForInitialization(); ITmfStateSystem ss = fModule.getStateSystem(); if (ss == null) { return; } ss.waitUntilBuilt(); lowestValueMap = new HashMap<>(); try { List<Integer> threadQuarkList = ss.getSubAttributes(-1, false); for (Integer threadQuark : threadQuarkList) { String tid = ss.getAttributeName(threadQuark); int lowestValueQuark = ss.getQuarkRelative(threadQuark, KernelMemoryAnalysisModule.THREAD_LOWEST_MEMORY_VALUE); long ts = ss.getCurrentEndTime(); ITmfStateInterval lowestValueState = ss.querySingleState(ts, lowestValueQuark); long lowestValue = lowestValueState.getStateValue().unboxLong(); lowestValueMap.put(tid, (double) lowestValue); } double totalIncrementation = lowestValueMap.values().stream().mapToDouble(Double::doubleValue).sum(); lowestValueMap.put(TOTAL, totalIncrementation); } catch (AttributeNotFoundException e) { Activator.getDefault().logError(e.getMessage(), e); } catch (StateSystemDisposedException e2) { Activator.getDefault().logError(e2.getMessage(), e2); } }

Target:
protected void initializeDataSource() { ITmfTrace trace = getTrace(); if (trace != null) { fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, TmfStateSystemAnalysisModule.class, KernelMemoryAnalysisModule.ID); if (fModule == null) { return; } fModule.schedule(); } }
Source:
public String update(Artifact artifact) throws CarbonDeploymentException { logger.info("Updating : " + artifact.getName()); if (artifact.getName().contains("sample1.txt")) { sample1Updated = true; } else if (artifact.getName().contains("sample2.txt")) { sample2Updated = true; } return artifact.getName(); }

Target:
public String update(Artifact artifact) throws CarbonDeploymentException { logger.info("Updating : " + artifact.getName()); if (artifact.getName() != null && artifact.getName().contains("sample1.txt")) { sample1Updated = true; } else if (artifact.getName() != null && artifact.getName().contains("sample2.txt")) { sample2Updated = true; } return artifact.getName(); }
Source:
private void loadOptionalParameters(Properties properties) { if (log.isDebugEnabled()) { log.debug("Starting to load the salesforce credentials"); } if (properties.getProperty(SalesforceConstant.CONNECTION_TIMEOUT) == null) { connectionTimeout = SalesforceConstant.CONNECTION_TIMEOUT_DEFAULT; } else { connectionTimeout = Integer.parseInt(properties.getProperty(SalesforceConstant.CONNECTION_TIMEOUT)); } if (properties.getProperty(SalesforceConstant.READ_TIMEOUT) == null) { readTimeout = SalesforceConstant.READ_TIMEOUT_DEFAULT; } else { readTimeout = Integer.parseInt(properties.getProperty(SalesforceConstant.READ_TIMEOUT)); } if (properties.getProperty(SalesforceConstant.WAIT_TIME) == null) { connectionTimeout = SalesforceConstant.WAIT_TIME_DEFAULT; } else { waitTime = Integer.parseInt(properties.getProperty(SalesforceConstant.WAIT_TIME)); } }

Target:
private void loadOptionalParameters(Properties properties) { if (log.isDebugEnabled()) { log.debug("Starting to load the salesforce credentials"); } if (properties.getProperty(SalesforceConstant.CONNECTION_TIMEOUT) == null) { connectionTimeout = SalesforceConstant.CONNECTION_TIMEOUT_DEFAULT; } else { try { connectionTimeout = Integer.parseInt(properties.getProperty(SalesforceConstant.CONNECTION_TIMEOUT)); } catch (NumberFormatException e) { log.error("The Value should be in Number", e); } } if (properties.getProperty(SalesforceConstant.READ_TIMEOUT) == null) { readTimeout = SalesforceConstant.READ_TIMEOUT_DEFAULT; } else { try { readTimeout = Integer.parseInt(properties.getProperty(SalesforceConstant.READ_TIMEOUT)); } catch (NumberFormatException e) { log.error("The Value should be in Number", e); } } if (properties.getProperty(SalesforceConstant.WAIT_TIME) == null) { connectionTimeout = SalesforceConstant.WAIT_TIME_DEFAULT; } else { try { waitTime = Integer.parseInt(properties.getProperty(SalesforceConstant.WAIT_TIME)); } catch (NumberFormatException e) { log.error("The Value should be in Number", e); } } }
Source:
public Supplier<Boolean> getTask(@NotNull Context context) { DaggerUtils.getComponent(context).inject(this); return () -> { try { List<ServerFormDetails> serverForms = serverFormsDetailsFetcher.fetchFormDetails(); List<ServerFormDetails> updatedForms = serverForms.stream().filter(ServerFormDetails::isUpdated).collect(Collectors.toList()); if (!updatedForms.isEmpty()) { if (preferencesProvider.getGeneralSharedPreferences().getBoolean(KEY_AUTOMATIC_UPDATE, false)) { changeLock.withLock(acquiredLock -> { if (acquiredLock) { HashMap<ServerFormDetails, String> results = new HashMap<>(); for (ServerFormDetails serverFormDetails : updatedForms) { try { formDownloader.downloadForm(serverFormDetails, null, null); results.put(serverFormDetails, Collect.getInstance().getString(R.string.success)); } catch (FormDownloadException e) { results.put(serverFormDetails, e.getMessage()); } catch (InterruptedException e) { return null; } } notifier.onUpdatesDownloaded(results); } return null; }); } else { notifier.onUpdatesAvailable(updatedForms); } } return true; } catch (FormApiException e) { return true; } }; }

Target:
public Supplier<Boolean> getTask(@NotNull Context context) { DaggerUtils.getComponent(context).inject(this); return () -> { try { List<ServerFormDetails> serverForms = serverFormsDetailsFetcher.fetchFormDetails(); List<ServerFormDetails> updatedForms = serverForms.stream().filter(ServerFormDetails::isUpdated).collect(Collectors.toList()); if (!updatedForms.isEmpty()) { if (preferencesProvider.getGeneralSharedPreferences().getBoolean(KEY_AUTOMATIC_UPDATE, false)) { changeLock.withLock(acquiredLock -> { if (acquiredLock) { HashMap<ServerFormDetails, String> results = new HashMap<>(); for (ServerFormDetails serverFormDetails : updatedForms) { try { formDownloader.downloadForm(serverFormDetails, null, null); results.put(serverFormDetails, TranslationHandler.getString(context, R.string.success)); } catch (FormDownloadException e) { results.put(serverFormDetails, TranslationHandler.getString(context, R.string.failure)); } catch (InterruptedException e) { break; } } notifier.onUpdatesDownloaded(results); } return null; }); } else { notifier.onUpdatesAvailable(updatedForms); } } return true; } catch (FormSourceException e) { return true; } }; }
Source:
public void doSaveAs() { new WorkspaceJob("Do save as") { @Override public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException { Shell shell = getSite().getShell(); if (shell != null && !shell.isDisposed()) { shell.getDisplay().syncExec(new Runnable() { @Override public void run() { SwaggerEditor.super.doSaveAs(); } }); } return Status.OK_STATUS; } }.schedule(); validate(); }

Target:
public void doSaveAs() { new WorkspaceJob("Do save as") { @Override public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException { Shell shell = getSite().getShell(); if (shell != null && !shell.isDisposed()) { shell.getDisplay().syncExec(new Runnable() { @Override public void run() { SwaggerEditor.super.doSaveAs(); } }); } validate(); return Status.OK_STATUS; } }.schedule(); }
Source:
public void returnResult(Intent data) { boolean isInternal = getIntent().getBooleanExtra(EXTRA_IS_INTERNAL, false); if (isInternal) { setResult(RESULT_OK, data); finish(); } else { OperationResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT); String str = getString(result.getLog().getLast().mType.getMsgId()); Toast.makeText(this, str, Toast.LENGTH_LONG).show(); finish(); } }

Target:
public void returnResult(Intent data) { String action = getIntent().getAction(); if (ACTION_QR_CODE_API.equals(action)) { OperationResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT); String str = getString(result.getLog().getLast().mType.getMsgId()); Toast.makeText(this, str, Toast.LENGTH_LONG).show(); finish(); } else { setResult(RESULT_OK, data); finish(); } }
Source:
public final void publish(P payload) { if (payload instanceof Message) { this.publishMessage((Message<?>) payload); return; } Message<P> message = MessageBuilder.withPayload(payload).build(); this.listenerEventsChannel.send(message); }

Target:
public final void publish(P payload) { if (payload instanceof Message) { this.publishMessage((Message<?>) payload); } else { Message<P> message = MessageBuilder.withPayload(payload).build(); this.listenerEventsChannel.send(message); } }
Source:
public static Client init(Context androidContext) { client = new Client(androidContext); configureClientObservers(); return client; }

Target:
public static Client init(Context androidContext) { client = new Client(androidContext); NativeInterface.configureClientObservers(client); return client; }
Source:
public PoolDTO setProvidedProducts(Set<ProvidedProductDTO> providedProducts) { if (providedProducts != null) { if (this.providedProducts == null) { this.providedProducts = new HashSet<ProvidedProductDTO>(); } else { this.providedProducts.clear(); } for (ProvidedProductDTO dto : providedProducts) { if (isNullOrIncomplete(dto)) { throw new IllegalArgumentException("collection contains null " + "or incomplete provided products"); } } this.providedProducts.addAll(providedProducts); } else { this.providedProducts = null; } return this; }

Target:
public PoolDTO setProvidedProducts(Set<ProvidedProductDTO> providedProducts) { if (providedProducts != null) { if (this.providedProducts == null) { this.providedProducts = new HashSet<ProvidedProductDTO>(); } else { this.providedProducts.clear(); } for (ProvidedProductDTO dto : providedProducts) { if (isNullOrIncomplete(dto)) { throw new IllegalArgumentException( "collection contains null or incomplete provided products"); } } this.providedProducts.addAll(providedProducts); } else { this.providedProducts = null; } return this; }
Source:
public void updateStatisticsData(VdsStatistics statisticsData) { DbFacade.getInstance().getVdsStatisticsDao().update(statisticsData); }

Target:
public void updateStatisticsData(VdsStatistics statisticsData) { DbFacade.getInstance().getVdsStatisticsDao().update(statisticsData); cachedVds.setStatisticsData(statisticsData); }
Source:
private synchronized void setupCacheDir(String id) { String cacheDirName = fileCacheDir + "/file-cache-" + id; cacheDir = new File(cacheDirName); if (!cacheDir.mkdirs()) { throw new IllegalStateException("Failed to create cache dir: " + cacheDirName); } shutdownHook = new Thread(() -> { CountDownLatch latch = new CountDownLatch(1); new Thread(() -> { try { deleteCacheDir(); } catch (IOException ignore) { } latch.countDown(); }).start(); try { latch.await(10, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }); Runtime.getRuntime().addShutdownHook(shutdownHook); }

Target:
private synchronized void setupCacheDir(String id) { String cacheDirName = fileCacheDir + "/file-cache-" + id; cacheDir = new File(cacheDirName); if (!cacheDir.mkdirs()) { throw new IllegalStateException("Failed to create cache dir: " + cacheDirName); } shutdownHook = new Thread(() -> { final Thread deleteCacheDirThread = new Thread(() -> { try { deleteCacheDir(); } catch (IOException ignore) { } }); deleteCacheDirThread.start(); try { deleteCacheDirThread.join(10 * 1000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }); Runtime.getRuntime().addShutdownHook(shutdownHook); }
Source:
public void testHsqlDb() { Jdbi jdbi = Jdbi.create("jdbc:hsqldb:mem:" + UUID.randomUUID()); init(jdbi); try (Handle handle = jdbi.open()) { handle.execute("create table player_stats (" + "name varchar(64) primary key, " + "seasons varchar(36) array, " + "points int array)"); handle.createUpdate("insert into player_stats (name,seasons,points) values (?,?,?)") .bind(0, "Jack Johnson") .bind(1, new String[]{"2013-2014", "2014-2015", "2015-2016"}) .bind(2, new Integer[]{42, 51, 50}) .execute(); String[] seasons = handle.createQuery("select seasons from player_stats") .bind("name", "Jack Johnson") .mapTo(String[].class) .findOnly(); assertThat(seasons).containsExactly("2013-2014", "2014-2015", "2015-2016"); } }

Target:
public void testHsqlDb() { Jdbi jdbi = Jdbi.create("jdbc:hsqldb:mem:" + UUID.randomUUID()); init(jdbi); try (Handle handle = jdbi.open()) { handle.execute("create table player_stats (" + "name varchar(64) primary key, " + "seasons varchar(36) array, " + "points int array)"); handle.createUpdate("insert into player_stats (name,seasons,points) values (?,?,?)") .bind(0, "Jack Johnson") .bind(1, new String[]{"2013-2014", "2014-2015", "2015-2016"}) .bind(2, new Integer[]{42, 51, 50}) .execute(); String[] seasons = handle.createQuery("select seasons from player_stats where name=:name") .bind("name", "Jack Johnson") .mapTo(String[].class) .findOnly(); assertThat(seasons).containsExactly("2013-2014", "2014-2015", "2015-2016"); } }
Source:
private static Map<String, Integer> getCommands() { Map<String, Integer> commands = new HashMap<>(); commands.put("--help", 0); commands.put("--checkstyle", 2); commands.put("--scanexercise", 2); commands.put("--runtests", 2); commands.put("--preparestub", 1); commands.put("--preparesolution", 1); return commands; }

Target:
private static Map<String, Integer> getCommands() { Map<String, Integer> commands = new HashMap<>(); commands.put("help", 0); commands.put("checkstyle", 2); commands.put("scan-exercise", 2); commands.put("run-tests", 2); commands.put("prepare-stub", 1); commands.put("prepare-solution", 1); return commands; }
Source:
public String toString() { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX")); Map<String, Object> map = new HashMap<>(); map.put("id", id); map.put("legalEntityType", legalEntityType); map.put("accountName", accountName); map.put("brand", brand); map.put("yourReference", yourReference); map.put("status", status); map.put("street", street); map.put("city", city); map.put("stateOrProvince", stateOrProvince); map.put("country", country); map.put("postalCode", postalCode); map.put("spreadTable", spreadTable); map.put("createdAt", createdAt); map.put("updatedAt", updatedAt); map.put("identificationType", identificationType); map.put("identificationValue", identificationValue); map.put("shortReference", shortReference); map.put("apiTrading", apiTrading); map.put("onlineTrading", onlineTrading); map.put("phoneTrading", phoneTrading); map.put("processThirdPartyFunds", processThirdPartyFunds); map.put("settlementType", settlementType); try { return objectMapper.writeValueAsString(map); } catch (JsonProcessingException e) { return String.format("{\"error\": \"%s\"}", e.getMessage()); } }

Target:
public String toString() { final ObjectMapper objectMapper = new ObjectMapper() .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .setDateFormat(new SimpleDateFormat(Utils.dateFormat)); Map<String, Object> map = new HashMap<>(); map.put("id", id); map.put("legalEntityType", legalEntityType); map.put("accountName", accountName); map.put("brand", brand); map.put("yourReference", yourReference); map.put("status", status); map.put("street", street); map.put("city", city); map.put("stateOrProvince", stateOrProvince); map.put("country", country); map.put("postalCode", postalCode); map.put("spreadTable", spreadTable); map.put("createdAt", createdAt); map.put("updatedAt", updatedAt); map.put("identificationType", identificationType); map.put("identificationValue", identificationValue); map.put("shortReference", shortReference); map.put("apiTrading", apiTrading); map.put("onlineTrading", onlineTrading); map.put("phoneTrading", phoneTrading); map.put("processThirdPartyFunds", processThirdPartyFunds); map.put("settlementType", settlementType); try { return objectMapper.writeValueAsString(map); } catch (JsonProcessingException e) { return String.format("{\"error\": \"%s\"}", e.getMessage()); } }
Source:
public AbstractSagaManager<S> getSagaManager() { Assert.state(config != null, () -> "Configuration is not initialized yet"); return sagaManager.get(); }

Target:
public AnnotatedSagaManager<S> getSagaManager() { Assert.state(config != null, () -> "Configuration is not initialized yet"); return sagaManager.get(); }
Source:
public void setFixedYRange(@Nullable Range fixedYRange) { this.fFixedYRange = fixedYRange; this.updateContent(); }

Target:
public void setFixedYRange(@Nullable Range fixedYRange) { fFixedYRange = fixedYRange; updateContent(); }
Source:
public static BoundAddColumn bind(AnalyzedAlterTableDropCheckConstraint dropCheckConstraint) { DocTableInfo tableInfo = dropCheckConstraint.tableInfo(); AnalyzedTableElements<Object> tableElementsBound = new AnalyzedTableElements<>(); AlterTableAddColumnPlan.addExistingPrimaryKeys(tableInfo, tableElementsBound); tableInfo.checkConstraints() .stream() .filter(c -> false == c.name().equals(dropCheckConstraint.name())) .forEach(c -> tableElementsBound.addCheckConstraint(tableInfo.ident(), c)); return new BoundAddColumn( tableInfo, tableElementsBound, Settings.builder().build(), AnalyzedTableElements.finalizeAndValidate( tableInfo.ident(), new AnalyzedTableElements<>(), tableElementsBound ), false, false ); }

Target:
public static BoundAddColumn bind(AnalyzedAlterTableDropCheckConstraint dropCheckConstraint) { DocTableInfo tableInfo = dropCheckConstraint.tableInfo(); AnalyzedTableElements<Object> tableElementsBound = new AnalyzedTableElements<>(); AlterTableAddColumnPlan.addExistingPrimaryKeys(tableInfo, tableElementsBound); tableInfo.checkConstraints() .stream() .filter(c -> !dropCheckConstraint.name().equals(c.name())) .forEach(c -> tableElementsBound.addCheckConstraint(tableInfo.ident(), c)); return new BoundAddColumn( tableInfo, tableElementsBound, Settings.builder().build(), AnalyzedTableElements.finalizeAndValidate( tableInfo.ident(), new AnalyzedTableElements<>(), tableElementsBound ), false, false ); }
Source:
public void checkApplyElementMutationRenderableShapes() { final ActivityShape shape = spy(makeShape()); final Node<View<?>, Edge> node = makeNode("uuid", shape); final MutationContext mutationContext = mock(MutationContext.class); doNothing().when(shape).applyPosition(any(Node.class), eq(mutationContext)); doNothing().when(shape).applyProperties(any(Node.class), eq(mutationContext)); doNothing().when(shape).applyTitle(anyString(), any(Node.class), eq(mutationContext)); handler.applyElementMutation(shape, node, true, true, mutationContext); verify(shape, times(1)).applyPosition(any(Node.class), eq(mutationContext)); verify(shape, times(1)).applyProperties(any(Node.class), eq(mutationContext)); verify(canvas, times(1)).draw(); }

Target:
public void checkApplyElementMutationRenderableShapes() { final ActivityShape shape = spy(makeShape()); final Node<View<BPMNDefinition>, Edge> node = makeNode("uuid", shape); final MutationContext mutationContext = mock(MutationContext.class); doNothing().when(shape).applyPosition(eq(node), eq(mutationContext)); doNothing().when(shape).applyProperties(eq(node), eq(mutationContext)); doNothing().when(shape).applyTitle(anyString(), any(Node.class), eq(mutationContext)); handler.applyElementMutation(shape, node, true, true, mutationContext); verify(shape, times(1)).applyPosition(eq(node), eq(mutationContext)); verify(shape, times(1)).applyProperties(eq(node), eq(mutationContext)); verify(canvas, times(1)).draw(); }
Source:
public boolean cleanDB(final DB db) { if (db == null) { throw new IllegalArgumentException("db must not be null"); } if (db.allocationProperties == null) { throw new IllegalArgumentException("db.allocationProperties must not be null"); } final String dballocatorHostPort = System.getProperty("dballocator.host.port"); if (StringUtils.isEmpty(dballocatorHostPort)) { throw new IllegalArgumentException("dballocator.host.port must not be empty"); } if (StringUtils.isEmpty(db.allocationProperties.getProperty("uuid"))) { throw new IllegalArgumentException("uuid must not be empty"); } final URL clean; try { clean = new URL(String.format("%s/Allocator/AllocatorServlet?operation=erase&uuid=%s", dballocatorHostPort, db.allocationProperties.getProperty("uuid") )); } catch (MalformedURLException e) { e.printStackTrace(); LOGGER.severe("Failed to construct clean DB URL, see: " + e.getMessage()); return false; } LOGGER.info("Cleaning database..."); final int statusCode; try { statusCode = ((HttpURLConnection) clean.openConnection()).getResponseCode(); } catch (IOException e) { e.printStackTrace(); LOGGER.severe("Failed to clean DB, see: " + e.getMessage()); return false; } LOGGER.info(String.format("Clean DB returned HTTP status code: %d", statusCode)); return statusCode == 200; }

Target:
public boolean cleanDB(final DB db) { if (db == null) { throw new IllegalArgumentException("db must not be null"); } if (db.allocationProperties == null) { throw new IllegalArgumentException("db.allocationProperties must not be null"); } final String dballocatorHostPort = getProp("dballocator.host.port"); if (StringUtils.isEmpty(db.allocationProperties.getProperty("uuid"))) { throw new IllegalArgumentException("uuid must not be empty"); } final URL clean; try { clean = new URL(String.format("%s/Allocator/AllocatorServlet?operation=erase&uuid=%s", dballocatorHostPort, db.allocationProperties.getProperty("uuid") )); } catch (MalformedURLException e) { LOGGER.log(Level.SEVERE, "Failed to construct clean DB URL.", e); return false; } LOGGER.info("Cleaning database..."); final int statusCode; try { statusCode = ((HttpURLConnection) clean.openConnection()).getResponseCode(); } catch (IOException e) { LOGGER.log(Level.SEVERE, "Failed to clean DB.", e); return false; } LOGGER.info(String.format("Clean DB returned HTTP status code: %d", statusCode)); return statusCode == 200; }
Source:
public void checkFindReferencesFeature() { String referenceInGreeterClass = format("/%s/Greeter.ts\n" + "From:24:17 To:24:22", PROJECT_NAME); String referenceInTestPrintClass = format("/%s/testPrint.ts\n" + "From:14:0 To:14:5", PROJECT_NAME); menu.runCommand(ASSISTANT, FIND_REFERENCES); findReferencesConsoleTab.waitAllReferencesWithText( referenceInGreeterClass, referenceInTestPrintClass); findReferencesConsoleTab.doubleClickOnReference(referenceInGreeterClass); editor.waitCursorPosition(25, 23); }

Target:
public void checkFindReferencesFeature() { String referenceInGreeterClass = format("/%s/Greeter.ts\nFrom:24:17 To:24:22", PROJECT_NAME); String referenceInTestPrintClass = format("/%s/testPrint.ts\nFrom:14:0 To:14:5", PROJECT_NAME); menu.runCommand(ASSISTANT, FIND_REFERENCES); findReferencesConsoleTab.waitAllReferencesWithText( referenceInGreeterClass, referenceInTestPrintClass); findReferencesConsoleTab.doubleClickOnReference(referenceInGreeterClass); editor.waitCursorPosition(25, 23); }
Source:
public void getParameterName_BothOldAndNewAnnotations() throws NoSuchMethodException { String actualResult = getParameterNameWithMethodNameAndParamIndex(TEST_METHOD_9, FIRST_INDEX); assertEquals(SECOND_NAME_METHOD_ANNOTATION, actualResult); }

Target:
public void getParameterName_BothOldAndNewAnnotations() throws NoSuchMethodException { String actualRes = getParameterNameWithMethodNameAndParamIndex(TEST_METHOD_9, FIRST_INDEX); assertEquals(SECOND_NAME_METHOD_ANNOTATION, actualRes); }
Source:
private String mergeTemplateMapping(IndexTemplateMetaData templateMetaData, Map<String, Object> newMapping) { Map<String, Object> mergedMapping = new HashMap<>(); for (ObjectObjectCursor<String, CompressedXContent> cursor : templateMetaData.mappings()) { Map<String, Object> mapping = parseMapping(cursor.value.toString()); Object o = mapping.get(Constants.DEFAULT_MAPPING_TYPE); assert o instanceof Map : "o must not be null and must be instance of Map"; XContentHelper.update(mergedMapping, (Map) o, false); } XContentHelper.update(mergedMapping, newMapping, false); try { return Strings.toString(XContentFactory.contentBuilder(XContentType.JSON).map(MapBuilder.<String, Object>newMapBuilder().put( Constants.DEFAULT_MAPPING_TYPE, mergedMapping).map())); } catch (IOException e) { throw new ElasticsearchException("failed to serialize mapping"); } }

Target:
private static String mergeTemplateMapping(IndexTemplateMetaData templateMetaData, Map<String, Object> newMapping) { Map<String, Object> merged = AlterTableOperation.mergeTemplateMapping(templateMetaData, newMapping); try { return Strings.toString(XContentFactory.contentBuilder(XContentType.JSON).map(MapBuilder.<String, Object>newMapBuilder().put( Constants.DEFAULT_MAPPING_TYPE, merged).map())); } catch (IOException e) { throw new ElasticsearchException("failed to serialize mapping"); } }
Source:
private void advance() { int totalCycleCount = 0; BclData data = new BclData(outputLengths); for (int read = 0; read < outputLengths.length; read++) { for (int cycle = 0; cycle < outputLengths[read]; ++cycle) { try { CycleData currentCycleData = cycleData[totalCycleCount]; TileData currentTileData = currentCycleData.tileInfo[currentTile[totalCycleCount]]; try { if (cachedTile[totalCycleCount] == null) { if (!cachedFilter.containsKey(currentTileData.tileNum)) { cacheFilter(currentTileData); } cacheTile(totalCycleCount, currentTileData, currentCycleData); } } catch (IOException e) { throw new IOException(String.format("Error while reading from BCL file for cycle %d. Offending file on disk is %s", (totalCycleCount + 1), this.streamFiles[totalCycleCount].getAbsolutePath()), e); } if (!cachedTile[totalCycleCount].hasRemaining()) { currentTile[totalCycleCount]++; if (currentTile[totalCycleCount] >= currentCycleData.tileInfo.length - 1) { return; } currentTileData = currentCycleData.tileInfo[currentTile[totalCycleCount]]; if (!cachedFilter.containsKey(currentTileData.tileNum)) { cacheFilter(currentTileData); } cacheTile(totalCycleCount, currentTileData, currentCycleData); } int singleByte = cachedTile[totalCycleCount].get(); decodeQualityBinnedBasecall(data, read, cycle, singleByte, currentCycleData); totalCycleCount++; } catch (final IOException ioe) { throw new RuntimeIOException(ioe); } } } this.queue.add(data); }

Target:
private void advance() { int totalCycleCount = 0; BclData data = new BclData(outputLengths); for (int read = 0; read < outputLengths.length; read++) { for (int cycle = 0; cycle < outputLengths[read]; cycle++) { try { CycleData currentCycleData = cycleData[totalCycleCount]; TileData currentTileData = currentCycleData.tileInfo[currentTile[totalCycleCount]]; try { if (cachedTile[totalCycleCount] == null) { if (!cachedFilter.containsKey(currentTileData.tileNum)) { cacheFilter(currentTileData); } cacheTile(totalCycleCount, currentTileData, currentCycleData); } } catch (IOException e) { throw new IOException(String.format("Error while reading from BCL file for cycle %d. Offending file on disk is %s", (totalCycleCount + 1), this.streamFiles[totalCycleCount].getAbsolutePath()), e); } if (!cachedTile[totalCycleCount].hasRemaining()) { currentTile[totalCycleCount]++; if (currentTile[totalCycleCount] > currentCycleData.tileInfo.length - 1) { return; } currentTileData = currentCycleData.tileInfo[currentTile[totalCycleCount]]; if (!cachedFilter.containsKey(currentTileData.tileNum)) { cacheFilter(currentTileData); } cacheTile(totalCycleCount, currentTileData, currentCycleData); } int singleByte = cachedTile[totalCycleCount].get(); decodeQualityBinnedBasecall(data, read, cycle, singleByte, currentCycleData); totalCycleCount++; } catch (final IOException ioe) { throw new RuntimeIOException(ioe); } } } this.queue.add(data); }
Source:
public DefaultSchedulerMessageSource(MuleContext muleContext, PeriodicScheduler scheduler, boolean disallowConcurrentExecution) { this.muleContext = muleContext; this.scheduler = scheduler; this.disallowConcurrentExecution = disallowConcurrentExecution; notificationFunctions = new LinkedList<>(); notificationFunctions .add((event, component) -> createConnectorMessageNotification(this, event, component.getLocation(), MESSAGE_RECEIVED)); }

Target:
public DefaultSchedulerMessageSource(MuleContext muleContext, PeriodicScheduler scheduler, boolean disallowConcurrentExecution) { this.muleContext = muleContext; this.scheduler = scheduler; this.disallowConcurrentExecution = disallowConcurrentExecution; }
Source:
public void testValidUrl() throws Exception { _rule.setCode("404"); _request.setHttpURI(HttpURI.build(_request.getHttpURI(), "/valid/uri.html").asImmutable()); _rule.matchAndApply(_request.getRequestURI(), _request, _response); assertEquals(200, _response.getStatus()); }

Target:
public void testValidUrl() throws Exception { _rule.setCode("404"); _request.setHttpURI(HttpURI.build(_request.getHttpURI(), "/valid/uri.html")); _rule.matchAndApply(_request.getRequestURI(), _request, _response); assertEquals(200, _response.getStatus()); }
Source:
public HashSet<T> remove(T element) { return contains(element) ? new HashSet<>(tree.remove(element)) : this; }

Target:
public HashSet<T> remove(T element) { final HashArrayMappedTrie<T, Object> newTree = tree.remove(element); return newTree == tree ? this : new HashSet<>(newTree); }