auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testGetTaskDefinitionTags() throws Exception { final List<Tag> expected = ImmutableList.of( new Tag().withKey("k1").withValue("v1"), new Tag().withKey("k2").withValue("v2") ); final ListTagsForResourceResult result = new ListTagsForResourceResult() .withTags(expected); <START> doReturn(result).when(rawEcsClient).listTagsForResource(any(ListTagsForResourceRequest.class)); <END> List<Tag> tags = ecsClient.getTaskDefinitionTags("my_task_def_arn"); assertEquals(expected.size(), tags.size()); assertEquals(expected.get(0), tags.get(0)); assertEquals(expected.get(1), tags.get(1)); }</code><technical_language>I ARN here, verify this called expected parameters end of test. difference, though</technical_language>

Target:
public void testGetTaskDefinitionTags() throws Exception { final List<Tag> expected = ImmutableList.of( new Tag().withKey("k1").withValue("v1"), new Tag().withKey("k2").withValue("v2") ); final ListTagsForResourceRequest request = new ListTagsForResourceRequest() .withResourceArn("my_task_def_arn"); final ListTagsForResourceResult result = new ListTagsForResourceResult() .withTags(expected); doReturn(result).when(rawEcsClient).listTagsForResource(request); List<Tag> tags = ecsClient.getTaskDefinitionTags(request.getResourceArn()); assertEquals(expected.size(), tags.size()); assertEquals(expected.get(0), tags.get(0)); assertEquals(expected.get(1), tags.get(1)); }
Source:
<code>public BucketCache(final int numberBuckets, final Graph<SequenceSegment> graph) { <START> this.numberBuckets = (int) Math.pow(2, Math.ceil(Math.log(numberBuckets) / Math.log(2))); <END> this.graph = graph; maxUnifiedEnd = getMaxUnifiedEnd(); bucketWidth = maxUnifiedEnd / this.numberBuckets; cacheGraph(); }</code><technical_language>result of Math.pow is 15.9999999999999999, numberBuckets 15</technical_language>

Target:
public BucketCache(final int numberBuckets, final Graph<SequenceSegment> graph) { this.numberBuckets = (int) Math.round(Math.pow(2, Math.ceil(Math.log(numberBuckets) / Math.log(2)))); this.graph = graph; maxUnifiedEnd = getMaxUnifiedEnd(); bucketWidth = maxUnifiedEnd / this.numberBuckets; cacheGraph(); }
Source:
<code><START> protected R performUpdate(R incoming, <END> EntityIdResolver<Guid> entityResolver, VdcActionType update, ParametersProvider<R, Q> updateProvider) { Q entity = doUpdate(incoming, entityResolver, update, updateProvider); R model = map(entity); deprecatedPopulate(model, entity); return addLinks(doPopulate(model, entity)); }</code><technical_language>final well</technical_language>

Target:
protected R performUpdate(R incoming, EntityIdResolver<Guid> entityResolver, VdcActionType update, ParametersProvider<R, Q> updateProvider) { Q entity = getEntity(entityResolver, true); validateUpdate(incoming, map(entity)); entity = doUpdate(incoming, entity, entityResolver, update, updateProvider); R model = map(entity); deprecatedPopulate(model, entity); return addLinks(doPopulate(model, entity)); }
Source:
<code>public List<Connection> getTransitivelyConnectedElements(EObject element, EObject traceModel, int maximumDepth) { <START> ArrayList<Object> accumulator = new ArrayList<>(); <END> return getTransitivelyConnectedElements(element, traceModel, accumulator, DEFAULT_INITIAL_TRANSITIVITY_DEPTH, maximumDepth); }</code><technical_language>of type List<Object></technical_language>

Target:
public List<Connection> getTransitivelyConnectedElements(EObject element, EObject traceModel, int maximumDepth) { List<Object> accumulator = new ArrayList<>(); return getTransitivelyConnectedElements(element, traceModel, accumulator, DEFAULT_INITIAL_TRANSITIVITY_DEPTH, maximumDepth); }
Source:
<code>public void close() { currentValue = -1; currentValueCt = -1; currentValueIsRepeated = false; thereIsABufferedValue = false; isFirst = true; <START> bitWriter.close(); <END> }</code><technical_language>need do of able write bitWriter is closed</technical_language>

Target:
public void close() { bitWriter.close(); }
Source:
<code>protected void unsetNotificationSender(NotificationSender notificationSender) { if (log.isDebugEnabled()) { <START> log.debug("Setting notification sender in Entitlement bundle"); <END> } this.notificationSender = null; }</code><technical_language>Update logs correct messages</technical_language>

Target:
protected void unsetNotificationSender(NotificationSender notificationSender) { if (log.isDebugEnabled()) { log.debug("Setting notification sender"); } TOTPManagerComponent.notificationSender = null; }
Source:
<code>default Stream<T> stream() { <START> final Spliterator<T> s = Spliterators.spliteratorUnknownSize(this, Spliterator.ORDERED); <END> return StreamSupport.stream(s, false); }</code><technical_language>@tfenne Is set iterator is automatically closed stream is consumed</technical_language>

Target:
default Stream<T> stream() { final Spliterator<T> s = Spliterators.spliteratorUnknownSize(this, Spliterator.ORDERED); return StreamSupport.stream(s, false).onClose(this::close); }
Source:
<code>public String toString() { <START> if (this.alarms.isEmpty()) { <END> return String.format("DlmsPushNotification [device = %s, trigger type = %s]", this.equipmentIdentifier, this.triggerType); } else { return String.format("DlmsPushNotification [device = %s, trigger type = %s, alarms=%s]", this.equipmentIdentifier, this.triggerType, this.alarms); } }</code><technical_language>I prefer unconditional return string, string represents object (with empty fields)</technical_language>

