auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testBasicInvocation() { final LifecycleEnvironment le = mock(LifecycleEnvironment.class); final String poolName = this.getClass().getSimpleName(); final ScheduledExecutorServiceBuilder test = new ScheduledExecutorServiceBuilder(le, poolName, false); this.execTracker = test.build(); <START> assertTrue(this.execTracker instanceof ScheduledThreadPoolExecutor); <END> final ScheduledThreadPoolExecutor castedExec = (ScheduledThreadPoolExecutor) this.execTracker; assertFalse(castedExec.getRemoveOnCancelPolicy()); final ArgumentCaptor<ExecutorServiceManager> esmCaptor = ArgumentCaptor.forClass(ExecutorServiceManager.class); verify(le, times(1)).manage(esmCaptor.capture()); final ExecutorServiceManager esmCaptured = esmCaptor.getValue(); assertSame(this.execTracker, esmCaptured.getExecutor()); assertEquals(DEFAULT_SHUTDOWN_PERIOD, esmCaptured.getShutdownPeriod()); assertSame(poolName, esmCaptured.getPoolName()); }</code><technical_language>AssertJ for assertions in new unit tests. great rewrite assertions in "fluent" AssetJ style, more readable IDE-friendly</technical_language>

Target:
public void testBasicInvocation() { final String poolName = this.getClass().getSimpleName(); final ScheduledExecutorServiceBuilder test = new ScheduledExecutorServiceBuilder(this.le, poolName, false); this.execTracker = test.build(); assertThat(this.execTracker).isInstanceOf(ScheduledThreadPoolExecutor.class); final ScheduledThreadPoolExecutor castedExec = (ScheduledThreadPoolExecutor) this.execTracker; assertThat(castedExec.getRemoveOnCancelPolicy()).isFalse(); final ArgumentCaptor<ExecutorServiceManager> esmCaptor = ArgumentCaptor.forClass(ExecutorServiceManager.class); verify(this.le).manage(esmCaptor.capture()); final ExecutorServiceManager esmCaptured = esmCaptor.getValue(); assertThat(esmCaptured.getExecutor()).isSameAs(this.execTracker); assertThat(esmCaptured.getShutdownPeriod()).isEqualTo(DEFAULT_SHUTDOWN_PERIOD); assertThat(esmCaptured.getPoolName()).isSameAs(poolName); }
Source:
<code>public Collection<Order> getOrder(String... orderIds) throws IOException { List<String> orderIdList = Arrays.asList(orderIds); OpenOrders openOrders = getOpenOrders(); List<Order> returnValue = openOrders .getOpenOrders() .stream() .filter( f-> orderIdList.contains(f.getId())) .collect(Collectors.toList()); returnValue.addAll( orderIdList.stream() .filter( f-> !returnValue.stream().filter( a-> a.getId().equals(f)).findFirst().isPresent()) .map( f-> { try { return PoloniexAdapters.adaptUserTradesToOrderStatus(returnOrderTrades(f)); } catch (IOException e) { <START> e.printStackTrace(); <END> } return null; } ) .filter( f-> f != null) .collect(Collectors.toList()) ); return returnValue; }</code><technical_language>logging</technical_language>

Target:
public Collection<Order> getOrder(String... orderIds) throws IOException { List<String> orderIdList = Arrays.asList(orderIds); OpenOrders openOrders = getOpenOrders(); List<Order> returnValue = openOrders .getOpenOrders() .stream() .filter( f-> orderIdList.contains(f.getId())) .collect(Collectors.toList()); returnValue.addAll( orderIdList.stream() .filter( f-> !returnValue.stream().filter( a-> a.getId().equals(f)).findFirst().isPresent()) .map( f-> { try { return PoloniexAdapters.adaptUserTradesToOrderStatus(f,returnOrderTrades(f)); } catch (IOException e) { LOG.error("Unable to find status for Poloniex order id: " + f,e); } return null; } ) .filter( f-> f != null) .collect(Collectors.toList()) ); return returnValue; }
Source:
<code>public UriAuthority(String authority) { MatchResult matcher = AUTHORITY_REGEXP.exec(authority == null ? EMPTY_STRING : authority); if <START> (matcher != null) { <END> setHost(matcher.getGroup(1)); setPort(matcher.getGroup(2)); valid = validatePort(); } else { valid = false; } }</code><technical_language>if is possible, try 'positive' expression eventually swap 'then' 'else' clauses</technical_language>

