auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void HubsTest001_verifyMosaicSliderShowsImagesOnHover(HubName hubName) { HomePageObject home = new HomePageObject(driver); HubBasePageObject hub = home.openHub(hubName, wikiCorporateURL); hub.verifyMosaicSliderImages(); hub.mosaicSliderHoverOverImage(4); String currentLargeImageDescription = hub <START> .mosaicSliderGetCurrentLargeImageDescription(); <END> hub.mosaicSliderHoverOverImage(3); hub.mosaicSliderVerifyLargeImageDescriptionNotEquals(currentLargeImageDescription); currentLargeImageDescription = hub.mosaicSliderGetCurrentLargeImageDescription(); hub.mosaicSliderHoverOverImage(2); hub.mosaicSliderVerifyLargeImageDescriptionNotEquals(currentLargeImageDescription); currentLargeImageDescription = hub.mosaicSliderGetCurrentLargeImageDescription(); hub.mosaicSliderHoverOverImage(1); hub.mosaicSliderVerifyLargeImageDescriptionNotEquals(currentLargeImageDescription); currentLargeImageDescription = hub.mosaicSliderGetCurrentLargeImageDescription(); hub.mosaicSliderHoverOverImage(0); hub.mosaicSliderVerifyLargeImageDescriptionNotEquals(currentLargeImageDescription); }</code><technical_language>this previous line: "hub.mosaicSliderGetCurrentLargeImageDescription();"</technical_language>

Target:
public void HubsTest001_verifyMosaicSliderShowsImagesOnHover(HubName hubName) { HomePageObject home = new HomePageObject(driver); HubBasePageObject hub = home.openHubByUrl(hubName, wikiCorporateURL); hub.verifyMosaicSliderImages(); hub.mosaicSliderHoverOverImage(4); String currentLargeImageDescription = hub.mosaicSliderGetCurrentLargeImageDescription(); hub.mosaicSliderHoverOverImage(3); hub.mosaicSliderVerifyLargeImageDescriptionDifferent(currentLargeImageDescription); currentLargeImageDescription = hub.mosaicSliderGetCurrentLargeImageDescription(); hub.mosaicSliderHoverOverImage(2); hub.mosaicSliderVerifyLargeImageDescriptionDifferent(currentLargeImageDescription); currentLargeImageDescription = hub.mosaicSliderGetCurrentLargeImageDescription(); hub.mosaicSliderHoverOverImage(1); hub.mosaicSliderVerifyLargeImageDescriptionDifferent(currentLargeImageDescription); currentLargeImageDescription = hub.mosaicSliderGetCurrentLargeImageDescription(); hub.mosaicSliderHoverOverImage(0); hub.mosaicSliderVerifyLargeImageDescriptionDifferent(currentLargeImageDescription); }
Source:
<code>public void start(ComponentContext context) { super.start(context); List<RedirectResolverDescriptor> descriptors = getDescriptors(XP_REDIRECT_RESOLVER); if (!descriptors.isEmpty()) { RedirectResolverDescriptor descriptor = descriptors.get(descriptors.size() - 1); try { <START> redirectResolver = descriptor.klass.newInstance(); <END> } catch (ReflectiveOperationException e) { getLog().error(e); } } }</code><technical_language>call getDeclaredConstructor newInstanse. This convenient method deprecated in upper java version</technical_language>

Target:
public void start(ComponentContext context) { super.start(context); List<RedirectResolverDescriptor> descriptors = getDescriptors(XP_REDIRECT_RESOLVER); if (!descriptors.isEmpty()) { RedirectResolverDescriptor descriptor = descriptors.get(descriptors.size() - 1); try { redirectResolver = descriptor.klass.getDeclaredConstructor().newInstance(); } catch (ReflectiveOperationException e) { getLog().error(e,e); } } if (redirectResolver == null) { redirectResolver = new DefaultRedirectResolver(); } }
Source:
<code>private Map getApplicationPropertiesMap() { <START> new Exception("trace").printStackTrace(); <END> ApplicationProperties appMap = getApplicationProperties(); Map map = null; if (appMap != null) { map = appMap.getValue(); } if (map == null) { return Collections.emptyMap(); } else { return map; } }</code><technical_language>This odd in production code, is intentional</technical_language>

Target:
private Map getApplicationPropertiesMap() { ApplicationProperties appMap = getApplicationProperties(); Map map = null; if (appMap != null) { map = appMap.getValue(); } if (map == null) { return Collections.emptyMap(); } else { return map; } }
Source:
<code>public String getLabel() <START> { return <END> viewpoint.getLabel(); }</code><technical_language>identifiedElementQuery.getLabel()</technical_language>

Target:
public String getLabel() { return new IdentifiedElementQuery(viewpoint).getLabel(); }
Source:
<code>public void setDeviceState(String deviceName, Integer deviceAddress, SimpleBinaryDeviceState.DeviceStates state) { if (deviceAddress < 0) { return; } if (!this.containsKey(deviceAddress)) { this.put(deviceAddress, new SimpleBinaryDeviceState()); } SimpleBinaryDeviceState deviceState = this.get(deviceAddress); deviceState.setState(state); <START> if (eventPublisher != null) { <END> for (Map.Entry<String, SimpleBinaryInfoBindingConfig> item : deviceItemsConfigs.entrySet()) { if (item.getValue().device.equals(deviceName) && item.getValue().busAddress == deviceAddress) { if (item.getValue().infoType == InfoType.STATE) { eventPublisher.postUpdate(item.getValue().item.getName(), new DecimalType(deviceState.getState().ordinal())); } else if (item.getValue().infoType == InfoType.PREVIOUS_STATE) { eventPublisher.postUpdate(item.getValue().item.getName(), new DecimalType(deviceState.getPreviousState().ordinal())); } else if (item.getValue().infoType == InfoType.STATE_CHANGE_TIME) { eventPublisher.postUpdate(item.getValue().item.getName(), new DateTimeType(deviceState.getChangeDate())); } else if (item.getValue().infoType == InfoType.PACKET_LOST) { eventPublisher.postUpdate(item.getValue().item.getName(), new DecimalType(deviceState.getPacketLost())); } } } } }</code><technical_language>good invert this if conditional</technical_language>

