auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private List<HttpCookie> processCookieHeader(String headerKey, List<String> headerValues) { List<HttpCookie> foundCookies = new LinkedList<>(); for (String headerValue : headerValues) { foundCookies .addAll(HttpCookie.parse(headerKey + <START> ":" + <END> headerValue)); } return foundCookies; }</code><technical_language>';' (character; single quotes; need a NON-NLS again</technical_language>

Target:
private List<HttpCookie> processCookieHeader(String headerKey, List<String> headerValues) { List<HttpCookie> foundCookies = new LinkedList<>(); for (String headerValue : headerValues) { foundCookies .addAll(HttpCookie.parse(headerKey + ':' + headerValue)); } return foundCookies; }
Source:
<code>public Object addNonInheritableProperty(String key, Object value) { if (getInheritableProperties().containsKey(key)) { <START> final Object oldValue = getInheritableProperties().get(key); <END> getInheritableProperties().removeKey(key); getNonInheritableProperties().put(key, value); return oldValue; } return getNonInheritableProperties().put(key, value); }</code><technical_language>need fetch</technical_language>

Target:
public Object addNonInheritableProperty(String key, Object value) { if (getInheritableProperties().containsKey(key)) { final Object oldValue = getInheritableProperties().removeKey(key); getNonInheritableProperties().put(key, value); return oldValue; } return getNonInheritableProperties().put(key, value); }
Source:
<code>private synchronized void writeCurrentBufferToService() throws IOException { if (bufferIndex == 0) { return; } final byte[] bytes = buffer; final int bytesLength = bufferIndex; buffer = byteBufferPool.getBuffer(false, bufferSize).array(); bufferIndex = 0; final long offset = position; position += bytesLength; if (threadExecutor.getQueue().size() >= maxConcurrentRequestCount * 2) { waitForTaskToComplete(); } <START> final Future<AuthorizationStatus> job = completionService.submit(new Callable<AuthorizationStatus>() { <END> @Override public AuthorizationStatus call() throws Exception { AbfsPerfTracker tracker = client.getAbfsPerfTracker(); try (AbfsPerfInfo perfInfo = new AbfsPerfInfo(tracker, "writeCurrentBufferToService", "append")) { AbfsRestOperation op = client.append(path, offset, bytes, 0, bytesLength, authzStatus); perfInfo.registerResult(op.getResult()); byteBufferPool.putBuffer(ByteBuffer.wrap(bytes)); perfInfo.registerSuccess(true); return op.getAuthorizationStatus(); } } }); writeOperations.add(new WriteOperation(job, offset, bytesLength)); shrinkWriteOperationQueue(); }</code><technical_language>a java 8 lambda callable</technical_language>

Target:
private synchronized void writeCurrentBufferToService() throws IOException { if (bufferIndex == 0) { return; } final byte[] bytes = buffer; final int bytesLength = bufferIndex; buffer = byteBufferPool.getBuffer(false, bufferSize).array(); bufferIndex = 0; final long offset = position; position += bytesLength; if (threadExecutor.getQueue().size() >= maxConcurrentRequestCount * 2) { waitForTaskToComplete(); } final Future<Void> job = completionService.submit(new Callable<Void>() { @Override public Void call() throws Exception { AbfsPerfTracker tracker = client.getAbfsPerfTracker(); try (AbfsPerfInfo perfInfo = new AbfsPerfInfo(tracker, "writeCurrentBufferToService", "append")) { AbfsRestOperation op = client.append(path, offset, bytes, 0, bytesLength); perfInfo.registerResult(op.getResult()); byteBufferPool.putBuffer(ByteBuffer.wrap(bytes)); perfInfo.registerSuccess(true); return null; } } }); writeOperations.add(new WriteOperation(job, offset, bytesLength)); shrinkWriteOperationQueue(); }
Source:
<code>private boolean imageWriterPathIsValid() { <START> if ((!copyImageCheckbox.isSelected()) || !(localDisk != null)) { <END> imageWriterErrorLabel.setVisible(false); imageWriterErrorLabel.setText(""); return true; } if (pathTextField.getText().isEmpty()) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(Bundle.LocalDiskPanel_imageWriterError_emptyPath()); return false; } File f = new File(pathTextField.getText()); if (((f.getParentFile() != null) && (!f.getParentFile().exists())) || (f.getParentFile() == null)) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(Bundle.LocalDiskPanel_imageWriterError_directoryNotExist()); return false; } if (f.isDirectory()) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(Bundle.LocalDiskPanel_imageWriterError_isDirectory()); return false; } if (f.exists()) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(Bundle.LocalDiskPanel_imageWriterError_fileExists()); return false; } imageWriterErrorLabel.setVisible(false); imageWriterErrorLabel.setText(""); return true; }</code><technical_language>Please change double negative in part</technical_language>

Target:
private boolean imageWriterPathIsValid() { if ((!copyImageCheckbox.isSelected()) || localDisk == null) { imageWriterErrorLabel.setVisible(false); imageWriterErrorLabel.setText(""); return true; } if (pathTextField.getText().isEmpty()) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(Bundle.LocalDiskPanel_imageWriterError_emptyPath()); return false; } File f = new File(pathTextField.getText()); if (((f.getParentFile() != null) && (!f.getParentFile().exists())) || (f.getParentFile() == null)) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(Bundle.LocalDiskPanel_imageWriterError_directoryNotExist()); return false; } if (f.isDirectory()) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(Bundle.LocalDiskPanel_imageWriterError_isDirectory()); return false; } if (f.exists()) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(Bundle.LocalDiskPanel_imageWriterError_fileExists()); return false; } imageWriterErrorLabel.setVisible(false); imageWriterErrorLabel.setText(""); return true; }
Source:
<code>public AVideo(File file) { if (file == null) <START> throw new IllegalArgumentException("null url"); <END> _name = file.getName(); _file = file; _isdata = DYNAMIC_STREAM; _data = null; _url = null; }</code><technical_language>is file, url. "file null"? a completed sentence</technical_language>

