auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String toString() { Date compliedDate = this.getDate(); String date = compliedDate != null ? String.format("%1$tF %1$tT%1$tz", compliedDate) : null; <START> return String.format("ComplianceStatusDTO [compliant: %b, compiled: %s]", this.isCompliant(), date); <END> }</code><technical_language>string SystemPurposeComplianceStatusDTO instead</technical_language>

Target:
public String toString() { Date compliedDate = this.getDate(); String date = compliedDate != null ? String.format("%1$tF %1$tT%1$tz", compliedDate) : null; return String.format("SystemPurposeComplianceStatusDTO [compliant: %b, compiled: %s]", this .isCompliant(), date); }
Source:
<code>public boolean isAvailable(long timeout, TimeUnit unit) throws InterruptedException { Validate.notNull(unit, "invalid null time unit"); if (isAvailable()) { return true; } long now = TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis()); final long end = now + unit.toNanos(timeout); synchronized (lock) { while (true) { if (state == State.CLOSED) { return false; } final boolean available = isAvailable(); if (available) { return true; } final long t = end - now; if (t <= 0L) { <START> return available; <END> } if (LOGGER.isDebugEnabled()) { LOGGER.debug( "Solr({}): waiting to become available", core, DurationFormatUtils.formatDurationHMS(TimeUnit.NANOSECONDS.toMillis(t))); } now = waiter.timedWait(lock, now, t, TimeUnit.NANOSECONDS); } } }</code><technical_language>clearer return false be</technical_language>

Target:
public boolean isAvailable(long timeout, TimeUnit unit) throws InterruptedException { Validate.notNull(unit, "invalid null time unit"); if (isAvailable()) { return true; } long now = TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis()); final long end = now + unit.toNanos(timeout); synchronized (lock) { while (true) { if (state == State.CLOSED) { return false; } final boolean available = isAvailable(); if (available) { return true; } final long t = end - now; if (t <= 0L) { return false; } if (LOGGER.isDebugEnabled()) { LOGGER.debug( "Solr({}): waiting to become available", core, DurationFormatUtils.formatDurationHMS(TimeUnit.NANOSECONDS.toMillis(t))); } now = waiter.timedWait(lock, now, t, TimeUnit.NANOSECONDS); } } }
Source:
<code>public ChildData getCurrentData(String fullPath) { TreeNode node = find(fullPath); if ( node == null ) { return null; } ChildData result = node.childData; <START> return result != DEAD ? result : null; <END> }</code><technical_language>this isLive for consistency</technical_language>