Target:
public String toString() { return String.format("DlmsPushNotification [device = %s, trigger type = %s, alarms=%s]", this.equipmentIdentifier, this.triggerType, this.alarms); }
Source:
<code>public void testDelayedChannelPutSuccess() throws Exception { VerifiableProperties vProps = getNonBlockingRouterProperties(); router = new NonBlockingRouter(new RouterConfig(vProps), new NonBlockingRouterMetrics(new MetricRegistry()), new MockNetworkClientFactory(vProps, mockSelectorState, MAX_PORTS_PLAIN_TEXT, MAX_PORTS_SSL, CHECKOUT_TIMEOUT_MS, mockServerLayout, mockTime), new LoggingNotificationSystem(), mockClusterMap, mockTime); int blobSize = chunkSize * random.nextInt(10) + 1; RequestAndResult requestAndResult = new RequestAndResult(blobSize); requestAndResultsList.add(requestAndResult); MockReadableStreamChannel putChannel = new MockReadableStreamChannel(blobSize); FutureResult<String> future = (FutureResult<String>) router .putBlob(requestAndResult.putBlobProperties, requestAndResult.putUserMetadata, putChannel, null); ByteBuffer src = ByteBuffer.wrap(requestAndResult.putContent); int pushedSoFar = 0; while (pushedSoFar < blobSize && !future.isDone()) { int toPush = random.nextInt(blobSize - pushedSoFar + 1); ByteBuffer buf = ByteBuffer.allocate(toPush); src.get(buf.array()); putChannel.write(buf); <START> Thread.yield(); <END> pushedSoFar += toPush; } future.await(); requestAndResult.result = future; assertSuccess(); assertCloseCleanup(); }</code><technical_language>I instead MockReadableStreamChannel return more data a callback is received? threat of stack overflow size is small</technical_language>

Target:
public void testDelayedChannelPutSuccess() throws Exception { router = getNonBlockingRouter(); int blobSize = chunkSize * random.nextInt(10) + 1; RequestAndResult requestAndResult = new RequestAndResult(blobSize); requestAndResultsList.add(requestAndResult); MockReadableStreamChannel putChannel = new MockReadableStreamChannel(blobSize); FutureResult<String> future = (FutureResult<String>) router .putBlob(requestAndResult.putBlobProperties, requestAndResult.putUserMetadata, putChannel, null); ByteBuffer src = ByteBuffer.wrap(requestAndResult.putContent); int pushedSoFar = 0; while (pushedSoFar < blobSize && !future.isDone()) { int toPush = random.nextInt(blobSize - pushedSoFar + 1); ByteBuffer buf = ByteBuffer.allocate(toPush); src.get(buf.array()); putChannel.write(buf); Thread.yield(); pushedSoFar += toPush; } future.await(); requestAndResult.result = future; assertSuccess(); assertCloseCleanup(); }
Source:
<code>protected void sendTuple(T tuple) { if ( alreadyInKafka(tuple) ) { return; } try { <START> getProducer().send(new ProducerRecord<>(getTopic(), key, tuple)).get(); <END> } catch (InterruptedException e) { throw new RuntimeException(e); } catch (ExecutionException e) { throw new RuntimeException(e); } }</code><technical_language>send(ProducerRecord<K,V> record, Callback callback) method, In callback if is exception, simply throw exception fail operator</technical_language>

Target:
protected void sendTuple(T tuple) { if ( alreadyInKafka(tuple) ) { return; } getProducer().send(new ProducerRecord<>(getTopic(), key, tuple),new Callback() { public void onCompletion(RecordMetadata metadata, Exception e) { if (e != null) { logger.info("Wrting to Kafka failed with an exception {}" + e.getMessage()); throw new RuntimeException(e); } } }); }
Source:
<code>public synchronized void send(String destination, DatastreamProducerRecord record, SendCallback onComplete) { if (_unrecoverableError != null) { throw _unrecoverableError; } List<EventData> events = record.getEvents().stream().map(x -> createEventData(x.getValue())).collect(Collectors.toList()); <START> int partition = record.getPartition().orElse(0); <END> List<CompletableFuture<Void>> sendResults = events.stream().map(x -> sendToPartition(x, partition)).collect(Collectors.toList()); DatastreamRecordMetadata recordMetadata = new DatastreamRecordMetadata(record.getCheckpoint(), "", partition); CompletableFuture<?>[] allsendResults = new CompletableFuture<?>[events.size()]; sendResults.toArray(allsendResults); CompletableFuture<Void> pendingFuture = CompletableFuture.allOf(allsendResults).handle((aVoid, throwable) -> { if (throwable instanceof Error) { LOG.error("send failed with unrecoverable error", throwable); _unrecoverableError = (Error) throwable; close(); _ehClient = null; } else { onComplete.onCompletion(recordMetadata, (Exception) throwable); } return aVoid; }); _pendingFutures.add(pendingFuture); pendingFuture.thenRun(() -> _pendingFutures.remove(pendingFuture)); }</code><technical_language>Is this expected default behavior? sending partition 0 if partition id is set</technical_language>

Target:
public synchronized void send(String destination, DatastreamProducerRecord record, SendCallback onComplete) { if (_unrecoverableError != null) { throw _unrecoverableError; } List<EventData> events = record.getEvents().stream().map(x -> createEventData(x.getValue())).collect(Collectors.toList()); if (!record.getPartition().isPresent()) { String msg = "Event hub transport provider requires partition to be specified in DatastreamProducerRecord"; LOG.error(msg); throw new DatastreamRuntimeException(msg); } int partition = record.getPartition().get(); List<CompletableFuture<Void>> sendResults = events.stream().map(x -> sendToPartition(x, partition)).collect(Collectors.toList()); DatastreamRecordMetadata recordMetadata = new DatastreamRecordMetadata(record.getCheckpoint(), "", partition); CompletableFuture<?>[] allsendResults = new CompletableFuture<?>[events.size()]; sendResults.toArray(allsendResults); CompletableFuture<Void> pendingFuture = CompletableFuture.allOf(allsendResults).handle((aVoid, throwable) -> { if (throwable instanceof Error) { LOG.error("send failed with unrecoverable error", throwable); _unrecoverableError = (Error) throwable; close(); _ehClient = null; } else { onComplete.onCompletion(recordMetadata, (Exception) throwable); } return aVoid; }); _pendingFutures.add(pendingFuture); pendingFuture.thenRun(() -> _pendingFutures.remove(pendingFuture)); }
Source:
<code>protected List<IssueEventHolder> doLoadInBackground() throws IOException { IssueService issueService = (IssueService) Gh4Application.get().getService(Gh4Application.ISSUE_SERVICE); List<Comment> comments = issueService.getComments( new RepositoryId(mRepoOwner, mRepoName), mIssueNumber); List<IssueEvent> events = issueService.getIssueEvents(mRepoOwner, mRepoName, mIssueNumber); List<IssueEventHolder> result = new ArrayList<>(); <START> boolean isPullRequest = this instanceof PullRequestCommentListLoader; <END> for (Comment comment : comments) { result.add(new IssueEventHolder(comment, isPullRequest)); } for (IssueEvent event : events) { if (INTERESTING_EVENTS.contains(event.getEvent())) { result.add(new IssueEventHolder(event, isPullRequest)); } } Collections.sort(result, SORTER); return result; }</code><technical_language>I base classes descendant classes. I prefer a constructor parameter</technical_language>

