auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ResponseEntity<?> commitCursors(@PathVariable("subscriptionId") final String subscriptionId, @Valid @RequestBody final ItemsWrapper<SubscriptionCursor> cursorsIn, @NotNull @RequestHeader("X-Nakadi-StreamId") final String streamId, final HttpServletRequest request, final Client client) throws NoSuchEventTypeException, NoSuchSubscriptionException, InvalidCursorException, ServiceTemporarilyUnavailableException, InternalNakadiException { final List<NakadiCursor> cursors = convertToNakadiCursors(cursorsIn); if (cursors.isEmpty()) { throw new CursorsAreEmptyException(); } <START> final Span commitSpan = TracingService.activateSpan(request, false) <END> .setOperationName("commit_events"); if (blacklistService.isSubscriptionConsumptionBlocked(subscriptionId, client.getClientId())) { TracingService.logErrorInSpan(commitSpan, "Application or subscription is blocked"); throw new BlockedException("Application or subscription is blocked"); } final List<Boolean> items = cursorsService.commitCursors(streamId, subscriptionId, cursors, commitSpan); final boolean allCommitted = items.stream().allMatch(item -> item); if (allCommitted) { return noContent().build(); } else { final List<CursorCommitResult> body = IntStream.range(0, cursorsIn.getItems().size()) .mapToObj(idx -> new CursorCommitResult(cursorsIn.getItems().get(idx), items.get(idx))) .collect(Collectors.toList()); return ok(new ItemsWrapper<>(body)); } }</code><technical_language>avoid completely span activation ? I do reason do it, start in filter</technical_language>

Target:
public ResponseEntity<?> commitCursors(@PathVariable("subscriptionId") final String subscriptionId, @Valid @RequestBody final ItemsWrapper<SubscriptionCursor> cursorsIn, @NotNull @RequestHeader("X-Nakadi-StreamId") final String streamId, final HttpServletRequest request, final Client client) throws NoSuchEventTypeException, NoSuchSubscriptionException, InvalidCursorException, ServiceTemporarilyUnavailableException, InternalNakadiException { final List<NakadiCursor> cursors = convertToNakadiCursors(cursorsIn); if (cursors.isEmpty()) { throw new CursorsAreEmptyException(); } final Span commitSpan = TracingService.extractSpan(request, "commit_events"); if (blacklistService.isSubscriptionConsumptionBlocked(subscriptionId, client.getClientId())) { TracingService.logErrorInSpan(commitSpan, "Application or subscription is blocked"); throw new BlockedException("Application or subscription is blocked"); } final List<Boolean> items = cursorsService.commitCursors(streamId, subscriptionId, cursors, commitSpan); final boolean allCommitted = items.stream().allMatch(item -> item); if (allCommitted) { return noContent().build(); } else { final List<CursorCommitResult> body = IntStream.range(0, cursorsIn.getItems().size()) .mapToObj(idx -> new CursorCommitResult(cursorsIn.getItems().get(idx), items.get(idx))) .collect(Collectors.toList()); return ok(new ItemsWrapper<>(body)); } }
Source:
<code>public void toArchivedFlownodeInstance_should_convert_reachStateDate_for_gateways() throws Exception { final FlowNodeStateManager flowNodeStateManager = mock(FlowNodeStateManager.class); doReturn(mock(FlowNodeState.class)).when(flowNodeStateManager).getState(anyInt()); <START> assertThat(ModelConvertor.toArchivedFlowNodeInstance(new SAGatewayInstanceImpl(), flowNodeStateManager).getReachedStateDate()).isNotNull(); <END> }</code><technical_language>null check?maybe check a reachedStateDate != lastUpdateDate</technical_language>

Target:
public void toArchivedFlownodeInstance_should_convert_reachStateDate_for_gateways() throws Exception { final FlowNodeStateManager flowNodeStateManager = mock(FlowNodeStateManager.class); doReturn(mock(FlowNodeState.class)).when(flowNodeStateManager).getState(anyInt()); final SAGatewayInstanceImpl saFlowNode = new SAGatewayInstanceImpl(); final long reachedStateDate = 4534311114L; saFlowNode.setReachedStateDate(reachedStateDate); assertThat(ModelConvertor.toArchivedFlowNodeInstance(saFlowNode, flowNodeStateManager).getReachedStateDate()).isEqualTo(new Date(reachedStateDate)); }
Source:
<code>public void testClusteredCacheWithXA() throws Exception { TransactionManagerServices.getConfiguration().setJournal("null"); BitronixTransactionManager transactionManager = TransactionManagerServices.getTransactionManager(); try { CacheManagerBuilder.newCacheManagerBuilder() .using(new LookupTransactionManagerProviderConfiguration(BitronixTransactionManagerLookup.class)) .with(ClusteringServiceConfigurationBuilder.cluster(URI.create("terracotta://localhost/my-application")).autoCreate(c -> c)) .withCache("xaCache", CacheConfigurationBuilder.newCacheConfigurationBuilder(Long.class, String.class, ResourcePoolsBuilder.newResourcePoolsBuilder() .with(ClusteredResourcePoolBuilder.clusteredDedicated("primary-server-resource", 8, MemoryUnit.MB)) ) .withService(new XAStoreConfiguration("xaCache")) .build() ) <START> .build(true).close(); <END> } catch (StateTransitionException e) { assertThat(e.getCause().getCause().getMessage(), is("Unsupported resource type : interface org.ehcache.clustered.client.config.DedicatedClusteredResourcePool")); } transactionManager.shutdown(); }</code><technical_language>A couple of ... is this test missing a fail? StateTransitionException thrown PersistentCacheManager.build meaning close called? this a try-with-resources</technical_language>