Target:
public ChildData getCurrentData(String fullPath) { TreeNode node = find(fullPath); if ( node == null ) { return null; } ChildData result = node.childData; return isLive(result) ? result : null; }
Source:
<code>private void extractComments() { for (int i = 0; i < tokenStream.size(); i++) { <START> Token token = tokenStream.get(i); <END> if (token.getChannel() != Token.HIDDEN_CHANNEL) { continue; } if (ListenerUtil.isSingleLineComment(token)) { singleLineComments.add(token); } if (ListenerUtil.isMultilineComment(token)) { multilineComments.add(token); } } }</code><technical_language>replace 2 lines for (Token token : tokenStream.getTokens()) { please</technical_language>

Target:
private void extractComments() { for (Token token : tokenStream.getTokens()) { if (token.getChannel() != Token.HIDDEN_CHANNEL) { continue; } if (ListenerUtil.isSingleLineComment(token)) { singleLineComments.add(token); } if (ListenerUtil.isMultilineComment(token)) { multilineComments.add(token); } } }
Source:
<code>public void testBatchWithMismatchedResultArray() throws Exception { Table table = getDefaultTable(); Exception actualError = null; try { <START> table.batchCallback(ImmutableList.of(), new Object[1], null); <END> } catch (Exception ex) { actualError = ex; } assertNull(actualError); }</code><technical_language>I verify interaction a callback</technical_language>

Target:
public void testBatchWithMismatchedResultArray() throws Exception { Table table = getDefaultTable(); Exception actualError = null; Batch.Callback mockCallBack = Mockito.mock(Batch.Callback.class); try { table.batchCallback(ImmutableList.of(), new Object[1], mockCallBack); } catch (Exception ex) { actualError = ex; } assertNull(actualError); verify(mockCallBack, Mockito.never()).update(Mockito.any(), Mockito.any(), Mockito.any()); }
Source:
<code>public BaseLivyInterpreter(Properties property) { super(property); this.livyURL = property.getProperty("zeppelin.livy.url"); this.displayAppInfo = Boolean.parseBoolean( property.getProperty("zeppelin.livy.displayAppInfo", "true")); this.sessionCreationTimeout = Integer.parseInt( property.getProperty("zeppelin.livy.session.create_timeout", 120 + "")); this.pullStatusInterval = Integer.parseInt( property.getProperty("zeppelin.livy.pull_status.interval.millis", 1000 + "")); this.restTemplate = createRestTemplate(); if (!StringUtils.isBlank(property.getProperty("zeppelin.livy.http.headers"))) { String[] headers = property.getProperty("zeppelin.livy.http.headers").split(";"); for (String header : headers) { String[] splits = header.split(":"); <START> customHeaders.put(splits[0].trim(), splits[1].trim()); <END> } } }</code><technical_language>handle case splits[1] is empty</technical_language>

Target:
public BaseLivyInterpreter(Properties property) { super(property); this.livyURL = property.getProperty("zeppelin.livy.url"); this.displayAppInfo = Boolean.parseBoolean( property.getProperty("zeppelin.livy.displayAppInfo", "true")); this.sessionCreationTimeout = Integer.parseInt( property.getProperty("zeppelin.livy.session.create_timeout", 120 + "")); this.pullStatusInterval = Integer.parseInt( property.getProperty("zeppelin.livy.pull_status.interval.millis", 1000 + "")); this.restTemplate = createRestTemplate(); if (!StringUtils.isBlank(property.getProperty("zeppelin.livy.http.headers"))) { String[] headers = property.getProperty("zeppelin.livy.http.headers").split(";"); for (String header : headers) { String[] splits = header.split(":", -1); if (splits.length != 2) { throw new RuntimeException("Invalid format of http headers: " + header + ", valid http header format is HEADER_NAME:HEADER_VALUE"); } customHeaders.put(splits[0].trim(), envSubstitute(splits[1].trim())); } } }
Source:
<code>public void jmsPort_shouldBeExportedWithCorrectId() throws Exception { <START> if (!featuresService.isInstalled(featuresService.getFeature("openengsb-ports-ws"))) { <END> featuresService.installFeature("openengsb-ports-jms"); } OutgoingPort serviceWithId = OpenEngSBCoreServices.getServiceUtilsService().getServiceWithId(OutgoingPort.class, "jms-json", 60000); assertNotNull(serviceWithId); }</code><technical_language>maybe, if @ work, create a method setUp for this? code lines in beginning of test of this class</technical_language>

Target:
public void jmsPort_shouldBeExportedWithCorrectId() throws Exception { OutgoingPort serviceWithId = OpenEngSBCoreServices.getServiceUtilsService().getServiceWithId(OutgoingPort.class, "jms-json", 60000); assertNotNull(serviceWithId); }
Source:
<code>protected MuleMessage doRequest(final long timeout) throws Exception { <START> boolean activeDeclarationsOnly = amqpConnector.isActiveDeclarationsOnly(); <END> final String exchangeName = declarator.declareExchange(channel, endpoint, activeDeclarationsOnly); if (StringUtils.isNotEmpty(endpointUtil.getQueueName(endpoint.getAddress())) || endpoint.getProperties().containsKey(ENDPOINT_PROPERTY_QUEUE_DURABLE) || endpoint.getProperties().containsKey(ENDPOINT_PROPERTY_QUEUE_AUTO_DELETE) || endpoint.getProperties().containsKey(ENDPOINT_PROPERTY_QUEUE_EXCLUSIVE)) { declarator.declareEndpoint(channel, endpoint, activeDeclarationsOnly, exchangeName); } final AmqpMessage amqpMessage = messageConsumer.consumeMessage(channel, getQueueName(), amqpConnector.getAckMode().isAutoAck(), timeout); if (amqpMessage == null) return null; final MuleMessage muleMessage = createMuleMessage(amqpMessage); messagePropertiesHandler.addInvocationProperties(channel, amqpMessage, muleMessage, amqpConnector); messagePropertiesHandler.ackMessageIfNecessary(channel, amqpMessage, endpoint); return muleMessage; }</code><technical_language>this logic repeated somewhere? define reuse it</technical_language>

Target:
protected MuleMessage doRequest(final long timeout) throws Exception { declarator.declareExchangeAndEndpointIfNecessary(channel, endpoint, amqpConnector.isActiveDeclarationsOnly()); final AmqpMessage amqpMessage = messageConsumer.consumeMessage(channel, getQueueName(), amqpConnector.getAckMode().isAutoAck(), timeout); if (amqpMessage == null) return null; final MuleMessage muleMessage = createMuleMessage(amqpMessage); messagePropertiesHandler.addInvocationProperties(channel, amqpMessage, muleMessage, amqpConnector); messagePropertiesHandler.ackMessageIfNecessary(channel, amqpMessage, endpoint); return muleMessage; }
Source:
<code><START> public final static <T> Observable<T> mergeDelayError(Iterable<? extends Observable<? extends T>> sequences) { <END> return mergeDelayError(from(sequences)); }</code><technical_language>Please remove final</technical_language>

Target:
public static <T> Observable<T> mergeDelayError(Iterable<? extends Observable<? extends T>> sequences) { return mergeDelayError(from(sequences)); }
Source:
<code>public void handleShiftClick(GlowPlayer player, InventoryView view, int clickedSlot, ItemStack clickedItem) { if (getSlotType(view.convertSlot(clickedSlot)) == SlotType.RESULT) { Recipe recipe = getRecipe(); if (recipe == null) { return; } final ItemStack[] matrix = getMatrix(); int recipeAmount = CraftingManager.getLayers(matrix); clickedItem.setAmount(clickedItem.getAmount() * recipeAmount); player.getInventory().tryToFillSlots(clickedItem, 8, -1, 35, 8); <START> CraftingManager cm = ((GlowServer) Bukkit.getServer()).getCraftingManager(); <END> cm.removeItems(matrix, this, recipeAmount); } else { clickedItem = player.getInventory().tryToFillSlots(clickedItem, 9, 36, 0, 9); view.setItem(clickedSlot, clickedItem); } }</code><technical_language>player.getServer() returns GlowServer</technical_language>

Target:
public void handleShiftClick(GlowPlayer player, InventoryView view, int clickedSlot, ItemStack clickedItem) { if (getSlotType(view.convertSlot(clickedSlot)) == SlotType.RESULT) { Recipe recipe = getRecipe(); if (recipe == null) { return; } final ItemStack[] matrix = getMatrix(); int recipeAmount = CraftingManager.getLayers(matrix); clickedItem.setAmount(clickedItem.getAmount() * recipeAmount); player.getInventory().tryToFillSlots(clickedItem, 8, -1, 35, 8); CraftingManager cm = player.getServer().getCraftingManager(); cm.removeItems(matrix, this, recipeAmount); } else { clickedItem = player.getInventory().tryToFillSlots(clickedItem, 9, 36, 0, 9); view.setItem(clickedSlot, clickedItem); } }
Source:
<code>public static boolean isIssueJBEAP(JiraIssue issue) { <START> return issue != null && issue.getProduct() != null && issue.getProduct().isPresent() <END> && issue.getProduct().get().equals(JBEAPProject); }</code><technical_language>Issue.java public Optional<String> getProduct() { return Optional.ofNullable(product); } _issue.getProduct() != null_ is unnecessary, returns empty Optional if _product_ is null</technical_language>

Target:
public static boolean isIssueJBEAP(JiraIssue issue) { return issue != null && issue.getProduct().isPresent() && issue.getProduct().get().equals(JBEAPProject); }
Source:
<code>public QueryCriteria startingWith(@Nullable Object o) { <START> regex("^"+o.toString()); <END> return this; }</code><technical_language>more operator</technical_language>

Target:
public QueryCriteria startingWith(@Nullable Object o) { if (o instanceof QueryCriteria) { QueryCriteria term = where("\"%\"").plus(o); like(term); } else { like(o.toString() + "%"); } return this; }
Source:
<code>public void streamSEDDetailsDocumentContents(HttpServletResponse response) throws EntityRetrievalException, IOException { <START> Path path = Paths.get(env.getProperty("downloadSEDFolderPath")); <END> File downloadFile = new File(path.toUri()); byte[] data = Files.readAllBytes(path); if (data != null && data.length > 0) { ByteArrayInputStream inputStream = new ByteArrayInputStream(data); String mimeType = "text/csv"; response.setContentType(mimeType); response.setContentLength((int) data.length); String headerKey = "Content-Disposition"; String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); response.setHeader(headerKey, headerValue); OutputStream outStream = response.getOutputStream(); byte[] buffer = new byte[1024]; int bytesRead = -1; while ((bytesRead = inputStream.read(buffer)) != -1) { outStream.write(buffer, 0, bytesRead); } inputStream.close(); outStream.close(); } }</code><technical_language>I thought this property out? filename in file creation place in this file download place, file name *should* a property. name of SED download file, full path. full path constructed putting downloadFolderPath property new sedFilename property (or whatever) add. change file generation script read well</technical_language>