Target:
protected List<IssueEventHolder> doLoadInBackground() throws IOException { IssueService issueService = (IssueService) Gh4Application.get().getService(Gh4Application.ISSUE_SERVICE); List<Comment> comments = issueService.getComments( new RepositoryId(mRepoOwner, mRepoName), mIssueNumber); List<IssueEvent> events = issueService.getIssueEvents(mRepoOwner, mRepoName, mIssueNumber); List<IssueEventHolder> result = new ArrayList<>(); for (Comment comment : comments) { result.add(new IssueEventHolder(comment, mIsPullRequest)); } for (IssueEvent event : events) { if (INTERESTING_EVENTS.contains(event.getEvent())) { result.add(new IssueEventHolder(event, mIsPullRequest)); } } Collections.sort(result, SORTER); return result; }
Source:
<code>public SysprepVmTemplateParameters(Guid vmTemplateId) { <START> this.vmTemplateId = vmTemplateId; <END> }</code><technical_language>VmTemplateParameters contains id, pass drop this class</technical_language>

Target:
public SysprepVmTemplateParameters(Guid vmTemplateId) { super(vmTemplateId); }
Source:
<code>public Map<String, String> getRemoteSymbolicReferences(String url, String pattern) throws GitException, InterruptedException { ArgumentListBuilder args = new ArgumentListBuilder("ls-remote"); args.add("--symref"); args.add(url); if (pattern != null) { args.add(pattern); } StandardCredentials cred = credentials.get(url); if (cred == null) cred = defaultCredentials; String result = launchCommandWithCredentials(args, null, cred, url); Map<String, String> references = new HashMap<>(); String[] lines = result.split("\n"); Pattern symRefPattern = Pattern.compile("^ref:\\s+([^ ]+)\\s+([^ ]+)$"); for (String line : lines) { Matcher matcher = symRefPattern.matcher(line); if (matcher.matches()) { references.put(matcher.group(2), matcher.group(1)); <START> } else if (line.length() < 41) { <END> throw new GitException("unexpected ls-remote output " + line); } } return references; }</code><technical_language>willing throw exception if ! line.isEmpty()? this implementation consistent JGit implementation avoid throwing exception in degenerate case a repository commits</technical_language>

Target:
public Map<String, String> getRemoteSymbolicReferences(String url, String pattern) throws GitException, InterruptedException { Map<String, String> references = new HashMap<>(); if (isAtLeastVersion(2, 8, 0, 0)) { ArgumentListBuilder args = new ArgumentListBuilder("ls-remote"); args.add("--symref"); args.add(url); if (pattern != null) { args.add(pattern); } StandardCredentials cred = credentials.get(url); if (cred == null) cred = defaultCredentials; String result = launchCommandWithCredentials(args, null, cred, url); String[] lines = result.split("\n"); Pattern symRefPattern = Pattern.compile("^ref:\\s+([^ ]+)\\s+([^ ]+)$"); for (String line : lines) { Matcher matcher = symRefPattern.matcher(line); if (matcher.matches()) { references.put(matcher.group(2), matcher.group(1)); } } } return references; }
Source:
<code>public InputStream getAttachmentData(String attachmentId, IProgressMonitor monitor) throws IOException, CoreException { String url = repositoryUrl + IBugzillaConstants.URL_GET_ATTACHMENT_DOWNLOAD + attachmentId; GetMethod method = getConnect(url, monitor); try { if (method.getStatusCode() == HttpStatus.SC_OK) { return method.getResponseBodyAsStream(); } else { parseHtmlError(method.getResponseBodyAsStream()); WebUtil.releaseConnection(method, monitor); } } catch (Exception e) { WebUtil.releaseConnection(method, monitor); throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, "Unable to retrieve attachment", e)); } <START> return null; <END> }</code><technical_language>This statement reached replaced exception parseHtmlError() return exception throwing guarantee exit in else branch</technical_language>

Target:
public InputStream getAttachmentData(String attachmentId, IProgressMonitor monitor) throws IOException, CoreException { String url = repositoryUrl + IBugzillaConstants.URL_GET_ATTACHMENT_DOWNLOAD + attachmentId; GetMethod method = getConnect(url, monitor); try { if (method.getStatusCode() == HttpStatus.SC_OK) { Header contentDisposition = method.getResponseHeader("Content-disposition"); if (contentDisposition == null) { parseHtmlError(method.getResponseBodyAsStream()); throw new CoreException( new Status( IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, "No Exception from parseHtmlError, should throw an Exception" + method.getResponseBodyAsStream())); } return method.getResponseBodyAsStream(); } else { parseHtmlError(method.getResponseBodyAsStream()); throw new CoreException( new Status( IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, "No Exception from parseHtmlError, should throw an Exception" + method.getResponseBodyAsStream())); } } catch (Exception e) { WebUtil.releaseConnection(method, monitor); throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, "Unable to retrieve attachment", e)); } }
Source:
<code>private String formProfileUrl(String clusterId, String volumeId, boolean isBrickProfileSelected) { String url = "/ovirt-engine/api/clusters/" + clusterId + "/glustervolumes/" + volumeId + "/profilestatistics"; if (!isBrickProfileSelected) { url += ";nfsStatistics=true"; } return url + ".pdf"; <START> } <END></code><technical_language>I personally write this this: private String formProfileUrl(String clusterId, String volumeId, boolean isBrickProfileSelected) { String stats = isBrickProfileSelected ? ";nfsStatistics=true" : ""; //$NON-NLS-1 $NON-NLS-2$ return String.format("/ovirt-engine/api/clusters/%s/glustervolumes/%s/profilestatistics.pdf%s", clusterId, volumeId, stats); //$NON-NLS-1$ }</technical_language>

Target:
private String formProfileUrl(String clusterId, String volumeId, boolean isBrickProfileSelected) { String apiMatrixParam = ((!isBrickProfileSelected) ? ";nfsStatistics=true" : ""); return StringFormat.format("/ovirt-engine/api/clusters/%s/glustervolumes/%s/profilestatistics%s?accept=application/pdf", clusterId, volumeId, apiMatrixParam); }
Source:
<code>public void addLife() { lives++; <START> addToLog("The player earned a life, total lives is now: " + lives); <END> }</code><technical_language>Please, logger format of: [CLASS_NAME]\t[Additional Note if applicable]\t<"Message"> In other words add: [PLAYER]\t front of String. <naming,organisation</technical_language>

Target:
public void addLife() { lives++; addToLog("[PLAYER]\t Player earned a life, total lives is now: " + lives); }
Source:
<code>private String sumTimes(NodeList testCaseNodes) { double totalDurationSecondsForAllTimes = 0.0d; for( int i = 0; i < testCaseNodes.getLength(); i++ ) { try { double testCaseTime = Double.parseDouble(testCaseNodes.item(i).getAttributes().getNamedItem("time").getNodeValue()); totalDurationSecondsForAllTimes += testCaseTime; } catch ( NumberFormatException e ) { <START> e.printStackTrace(); <END> } catch ( NullPointerException e ) { e.printStackTrace(); } } DecimalFormat nfmt = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US); nfmt.applyPattern("0.######"); return nfmt.format(totalDurationSecondsForAllTimes); }</code><technical_language>wrap this in a CucumberException rethrow instead of swallowing it</technical_language>