Target:
public void testClusteredCacheWithXA() throws Exception { TransactionManagerServices.getConfiguration().setJournal("null"); BitronixTransactionManager transactionManager = TransactionManagerServices.getTransactionManager(); try { CacheManagerBuilder.newCacheManagerBuilder() .using(new LookupTransactionManagerProviderConfiguration(BitronixTransactionManagerLookup.class)) .with(ClusteringServiceConfigurationBuilder.cluster(URI.create("terracotta://localhost/my-application")).autoCreate(c -> c)) .withCache("xaCache", CacheConfigurationBuilder.newCacheConfigurationBuilder(Long.class, String.class, ResourcePoolsBuilder.newResourcePoolsBuilder() .with(ClusteredResourcePoolBuilder.clusteredDedicated("primary-server-resource", 8, MemoryUnit.MB)) ) .withService(new XAStoreConfiguration("xaCache")) .build() ) .build(true).close(); fail("Expected StateTransitionException"); } catch (StateTransitionException e) { assertThat(e.getCause().getCause().getMessage(), is("Unsupported resource type : interface org.ehcache.clustered.client.config.DedicatedClusteredResourcePool")); } transactionManager.shutdown(); }
Source:
<code>private static int buildHashCode(ConstraintLocation delegate, TypeVariable<?> typeParameter) { <START> int result = delegate != null ? delegate.hashCode() : 0; <END> result = 31 * result + typeParameter.hashCode(); return result; }</code><technical_language>agree null check delegate needed (sambe above)</technical_language>

Target:
private static int buildHashCode(ConstraintLocation delegate, TypeVariable<?> typeParameter) { int result = delegate.hashCode(); result = 31 * result + typeParameter.hashCode(); return result; }
Source:
<code>public void testIndexStateOnException() throws Exception { if (localIndex || useSnapshot || useViewIndex) { return; } String schemaName = generateUniqueName(); String dataTableName = generateUniqueName(); String dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName); String indexTableName = generateUniqueName(); String indexFullName = SchemaUtil.getTableName(schemaName, indexTableName); Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); try (Connection conn = DriverManager.getConnection(getUrl(), props)){ Statement stmt = conn.createStatement(); stmt.execute(String.format( "CREATE TABLE %s (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR, ZIP INTEGER) %s", dataTableFullName, tableDDLOptions)); stmt.execute(String.format( "UPSERT INTO %s VALUES(1, 'Phoenix', 12345)", dataTableFullName)); conn.commit(); IndexRegionObserver.setIgnoreIndexRebuildForTesting(true); stmt.execute(String.format( "CREATE INDEX %s ON %s (NAME) INCLUDE (ZIP) ASYNC", indexTableName, dataTableFullName)); assertFalse(checkIndexState(conn, indexFullName, PIndexState.ACTIVE, 0L)); IndexToolIT.runIndexTool(true, false, schemaName, dataTableName, indexTableName, null, -1, IndexTool.IndexVerifyType.AFTER); IndexRegionObserver.setIgnoreIndexRebuildForTesting(false); <START> assertFalse(checkIndexState(conn, indexFullName, PIndexState.ACTIVE, 0L)); <END> } }</code><technical_language>Is a test verify Active state in sunny case</technical_language>

Target:
public void testIndexStateOnException() throws Exception { if (localIndex || useSnapshot || useViewIndex) { return; } String schemaName = generateUniqueName(); String dataTableName = generateUniqueName(); String dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName); String indexTableName = generateUniqueName(); String indexFullName = SchemaUtil.getTableName(schemaName, indexTableName); Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); try (Connection conn = DriverManager.getConnection(getUrl(), props)){ Statement stmt = conn.createStatement(); stmt.execute(String.format( "CREATE TABLE %s (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR, ZIP INTEGER) %s", dataTableFullName, tableDDLOptions)); stmt.execute(String.format( "UPSERT INTO %s VALUES(1, 'Phoenix', 12345)", dataTableFullName)); conn.commit(); IndexRegionObserver.setIgnoreIndexRebuildForTesting(true); stmt.execute(String.format( "CREATE INDEX %s ON %s (NAME) INCLUDE (ZIP) ASYNC", indexTableName, dataTableFullName)); assertFalse(checkIndexState(conn, indexFullName, PIndexState.ACTIVE, 0L)); IndexToolIT.runIndexTool(true, false, schemaName, dataTableName, indexTableName, null, -1, IndexTool.IndexVerifyType.AFTER); IndexRegionObserver.setIgnoreIndexRebuildForTesting(false); assertFalse(checkIndexState(conn, indexFullName, PIndexState.ACTIVE, 0L)); IndexToolIT.runIndexTool(true, false, schemaName, dataTableName, indexTableName, null, 0, IndexTool.IndexVerifyType.AFTER); assertTrue(checkIndexState(conn, indexFullName, PIndexState.ACTIVE, 0L)); } }
Source:
<code>private byte[] inflateAndReturn(final Source src, final long inflatedSize) throws IOException { ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream((int)inflatedSize); inflate(src, inflatedSize, byteArrayOutputStream ); <START> return byteArrayOutputStream.toByteArray(); <END> }</code><technical_language>This creates a copy of data, means copying data twice. this code is part of loop of IndexPack I avoid copying properly allocating output buffer writing directly. a variant of ByteArrayOutputStream written put jgit.util.io</technical_language>

Target:
private byte[] inflateAndReturn(final Source src, final long inflatedSize) throws IOException { final byte[] dst = new byte[(int) inflatedSize]; final InputStream inf = inflate(src, inflatedSize); IO.readFully(inf, dst, 0, dst.length); inf.close(); return dst; }
Source:
<code>protected void registerRuntime(Runtime runtime) { try { runtimeManager.registerRuntime(runtime); <START> StartupServiceUtils.updateServiceCache("carbon-runtime-mgt", Runtime.class, runtime); <END> } catch (Exception e) { logger.error("Error while adding runtime to the Runtime manager", e); } }</code><technical_language>a constant for string places</technical_language>

Target:
protected void registerRuntime(Runtime runtime) { try { runtimeManager.registerRuntime(runtime); StartupServiceUtils.updateServiceCache(COMPONENT_NAME, Runtime.class); } catch (Exception e) { logger.error("Error while adding runtime to the Runtime manager", e); } }
Source:
<code>public String addJob(JobModel job, String processId) throws RegistryException { CompositeIdentifier cis = new CompositeIdentifier(job.getTaskId(), job.getJobId()); String jobId = saveJobModelData(job, cis); String taskId = (String) cis.getTopLevelIdentifier(); job.setProcessId(processId); <START> job.setTaskId(taskId); <END> TaskRepository taskRepository = new TaskRepository(); TaskModel taskModel = taskRepository.getTask(taskId); List<JobModel> jobModelList = taskModel.getJobs(); if (jobModelList != null && !jobModelList.contains(job)) { logger.debug("Adding the Job to the list"); jobModelList.add(job); taskModel.setJobs(jobModelList); taskRepository.updateTask(taskModel, taskId); } return jobId; }</code><technical_language>missing this necessary</technical_language>