Target:
public void streamSEDDetailsDocumentContents(HttpServletResponse response) throws EntityRetrievalException, IOException { Path path = Paths.get(env.getProperty("downloadFolderPath"), env.getProperty("SEDDownloadName")); File downloadFile = new File(path.toUri()); byte[] data = Files.readAllBytes(path); if (data != null && data.length > 0) { ByteArrayInputStream inputStream = new ByteArrayInputStream(data); String mimeType = "text/csv"; response.setContentType(mimeType); response.setContentLength((int) data.length); String headerKey = "Content-Disposition"; String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); response.setHeader(headerKey, headerValue); OutputStream outStream = response.getOutputStream(); byte[] buffer = new byte[1024]; int bytesRead = -1; while ((bytesRead = inputStream.read(buffer)) != -1) { outStream.write(buffer, 0, bytesRead); } inputStream.close(); outStream.close(); } }
Source:
<code>public Collection<Integer> getCategoryIds(Language language, int articleId) throws DaoException { String http = new String("http://"); String host = new String(".wikipedia.org"); <START> String query = new String("/w/api.php?action=query&prop=categories&format=json&pageids="); <END> List<LocalCategory> categoryList = new LocalCategoryListQueryReply(LiveUtils.getInfoByQuery(http + language.getLangCode() + host + query + new Integer(articleId).toString() + "&cmlimit=" + new Integer(Integer.MAX_VALUE).toString()), language).getCategoryList(); List<Integer> categoryIdsList = new ArrayList<Integer>(); for(LocalCategory m: categoryList){ categoryIdsList.add(m.getLocalId()); } return categoryIdsList; }</code><technical_language>this code (and others) a helper class build urls. call ApiUrlBuilder that</technical_language>

Target:
public Collection<Integer> getCategoryIds(Language language, int articleId) throws DaoException { LiveAPIQuery.LiveAPIQueryBuilder builder = new LiveAPIQuery.LiveAPIQueryBuilder("CATEGORIES", language).addPageid(articleId); List<Integer> categoryIdsList = new ArrayList<Integer>(); List<QueryReply> replies = builder.build().getValuesFromQueryResult(); for (QueryReply reply : replies) { categoryIdsList.add(reply.pageId); } return categoryIdsList; }
Source:
<code>public static Map<Integer, StudyEntryPropertyData> map(final GermplasmListData source, final List<Integer> germplasmDescriptorIds) { final Map<Integer, StudyEntryPropertyData> studyEntryProperties = new HashMap<>(); for(final Integer variableId: germplasmDescriptorIds) { if(TermId.ENTRY_TYPE.getId() == variableId) { studyEntryProperties.put(TermId.ENTRY_TYPE.getId(), createStudyEntryPropertyValue(TermId.ENTRY_TYPE.getId(), DEFAULT_ENTRY_TYPE)); } else if(TermId.SEED_SOURCE.getId() == variableId) { studyEntryProperties.put(TermId.SEED_SOURCE.getId(), createStudyEntryPropertyValue(TermId.SEED_SOURCE.getId(), source.getSeedSource())); } else if(TermId.GROUPGID.getId() == variableId) { studyEntryProperties.put(TermId.GROUPGID.getId(), createStudyEntryPropertyValue(TermId.GROUPGID.getId(), String.valueOf(source.getGermplasm().getMgid()))); } else if(TermId.CROSS.getId() == variableId){ studyEntryProperties.put(TermId.CROSS.getId(), createStudyEntryPropertyValue(TermId.CROSS.getId(), String.valueOf(source.getGroupName()))); } else if(TermId.GERMPLASM_SOURCE.getId() == variableId) { studyEntryProperties.put(TermId.GERMPLASM_SOURCE.getId(), createStudyEntryPropertyValue(TermId.GERMPLASM_SOURCE.getId(), source.getSeedSource())); <START> } else if (TermId.ENTRY_CODE.getId() == variableId) { <END> studyEntryProperties.put(TermId.ENTRY_CODE.getId(), createStudyEntryPropertyValue(TermId.ENTRY_CODE.getId(), source.getEntryCode())); } } return studyEntryProperties; }</code><technical_language>create a stockprop entry for ENTRY_CODE variable (same ENTRY_NO, DESIGNATION, GID). Entry Code is stored in stock.value</technical_language>

Target:
public static Map<Integer, StudyEntryPropertyData> map(final GermplasmListData source, final List<Integer> germplasmDescriptorIds) { final Map<Integer, StudyEntryPropertyData> studyEntryProperties = new HashMap<>(); for(final Integer variableId: germplasmDescriptorIds) { if(TermId.ENTRY_TYPE.getId() == variableId) { studyEntryProperties.put(TermId.ENTRY_TYPE.getId(), createStudyEntryPropertyValue(TermId.ENTRY_TYPE.getId(), DEFAULT_ENTRY_TYPE)); } else if(TermId.SEED_SOURCE.getId() == variableId) { studyEntryProperties.put(TermId.SEED_SOURCE.getId(), createStudyEntryPropertyValue(TermId.SEED_SOURCE.getId(), source.getSeedSource())); } else if(TermId.GROUPGID.getId() == variableId) { studyEntryProperties.put(TermId.GROUPGID.getId(), createStudyEntryPropertyValue(TermId.GROUPGID.getId(), String.valueOf(source.getGermplasm().getMgid()))); } else if(TermId.CROSS.getId() == variableId){ studyEntryProperties.put(TermId.CROSS.getId(), createStudyEntryPropertyValue(TermId.CROSS.getId(), String.valueOf(source.getGroupName()))); } else if(TermId.GERMPLASM_SOURCE.getId() == variableId) { studyEntryProperties.put(TermId.GERMPLASM_SOURCE.getId(), createStudyEntryPropertyValue(TermId.GERMPLASM_SOURCE.getId(), source.getSeedSource())); } } return studyEntryProperties; }
Source:
<code>private EntityRecord toEntityRecord(E entity) { <START> final String idString = idToString(entity.getId()); <END> final Any state = toAny(entity.getState()); final EntityRecord.Builder builder = EntityRecord.newBuilder() .setEntityState(state) .setEntityId(idString) .setWhenModified(entity.whenModified()) .setVersion(entity.getVersion()); return builder.build(); }</code><technical_language>do string? of integer types too. a set of supported ID types, type deal defined generic type parameter</technical_language>

