auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static boolean isValidOutcomeEntry(String name) { if (name == null || name.isEmpty()) { OneSignal.Log(LOG_LEVEL.ERROR, "Outcome name must not be empty"); <START> return false; <END> } return true; }</code><technical_language>want outcomeEventsController null check here. init of services / broadcastReceiver called setup a context. In future addTaskToQueue for sendTags call drop if dev calls out of order</technical_language>

Target:
private static boolean isValidOutcomeEntry(String name) { if (outcomeEventsController == null) { OneSignal.Log(LOG_LEVEL.ERROR, "Make sure OneSignal.init is called first"); return false; } if (name == null || name.isEmpty()) { OneSignal.Log(LOG_LEVEL.ERROR, "Outcome name must not be empty"); return false; } return true; }
Source:
<code>private void addI18nResources(Map<String, Properties> componentI18nResources, I18nResources i18nResources) { if ((componentI18nResources == null) || componentI18nResources.isEmpty()) { return; } componentI18nResources.forEach((localString, properties) -> { Locale locale = Locale.forLanguageTag(localString.replace("_", "-")); <START> if (!locale.getLanguage().isEmpty()) { <END> i18nResources.addI18nResource(locale, properties); } else { throw new UUFException("Cannot deploy language file for " + localString); } }); }</code><technical_language>invert this if condition, in order eliminate operator</technical_language>

Target:
private void addI18nResources(Map<String, Properties> componentI18nResources, I18nResources i18nResources) { if ((componentI18nResources == null) || componentI18nResources.isEmpty()) { return; } componentI18nResources.forEach((localString, properties) -> { Locale locale = Locale.forLanguageTag(localString.replace("_", "-")); if (locale.getLanguage().isEmpty()) { throw new UUFException("Locale is not found for the given language code. Hence language file will not" + " be deployed for" + localString); } else { i18nResources.addI18nResource(locale, properties); } }); }
Source:
<code>public void onCheckedChanged(RadioGroup radioGroup, int selectedButtonInt) { switch (selectedButtonInt) { <START> case 2131296642: <END> mapboxMap.setStyle(Style.MAPBOX_STREETS); break; case 2131296351: mapboxMap.setStyle(Style.DARK); break; default: mapboxMap.setStyle(Style.MAPBOX_STREETS); break; } }</code><technical_language>R.id... values instead of hardcoded numbers</technical_language>

Target:
public void onCheckedChanged(RadioGroup radioGroup, int selectedButtonInt) { switch (selectedButtonInt) { case R.id.streets_style_select_radio_button: Log.d("StaticImageActivity", "onCheckedChanged: streets"); mapboxMap.setStyle(Style.MAPBOX_STREETS); break; case R.id.dark_style_select_radio_button: Log.d("StaticImageActivity", "onCheckedChanged: dark"); mapboxMap.setStyle(Style.DARK); break; default: mapboxMap.setStyle(Style.MAPBOX_STREETS); break; } }
Source:
<code>private void dumpCommits() { try { writer.openCommitsMeta( this.repositoryId ); final NodeCommitQuery nodeCommitQuery = NodeCommitQuery.create().build(); <START> final NodeCommitEntries nodeCommitEntries = this.nodeService.findCommits( nodeCommitQuery ). <END> getNodeCommitEntries(); nodeCommitEntries.stream(). map( nodeCommitEntry -> CommitDumpEntry.create(). nodeCommitId( nodeCommitEntry.getNodeCommitId() ). message( nodeCommitEntry.getMessage() ). committer( nodeCommitEntry.getCommitter() ). timestamp( nodeCommitEntry.getTimestamp() ). build() ). forEach( this.writer::writeCommitEntry ); } finally { writer.close(); } }</code><technical_language>size( NodeSearchService.GET_ALL_SIZE_FLAG ) used</technical_language>