Target:
public void setDeviceState(String deviceName, Integer deviceAddress, SimpleBinaryDeviceState.DeviceStates state) { if (deviceAddress < 0) { return; } if (!this.containsKey(deviceAddress)) { this.put(deviceAddress, new SimpleBinaryDeviceState()); } SimpleBinaryDeviceState deviceState = this.get(deviceAddress); if (deviceState.setState(state) && eventPublisher != null) { for (Map.Entry<String, SimpleBinaryInfoBindingConfig> item : deviceItemsConfigs.entrySet()) { if (item.getValue().device.equals(deviceName) && item.getValue().busAddress == deviceAddress) { if (item.getValue().infoType == InfoType.STATE) { eventPublisher.postUpdate(item.getValue().item.getName(), new DecimalType(deviceState.getState().ordinal())); } else if (item.getValue().infoType == InfoType.PREVIOUS_STATE) { eventPublisher.postUpdate(item.getValue().item.getName(), new DecimalType(deviceState.getPreviousState().ordinal())); } else if (item.getValue().infoType == InfoType.STATE_CHANGE_TIME) { eventPublisher.postUpdate(item.getValue().item.getName(), new DateTimeType(deviceState.getChangeDate())); } else if (item.getValue().infoType == InfoType.PACKET_LOST) { eventPublisher.postUpdate(item.getValue().item.getName(), new DecimalType(deviceState.getPacketLost())); } } } } }
Source:
<code>public void testToString() { assertEquals(TENOR_3D.toString(), "Tenor[3D]"); assertEquals(TENOR_3W.toString(), "Tenor[3W]"); assertEquals(TENOR_4M.toString(), "Tenor[4M]"); assertEquals(TENOR_18M.toString(), "Tenor[18M]"); <START> assertEquals(TENOR_4Y.toString(), "Tenor[4Y]"); <END> }</code><technical_language>"Tenor" in toString adds now. Merge toFormattedString toString</technical_language>

Target:
public void testToString() { assertEquals(TENOR_3D.toString(), "3D"); assertEquals(TENOR_2W.toString(), "2W"); assertEquals(TENOR_4M.toString(), "4M"); assertEquals(TENOR_1Y.toString(), "1Y"); assertEquals(TENOR_12M.toString(), "12M"); assertEquals(TENOR_18M.toString(), "18M"); assertEquals(TENOR_4Y.toString(), "4Y"); }
Source:
<code>private Stream<String> getOlderBundleIds(final Date olderThan, final String userId, final boolean isAdmin) throws IOException { return this.getBundleIds( (Integer limit, Integer offset) -> { try { return isAdmin? this.bundleFactory.findSentBundles(olderThan, limit, offset): this.bundleFactory.findSentBundles(olderThan, userId, limit, offset); } catch (DotDataException e) { <START> <END> throw new DotRuntimeException(e); } }, Bundle::getId ); }</code><technical_language>Please log debugging data here</technical_language>

Target:
private Stream<String> getOlderBundleIds(final Date olderThan, final String userId, final boolean isAdmin) throws IOException { return this.getBundleIds( (Integer limit, Integer offset) -> { try { return isAdmin? this.bundleFactory.findSentBundles(olderThan, limit, offset): this.bundleFactory.findSentBundles(olderThan, userId, limit, offset); } catch (DotDataException e) { Logger.error(this,"Error getting bundles ids older than: " + olderThan + " by the user :" + userId,e); throw new DotRuntimeException(e); } }, Bundle::getId ); }
Source:
<code>private List<CopyNumberTriStateSegment> getCopyNumberTriStateSegments(final CopyNumberTriStateHiddenMarkovModel model, final List<Target> targets, double[] inputValues) { final double mean = MathUtils.mean(inputValues, 0, inputValues.length); <START> final double invStdev = 1.0 / MathUtils.stddev(inputValues, 0, inputValues.length); <END> final List<Double> inputValuesList = DoubleStream.of(inputValues).boxed().collect(Collectors.toList()); final List<Double> standardizedValuesList = inputAreZscores ? inputValuesList : inputValuesList.stream().map(v -> (v - mean) * invStdev).collect(Collectors.toList()); final List<CopyNumberTriState> bestPath = ViterbiAlgorithm.apply(standardizedValuesList, targets, model); final ForwardBackwardAlgorithm.Result<Double, Target, CopyNumberTriState> fbResult = ForwardBackwardAlgorithm.apply(standardizedValuesList, targets, model); return composeSegments(bestPath, fbResult, inputValuesList); }</code><technical_language>need cache inverse. saves division target, 10^6 targets 10^3 samples talking optimization saves a code harder read</technical_language>

Target:
private List<CopyNumberTriStateSegment> getCopyNumberTriStateSegments(final CopyNumberTriStateHiddenMarkovModel model, final List<Target> targets, double[] inputValues) { final double mean = MathUtils.mean(inputValues, 0, inputValues.length); final double stdev = MathUtils.stddev(inputValues, 0, inputValues.length); final List<Double> inputValuesList = DoubleStream.of(inputValues).boxed().collect(Collectors.toList()); final List<Double> standardizedValuesList = inputAreZscores ? inputValuesList : inputValuesList.stream().map(v -> (v - mean) / stdev).collect(Collectors.toList()); final List<CopyNumberTriState> bestPath = ViterbiAlgorithm.apply(standardizedValuesList, targets, model); final ForwardBackwardAlgorithm.Result<Double, Target, CopyNumberTriState> fbResult = ForwardBackwardAlgorithm.apply(standardizedValuesList, targets, model); return composeSegments(bestPath, fbResult, inputValuesList); }
Source:
<code>public String getReviewJSP(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo) { <START> subInfo.put("upload-with-embargo", true); <END> return super.getReviewJSP(context, request, response, subInfo); }</code><technical_language>is reason put this information in submission info object instead of a standard request attribute</technical_language>

Target:
public String getReviewJSP(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo) { request.setAttribute("submission.step.uploadwithembargo", true); return super.getReviewJSP(context, request, response, subInfo); }
Source:
<code>public void testJavaEE7Setup() throws Exception { Project project = projectHelper.createWebProject(); try (CommandController tester = testHarness.createCommandController(JavaEESetupCommand.class, project.getRoot())) { tester.initialize(); Assert.assertTrue(tester.isValid()); tester.setValueFor("javaEEVersion", "7"); Assert.assertTrue(tester.isValid()); Result result = tester.execute(); Assert.assertEquals("JavaEE 7 has been installed.", result.getMessage()); } project = projectHelper.refreshProject(project); <START> Assert.assertTrue(project.hasFacet(JavaEE7Facet.class)); <END> }</code><technical_language>This assert correct dependencies added POM</technical_language>