Target:
private EntityStorageRecord toEntityRecord(E entity) { final I id = entity.getId(); final EntityStorageRecord.Id entityId = toRecordId(id); final M state = entity.getState(); final Any stateAny = toAny(state); final Timestamp whenModified = entity.whenModified(); final int version = entity.getVersion(); final EntityStorageRecord.Builder builder = EntityStorageRecord.newBuilder() .setState(stateAny) .setId(entityId) .setWhenModified(whenModified) .setVersion(version); return builder.build(); }
Source:
<code>public void testTableWriterInfo() { PageSinkManager pageSinkManager = new PageSinkManager(); pageSinkManager.addConnectorPageSinkProvider(CONNECTOR_ID, new ConstantPageSinkProvider(new MemoryAccountingTestPageSink())); TableWriterOperator tableWriterOperator = (TableWriterOperator) createTableWriterOperator(pageSinkManager); RowPagesBuilder rowPagesBuilder = rowPagesBuilder(BIGINT); for (int i = 0; i < 100; i++) { rowPagesBuilder.addSequencePage(100, 0); } List<Page> pages = rowPagesBuilder.build(); long pageSize = pages.get(0).getRetainedSizeInBytes(); for (int i = 0; i < pages.size(); i++) { Page page = pages.get(i); tableWriterOperator.addInput(page); TableWriterInfo info = tableWriterOperator.getInfo(); <START> assertEquals(info.getPageSinkPeakMemoryUsage(), pageSize * (i + 1)); <END> } }</code><technical_language>instead of multiplying, I a local running total, this removes assumption of pages size. This is a bad assumption structure of creation of test pages, I more readable</technical_language>

Target:
public void testTableWriterInfo() { PageSinkManager pageSinkManager = new PageSinkManager(); pageSinkManager.addConnectorPageSinkProvider(CONNECTOR_ID, new ConstantPageSinkProvider(new MemoryAccountingTestPageSink())); TableWriterOperator tableWriterOperator = (TableWriterOperator) createTableWriterOperator(pageSinkManager); RowPagesBuilder rowPagesBuilder = rowPagesBuilder(BIGINT); for (int i = 0; i < 100; i++) { rowPagesBuilder.addSequencePage(100, 0); } List<Page> pages = rowPagesBuilder.build(); long peakMemoryUsage = 0; for (int i = 0; i < pages.size(); i++) { Page page = pages.get(i); peakMemoryUsage += page.getRetainedSizeInBytes(); tableWriterOperator.addInput(page); TableWriterInfo info = tableWriterOperator.getInfo(); assertEquals(info.getPageSinkPeakMemoryUsage(), peakMemoryUsage); } }
Source:
<code>static public String getMetadataName(String blobName) { MessageDigest messageDigest; try { messageDigest = MessageDigest.getInstance("SHA-256"); messageDigest.update(blobName.getBytes(OrionConstantValues.ENCODING)); byte[] digest = messageDigest.digest(); BigInteger bigInteger = new BigInteger(1, digest); return bigInteger.toString(16); } catch (NoSuchAlgorithmException e) { <START> e.printStackTrace(); <END> return String.valueOf(blobName.hashCode()); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return String.valueOf(blobName.hashCode()); } }</code><technical_language>logging instead of e.printStackTrace()</technical_language>

Target:
public static String getMetadataName(String blobName) { MessageDigest messageDigest; try { messageDigest = MessageDigest.getInstance("SHA-256"); messageDigest.update(blobName.getBytes(OrionConstantValues.ENCODING)); final byte[] digest = messageDigest.digest(); final BigInteger bigInteger = new BigInteger(1, digest); return bigInteger.toString(16); } catch (final NoSuchAlgorithmException e) { e.printStackTrace(); return String.valueOf(blobName.hashCode()); } catch (final UnsupportedEncodingException e) { e.printStackTrace(); return String.valueOf(blobName.hashCode()); } }
Source:
<code>private void resolveImpl(PackList packList, AbbreviatedObjectId id, boolean noGarbage, HashSet<ObjectId> matches) throws IOException { <START> if (MAX_RESOLVE_MATCHES <= matches.size()) { return; } <END> for (DfsPackFile pack : packList.packs) { if (noGarbage && pack.isGarbage()) { continue; } pack.resolve(this, matches, id, MAX_RESOLVE_MATCHES); if (MAX_RESOLVE_MATCHES <= matches.size()) { break; } } }</code><technical_language>This unnecessary. caller invokes empty set, if matches.size() < MAX_RESOLVE_MATCHES need this redundant check</technical_language>

Target:
private void resolveImpl(PackList packList, AbbreviatedObjectId id, boolean noGarbage, HashSet<ObjectId> matches) throws IOException { for (DfsPackFile pack : packList.packs) { if (noGarbage && pack.isGarbage()) { continue; } pack.resolve(this, matches, id, MAX_RESOLVE_MATCHES); if (MAX_RESOLVE_MATCHES <= matches.size()) { break; } } }
Source:
<code>protected void setUpGetHostIdExpectations(int idx) throws Exception { VDS host = BackendHostsResourceTest.setUpEntityExpectations(control.createMock(VDS.class), control.createMock(RpmVersion.class), <START> idx); <END> setUpGetEntityExpectations(VdcQueryType.GetVdsByName, GetVdsByNameParameters.class, new String[] { "Name" }, new Object[] { NAMES[idx] }, host); }</code><technical_language>(no need define version)</technical_language>