Target:
public UriAuthority(String authority) { MatchResult matcher = AUTHORITY_REGEXP.exec(authority == null ? EMPTY_STRING : authority); if (matcher == null) { this.host = null; this.port = null; valid = false; } else { String group1 = matcher.getGroup(1); this.host = (group1 == null) ? EMPTY_STRING : group1; String group2 = matcher.getGroup(2); this.port = (group2 == null) ? EMPTY_STRING : group2; valid = validatePort(); } }
Source:
<code>private void setInput(String location, Job job) throws IOException { this.setLocationHasBeenCalled = true; this.location = location; setInputPaths(job, location); if(UDFContext.getUDFContext().isFrontend()) { storeInUDFContext(PARQUET_COLUMN_INDEX_ACCESS, Boolean.toString(columnIndexAccess)); } schema = PigSchemaConverter.parsePigSchema(getPropertyFromUDFContext(PARQUET_PIG_SCHEMA)); requiredFieldList = PigSchemaConverter.deserializeRequiredFieldList(getPropertyFromUDFContext(PARQUET_PIG_REQUIRED_FIELDS)); columnIndexAccess = Boolean.parseBoolean(getPropertyFromUDFContext(PARQUET_COLUMN_INDEX_ACCESS)); initSchema(job); if(UDFContext.getUDFContext().isFrontend()) { storeInUDFContext(PARQUET_PIG_SCHEMA, pigSchemaToString(schema)); storeInUDFContext(PARQUET_PIG_REQUIRED_FIELDS, serializeRequiredFieldList(requiredFieldList)); } getConfiguration(job).set(PARQUET_PIG_SCHEMA, pigSchemaToString(schema)); getConfiguration(job).set(PARQUET_PIG_REQUIRED_FIELDS, serializeRequiredFieldList(requiredFieldList)); getConfiguration(job).set(PARQUET_COLUMN_INDEX_ACCESS, Boolean.toString(columnIndexAccess)); <START> SerializationUtil.writeObjectToConfAsBase64(ParquetInputFormat.FILTER_PREDICATE, getFromUDFContext(ParquetInputFormat.FILTER_PREDICATE), getConfiguration(job)); <END> }</code><technical_language>this [ParquetInputFormat.setFilterPredicate](<LINK_0> instead</technical_language>

Target:
private void setInput(String location, Job job) throws IOException { this.setLocationHasBeenCalled = true; this.location = location; setInputPaths(job, location); if(UDFContext.getUDFContext().isFrontend()) { storeInUDFContext(PARQUET_COLUMN_INDEX_ACCESS, Boolean.toString(columnIndexAccess)); } schema = PigSchemaConverter.parsePigSchema(getPropertyFromUDFContext(PARQUET_PIG_SCHEMA)); requiredFieldList = PigSchemaConverter.deserializeRequiredFieldList(getPropertyFromUDFContext(PARQUET_PIG_REQUIRED_FIELDS)); columnIndexAccess = Boolean.parseBoolean(getPropertyFromUDFContext(PARQUET_COLUMN_INDEX_ACCESS)); initSchema(job); if(UDFContext.getUDFContext().isFrontend()) { storeInUDFContext(PARQUET_PIG_SCHEMA, pigSchemaToString(schema)); storeInUDFContext(PARQUET_PIG_REQUIRED_FIELDS, serializeRequiredFieldList(requiredFieldList)); } getConfiguration(job).set(PARQUET_PIG_SCHEMA, pigSchemaToString(schema)); getConfiguration(job).set(PARQUET_PIG_REQUIRED_FIELDS, serializeRequiredFieldList(requiredFieldList)); getConfiguration(job).set(PARQUET_COLUMN_INDEX_ACCESS, Boolean.toString(columnIndexAccess)); FilterPredicate filterPredicate = (FilterPredicate) getFromUDFContext(ParquetInputFormat.FILTER_PREDICATE); if(filterPredicate != null) { ParquetInputFormat.setFilterPredicate(getConfiguration(job), filterPredicate); } }
Source:
<code>protected void updateModuleHandlerFactory(ModuleHandlerFactory moduleHandlerFactory) { logger.debug("ModuleHandlerFactory updated, updating handlers"); <START> Collection<String> types = new LinkedList<String>(moduleHandlerFactory.getTypes()); <END> Collection<String> newTypes = new LinkedList<String>(moduleHandlerFactory.getTypes()); Collection<String> removedTypes = new LinkedList<String>(); Set<Entry<String, ModuleHandlerFactory>> snapshot = new HashSet<Map.Entry<String, ModuleHandlerFactory>>(); synchronized (this) { snapshot.addAll(moduleHandlerFactories.entrySet()); } for (Map.Entry<String, ModuleHandlerFactory> entry : snapshot) { if (entry.getValue().equals(moduleHandlerFactory)) { String key = entry.getKey(); if (types.contains(key)) { newTypes.remove(key); } else { removedTypes.add(key); } } } if (removedTypes.size() > 0) { removeMissingModuleTypes(removedTypes); } if (newTypes.size() > 0) { addNewModuleTypes(moduleHandlerFactory, newTypes); } }</code><technical_language>set is changed linked list for types newTypes</technical_language>

Target:
protected void updateModuleHandlerFactory(ModuleHandlerFactory moduleHandlerFactory) { logger.debug("ModuleHandlerFactory updated, updating handlers"); Collection<String> types = new HashSet<String>(moduleHandlerFactory.getTypes()); Collection<String> newTypes = new HashSet<String>(moduleHandlerFactory.getTypes()); Collection<String> removedTypes = new ArrayList<String>(); Set<Entry<String, ModuleHandlerFactory>> snapshot = new HashSet<Map.Entry<String, ModuleHandlerFactory>>(); synchronized (this) { snapshot.addAll(moduleHandlerFactories.entrySet()); } for (Map.Entry<String, ModuleHandlerFactory> entry : snapshot) { if (entry.getValue().equals(moduleHandlerFactory)) { String key = entry.getKey(); if (types.contains(key)) { newTypes.remove(key); } else { removedTypes.add(key); } } } if (removedTypes.size() > 0) { removeMissingModuleTypes(removedTypes); updateModuleHandlerFactoryMap(removedTypes); } if (newTypes.size() > 0) { addNewModuleTypes(moduleHandlerFactory, newTypes); } }
Source:
<code>public void readEntityFromNBT(NBTTagCompound nbt) { super.readEntityFromNBT(nbt); <START> spells = ((List<Spell>) NBTExtras.NBTToList(nbt.getTagList("spells", Constants.NBT.TAG_STRING), <END> (NBTTagString tag) -> Spell.get(tag.getString()))); }</code><technical_language>NBTExtras.NBTToList replaced call NBTHelper, a list recreate is getSet create a new getList method instead of creating a hashset creates arraylist</technical_language>

Target:
public void readEntityFromNBT(NBTTagCompound nbt) { super.readEntityFromNBT(nbt); spells = (NBTHelper.getList(nbt.getTagList("spells", Constants.NBT.TAG_STRING), tag -> Spell.get(((NBTTagString) tag).getString()))); }
Source:
<code>public Launcher createLauncher(TaskListener listener) { Launcher launcher = super.createLauncher(listener); if (template != null) { Executor executor = Executor.currentExecutor(); if (executor != null) { Queue.Executable currentExecutable = executor.getCurrentExecutable(); if (currentExecutable != null && executables.add(currentExecutable)) { listener.getLogger().println(Messages.KubernetesSlave_AgentIsProvisionedFromTemplate( ModelHyperlinkNote.encodeTo("/computer/" + getNodeName(), getNodeName()), getTemplate().getDisplayName()) ); <START> listener.getLogger().println(getTemplate().getDescriptionForLogging(this)); <END> checkHomeAndWarnIfNeeded(listener); } } } return launcher; }</code><technical_language>delete this line KubernetesLauncher.launch print YAML of pod is create it? java listener.getLogger().printf("Created Pod: %s/%s%n", namespace, podId); is I expect YAML shown. is, building Pod multiple times, is clear need do that</technical_language>

Target:
public Launcher createLauncher(TaskListener listener) { Launcher launcher = super.createLauncher(listener); if (template != null) { Executor executor = Executor.currentExecutor(); if (executor != null) { Queue.Executable currentExecutable = executor.getCurrentExecutable(); if (currentExecutable != null && executables.add(currentExecutable)) { listener.getLogger().println(Messages.KubernetesSlave_AgentIsProvisionedFromTemplate( ModelHyperlinkNote.encodeTo("/computer/" + getNodeName(), getNodeName()), getTemplate().getDisplayName()) ); printAgentDescription(listener); checkHomeAndWarnIfNeeded(listener); } } } return launcher; }
Source:
<code>public double calculate(double goal, double current, double p, double i, double d, double f) { m_targetInputValue = goal; m_currentInputValue = current; double result; m_error = m_targetInputValue - m_currentInputValue; if (i != 0) { double potentialIGain = (m_totalError + m_error) * i; if (potentialIGain < m_maximumOutput) { if (potentialIGain > m_minimumOutput) { m_totalError += m_error; } else { m_totalError = m_minimumOutput / i; } } else { m_totalError = m_maximumOutput / i; } } m_derivativeValue = m_error - m_prevError; m_result = p * m_error + i * m_totalError + d * (m_derivativeValue) + f * goal; m_prevError = m_error; if (m_result > m_maximumOutput) { m_result = m_maximumOutput; } else if (m_result < m_minimumOutput) { m_result = m_minimumOutput; } result = m_result; <START> errorIsSmall = false; <END> if (checkErrorThreshold) { errorIsSmall = Math.abs(m_targetInputValue - m_currentInputValue) < errorTolerance; } derivativeIsSmall = false; if (checkDerivativeThreshold) { derivativeIsSmall = Math.abs(m_derivativeValue) < derivativeTolerance; } return result; }</code><technical_language>This logic simplified to: java errorIsSmall = checkErrorThreshold && Math.abs(m_targetInputValue - m_currentInputValue) < errorTolerance</technical_language>

Target:
public double calculate(double goal, double current, double p, double i, double d, double f) { m_targetInputValue = goal; m_currentInputValue = current; double result; m_error = m_targetInputValue - m_currentInputValue; if (i != 0) { double potentialIGain = (m_totalError + m_error) * i; if (potentialIGain < m_maximumOutput) { if (potentialIGain > m_minimumOutput) { m_totalError += m_error; } else { m_totalError = m_minimumOutput / i; } } else { m_totalError = m_maximumOutput / i; } } m_derivativeValue = m_error - m_prevError; m_result = p * m_error + i * m_totalError + d * (m_derivativeValue) + f * goal; m_prevError = m_error; if (m_result > m_maximumOutput) { m_result = m_maximumOutput; } else if (m_result < m_minimumOutput) { m_result = m_minimumOutput; } result = m_result; errorIsSmall = checkErrorThreshold && Math.abs(m_targetInputValue - m_currentInputValue) < errorTolerance; derivativeIsSmall = checkDerivativeThreshold && Math.abs(m_derivativeValue) < derivativeTolerance; return result; }
Source:
<code>public void registerCapabilities(ManagementResourceRegistration resourceRegistration) { if (capabilities!=null) { for (RuntimeCapability c : capabilities) { resourceRegistration.registerCapability(c); } } if (incorporatingCapabilities != null) { resourceRegistration.registerIncorporatingCapabilities(incorporatingCapabilities); } <START> if(requirements != null) { <END> resourceRegistration.registerRequirements(requirements); } }</code><technical_language>this.requirements is null (but empty). check removed</technical_language>

Target:
public void registerCapabilities(ManagementResourceRegistration resourceRegistration) { if (capabilities!=null) { for (RuntimeCapability c : capabilities) { resourceRegistration.registerCapability(c); } } if (incorporatingCapabilities != null) { resourceRegistration.registerIncorporatingCapabilities(incorporatingCapabilities); } assert requirements != null; resourceRegistration.registerRequirements(requirements); }
Source:
<code>protected void executeForStream(String filename, Producer<InputStream> inputSupplier) throws Exception { if (isValid(inputSupplier)) { <START> for (Consumer<BiConsumer<String, NodeHandler>> handlerConsumer : fetchHandlersList()) { <END> try (InputStream inputStream = inputSupplier.create()) { executeForValidStream(inputStream, handlerConsumer); } } } else { process.log(ProcessLog.error() .withNLSKey("XMLImportJob.invalidXMLDetected") .withContext("fileName", filename)); } }</code><technical_language>suggestion for (Consumer<BiConsumer<String, NodeHandler>> processingStage : fetchStages()) {</technical_language>

Target:
protected void executeForStream(String filename, Producer<InputStream> inputSupplier) throws Exception { if (isValid(inputSupplier)) { for (Consumer<BiConsumer<String, NodeHandler>> handlerConsumer : fetchStages()) { try (InputStream inputStream = inputSupplier.create()) { executeProcessingStage(inputStream, handlerConsumer); } } } else { process.log(ProcessLog.error() .withNLSKey("XMLImportJob.invalidXMLDetected") .withContext("fileName", filename)); } }
Source:
<code>private RequestDispatcher createDispatcher() { if (executorService == null) { <START> executorService = defaultExecutorService(); <END> } final RequestDispatcher dispatcher = new DefaultRequestDispatcher( createHttpConnector(sslHostnameVerification), executorService); return new RetryingRequestDispatcher(dispatcher, executorService, new SystemClock(), 5, TimeUnit.SECONDS); }</code><technical_language>nitpick: extra space =</technical_language>

Target:
private RequestDispatcher createDispatcher() { if (executorService == null) { executorService = defaultExecutorService(); } final RequestDispatcher dispatcher = new DefaultRequestDispatcher( createHttpConnector(sslHostnameVerification), executorService, shutDownExecutorOnClose); return new RetryingRequestDispatcher(dispatcher, executorService, new SystemClock(), 5, TimeUnit.SECONDS); }
Source:
<code>private void createLoadBalancer(Set<AddNode> addNodes) throws TimeoutException { System.out.println("Create Cloud Load Balancer"); CreateLoadBalancer createLB = CreateLoadBalancer.builder() .name(Constants.NAME) .protocol("MYSQL") .port(3306) .algorithm(LoadBalancer.Algorithm.RANDOM) .nodes(addNodes) .virtualIPType(VirtualIP.Type.PUBLIC) .build(); LoadBalancer loadBalancer; do { loadBalancer = lbApi.create(createLB); try { <START> Thread.sleep(30000); <END> } catch (InterruptedException e) { e.printStackTrace(); } } while(loadBalancer == null); if (!LoadBalancerPredicates.awaitAvailable(lbApi).apply(loadBalancer)) { throw new TimeoutException("Timeout on loadBalancer: " + loadBalancer); } System.out.println(" " + loadBalancer); System.out.println(" Go to http://" + getVirtualIPv4(loadBalancer.getVirtualIPs())); }</code><technical_language>Uninterruptibles.sleepUninterruptibly(sleepFor, unit) single threaded anyway</technical_language>

Target:
private void createLoadBalancer(Set<AddNode> addNodes) throws TimeoutException { System.out.println("Create Cloud Load Balancer"); CreateLoadBalancer createLB = CreateLoadBalancer.builder() .name(Constants.NAME) .protocol("MYSQL") .port(3306) .algorithm(LoadBalancer.Algorithm.RANDOM) .nodes(addNodes) .virtualIPType(VirtualIP.Type.PUBLIC) .build(); LoadBalancer loadBalancer; do { loadBalancer = lbApi.create(createLB); Uninterruptibles.sleepUninterruptibly(30, TimeUnit.SECONDS); } while(loadBalancer == null); if (!LoadBalancerPredicates.awaitAvailable(lbApi).apply(loadBalancer)) { throw new TimeoutException("Timeout on loadBalancer: " + loadBalancer); } System.out.println(" " + loadBalancer); System.out.println(" Go to http://" + getVirtualIPv4(loadBalancer.getVirtualIPs())); }
Source:
<code>public InternalJob loadJobWithTasksIfNotRemoved(final JobId id) { return executeReadOnlyTransaction(new SessionWork<InternalJob>() { @Override public InternalJob doInTransaction(Session session) { <START> Query jobQuery = session.getNamedQuery("loadJobWithTasksIfNotRemoved").setReadOnly(true); <END> List<InternalJob> result = new ArrayList<>(); batchLoadJobs(session, false, jobQuery, Collections.singletonList(jobId(id)), result); if (result.isEmpty()) { return null; } else { return result.get(0); } } }); }</code><technical_language>loadJobDataIfNotRemoved ? want match toplevel method name</technical_language>

Target:
public InternalJob loadJobWithTasksIfNotRemoved(final JobId id) { return executeReadOnlyTransaction(new SessionWork<InternalJob>() { @Override public InternalJob doInTransaction(Session session) { Query jobQuery = session.getNamedQuery("loadJobDataIfNotRemoved").setReadOnly(true); List<InternalJob> result = new ArrayList<>(); batchLoadJobs(session, false, jobQuery, Collections.singletonList(jobId(id)), result); if (result.isEmpty()) { return null; } else { return result.get(0); } } }); }
Source:
<code>public String getIconFileName() { boolean hasPerm = folder.hasPermission(Item.EXTENDED_READ); if (hasPerm) { ENDED_READ but not configure should still see this. final SecurityContext impersonate = ACL.impersonate(ACL.SYSTEM); try { hasPerm = folder.hasPermission(Item.CONFIGURE); } finally { SecurityContextHolder.setContext(impersonate); } } <START> return folder.hasPermission(Item.EXTENDED_READ) ? ConfigFilesManagement.ICON_PATH : null; <END> }</code><technical_language>this line needs of hasPerm</technical_language>

Target:
public String getIconFileName() { boolean hasPerm = folder.hasPermission(Item.CONFIGURE) || (folder.hasPermission(Item.EXTENDED_READ) && hasStore()); return hasPerm ? ConfigFilesManagement.ICON_PATH : null; }
Source:
<code><START> public void addAction(Action a) { <END> super.addAction(a); }</code><technical_language>I changes, this is special @jglick coding style</technical_language>

Target:
@Override public void addAction(Action a) { super.addAction(a); }
Source:
<code>public String getCsvDetailedFeedbackParticipantCommentOnResponse(FeedbackResponseAttributes response) { if (!this.responseComments.containsKey(response.getId())) { return " "; } List<FeedbackResponseCommentAttributes> frcList = this.responseComments.get(response.getId()); for (FeedbackResponseCommentAttributes frc : frcList) { if (frc.isCommentFromFeedbackParticipant) { return frc.convertCommentTextToStringForCsv(); } } return " "; <START> } <END></code><technical_language>Is is necessary</technical_language>

Target:
public String getCsvDetailedFeedbackParticipantCommentOnResponse(FeedbackResponseAttributes response) { if (!this.responseComments.containsKey(response.getId())) { return ""; } List<FeedbackResponseCommentAttributes> frcList = this.responseComments.get(response.getId()); for (FeedbackResponseCommentAttributes frc : frcList) { if (frc.isCommentFromFeedbackParticipant) { return frc.getCommentAsCsvString(); } } return ""; }
Source:
<code>public InstanceAdapter insert(SQLiteDatabase db, InstanceAdapter entityAdapter, boolean isSyncAdapter) { validate(entityAdapter, isSyncAdapter); Optional<Long> instanceId = new NullSafe<>(entityAdapter.taskAdapter().valueOf(TaskAdapter.ORIGINAL_INSTANCE_ID)); if (instanceId.isPresent()) { <START> String timeStampString = Long.toString(entityAdapter.taskAdapter().valueOf(TaskAdapter.ORIGINAL_INSTANCE_TIME).getTimestamp()); <END> try (Cursor c = db.query( TaskDatabaseHelper.Tables.INSTANCE_VIEW, new String[] { TaskContract.Instances._ID }, String.format("(%1$s == ? or %2$s == ?) and (%3$s == ? or %3$s is null and %4$s == ? or %3$s is null and %4$s is null and %5$s == ?) ", TaskContract.Instances.TASK_ID, TaskContract.Instances.ORIGINAL_INSTANCE_ID, TaskContract.Instances.INSTANCE_ORIGINAL_TIME, TaskContract.Instances.INSTANCE_START, TaskContract.Instances.INSTANCE_DUE), new String[] { instanceId.value().toString(), instanceId.value().toString(), timeStampString, timeStampString, timeStampString }, null, null, null)) { if (c.getCount() > 0) { throw new UnsupportedOperationException(String.format(Locale.ENGLISH, "Instance %s of task %d already exists", entityAdapter.taskAdapter().valueOf(TaskAdapter.ORIGINAL_INSTANCE_TIME).toString(), instanceId.value())); } } } return mDelegate.insert(db, entityAdapter, false); }</code><technical_language>read ORIGINAL_INSTANCE_TIME Optional throw explicitly in case of absent</technical_language>

Target:
public InstanceAdapter insert(SQLiteDatabase db, InstanceAdapter entityAdapter, boolean isSyncAdapter) { validateIsSyncAdapter(isSyncAdapter); validateValues(entityAdapter); validateInstanceIsNew(db, entityAdapter); return mDelegate.insert(db, entityAdapter, false); }
Source:
<code><START> public static List<String> runShellCommand(String cmd) throws ShellNotRunningException { <END> if (MainActivity.shellInteractive == null || !MainActivity.shellInteractive.isRunning()) throw new ShellNotRunningException(); final List<String> result = new ArrayList<>(); MainActivity.shellInteractive.addCommand(cmd, 0, (commandCode, exitCode, output) -> result.addAll(output)); MainActivity.shellInteractive.waitForIdle(); return result; }</code><technical_language>I understand say</technical_language>

Target:
public static ArrayList<String> runShellCommand(String cmd) throws ShellNotRunningException { if (MainActivity.shellInteractive == null || !MainActivity.shellInteractive.isRunning()) throw new ShellNotRunningException(); final ArrayList<String> result = new ArrayList<>(); MainActivity.shellInteractive.addCommand(cmd, 0, (commandCode, exitCode, output) -> result.addAll(output)); MainActivity.shellInteractive.waitForIdle(); return result; }
Source:
<code>public <ASSERT extends AbstractAssert<?, ?>> ASSERT extracting(String propertyOrField, InstanceOfAssertFactory<?, ASSERT> assertFactory) { <START> return extracting(propertyOrField, this::newObjectAssert).asInstanceOf(assertFactory); <END> }</code><technical_language>I assume this be: java return extracting(propertyOrField, assertFactory); is, create ObjectAssert map a assert type? is generic signature for extracting caused this impl. generics change I suggest, allow this fix</technical_language>

Target:
public <ASSERT extends AbstractAssert<?, ?>> ASSERT extracting(String propertyOrField, InstanceOfAssertFactory<?, ASSERT> assertFactory) { return super.extracting(propertyOrField, this::newObjectAssert).asInstanceOf(assertFactory); }
Source:
<code>public synchronized void updateSnapshots(ResourceControllerDataProvider dataProvider) { if (_oldSnapshot == null || _newSnapshot == null) { <START> initializeSnapshots(); <END> } _oldSnapshot = new ResourceChangeSnapshot(_newSnapshot); _newSnapshot = new ResourceChangeSnapshot(dataProvider); dataProvider.clearRefreshedChangeTypes(); clearCachedComputation(); }</code><technical_language>I need init new snapshot. Actually, do initialization in constructor? a good enforce people calling updateSnapshots other methods, safer ensure of snapshots null</technical_language>

Target:
public synchronized void updateSnapshots(ResourceControllerDataProvider dataProvider) { _oldSnapshot = new ResourceChangeSnapshot(_newSnapshot); _newSnapshot = new ResourceChangeSnapshot(dataProvider); dataProvider.clearRefreshedChangeTypes(); clearCachedComputation(); }
Source:
<code>public void deleteApplication(UUID applicationId) throws Exception { EntityManager em = getEntityManager(CpNamingUtils.SYSTEM_APP_ID); Query q = Query.fromQL(String.format("select * where applicationUuid = '%s'", applicationId.toString())); Results results = em.searchCollection( em.getApplicationRef(), "appinfos", q); Entity appToDelete = results.getEntity(); if(appToDelete != null) { <START> em.delete(appToDelete); <END> em.create("deleted_appinfo", appToDelete.getProperties()); } EntityIndex ei = managerCache.getEntityIndex(new ApplicationScopeImpl( new SimpleId(applicationId, TYPE_APPLICATION))); ei.deleteIndex(); }</code><technical_language>reverse this. If node dies this call, marked it. erroneous mark miss completely</technical_language>

Target:
public void deleteApplication(UUID applicationId) throws Exception { EntityManager em = getEntityManager(CpNamingUtils.SYSTEM_APP_ID); Query q = Query.fromQL(String.format("select * where applicationUuid = '%s'", applicationId.toString())); Results results = em.searchCollection(em.getApplicationRef(), "appinfos", q); Entity appToDelete = results.getEntity(); if(appToDelete != null) { em.create("deleted_appinfo", appToDelete.getProperties()); em.delete(appToDelete); } EntityIndex ei = managerCache.getEntityIndex(new ApplicationScopeImpl(new SimpleId(applicationId, TYPE_APPLICATION))); ei.deleteIndex(); em.refreshIndex(); }
Source:
<code>public Response help(@Context final HttpServletRequest request) { <START> LOGGER.info("Request: {}", RestServiceHelper.getRequestURI(request)); <END> return Response.ok(rdapObjectMapper.mapHelp(getRequestUrl(request))) .header("Content-Type", CONTENT_TYPE_RDAP_JSON) .build(); }</code><technical_language>remove this logging merging (or console flooded request messages</technical_language>

Target:
public Response help(@Context final HttpServletRequest request) { return Response.ok(rdapObjectMapper.mapHelp(getRequestUrl(request))) .header(CONTENT_TYPE, CONTENT_TYPE_RDAP_JSON) .build(); }
Source:
<code>public void setFeedInfo(URL feedUrl, SyndFeedInfo feedInfo) { try { String url = urlToString(feedUrl); String regex = atomClientConfigService.getRegexForFeedUrl(url); FeedRecord record = feedRecordDataService.findByURL(url); if (record != null) { SyndFeedInfo cachedFeedInfo = feedRecordToFeedInfo(record); if (sendMessagesForChangedEntries(url, cachedFeedInfo.getSyndFeed(), feedInfo.getSyndFeed(), regex)) { feedRecordDataService.delete(record); feedRecordDataService.create(recordFromFeed(url, feedInfo)); } } else { sendMessagesForNewFeedData(url, feedInfo.getSyndFeed(), regex); feedRecordDataService.create(recordFromFeed(url, feedInfo)); } } catch (IOException | FeedException | ClassNotFoundException ex) { <START> LOGGER.error(ex.getMessage(), ex); <END> } }</code><technical_language>additionally add message, signal problem occured</technical_language>

Target:
public synchronized void setFeedInfo(URL feedUrl, SyndFeedInfo feedInfo) { try { String url = FeedCacheUtils.urlToString(feedUrl); String regex = atomClientConfigService.getRegexForFeedUrl(url); FeedRecord record = feedRecordDataService.findByURL(url); if (record != null) { SyndFeedInfo cachedFeedInfo = FeedCacheUtils.feedRecordToFeedInfo(record); if (sendMessagesForChangedEntries(url, cachedFeedInfo.getSyndFeed(), feedInfo.getSyndFeed(), regex)) { feedRecordDataService.delete(record); feedRecordDataService.create(FeedCacheUtils.recordFromFeed(url, feedInfo)); } } else { sendMessagesForNewFeedData(url, feedInfo.getSyndFeed(), regex); feedRecordDataService.create(FeedCacheUtils.recordFromFeed(url, feedInfo)); } } catch (IOException | FeedException | ClassNotFoundException ex) { LOGGER.error("Error writing FeedRecord to the database {}", ex.getMessage()); } }
Source:
<code>public Mono<BlobContainer> createResourceAsync() { BlobContainersInner client = this.manager().inner().blobContainers(); return client <START> .createAsync(this.resourceGroupName, this.accountName, this.containerName, this.inner()) <END> .map(innerToFluentMap(this)); }</code><technical_language>need change set part? e.g. withPublicAccess</technical_language>

Target:
public Mono<BlobContainer> createResourceAsync() { BlobContainersInner client = this.manager().inner().blobContainers(); return client .createAsync(this.resourceGroupName, this.accountName, this.containerName, this.inner().withPublicAccess(cpublicAccess).withMetadata(cmetadata)) .map(innerToFluentMap(this)); }
Source:
<code>public static synchronized void dispose() { ScriptingDataProviderManager manager = INSTANCE; if (manager != null) { TmfSignalManager.deregister(manager); manager.fInstances.clear(); } <START> INSTANCE = null; <END> }</code><technical_language>Move if statement</technical_language>

Target:
public static synchronized void dispose() { ScriptingDataProviderManager manager = INSTANCE; if (manager != null) { TmfSignalManager.deregister(manager); manager.fInstances.clear(); INSTANCE = null; } }
Source:
<code><START> private int parseInteger(String line, String name) { <END> int ret = 0; try { ret = Integer.parseInt(line.substring(line.indexOf(name) + name.length(), line.length() - 1).trim()); } catch (NumberFormatException e) { logger.error(FAILED_PARSE_LINE_MSG, line, e); } return ret; }</code><technical_language>caller handle Exceptions</technical_language>

Target:
private int parseInteger(String line, String name) throws KuraException { int ret = 0; try { ret = Integer.parseInt(line.substring(line.indexOf(name) + name.length(), line.length() - 1).trim()); } catch (NumberFormatException e) { logger.error(FAILED_PARSE_LINE_MSG, line, e); throw new KuraException(KuraErrorCode.INVALID_PARAMETER, e); } return ret; }
Source:
<code>public PropertyConstraintMappingContext constraint(ConstraintDef<?, ?> definition) { if ( property.getKind() == Property.Kind.FIELD ) { super.addConstraint( ConfiguredConstraint.forProperty( definition, property ) ); } else { super.addConstraint( ConfiguredConstraint.forExecutable( definition, property.as( Callable.class ) <START> ) <END> ); } return this; }</code><technical_language>do property instanceof JavaBeanField ? ElementType.FIELD : ElementType.METHOD in ConfiguredConstraint.forProperty() call here. I expect call ConfiguredConstraint.forProperty() for a getter separated everything. least, inconsistent here</technical_language>

Target:
public PropertyConstraintMappingContext constraint(ConstraintDef<?, ?> definition) { if ( property instanceof JavaBeanField ) { super.addConstraint( ConfiguredConstraint.forProperty( definition, property ) ); } else { super.addConstraint( ConfiguredConstraint.forExecutable( definition, property.as( Callable.class ) ) ); } return this; }
Source:
<code><START> private short[] toShortArray(int[] ints) { <END> if (ints == null) { return null; } short[] shorts = new short[ints.length]; for (int i = 0; i < shorts.length; i++) { shorts[i] = toShort(ints[i]); } return shorts; }</code><technical_language>minor: static</technical_language>

Target:
private static short[] toShortArray(int[] ints) { if (ints == null) { return null; } short[] shorts = new short[ints.length]; for (int i = 0; i < shorts.length; i++) { shorts[i] = toShort(ints[i]); } return shorts; }
Source:
<code>private List<Pair<VariantContext, Genotype>> composeQualifyingCallsList(final TargetCollection<Target> targets, final List<Pair<VariantContext, Genotype>> calls) { return calls.stream() <START> .filter(pair -> !pair.getRight().getAlleles().isEmpty() <END> && !pair.getRight().getAlleles().get(0).equals(Allele.NO_CALL) && !pair.getRight().getAlleles().get(0).equals(pair.getLeft().getReference())) .filter(pair -> { final double callSQ = callQuality(pair.getRight()); return callSQ >= filterArguments.minimumCalledSegmentQuality; }) .filter(pair -> targets.targetCount(pair.getLeft()) >= filterArguments.minimumCalledSegmentLength) .filter(pair -> { final double[] calledAF = GATKProtectedVariantContextUtils.getAttributeAsDoubleArray(pair.getLeft(), VCFConstants.ALLELE_FREQUENCY_KEY, () -> new double[pair.getLeft().getAlleles().size() - 1], 0.0); final double nonRefAF = MathUtils.sum(calledAF); return nonRefAF <= filterArguments.maximumCalledEventFrequency && !(filterArguments.applyMultiAllelicCalledFilter && calledAF.length > 1 && calledAF[0] > 0 && calledAF[1] > 0); }) .collect(Collectors.toList()); }</code><technical_language>I this cleaner pair -> {final List<Allele> alleles = pair.getRight().getAlleles(); return !(alleles.isEmpty() || alleles.get(0).equals(Allele.NO_CALL) || etc);}</technical_language>

Target:
private List<Pair<VariantContext, Genotype>> composeQualifyingCallsList(final TargetCollection<Target> targets, final List<Pair<VariantContext, Genotype>> calls) { return calls.stream() .filter(pair -> pair.getRight().getAlleles().stream().anyMatch(a -> a.isCalled() && a.isNonReference())) .filter(pair -> callQuality(pair.getRight()) >= filterArguments.minimumCalledSegmentQuality) .filter(pair -> targets.targetCount(pair.getLeft()) >= filterArguments.minimumCalledSegmentLength) .filter(pair -> { final double[] calledAF = GATKProtectedVariantContextUtils.getAttributeAsDoubleArray(pair.getLeft(), VCFConstants.ALLELE_FREQUENCY_KEY, () -> new double[pair.getLeft().getAlleles().size() - 1], 0.0); final double nonRefAF = MathUtils.sum(calledAF); return nonRefAF <= filterArguments.maximumCalledEventFrequency && !(filterArguments.applyMultiAllelicCalledFilter && calledAF.length > 1 && calledAF[0] > 0 && calledAF[1] > 0); }) .collect(Collectors.toList()); }
Source:
<code>private List<File> scanJarsInPluginsDirectory() { if (pluginsDir == null || !pluginsDir.exists()) { return Collections.emptyList(); } File[] matches = pluginsDir.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { String n = pathname.getName(); <START> return (n.endsWith(".jar") || n.endsWith(".jar.disabled")) <END> && pathname.isFile(); } }); if (matches == null) { log.error("Cannot list " + pluginsDir.getAbsolutePath()); return Collections.emptyList(); } return Arrays.asList(matches); }</code><technical_language>processing disabled plugins init</technical_language>

Target:
private List<File> scanJarsInPluginsDirectory() { if (pluginsDir == null || !pluginsDir.exists()) { return Collections.emptyList(); } File[] matches = pluginsDir.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { String n = pathname.getName(); return (n.endsWith(".jar") && pathname.isFile()); } }); if (matches == null) { ui.message("WARN: Cannot list %s", pluginsDir.getAbsolutePath()); return Collections.emptyList(); } Arrays.sort(matches, new Comparator<File>() { @Override public int compare(File o1, File o2) { return o1.getName().compareTo(o2.getName()); } }); return Arrays.asList(matches); }
Source:
<code>public void shouldCreateANewChargeWithExternalMetadata() throws IOException { GatewayAccountEntity gatewayAccount = new GatewayAccountEntity(defaultTestAccount.getPaymentProvider(), new HashMap<>(), TEST); gatewayAccount.setId(defaultTestAccount.getAccountId()); ExternalMetadata expectedExternalMetadata = new ExternalMetadata( Map.of("key1", "String1", "key2", 123, <START> "key3", true)); <END> ChargeEntity chargeEntity = aValidChargeEntity() .withId(null) .withGatewayAccountEntity(gatewayAccount) .withExternalMetadata(expectedExternalMetadata) .build(); assertThat(chargeEntity.getId(), is(nullValue())); chargeDao.persist(chargeEntity); chargeDao.forceRefresh(chargeEntity); Optional<ChargeEntity> charge = chargeDao.findById(chargeEntity.getId()); assertThat(charge.get().getExternalMetadata().get().getMetadata(), equalTo(expectedExternalMetadata.getMetadata())); }</code><technical_language>I find hard lived for long succinct elegance of Map.of( )</technical_language>