Target:
public String addJob(JobModel job, String processId) throws RegistryException { JobPK jobPK = new JobPK(); jobPK.setJobId(job.getJobId()); jobPK.setTaskId(job.getTaskId()); String jobId = saveJobModelData(job, jobPK); return jobId; }
Source:
<code><START> public static double greatCircleDistance(@SqlType(StandardTypes.DOUBLE) double latitude1, @SqlType(StandardTypes.DOUBLE) double longitude1, @SqlType(StandardTypes.DOUBLE) double latitude2, @SqlType(StandardTypes.DOUBLE) double longitude2) <END> { checkLatitude(latitude1); checkLongitude(longitude1); checkLatitude(latitude2); checkLongitude(longitude2); latitude1 = Math.toRadians(latitude1); longitude1 = Math.toRadians(longitude1); latitude2 = Math.toRadians(latitude2); longitude2 = Math.toRadians(longitude2); double deltaLongitude = longitude1 - longitude2; double t1 = Math.cos(latitude2) * Math.sin(deltaLongitude); double t2 = Math.cos(latitude1) * Math.sin(latitude2) - Math.sin(latitude1) * Math.cos(latitude2) * Math.cos(deltaLongitude); double t3 = Math.sin(latitude1) * Math.sin(latitude2) + Math.cos(latitude1) * Math.cos(latitude2) * Math.cos(deltaLongitude); double angularDistance = Math.atan2(Math.sqrt(t1 * t1 + t2 * t2), t3); return angularDistance * EARTH_RADIUS_KM; }</code><technical_language>This line is long: @ScalarFunction @Description("Calculates great-circle distance points Earth's surface") @SqlType(StandardTypes.DOUBLE) public static double greatCircleDistance( @SqlType(StandardTypes.DOUBLE) double latitude1, @SqlType(StandardTypes.DOUBLE) double longitude1, @SqlType(StandardTypes.DOUBLE) double latitude2, @SqlType(StandardTypes.DOUBLE) double longitude2)</technical_language>

Target:
public static double greatCircleDistance( @SqlType(StandardTypes.DOUBLE) double latitude1, @SqlType(StandardTypes.DOUBLE) double longitude1, @SqlType(StandardTypes.DOUBLE) double latitude2, @SqlType(StandardTypes.DOUBLE) double longitude2) { checkLatitude(latitude1); checkLongitude(longitude1); checkLatitude(latitude2); checkLongitude(longitude2); double radianLatitude1 = toRadians(latitude1); double radianLatitude2 = toRadians(latitude2); double sin1 = sin(radianLatitude1); double cos1 = cos(radianLatitude1); double sin2 = sin(radianLatitude2); double cos2 = cos(radianLatitude2); double deltaLongitude = toRadians(longitude1) - toRadians(longitude2); double cosDeltaLongitude = cos(deltaLongitude); double t1 = cos2 * sin(deltaLongitude); double t2 = cos1 * sin2 - sin1 * cos2 * cosDeltaLongitude; double t3 = sin1 * sin2 + cos1 * cos2 * cosDeltaLongitude; return atan2(sqrt(t1 * t1 + t2 * t2), t3) * EARTH_RADIUS_KM; }
Source:
<code>private boolean servicesAreBeingProvided(PaymentWorksVendor pmwVendor) { return (StringUtils.isNotBlank(pmwVendor.getServicesProvided()) && (StringUtils.equalsIgnoreCase(pmwVendor.getServicesProvided(), PaymentWorksConstants.PaymentWorksGoodsVsServicesOptions.SERVICES.getOptionValueAsString()) <START> | StringUtils.equalsIgnoreCase(pmwVendor.getServicesProvided(), PaymentWorksConstants.PaymentWorksGoodsVsServicesOptions.GOODS_WITH_SERVICES.getOptionValueAsString()))); <END> }</code><technical_language>This operator changed a bitwise a logical OR</technical_language>

Target:
private boolean servicesAreBeingProvided(PaymentWorksVendor pmwVendor) { return (StringUtils.isNotBlank(pmwVendor.getServicesProvided()) && (StringUtils.equalsIgnoreCase(pmwVendor.getServicesProvided(), PaymentWorksConstants.PaymentWorksGoodsVsServicesOptions.SERVICES.getOptionValueAsString()) || StringUtils.equalsIgnoreCase(pmwVendor.getServicesProvided(), PaymentWorksConstants.PaymentWorksGoodsVsServicesOptions.GOODS_WITH_SERVICES.getOptionValueAsString()))); }
Source:
<code>public void accept(T value) { Lock lock = this.lock.writeLock(); lock.lock(); try { <START> this.value = value; <END> } finally { lock.unlock(); } }</code><technical_language>If eliminate lock, accept method "this.value = value;" statement</technical_language>

Target:
public synchronized void accept(T value) { this.value = value; }
Source:
<code>public void mayProceed() throws InsufficientPermissionException { locale = LocaleResolver.getLocale(request); if (ub.isSysAdmin()) { return; } if (!currentRole.getRole().equals(Role.RESEARCHASSISTANT)) { return; } <START> if (!currentRole.getRole().equals(Role.RESEARCHASSISTANT2)) { <END> return; } addPageMessage(respage.getString("no_have_correct_privilege_current_study") + respage.getString("change_study_contact_sysadmin")); throw new InsufficientPermissionException(Page.MENU, resexception.getString("not_allowed_access_extract_data_servlet"), "1"); }</code><technical_language>I this logic is flawed. @jkeremian please a look</technical_language>