Target:
protected void setUpGetHostIdExpectations(int idx) throws Exception { VDS host = BackendHostsResourceTest.setUpEntityExpectations(control.createMock(VDS.class), idx); setUpGetEntityExpectations(VdcQueryType.GetVdsByName, GetVdsByNameParameters.class, new String[] { "Name" }, new Object[] { NAMES[idx] }, host); }
Source:
<code>private void createAndAddErrorPageHandler( ServletContextHandler httpServiceContext, Bundle refBundle) { ServletHandler handler = httpServiceContext.getServletHandler(); ServletHolder errorServletHolder = new ServletHolder(new ErrorServlet()); errorServletHolder.setServletHandler(handler); try { errorServletHolder.start(); errorServletHolder.initialize(); } catch (Exception e) { LOGGER.warn( "Unable to initialize an errorServletHolder for {}. Jetty's default error page will be used for this context", refBundle.getSymbolicName(), e); return; } LOGGER.info( <START> "Injecting an error page into into ID: {}", <END> refBundle.getSymbolicName(), refBundle.getBundleId()); handler.addServletWithMapping(errorServletHolder, errorPagePath); ErrorPageErrorHandler errorPageErrorHandler = new ErrorPageErrorHandler(); errorPageErrorHandler.setErrorPages(errorCodesMap); httpServiceContext.setErrorHandler(errorPageErrorHandler); }</code><technical_language>2x in this log statement</technical_language>

Target:
private void createAndAddErrorPageHandler( ServletContextHandler httpServiceContext, Bundle refBundle) { ServletHandler handler = httpServiceContext.getServletHandler(); ServletHolder errorServletHolder = new ServletHolder(new ErrorServlet()); errorServletHolder.setServletHandler(handler); try { errorServletHolder.start(); errorServletHolder.initialize(); } catch (Exception e) { LOGGER.warn( "Unable to initialize an errorServletHolder for {}. Jetty's default error page will be used for this context", refBundle.getSymbolicName(), e); return; } LOGGER.info( "Injecting an error page into ID: {}", refBundle.getSymbolicName(), refBundle.getBundleId()); handler.addServletWithMapping(errorServletHolder, ERROR_PAGE_PATH); ErrorPageErrorHandler errorPageErrorHandler = new ErrorPageErrorHandler(); errorPageErrorHandler.setErrorPages(errorCodesMap); httpServiceContext.setErrorHandler(errorPageErrorHandler); }
Source:
<code>public String encryptValue(String unwrappedPlaintext) { <START> if (unwrappedPlaintext == null) { <END> return null; } if (unwrappedPlaintext.equals("")) { return ""; } return String.format(ENC_TEMPLATE, encrypt(unwrappedPlaintext)); }</code><technical_language>confused returning of unwrappedPlaintext is for scenarios: null -> return null "" -> return "" work return it</technical_language>

Target:
public String encryptValue(String unwrappedPlaintext) { if (StringUtils.isEmpty(unwrappedPlaintext)) { return unwrappedPlaintext; } return String.format(ENC_TEMPLATE, encrypt(unwrappedPlaintext)); }
Source:
<code>public void onBind() { super.onBind(); <START> registerHandler(((ViewDef) getView()).getCloseButton().addClickHandler(e -> { <END> AbstractOverlayPresenter.this.removeFromParentSlot(); })); }</code><technical_language>need braces</technical_language>

Target:
public void onBind() { super.onBind(); registerHandler(((ViewDef) getView()).getCloseButton().addClickHandler(e -> AbstractOverlayPresenter.this.removeFromParentSlot() )); }
Source:
<code>public List<ApController> findAll() { Request request = new Request.Builder().url(host + "/r/controllers").build(); Response response = client.newCall(request); try { <START> return gson.fromJson(new InputStreamReader(response.body().byteStream(), "UTF-8"), new TypeToken<List<ApController>>() {}.getType()); <END> } catch (IOException ioe) { LOGGER.info("Problem with the communication has occurred", ioe); throw new CommunicationException(); } }</code><technical_language>create a wrapper for gson</technical_language>

Target:
public List<ApController> findAll() { Request request = new Request.Builder().url(host + "/r/controllers").build(); Response response = client.newCall(request); return json.fromJson(response.body().byteStream(), new TypeToken<List<ApController>>(){}.getType()); }
Source:
<code><START> public static <Solution_> SolverFactory<Solution_> create(SolverConfig solverConfig) { <END> return new DefaultSolverFactory<>(solverConfig); }</code><technical_language>I prefer shorter method names, important information argument type - is case here. LGTM</technical_language>

Target:
public static <Solution_> SolverFactory<Solution_> create(SolverConfig solverConfig) { solverConfig = new SolverConfig(solverConfig); return new DefaultSolverFactory<>(solverConfig); }
Source:
<code>protected boolean canDoAction() { if (!super.canDoAction()) { return false; } VDSGroup cluster = getVdsGroup(); if (cluster == null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID); return false; } <START> if (!cluster.supportsGlusterService()) { <END> addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_DOES_NOT_SUPPORT_GLUSTER); return false; } GlusterVolumeEntity volume = getGlusterVolumeDao().getById(volumeId); if (volume != null && volume.getStatus() == GlusterStatus.DOWN) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN); } if (!isVolumeThinlyProvisioned(volume)) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_NOT_THINLY_PROVISIONED); } return true; }</code><technical_language>want check feature support</technical_language>

Target:
protected boolean canDoAction() { if (!super.canDoAction()) { return false; } VDSGroup cluster = getVdsGroup(); if (cluster == null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID); return false; } if (!cluster.supportsGlusterService()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_DOES_NOT_SUPPORT_GLUSTER); return false; } if (!GlusterFeatureSupported.glusterSnapshot(cluster.getcompatibility_version())) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VOLUME_SNAPSHOT_NOT_SUPPORTED); return false; } GlusterVolumeEntity volume = getGlusterVolume(); if (volume == null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_INVALID); } else if (volume.getStatus() == GlusterStatus.DOWN) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN); } if (!isVolumeThinlyProvisioned(volume)) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_NOT_THINLY_PROVISIONED); } return true; }
Source:
<code>private static void startApi(CommandLineArgs args, Client esNodeClient) { port(args.getListenPort()); <START> ipAddress(args.getListenIp()); <END> if (args.isCors()) { CorsFilter.enableCORS("*", "get", "*"); } else { before((request, response) -> { response.type("application/json"); }); } get("api", new SearchRequestHandler("api", esNodeClient, args.getLanguages())); get("api/", new SearchRequestHandler("api/", esNodeClient, args.getLanguages())); get("reverse", new ReverseSearchRequestHandler("reverse", esNodeClient, args.getLanguages())); get("reverse/", new ReverseSearchRequestHandler("reverse/", esNodeClient, args.getLanguages())); final NominatimUpdater nominatimUpdater = new NominatimUpdater(args.getHost(), args.getPort(), args.getDatabase(), args.getUser(), args.getPassword()); Updater updater = new de.komoot.photon.elasticsearch.Updater(esNodeClient, args.getLanguages()); nominatimUpdater.setUpdater(updater); get("/nominatim-update", (Request request, Response response) -> { new Thread(() -> nominatimUpdater.update()).start(); return "nominatim update started (more information in console output) ..."; }); }</code><technical_language>This unrelated. reason change it</technical_language>