Target:
public AVideo(File file) { if (file == null) throw new IllegalArgumentException("file cannot be null"); _name = file.getName(); _file = file; _isdata = DYNAMIC_STREAM; _data = null; _url = null; }
Source:
<code>public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) { this.context = context; this.collector = collector; firstPollOffsetStrategy = kafkaSpoutConfig.getFirstPollOffsetStrategy(); retryService = kafkaSpoutConfig.getRetryService(); tupleListener = kafkaSpoutConfig.getTupleListener(); if (isAtLeastOnceProcessing()) { commitTimer = new Timer(TIMER_DELAY_MS, kafkaSpoutConfig.getOffsetsCommitPeriodMs(), TimeUnit.MILLISECONDS); } refreshSubscriptionTimer = new Timer(TIMER_DELAY_MS, kafkaSpoutConfig.getPartitionRefreshPeriodMs(), TimeUnit.MILLISECONDS); offsetManagers = new ConcurrentHashMap<>(); emitted = new HashSet<>(); waitingToEmit = Collections.emptyListIterator(); tupleListener.open(conf, context); <START> context.registerMetric("kafkaOffset", new IMetric() { <END> KafkaUtils.KafkaOffsetMetric _kafkaOffsetMetric = new KafkaUtils.KafkaOffsetMetric(offsetManagers, metricsConsumer); @Override public Object getValueAndReset() { return _kafkaOffsetMetric.getValueAndReset(); } }, kafkaSpoutConfig.getMetricsTimeBucketSizeInSecs()); LOG.info("Kafka Spout opened with the following configuration: {}", kafkaSpoutConfig); }</code><technical_language>do need wrapper metric</technical_language>

Target:
public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) { this.context = context; this.collector = collector; firstPollOffsetStrategy = kafkaSpoutConfig.getFirstPollOffsetStrategy(); retryService = kafkaSpoutConfig.getRetryService(); tupleListener = kafkaSpoutConfig.getTupleListener(); if (isAtLeastOnceProcessing()) { commitTimer = new Timer(TIMER_DELAY_MS, kafkaSpoutConfig.getOffsetsCommitPeriodMs(), TimeUnit.MILLISECONDS); } refreshSubscriptionTimer = new Timer(TIMER_DELAY_MS, kafkaSpoutConfig.getPartitionRefreshPeriodMs(), TimeUnit.MILLISECONDS); offsetManagers = new HashMap<>(); emitted = new HashSet<>(); waitingToEmit = new HashMap<>(); setCommitMetadata(context); tupleListener.open(conf, context); if (canRegisterMetrics()) { registerMetric(); } LOG.info("Kafka Spout opened with the following configuration: {}", kafkaSpoutConfig); }
Source:
<code>public boolean match(final ChangeData object) throws OrmException { final Set<Account.Id> allApprovers = new HashSet<Account.Id>(); final Set<Account.Id> approversThatVotedInCategory = new HashSet<Account.Id>(); for (PatchSetApproval p : object.currentApprovals(dbProvider)) { <START> if (accounts != null && ! accounts.contains(p.getAccountId())) { <END> continue; } allApprovers.add(p.getAccountId()); if (p.getCategoryId().equals(category.getId())) { approversThatVotedInCategory.add(p.getAccountId()); if (match(object.change(dbProvider), p.getValue(), p.getAccountId())) { return true; } } } final Set<Account.Id> approversThatDidNotVoteInCategory = new HashSet<Account.Id>(allApprovers); approversThatDidNotVoteInCategory.removeAll(approversThatVotedInCategory); for (final Account.Id a : approversThatDidNotVoteInCategory) { if (match(object.change(dbProvider), 0, a)) { return true; } } return false; }</code><technical_language>nit: space "!"</technical_language>

Target:
public boolean match(final ChangeData object) throws OrmException { final Change c = object.change(dbProvider); if (c == null) { return false; } final ProjectState project = projectCache.get(c.getDest().getParentKey()); if (project == null) { return false; } final LabelType labelType = type(project.getLabelTypes(), type); final Set<Account.Id> allApprovers = new HashSet<Account.Id>(); final Set<Account.Id> approversThatVotedInCategory = new HashSet<Account.Id>(); for (PatchSetApproval p : object.currentApprovals(dbProvider)) { allApprovers.add(p.getAccountId()); if (labelType.matches(p)) { approversThatVotedInCategory.add(p.getAccountId()); if (match(c, p.getValue(), p.getAccountId(), labelType)) { return true; } } } final Set<Account.Id> approversThatDidNotVoteInCategory = new HashSet<Account.Id>(allApprovers); approversThatDidNotVoteInCategory.removeAll(approversThatVotedInCategory); for (Account.Id a : approversThatDidNotVoteInCategory) { if (match(c, 0, a, labelType)) { return true; } } return false; }
Source:
<code>public boolean stop() { List<SyncQueueItemVO> jobs = _syncQueueItemDao.getActiveQueueItems(getMsid(), false); for (SyncQueueItemVO job : jobs) { AsyncJobVO childjob = _jobDao.findById(job.getContentId()); if (childjob != null) { Long parentjobid = Long.parseLong(childjob.getRelated()); try { if (s_logger.isDebugEnabled()) { s_logger.debug("Cancel left-over async. job- " + parentjobid); } cancelAsyncJob(parentjobid, "Management Server shutdown"); } catch (Exception e) { s_logger.error("Exception while cancelling job -" + parentjobid, e); } } _queueMgr.purgeItem(job.getId()); } <START> shutdownAndAwaitTermination(_workerJobExecutor); <END> shutdownAndAwaitTermination(_apiJobExecutor); _heartbeatScheduler.shutdown(); return true; }</code><technical_language>parentjobid needs checked for null</technical_language>

Target:
public boolean stop() { List<SyncQueueItemVO> jobs = _syncQueueItemDao.getActiveQueueItems(getMsid(), false); for (SyncQueueItemVO job : jobs) { AsyncJobVO childjob = _jobDao.findById(job.getContentId()); if (childjob != null && StringUtils.isNotBlank(childjob.getRelated())) { Long parentjobid = Long.parseLong(childjob.getRelated()); try { if (s_logger.isDebugEnabled()) { s_logger.debug("Cancel left-over async. job- " + parentjobid); } cancelAsyncJob(parentjobid, "Management Server shutdown"); } catch (Exception e) { s_logger.error("Exception while cancelling job -" + parentjobid, e); } } _queueMgr.purgeItem(job.getId()); } shutdownAndAwaitTermination(_workerJobExecutor); shutdownAndAwaitTermination(_apiJobExecutor); _heartbeatScheduler.shutdown(); return true; }
Source:
<code>public String getUrlForWikiPageWithWWW(String pageName) { <START> if ("".equals(pageName)) <END> throw new WebDriverException("Page name is missing"); return getUrl(true) + URLsContent.WIKI_DIR + pageName; }</code><technical_language>please add curly braces</technical_language>