Target:
public void testJavaEE7Setup() throws Exception { Project project = projectHelper.createWebProject(); try (CommandController tester = testHarness.createCommandController(JavaEESetupCommand.class, project.getRoot())) { tester.initialize(); Assert.assertTrue(tester.isValid()); tester.setValueFor("javaEEVersion", "7"); Assert.assertTrue(tester.isValid()); Result result = tester.execute(); Assert.assertEquals("JavaEE 7 has been installed.", result.getMessage()); } project = projectHelper.refreshProject(project); Assert.assertTrue(project.hasFacet(JavaEE7Facet.class)); Assert.assertFalse(dependencyInstaller.isInstalled(project, JAVAEE6)); Assert.assertTrue(dependencyInstaller.isInstalled(project, JAVAEE7)); }
Source:
<code>protected ThreshdConfiguration getConfigForExtensions(Set<ThreshdConfigurationExtension> extensions) { ThreshdConfiguration mergedConfig = new ThreshdConfiguration(); <START> extensions.stream() <END> .map(ThreshdConfigurationExtension::getThreads) .filter(Objects::nonNull) .max(Integer::compareTo) .ifPresent(mergedConfig::setThreads); mergedConfig.setPackages(extensions.stream() .flatMap(e -> e.getPackages().stream()) .map(ThreshdConfigurationExtensionManager::toPackage) .collect(Collectors.toList())); mergedConfig.setThresholders(extensions.stream() .flatMap(e -> e.getThresholders().stream()) .map(ThreshdConfigurationExtensionManager::toThresholder) .collect(Collectors.toList())); return mergedConfig; }</code><technical_language>number of threads is longer used, omit this</technical_language>