Target:
private static void startApi(CommandLineArgs args, Client esNodeClient) { port(args.getListenPort()); ipAddress(args.getListenIp()); String allowedOrigin = args.isCorsAnyOrigin() ? "*" : args.getCorsOrigin(); if (allowedOrigin != null) { CorsFilter.enableCORS(allowedOrigin, "get", "*"); } else { before((request, response) -> { response.type("application/json"); }); } get("api", new SearchRequestHandler("api", esNodeClient, args.getLanguages())); get("api/", new SearchRequestHandler("api/", esNodeClient, args.getLanguages())); get("reverse", new ReverseSearchRequestHandler("reverse", esNodeClient, args.getLanguages())); get("reverse/", new ReverseSearchRequestHandler("reverse/", esNodeClient, args.getLanguages())); final NominatimUpdater nominatimUpdater = new NominatimUpdater(args.getHost(), args.getPort(), args.getDatabase(), args.getUser(), args.getPassword()); Updater updater = new de.komoot.photon.elasticsearch.Updater(esNodeClient, args.getLanguages()); nominatimUpdater.setUpdater(updater); get("/nominatim-update", (Request request, Response response) -> { new Thread(() -> nominatimUpdater.update()).start(); return "nominatim update started (more information in console output) ..."; }); }
Source:
<code>public DIR.ServiceSet.Builder getOSDs(DIR.ServiceSet.Builder allOSDs, InetAddress clientIP, GlobalTypes.VivaldiCoordinates clientCoords, XLocList currentXLoc, int numOSDs) { <START> System.out.println("getOSDs parameters:"); <END> System.out.println("clientIP: " + clientIP.toString()); System.out.println("clientCoords: " + clientCoords.toString()); System.out.println(": getOSDs parameters."); return getOSDs(allOSDs); }</code><technical_language>Please System.out.println(...) calls in server side code. If output is necessary, consider DEBUG level logging instead</technical_language>

Target:
public DIR.ServiceSet.Builder getOSDs(DIR.ServiceSet.Builder allOSDs, InetAddress clientIP, GlobalTypes.VivaldiCoordinates clientCoords, XLocList currentXLoc, int numOSDs) { return getOSDs(allOSDs); }
Source:
<code><START> public void provision(Pod pod) { <END> List<LocalObjectReference> imagePullSecrets = pod.getSpec().getImagePullSecrets(); pod.getSpec() .setImagePullSecrets( ImmutableList.<LocalObjectReference>builder() .add(new LocalObjectReferenceBuilder().withName(SECRET_NAME).build()) .addAll(imagePullSecrets) .build()); }</code><technical_language>this method private</technical_language>

Target:
private void provision(Pod pod) { List<LocalObjectReference> imagePullSecrets = pod.getSpec().getImagePullSecrets(); pod.getSpec() .setImagePullSecrets( ImmutableList.<LocalObjectReference>builder() .add(new LocalObjectReferenceBuilder().withName(SECRET_NAME).build()) .addAll(imagePullSecrets) .build()); }
Source:
<code>public void getUrlsSuccess() { final CountDownLatch signal = new CountDownLatch(1); a.getOrchestraClient().getUrls("XX", null).enqueue(new Callback<UrlList>() { @Override public void onResponse(Call<UrlList> call, Response<UrlList> response) { if (!response.isSuccessful()) <START> Assert.fail(); <END> signal.countDown(); } @Override public void onFailure(Call<UrlList> call, Throwable t) { Assert.fail(); signal.countDown(); } }); try { signal.await(1, TimeUnit.MINUTES); } catch (InterruptedException e) { e.printStackTrace(); } }</code><technical_language>This written Assert.assertTrue(response.isSuccessful())</technical_language>

Target:
public void getUrlsSuccess() { final CountDownLatch signal = new CountDownLatch(1); a.getOrchestraClient().getUrls("XX", null).enqueue(new Callback<UrlList>() { @Override public void onResponse(Call<UrlList> call, Response<UrlList> response) { Assert.assertTrue(response.isSuccessful()); signal.countDown(); } @Override public void onFailure(Call<UrlList> call, Throwable t) { Assert.fail(); signal.countDown(); } }); try { signal.await(1, TimeUnit.MINUTES); } catch (InterruptedException e) { e.printStackTrace(); Assert.fail(); } }
Source:
<code>public void reset() { event.emit(ResetStart.class); decisionBlock = 0; synchronized (concepts) { concepts.clear(); } synchronized (newTasks) { newTasks.clear(); <START> novelTasks.clear(); <END> } synchronized(this.seq_current) { this.seq_current.clear(); } cycle = 0; emotion.resetEmotions(); this.lastDecision = null; resetStatic(); event.emit(ResetEnd.class); }</code><technical_language>Syncronize noveltasks</technical_language>