Target:
public String getUrlForWikiPageWithWWW(String pageName) { if ("".equals(pageName)) { throw new WebDriverException("Page name is missing"); } return getUrl(true) + URLsContent.WIKI_DIR + pageName; }
Source:
<code>public void onImport(String fileContents) { <START> GWT.log(this.toString() + "onImport(" + fileContents + ")"); <END> scenarioSimulationEditorWrapper.onImport(fileContents, getImportCallBack(), getImportErrorCallback(), context.getStatus().getSimulation()); }</code><technical_language>Is this log necessary</technical_language>

Target:
public void onImport(String fileContents) { scenarioSimulationEditorWrapper.onImport(fileContents, getImportCallBack(), getImportErrorCallback(), context.getStatus().getSimulation()); }
Source:
<code>private boolean memoryNextRunSnapshotRequired() { <START> final VM vmFromDb = getVm(); <END> final VM vmFromParams = getParameters().getVm(); return VMStatus.Down != getVm().getStatus() && vmFromDb.getMemSizeMb() != vmFromParams.getMemSizeMb(); }</code><technical_language>please #oldVm instead</technical_language>

Target:
private boolean memoryNextRunSnapshotRequired() { final VM oldVm = getVm(); return VMStatus.Down != getVm().getStatus() && oldVm.getMemSizeMb() != getParameters().getVm().getMemSizeMb(); }
Source:
<code>public void test24HourDateConversions() { <START> ZonedDateTime date = ZonedDateTime.parse("2018-06-04T09:07:30-04:00"); <END> QueryDate qd = new QueryDate(date.toInstant().toEpochMilli()); assertThat(qd.toString().indexOf("2018-06-04T13:07:30"), not(equalTo(-1))); }</code><technical_language>I this needs "Z" end ("2018-06-04T09:07:30-04:00Z") match ISO-8601 format AppConnect uses</technical_language>