Target:
public void mayProceed() throws InsufficientPermissionException { locale = LocaleResolver.getLocale(request); if (ub.isSysAdmin()) { return; } if (!( currentRole.getRole().equals(Role.RESEARCHASSISTANT) || currentRole.getRole().equals(Role.RESEARCHASSISTANT2) ) ) { return; } addPageMessage(respage.getString("no_have_correct_privilege_current_study") + respage.getString("change_study_contact_sysadmin")); throw new InsufficientPermissionException(Page.MENU, resexception.getString("not_allowed_access_extract_data_servlet"), "1"); }
Source:
<code>public Object apply(AccountResource rsrc, Input input) throws AuthException, MethodNotAllowedException, ResourceNotFoundException, OrmException { if (!self.get().equals(rsrc.getUser()) <START> && !self.get().getCapabilities().canAdministrateServer()) { <END> throw new AuthException("not allowed to change name"); } if (!realm.allowsEdit(FieldName.FULL_NAME)) { throw new MethodNotAllowedException("The realm doesn't allow editing names"); } if (input == null) { input = new Input(); } Account a = dbProvider.get().accounts().get(rsrc.getUser().getAccountId()); if (a == null) { throw new ResourceNotFoundException("No such account: " + rsrc.getUser().getAccountId()); } a.setFullName(input.name); dbProvider.get().accounts().update(Collections.singleton(a)); byIdCache.evict(a.getId()); return Strings.isNullOrEmpty(a.getFullName()) ? Response.none() : a.getFullName(); }</code><technical_language>a non-admin user I able set account's name</technical_language>

Target:
public Object apply(AccountResource rsrc, Input input) throws AuthException, MethodNotAllowedException, ResourceNotFoundException, OrmException { IdentifiedUser s = (IdentifiedUser) self.get(); if (s.getAccountId().get() != rsrc.getUser().getAccountId().get() && !self.get().getCapabilities().canAdministrateServer()) { throw new AuthException("not allowed to change name"); } if (!realm.allowsEdit(FieldName.FULL_NAME)) { throw new MethodNotAllowedException("The realm doesn't allow editing names"); } if (input == null) { input = new Input(); } Account a = dbProvider.get().accounts().get(rsrc.getUser().getAccountId()); if (a == null) { throw new ResourceNotFoundException("No such account: " + rsrc.getUser().getAccountId()); } a.setFullName(input.name); dbProvider.get().accounts().update(Collections.singleton(a)); byIdCache.evict(a.getId()); return Strings.isNullOrEmpty(a.getFullName()) ? Response.none() : a.getFullName(); }
Source:
<code>public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (resultCode != -1) { <START> Log.e(TAG, "Error getting geocoding results"); <END> return; } Place place = PlaceAutocomplete.getPlace(getActivity(), intent); if (requestCode == FROM_ADDRESS_GEOCODE) { fromAddress = new CustomAddress(); builder.setFrom(fromAddress); handlePlaceResult(place, fromAddress, fromAddressTextArea); } else if (requestCode == TO_ADDRESS_GEOCODE) { toAddress = new CustomAddress(); builder.setTo(toAddress); handlePlaceResult(place, toAddress, toAddressTextArea); } }</code><technical_language>This is fine a Log.e indicating error</technical_language>

Target:
public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (resultCode != -1) { Log.e(TAG, "Error getting geocoding results"); return; } CustomAddress address = ProprietaryMapHelpV2.getCustomAddressFromPlacesIntent(Application.get().getApplicationContext(), intent); if (requestCode == USE_FROM_ADDRESS) { mFromAddress = address; mBuilder.setFrom(mFromAddress); mFromAddressTextArea.setText(mFromAddress.toString()); } else if (requestCode == USE_TO_ADDRESS) { mToAddress = address; mBuilder.setTo(mToAddress); mToAddressTextArea.setText(mToAddress.toString()); } checkRequestAndSubmit(); }
Source:
<code>public void currentThreadInterruptStatusIsClearedAfterSuiteExecution() { core.addListener(new RunListener() { @Override public void testSuiteFinished(Description description) { interruptedFlags.add(Thread.currentThread().isInterrupted()); } }); Request request = new Request() { @Override public Runner getRunner() { try { return new BlockJUnit4ClassRunner(TestWithInterruptFromAfterClass.class) { <START> }; <END> } catch (InitializationError e) { return new ErrorReportingRunner(TestWithInterruptFromAfterClass.class, e); } } }; Result result = core.run(request); assertEquals(0, result.getFailureCount()); assertEquals(singletonList(false), interruptedFlags); }</code><technical_language>is this anonymous class necessary/intentional</technical_language>

Target:
public void currentThreadInterruptStatusIsClearedAfterSuiteExecution() { core.addListener(new RunListener() { @Override public void testSuiteFinished(Description description) { interruptedFlags.add(Thread.currentThread().isInterrupted()); } }); Request request = Request.aClass(TestWithInterruptFromAfterClass.class); Result result = core.run(request); assertEquals(0, result.getFailureCount()); assertEquals(singletonList(false), interruptedFlags); }
Source:
<code>public String getDescription() { <START> return "Dropping an Association to generate a DestroyLinkAction"; <END> }</code><technical_language>Missing NLS</technical_language>

Target:
public String getDescription() { return Messages.AssociationToDestroyLinkActionDropStrategy_Description; }
Source:
<code>protected void update() { this.view.clear(); this.hideEmptyState(); <START> int offset = getOffset(); <END> this.resolveAssetsCount(); this.getAssets(this.filter, this.filterType, offset, this.currentPage * this.pageSize, this::addAssetsToView); this.view.setCurrentPage(this.currentPage); this.checkPaginationButtons(); }</code><technical_language>passing getOffset() (not introducing local variable offset) argument of getAssets() improve readability, do think</technical_language>