Target:
public void shouldCreateANewChargeWithExternalMetadata() throws IOException { GatewayAccountEntity gatewayAccount = new GatewayAccountEntity(defaultTestAccount.getPaymentProvider(), new HashMap<>(), TEST); gatewayAccount.setId(defaultTestAccount.getAccountId()); ExternalMetadata expectedExternalMetadata = new ExternalMetadata( Map.of("key1", "String1", "key2", 123, "key3", true)); ChargeEntity chargeEntity = aValidChargeEntity() .withGatewayAccountEntity(gatewayAccount) .withExternalMetadata(expectedExternalMetadata) .build(); chargeDao.persist(chargeEntity); chargeDao.forceRefresh(chargeEntity); Optional<ChargeEntity> charge = chargeDao.findById(chargeEntity.getId()); assertThat(charge.get().getExternalMetadata().get().getMetadata(), equalTo(expectedExternalMetadata.getMetadata())); }
Source:
<code>public static boolean isSymlink(File path) <START> throws IOException { <END> return FileUtils.isSymlink(path); }</code><technical_language>add a throws declaration existing public API, if deprecated? reverted a change [1] adding throws broke compatibility. [1] <LINK_0></technical_language>

Target:
public static boolean isSymlink(File path) { return FileUtils.isSymlink(path); }
Source:
<code>public void shouldSendAvroAfterSubscriptionContentTypeChanged() throws InterruptedException, ExecutionException, TimeoutException, IOException { Topic topic = operations.buildTopic(topic() .withName("publishAvroAfterTopicEditing.topic") .withValidation(true) .withMessageSchema(user.getSchemaAsString()) .withContentType(AVRO).build()); operations.createSubscription(topic, "subscription", HTTP_ENDPOINT_URL, JSON); assertThat(publisher.publish("publishAvroAfterTopicEditing.topic", user.asBytes())).hasStatus(CREATED); <START> remoteService.waitUntilReceived(json -> assertThatJson(json).isEqualTo("{\"name\":\"Bob\",\"age\":50,\"favoriteColor\":\"blue\"}")); <END> remoteService.reset(); assertThat(management.subscription() .update(topic.getQualifiedName(), "subscription", subscription().withContentType(ContentType.AVRO).build())) .hasStatus(OK); wait.untilSubscriptionContentTypeChanged(topic, "subscription", ContentType.AVRO); wait.untilSubscriptionIsActivated(topic, "subscription"); assertThat(publisher.publish("publishAvroAfterTopicEditing.topic", user.asBytes())).hasStatus(CREATED); remoteService.waitUntilReceived(body -> { System.out.println(body); AvroUser avroUser = AvroUser.create(user.getSchema(), body.getBytes()); assertThat(avroUser.getName()).isEqualTo("Bob"); assertThat(avroUser.getAge()).isEqualTo(50); assertThat(avroUser.getFavoriteColor()).isEqualTo("blue"); }); }</code><technical_language>..yes I imagine TestMessage is in a similar fashion</technical_language>