Target:
public void test24HourDateConversions() { ZonedDateTime date = ZonedDateTime.parse("2018-06-04T09:07:30-04:00"); QueryDate qd = new QueryDate(date.toInstant().toEpochMilli()); assertThat(qd.toString().indexOf("2018-06-04T13:07:30.00Z"), not(equalTo(-1))); }
Source:
<code>public ComponentValidationDiagnostic validate(final IBranchPath branchPath, final SnomedConceptIndexEntry component) { final SnomedTaxonomyService taxonomyService = getServiceForClass(SnomedTaxonomyService.class); final String conceptId = component.getId(); if (isConceptReferenceItself(branchPath, taxonomyService, conceptId)) { final SnomedStatementBrowser statementBrowser = getServiceForClass(SnomedStatementBrowser.class); for (final SnomedRelationshipIndexEntry relationship : statementBrowser.getOutboundStatements(branchPath, component)) { <START> if (relationship.isActive() && relationship.getValueId().equals(conceptId)) { <END> return new ComponentValidationDiagnosticImpl(conceptId, createErrorMessage(component, relationship, branchPath), ID, CONCEPT_NUMBER, error()); } } } return createOk(conceptId, ID, CONCEPT_NUMBER); }</code><technical_language>change this a simple request filters instead of checking items returned getOutboundStatements, return active relationships source target concept, if is any, report in a single call. current implementation return problem, of them. this: final SnomedRelationships invalidRelationships = SnomedRequests.prepareSearchRelationships() .all() .filterByActive(true) .filterByDestination(conceptId) .filterBySource(conceptId) .build(...).executeSync(...); if (!invalidRelationships.getItems().isEmpty()) { // report validation error }</technical_language>

Target:
public ComponentValidationDiagnostic validate(final IBranchPath branchPath, final SnomedConceptIndexEntry component) { final String conceptId = component.getId(); SnomedRelationships relationships = SnomedRequests.prepareSearchRelationship() .all() .filterByActive(true) .filterByDestination(conceptId) .filterBySource(conceptId) .setExpand("type(expand(pt()))") .setLocales(getLocales()) .build(branchPath.getPath()) .executeSync(getBus()); if (!relationships.getItems().isEmpty()) { for (ISnomedRelationship relationship : relationships) { return new ComponentValidationDiagnosticImpl(conceptId, createErrorMessage(component, relationship, branchPath), ID, CONCEPT_NUMBER, error()); } } return createOk(conceptId, ID, CONCEPT_NUMBER); }
Source:
<code>protected void updateData(long start, long end, int nb, IProgressMonitor monitor) { double[] xAxis = getXAxis(start, end, nb); if (xAxis.length == 1) { return; } setXAxis(xAxis); try (ScopeLog log = new ScopeLog(LOGGER, Level.FINE, "CounterChartViewer#updateData")) { for (Object entry : <START> fEntries) { <END> if (monitor.isCanceled()) { return; } if (!(entry instanceof CounterTreeViewerEntry)) { continue; } CounterTreeViewerEntry counterEntry = (CounterTreeViewerEntry) entry; double[] steps = new double[xAxis.length]; ITmfStateSystem ss = counterEntry.getStateSystem(); Integer quark = counterEntry.getQuark(); long stateSystemStartTime = ss.getStartTime(); long stateSystemEndTime = ss.getCurrentEndTime(); long prevTime = Math.max(stateSystemStartTime, (long) (start - (xAxis[1]))); if (prevTime <= stateSystemEndTime) { Object prev = ss.querySingleState(prevTime, quark).getValue(); long prevValue = prev instanceof Long ? (long) prev : 0; for (int i = 0; i < xAxis.length; i++) { long nextTime = start + (long) xAxis[i] - 1; if (nextTime >= stateSystemStartTime && nextTime <= stateSystemEndTime) { Object next = ss.querySingleState(nextTime, quark).getValue(); long nextValue = next instanceof Long ? (long) next : 0; steps[i] = (next == null) ? 0 : nextValue - prevValue; prevValue = nextValue; } } } setSeries(counterEntry.getFullPath(), steps); } } catch (StateSystemDisposedException e) { return; } updateDisplay(); }</code><technical_language>Iterables.filter(fEntries, CounterTreeViewerEntry.class)</technical_language>

Target:
protected void updateData(long start, long end, int nb, IProgressMonitor monitor) { double[] xAxis = getXAxis(start, end, nb); if (xAxis.length == 1) { return; } setXAxis(xAxis); try (ScopeLog log = new ScopeLog(LOGGER, Level.FINE, "CounterChartViewer#updateData")) { for (CounterTreeViewerEntry counterEntry : Iterables.filter(fEntries, CounterTreeViewerEntry.class)) { if (monitor.isCanceled()) { return; } double[] steps = new double[xAxis.length]; ITmfStateSystem ss = counterEntry.getStateSystem(); Integer quark = counterEntry.getQuark(); long stateSystemStartTime = ss.getStartTime(); long stateSystemEndTime = ss.getCurrentEndTime(); long prevTime = Math.max(stateSystemStartTime, (long) (start - (xAxis[1]))); if (prevTime <= stateSystemEndTime) { Object prev = ss.querySingleState(prevTime, quark).getValue(); long prevValue = prev instanceof Long ? (long) prev : 0; for (int i = 0; i < xAxis.length; i++) { long nextTime = start + (long) xAxis[i] - 1; if (nextTime >= stateSystemStartTime && nextTime <= stateSystemEndTime) { Object next = ss.querySingleState(nextTime, quark).getValue(); long nextValue = next instanceof Long ? (long) next : 0; steps[i] = (next == null) ? 0 : nextValue - prevValue; prevValue = nextValue; } } } setSeries(counterEntry.getFullPath(), steps); } } catch (StateSystemDisposedException e) { return; } updateDisplay(); }
Source:
<code>public <R> R execute(ResultProducer<R> producer) { <START> if (bindings.isEmpty()) { <END> throw new IllegalStateException("No batch parts to execute"); } try { return producer.produce(() -> internalBatchExecute().stmt, getContext()); } catch (SQLException e) { throw new UnableToProduceResultException("Exception producing batch result", e, getContext()); } }</code><technical_language>good add a sanity check validate getBinding() is empty, catch users forget call add(). Mockito similar e.g. if call verify(mock) chaining a method call mock</technical_language>

Target:
public <R> R execute(ResultProducer<R> producer) { try { return producer.produce(() -> internalBatchExecute().stmt, getContext()); } catch (SQLException e) { throw new UnableToProduceResultException("Exception producing batch result", e, getContext()); } }
Source:
<code>public static Address[] getListPostAddresses(Message message) { String[] headerValues = new String[0]; try { headerValues = message.getHeader(LIST_POST_HEADER); } catch (MessagingException e) { Log.e(K9MailLib.LOG_TAG, "Unable to parse list-post header", e); } if (headerValues.length < 1) { return new Address[0]; } List<Address> listPostAddresses = new ArrayList<>(); for (String headerValue : headerValues) { <START> if (headerValue == null || headerValues[0].isEmpty()) { <END> continue; } Matcher m = mailtoContainerPattern.matcher(headerValue); if (!m.find()) { continue; } String mailToUri = m.group(1); String emailAddress = MailTo.parse(mailToUri).getTo(); listPostAddresses.add(new Address(emailAddress)); } return listPostAddresses.toArray(new Address[listPostAddresses.size()]); }</code><technical_language>headerValues[0].isEmpty() headerValue.isEmpty()</technical_language>

Target:
public static Address[] getListPostAddresses(Message message) { String[] headerValues = new String[0]; try { headerValues = message.getHeader(LIST_POST_HEADER); } catch (MessagingException e) { Log.e(K9MailLib.LOG_TAG, "Unable to parse list-post header", e); } if (headerValues.length < 1) { return new Address[0]; } List<Address> listPostAddresses = new ArrayList<>(); for (String headerValue : headerValues) { if (headerValue == null || headerValue.isEmpty()) { continue; } Matcher m = mailtoContainerPattern.matcher(headerValue); if (!m.find()) { continue; } String mailToUri = m.group(1); String emailAddress = MailTo.parse(mailToUri).getTo(); listPostAddresses.add(new Address(emailAddress)); } return listPostAddresses.toArray(new Address[listPostAddresses.size()]); }
Source:
<code>public void load() throws TableNotFoundException, IOException, AccumuloException, AccumuloSecurityException { TableId tableId = Tables.getTableId(context, tableName); Map<String,String> props = context.instanceOperations().getSystemConfiguration(); AccumuloConfiguration conf = new ConfigurationCopy(props); FileSystem fs = VolumeConfiguration.getVolume(dir, context.getHadoopConf(), conf).getFileSystem(); Path srcPath = checkPath(fs, dir); SortedMap<KeyExtent,Bulk.Files> mappings; TableOperationsImpl tableOps = new TableOperationsImpl(context); boolean retry = true; while (retry) { if (plan == null) { mappings = computeMappingFromFiles(fs, tableId, srcPath); } else { mappings = computeMappingFromPlan(fs, tableId, srcPath); } if (mappings.isEmpty()) throw new IllegalArgumentException("Attempted to import zero files from " + srcPath); BulkSerialize.writeLoadMapping(mappings, srcPath.toString(), fs::create); List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.canonical().getBytes(UTF_8)), ByteBuffer.wrap(srcPath.toString().getBytes(UTF_8)), ByteBuffer.wrap((setTime + "").getBytes(UTF_8))); try { tableOps.doBulkFateOperation(args, tableName); retry = false; } catch (AccumuloBulkMergeException ae) { if (plan != null) { <START> checkPlanForSplits(); <END> } log.info(ae.getMessage() + ". Retrying bulk import to " + tableName); } } }</code><technical_language>a good idea pass ae down, add a suppressed exception later</technical_language>