Target:
private String sumTimes(NodeList testCaseNodes) { double totalDurationSecondsForAllTimes = 0.0d; for( int i = 0; i < testCaseNodes.getLength(); i++ ) { try { double testCaseTime = Double.parseDouble(testCaseNodes.item(i).getAttributes().getNamedItem("time").getNodeValue()); totalDurationSecondsForAllTimes += testCaseTime; } catch ( NumberFormatException e ) { throw new CucumberException(e); } catch ( NullPointerException e ) { throw new CucumberException(e); } } DecimalFormat nfmt = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US); nfmt.applyPattern("0.######"); return nfmt.format(totalDurationSecondsForAllTimes); }
Source:
<code>public void close() throws IOException { transactionAwareHTable.close(); <START> secondaryIndexTable.close(); <END> }</code><technical_language>catch exception for close close get executed. java try { first.close(); } catch (IOException e) { try { second.close(); } catch (IOException ex) { e.addSuppressed(e); } throw e; } second.close();</technical_language>

Target:
public void close() throws IOException { try { transactionAwareHTable.close(); } catch (IOException e) { try { secondaryIndexTable.close(); } catch (IOException ex) { e.addSuppressed(e); } throw e; } secondaryIndexTable.close(); }
Source:
<code>public static void assertAllowHeaders(HttpEntity<?> response, HttpMethod... methods) { HttpHeaders headers = response.getHeaders(); assertThat(headers.getAllow(), hasSize(methods.length)); <START> assertThat(headers.getAllow(), hasItems(methods)); <END> }</code><technical_language>AssertJ, please? assertThat(headers.getAllow()).containsExactly(methods) This check size</technical_language>

Target:
public static void assertAllowHeaders(HttpEntity<?> response, HttpMethod... methods) { HttpHeaders headers = response.getHeaders(); assertThat(headers.getAllow()).containsExactly(methods); }
Source:
<code>private javax.persistence.Query createJpaQuery(Query query, CdiQueryInvocationContext context) { EntityManager entityManager = context.getEntityManager(); Parameters params = context.getParams(); javax.persistence.Query result = null; if (isNotEmpty(query.named())) { <START> if (!context.hasQueryStringPostProcessors()) { <END> result = params.applyTo(entityManager.createNamedQuery(query.named())); } else { javax.persistence.Query namedQuery = entityManager.createNamedQuery(query.named()); String named = factory.extract(namedQuery); String jpqlQuery = context.applyQueryStringPostProcessors(named); result = params.applyTo(entityManager.createQuery(jpqlQuery)); } } else if (query.isNative()) { String jpqlQuery = context.applyQueryStringPostProcessors(query.value()); Class<?> resultType = getQueryResultType(context.getMethod()); if (isEntityType(resultType)) { result = params.applyTo(entityManager.createNativeQuery(jpqlQuery, resultType)); } else { result = params.applyTo(entityManager.createNativeQuery(jpqlQuery)); } } else { String jpqlQuery = context.applyQueryStringPostProcessors(query.value()); context.setQueryString(jpqlQuery); result = params.applyTo(entityManager.createQuery(jpqlQuery)); } return context.applyRestrictions(result); }</code><technical_language>negative logic</technical_language>

Target:
private javax.persistence.Query createJpaQuery(Query query, CdiQueryInvocationContext context) { EntityManager entityManager = context.getEntityManager(); Parameters params = context.getParams(); javax.persistence.Query result = null; if (isNotEmpty(query.named())) { if (context.hasQueryStringPostProcessors()) { javax.persistence.Query namedQuery = entityManager.createNamedQuery(query.named()); String named = factory.extract(namedQuery); String jpqlQuery = context.applyQueryStringPostProcessors(named); result = params.applyTo(entityManager.createQuery(jpqlQuery)); } else { result = params.applyTo(entityManager.createNamedQuery(query.named())); } } else if (query.isNative()) { String jpqlQuery = context.applyQueryStringPostProcessors(query.value()); Class<?> resultType = getQueryResultType(context.getMethod()); if (isEntityType(resultType)) { result = params.applyTo(entityManager.createNativeQuery(jpqlQuery, resultType)); } else { result = params.applyTo(entityManager.createNativeQuery(jpqlQuery)); } } else { String jpqlQuery = context.applyQueryStringPostProcessors(query.value()); context.setQueryString(jpqlQuery); result = params.applyTo(entityManager.createQuery(jpqlQuery)); } return context.applyRestrictions(result); }
Source:
<code>SweepResults runOneIteration(TableReference tableRef, byte[] startRow, SweepBatchConfig batchConfig) { try { SweepResults results = sweepRunner.runWithMetricsUpdate(tableRef, batchConfig, startRow, <START> this::updateMetricsDeleteBatch); <END> logSweepPerformance(tableRef, startRow, results); return results; } catch (RuntimeException e) { logSweepError(tableRef, startRow, batchConfig, e); throw e; } }</code><technical_language>I dislike passing do metrics here. a nice separation of sweep's actual work updating metrics this breaks. preferred solution include more fields in SweepResults object (or a new object a SweepResults other information) hold this information metrics update code continues live in place</technical_language>