Target:
public void shouldSendAvroAfterSubscriptionContentTypeChanged() throws InterruptedException, ExecutionException, TimeoutException, IOException { Topic topic = operations.buildTopic(topic() .withName("publishAvroAfterTopicEditing.topic") .withValidation(true) .withMessageSchema(user.getSchemaAsString()) .withContentType(AVRO).build()); operations.createSubscription(topic, "subscription", HTTP_ENDPOINT_URL, JSON); assertThat(publisher.publish("publishAvroAfterTopicEditing.topic", user.asBytes())).hasStatus(CREATED); remoteService.waitUntilReceived(json -> assertThatJson(json).isEqualTo(user.asJson())); remoteService.reset(); assertThat(management.subscription() .update(topic.getQualifiedName(), "subscription", subscription().withContentType(ContentType.AVRO).build())) .hasStatus(OK); wait.untilSubscriptionContentTypeChanged(topic, "subscription", ContentType.AVRO); wait.untilSubscriptionIsActivated(topic, "subscription"); assertThat(publisher.publish("publishAvroAfterTopicEditing.topic", user.asBytes())).hasStatus(CREATED); remoteService.waitUntilReceived(body -> { System.out.println(body); AvroUser avroUser = AvroUser.create(user.getSchema(), body.getBytes()); assertThat(avroUser.getName()).isEqualTo("Bob"); assertThat(avroUser.getAge()).isEqualTo(50); assertThat(avroUser.getFavoriteColor()).isEqualTo("blue"); }); }
Source:
<code>private void onMaybeMuteChanged(){ <START> if (player.isMuted()) { muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.white)); } else { muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.gray)); } } <END></code><technical_language>suggestion muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), isMuted ? R.color.white : R.color.gray)); }</technical_language>