Target:
public void load() throws TableNotFoundException, IOException, AccumuloException, AccumuloSecurityException { TableId tableId = Tables.getTableId(context, tableName); Map<String,String> props = context.instanceOperations().getSystemConfiguration(); AccumuloConfiguration conf = new ConfigurationCopy(props); FileSystem fs = VolumeConfiguration.getVolume(dir, context.getHadoopConf(), conf).getFileSystem(); Path srcPath = checkPath(fs, dir); SortedMap<KeyExtent,Bulk.Files> mappings; TableOperationsImpl tableOps = new TableOperationsImpl(context); Retry retry = Retry.builder().infiniteRetries().retryAfter(100, MILLISECONDS) .incrementBy(100, MILLISECONDS).maxWait(2, MINUTES).backOffFactor(1.5) .logInterval(3, TimeUnit.MINUTES).createRetry(); boolean shouldRetry = true; while (shouldRetry) { if (plan == null) { mappings = computeMappingFromFiles(fs, tableId, srcPath); } else { mappings = computeMappingFromPlan(fs, tableId, srcPath); } if (mappings.isEmpty()) throw new IllegalArgumentException("Attempted to import zero files from " + srcPath); BulkSerialize.writeLoadMapping(mappings, srcPath.toString(), fs::create); List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.canonical().getBytes(UTF_8)), ByteBuffer.wrap(srcPath.toString().getBytes(UTF_8)), ByteBuffer.wrap((setTime + "").getBytes(UTF_8))); try { tableOps.doBulkFateOperation(args, tableName); shouldRetry = false; } catch (AccumuloBulkMergeException ae) { if (plan != null) { checkPlanForSplits(ae); } try { retry.waitForNextAttempt(); } catch (InterruptedException e) { throw new RuntimeException(e); } log.info(ae.getMessage() + ". Retrying bulk import to " + tableName); } } }
Source:
<code>public final void send(Event event) { try { waitIfLockedDown(); doSend(event); waitingTime = baseWaitingTime; } catch (ConnectionException e) { for (EventSendFailureCallback eventSendFailureCallback : eventSendFailureCallbacks) { <START> eventSendFailureCallback.onFailure(event, e); <END> } logger.warn("An exception due to the connection occurred, a lockdown will be initiated.", e); lockDown(); } }</code><technical_language>this wrapped in a try/catch? a bit conflicted here, gut feeling is failure callback propagate _more_ errors in case of failure</technical_language>

Target:
public final void send(Event event) { try { waitIfLockedDown(); doSend(event); waitingTime = baseWaitingTime; } catch (ConnectionException e) { logger.warn("An exception due to the connection occurred, a lockdown will be initiated.", e); lockDown(); for (EventSendFailureCallback eventSendFailureCallback : eventSendFailureCallbacks) { try { eventSendFailureCallback.onFailure(event, e); } catch (Exception exc) { logger.warn("An exception occurred while running an EventSendFailureCallback: " + eventSendFailureCallback.getClass().getName(), exc); } } } }
Source:
<code>public void serialize(final Host host, final JsonGenerator jgen, final SerializerProvider sp) throws IOException, JsonProcessingException { jgen.writeStartObject(); jgen.writeNumberField("hostId", host.getHostId()); jgen.writeStringField("ipAddress", host.getIp().toSimpleString()); jgen.writeStringField("mac", host.getMac().toString()); <START> jgen.writeStringField("dpid", host.getPort().getParentSwitch() <END> .getSwitchName()); jgen.writeNumberField("port", host.getPort().getPortNumber()); jgen.writeEndObject(); }</code><technical_language>host is connected virtual switch/port, vdpid vport</technical_language>

Target:
public void serialize(final Host host, final JsonGenerator jgen, final SerializerProvider sp) throws IOException, JsonProcessingException { jgen.writeStartObject(); jgen.writeNumberField("hostId", host.getHostId()); jgen.writeStringField("ipAddress", host.getIp().toSimpleString()); jgen.writeStringField("mac", host.getMac().toString()); jgen.writeStringField("vdpid", host.getPort().getParentSwitch() .getSwitchName()); jgen.writeNumberField("vport", host.getPort().getPortNumber()); jgen.writeEndObject(); }
Source:
<code>public String[] metaStringArrayByKey( String key, String[] def ) { Map<Integer, String> temp = m_metaStringArraysByKey.get( key ); if ( temp == null ) { return def; } else { String[] ret = new String[temp.size()]; for ( int i = 0; i < temp.size() ; i++ ) { <START> ret[0] = "" ; <END> } for ( Map.Entry<Integer, String> entry : temp.entrySet() ) { ret[entry.getKey() - 1] = entry.getValue() ; } return ret; } }</code><technical_language>0 i</technical_language>

Target:
public String[] metaStringArrayByKey( String key, String[] def ) { Map<Integer, String> temp = m_metaStringArraysByKey.get( key ); if ( temp == null ) { return def; } else { String[] ret = new String[temp.size()]; for ( int i = 1 ; i <= temp.size() ; i++ ) { String v = temp.get( i ); if ( null == v ) { throw new RuntimeException( "temp should have 1, 2, ..., temp.size() members." ); } ret[i - 1] = v; } return ret; } }
Source:
<code>public static ClusterComposition parse( Record record, long now ) { if ( record == null ) { return null; } <START> final ClusterComposition result; <END> result = new ClusterComposition( expirationTimestamp( now, record ) ); record.get( "servers" ).asList( new Function<Value,Void>() { @Override public Void apply( Value value ) { result.servers( value.get( "role" ).asString() ) .addAll( value.get( "addresses" ).asList( OF_BoltServerAddress ) ); return null; } } ); return result; }</code><technical_language>Declaration joined assignment</technical_language>