Target:
SweepResults runOneIteration(TableReference tableRef, byte[] startRow, SweepBatchConfig batchConfig) { try { SweepResults results = sweepRunner.run(tableRef, batchConfig, startRow); logSweepPerformance(tableRef, startRow, results); return results; } catch (RuntimeException e) { logSweepError(tableRef, startRow, batchConfig, e); throw e; } }
Source:
<code>public void compute() { List<Element> eventEls = getDocument().getRootElement().getChildren("event", PREMIS_V2_NS); for (Element eventEl: eventEls) { List<String> eventTypes = getEventTypes(eventEl); if (eventTypes.isEmpty()) { log.error("No type present on event for object {}", pid); continue; } if (eventTypes.contains(VIRUS_CHECK_TYPE)) { addVirusCheckEvent(eventEl); } else if (eventTypes.contains(VALIDATION_TYPE)) { transformValidationEvent(eventEl); } else if (eventTypes.contains(INGESTION_TYPE)) { <START> addIngestionEvent(eventEl); <END> } else if (eventTypes.contains(ACCESSION_TYPE)) { transformAccessionEvent(eventEl); } else if (eventTypes.contains(MIGRATION_TYPE)) { transformMigrationEvent(eventEl); } else if (eventTypes.contains(CREATION_TYPE)) { transformCreationEvent(eventEl); } else if (eventTypes.contains(DELETION_TYPE)) { transformDeletionEvent(eventEl); } else if (eventTypes.contains(REPLICATION_TYPE)) { transformReplicationEvent(eventEl); } else if (eventTypes.contains(FIXITY_CHECK_TYPE)) { transformFixityEvent(eventEl); } else { log.error("Unknown event types for {}: {}", pid, eventTypes); } } }</code><technical_language>This defines migrating from, migrating boxc3 data currently Normalization event, need leave NORMALIZATION in this case</technical_language>

Target:
public void compute() { List<Element> eventEls = getDocument().getRootElement().getChildren("event", PREMIS_V2_NS); for (Element eventEl: eventEls) { List<String> eventTypes = getEventTypes(eventEl); if (eventTypes.isEmpty()) { log.error("No type present on event for object {}", pid); continue; } if (eventTypes.contains(VIRUS_CHECK_TYPE)) { addVirusCheckEvent(eventEl); } else if (eventTypes.contains(VALIDATION_TYPE)) { transformValidationEvent(eventEl); } else if (eventTypes.contains(INGESTION_TYPE)) { addIngestionEvent(eventEl); } else if (eventTypes.contains(NORMALIZATION_TYPE)) { transformNormalizationEvent(eventEl); } else if (eventTypes.contains(MIGRATION_TYPE)) { transformMigrationEvent(eventEl); } else if (eventTypes.contains(CREATION_TYPE)) { transformCreationEvent(eventEl); } else if (eventTypes.contains(DELETION_TYPE)) { transformDeletionEvent(eventEl); } else if (eventTypes.contains(REPLICATION_TYPE)) { transformReplicationEvent(eventEl); } else if (eventTypes.contains(FIXITY_CHECK_TYPE)) { transformFixityEvent(eventEl); } else { log.error("Unknown event types for {}: {}", pid, eventTypes); } } }
Source:
<code>public EurekaInstanceConfigBean eurekaInstanceConfigBean() { EurekaInstanceConfigBean config = new EurekaInstanceConfigBean(inetUtils); RelaxedPropertyResolver springPropertyResolver = new RelaxedPropertyResolver(env, "spring.application."); String springAppName = springPropertyResolver.getProperty("name"); int port = this.sidecarProperties.getPort(); config.setNonSecurePort(port); config.setInstanceId(getDefaultInstanceId(this.env)); <START> if (StringUtils.hasText(springAppName)) { <END> config.setAppname(springAppName); config.setVirtualHostName(springAppName); config.setSecureVirtualHostName(springAppName); } String hostname = this.sidecarProperties.getHostname(); String ipAddress = this.sidecarProperties.getIpAddress(); if (!StringUtils.hasText(hostname) && StringUtils.hasText(this.hostname)) { hostname = this.hostname; } if (StringUtils.hasText(hostname)) { if (!StringUtils.hasText(ipAddress)) { try { ipAddress = inetUtils.convertAddress(InetAddress.getByName(hostname)).getIpAddress(); } catch (UnknownHostException e) { throw new IllegalStateException( "Could not resolve IP address of sidecar application using hostname: " + hostname); } } config.setHostname(hostname); } if (!StringUtils.hasText(ipAddress)) { config.setIpAddress(ipAddress); } String scheme = config.getSecurePortEnabled() ? "https" : "http"; config.setStatusPageUrl(scheme + "://" + config.getHostname() + ":" + this.managementPort + config.getStatusPageUrlPath()); config.setHealthCheckUrl(scheme + "://" + config.getHostname() + ":" + this.managementPort + config.getHealthCheckUrlPath()); config.setHomePageUrl(scheme + "://" + config.getHostname() + ":" + port + config.getHomePageUrlPath()); return config; }</code><technical_language>rougue space if,</technical_language>