Target:
protected void update() { this.view.clear(); this.hideEmptyState(); this.resolveAssetsCount(); this.getAssets(this.filter, this.filterType, getOffset(), this.currentPage * this.pageSize, this::addAssetsToView); this.view.setCurrentPage(this.currentPage); this.checkPaginationButtons(); }
Source:
<code>private String setParameter(HttpMessage msg, NameValuePair originalPair, String name, String value, boolean escaped) { try { URI uri = msg.getRequestHeader().getURI(); <START> String[] paths = msg.getRequestHeader().getURI().getPath().toString().split("/"); <END> if (originalPair.getPosition() < paths.length) { String encodedValue = (escaped) ? value : getEscapedValue(value); paths[originalPair.getPosition()] = encodedValue; String path = StringUtils.join(paths, "/"); try { uri.setEscapedPath(path); } catch (URIException e) { uri.setPath(path); } } } catch (URIException e) { LOGGER.error(e.getMessage(), e); } return value; }</code><technical_language>variable uri; - getEscapedPath(); - toString() removed (it's returning a String)</technical_language>

Target:
private String setParameter(HttpMessage msg, NameValuePair originalPair, String name, String value, boolean escaped) { URI uri = msg.getRequestHeader().getURI(); String[] paths = uri.getEscapedPath().split("/"); if (originalPair.getPosition() < paths.length) { String encodedValue = (escaped) ? value : getEscapedValue(value); paths[originalPair.getPosition()] = encodedValue; String path = String.join("/", paths); try { uri.setEscapedPath(path); } catch (URIException e) { try { uri.setPath(path); } catch (URIException e1) { LOGGER.debug(e1.getMessage(), e1); } LOGGER.warn(e.getMessage(), e); } } return value; }
Source:
<code>public void testInequalityWithNull() { SourceProcessingDetails sourceProcessingDetails = new SourceProcessingDetailsImpl(); assertThat(sourceProcessingDetails.equals(null), is(false)); <START> } <END></code><technical_language>If checking for equality null, avoid implementing equals method replace processingDetails.equals(null) processingDetals == null Note implementing equals method is if need equals method for other checks of equality</technical_language>

Target:
public void testInequalityWithNull() { SourceProcessingDetails sourceProcessingDetails = new SourceProcessingDetailsImpl(Collections.singletonList("")); assertThat(sourceProcessingDetails.equals(null), is(false)); }
Source:
<code>protected ActionResult execute() throws EntityDoesNotExistException { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); Assumption.assertNotNull(courseId); String fsname = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); <START> int fsindex = Integer.parseInt(getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_INDEX)); <END> Assumption.assertNotNull(fsname); instructor = logic.getInstructorForGoogleId(courseId, account.googleId); new GateKeeper().verifyAccessible(instructor, logic.getCourse(courseId)); CourseRoster roster = new CourseRoster( logic.getStudentsForCourse(courseId), logic.getInstructorsForCourse(courseId)); data = new InstructorFeedbackResponseCommentsLoadPageData(account); data.feedbackResultBundles = getFeedbackResultBundles(courseId, fsname, roster); data.instructorEmail = instructor.email; data.currentInstructor = instructor; data.roster = roster; data.feedbackSessionIndex = fsindex; data.numberOfPendingComments = logic.getCommentsForSendingState(courseId, CommentSendingState.PENDING).size() + logic.getFeedbackResponseCommentsForSendingState(courseId, CommentSendingState.PENDING).size(); return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESPONSE_COMMENTS_LOAD, data); }</code><technical_language>Need assert param is null; parse try-catch; if fail parse, fast-fail it</technical_language>

Target:
protected ActionResult execute() throws EntityDoesNotExistException { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); Assumption.assertNotNull(courseId); String fsname = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); String fsindexString = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_INDEX); Assumption.assertNotNull(fsindexString); int fsindex = 0; try { fsindex = Integer.parseInt(fsindexString); } catch(NumberFormatException e) { Assumption.fail("Invalid request parameter value for feedback session index: "+fsindexString); } Assumption.assertNotNull(fsname); instructor = logic.getInstructorForGoogleId(courseId, account.googleId); new GateKeeper().verifyAccessible(instructor, logic.getCourse(courseId)); CourseRoster roster = new CourseRoster( logic.getStudentsForCourse(courseId), logic.getInstructorsForCourse(courseId)); data = new InstructorFeedbackResponseCommentsLoadPageData(account); data.feedbackResultBundles = getFeedbackResultBundles(courseId, fsname, roster); data.instructorEmail = instructor.email; data.currentInstructor = instructor; data.roster = roster; data.feedbackSessionIndex = fsindex; data.numberOfPendingComments = logic.getCommentsForSendingState(courseId, CommentSendingState.PENDING).size() + logic.getFeedbackResponseCommentsForSendingState(courseId, CommentSendingState.PENDING).size(); return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESPONSE_COMMENTS_LOAD, data); }
Source:
<code><START> private Set<BlockDevice> getBlockDevices(VirtualGuest virtualGuest) { <END> if (virtualGuest.getVirtualGuestBlockDevices() == null) return null; Set<BlockDevice> set = FluentIterable.from(virtualGuest.getVirtualGuestBlockDevices()) .transform(new Function<VirtualGuestBlockDevice, BlockDevice>() { @Override public BlockDevice apply(VirtualGuestBlockDevice input) { return new BlockDevice(input.getDevice(), input.getVirtualDiskImage().getCapacity()); } }) .toSortedSet(new Comparator<BlockDevice>() { @Override public int compare(BlockDevice b1, BlockDevice b2) { return Integer.valueOf(b1.getDevice()).compareTo(Integer.valueOf(b2.getDevice())); } }); return set; }</code><technical_language>I this private static</technical_language>

Target:
private Set<BlockDevice> getBlockDevices(VirtualGuest virtualGuest) { if (virtualGuest.getVirtualGuestBlockDevices() == null) { return null; } ImmutableSortedSet.Builder<BlockDevice> blockDevices = ImmutableSortedSet.orderedBy(new BlockDevicesComparator()); for (VirtualGuestBlockDevice blockDevice : virtualGuest.getVirtualGuestBlockDevices()) { blockDevices.add(new BlockDevice(blockDevice.getDevice(), blockDevice.getVirtualDiskImage().getCapacity())); } return blockDevices.build(); }
Source:
<code>public final void validationFailsOnArchitectsMismatch() throws Exception { final String commander = "Yegor1024"; final Profile master = new Profile.Fixed( new XMLDocument( String.format( ProfilesTest.PROFILE, "Yegor64", commander, "do_something" ) ) ); final Profile merged = new Profile.Fixed( new XMLDocument( String.format( ProfilesTest.PROFILE, "Bobby", commander, "do_another" ) ) ); try { new Profiles().validated(master, merged); <START> MatcherAssert.assertThat( <END> "Code above must throw an exception", false ); } catch (final Profile.ConfigException exception) { MatcherAssert.assertThat( exception.getMessage(), Matchers.is( String.format( ProfilesTest.MESSAGE, "architect" ) ) ); } }</code><technical_language>@xupyprmv Assert.fail instead of assertion false</technical_language>