Target:
public static ClusterComposition parse( Record record, long now ) { if ( record == null ) { return null; } final ClusterComposition result = new ClusterComposition( expirationTimestamp( now, record ) ); record.get( "servers" ).asList( new Function<Value,Void>() { @Override public Void apply( Value value ) { result.servers( value.get( "role" ).asString() ) .addAll( value.get( "addresses" ).asList( OF_BoltServerAddress ) ); return null; } } ); return result; }
Source:
<code>protected void onDeclineButtonClicked() { if (!mSipServiceConnection.isAvailableAndHasActiveCall()) { finish(); return; } try { mSipServiceConnection.get().getCurrentCall().hangup(true); } catch (Exception e) { <START> e.printStackTrace(); <END> } }</code><technical_language>Inject logger add some information messages user is hanging this screen</technical_language>

Target:
protected void onDeclineButtonClicked() { if (!mSipServiceConnection.isAvailableAndHasActiveCall()) { finish(); return; } try { mSipServiceConnection.get().getCurrentCall().hangup(true); mLogger.i("The user hang up from Network Availability Activity"); } catch (Exception e) { mLogger.i("Failed to decline call "+e.getClass().getSimpleName()+e.getMessage()); finish(); } }
Source:
<code>public void shouldSaveAllergyWithNonCodedAllergen() throws Exception { Allergy allergy = Context.getPatientService().getAllergyByUuid(getUuid()); Patient patient = allergy.getPatient(); String json = "{\"allergen\": {\"allergenType\":\"DRUG\", \"nonCodedAllergen\": \"test non coded\", \"codedAllergen\": { \"uuid\": \"5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"} }}"; handle(newPostRequest(getURI(), json)); Allergies allergies = Context.getPatientService().getAllergies(patient); <START> Assert.assertEquals(allergies.size(), 5); <END> }</code><technical_language>indent assertion correctly</technical_language>

Target:
public void shouldSaveAllergyWithNonCodedAllergen() throws Exception { Allergy allergy = Context.getPatientService().getAllergyByUuid(getUuid()); Patient patient = allergy.getPatient(); Allergies allergies = Context.getPatientService().getAllergies(patient); Assert.assertEquals(allergies.size(), 4); String json = "{" + " \"comment\" : \"allergy comment\"," + " \"severity\" : { \"uuid\" : \"35d3346a-6769-4d52-823f-b4b234bac3e3\"}," + " \"allergen\" : " + " { \"allergenType\" : \"DRUG\", " + " \"codedAllergen\" : { \"uuid\" : \"5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}, " + " \"nonCodedAllergen\" : \"test non coded allergen\"} " + "}"; SimpleObject savedAllergy = deserialize(handle(newPostRequest(getURI(), json))); Assert.assertEquals("allergy comment", Util.getByPath(savedAllergy, "comment")); Assert.assertEquals("35d3346a-6769-4d52-823f-b4b234bac3e3", Util.getByPath(savedAllergy, "severity/uuid")); Assert.assertEquals("5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", Util.getByPath(savedAllergy, "allergen/codedAllergen/uuid")); Assert.assertEquals("test non coded allergen", Util.getByPath(savedAllergy, "allergen/nonCodedAllergen")); Assert.assertEquals("DRUG", Util.getByPath(savedAllergy, "allergen/allergenType")); allergies = Context.getPatientService().getAllergies(patient); Assert.assertEquals(allergies.size(), 5); }
Source:
<code>public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Facility facility, Resource resource, User user, Member member) throws InternalErrorException, MemberResourceMismatchException { List<Attribute> attributes = new ArrayList<>(); for (Service service : services) { <START> getRequiredAttributes(sess, service, facility, resource, user, member); <END> } return attributes; }</code><technical_language>I want add result attributes list. Also, if required attributes of passed services overlap? gather set returning list</technical_language>

Target:
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException { Set<Attribute> attributes = new HashSet<>(); for (Service service : services) { attributes.addAll(getRequiredAttributes(sess, service, facility, resource, user, member)); } return new ArrayList<>(attributes); }
Source:
<code>public <RequestT, ResponseT> ClientCall<RequestT, ResponseT> newCall( MethodDescriptor<RequestT, ResponseT> methodDescriptor, CallOptions callOptions) { int currentRequestNum = requestCount.getAndIncrement(); int index = Math.abs(currentRequestNum % channels.length); ClientCall<RequestT, ResponseT> delegate = channels[index].newCall(methodDescriptor, callOptions); return new CheckedForwardingClientCall<RequestT, ResponseT>(delegate) { @Override protected void checkedStart(ClientCall.Listener<ResponseT> responseListener, Metadata headers) throws Exception { for (HeaderInterceptor interceptor : headerInterceptors) { <START> interceptor.udpateHeaders(headers); <END> } delegate().start(responseListener, headers); } }; }</code><technical_language>interceptor.updateHeaders</technical_language>

Target:
public <RequestT, ResponseT> ClientCall<RequestT, ResponseT> newCall( MethodDescriptor<RequestT, ResponseT> methodDescriptor, CallOptions callOptions) { int currentRequestNum = requestCount.getAndIncrement(); int index = Math.abs(currentRequestNum % channels.length); ClientCall<RequestT, ResponseT> delegate = channels[index].newCall(methodDescriptor, callOptions); return new CheckedForwardingClientCall<RequestT, ResponseT>(delegate) { @Override protected void checkedStart(ClientCall.Listener<ResponseT> responseListener, Metadata headers) throws Exception { for (HeaderInterceptor interceptor : headerInterceptors) { interceptor.updateHeaders(headers); } delegate().start(responseListener, headers); } }; }
Source:
<code>protected PushOperationResult publish(final IProject project, final IServer server, final IProgressMonitor monitor) throws CoreException { IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 200); <START> try (Repository repo = EGitUtils.getRepository(project)) { <END> boolean uncommittedChanges = EGitUtils.countChanges( repo, true, new NullProgressMonitor()) > 0; if (uncommittedChanges) { String remote = ExpressServerUtils.getRemoteName(server); String applicationName = ExpressServerUtils.getApplicationName(server); ExpressCoreUIIntegration.openCommitDialog(project, remote, applicationName, new PublishJob(applicationName, project, server)); } else { if (ExpressCoreUIIntegration.requestApproval( getPushQuestion(project, server, subMonitor), NLS.bind(ExpressServerMessages.publishTitle, project.getName()))) { return push(project, server, subMonitor); } } } catch (Exception e) { IStatus status = ExpressCoreActivator.statusFactory().errorStatus(e); ExpressCoreActivator.pluginLog().logStatus(status); throw new CoreException(status); } finally { subMonitor.done(); } return null; }</code><technical_language>I doubt close this repo. Afaik repo is is a repo exists in IDE (returned a mapping/cache), a new one</technical_language>