Target:
protected ThreshdConfiguration getConfigForExtensions(Set<ThreshdConfigurationExtension> extensions) { ThreshdConfiguration mergedConfig = new ThreshdConfiguration(); mergedConfig.setPackages(extensions.stream() .flatMap(e -> e.getPackages().stream()) .map(ThreshdConfigurationExtensionManager::toPackage) .collect(Collectors.toList())); return mergedConfig; }
Source:
<code>public void run() { try { RabbitTemplate rabbitTemplate = new RabbitTemplate(AmqpAppender.this.connectionFactory); while (true) { final Event event = AmqpAppender.this.events.take(); <START> MessageProperties amqpProps = AmqpAppender.this.prepareMessageProperties(event); <END> String routingKey = AmqpAppender.this.routingKeyLayout.doLayout(event.getEvent()); sendOneEncoderPatternMessage(rabbitTemplate, routingKey); doSend(rabbitTemplate, event, event.getEvent(), name, amqpProps, routingKey); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }</code><technical_language>need this. prefix for methods</technical_language>

Target:
public void run() { try { RabbitTemplate rabbitTemplate = new RabbitTemplate(AmqpAppender.this.connectionFactory); while (true) { final Event event = AmqpAppender.this.events.take(); MessageProperties amqpProps = prepareMessageProperties(event); String routingKey = AmqpAppender.this.routingKeyLayout.doLayout(event.getEvent()); sendOneEncoderPatternMessage(rabbitTemplate, routingKey); doSend(rabbitTemplate, event, event.getEvent(), name, amqpProps, routingKey); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }
Source:
<code>private void sendResultToScheduler(TaskTerminateNotification terminateNotification, TaskResultImpl taskResult) { if (isNodeShuttingDown()) { return; } int pingAttempts = initializer.getPingAttempts(); int pingPeriodMs = initializer.getPingPeriod() * 1000; TaskTerminateNotification currentTerminateNotification = terminateNotification; for (int i = 0; i < pingAttempts; i++) { try { currentTerminateNotification.terminate(taskId, taskResult); logger.debug("Successfully notified task termination " + taskId); return; } catch (Throwable t) { logger.warn("Cannot notify task termination, trying to rebind to to the task termination handler", t); TaskTerminateNotification rebindedTerminateNotification = taskLauncherRebinder.getRebindedTaskTerminateNotificationHandler(); if (rebindedTerminateNotification != null) { currentTerminateNotification = rebindedTerminateNotification; continue; } logger.warn("Cannot notify task termination " + taskId + ", will try again in " + pingPeriodMs + " ms", <START> t); <END> if (i != pingAttempts - 1) { try { Thread.sleep(pingPeriodMs); } catch (InterruptedException e) { logger.error("Interrupted while waiting to notify task termination", e); } } } } logger.error("Cannot notify task termination " + taskId + " after " + pingAttempts + " attempts, terminating task launcher now"); }</code><technical_language>This method is complicated in terms of try/catch/if/for/continue. splitted methods</technical_language>

Target:
private void sendResultToScheduler(TaskTerminateNotification terminateNotification, TaskResultImpl taskResult) { if (isNodeShuttingDown()) { return; } int pingAttempts = initializer.getPingAttempts(); int pingPeriodMs = initializer.getPingPeriod() * 1000; TaskTerminateNotification currentTerminateNotification = terminateNotification; for (int i = 0; i < pingAttempts; i++) { try { currentTerminateNotification.terminate(taskId, taskResult); logger.debug("Successfully notified task termination " + taskId); return; } catch (Throwable t) { logger.warn("Cannot notify task termination, trying to rebind to the task termination handler", t); TaskTerminateNotification rebindedTerminateNotification = taskLauncherRebinder.getRebindedTaskTerminateNotificationHandler(); if (rebindedTerminateNotification != null) { currentTerminateNotification = rebindedTerminateNotification; continue; } decreasePingAttemptsAndWait(pingAttempts, pingPeriodMs, i, t); } } logger.error("Cannot notify task termination " + taskId + " after " + pingAttempts + " attempts, terminating task launcher now"); }
Source:
<code>private void handleApiVersionsResponse(List<ClientResponse> responses, InFlightRequest req, long now, ApiVersionsResponse apiVersionsResponse) { final String node = req.destination; if (apiVersionsResponse.data.errorCode() != Errors.NONE.code()) { if (req.request.version() == 0 || apiVersionsResponse.data.errorCode() != Errors.UNSUPPORTED_VERSION.code()) { log.warn("Received error from node when making an ApiVersionsRequest with correlation id {}. Disconnecting.", Errors.forCode(apiVersionsResponse.data.errorCode()), node, req.header.correlationId()); this.selector.close(node); processDisconnection(responses, node, now, ChannelState.LOCAL_CLOSE); } else { <START> short failbackVersion = 0; <END> if (apiVersionsResponse.data.apiKeys().size() > 0) { ApiVersionsResponseKey apiVersion = apiVersionsResponse.data.apiKeys().find(ApiKeys.API_VERSIONS.id); if (apiVersion != null) { failbackVersion = apiVersion.maxVersion(); } } nodesNeedingApiVersionsFetch.put(node, new ApiVersionsRequest.Builder(failbackVersion)); } return; } NodeApiVersions nodeVersionInfo = new NodeApiVersions(apiVersionsResponse.data.apiKeys()); apiVersions.update(node, nodeVersionInfo); this.connectionStates.ready(node); log.debug("Recorded API versions for node {}: {}", node, nodeVersionInfo); }</code><technical_language>nit: this fallback? I heard failback I googled a bit - some discussions point</technical_language>

Target:
private void handleApiVersionsResponse(List<ClientResponse> responses, InFlightRequest req, long now, ApiVersionsResponse apiVersionsResponse) { final String node = req.destination; if (apiVersionsResponse.data.errorCode() != Errors.NONE.code()) { if (req.request.version() == 0 || apiVersionsResponse.data.errorCode() != Errors.UNSUPPORTED_VERSION.code()) { log.warn("Received error from node when making an ApiVersionsRequest with correlation id {}. Disconnecting.", Errors.forCode(apiVersionsResponse.data.errorCode()), node, req.header.correlationId()); this.selector.close(node); processDisconnection(responses, node, now, ChannelState.LOCAL_CLOSE); } else { short maxApiVersion = 0; if (apiVersionsResponse.data.apiKeys().size() > 0) { ApiVersionsResponseKey apiVersion = apiVersionsResponse.data.apiKeys().find(ApiKeys.API_VERSIONS.id); if (apiVersion != null) { maxApiVersion = apiVersion.maxVersion(); } } nodesNeedingApiVersionsFetch.put(node, new ApiVersionsRequest.Builder(maxApiVersion)); } return; } NodeApiVersions nodeVersionInfo = new NodeApiVersions(apiVersionsResponse.data.apiKeys()); apiVersions.update(node, nodeVersionInfo); this.connectionStates.ready(node); log.debug("Recorded API versions for node {}: {}", node, nodeVersionInfo); }
Source:
<code>private void onEditorFinalTouchesBeforeShowing() { <START> refreshEditorTheme(); <END> if (mShowGutenbergEditor && mEditorFragment instanceof GutenbergEditorFragment) { refreshEditorContent(); List<MediaModel> failedMedia = mMediaStore.getMediaForPostWithState(mEditPostRepository.getPost(), MediaUploadState.FAILED); if (failedMedia != null && !failedMedia.isEmpty()) { HashSet<Integer> mediaIds = new HashSet<>(); for (MediaModel media : failedMedia) { if (!media.getMarkedLocallyAsFeatured()) { mediaIds.add(media.getId()); } } ((GutenbergEditorFragment) mEditorFragment).resetUploadingMediaToFailed(mediaIds); } } else if (mShowAztecEditor && mEditorFragment instanceof AztecEditorFragment) { mPostEditorAnalyticsSession.start(null); } }</code><technical_language>Curious refreshEditorContent moved gutenberg condition, refreshEditorTheme moved outside. reversed</technical_language>

Target:
private void onEditorFinalTouchesBeforeShowing() { refreshEditorContent(); if (mShowGutenbergEditor && mEditorFragment instanceof GutenbergEditorFragment) { refreshEditorTheme(); List<MediaModel> failedMedia = mMediaStore.getMediaForPostWithState(mEditPostRepository.getPost(), MediaUploadState.FAILED); if (failedMedia != null && !failedMedia.isEmpty()) { HashSet<Integer> mediaIds = new HashSet<>(); for (MediaModel media : failedMedia) { if (!media.getMarkedLocallyAsFeatured()) { mediaIds.add(media.getId()); } } ((GutenbergEditorFragment) mEditorFragment).resetUploadingMediaToFailed(mediaIds); } } else if (mShowAztecEditor && mEditorFragment instanceof AztecEditorFragment) { mPostEditorAnalyticsSession.start(null); } }
Source:
<code>private static List<IkePayload> getChildCreatePayloads( IkeSaPayload saPayload, IkeTrafficSelector[] initTs, IkeTrafficSelector[] respTs, boolean isTransport, boolean isFirstChildSa, RandomnessFactory randomFactory) throws ResourceUnavailableException { List<IkePayload> payloadList = new ArrayList<>(5); payloadList.add(saPayload); payloadList.add(new IkeTsPayload(true , initTs)); payloadList.add(new IkeTsPayload(false , respTs)); if (!isFirstChildSa) { payloadList.add(new <START> IkeNoncePayload(randomFactory.getRandom())); <END> } DhGroupTransform[] dhGroups = ((ChildProposal) saPayload.proposalList.get(0)) .saProposal.getDhGroupTransforms(); if (dhGroups.length != 0 && dhGroups[0].id != DH_GROUP_NONE) { payloadList.add(new IkeKePayload(dhGroups[0].id, randomFactory.getRandom())); } if (isTransport) payloadList.add(new IkeNotifyPayload(NOTIFY_TYPE_USE_TRANSPORT_MODE)); return payloadList; }</code><technical_language>100% clear point decide pass factory passing SecureRandom itself. for a consistent choice a choice of convenience</technical_language>

Target:
private static List<IkePayload> getChildCreatePayloads( IkeSaPayload saPayload, IkeTrafficSelector[] initTs, IkeTrafficSelector[] respTs, boolean isTransport, boolean isFirstChildSa, RandomnessFactory randomFactory) throws ResourceUnavailableException { List<IkePayload> payloadList = new ArrayList<>(5); payloadList.add(saPayload); payloadList.add(new IkeTsPayload(true , initTs)); payloadList.add(new IkeTsPayload(false , respTs)); if (!isFirstChildSa) { payloadList.add(new IkeNoncePayload(randomFactory)); } DhGroupTransform[] dhGroups = ((ChildProposal) saPayload.proposalList.get(0)) .saProposal.getDhGroupTransforms(); if (dhGroups.length != 0 && dhGroups[0].id != DH_GROUP_NONE) { payloadList.add(new IkeKePayload(dhGroups[0].id, randomFactory)); } if (isTransport) payloadList.add(new IkeNotifyPayload(NOTIFY_TYPE_USE_TRANSPORT_MODE)); return payloadList; }
Source:
<code>public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) { if(operation.getExtensions() != null && operation.getExtensions().containsKey(Constants.X_INFLECTOR_HIDDEN)) { <START> return Optional.of(operation); <END> } return Optional.of(operation); }</code><technical_language>I guess want return Optional.empty()</technical_language>

Target:
public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) { if(operation.getExtensions() != null && operation.getExtensions().containsKey(Constants.X_INFLECTOR_HIDDEN)) { return Optional.of(operation); } return Optional.empty(); }
Source:
<code>public static BinaryData fromStream(InputStream inputStream) { Objects.requireNonNull(inputStream, "'inputStream' cannot be null."); final int bufferSize = 1024; try { <START> ByteArrayOutputStream dataOutputBuffer = new ByteArrayOutputStream(); <END> int nRead; byte[] data = new byte[bufferSize]; while ((nRead = inputStream.read(data, 0, data.length)) != -1) { dataOutputBuffer.write(data, 0, nRead); } return fromBytes(dataOutputBuffer.toByteArray()); } catch (IOException ex) { ClientLogger logger = new ClientLogger(BinaryData.class); throw logger.logExceptionAsError(new UncheckedIOException(ex)); } }</code><technical_language>this moves azure-core a specialized ByteArrayOutputStream type allows access internal buffer copying toByteArray is called</technical_language>

Target:
public static BinaryData fromStream(InputStream inputStream) { Objects.requireNonNull(inputStream, "'inputStream' cannot be null."); final int bufferSize = 1024; try { ByteArrayOutputStream dataOutputBuffer = new ByteArrayOutputStream(); int nRead; byte[] data = new byte[bufferSize]; while ((nRead = inputStream.read(data, 0, data.length)) != -1) { dataOutputBuffer.write(data, 0, nRead); } return fromBytes(dataOutputBuffer.toByteArray()); } catch (IOException ex) { throw LOGGER.logExceptionAsError(new UncheckedIOException(ex)); } }
Source:
<code><START> public void shouldReplaceServiceNameWithContainerNameInLinks() { <END> final String serviceNameToLink = "service"; final String containerNameToLink = "container"; List<String> links = new ArrayList<>(); links.add(serviceNameToLink); CheServiceImpl serviceToNormalizeLinks = new CheServiceImpl().withLinks(links); CheServiceImpl service1 = mock(CheServiceImpl.class); CheServiceImpl service2 = mock(CheServiceImpl.class); Map<String, CheServiceImpl> allServices = new HashMap<>(); allServices.put("this", serviceToNormalizeLinks); allServices.put(serviceNameToLink, service1); allServices.put("anotherService", service2); when(service1.getContainerName()).thenReturn(containerNameToLink); engine.normalizeLinks(serviceToNormalizeLinks, allServices); assertEquals(serviceToNormalizeLinks.getLinks().size(), 1); assertEquals(serviceToNormalizeLinks.getLinks().get(0), containerNameToLink + ':' + serviceNameToLink); }</code><technical_language>Please ensure code of MachineProviderImpl is covered</technical_language>

Target:
public void shouldReplaceServiceNameWithContainerNameInLinks() { final String serviceNameToLink = "service"; final String containerNameToLink = "container"; List<String> links = new ArrayList<>(); links.add(serviceNameToLink); CheServiceImpl serviceToNormalizeLinks = new CheServiceImpl().withLinks(links); CheServiceImpl service1 = mock(CheServiceImpl.class); CheServiceImpl service2 = mock(CheServiceImpl.class); Map<String, CheServiceImpl> allServices = new HashMap<>(); allServices.put("this", serviceToNormalizeLinks); allServices.put(serviceNameToLink, service1); allServices.put("anotherService", service2); when(service1.getContainerName()).thenReturn(containerNameToLink); engine.normalizeLinks(serviceToNormalizeLinks, allServices); assertEquals(serviceToNormalizeLinks.getLinks().size(), 1); assertEquals(serviceToNormalizeLinks.getLinks().get(0), containerNameToLink); }
Source:
<code>public List<ArtifactTypeBean> types() throws ArtificerUiException { List<String> types = null; try { types = ArtificerApiClientAccessor.getClient().getTypes(); } catch (ArtificerClientException e) { <START> e.printStackTrace(); <END> } catch (ArtificerServerException e) { e.printStackTrace(); } List<ArtifactTypeBean> returnTypes = new ArrayList<ArtifactTypeBean>(); if (types != null && !types.isEmpty()) { for (String type : types) { returnTypes.add(new ArtifactTypeBean(type)); } } return returnTypes; }</code><technical_language>Need here</technical_language>

Target:
public List<ArtifactTypeBean> types() throws ArtificerUiException { List<String> types = null; try { types = ArtificerApiClientAccessor.getClient().getTypes(); } catch (ArtificerClientException e) { throw new ArtificerUiException(e.getMessage()); } catch (ArtificerServerException e) { throw new ArtificerUiException(e.getMessage()); } List<ArtifactTypeBean> returnTypes = new ArrayList<ArtifactTypeBean>(); if (types != null && !types.isEmpty()) { for (String type : types) { returnTypes.add(new ArtifactTypeBean(type)); } } return returnTypes; }
Source:
<code>default <R, A> R collect(Collector<? super T,A,R> collector) { return collector.finisher() .apply(this.collect(collector.supplier(), <START> collector.accumulator(), null)); <END> }</code><technical_language>please spaces instead of tabs</technical_language>

Target:
default <R, A> R collect(Collector<? super T,A,R> collector) { return StreamSupport.stream(spliterator(), false).collect(collector); }
Source:
<code>public <T extends LwM2mResponse> void send(final Registration destination, final DownlinkRequest<T> request, ResponseCallback<T> responseCallback, ErrorCallback errorCallback) { <START> if (destination.getLwM2mQueue().isClientSleeping()) { <END> return; } final LwM2mModel model = modelProvider.getObjectModel(destination); CoapRequestBuilder coapRequestBuilder = new CoapRequestBuilder( new InetSocketAddress(destination.getAddress(), destination.getPort()), destination.getRootPath(), destination.getId(), destination.getEndpoint(), model, encoder); request.accept(coapRequestBuilder); final Request coapRequest = coapRequestBuilder.getRequest(); coapRequest.addMessageObserver(new AsyncRequestObserver<T>(coapRequest, responseCallback, errorCallback) { @Override public T buildResponse(Response coapResponse) { LwM2mResponseBuilder<T> lwm2mResponseBuilder = new LwM2mResponseBuilder<>(coapRequest, coapResponse, destination, model, observationService, decoder); request.accept(lwm2mResponseBuilder); return lwm2mResponseBuilder.getResponse(); } }); addPendingRequest(destination, coapRequest); Endpoint endpoint = getEndpointForClient(destination); endpoint.sendRequest(coapRequest); if (destination.usesQueueMode() && !destination.getLwM2mQueue().isClientSleeping()) { destination.getLwM2mQueue().startClientAwakeTimer(); } }</code><technical_language>returning feedback users a good idea</technical_language>

Target:
public <T extends LwM2mResponse> void send(final Registration destination, final DownlinkRequest<T> request, ResponseCallback<T> responseCallback, ErrorCallback errorCallback) { if (destination.getLwM2mQueue().isClientSleeping()) { LOG.info("The destination client is sleeping, request couldn't been sent."); return; } final LwM2mModel model = modelProvider.getObjectModel(destination); CoapRequestBuilder coapRequestBuilder = new CoapRequestBuilder( new InetSocketAddress(destination.getAddress(), destination.getPort()), destination.getRootPath(), destination.getId(), destination.getEndpoint(), model, encoder); request.accept(coapRequestBuilder); final Request coapRequest = coapRequestBuilder.getRequest(); coapRequest.addMessageObserver(new AsyncRequestObserver<T>(coapRequest, responseCallback, errorCallback) { @Override public T buildResponse(Response coapResponse) { LwM2mResponseBuilder<T> lwm2mResponseBuilder = new LwM2mResponseBuilder<>(coapRequest, coapResponse, destination, model, observationService, decoder); request.accept(lwm2mResponseBuilder); return lwm2mResponseBuilder.getResponse(); } }); addPendingRequest(destination, coapRequest); Endpoint endpoint = getEndpointForClient(destination); endpoint.sendRequest(coapRequest); if (destination.usesQueueMode() && !destination.getLwM2mQueue().isClientSleeping()) { destination.getLwM2mQueue().startClientAwakeTimer(); } }
Source:
<code>private boolean portExists(String portName) { @SuppressWarnings("unchecked") Enumeration<CommPortIdentifier> portEnum = CommPortIdentifier.getPortIdentifiers(); boolean portExists = false; logger.debug("Searching autodetected ports for:" + portName); while (portEnum.hasMoreElements()) { CommPortIdentifier portIdentifier = portEnum.nextElement(); if (portIdentifier.getPortType() == CommPortIdentifier.PORT_SERIAL) { <START> logger.debug("Found serial port:" + portIdentifier.getName()); <END> if (portIdentifier.getName().equals(portName)) { portExists = true; } } } if (!portExists) { Properties properties = System.getProperties(); String currentPorts = properties.getProperty("gnu.io.rxtx.SerialPorts", ""); if (currentPorts.indexOf(portName) >= 0) { logger.debug(portName + " is listed in system property gnu.io.rxtx.SerialPorts"); portExists = true; } else { logger.debug(portName + " is not listed in system property gnu.io.rxtx.SerialPorts"); } } return portExists; }</code><technical_language>Please parameterized logging instead of string concatenation</technical_language>

Target:
private boolean portExists(String portName) { @SuppressWarnings("unchecked") Enumeration<CommPortIdentifier> portEnum = CommPortIdentifier.getPortIdentifiers(); boolean portExists = false; logger.debug("Searching autodetected ports for: {}", portName); while (portEnum.hasMoreElements()) { CommPortIdentifier portIdentifier = portEnum.nextElement(); if (portIdentifier.getPortType() == CommPortIdentifier.PORT_SERIAL) { logger.debug("Found serial port: {}", portIdentifier.getName()); if (portIdentifier.getName().equals(portName)) { portExists = true; } } } if (!portExists) { Properties properties = System.getProperties(); String currentPorts = properties.getProperty("gnu.io.rxtx.SerialPorts", ""); if (currentPorts.indexOf(portName) >= 0) { logger.debug("{} is listed in system property gnu.io.rxtx.SerialPorts", portName); portExists = true; } else { logger.debug("{} is not listed in system property gnu.io.rxtx.SerialPorts", portName); } } return portExists; }
Source:
<code>public int partition(RowData record, byte[] key, byte[] value, String targetTopic, int[] partitions) { <START> return record.getInt(PARTITION_ID_FIELD_IN_SCHEMA) % partitions.length; <END> }</code><technical_language>suggestion return partitions[record.getInt(PARTITION_ID_FIELD_IN_SCHEMA) % partitions.length];</technical_language>

Target:
public int partition(RowData record, byte[] key, byte[] value, String targetTopic, int[] partitions) { return partitions[record.getInt(PARTITION_ID_FIELD_IN_SCHEMA) % partitions.length]; }
Source:
<code>public void prepareRun(StageSubmitterContext context) throws Exception { super.prepareRun(context); <START> FailureCollector collector = context.getFailureCollector(); <END> collector.getOrThrowException(); if (fields != null) { FieldOperation operation = new FieldTransformOperation("Parse", "Parsed field", Collections.singletonList(config.field), fields.stream().map(Schema.Field::getName) .collect(Collectors.toList())); context.record(Collections.singletonList(operation)); } }</code><technical_language>This is for validation, basically do in configurePipeline(), need this</technical_language>

Target:
public void prepareRun(StageSubmitterContext context) throws Exception { super.prepareRun(context); extractMappings(context.getFailureCollector()); if (isSimple) { context.record(TransformLineageRecorderUtils.generateOneToMany(config.field, TransformLineageRecorderUtils .getFields(context.getOutputSchema()), "Parse", "Parsed fields as JSON.")); return; } List<String> mappedFields = TransformLineageRecorderUtils.getFields(context.getOutputSchema()).stream() .filter(mapping::containsKey).collect(Collectors.toList()); List<String> identityFields = TransformLineageRecorderUtils.getFields(context.getInputSchema()); identityFields.removeAll(mappedFields); List<FieldOperation> output = new ArrayList<>(); output.addAll(TransformLineageRecorderUtils.generateOneToOnes(mappedFields, "Parse", "Parsed fields as JSON.")); output.addAll(TransformLineageRecorderUtils.generateOneToOnes(identityFields, "identity", TransformLineageRecorderUtils.IDENTITY_TRANSFORM_DESCRIPTION)); context.record(output); }
Source:
<code>public void accumulate(long cx) { <START> N += cx; <END> M += (cx == 0 ? 0 : cx * Math.log(cx)); }</code><technical_language>simpler wrap lines in if: if (cx > 0) { .. }</technical_language>

Target:
public void accumulate(long cx) { if(cx > 0) { N += cx; M += cx * Math.log(cx); } }
Source:
<code>protected OperationRequest(ConnectionPool connectionPool, BlockingQueue<OperationResponse> responseQueue, OperationContext context, BlobId blobId, ReplicaId replicaId, RequestOrResponse request) { this.connectionPool = connectionPool; this.responseQueue = responseQueue; this.context = context; this.blobId = blobId; this.replicaId = replicaId; this.request = request; <START> this.sslEnabled = isSslEnabled(); <END> this.responseHandler = context.getResponseHandler(); }</code><technical_language>call instance method in constructor, based some discussion internet. I suggest call "context.getSslEnabledDatacenters().contains(replicaId.getDataNodeId().getDatacenterName())" here. in isSslEnabled() method, return this.sslEnabled</technical_language>

Target:
protected OperationRequest(ConnectionPool connectionPool, BlockingQueue<OperationResponse> responseQueue, OperationContext context, BlobId blobId, ReplicaId replicaId, RequestOrResponse request) { this.connectionPool = connectionPool; this.responseQueue = responseQueue; this.context = context; this.blobId = blobId; this.replicaId = replicaId; this.request = request; this.responseHandler = context.getResponseHandler(); this.port = replicaId.getDataNodeId().getPortToConnectTo(context.getSslEnabledDatacenters()); this.sslEnabled = port.getPortType() == PortType.SSL; }
Source:
<code>public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { if (getId() != null && getId() < 1L) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role id provided"); } List<Role> roles = roleService.findAllRolesBy(getId(), getName(), getRoleType()); ListResponse<RoleResponse> response = new ListResponse<>(); List<RoleResponse> roleResponses = new ArrayList<>(); for (Role role : roles) { if (role == null) { continue; } RoleResponse roleResponse = new RoleResponse(); roleResponse.setId(role.getUuid()); roleResponse.setRoleName(role.getName()); roleResponse.setRoleType(role.getRoleType()); roleResponse.setDescription(role.getDescription()); roleResponse.setObjectName("role"); roleResponses.add(roleResponse); } response.setResponses(roleResponses); response.setResponseName(getCommandName()); setResponseObject(response); <START> } <END></code><technical_language>create commands: factor out</technical_language>

Target:
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { final List<Role> roles; if (getId() != null && getId() > 0L) { roles = Collections.singletonList(roleService.findRole(getId())); } else if (!Strings.isNullOrEmpty(getName())) { roles = roleService.findRolesByName(getName()); } else if (getRoleType() != null){ roles = roleService.findRolesByType(getRoleType()); } else { roles = roleService.listRoles(); } setupResponse(roles); }
Source:
<code><START> public static boolean validateDate(String dateString, DateTime minDate, DateTime maxDate) { <END> String s = dateString.trim(); if (s.isEmpty() || s.length() < 8 || s.length() > 10) { return false; } if (!s.contains("/")) { return false; } int numberOfDashes = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == '/') { numberOfDashes++; } } if (numberOfDashes != 2) { return false; } else { String[] bundledDate = s.split("/"); int day = Integer.parseInt(bundledDate[0]), month = Integer.parseInt(bundledDate[1]), year = Integer.parseInt(bundledDate[2]); int maxDays = month == 2 ? (year % 4 == 0 ? 29 : 28) : (day == 31 && month == 4 || month == 6 || month == 9 || month == 11 ? 30 : 31); int maxMonths = 12; if (day <= 0 || day > maxDays || month <= 0 || month > maxMonths || year <= minDate.getYear() || year > maxDate.getYear()) { return false; } else { DateTimeFormatter formatter = DateTimeFormat.forPattern(DateUtils.DEFAULT_DATE_FORMAT); DateTime dob = formatter.parseDateTime(s); return dob.isAfter(minDate.toInstant()) && dob.isBefore(maxDate.toInstant()); } } }</code><technical_language>@f4ww4z, please write tests for this function? write tests in this PR open a new issue I assign you</technical_language>

Target:
public static boolean validateDate(String dateString, DateTime minDate, DateTime maxDate) { DateTime minimumDate = minDate, maximumDate = maxDate; if (minimumDate.isAfter(maximumDate) || maximumDate.isBefore(minimumDate)) { minimumDate = maxDate; maximumDate = minDate; } String s = dateString.trim(); if (s.isEmpty() || s.length() < 8 || s.length() > 10) { return false; } if (!s.contains("/")) { return false; } int numberOfDashes = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == '/') { numberOfDashes++; } } if (numberOfDashes != 2) { return false; } else { String[] bundledDate = s.split("/"); int day = Integer.parseInt(bundledDate[0]), month = Integer.parseInt(bundledDate[1]), year = Integer.parseInt(bundledDate[2]); int maxDays; if (month == 2) { if (year % 4 == 0) { maxDays = 29; } else { maxDays = 28; } } else if (day == 31 && month == 4 || month == 6 || month == 9 || month == 11) { maxDays = 30; } else { maxDays = 31; } int maxMonths = 12; if (day <= 0 || day > maxDays || month <= 0 || month > maxMonths || year <= minimumDate.getYear() || year > maximumDate.getYear()) { return false; } else { DateTimeFormatter formatter = DateTimeFormat.forPattern(DateUtils.DEFAULT_DATE_FORMAT); DateTime dob = formatter.parseDateTime(s); return dob.isAfter(minimumDate.toInstant()) && dob.isBefore(maxDate.toInstant()); } } }
Source:
<code>public GifFrameManager(Context context, BitmapPool bitmapPool, GifDecoder decoder, Handler mainHandler, Transformation<Bitmap> transformation, int targetWidth, int targetHeight, int frameWidth, int frameHeight) { this.context = context; this.decoder = decoder; this.mainHandler = mainHandler; <START> this.transformation = new Transformation[] {transformation}; <END> this.targetWidth = targetWidth; this.targetHeight = targetHeight; this.totalFrameSize = frameWidth * frameHeight * (decoder.isTransparent() ? 4 : 2); calculator = new MemorySizeCalculator(context); frameLoader = new GifFrameModelLoader(); frameResourceDecoder = new GifFrameResourceDecoder(bitmapPool); sourceEncoder = NullEncoder.get(); if (transformation == null) { throw new NullPointerException("Transformation must not be null"); } if (!decoder.isTransparent()) { cacheDecoder = new FileToStreamDecoder<Bitmap>(new StreamBitmapDecoder(context)); encoder = new BitmapEncoder(); } else { cacheDecoder = NullDecoder.get(); encoder = NullResourceEncoder.get(); } }</code><technical_language>Is array avoid allocation for frame varargs .transform() method in builder? If I fine, move transformation != null assertion in line 73 array creation</technical_language>