Target:
public final void validationFailsOnArchitectsMismatch() throws Exception { final String commander = "Yegor1024"; final Profile master = new Profile.Fixed( new XMLDocument( String.format( ProfilesTest.PROFILE, "Yegor64", commander, "do_something", commander, commander ) ) ); final Profile merged = new Profile.Fixed( new XMLDocument( String.format( ProfilesTest.PROFILE, "Bobby", commander, "do_another", commander, commander ) ) ); try { new Profiles().validated(master, merged); Assert.fail("Code above must throw an exception"); } catch (final Profile.ConfigException exception) { MatcherAssert.assertThat( exception.getMessage(), Matchers.is( String.format( ProfilesTest.MESSAGE, "[architect]" ) ) ); } }
Source:
<code>public static void main(String[] args) { if (!(args.length == 1 && !args[0].startsWith("-") || args.length == 2 && (args[0].equals("-q") || args[0].equals("--quiet")) && !args[1].startsWith("-"))) { System.err .println("usage: java edu.illinois.cs.cogcomp.lbj.pos.POSTag [-q] <testing set>\n" + " If -q is specified, the only output is timing and accuracy\n" + " information. Otherwise, the testing set is output with\n" + " extra tags indicating whether each prediction was correct."); System.exit(1); } boolean quiet = args.length == 2; testingFile = args[args.length - 1]; POSTagger tagger = new POSTagger(); BufferedReader in = open(); int correct = 0, incorrect = 0; for (String line = readLine(in); line != null; line = readLine(in)) { LinkedVector sentence = POSBracketToVector.parsePOSBracketForm(line); for (Word word = (Word) sentence.get(0); word != null; word = (Word) word.next) { String label = word.partOfSpeech; word.partOfSpeech = null; String prediction = tagger.discreteValue(word); if (prediction.equals(label)) { <START> ++correct; <END> if (!quiet) System.out.println("+"); } else { ++incorrect; if (!quiet) System.out.println("-[" + label + "]"); } if (!quiet) System.out.println(word + " "); } if (!quiet) System.out.println(""); } System.out.println("Accuracy: " + (100 * correct / (double) (correct + incorrect)) + "%"); }</code><technical_language>this meant print() println()..</technical_language>

Target:
public static void main(String[] args) { if (!(args.length == 1 && !args[0].startsWith("-") || args.length == 2 && (args[0].equals("-q") || args[0].equals("--quiet")) && !args[1].startsWith("-"))) { System.err .println("usage: java edu.illinois.cs.cogcomp.lbj.pos.POSTag [-q] <testing set>\n" + " If -q is specified, the only output is timing and accuracy\n" + " information. Otherwise, the testing set is output with\n" + " extra tags indicating whether each prediction was correct."); System.exit(1); } boolean quiet = args.length == 2; testingFile = args[args.length - 1]; POSTagger tagger = new POSTagger(); BufferedReader in = open(); int correct = 0, incorrect = 0; for (String line = readLine(in); line != null; line = readLine(in)) { LinkedVector sentence = POSBracketToVector.parsePOSBracketForm(line); for (Word word = (Word) sentence.get(0); word != null; word = (Word) word.next) { String label = word.partOfSpeech; word.partOfSpeech = null; String prediction = tagger.discreteValue(word); if (prediction.equals(label)) { ++correct; if (!quiet) System.out.print("+"); } else { ++incorrect; if (!quiet) System.out.print("-[" + label + "]"); } if (!quiet) System.out.print(word + " "); } if (!quiet) System.out.print(""); } System.out.println("Accuracy: " + (100 * correct / (double) (correct + incorrect)) + "%"); }
Source:
<code>int staticScore() { if (upper == lower) { return 1; } <START> return upper != Long.MAX_VALUE && lower != Long.MIN_VALUE ? 2 : 3; <END> }</code><technical_language>I understand comparing float values Long.MAX_VALUE</technical_language>

Target:
int staticScore() { if (upper == lower) { return 1; } return !lowerUnbounded && !upperUnbounded ? 2 : 3; }
Source:
<code>public String toString() { String fileName = "No file ("; if (!mediaFiles.isEmpty()) { URI uri = mediaFiles.entrySet().iterator().next().getValue(); fileName = FilenameUtils.getBaseName(uri.getPath()).concat(" ("); } <START> if (type != null) { <END> fileName = type + ' ' + fileName; } return mediaFiles.entrySet().stream().map(Entry::getKey).map(MediaVariant::getUse) .collect(Collectors.joining(", ", fileName, ")")); }</code><technical_language>decided Objects.nonNull</technical_language>

Target:
public String toString() { String fileName = "No file ("; if (!mediaFiles.isEmpty()) { URI uri = mediaFiles.entrySet().iterator().next().getValue(); fileName = FilenameUtils.getBaseName(uri.getPath()).concat(" ("); } if (Objects.nonNull(type)) { fileName = type + ' ' + fileName; } return mediaFiles.entrySet().stream().map(Entry::getKey).map(MediaVariant::getUse) .collect(Collectors.joining(", ", fileName, ")")); }
Source:
<code><START> public void testPrivateEnum() { <END> testEnumSerializer(PrivateEnum.ONE, PrivateEnum.TWO, PrivateEnum.THREE); }</code><technical_language>open another commit/pr for this</technical_language>

Target:
public void testPrivateEnum() { testEnumSerializer(PublicEnum.FOO, PublicEnum.BAR, PublicEnum.PETER, PublicEnum.NATHANIEL, PublicEnum.EMMA, PublicEnum.PAULA); }
Source:
<code>private void updateWorkflowInstanceWithTransaction(final WorkflowInstance instance, final WorkflowInstanceAction action, final List<WorkflowInstance> childWorkflows) { transaction.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus status) { updateWorkflowInstance(instance); int parentActionId = insertWorkflowInstanceAction(instance, action); for (WorkflowInstance childTemplate : childWorkflows) { <START> Integer rootWorkflowId = instance.rootWorkflowId != null ? instance.rootWorkflowId : instance.id; <END> WorkflowInstance childWorkflow = new WorkflowInstance.Builder(childTemplate).setRootWorkflowId(rootWorkflowId) .setParentWorkflowId(instance.id).setParentActionId(parentActionId).build(); insertWorkflowInstance(childWorkflow); } } }); }</code><technical_language>prefer == instead of !=: instance.rootWorkflowId == null ? instance.id : instance.rootWorkflowId</technical_language>