Target:
protected PushOperationResult publish(final IProject project, final IServer server, final IProgressMonitor monitor) throws CoreException { IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 200); try { boolean uncommittedChanges = EGitUtils.countChanges( EGitUtils.getRepository(project), true, new NullProgressMonitor()) > 0; if (uncommittedChanges) { String remote = ExpressServerUtils.getRemoteName(server); String applicationName = ExpressServerUtils.getApplicationName(server); ExpressCoreUIIntegration.openCommitDialog(project, remote, applicationName, new PublishJob(applicationName, project, server)); } else { if (ExpressCoreUIIntegration.requestApproval( getPushQuestion(project, server, subMonitor), NLS.bind(ExpressServerMessages.publishTitle, project.getName()))) { return push(project, server, subMonitor); } } } catch (Exception e) { IStatus status = ExpressCoreActivator.statusFactory().errorStatus(e); ExpressCoreActivator.pluginLog().logStatus(status); throw new CoreException(status); } finally { subMonitor.done(); } return null; }
Source:
<code>public String getPackageText(DetailAST ast) { final DetailAST nameAST = ast.getLastChild().getPreviousSibling(); return FullIdent.createFullIdent(nameAST).getText(); <START> } <END></code><technical_language>please static. FYI: sad, caught automatically - sevntu-checkstyle/sevntu.checkstyle#494</technical_language>

Target:
private static String getPackageText(DetailAST ast) { final DetailAST nameAST = ast.getLastChild().getPreviousSibling(); return FullIdent.createFullIdent(nameAST).getText(); }
Source:
<code>public <T extends DataHolder.Immutable<T>, B extends DataHolderBuilder.Immutable<T, B>> void register(Class<T> holderClass, B builder) { <START> if (!this.immutableDataBuilderMap.containsKey(Preconditions.checkNotNull(holderClass))) { <END> this.immutableDataBuilderMap.put(holderClass, Preconditions.checkNotNull(builder)); } else { throw new IllegalStateException("Already registered the DataUtil for " + holderClass.getCanonicalName()); } }</code><technical_language>replace contains + put putIfAbsent check return</technical_language>

Target:
public <T extends DataHolder.Immutable<T>, B extends DataHolderBuilder.Immutable<T, B>> void register(Class<T> holderClass, B builder) { final DataHolderBuilder.Immutable<?, ?> previous = this.immutableDataBuilderMap.putIfAbsent(Preconditions.checkNotNull(holderClass), Preconditions.checkNotNull(builder)); if (previous != null) { throw new IllegalStateException("Already registered the DataUtil for " + holderClass.getCanonicalName()); } }
Source:
<code>private static String toStoreKey(SystemStreamPartition ssp, TaskName taskName) { <START> return new StartpointKey(ssp, taskName).toString(); <END> }</code><technical_language>toString is a "human readable" version of object. a separate method StartpointKey generates key for store? accidentally change toString. Also, allow toString more verbose while keeping store key concise</technical_language>

Target:
private static String toStoreKey(SystemStreamPartition ssp, TaskName taskName) { return new String(new JsonSerdeV2<>().toBytes(new StartpointKey(ssp, taskName))); }
Source:
<code>private Account findAccount(String hrefOrEmailOrUsername){ Account account = null; String[] splitHrefOrEmailOrName = hrefOrEmailOrUsername.split("/"); Directory directory = this.getDirectory(); if (splitHrefOrEmailOrName.length > 4) { try { account = getDataStore().getResource(hrefOrEmailOrUsername, Account.class); <START> if (account != null && account.getDirectory().getHref().equalsIgnoreCase(directory.getHref())){ <END> return account; } } catch (ResourceException e) { } } AccountList accounts = directory.getAccounts(Accounts.where(Accounts.username().eqIgnoreCase(hrefOrEmailOrUsername))); if (accounts.iterator().hasNext()){ account = accounts.iterator().next(); } else { accounts = directory.getAccounts(Accounts.where(Accounts.email().eqIgnoreCase(hrefOrEmailOrUsername))); if (accounts.iterator().hasNext()){ account = accounts.iterator().next(); } } return account; }</code><technical_language>hrefs case sensitive. Please equals(String) instead of equalsIgnoreCase(String)</technical_language>

Target:
private Account findAccount(String hrefOrEmailOrUsername){ Account account = null; String[] splitHrefOrEmailOrName = hrefOrEmailOrUsername.split("/"); Directory directory = this.getDirectory(); if (splitHrefOrEmailOrName.length > 4) { try { account = getDataStore().getResource(hrefOrEmailOrUsername, Account.class); if (account != null && account.getDirectory().getHref().equals(directory.getHref())){ return account; } } catch (ResourceException e) { } } AccountList accounts = directory.getAccounts(Accounts.where(Accounts.username().eqIgnoreCase(hrefOrEmailOrUsername))); if (accounts.iterator().hasNext()){ account = accounts.iterator().next(); } else { accounts = directory.getAccounts(Accounts.where(Accounts.email().eqIgnoreCase(hrefOrEmailOrUsername))); if (accounts.iterator().hasNext()){ account = accounts.iterator().next(); } } return account; }
Source:
<code>private void addQueryParams(final Request request) { if (log != null) { request.addQueryParam("Log", log.toString()); } <START> if (startMessageDate != null || endMessageDate != null) { <END> request.addQueryDateRange("MessageDate", startMessageDate, endMessageDate); } if (getPageSize() != null) { request.addQueryParam("PageSize", Integer.toString(getPageSize())); } }</code><technical_language>is messageDate here? this generated yoyodyne</technical_language>