Target:
public EurekaInstanceConfigBean eurekaInstanceConfigBean() { EurekaInstanceConfigBean config = new EurekaInstanceConfigBean(inetUtils); RelaxedPropertyResolver springPropertyResolver = new RelaxedPropertyResolver(env, "spring.application."); String springAppName = springPropertyResolver.getProperty("name"); int port = this.sidecarProperties.getPort(); config.setNonSecurePort(port); config.setInstanceId(getDefaultInstanceId(this.env)); if (StringUtils.hasText(springAppName)) { config.setAppname(springAppName); config.setVirtualHostName(springAppName); config.setSecureVirtualHostName(springAppName); } String hostname = this.sidecarProperties.getHostname(); String ipAddress = this.sidecarProperties.getIpAddress(); if (!StringUtils.hasText(hostname) && StringUtils.hasText(this.hostname)) { hostname = this.hostname; } if (StringUtils.hasText(hostname)) { config.setHostname(hostname); } if (StringUtils.hasText(ipAddress)) { config.setIpAddress(ipAddress); } String scheme = config.getSecurePortEnabled() ? "https" : "http"; config.setStatusPageUrl(scheme + "://" + config.getHostname() + ":" + this.managementPort + config.getStatusPageUrlPath()); config.setHealthCheckUrl(scheme + "://" + config.getHostname() + ":" + this.managementPort + config.getHealthCheckUrlPath()); config.setHomePageUrl(scheme + "://" + config.getHostname() + ":" + port + config.getHomePageUrlPath()); return config; }
Source:
<code>private void exportBigAsImageFromProjectExplorerView(String imageExtension) throws Exception { SWTBotTree tree = bot.viewByTitle("Model Explorer").bot().tree(); SWTBotTreeItem airdFile = tree.expandNode(designerProject.getName()).select(BIG_SESSION); SWTBotUtils.clickContextMenu(airdFile, Messages.ExportRepresentationsAction_label); SWTBotUtils.waitAllUiEvents(); bot.waitUntil(Conditions.shellIsActive(Messages.ExportSeveralRepresentationsAsImagesDialog_dialogTitle)); bot.comboBox(1).setSelection(imageExtension); bot.button("OK").click(); SWTBotUtils.waitAllUiEvents(); Session <START> opennedSession = <END> localSession.getOpenedSession(); assertNotNull("The session should be opened", opennedSession); assertTrue("The session should be opened", opennedSession.isOpen()); }</code><technical_language>Typo</technical_language>

Target:
private void exportBigAsImageFromProjectExplorerView(String imageExtension) throws Exception { SWTBotTree tree = bot.viewByTitle("Model Explorer").bot().tree(); SWTBotTreeItem airdFile = tree.expandNode(designerProject.getName()).select(BIG_SESSION); SWTBotUtils.clickContextMenu(airdFile, Messages.ExportRepresentationsAction_label); SWTBotUtils.waitAllUiEvents(); bot.waitUntil(Conditions.shellIsActive(Messages.ExportSeveralRepresentationsAsImagesDialog_dialogTitle)); bot.comboBox(1).setSelection(imageExtension); bot.button("OK").click(); SWTBotUtils.waitAllUiEvents(); Session openedSession = localSession.getOpenedSession(); assertNotNull("The session should be opened", openedSession); assertTrue("The session should be opened", openedSession.isOpen()); }
Source:
<code>private Object readResolve() { if (jdks == null) { jdks = new ArrayList<>(); } <START> slaveAgentPort = SystemProperties.getInteger(Jenkins.class.getName()+".slaveAgentPort", slaveAgentPort); <END> return this; }</code><technical_language>keeping system property "active" initial setup</technical_language>

Target:
private Object readResolve() { if (jdks == null) { jdks = new ArrayList<>(); } if (SLAVE_AGENT_PORT_ENFORCE) { slaveAgentPort = getSlaveAgentPortInitialValue(slaveAgentPort); } return this; }
Source:
<code>public DefaultCacheManager(ConfigurationBuilderHolder holder, boolean start) { try { globalConfiguration = holder.getGlobalConfigurationBuilder().build(); defaultConfiguration = holder.getDefaultConfigurationBuilder().build(); for (Entry<String, ConfigurationBuilder> entry : holder.getNamedConfigurationBuilders().entrySet()) { <START> ConfigurationBuilder builder = entry.getValue(); <END> builder.validate(globalConfiguration); org.infinispan.configuration.cache.Configuration c = builder.build(); configurationOverrides.put(entry.getKey(), c); } globalComponentRegistry = new GlobalComponentRegistry(globalConfiguration, this, caches.keySet()); authzHelper = new AuthorizationHelper(globalConfiguration.security(), AuditContext.CACHEMANAGER, globalConfiguration.globalJmxStatistics().cacheManagerName()); } catch (CacheConfigurationException ce) { throw ce; } catch (RuntimeException re) { throw new CacheConfigurationException(re); } if (start) start(); }</code><technical_language>new build(GlobalConfiguration) method in this class</technical_language>

Target:
public DefaultCacheManager(ConfigurationBuilderHolder holder, boolean start) { try { globalConfiguration = holder.getGlobalConfigurationBuilder().build(); defaultConfiguration = holder.getDefaultConfigurationBuilder().build(globalConfiguration); for (Entry<String, ConfigurationBuilder> entry : holder.getNamedConfigurationBuilders().entrySet()) { ConfigurationBuilder builder = entry.getValue(); org.infinispan.configuration.cache.Configuration c = builder.build(globalConfiguration); configurationOverrides.put(entry.getKey(), c); } globalComponentRegistry = new GlobalComponentRegistry(globalConfiguration, this, caches.keySet()); authzHelper = new AuthorizationHelper(globalConfiguration.security(), AuditContext.CACHEMANAGER, globalConfiguration.globalJmxStatistics().cacheManagerName()); } catch (CacheConfigurationException ce) { throw ce; } catch (RuntimeException re) { throw new CacheConfigurationException(re); } if (start) start(); }
Source:
<code>public void initialise() { playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThroughNormalized(playerCamera)); initSkysphere(playerCamera.getzFar() < RADIUS ? playerCamera.getzFar() : RADIUS); wireframeStateChange = new SetWireframe(true); RenderingDebugConfig renderingDebugConfig = config.getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); <START> addDesiredStateChange(new SetViewportToSizeOf(new ResourceUrn("engine:sceneOpaquePingPong"), displayResolutionDependentFBOs)); <END> addDesiredStateChange(new EnableMaterial("engine:prog.sky")); addDesiredStateChange(new DisableDepthWriting()); addDesiredStateChange(new EnableFaceCulling()); addDesiredStateChange(new SetFacesToCull(GL_FRONT)); }</code><technical_language>new ResourceUrn a static final field please</technical_language>