Target:
private void onMaybeMuteChanged() { if (menu != null && player != null) { MenuItem item = menu.findItem(R.id.action_mute); item.setTitle(player.isMuted() ? R.string.unmute : R.string.mute); TypedArray a = getTheme().obtainStyledAttributes(R.style.Theme_AppCompat, new int[]{R.attr.volume_off}); int attributeResourceId = a.getResourceId(0, 0); Drawable drawableMuted = getResources().getDrawable(attributeResourceId); Drawable drawableUnmuted = getResources().getDrawable(R.drawable.ic_volume_off_gray_24dp); item.setIcon(player.isMuted() ? drawableMuted : drawableUnmuted); } }
Source:
<code>private void renameNote(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage) throws SchedulerException, IOException { String noteId = (String) fromMessage.get("id"); String name = (String) fromMessage.get("name"); if (noteId == null) { return; } NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization(); if (!notebookAuthorization.isOwner(noteId, userAndRoles)) { <START> permissionError(conn, "rename the note", fromMessage.principal, <END> userAndRoles, notebookAuthorization.getOwners(noteId)); return; } Note note = notebook.getNote(noteId); if (note != null) { note.setName(name); AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal); note.persist(subject); broadcastNote(note); broadcastNoteList(subject, userAndRoles); } }</code><technical_language>@tae-jun I care other operations [as said](<LINK_0> bad. I thought renaming.. this "rename note" -> "rename" before, put note in [here](<LINK_1></technical_language>

Target:
private void renameNote(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage) throws SchedulerException, IOException { String noteId = (String) fromMessage.get("id"); String name = (String) fromMessage.get("name"); if (noteId == null) { return; } NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization(); if (!notebookAuthorization.isOwner(noteId, userAndRoles)) { permissionError(conn, "rename", fromMessage.principal, userAndRoles, notebookAuthorization.getOwners(noteId)); return; } Note note = notebook.getNote(noteId); if (note != null) { note.setName(name); AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal); note.persist(subject); broadcastNote(note); broadcastNoteList(subject, userAndRoles); } }
Source:
<code>public List<DomainRouterVO> listIsolatedByHostId(final Long hostId) { final SearchCriteria<DomainRouterVO> sc = HostUpSearch.create(); if (hostId != null) { sc.setParameters("host", hostId); } sc.setJoinParameters("networkRouter", "type", Network.GuestType.Isolated); final List<DomainRouterVO> routerIds = listBy(sc); final List<DomainRouterVO> routers = new ArrayList<DomainRouterVO>(); for (DomainRouterVO router : routerIds) { <START> router = findById(router.getId()); <END> if (router != null) { routers.add(router); } } return routers; }</code><technical_language>CollectionUtils.addIgnoreNull(routers,findById(router.getId()))</technical_language>

Target:
public List<DomainRouterVO> listIsolatedByHostId(final Long hostId) { final SearchCriteria<DomainRouterVO> sc = HostUpSearch.create(); if (hostId != null) { sc.setParameters("host", hostId); } sc.setJoinParameters("networkRouter", "type", Network.GuestType.Isolated); final List<DomainRouterVO> routerIds = listBy(sc); final List<DomainRouterVO> routers = new ArrayList<DomainRouterVO>(); for (final DomainRouterVO router : routerIds) { CollectionUtils.addIgnoreNull(routers, findById(router.getId())); } return routers; }
Source:
<code>ReactorHookRegistrar(final Tracer tracer, final TraceKeys traceKeys) { if (log.isDebugEnabled()) { log.debug("Registering the Trace Scheduler Single Factory"); } Schedulers.setFactory(new Schedulers.Factory() { <START> @Override public Scheduler newSingle(ThreadFactory threadFactory) { <END> return new TraceScheduler(Schedulers.Factory.super.newSingle(threadFactory), tracer, traceKeys); } }); }</code><technical_language>intent here. Do want this span manipulation occur single() Scheduler? a Flux elastic() Scheduler, a timer()-based operator</technical_language>

Target:
ReactorHookRegistrar(final Tracer tracer, final TraceKeys traceKeys) { if (log.isDebugEnabled()) { log.debug("Registering the Trace Scheduler Single Factory"); } Schedulers.setFactory(new Schedulers.Factory() { @Override public Scheduler newSingle(ThreadFactory threadFactory) { return new TraceScheduler(Schedulers.Factory.super.newSingle(threadFactory), tracer, traceKeys); } @Override public Scheduler newElastic(int ttlSeconds, ThreadFactory threadFactory) { return new TraceScheduler(Schedulers.Factory.super.newElastic(ttlSeconds, threadFactory), tracer, traceKeys); } @Override public Scheduler newParallel(int parallelism, ThreadFactory threadFactory) { return new TraceScheduler(Schedulers.Factory.super.newParallel(parallelism, threadFactory), tracer, traceKeys); } }); }