Target:
public void reset() { event.emit(ResetStart.class); decisionBlock = 0; synchronized (concepts) { concepts.clear(); } synchronized (tasksMutex) { newTasks.clear(); novelTasks.clear(); } synchronized(this.seq_current) { this.seq_current.clear(); } cycle = 0; emotion.resetEmotions(); this.lastDecision = null; resetStatic(); event.emit(ResetEnd.class); }
Source:
<code>public void logInvalidStatuses(List<CloudVmInstanceStatus> instances, InstanceStatus targetStatus) { <START> if (instances == null || instances.size() < 1) { return; <END> } StringBuilder warnMessage = new StringBuilder("Unable to reboot "); warnMessage.append(instances.stream().map(instance -> String.format("instance %s because of invalid status %s", instance.getCloudInstance().getInstanceId(), instance.getStatus().toString())).collect(Collectors.joining(", "))); warnMessage.append(String.format(". Instances should be in %s state.", targetStatus.toString())); LOGGER.warn(warnMessage.toString()); }</code><technical_language>multiple issues here: - please return this, if avoid in middle of returns in methods, else multiple exit points in method - if check if a collection is empty, please isEmpty() - I negate if condition put body of method inside. CollectionUtils apache (CollectionUtils.isNotEmpty(instances)) spring (!CollectionUtils.isEmpty(instances)) write condition hand (instances != null && !instances.isEmpty()). result in logic unnecessary return</technical_language>

Target:
public void logInvalidStatuses(List<CloudVmInstanceStatus> instances, InstanceStatus targetStatus) { if (CollectionUtils.isNotEmpty(instances)) { StringBuilder warnMessage = new StringBuilder("Unable to reboot "); warnMessage.append(instances.stream().map(instance -> String.format("instance %s because of invalid status %s", instance.getCloudInstance().getInstanceId(), instance.getStatus().toString())).collect(Collectors.joining(", "))); warnMessage.append(String.format(". Instances should be in %s state.", targetStatus.toString())); LOGGER.warn(warnMessage.toString()); } }
Source:
<code>protected boolean set(Entity entity, Map<Key<?>, Object> keyValues) { float scale = (Float) keyValues.get(Keys.SCALE); <START> entity.height = ((Float) keyValues.get(Keys.HEIGHT)) * scale; <END> entity.width = ((Float) keyValues.get(Keys.BASE_SIZE)) * scale; return true; }</code><technical_language>I need call setSize instead, updating bounding box</technical_language>

Target:
protected boolean set(Entity entity, Map<Key<?>, Object> keyValues) { float width = (Float) keyValues.get(Keys.BASE_SIZE); float height = (Float) keyValues.get(Keys.HEIGHT); float scale = (Float) keyValues.get(Keys.SCALE); IMixinEntity mixinEntity = (IMixinEntity) entity; mixinEntity.setSpongeSize(width, height, scale); return true; }
Source:
<code>public void calculateHash(int mDepth) { int maxDepth = coders.size() + 1; if (!isRoot()) { throw new InvalidParameterException("Can only be called on the root VertexCoder!"); } <START> String lastHash = "XXX"; <END> calculateCodes(maxDepth, false); int expansionDepth = 1; while (!lastHash.equals(labellessCode) && expansionDepth <= mDepth) { lastHash = labellessCode; expand(expansionDepth++); calculateCodes(maxDepth, false); } calculateCodes(maxDepth, true); }</code><technical_language>more descriptive string, put a constant</technical_language>

Target:
public void calculateHash(int mDepth) { int maxDepth = coders.size() + 1; if (!isRoot()) { throw new InvalidParameterException("Can only be called on the root VertexCoder!"); } String lastHash = null; calculateCodes(maxDepth, false); int expansionDepth = 1; while (!lastHash.equals(labellessCode) && expansionDepth <= mDepth) { lastHash = labellessCode; expand(expansionDepth++); calculateCodes(maxDepth, false); } calculateCodes(maxDepth, true); }
Source:
<code>private List<String> myAdvertisedAddresses() { <START> if (advertisedAddrs != null) <END> return advertisedAddrs; else { List<InetSocketAddress> addrs = myAddresses(); List<String> str_addrs = new ArrayList<String>(addrs.size()); for (final InetSocketAddress addr : addrs) { str_addrs.add(SocketUtil.format(addr, IANA_SSH_PORT)); } return str_addrs; } }</code><technical_language>Style-nit: wrap statements in curly braces</technical_language>

Target:
private List<String> myAdvertisedAddresses() { if (advertisedAddress != null) { return advertisedAddress; } else { List<InetSocketAddress> addrs = myAddresses(); List<String> strAddrs = new ArrayList<String>(addrs.size()); for (final InetSocketAddress addr : addrs) { strAddrs.add(SocketUtil.format(addr, IANA_SSH_PORT)); } return strAddrs; } }
Source:
<code>public RawAndDeserializedValue<V> getWithBinary(final K key) { try { <START> final byte[] serializedValue = wrapped().get(keyBytes(key)); return new RawAndDeserializedValue<V>(serializedValue, maybeMeasureLatency(() -> outerValue(serializedValue), time, getSensor)); <END> } catch (final ProcessorStateException e) { final String message = String.format(e.getMessage(), key); throw new ProcessorStateException(message, e); } }</code><technical_language>Ah, missed this time though. perform wrapped().get lambda, time perform get is included in latency</technical_language>

Target:
public RawAndDeserializedValue<V> getWithBinary(final K key) { try { return maybeMeasureLatency(() -> { final byte[] serializedValue = wrapped().get(keyBytes(key)); return new RawAndDeserializedValue<V>(serializedValue, outerValue(serializedValue)); }, time, getSensor); } catch (final ProcessorStateException e) { final String message = String.format(e.getMessage(), key); throw new ProcessorStateException(message, e); } }
Source:
<code>public void setOnCameraChangeListener(OnCameraChangeListener onCameraChangeListener) { if (isInitialized()) { <START> mMapInterface.setOnCameraChangeListener(onCameraChangeListener); <END> } }</code><technical_language>if try se listener map is initialized? a reference onCameraChangeListener do mMapInterface.setOnCameraChangeListener(onCameraChangeListener); onMapLoaded is called</technical_language>