Target:
public void initialise() { playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThroughNormalized(playerCamera)); initSkysphere(playerCamera.getzFar() < RADIUS ? playerCamera.getzFar() : RADIUS); wireframeStateChange = new SetWireframe(true); RenderingDebugConfig renderingDebugConfig = config.getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); addDesiredStateChange(new SetViewportToSizeOf(WRITEONLY_GBUFFER, displayResolutionDependentFBOs)); sceneOpaqueFbo = displayResolutionDependentFBOs.get(READONLY_GBUFFER); addDesiredStateChange(new EnableMaterial("engine:prog.sky")); addDesiredStateChange(new DisableDepthWriting()); addDesiredStateChange(new EnableFaceCulling()); addDesiredStateChange(new SetFacesToCull(GL_FRONT)); }
Source:
<code>public APIResult submit( @PathParam("extension-name") String extensionName, @Context HttpServletRequest request, @DefaultValue("") @QueryParam("doAs") String doAsUser, @QueryParam("jobName") String jobName, @FormDataParam("processes") List<FormDataBodyPart> processForms, @FormDataParam("feeds") List<FormDataBodyPart> feedForms, @FormDataParam("config") InputStream config) { checkIfExtensionServiceIsEnabled(); List<Process> processes = getProcesses(processForms); List<Feed> feeds = getFeeds(feedForms); <START> Pair<List<Feed>, List<Process>> entityPairs; <END> try { entityPairs = getEntityList(extensionName, feeds, processes, config); submitEntities(extensionName, doAsUser, jobName, entityPairs.first, entityPairs.second, config); } catch (FalconException | IOException e) { LOG.error("Error while submitting extension job: ", e); throw FalconWebException.newAPIException(e, Response.Status.INTERNAL_SERVER_ERROR); } return new APIResult(APIResult.Status.SUCCEEDED, "Extension job submitted successfully" + jobName); }</code><technical_language>Map<EntityType, List<Entity>> is more extendable. passed arg submitEntities</technical_language>

Target:
public APIResult submit( @PathParam("extension-name") String extensionName, @Context HttpServletRequest request, @DefaultValue("") @QueryParam("doAs") String doAsUser, @QueryParam("jobName") String jobName, @FormDataParam("processes") List<FormDataBodyPart> processForms, @FormDataParam("feeds") List<FormDataBodyPart> feedForms, @FormDataParam("config") InputStream config) { checkIfExtensionServiceIsEnabled(); Map<EntityType, List<Entity>> entityMap; try { entityMap = getEntityList(extensionName, jobName, feedForms, processForms, config); submitEntities(extensionName, doAsUser, jobName, entityMap, config); } catch (FalconException | IOException e) { LOG.error("Error while submitting extension job: ", e); throw FalconWebException.newAPIException(e, Response.Status.INTERNAL_SERVER_ERROR); } return new APIResult(APIResult.Status.SUCCEEDED, "Extension job submitted successfully" + jobName); }
Source:
<code>public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression expression = getExpression(); if (!expression.evaluate(tuple, ptr) || ptr.getLength() == 0) { return false; } PDataType type = expression.getDataType(); String hexStr = (String) type.toObject(ptr, expression.getColumnModifier()); byte[] out = new byte[hexStr.length() / 2]; for (int i = 0; i < hexStr.length(); i = i + 2) { out[i / 2] = (byte) Integer.parseInt(hexStr.substring(i, i + 2), 16); } <START> ptr.set(PDataType.BINARY.toBytes(out)); <END> return true; }</code><technical_language>do a ptr.set(out) here. out byte array correct size</technical_language>

Target:
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression expression = getExpression(); if (!expression.evaluate(tuple, ptr)) { return false; } if (ptr.getLength() == 0) { return true; } PDataType type = expression.getDataType(); String hexStr = (String) type.toObject(ptr, expression.getColumnModifier()); byte[] out = new byte[hexStr.length() / 2]; for (int i = 0; i < hexStr.length(); i = i + 2) { try { out[i / 2] = (byte) Integer.parseInt(hexStr.substring(i, i + 2), 16); } catch (NumberFormatException ex) { throw new IllegalDataException("Value " + hexStr.substring(i, i + 2) + " cannot be cast to hex number"); } catch (StringIndexOutOfBoundsException ex) { throw new IllegalDataException("Invalid value length, cannot cast to hex number (" + hexStr + ")"); } } ptr.set(out); return true; }
Source:
<code>public CandidateWidget(Candidate candidate, int nbOfVotes) { widget = binder.createAndBindUi(this); company.setInnerHTML(candidate.getCompany()); name.setInnerHTML(candidate.getName()); <START> if(candidate.getPicture() != null) { <END> image.setResource(candidate.getPicture()); } nbVotes.setInnerHTML(String.valueOf(nbOfVotes)); }</code><technical_language>missing space if</technical_language>

Target:
public CandidateWidget(Candidate candidate, int nbOfVotes) { widget = binder.createAndBindUi(this); company.setInnerText(candidate.getCompany()); name.setInnerText(candidate.getName()); if (candidate.getPicture() != null) { image.setResource(candidate.getPicture()); } nbVotes.setInnerText(String.valueOf(nbOfVotes)); }
Source:
<code>public void setOnCancelListener(DialogInterface.OnCancelListener listener) { isCancelable = true; <START> dialog.setOnCancelListener(listener); <END> cancelListener = listener; }</code><technical_language>nice move dialog.setOnCancelListener(cancelListener) finalizeView, need override setOnCancelListener in CustomViewAlertDialog. need a null check, implementation of setOnCancelListener</technical_language>

Target:
public void setOnCancelListener(DialogInterface.OnCancelListener listener) { isCancelable = true; cancelListener = listener; }
Source:
<code><START> private final void updateMatchedLabels(String keyword) { <END> List<TurboLabel> newMatchedLabels = TurboLabel.getMatchedLabels(allLabels, keyword); if (keyword.isEmpty() || newMatchedLabels.isEmpty()) { currentSuggestionIndex = OptionalInt.empty(); } else { currentSuggestionIndex = OptionalInt.of(0); } matchedLabels = TurboLabel.getLabelsNameList(newMatchedLabels); }</code><technical_language>This method is while of is advertised</technical_language>

Target:
private final void updateMatchedLabels(String keyword) { List<TurboLabel> newMatchedLabels = TurboLabel.getMatchedLabels(allLabels, keyword); matchedLabels = TurboLabel.getLabelsNameList(newMatchedLabels); }
Source:
<code><START> private String indexPurposeString() { <END> switch (m_windowFunctionUsesIndex) { case SubPlanAssembler.STATEMENT_LEVEL_ORDER_BY_INDEX: return "Statement Level Order By"; case WindowFunctionScoreboard.NO_INDEX_USE: return "No Indexing Used"; default: if (0 <= m_windowFunctionUsesIndex) { return "Window function plan node " + m_windowFunctionUsesIndex; } } assert(false); return ""; }</code><technical_language>This is weird. SubPlanAssembler.STATEMENT_LEVEL_ORDER_BY_INDEX created for window function case, constants end in SubPlanAssembler in WindowFunctionScoreboard? Do send WindowFunctionScoreboard</technical_language>