Target:
public GifFrameManager(Context context, BitmapPool bitmapPool, GifDecoder decoder, Handler mainHandler, Transformation<Bitmap> transformation, int targetWidth, int targetHeight, int frameWidth, int frameHeight) { if (transformation == null) { throw new NullPointerException("Transformation must not be null"); } this.context = context; this.frameResourceDecoder = new GifFrameResourceDecoder(bitmapPool); this.decoder = decoder; this.mainHandler = mainHandler; this.transformation = new Transformation[] {transformation}; this.targetWidth = targetWidth; this.targetHeight = targetHeight; this.totalFrameSize = frameWidth * frameHeight * (decoder.isTransparent() ? 4 : 2); this.calculator = new MemorySizeCalculator(context); this.frameLoader = new GifFrameModelLoader(); this.sourceEncoder = NullEncoder.get(); if (!decoder.isTransparent()) { this.cacheDecoder = new FileToStreamDecoder<Bitmap>(new StreamBitmapDecoder(context)); this.encoder = new BitmapEncoder(); } else { this.cacheDecoder = NullDecoder.get(); this.encoder = NullResourceEncoder.get(); } }
Source:
<code>private void startAutoMove(EntityRef entity) { isAutoMove = true; ClientComponent clientComponent = entity.getComponent(ClientComponent.class); <START> new Thread(() -> { <END> while(isAutoMove) { try { Vector3f viewDir = entity.getComponent(LocationComponent.class).getWorldDirection(); clientComponent.character.send(new CharacterImpulseEvent(viewDir.mul(8f))); Thread.sleep(200); } catch (Exception e) { isAutoMove = false; } } }).start(); }</code><technical_language>Imho this done a new Thread, of DelayManager. schedule events there, cancel periodic events if auto-move stop</technical_language>