Target:
private void addQueryParams(final Request request) { if (log != null) { request.addQueryParam("Log", log.toString()); } if (messageDate != null) { request.addQueryParam("MessageDate", messageDate.format(DateTimeFormatter.ofPattern(Request.QUERY_STRING_DATE_FORMAT))); } else if (messageDateAfter != null || messageDateBefore != null) { request.addQueryDateRange("MessageDate", messageDateAfter, messageDateBefore); } if (getPageSize() != null) { request.addQueryParam("PageSize", Integer.toString(getPageSize())); } }
Source:
<code>public void throwsOnNonBitChars() { db.getHandle().useTransaction(handle -> { <START> handle.execute("drop table if exists videos"); <END> handle.execute("create table videos (id int primary key, supported_platforms varchar)"); int id = 1; String notBit = "2"; handle.createUpdate("insert into videos(id, supported_platforms) values (:id, :notBits)") .bind("id", id) .bind("notBits", "0101" + notBit) .execute(); assertThatThrownBy(() -> handle.attach(VideoDao.class).getSupportedPlatforms(id)) .hasMessageContaining("non-bit character " + notBit); }); }</code><technical_language>test error due redefining table in a transaction while client cached data. Consider a new table instead of redefining existing table</technical_language>

Target:
public void throwsOnNonBitChars() { Handle handle = db.getHandle(); handle.execute("drop table if exists videos"); handle.execute("create table videos (id int primary key, supported_platforms varchar)"); handle.execute("discard all"); handle.useTransaction(h -> { int id = 1; String notBit = "2"; h.createUpdate("insert into videos(id, supported_platforms) values (:id, :notBits)") .bind("id", id) .bind("notBits", "0101" + notBit) .execute(); assertThatThrownBy(() -> h.attach(VideoDao.class).getSupportedPlatforms(id)) .hasMessageContaining("non-bit character " + notBit); }); }
Source:
<code><START> <T> int needToCreate(T byName, T byPort, String name) { <END> if (byName != null && byPort != null) { if (byName == byPort) { return 0; } else { return -1; } } else if (byPort != null) { if (name == null) { return 0; } else { return -1; } } else { return 1; } }</code><technical_language>Em, spotbugs Boolean</technical_language>

Target:
<T> CreationState needToCreate(T byName, T byPort, String name) { if (byName != null && byPort != null) { if (byName == byPort) { return CreationState.Found; } else { return CreationState.InvalidState; } } else if (byPort != null) { if (name == null) { return CreationState.Found; } else { return CreationState.InvalidState; } } else { return CreationState.NeedToCreate; } }
Source:
<code>public int doProcessing(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException { log.info(LogManager.getHeader(context, "submission_complete", "Completed submission with id=" + subInfo.getSubmissionItem().getID())); WorkflowService workflowService = WorkflowServiceFactory.getInstance().getWorkflowService(); boolean success = false; try { if(StringUtils.equals(configurationService.getProperty("workflow.framework"), "xmlworkflow")) <START> { <END> try{ workflowService.start(context, (WorkspaceItem) subInfo.getSubmissionItem()); }catch (Exception e){ log.error(LogManager.getHeader(context, "Error while starting xml workflow", "Item id: " + subInfo.getSubmissionItem().getItem().getID()), e); throw new ServletException(e); } }else{ workflowService.start(context, (WorkspaceItem) subInfo.getSubmissionItem()); } success = true; } catch (Exception e) { log.error("Caught exception in submission step: ",e); throw new ServletException(e); } finally { if (success) { context.dispatchEvents(); } } return STATUS_COMPLETE; }</code><technical_language>mentioned in IRC, this change conflict in #1280 . I fix in #1280 is correct (just for this class)</technical_language>

Target:
public int doProcessing(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException { log.info(LogManager.getHeader(context, "submission_complete", "Completed submission with id=" + subInfo.getSubmissionItem().getID())); WorkflowService workflowService = WorkflowServiceFactory.getInstance().getWorkflowService(); boolean success = false; try { workflowService.start(context, (WorkspaceItem) subInfo.getSubmissionItem()); success = true; } catch (Exception e) { log.error("Caught exception in submission step: ",e); throw new ServletException(e); } finally { if (success) { context.dispatchEvents(); } } return STATUS_COMPLETE; }
Source:
<code><START> private static void setFeatures(DocumentBuilderFactory dbf) throws ParserConfigurationException <END> { String externalEntitiesValue = System.getProperty(EXTERNAL_ENTITIES_PROPERTY, "false"); externalEntities = Boolean.parseBoolean(externalEntitiesValue); String expandEntitiesValue = System.getProperty(EXPAND_ENTITIES_PROPERTY, "false"); expandEntities = Boolean.parseBoolean(expandEntitiesValue); String feature = null; feature = "<LINK_1>"; dbf.setFeature(feature, externalEntities); feature = "<LINK_2>"; dbf.setFeature(feature, externalEntities); feature = "<LINK_0>"; dbf.setFeature(feature, !expandEntities); dbf.setXIncludeAware(expandEntities); dbf.setExpandEntityReferences(expandEntities); dbf.setNamespaceAware(true); }</code><technical_language>method non-static</technical_language>

Target:
private void setFeatures(DocumentBuilderFactory dbf) throws ParserConfigurationException { String feature = null; feature = "<LINK_1>"; dbf.setFeature(feature, externalEntities); feature = "<LINK_2>"; dbf.setFeature(feature, externalEntities); feature = "<LINK_0>"; dbf.setFeature(feature, !expandEntities); dbf.setXIncludeAware(expandEntities); dbf.setExpandEntityReferences(expandEntities); dbf.setNamespaceAware(true); }
Source:
<code>private void addAndTrack(final VariantContext toAdd, final VariantContext source) { trackLiftedVariantContig(liftedBySourceContig, source.getContig()); trackLiftedVariantContig(liftedByDestContig, toAdd.getContig()); <START> if (sorter != null) { END> sorter.add(toAdd); } else { this.accept.add(toAdd); } }</code><technical_language>suggestion if (!DISABLE_SORT) { //we're sorting variants</technical_language>

Target:
private void addAndTrack(final VariantContext toAdd, final VariantContext source) { trackLiftedVariantContig(liftedBySourceContig, source.getContig()); trackLiftedVariantContig(liftedByDestContig, toAdd.getContig()); if (!DISABLE_SORT) { sorter.add(toAdd); } else { this.acceptedRecords.add(toAdd); } }