Target:
private String indexPurposeString() { switch (m_windowFunctionUsesIndex) { case WindowFunctionScoreboard.STATEMENT_LEVEL_ORDER_BY_INDEX: return "Statement Level Order By"; case WindowFunctionScoreboard.NO_INDEX_USE: return "No Indexing Used"; default: if (0 <= m_windowFunctionUsesIndex) { return "Window function plan node " + m_windowFunctionUsesIndex; } } assert(false); return ""; }
Source:
<code>public void connect( String channelConfig ) throws IOException { if ( !canUse( channelConfig ) ) { throw new MalformedURLException( "Unknown chanel string " + channelConfig ); } try { URI uri = new URI( channelConfig ); InetSocketAddress hostAddress = new InetSocketAddress( uri.getHost(), uri.getPort() ); clientSocketChannel = open( withFixedThreadPool( 2, newDaemonThreadFactory() ) ); setTrueOptions( SO_REUSEADDR, TCP_NODELAY, SO_KEEPALIVE ); clientSocketChannel.connect( hostAddress ).get(); UUID sessionId = parseAuth( uri ); if ( sessionId != null ) { <START> ByteBuffer buff = ByteBuffer.wrap( sessionId.toString().getBytes( US_ASCII ) ); <END> clientSocketChannel.write( buff ); } } catch ( URISyntaxException | InterruptedException e ) { throw new IOException( e.getLocalizedMessage(), e ); } catch ( ExecutionException e ) { throw new IOException( e.getLocalizedMessage(), e.getCause() ); } }</code><technical_language>canonical name is buf</technical_language>

Target:
public void connect( String channelConfig ) throws IOException { if ( !canUse( channelConfig ) ) { throw new MalformedURLException( "Unknown chanel string " + channelConfig ); } try { URI uri = new URI( channelConfig ); InetSocketAddress hostAddress = new InetSocketAddress( uri.getHost(), uri.getPort() ); clientSocketChannel = open( withFixedThreadPool( 2, newDaemonThreadFactory() ) ); setTrueOptions( SO_REUSEADDR, TCP_NODELAY, SO_KEEPALIVE ); clientSocketChannel.connect( hostAddress ).get(); String sessionId = extractSessionId( uri ); if ( sessionId != null ) { ByteBuffer buff = ByteBuffer.wrap( sessionId.getBytes( US_ASCII ) ); clientSocketChannel.write( buff ); } } catch ( URISyntaxException | InterruptedException e ) { throw new IOException( e.getLocalizedMessage(), e ); } catch ( ExecutionException e ) { throw new IOException( e.getLocalizedMessage(), e.getCause() ); } }
Source:
<code>public Object call(Object... args) { try { cpsClosure.call(args); } catch (CpsCallableInvocation inv) { Continuable continuable = new Continuable(inv.asBlock()); Outcome o = continuable.run0(new Outcome(null, null), Continuable.categories); if (o.isSuccess()) { return o.getNormal(); } else { <START> throw new RuntimeException(o.getAbnormal()); <END> } } return null; }</code><technical_language>GroovyRuntimeException? is handled specially IIRC. testable a closure throwing, say, IOException a catch block for type</technical_language>

Target:
public Object call(Object... args) { try { return cpsClosure.call(args); } catch (CpsCallableInvocation inv) { Continuable continuable = new Continuable(inv.asBlock()); Outcome o = continuable.run0(new Outcome(null, null), Continuable.categories); if (o.isSuccess()) { return o.getNormal(); } else { throw new RuntimeException(o.getAbnormal()); } } }
Source:
<code>private void analyzeAlgorithm(Algorithm algorithm) { if (!alg.contains(algorithm.getName())) { uniqueoperands += 1; } alg.add(algorithm.getName()); String algo = algorithm.toString(); int count = 0; for (String op : ST_OPERATORS) { int lastIndex = 0; while <START> (lastIndex != -1) { <END> lastIndex = algo.indexOf(op, lastIndex); if (lastIndex != -1) { operatorst++; opcount[count] += 1; operandst += ST_OPERANDS_WEIGHT[count]; String sub1 = algo.substring(0, lastIndex); String sub2 = algo.substring(lastIndex + op.length(), algo.length()); algo = sub1.concat(sub2); } } count++; } }</code><technical_language>switched</technical_language>

Target:
private void analyzeAlgorithm(Algorithm algorithm) { if (!alg.contains(algorithm.getName())) { uniqueOperands += 1; } alg.add(algorithm.getName()); String algo = algorithm.toString(); int count = 0; for (String op : ST_OPERATORS) { int lastIndex = 0; while (-1 != lastIndex) { lastIndex = algo.indexOf(op, lastIndex); if (-1 != lastIndex) { operatorST++; opCount[count] += 1; operandST += ST_OPERANDS_WEIGHT[count]; String sub1 = algo.substring(0, lastIndex); String sub2 = algo.substring(lastIndex + op.length(), algo.length()); algo = sub1.concat(sub2); } } count++; } }
Source:
<code>public void update(Partition partition) throws IOException { Partition original = containerDao.getPartitionById(partition.getId()); authorizationManager.throwIfNotWritable(original.getSequencerPartitionContainer()); Pool pool = partition.getPool() == null ? null : poolService.get(partition.getPool().getId()); original.setPool(pool); original.getSequencerPartitionContainer().setLastModifier(authorizationManager.getCurrentUser()); containerDao.save(original.getSequencerPartitionContainer()); <START> containerDao.update(original); <END> }</code><technical_language>Call update is unnecessary here, called in save method</technical_language>

Target:
public void update(Partition partition) throws IOException { Partition original = containerDao.getPartitionById(partition.getId()); authorizationManager.throwIfNotWritable(original.getSequencerPartitionContainer()); Pool pool = partition.getPool() == null ? null : poolService.get(partition.getPool().getId()); original.setPool(pool); original.getSequencerPartitionContainer().setLastModifier(authorizationManager.getCurrentUser()); containerDao.save(original.getSequencerPartitionContainer()); }