Target:
private void startAutoMove(EntityRef entity) { isAutoMove = true; delayManager.addPeriodicAction(entity, AUTO_MOVE_ID, 0, 200); }
Source:
<code>public Map<String, Object> saveExistingQuestions( @RequestBody QuestionListPayload payLoad) { final Map<String, Object> response = new HashMap<String, Object>(); RestStatusDto statusDto = new RestStatusDto(); statusDto.setStatus("failed"); statusDto.setMessage("No questions to change"); final List<QuestionDto> requestList = payLoad.getQuestions(); if (requestList != null && requestList.size() > 0) { for (final QuestionDto questionDto : requestList) { if (questionDto != null) { Long keyId = questionDto.getKeyId(); Question q; if (keyId != null) { q = questionDao.getByKey(keyId); if (q != null) { BeanUtils.copyProperties(questionDto, q, new String[] { "createdDateTime", "type", "optionList" }); if (questionDto.getType() != null) q.setType(Question.Type.valueOf(questionDto.getType() .toString())); <START> q = questionDao.save(q); <END> } else { statusDto.setMessage("Cannot change unknown question " + keyId); response.put("meta", statusDto); return response; } } else { statusDto.setMessage("Cannot change question without id"); response.put("meta", statusDto); return response; } } } } statusDto.setStatus("ok"); statusDto.setMessage(""); response.put("meta", statusDto); return response; }</code><technical_language>BaseDAO.save(Collection )</technical_language>