Target:
private void dumpCommits() { try { writer.openCommitsMeta( this.repositoryId ); final NodeCommitQuery nodeCommitQuery = NodeCommitQuery.create().size( -1 ).build(); final NodeCommitEntries nodeCommitEntries = this.nodeService.findCommits( nodeCommitQuery ). getNodeCommitEntries(); nodeCommitEntries.stream(). map( nodeCommitEntry -> CommitDumpEntry.create(). nodeCommitId( nodeCommitEntry.getNodeCommitId() ). message( nodeCommitEntry.getMessage() ). committer( nodeCommitEntry.getCommitter() ). timestamp( nodeCommitEntry.getTimestamp() ). build() ). forEach( this.writer::writeCommitEntry ); } finally { writer.close(); } }
Source:
<code>public void getBookieInfo(final BookieSocketAddress addr, final long requested, final GetBookieInfoCallback cb, final Object ctx) { final PerChannelBookieClientPool client = lookupClient(addr); if (client == null) { cb.getBookieInfoComplete(getRc(BKException.Code.BookieHandleNotAvailableException), new BookieInfo(), ctx); return; } client.obtain((rc, pcbc) -> { if (rc != BKException.Code.OK) { try { executor.submit(safeRun(() -> { cb.getBookieInfoComplete(rc, new BookieInfo(), ctx); })); } catch (RejectedExecutionException re) { cb.getBookieInfoComplete(getRc(BKException.Code.InterruptedException), new BookieInfo(), ctx); } } else { pcbc.getBookieInfo(requested, cb, ctx); } <START> }, requested, conf.getUseV2WireProtocol()); <END> }</code><technical_language>I conf.getUseV2WireProtocol(). true /* forceUseV3 *, right</technical_language>

Target:
public void getBookieInfo(final BookieSocketAddress addr, final long requested, final GetBookieInfoCallback cb, final Object ctx) { final PerChannelBookieClientPool client = lookupClient(addr); if (client == null) { cb.getBookieInfoComplete(getRc(BKException.Code.BookieHandleNotAvailableException), new BookieInfo(), ctx); return; } client.obtain((rc, pcbc) -> { if (rc != BKException.Code.OK) { try { executor.submit(safeRun(() -> { cb.getBookieInfoComplete(rc, new BookieInfo(), ctx); })); } catch (RejectedExecutionException re) { cb.getBookieInfoComplete(getRc(BKException.Code.InterruptedException), new BookieInfo(), ctx); } } else { pcbc.getBookieInfo(requested, cb, ctx); } }, requested, useV3Enforced); }
Source:
<code>protected abstract DfsPackDescription newPack(PackSource source) throws IOException; protected void commitPack(Collection<DfsPackDescription> desc, Collection<DfsPackDescription> replaces) throws IOException { commitPackImpl(desc, replaces); <START> if (replaces != null && !replaces.isEmpty()) { DfsBlockCache cache = DfsBlockCache.getInstance(); for (DfsPackDescription replace : replaces) { DfsPackFile packFile = cache.getOrCreate(replace, null); packFile.close(); } } <END> getRepository().fireEvent(new DfsPacksChangedEvent()); }</code><technical_language>This part of this change is valuable--commitPack is moving snapshot of current pack files forward, this change is more quickly evicting stale values packCache map. is a race condition another thread reads previous snapshot accesses packCache map stale values. DfsPackFile creation is cheap I is a net win</technical_language>

Target:
protected abstract DfsPackDescription newPack(PackSource source) throws IOException; protected DfsPackDescription newPack(PackSource source, long estimatedPackSize) throws IOException { DfsPackDescription pack = newPack(source); pack.setEstimatedPackSize(estimatedPackSize); return pack; }
Source:
<code>public SqlJsonLengthFunction() { super("JSON_LENGTH", SqlKind.OTHER_FUNCTION, <START> ReturnTypes.cascade(ReturnTypes.INTEGER_NULLABLE, <END> SqlTypeTransforms.FORCE_NULLABLE), null, OperandTypes.ANY, SqlFunctionCategory.SYSTEM); }</code><technical_language>simplify ReturnTypes.cascade(ReturnTypes.INTEGER, SqlTypeTransforms.FORCE_NULLABLE)</technical_language>

Target:
public SqlJsonLengthFunction() { super("JSON_LENGTH", SqlKind.OTHER_FUNCTION, ReturnTypes.cascade(ReturnTypes.INTEGER, SqlTypeTransforms.FORCE_NULLABLE), null, OperandTypes.ANY, SqlFunctionCategory.SYSTEM); }
Source:
<code>public void findAllForbiddenTest() throws Exception { context.turnOffAuthorisationSystem(); EPerson newUser = EPersonBuilder.createEPerson(context) .withNameInMetadata("John", "Doe") .withEmail("Johndoe@fake-email.com") .build(); String authToken = getAuthToken(eperson.getEmail(), password); getClient(authToken).perform(get("/api/eperson/eperson")) <START> .andExpect(status().isUnauthorized()); <END> }</code><technical_language>If apply suggested changes, I restore original behavior here</technical_language>

Target:
public void findAllForbiddenTest() throws Exception { String authToken = getAuthToken(eperson.getEmail(), password); getClient(authToken).perform(get("/api/eperson/eperson")) .andExpect(status().isForbidden()); }
Source:
<code><START> private void updateEmailList() { <END> if (currentEmail != null) { int index = emailListIndexOf(currentEmail); if (index == -1) { emailPick.addItem(currentEmail); emailPick.setSelectedIndex(emailPick.getItemCount() - 1); } else { emailPick.setSelectedIndex(index); } } if (emailPick.getItemCount() > 0) { emailPick.setVisible(true); emailPick.setEnabled(true); if (canRegisterNewEmail()) { final String t = Util.C.buttonOpenRegisterNewEmail(); if (emailListIndexOf(t) == -1) { emailPick.addItem("... " + t + " ", t); } } } else { emailPick.setVisible(false); } }</code><technical_language>This method works for adding email. If I add a email drop list contains: email1 ... Register New Email ... email2</technical_language>

Target:
private void updateEmailList() { if (currentEmail != null) { int index = emailListIndexOf(currentEmail); if (index == -1) { emailPick.addItem(currentEmail); emailPick.setSelectedIndex(emailPick.getItemCount() - 1); } else { emailPick.setSelectedIndex(index); } } if (emailPick.getItemCount() > 0) { emailPick.setVisible(true); emailPick.setEnabled(true); if (canRegisterNewEmail()) { final String t = Util.C.buttonOpenRegisterNewEmail(); int index = emailListIndexOf(t); if (index != -1) { emailPick.removeItem(index); } emailPick.addItem("... " + t + " ", t); } } else { emailPick.setVisible(false); } }
Source:
<code>private void handleStepAndJob() { boolean isCoCoManaged = parentHasCallback() || getCallback() != null; boolean endActionWillRunAgain = !getSucceeded() && getReturnValue().getEndActionTryAgain(); if (isCoCoManaged || endActionWillRunAgain) { return; } boolean succeeded = getSucceeded() <START> && getParameters().getTaskGroupSuccess(); <END> ExecutionHandler.endFinalizingStepOrCurrentStep(getContext().getExecutionContext(), succeeded); ExecutionHandler.endTaskJobIfNeeded(getContext().getExecutionContext(), succeeded); }</code><technical_language>redundant line break</technical_language>

Target:
private void handleStepAndJob() { boolean isCoCoManaged = parentHasCallback() || getCallback() != null; boolean endActionWillRunAgain = !getSucceeded() && getReturnValue().getEndActionTryAgain(); if (isCoCoManaged || endActionWillRunAgain) { return; } ExecutionHandler.endTaskStepAndJob(getContext().getExecutionContext(), getSucceeded() && getParameters() .getTaskGroupSuccess()); }
Source:
<code>private void validateRazEnablement(SdxClusterRequest sdxClusterRequest, DetailedEnvironmentResponse environment) { ValidationResultBuilder validationBuilder = new ValidationResultBuilder(); if (sdxClusterRequest.isEnableRangerRaz()) { boolean razEntitlementEnabled = entitlementService.razEnabled(environment.getCreator(), Crn.safeFromString(environment.getCreator()).getAccountId()); if (!razEntitlementEnabled) { validationBuilder.error("Provisioning Ranger Raz is not enabled for this account."); } if (!(AWS.name().equalsIgnoreCase(environment.getCloudPlatform()) || AZURE.name().equalsIgnoreCase(environment.getCloudPlatform()))) { validationBuilder.error("Provisioning Ranger Raz is only valid for Amazon Web Services and Microsoft Azure."); } if (!isRazSupported(sdxClusterRequest.getRuntime(), environment.getCloudPlatform())) { boolean aws = AWS.name().equalsIgnoreCase(environment.getCloudPlatform()); <START> String errorMsg = aws ? "Provisioning Ranger Raz on Amazon Web Services is only valid for CM version >= 7.2.2 and not " : <END> "Provisioning Ranger Raz on Microsoft Azure is only valid for CM version >= 7.2.1 and not "; validationBuilder.error(errorMsg + sdxClusterRequest.getRuntime()); } } ValidationResult validationResult = validationBuilder.build(); if (validationResult.hasError()) { throw new BadRequestException(validationResult.getFormattedErrors()); } }</code><technical_language>reuse ignoresCase a lot treating checks for cloud platform. Lets put in a variable do enum comparison</technical_language>

Target:
private void validateRazEnablement(SdxClusterRequest sdxClusterRequest, DetailedEnvironmentResponse environment) { ValidationResultBuilder validationBuilder = new ValidationResultBuilder(); if (sdxClusterRequest.isEnableRangerRaz()) { boolean razEntitlementEnabled = entitlementService.razEnabled(environment.getCreator(), Crn.safeFromString(environment.getCreator()).getAccountId()); if (!razEntitlementEnabled) { validationBuilder.error("Provisioning Ranger Raz is not enabled for this account."); } CloudPlatform cloudPlatform = EnumUtils.getEnumIgnoreCase(CloudPlatform.class, environment.getCloudPlatform()); if (!(AWS.equals(cloudPlatform) || AZURE.equals(cloudPlatform))) { validationBuilder.error("Provisioning Ranger Raz is only valid for Amazon Web Services and Microsoft Azure."); } if (!isRazSupported(sdxClusterRequest.getRuntime(), cloudPlatform)) { String errorMsg = AWS.equals(cloudPlatform) ? "Provisioning Ranger Raz on Amazon Web Services is only valid for CM version >= 7.2.2 and not " : "Provisioning Ranger Raz on Microsoft Azure is only valid for CM version >= 7.2.1 and not "; validationBuilder.error(errorMsg + sdxClusterRequest.getRuntime()); } } ValidationResult validationResult = validationBuilder.build(); if (validationResult.hasError()) { throw new BadRequestException(validationResult.getFormattedErrors()); } }
Source:
<code>public void testMemoryReservationYield(Type type) { <START> List<Page> input = createPages(type, 5_000, 500, true); <END> OperatorFactory operatorFactory = new DistinctLimitOperator.DistinctLimitOperatorFactory( 0, new PlanNodeId("test"), ImmutableList.of(type), ImmutableList.of(0), Integer.MAX_VALUE, Optional.of(1), joinCompiler); GroupByHashYieldAssertion.GroupByHashYieldResult result = finishOperatorWithYieldingGroupByHash(input, type, operatorFactory, operator -> ((DistinctLimitOperator) operator).getCapacity(), 170_000); assertGreaterThan(result.getYieldCount(), 5); assertGreaterThan(result.getMaxReservedBytes(), 20L << 20); assertEquals(result.getOutput().stream().mapToInt(Page::getPositionCount).sum(), 5_000 * 500); }</code><technical_language>leave interface unchanged. for other tests</technical_language>

Target:
public void testMemoryReservationYield(Type type) { List<Page> input = createPagesWithDistinctHashKeys(type, 5_000, 500); OperatorFactory operatorFactory = new DistinctLimitOperator.DistinctLimitOperatorFactory( 0, new PlanNodeId("test"), ImmutableList.of(type), ImmutableList.of(0), Integer.MAX_VALUE, Optional.of(1), joinCompiler); GroupByHashYieldAssertion.GroupByHashYieldResult result = finishOperatorWithYieldingGroupByHash(input, type, operatorFactory, operator -> ((DistinctLimitOperator) operator).getCapacity(), 170_000); assertGreaterThan(result.getYieldCount(), 5); assertGreaterThan(result.getMaxReservedBytes(), 20L << 20); assertEquals(result.getOutput().stream().mapToInt(Page::getPositionCount).sum(), 5_000 * 500); }
Source:
<code>private void writeAnswer( Sheet sheet, Row row, int startColumn, QuestionDto questionDto, String value, boolean useQuestionId) { assert value != null; List<String> cells = new ArrayList<>(); QuestionType questionType = questionDto.getQuestionType(); switch (questionType) { case DATE: cells.add(dateCellValue(value)); break; case PHOTO: case VIDEO: cells.add(photoCellValue(value, imagePrefix)); break; case GEO: cells.addAll(geoCellValues(value)); break; case CASCADE: cells.addAll(cascadeCellValues(value, useQuestionId, questionDto.getLevelNames() .size())); break; case OPTION: Long qId = questionDto.getKeyId(); cells.addAll(optionCellValues(questionDto.getKeyId(),value,useQuestionId,optionMap.get(qId),allowOtherMap.get(qId))); break; default: cells.add(sanitize(value)); break; } int col = startColumn; for (String cellValue : cells) { if (questionType == QuestionType.NUMBER) { createCell(row, col, cellValue, null, Cell.CELL_TYPE_NUMERIC); <START> } else if (questionType == QuestionType.OPTION){ <END> if (cellValue.equals("0") || cellValue.equals("1")){ createCell(row, col, cellValue, null, Cell.CELL_TYPE_NUMERIC); } else { createCell(row, col, cellValue, mTextStyle); } } else { createCell(row, col, cellValue, mTextStyle); } col++; } }</code><technical_language>this is more personal style issue if used.. (questionType == QuestionType.OPTION && (cellValue.equals("0") || cellValue.equals("1"))) skip line repeated 708 711 below</technical_language>

Target:
private void writeAnswer( Sheet sheet, Row row, int startColumn, QuestionDto questionDto, String value, boolean useQuestionId) { assert value != null; List<String> cells = new ArrayList<>(); QuestionType questionType = questionDto.getQuestionType(); switch (questionType) { case DATE: cells.add(dateCellValue(value)); break; case PHOTO: case VIDEO: cells.add(photoCellValue(value, imagePrefix)); break; case GEO: cells.addAll(geoCellValues(value)); break; case CASCADE: cells.addAll(cascadeCellValues(value, useQuestionId, questionDto.getLevelNames() .size())); break; case OPTION: Long qId = questionDto.getKeyId(); cells.addAll(optionCellValues(questionDto.getKeyId(), value, useQuestionId, optionMap.get(qId), allowOtherMap.get(qId))); break; default: cells.add(sanitize(value)); break; } int col = startColumn; for (String cellValue : cells) { if (questionType == QuestionType.NUMBER) { createCell(row, col, cellValue, null, Cell.CELL_TYPE_NUMERIC); } else if (questionType == QuestionType.OPTION && (cellValue.equals("0") || cellValue.equals("1"))) { createCell(row, col, cellValue, null, Cell.CELL_TYPE_NUMERIC); } else { createCell(row, col, cellValue, mTextStyle); } col++; } }
Source:
<code>public void use_environment_varibales() { LdapDetails details = createDefaultsWithoutManagerCred(ldap.get()); details.addEnvironmentVariable(new LdapEnvironmentVariable("java.naming.ldap.typesOnly", "true")); useLdapAsSecurityRealm(details); Login login = jenkins.login(); login.doLogin("jenkins", "root"); assertThat(jenkins, not(hasLoggedInUser("jenkins"))); <START> assertThat(getElement(by.tagName("pre")).getText(), Matchers.containsString("NoSuchElementException")); <END> }</code><technical_language>This fragile me</technical_language>

Target:
public void use_environment_varibales() { LdapDetails details = createDefaultsWithoutManagerCred(ldap.get()); details.addEnvironmentVariable(new LdapEnvironmentVariable("java.naming.ldap.typesOnly", "true")); useLdapAsSecurityRealm(details); Login login = jenkins.login(); login.doLogin("jenkins", "root"); assertThat(jenkins, not(hasLoggedInUser("jenkins"))); }
Source:
<code>public void addRecipients(ExtendedEmailPublisherContext context, EnvVars env, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc) { ExtendedEmailPublisherDescriptor descriptor = Jenkins.getInstance().getDescriptorByType(ExtendedEmailPublisherDescriptor.class); Run<?,?> run = context.getRun(); <START> if(run instanceof AbstractBuild) { <END> Set<User> users = ((AbstractBuild<?,?>)run).getCulprits(); for (User user : users) { if (!EmailRecipientUtils.isExcludedRecipient(user, context.getListener())) { String userAddress = EmailRecipientUtils.getUserConfiguredEmail(user); if (userAddress != null) { descriptor.debug(context.getListener().getLogger(), "Adding user address %s, they were not considered an excluded committer", userAddress); EmailRecipientUtils.addAddressesFromRecipientList(to, cc, bcc, userAddress, env, context.getListener()); } else { context.getListener().getLogger().println("Failed to send e-mail to " + user.getFullName() + " because no e-mail address is known, and no default e-mail domain is configured"); } } } } }</code><technical_language>if ( space</technical_language>

Target:
public void addRecipients(ExtendedEmailPublisherContext context, EnvVars env, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc) { ExtendedEmailPublisherDescriptor descriptor = Jenkins.getActiveInstance().getDescriptorByType(ExtendedEmailPublisherDescriptor.class); Run<?,?> run = context.getRun(); if (run instanceof AbstractBuild) { Set<User> users = ((AbstractBuild<?,?>)run).getCulprits(); for (User user : users) { if (!EmailRecipientUtils.isExcludedRecipient(user, context.getListener())) { String userAddress = EmailRecipientUtils.getUserConfiguredEmail(user); if (userAddress != null) { descriptor.debug(context.getListener().getLogger(), "Adding user address %s, they were not considered an excluded committer", userAddress); EmailRecipientUtils.addAddressesFromRecipientList(to, cc, bcc, userAddress, env, context.getListener()); } else { context.getListener().getLogger().println("Failed to send e-mail to " + user.getFullName() + " because no e-mail address is known, and no default e-mail domain is configured"); } } } } }
Source:
<code>public void shouldEnrollBoostVaccinationForSpecificDay() throws IOException { try { fakeNow(newDateTime(2015, 8, 1, 0, 0, 0)); for(int i = 0; i < 7; i++){ Subject subject = createSubjectWithRequireData(Integer.toString(i + 1)); } InputStream inputStream = getClass().getResourceAsStream("/enrollBoostVaccination.csv"); raveImportService.importCsv(new InputStreamReader(inputStream), "/enrollBoostVaccination.csv"); inputStream.close(); int i = 0; for (Subject subject : subjectService.getAll()) { SubjectEnrollments subjectEnrollments = subjectEnrollmentsDataService.findEnrollmentBySubjectId(subject.getSubjectId()); assertEquals(1, subjectEnrollments.getEnrollments().size()); <START> assertEquals(new LocalDate(2015, 9, 21 + i), subjectEnrollments.getEnrollments().iterator().next().getReferenceDate()); <END> i++; } } finally { stopFakingTime(); } }</code><technical_language>check campaign name</technical_language>

Target:
public void shouldEnrollBoostVaccinationForSpecificDay() throws IOException { try { fakeNow(newDateTime(2015, 8, 1, 0, 0, 0)); for(int i = 0; i < 7; i++){ Subject subject = createSubjectWithRequireData(Integer.toString(i + 1)); } InputStream inputStream = getClass().getResourceAsStream("/enrollBoostVaccination.csv"); raveImportService.importCsv(new InputStreamReader(inputStream), "/enrollBoostVaccination.csv"); inputStream.close(); int i = 0; for (Subject subject : subjectService.getAll()) { SubjectEnrollments subjectEnrollments = subjectEnrollmentsDataService.findEnrollmentBySubjectId(subject.getSubjectId()); assertEquals(1, subjectEnrollments.getEnrollments().size()); Enrollment enrollment = subjectEnrollments.getEnrollments().iterator().next(); assertEquals(VisitType.BOOST_VACCINATION_DAY.getValue() + " " + EbodacConstants.DAYS_OF_WEEK.get(i), enrollment.getCampaignName()); assertEquals(new LocalDate(2015, 9, 20 + i), subjectEnrollments.getEnrollments().iterator().next().getReferenceDate()); i++; } } finally { stopFakingTime(); } }
Source:
<code>public void scanFile(AstTreeVisitorContext context) { <START> super.scanFile(context); <END> expectedLines = headerFormat.split("(?:\r)?\n|\r"); List<String> lines = Collections.emptyList(); try { lines = Files.readLines(getContext().getFile(), charset); } catch (IOException e) { LOG.error("Unable to execute rule \"TabCharacter\" for file because of error: {}", getContext().getFile().getName(), e); } if (!matches(expectedLines, lines)) { getContext().addFileIssue(this, "Add or update the header of this file."); } }</code><technical_language>is need call super method in this case. avoid visit entire is needed</technical_language>

Target:
public void scanFile(AstTreeVisitorContext context) { expectedLines = headerFormat.split("(?:\r)?\n|\r"); List<String> lines = Collections.emptyList(); try { lines = Files.readLines(context.getFile(), charset); } catch (IOException e) { LOG.error("Unable to execute rule \"TabCharacter\" for file because of error: {}", context.getFile().getName(), e); } if (!matches(expectedLines, lines)) { context.addFileIssue(this, "Add or update the header of this file."); } }
Source:
<code>public Tuple getTuple(EntityKey key, TupleContext tupleContext) { Entity entity = getEntity( key, tupleContext.getOptionsContext() ); if ( entity != null ) { return new Tuple( new RedisTupleSnapshot( entity.getProperties() ) ); } <START> else if ( isInTheQueue( key, tupleContext ) ) { <END> return new Tuple( new RedisTupleSnapshot( entity.getProperties() ) ); } else { return null; } }</code><technical_language>some kind of batching? is a left-over MongoDB? I unhappy batching is done in MongoDB backend, prefer if start for Redis this</technical_language>

Target:
public Tuple getTuple(EntityKey key, TupleContext tupleContext) { Entity entity = getEntity( key ); if ( entity != null ) { return new Tuple( new RedisTupleSnapshot( entity.getProperties() ) ); } else { return null; } }
Source:
<code>public void onOptimizelyExperimentViewed(OptimizelyExperimentData optimizelyExperimentData) { Map<String, OptimizelyExperimentData> visitedExperiments = Optimizely.getVisitedExperiments(); for (String experimentId : visitedExperiments.keySet()) { OptimizelyExperimentData experiment = visitedExperiments.get(experimentId); <START> HashMap<String, String> abTestProperties = new HashMap<>(); <END> abTestProperties.put(ABTEST_NAME, experiment.experimentName); abTestProperties.put(ABTEST_VARIATION, experiment.variationName); AnalyticsTracker.track(AnalyticsTracker.Stat.ABTEST_START); } }</code><technical_language>properties included bump Analytics</technical_language>

Target:
public void onOptimizelyExperimentViewed(OptimizelyExperimentData optimizelyExperimentData) { Map<String, OptimizelyExperimentData> visitedExperiments = Optimizely.getVisitedExperiments(); for (String experimentId : visitedExperiments.keySet()) { OptimizelyExperimentData experiment = visitedExperiments.get(experimentId); HashMap<String, String> abTestProperties = new HashMap<>(); abTestProperties.put(ABTEST_NAME, experiment.experimentName); abTestProperties.put(ABTEST_VARIATION, experiment.variationName); AnalyticsTracker.track(AnalyticsTracker.Stat.ABTEST_START, abTestProperties); } }
Source:
<code>protected void writeHeader(List<LogEntry> entity, CSVPrinter printer) throws IOException { <START> LogEntryCSVWriter writer = (LogEntryCSVWriter) registry.getWriter(ctx, LogEntry.class, TEXT_CSV_TYPE); <END> writer.writeHeader(printer); }</code><technical_language>I I prefer a static method LogEntryCSVWriter writing header a writer registry... java LogEntryCSVWriter.writeHeader(ctx, printer);</technical_language>

Target:
protected void writeHeader(List<LogEntry> entity, CSVPrinter printer) throws IOException { LogEntryCSVWriter.writeHeader(printer, ctx); }
Source:
<code>public DiscoveryResult discover(GitInfo gitInfo) throws IOException { GHRepository repository = gitHubHelper.repositoryFor(gitInfo); GHTree tree = gitHubHelper.treeFor(repository, gitInfo); Set<String> staticConfigs = new HashSet<>(); for (GHTreeEntry entry : tree.getTree()) { if (isStaticConfig(entry.getPath())) { staticConfigs.add(entry.getPath()); } } Set<DiscoveredModule> modules = new HashSet<>(); Set<MalformedFile> malformedFiles = new HashSet<>(); for (String config : staticConfigs) { String contents = gitHubHelper.contentsFor(config, repository, gitInfo); <START> StaticConfig configObject = objectMapper.readValue(contents, StaticConfig.class); <END> String moduleDirectory = Paths.get(config).getParent().toString(); String glob = (moduleDirectory.contains("/") ? moduleDirectory.substring(0, moduleDirectory.lastIndexOf('/') + 1) : "") + "**"; modules.add(new DiscoveredModule(configObject.getName(), "hs-static", moduleDirectory, glob, BUILD_CONFIGURATION, makeDeps(configObject))); } return new DiscoveryResult(modules, malformedFiles); }</code><technical_language>add a malformed file if this parsing fails</technical_language>

Target:
public DiscoveryResult discover(GitInfo gitInfo) throws IOException { GHRepository repository = gitHubHelper.repositoryFor(gitInfo); GHTree tree = gitHubHelper.treeFor(repository, gitInfo); Set<String> staticConfigs = new HashSet<>(); for (GHTreeEntry entry : tree.getTree()) { if (isStaticConfig(entry.getPath())) { staticConfigs.add(entry.getPath()); } } Set<DiscoveredModule> modules = new HashSet<>(); Set<MalformedFile> malformedFiles = new HashSet<>(); for (String path : staticConfigs) { String contents = gitHubHelper.contentsFor(path, repository, gitInfo); String moduleDirectory = Paths.get(path).getParent().toString(); String glob = (moduleDirectory.contains("/") ? moduleDirectory.substring(0, moduleDirectory.lastIndexOf('/') + 1) : "") + "**"; Set<String> depends = new HashSet<>(); Set<String> provides = new HashSet<>(); StaticConfig configObject; try { configObject = objectMapper.readValue(contents, StaticConfig.class); } catch (IOException e) { LOG.error("Error parsing static_conf.json at path for repo {}@{}", path, gitInfo.getFullRepositoryName(), gitInfo.getBranch()); malformedFiles.add(new MalformedFile(gitInfo.getId().get(), "hs-static", path, Throwables.getStackTraceAsString(e))); continue; } for (Map.Entry<String, Integer> entry: configObject.getDeps().entrySet()) { depends.add(String.format("%s-%d", entry.getKey(), entry.getValue())); } for (Map.Entry<String, Integer> entry : configObject.getRuntimeDeps().entrySet()) { depends.add(String.format("%s-%d", entry.getKey(), entry.getValue())); } provides.add(String.format("%s-%d", configObject.getName(), configObject.getMajorVersion())); modules.add(new DiscoveredModule(configObject.getName(), "hs-static", moduleDirectory, glob, BUILD_CONFIGURATION, new DependencyInfo(depends, provides))); } return new DiscoveryResult(modules, malformedFiles); }
Source:
<code>public void setFields(StructDefinition fields) { <START> this.fFields = fields; <END> }</code><technical_language>this</technical_language>

Target:
public void setFields(StructDefinition fields) { fFields = fields; }
Source:
<code>public void onError(Throwable e) { if (done) { <START> return; <END> } done = true; try { actual.onError(e); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); RxJavaHooks.onError(e); throw new OnErrorFailedException(new CompositeException(e, ex)); } }</code><technical_language>moved here</technical_language>

Target:
public void onError(Throwable e) { if (done) { RxJavaHooks.onError(e); return; } done = true; try { actual.onError(e); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); throw new OnErrorFailedException(new CompositeException(e, ex)); } }
Source:
<code>public void handle(ModelRun modelRun) { int diseaseGroupId = modelRun.getDiseaseGroupId(); <START> modelRunWorkflowService.generateDiseaseExtent(diseaseGroupId); <END> }</code><technical_language>I remember this happen if automatic model runs enabled - check "weekly process" "new disease model" diagrams Catherine</technical_language>

Target:
public void handle(ModelRun modelRun) { int diseaseGroupId = modelRun.getDiseaseGroupId(); DiseaseGroup diseaseGroup = diseaseService.getDiseaseGroupById(diseaseGroupId); if (diseaseGroup.isAutomaticModelRunsEnabled()) { modelRunWorkflowService.generateDiseaseExtent(diseaseGroup); } }
Source:
<code>private void checkPlan(String sql) { sql = sql.replaceAll(";$", ""); try { if (VoltFastSqlParser.parse(sql).isA(SqlKind.DDL)) { return; } } catch (SqlParseException e) { return; } try { if (!CALCITE_CHECKS.check(sql)) { return; } } catch (SqlParseException e) { return; <START> } <END> CompiledPlan calcitePlan; CompiledPlan voltdbPlan; try { calcitePlan = compileAdHocCalcitePlan(sql, true, true, DeterminismMode.SAFER); } catch (Exception e) { return; } try { voltdbPlan = compileAdHocPlan(sql, true, true); } catch (Exception e) { return; } comparePlanTree(calcitePlan.rootPlanGraph, voltdbPlan.rootPlanGraph, sql); if (calcitePlan.subPlanGraph != null && voltdbPlan.subPlanGraph != null) { comparePlanTree(calcitePlan.subPlanGraph, voltdbPlan.subPlanGraph, sql); } else if (calcitePlan.subPlanGraph != null || voltdbPlan.subPlanGraph != null) { fail(String.format("Two-part MP plans mismatch.\n\nVoltDB plan: %s\n\nCalcite plan:%s\n", voltdbPlan.subPlanGraph.toExplainPlanString(), calcitePlan.subPlanGraph.toExplainPlanString())); } try { compareCompiledPlans(calcitePlan, voltdbPlan); } catch (AssertionError ae) { System.err.println(sql); System.err.println(ae.getMessage()); } }</code><technical_language>2 try/catch blocks combined 1</technical_language>

Target:
private void checkPlan(String sql) { sql = sql.replaceAll(";$", ""); try { if (VoltFastSqlParser.parse(sql).isA(SqlKind.DDL)) { return; } if (!CALCITE_CHECKS.check(sql)) { return; } } catch (SqlParseException e) { return; } CompiledPlan calcitePlan; CompiledPlan voltdbPlan; try { calcitePlan = compileAdHocCalcitePlan(sql, true, true, DeterminismMode.SAFER); voltdbPlan = compileAdHocPlan(sql, true, true); } catch (Exception e) { return; } comparePlanTree(calcitePlan.rootPlanGraph, voltdbPlan.rootPlanGraph, sql); if (calcitePlan.subPlanGraph != null && voltdbPlan.subPlanGraph != null) { comparePlanTree(calcitePlan.subPlanGraph, voltdbPlan.subPlanGraph, sql); } else if (calcitePlan.subPlanGraph != null || voltdbPlan.subPlanGraph != null) { fail(String.format("Two-part MP plans mismatch.\n\nVoltDB plan: %s\n\nCalcite plan:%s\n", voltdbPlan.subPlanGraph.toExplainPlanString(), calcitePlan.subPlanGraph.toExplainPlanString())); } try { compareCompiledPlans(calcitePlan, voltdbPlan); } catch (AssertionError ae) { System.err.println(sql); System.err.println(ae.getMessage()); } }
Source:
<code>public Object combine(Object lhs, Object rhs) { <START> return (((SerializablePair<Long, Long>) lhs).lhs <= ((SerializablePair<Long, Long>) rhs).lhs) ? lhs : rhs; <END> }</code><technical_language>static comparator</technical_language>

Target:
public Object combine(Object lhs, Object rhs) { return DoubleFirstAggregatorFactory.TIME_COMPARATOR.compare(lhs, rhs) <= 0 ? lhs : rhs; }
Source:
<code>public void onSitePluginVersionUpdated(PluginStore.OnSitePluginVersionUpdated event) { if (event.isError()) { <START> AppLog.e(AppLog.T.API, "An error occurred while updating the plugin version with type: " <END> + event.error.type); return; } mPlugin = mPluginStore.getSitePluginByName(mSite, mPlugin.getName()); refreshViews(); }</code><technical_language>alert user error occurred here</technical_language>

Target:
public void onSitePluginVersionUpdated(PluginStore.OnSitePluginVersionUpdated event) { if (event.isError()) { AppLog.e(AppLog.T.API, "An error occurred while updating the plugin version with type: " + event.error.type); return; } mPlugin = mPluginStore.getSitePluginByName(mSite, mPlugin.getName()); if (mPlugin == null) { ToastUtils.showToast(this, R.string.plugin_not_found, Duration.SHORT); finish(); return; } refreshViews(); }
Source:
<code>public OmCalendar getCalendarbyId(Long calId){ return em.createNamedQuery("getCalendarbyId", OmCalendar.class) .setParameter("calId", calId) <START> .getSingleResult(); <END> }</code><technical_language>This throw NoResultException in case calendar calId is in DB, need handled properly</technical_language>

Target:
public OmCalendar getCalendarbyId(Long calId) { TypedQuery<OmCalendar> query = em.createNamedQuery("getCalendarbyId", OmCalendar.class) .setParameter("calId", calId); OmCalendar calendar = null; try { calendar = query.getSingleResult(); } catch (NoResultException e) { } return calendar; }
Source:
<code>public Path toPath() { Path result = filePath; if (result == null) { synchronized (this) { result = filePath; if (result == null) { try { Method getDefaultMethod; try { getDefaultMethod = Class.forName("java.nio.file.FileSystems") .getDeclaredMethod("getDefault"); } catch (ClassNotFoundException e) { throw new LibraryNotLinkedError("Get default FileSystem", <START> "jre_file", "java.nio.file.FileSystems"); <END> } Object fileSystem = getDefaultMethod.invoke(null); Method getPathMethod; try { getPathMethod = Class.forName("java.nio.file.FileSystem") .getDeclaredMethod("getPath", String.class); } catch (ClassNotFoundException e) { throw new LibraryNotLinkedError("Get path of FileSystem", "jre_file", "java.nio.file.FileSystem"); } result = (Path) getPathMethod.invoke(fileSystem, path); filePath = result; } catch (Exception e) { throw new AssertionError(e); } } } } return result; }</code><technical_language>parameter library subset missing, "java.nio.file support" is more general. parameter needs camel-cased (so "JavaNioFileFileSystems"). This is missing symbol name reported a linker error</technical_language>

Target:
public Path toPath() { Path result = filePath; if (result == null) { synchronized (this) { result = filePath; if (result == null) { try { Method getDefaultMethod; try { getDefaultMethod = Class.forName("java.nio.file.FileSystems") .getDeclaredMethod("getDefault"); } catch (ClassNotFoundException e) { throw new LibraryNotLinkedError("java.nio.file support", "jre_file", "JavaNioFileFileSystems"); } Object fileSystem = getDefaultMethod.invoke(null); Method getPathMethod; try { getPathMethod = Class.forName("java.nio.file.FileSystem") .getDeclaredMethod("getPath", String.class); } catch (ClassNotFoundException e) { throw new LibraryNotLinkedError("java.nio.file support", "jre_file", "JavaNioFileFileSystem"); } result = (Path) getPathMethod.invoke(fileSystem, path); filePath = result; } catch (Exception e) { throw new AssertionError(e); } } } } return result; }
Source:
<code>public void locationUnbind() { <START> sContext.unbindService(sConnection); <END> }</code><technical_language>Other initialization steps failed before. if (mConnection != null) { mContext.unbindService(sConnection); }</technical_language>

Target:
public void locationUnbind() { if (mConnection != null) { sContext.unbindService(mConnection); } }
Source:
<code>public MessageConsumerFactory<KafkaConsumer> messageConsumerFactory() { <START> return new KafkaMessageConsumerFactory(zookeeper, messagingSystem, backOffIntervalMillis, maxBackOffMillis); <END> }</code><technical_language>This a Duration a Long</technical_language>

Target:
public MessageConsumerFactory<KafkaConsumer> messageConsumerFactory() { return new KafkaMessageConsumerFactory( zookeeper, messagingSystem, Duration.millis(backOffIntervalMillis), Duration.millis(maxBackOffMillis) ); }
Source:
<code>private StreamStoreDefinitionBuilder hashFirstNRowComponents(int numberOfComponentsHashed) { <START> Preconditions.checkArgument(numberOfComponentsHashed <= 2, <END> "Can't hash more than two row components for StreamStore."); streamTables.forEach((tableName, streamTableBuilder) -> streamTableBuilder.hashFirstNRowComponents(numberOfComponentsHashed)); return this; }</code><technical_language>Why? I imagine min number of row components of streamTables is 2. a more generic check this tableDef level</technical_language>

Target:
private StreamStoreDefinitionBuilder hashFirstNRowComponents(int numberOfComponentsHashed) { Preconditions.checkArgument(numberOfComponentsHashed <= 2, "The number of components specified must be less than two as " + "StreamStore internal tables use at most two row components."); streamTables.forEach((tableName, streamTableBuilder) -> streamTableBuilder.hashFirstNRowComponents(numberOfComponentsHashed)); return this; }
Source:
<code>public void stop() { log.debugf("Stopping %s (%s)", this, lock); lock.lock(); try { <START> CompletableFuture[] futures = clientListeners.keySet().stream().map(counterName -> <END> factory.newRemoveListenerOperation(counterName, listenerId, dispatcher.address()).execute()) .toArray(CompletableFuture[]::new); await(CompletableFuture.allOf(futures)); } finally { lock.unlock(); } }</code><technical_language>Is issue clientListeners cleared more</technical_language>

Target:
public void stop() { log.debugf("Stopping %s (%s)", this, lock); lock.lock(); try { CompletableFuture[] futures = clientListeners.keySet().stream().map(counterName -> factory.newRemoveListenerOperation(counterName, listenerId, dispatcher.address()).execute()) .toArray(CompletableFuture[]::new); await(CompletableFuture.allOf(futures)); clientListeners.clear(); } finally { lock.unlock(); } }
Source:
<code><START> public UploadRequest build() throws BridgeSDKException { <END> if (StringUtils.isBlank(name)) { throw new BridgeSDKException("name cannot be blank"); } if (contentLength < 0) { throw new BridgeSDKException("content length cannot be negative"); } if (StringUtils.isBlank(contentMd5)) { throw new BridgeSDKException("contentMd5 cannot be blank"); } if (StringUtils.isBlank(contentType)) { throw new BridgeSDKException("contentType cannot be blank"); } return new UploadRequest(name, contentLength, contentMd5, contentType); }</code><technical_language>I this throw InvalidEntityException, emphasize SDK users constructed wrong, SDK error. validation in other builder</technical_language>

Target:
public UploadRequest build() throws InvalidEntityException { if (StringUtils.isBlank(name)) { throw new InvalidEntityException("name cannot be blank"); } if (contentLength < 0) { throw new InvalidEntityException("content length cannot be negative"); } if (StringUtils.isBlank(contentMd5)) { throw new InvalidEntityException("contentMd5 cannot be blank"); } if (StringUtils.isBlank(contentType)) { throw new InvalidEntityException("contentType cannot be blank"); } return new UploadRequest(name, contentLength, contentMd5, contentType); }
Source:
<code>public void start() throws Exception { System.out.println("[Main] Running in " + Thread.currentThread().getName()); <START> getVertx() <END> .deployVerticle("io.vertx.example.core.verticle.worker.WorkerVerticle", new DeploymentOptions().setWorker(true)); getVertx().eventBus().send( "sample.data", "hello vert.x", r -> { System.out.println("[Main] Receiving reply ' " + r.result().body().toString() + "' in " + Thread.currentThread().getName()); } ); }</code><technical_language>a cleaner vertx instead of getVertx()</technical_language>

Target:
public void start() throws Exception { System.out.println("[Main] Running in " + Thread.currentThread().getName()); vertx .deployVerticle("io.vertx.example.core.verticle.worker.WorkerVerticle", new DeploymentOptions().setWorker(true)); vertx.eventBus().send( "sample.data", "hello vert.x", r -> { System.out.println("[Main] Receiving reply ' " + r.result().body().toString() + "' in " + Thread.currentThread().getName()); } ); }
Source:
<code>public void testGfshClearRegionWithOverflow() throws InterruptedException { createPartitionRedundantPersistentOverflowRegion(); populateRegion(); assertRegionSize(NUM_ENTRIES); gfsh.executeAndAssertThat("clear region --name=" + OVERFLOW_REGION_NAME).statusIsSuccess(); assertRegionSize(0); restartServers(); assertRegionSize(0); <START> destroyRegion(); <END> destroyDiskStore(DiskStoreFactory.DEFAULT_DISK_STORE_NAME); }</code><technical_language>I need a tearDown method ensure Locator Servers stopped in VM if tests failed. move destroyRegion destroyDiskStore tearDown (or remove them?). Close clients 1st, servers, locator (see order of VMs in Arrays.asList): @After public void tearDown() throws Exception { for (VM vm : Arrays.asList(getVM(4), getVM(3), getVM(2), getVM(1), getVM(0)) { vm.invoke(() -> { if (clientCache != null) { clientCache.close(); } if (LOCATOR_LAUNCHER.get() != null) { LOCATOR_LAUNCHER.get().stop(); } if (SERVER_LAUNCHER.get() != null) { SERVER_LAUNCHER.get().stop(); } clientCache = null; LOCATOR_LAUNCHER.set(null); SERVER_LAUNCHER.set(null); } } } need hoist (such clientCache) a private static field/var in test class reference tearDown() close it</technical_language>

Target:
public void testGfshClearRegionWithOverflow() throws InterruptedException { createPartitionRedundantPersistentOverflowRegion(); populateRegion(); assertRegionSize(NUM_ENTRIES); gfsh.executeAndAssertThat("clear region --name=" + OVERFLOW_REGION_NAME).statusIsSuccess(); assertRegionSize(0); restartServers(); assertRegionSize(0); }
Source:
<code><START> static UserPhotoDto createInstance(UserPhoto entity) <END> { return new UserPhotoDto(entity.getId(), entity.getPngBytes()); }</code><technical_language>Move this down, nonstatic methods</technical_language>

Target:
static UserPhotoDto createInstance(UserPhoto entity) { return new UserPhotoDto(Optional.of(entity.getId()), entity.getPngBytes()); }
Source:
<code>public AttributesRule(String pattern, String attributes) { this.attributes = parseAttributes(attributes); nameOnly = false; dirOnly = false; int endIndex = pattern.length(); <START> if (pattern.endsWith("/")) { END> endIndex--; dirOnly = true; } String pattern2 = pattern.substring(0, endIndex); boolean hasSlash = pattern2.contains("/"); if (!hasSlash) nameOnly = true; else if (!pattern2.startsWith("/")) { pattern2 = "/" + pattern2; } try { matcher = PathMatcher.createPathMatcher(pattern2, Character.valueOf(FastIgnoreRule.PATH_SEPARATOR), dirOnly); } catch (InvalidPatternException e) { matcher = NO_MATCH; } this.pattern = pattern2; }</code><technical_language>mess-around endIndex pattern2 - set pattern = pattern.substring(0, pattern.length() - 1) in this if() block do-away other variables</technical_language>

Target:
public AttributesRule(String pattern, String attributes) { this.attributes = parseAttributes(attributes); nameOnly = false; dirOnly = false; if (pattern.endsWith("/")) { pattern = pattern.substring(0, pattern.length() - 1); dirOnly = true; } boolean hasSlash = pattern.contains("/"); if (!hasSlash) nameOnly = true; else if (!pattern.startsWith("/")) { pattern = "/" + pattern; } try { matcher = PathMatcher.createPathMatcher(pattern, Character.valueOf(FastIgnoreRule.PATH_SEPARATOR), dirOnly); } catch (InvalidPatternException e) { matcher = NO_MATCH; } this.pattern = pattern; }
Source:
<code>public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); try { final Bundle bundle = getArguments(); courseData = (EnrolledCoursesResponse) bundle .getSerializable(CourseData); if ( courseData == null ) return; final String headerImageUrl = courseData.getCourse().getCourse_image(environment.getConfig()); final ImageView headerImageView = (ImageView)getView().findViewById(R.id.header_image_view); Glide.with(CourseDashboardFragment.this) .load(headerImageUrl) <START> .skipMemoryCache(true) <END> .transform(new TopAnchorWidthFillTransformation(getActivity())) .into(headerImageView); courseTextName.setText(courseData.getCourse().getName()); CourseEntry course = courseData.getCourse(); courseTextDetails.setText( course.getDescription(this.getActivity())); } catch (Exception ex) { logger.error(ex); } }</code><technical_language>skip memory cache</technical_language>

Target:
public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); try { final Bundle bundle = getArguments(); courseData = (EnrolledCoursesResponse) bundle .getSerializable(CourseData); if ( courseData == null ) return; final String headerImageUrl = courseData.getCourse().getCourse_image(environment.getConfig()); Glide.with(CourseDashboardFragment.this) .load(headerImageUrl) .placeholder(R.drawable.edx_map_login) .transform(new TopAnchorFillWidthTransformation(getActivity())) .into(headerImageView); courseTextName.setText(courseData.getCourse().getName()); CourseEntry course = courseData.getCourse(); courseTextDetails.setText(course.getDescription(getActivity())); } catch (Exception ex) { logger.error(ex); } }
Source:
<code>public void nack() { try { amazonSQS.changeMessageVisibility(queueUrl, message.getReceiptHandle(), 0); log.debug("Changed visibility timeout of message: from queue: {}", message.getMessageId(), queueUrl); } catch (ReceiptHandleIsInvalidException e) { <START> log.warn("Error nack-ing message: {}, reason: (receiptHandle: {})", <END> message.getMessageId(), e.getMessage(), message.getReceiptHandle() ); } }</code><technical_language>want queue url in</technical_language>

Target:
public void nack() { try { amazonSQS.changeMessageVisibility(queueUrl, message.getReceiptHandle(), 0); log.debug("Changed visibility timeout of message: from queue: {}", message.getMessageId(), queueUrl); registry.counter(getFailedMetricId(subscriptionName)).increment(); } catch (ReceiptHandleIsInvalidException e) { log.warn("Error nack-ing message: {}, queue: {}, reason: (receiptHandle: {})", message.getMessageId(), queueUrl, e.getMessage(), message.getReceiptHandle() ); } }