Target:
private void updateWorkflowInstanceWithTransaction(final WorkflowInstance instance, final WorkflowInstanceAction action, final List<WorkflowInstance> childWorkflows) { transaction.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus status) { updateWorkflowInstance(instance); int parentActionId = insertWorkflowInstanceAction(instance, action); for (WorkflowInstance childTemplate : childWorkflows) { Integer rootWorkflowId = instance.rootWorkflowId == null ? instance.id : instance.rootWorkflowId; WorkflowInstance childWorkflow = new WorkflowInstance.Builder(childTemplate).setRootWorkflowId(rootWorkflowId) .setParentWorkflowId(instance.id).setParentActionId(parentActionId).build(); insertWorkflowInstance(childWorkflow); } } }); }
Source:
<code>private void addingBundle(Bundle bundle) { <START> ScheduledFuture<?> future = scheduler.schedule(new Runnable() { <END> @Override public void run() { processBundle(bundle); } }, 0, TimeUnit.SECONDS); queue.put(bundle, future); }</code><technical_language>"submit"</technical_language>

Target:
private void addingBundle(Bundle bundle) { Future<?> future = scheduler.submit(new Runnable() { @Override public void run() { processBundle(bundle); } }); queue.put(bundle, future); }
Source:
<code>boolean interceptRequest(Request request, Response response) throws Exception; default boolean onRequestInterceptionError(Request request, Response response, Exception e) { String message = "Exception while executing request interceptor " + this.getClass(); Logger log = LoggerFactory.getLogger(this.getClass()); log.error(message, e); <START> response.setEntity(e.getMessage() + " - " + message + this.getClass()) <END> .setMediaType(MediaType.TEXT_PLAIN) .setStatus(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); return false; }</code><technical_language>This expose sensitive data server client applications depending print error messages. send a generic error message client internal server error occurred</technical_language>

Target:
boolean interceptRequest(Request request, Response response) throws Exception; default boolean onRequestInterceptionError(Request request, Response response, Exception e) { String message = "Exception while executing request interceptor " + this.getClass(); Logger log = LoggerFactory.getLogger(this.getClass()); log.error(message, e); response.setEntity(message) .setMediaType(MediaType.TEXT_PLAIN) .setStatus(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); return false; }
Source:
<code>public void changeMasterEncryptionPassword() { try { certificatesMgmService.checkPassword(currentPassword); } catch (EncryptionMasterPasswordException ex) { MessagesController.addErrorMessage(ex.getMessage()); return; } catch (IOException ex) { MessagesController.addErrorMessage("Error while reading master password file!"); return; <START> } <END> FacesContext context = FacesContext.getCurrentInstance(); HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest(); String userEmail = request.getUserPrincipal().getName(); certificatesMgmService.resetMasterEncryptionPassword(newPassword, userEmail); MessagesController.addInfoMessage("Changing password...", "Check your Inbox for completion status"); }</code><technical_language>@kouzant print exception in log here</technical_language>

Target:
public void changeMasterEncryptionPassword() { try { FacesContext context = FacesContext.getCurrentInstance(); HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest(); String userEmail = request.getUserPrincipal().getName(); certificatesMgmService.checkPassword(currentPassword, userEmail); certificatesMgmService.resetMasterEncryptionPassword(newPassword, userEmail); MessagesController.addInfoMessage("Changing password...", "Check your Inbox for completion status"); } catch (EncryptionMasterPasswordException ex) { MessagesController.addErrorMessage(ex.getMessage()); } catch (IOException ex) { MessagesController.addErrorMessage("Error while reading master password file!"); } }
Source:
<code>public void genSchema() throws Exception { String jsonStr = JsonUtilTest.readJson("FullExampleJsonSchema.json"); FullExampleProperties properties = new FullExampleProperties("properties"); properties.init(); <START> System.out.println(JsonUtil.toJson(properties, true)); <END> JsonSchemaGenerator generator = new JsonSchemaGenerator(); assertEquals(jsonStr, generator.genSchema(properties).toString()); }</code><technical_language>Do System.out.printXX in code in unit tests, please a slf4j Logger</technical_language>

Target:
public void genSchema() throws Exception { String jsonStr = JsonSchemaUtilTest.readJson("FullExampleJsonSchema.json"); FullExampleProperties properties = new FullExampleProperties("fullexample"); properties.init(); JsonSchemaGenerator generator = new JsonSchemaGenerator(); assertEquals(jsonStr, generator.genSchema(properties, Form.MAIN).toString()); }
Source:
<code><START> void setAutoHideDiffHeader(boolean hide) { autoHideHeader = hide; if (!hide) { setHeaderVisible(true); } } <END></code><technical_language>optional: feels strange header visible, call setHeaderVisible(true) called method depends autoHideHeader value... for is set false here. exist another method setHeaderVisible(boolean show) simply header visible/invisible of autoHideHeader value. Then, call new method "setHeaderVisible" method compute proper for "show" variable call new method</technical_language>

Target:
void setAutoHideDiffHeader(boolean hide) { autoHideHeader = hide; if (!hide) { showHeader(true); } }
Source:
<code>public void testMetadataContentRecordV2() throws IOException, MessageFormatException { List<StoreKey> keys = getKeys(60, 5); int chunkSize = ThreadLocalRandom.current().nextInt(1, Integer.MAX_VALUE); <START> long totalSize = (long) keys.size() * chunkSize; <END> ByteBuffer metadataContent = getSerializedMetadataContentV2(chunkSize, totalSize, keys); CompositeBlobInfo compositeBlobInfo = deserializeMetadataContentV2(metadataContent, new MockIdFactory()); Assert.assertEquals("Chunk size doesn't match", chunkSize, compositeBlobInfo.getChunkSize()); Assert.assertEquals("List of keys dont match", keys, compositeBlobInfo.getKeys()); }</code><technical_language>if one, explicitly test case totalSize is a multiple of chunkSize</technical_language>