Target:
public Map<String, Object> saveExistingQuestions( @RequestBody QuestionListPayload payLoad) { final Map<String, Object> response = new HashMap<String, Object>(); RestStatusDto statusDto = new RestStatusDto(); statusDto.setStatus("failed"); statusDto.setMessage("No questions to change"); List<Question> saveList = new ArrayList<>(); final List<QuestionDto> requestList = payLoad.getQuestions(); if (requestList != null && requestList.size() > 0) { for (final QuestionDto questionDto : requestList) { if (questionDto != null) { Long keyId = questionDto.getKeyId(); Question q; if (keyId != null) { q = questionDao.getByKey(keyId); if (q != null) { BeanUtils.copyProperties(questionDto, q, new String[] { "createdDateTime", "type", "optionList" }); if (questionDto.getType() != null) q.setType(Question.Type.valueOf(questionDto.getType() .toString())); saveList.add(q); } else { statusDto.setMessage("Cannot change unknown question " + keyId); response.put("meta", statusDto); return response; } } else { statusDto.setMessage("Cannot change question without id"); response.put("meta", statusDto); return response; } } } questionDao.save(saveList); statusDto.setStatus("ok"); statusDto.setMessage(""); } response.put("meta", statusDto); return response; }
Source:
<code>public void accept(final Socket socket) throws IOException { <START> this.threads.add(new BkTimeable.ThreadInfo(Thread.currentThread())); <END> this.origin.accept(socket); }</code><technical_language>@dmzaytsev ThreadInfo read currentThread in Ctor, need pass static</technical_language>

Target:
public void accept(final Socket socket) throws IOException { this.threads.add(new BkTimeable.ThreadInfo()); this.origin.accept(socket); }