Target:
public void setOnCameraChangeListener(OnCameraChangeListener onCameraChangeListener) { mOnCameraChangeListener = onCameraChangeListener; }
Source:
<code>public void onReceive(final Object message) throws Exception { final Class<?> klass = message.getClass(); final ActorRef self = self(); final ActorRef sender = sender(); if (message instanceof SipServletRequest) { final SipServletRequest request = (SipServletRequest) message; final String method = request.getMethod(); if ("INVITE".equalsIgnoreCase(method)) { check(request); <START> if (request.getContentType().equals("application/vnd.3gpp.ussd+xml")) { <END> invite(request); } else { final SipServletResponse response = request.createResponse(SC_NOT_FOUND); response.send(); } } else if ("INFO".equalsIgnoreCase(method)) { processRequest(request); } else if ("ACK".equalsIgnoreCase(method)) { processRequest(request); } else if ("BYE".equalsIgnoreCase(method)) { processRequest(request); } else if ("CANCEL".equalsIgnoreCase(method)) { processRequest(request); } } else if (message instanceof SipServletResponse) { response(message); } else if (CreateCall.class.equals(klass)) { try { this.createCallRequest = (CreateCall) message; sender.tell(new CallManagerResponse<ActorRef>(outbound(message)), self); } catch (final Exception exception) { sender.tell(new CallManagerResponse<ActorRef>(exception), self); } } else if (ExecuteCallScript.class.equals(klass)) { execute(message); } }</code><technical_language>is this new condition about? is this related original story? anyway, this a good place 415/Unsupported Media Type</technical_language>

Target:
public void onReceive(final Object message) throws Exception { final Class<?> klass = message.getClass(); final ActorRef self = self(); final ActorRef sender = sender(); if (message instanceof SipServletRequest) { final SipServletRequest request = (SipServletRequest) message; final String method = request.getMethod(); if ("INVITE".equalsIgnoreCase(method)) { check(request); invite(request); } else if ("INFO".equalsIgnoreCase(method)) { processRequest(request); } else if ("ACK".equalsIgnoreCase(method)) { processRequest(request); } else if ("BYE".equalsIgnoreCase(method)) { processRequest(request); } else if ("CANCEL".equalsIgnoreCase(method)) { processRequest(request); } } else if (message instanceof SipServletResponse) { response(message); } else if (CreateCall.class.equals(klass)) { try { this.createCallRequest = (CreateCall) message; sender.tell(new CallManagerResponse<ActorRef>(outbound(message)), self); } catch (final Exception exception) { sender.tell(new CallManagerResponse<ActorRef>(exception), self); } } else if (ExecuteCallScript.class.equals(klass)) { execute(message); } }
Source:
<code><START> public static SimpleReact lazy(ExecutorService executor){ <END> return new SimpleReact(false); }</code><technical_language>executor param is used, is intentional</technical_language>

Target:
public static SimpleReact lazy(ExecutorService executor){ return new SimpleReact(executor,false); }
Source:
<code>public void deleteSuccess() throws Exception { context.turnOffAuthorisationSystem(); MetadataSchema metadataSchema = MetadataSchemaBuilder.createMetadataSchema(context, "ATest", "A namespace") <START> .build(); <END> getClient().perform(get("/api/core/metadataschemas/" + metadataSchema.getID())) .andExpect(status().isOk()); getClient(getAuthToken(admin.getEmail(), password)) .perform(delete("/api/core/metadataschemas/" + metadataSchema.getID())) .andExpect(status().isNoContent()); getClient().perform(get("/api/core/metadataschemas/" + metadataSchema.getID())) .andExpect(status().isNotFound()); }</code><technical_language>turn auth system creating test data</technical_language>

Target:
public void deleteSuccess() throws Exception { context.turnOffAuthorisationSystem(); MetadataSchema metadataSchema = MetadataSchemaBuilder.createMetadataSchema(context, "ATest", "A namespace") .build(); context.restoreAuthSystemState(); getClient().perform(get("/api/core/metadataschemas/" + metadataSchema.getID())) .andExpect(status().isOk()); getClient(getAuthToken(admin.getEmail(), password)) .perform(delete("/api/core/metadataschemas/" + metadataSchema.getID())) .andExpect(status().isNoContent()); getClient().perform(get("/api/core/metadataschemas/" + metadataSchema.getID())) .andExpect(status().isNotFound()); }
Source:
<code>public Cluster() { migrateOnError = MigrateOnErrorOptions.YES; name = ""; virtService = true; optimizationType = OptimizationType.NONE; additionalRngSources = new HashSet<>(); fencingPolicy = new FencingPolicy(); addtionalFeaturesSupported = new HashSet<>(); ksmMergeAcrossNumaNodes = true; migrationBandwidthLimitType = MigrationBandwidthLimitType.DEFAULT; requiredSwitchTypeForCluster = SwitchType.LEGACY; logMaxMemoryUsedThresholdType = LogMaxMemoryUsedThresholdType.PERCENTAGE; description = ""; comment = ""; cpuName = ""; vncEncryptionEnabled = true; maintenanceReasonRequired = true; <START> optionalReasonRequired = true; <END> }</code><technical_language>remove variable completely</technical_language>

Target:
public Cluster() { migrateOnError = MigrateOnErrorOptions.YES; name = ""; virtService = true; optimizationType = OptimizationType.NONE; additionalRngSources = new HashSet<>(); fencingPolicy = new FencingPolicy(); addtionalFeaturesSupported = new HashSet<>(); ksmMergeAcrossNumaNodes = true; migrationBandwidthLimitType = MigrationBandwidthLimitType.DEFAULT; requiredSwitchTypeForCluster = SwitchType.LEGACY; logMaxMemoryUsedThresholdType = LogMaxMemoryUsedThresholdType.PERCENTAGE; description = ""; comment = ""; cpuName = ""; vncEncryptionEnabled = true; }
Source:
<code>public void should_generate_next_date_correctly_on_the_day_when_time_changes_to_standard() { <START> LocalDate currentDate = LocalDate.of(2020, 3, 29); <END> LocalDate nextDay = currentDate.plusDays(1); assertThat(new Daily(ROME, HOUR_2).getNextExecutionTime(complete(instant(currentDate, HOUR_0, UTC))), is(instant(currentDate, HOUR_1, UTC))); assertThat(new Daily(ROME, HOUR_3).getNextExecutionTime(complete(instant(currentDate, HOUR_0, UTC))), is(instant(currentDate, HOUR_1, UTC))); }</code><technical_language>october here</technical_language>

Target:
public void should_generate_next_date_correctly_on_the_day_when_time_changes_to_standard() { LocalDate currentDate = LocalDate.of(2020, 10, 25); LocalDate previousDay = currentDate.minusDays(1); assertThat(new Daily(ROME, HOUR_2).getNextExecutionTime(complete(instant(previousDay, HOUR_23, UTC))), is(instant(currentDate, HOUR_0, UTC))); assertThat(new Daily(ROME, HOUR_3).getNextExecutionTime(complete(instant(currentDate, HOUR_0, UTC))), is(instant(currentDate, HOUR_2, UTC))); }