Target:
public void testMetadataContentRecordV2() throws IOException, MessageFormatException { List<StoreKey> keys = getKeys(60, 5); int[] chunkSizes = {ThreadLocalRandom.current().nextInt(1, Integer.MAX_VALUE), 15}; long[] totalSizes = {(long) keys.size() * chunkSizes[0], ((long) keys.size() * chunkSizes[1]) - 11}; for (int i = 0; i < chunkSizes.length; i++) { ByteBuffer metadataContent = getSerializedMetadataContentV2(chunkSizes[i], totalSizes[i], keys); CompositeBlobInfo compositeBlobInfo = deserializeMetadataContentV2(metadataContent, new MockIdFactory()); Assert.assertEquals("Chunk size doesn't match", chunkSizes[i], compositeBlobInfo.getChunkSize()); Assert.assertEquals("Total size doesn't match", totalSizes[i], compositeBlobInfo.getTotalSize()); Assert.assertEquals("List of keys dont match", keys, compositeBlobInfo.getKeys()); } }
Source:
<code>public void onBrowserEvent(Context context, Element parent, T value, NativeEvent event, ValueUpdater<T> valueUpdater) { super.onBrowserEvent(context, parent, value, event, valueUpdater); int eventX = event.getClientX(); int eventY = event.getClientY(); if ("click".equals(event.getType())) { EventTarget eventTarget = event.getEventTarget(); if (parent.getFirstChildElement().isOrHasChild(Element.as(eventTarget))) { menuPanelPopup.asPopupPanel().showAndFitToScreen(eventX, eventY); } } <START> if("mouseover".equals(event.getType())) { END> if (isVisible(value)) { parent.getStyle().setBorderColor("#96B7D6"); } } else { parent.getStyle().setBorderColor("transparent"); } }</code><technical_language>else if</technical_language>

Target:
public void onBrowserEvent(Context context, Element parent, T value, NativeEvent event, ValueUpdater<T> valueUpdater) { super.onBrowserEvent(context, parent, value, event, valueUpdater); int eventX = event.getClientX(); int eventY = event.getClientY(); if ("click".equals(event.getType())) { EventTarget eventTarget = event.getEventTarget(); if (parent.getFirstChildElement().isOrHasChild(Element.as(eventTarget))) { menuPanelPopup.asPopupPanel().showAndFitToScreen(eventX, eventY); } } else if("mouseover".equals(event.getType())) { if (isVisible(value)) { parent.getStyle().setBorderColor("#96B7D6"); } } else { parent.getStyle().setBorderColor("transparent"); } }
Source:
<code>private void copyFileToLocalDirectory(String remoteDirectoryPath, F remoteFile, File localDirectory, Session<F> session) throws IOException { String remoteFileName = this.getFilename(remoteFile); String localFileName = this.generateLocalFileName(remoteFileName); String remoteFilePath = remoteDirectoryPath + remoteFileSeparator + remoteFileName; if (!this.isFile(remoteFile)) { if (logger.isDebugEnabled()) { logger.debug("cannot copy, not a file: " + remoteFilePath); } return; } File localFile = new File(localDirectory, localFileName); if (!localFile.exists()) { String tempFileName = localFile.getAbsolutePath() + this.temporaryFileSuffix; File tempFile = new File(tempFileName); InputStream inputStream = null; FileOutputStream fileOutputStream = new FileOutputStream(tempFile); try { session.read(remoteFilePath, fileOutputStream); } catch (Exception e) { if (e instanceof RuntimeException){ throw (RuntimeException) e; } else { throw new MessagingException("Failure occurred while copying from remote to local directory", e); } } finally { try { if (inputStream != null) { inputStream.close(); } } catch (Exception ignored1) { } try { fileOutputStream.close(); } catch (Exception ignored2) { } } if (tempFile.renameTo(localFile)) { if (this.deleteRemoteFiles) { session.remove(remoteFilePath); if (logger.isDebugEnabled()) { logger.debug("deleted " + remoteFilePath); } } } <START> localFile.setLastModified(getModified(remoteFile)); <END> } }</code><technical_language>Unfortunately, I this needs option (with default false). A plausible case is of a FileListFilter track of files created time x, x is time file copied. Unconditionally server timestamp break this</technical_language>

Target:
private void copyFileToLocalDirectory(String remoteDirectoryPath, F remoteFile, File localDirectory, Session<F> session) throws IOException { String remoteFileName = this.getFilename(remoteFile); String localFileName = this.generateLocalFileName(remoteFileName); String remoteFilePath = remoteDirectoryPath + remoteFileSeparator + remoteFileName; if (!this.isFile(remoteFile)) { if (logger.isDebugEnabled()) { logger.debug("cannot copy, not a file: " + remoteFilePath); } return; } File localFile = new File(localDirectory, localFileName); if (!localFile.exists()) { String tempFileName = localFile.getAbsolutePath() + this.temporaryFileSuffix; File tempFile = new File(tempFileName); FileOutputStream fileOutputStream = new FileOutputStream(tempFile); try { session.read(remoteFilePath, fileOutputStream); } catch (Exception e) { if (e instanceof RuntimeException){ throw (RuntimeException) e; } else { throw new MessagingException("Failure occurred while copying from remote to local directory", e); } } finally { try { fileOutputStream.close(); } catch (Exception ignored2) { } } if (tempFile.renameTo(localFile)) { if (this.deleteRemoteFiles) { session.remove(remoteFilePath); if (logger.isDebugEnabled()) { logger.debug("deleted " + remoteFilePath); } } } if (this.preserveTimestamp) { localFile.setLastModified(getModified(remoteFile)); } } }
Source:
<code>NpmRemoteRepositoryConfiguration(MutableNpmRemoteRepositoryConfiguration delegate) { <START> this.lastCnahgeId = delegate.getLastCnahgeId(); <END> }</code><technical_language>Typo</technical_language>

Target:
NpmRemoteRepositoryConfiguration(MutableNpmRemoteRepositoryConfiguration delegate) { this.lastChangeId = delegate.getLastChangeId(); this.replicateUrl = delegate.getReplicateUrl(); }