auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String[] getFinalizedUptoPartitions(List<Message> lastMessages, List<Message> committedMessages) throws Exception { <START> return null; <END> }</code><technical_language>able implement this method. 'eventType' element in partition list</technical_language>

Target:
public String[] getFinalizedUptoPartitions(List<Message> lastMessages, List<Message> committedMessages) throws Exception { throw new UnsupportedOperationException("Partition finalization is not supported"); }
Source:
<code><START> OffHeapResource(long size) { <END> if (size < 0) { throw new IllegalArgumentException("Resource size cannot be negative"); } else { this.remaining = new AtomicLong(size); } }</code><technical_language>I size argument in a final variable a getter for sake of M&M</technical_language>

Target:
OffHeapResource(long size) throws IllegalArgumentException { if (size < 0) { throw new IllegalArgumentException("Resource size cannot be negative"); } else { this.remaining = new AtomicLong(size); } }
Source:
<code>private ServiceHandle<S> doRegister(ServiceEndPoint endPoint) { checkNotNull(endPoint); ServiceHandle<S> toDelete = null; ServiceHandle<S> toReturn; synchronized ( this ) { HeavyServiceHandle<S> existingServiceHandle = _instancesPerEndpoint.get(endPoint); if ( existingServiceHandle == null || existingServiceHandle.hasBeenFlaggedForEviction() || existingServiceHandle.isOld() ) { S service = _serviceFactory.create(endPoint); _serviceCounter.inc(); HeavyServiceHandle<S> newServiceHandle = new HeavyServiceHandle<>(service, endPoint); Map<ServiceEndPoint, HeavyServiceHandle<S>> sourceCopy = Maps.newHashMap(_instancesPerEndpoint); sourceCopy.put(endPoint, newServiceHandle); _instancesPerEndpoint = sourceCopy; <START> if (existingServiceHandle != null) { <END> toDelete = existingServiceHandle; } toReturn = newServiceHandle; } else { toReturn = existingServiceHandle; } } if (toDelete != null) { destroyService(toDelete); _serviceCounter.dec(); } return toReturn; }</code><technical_language>This condition is unnecessary. set toDelete = existingServiceHandle</technical_language>

Target:
private ServiceHandle<S> doRegister(ServiceEndPoint endPoint) { checkNotNull(endPoint); ServiceHandle<S> toDelete = null; ServiceHandle<S> toReturn; synchronized (this) { HeavyServiceHandle<S> existingServiceHandle = _instancesPerEndpoint.get(endPoint); if (existingServiceHandle == null || existingServiceHandle.hasBeenFlaggedForEviction() || existingServiceHandle.isOld()) { S service = _serviceFactory.create(endPoint); _serviceCounter.inc(); HeavyServiceHandle<S> newServiceHandle = new HeavyServiceHandle<>(service, endPoint); Map<ServiceEndPoint, HeavyServiceHandle<S>> sourceCopy = Maps.newHashMap(_instancesPerEndpoint); sourceCopy.put(endPoint, newServiceHandle); _instancesPerEndpoint = sourceCopy; toDelete = existingServiceHandle; toReturn = newServiceHandle; } else { toReturn = existingServiceHandle; } } if (toDelete != null) { destroyService(toDelete); _serviceCounter.dec(); } return toReturn; }
Source:
<code>public OmemoBundleElement(int signedPreKeyId, String signedPreKeyB64, String signedPreKeySigB64, String identityKeyB64, HashMap<Integer, String> preKeysB64) { if (signedPreKeyId <= 0) { throw new IllegalArgumentException("signedPreKeyId MUST be greater than 0."); } this.signedPreKeyId = signedPreKeyId; <START> if (StringUtils.isNullOrEmpty(signedPreKeyB64)) { <END> throw new IllegalArgumentException("signedPreKeyB64 MUST NOT be null nor empty."); } this.signedPreKeyB64 = signedPreKeyB64; if (StringUtils.isNullOrEmpty(signedPreKeySigB64)) { throw new IllegalArgumentException("signedPreKeySigB64 MUST NOT be null nor empty."); } this.signedPreKeySignatureB64 = signedPreKeySigB64; if (StringUtils.isNullOrEmpty(identityKeyB64)) { throw new IllegalArgumentException("identityKeyB64 MUST NOT be null nor empty."); } this.identityKeyB64 = identityKeyB64; if (preKeysB64 == null || preKeysB64.isEmpty()) { throw new IllegalArgumentException("PreKeys MUST NOT be null nor empty."); } this.preKeysB64 = preKeysB64; }</code><technical_language>is StringUtils.requireNotNullOrEmpty() for this case. Please that</technical_language>

Target:
public OmemoBundleElement(int signedPreKeyId, String signedPreKeyB64, String signedPreKeySigB64, String identityKeyB64, HashMap<Integer, String> preKeysB64) { if (signedPreKeyId <= 0) { throw new IllegalArgumentException("signedPreKeyId MUST be greater than 0."); } this.signedPreKeyId = signedPreKeyId; this.signedPreKeyB64 = StringUtils.requireNotNullNorEmpty(signedPreKeyB64, "signedPreKeyB64 MUST NOT be null nor empty."); this.signedPreKeySignatureB64 = StringUtils.requireNotNullNorEmpty(signedPreKeySigB64, "signedPreKeySigB64 MUST NOT be null nor empty."); this.identityKeyB64 = StringUtils.requireNotNullNorEmpty(identityKeyB64, "identityKeyB64 MUST NOT be null nor empty."); if (preKeysB64 == null || preKeysB64.isEmpty()) { throw new IllegalArgumentException("PreKeys MUST NOT be null nor empty."); } this.preKeysB64 = preKeysB64; }
Source:
<code>public static NewDeviceRequestDTO createInstance(NewDeviceRequest newDeviceRequestEntity) { <START> if (newDeviceRequestEntity == null) <END> { return new NewDeviceRequestDTO(null, null); } return new NewDeviceRequestDTO(newDeviceRequestEntity.getExpirationTime(), null); }</code><technical_language>do support creating a DTO entity</technical_language>

Target:
public static NewDeviceRequestDTO createInstance(NewDeviceRequest newDeviceRequestEntity) { return new NewDeviceRequestDTO(null, false); }
Source:
<code>private boolean testStorageConnection() { <START> AddManagedBlockStorageDomainParameters parameters = (AddManagedBlockStorageDomainParameters) getParameters(); Map<String, Object> driverOptions = new HashMap<>(parameters.getDriverOptions()); if (parameters.getDriverSensitiveOptions() != null) { driverOptions.putAll(parameters.getDriverSensitiveOptions()); } CinderlibReturnValue returnValue = null; Map<String, Object> storageStats; try { CinderlibCommandParameters params = new CinderlibCommandParameters(JsonHelper.mapToJson(driverOptions, false), Collections.singletonList(Boolean.TRUE.toString())); returnValue = cinderlibExecutor.runCommand(CinderlibExecutor.CinderlibCommand.STORAGE_STAT, params); storageStats = JsonHelper.jsonToMap(returnValue.getOutput()); } catch (Exception e) { failValidation(EngineMessage.FAILED_TO_CONNECT_MANAGED_BLOCK_DOMAIN, String.format("$output %1$s", returnValue != null ? returnValue.getOutput() : "")); return false; } if (storageStats != null) { log.debug(storageStats.toString()); } return (returnValue.getSucceed() && storageStats != null) || failValidation(EngineMessage.FAILED_TO_CONNECT_MANAGED_BLOCK_DOMAIN, String.format("$output %1$s", returnValue.getOutput())); <END> }</code><technical_language>I moved command, prove useful (a test button in UI?)</technical_language>

Target:
private boolean testStorageConnection() { ActionReturnValue actionReturnValue = runInternalAction(ActionType.GetManagedBlockStorageStat, getParameters()); return (actionReturnValue.getSucceeded() && actionReturnValue.getActionReturnValue() != null) || failValidation(EngineMessage.FAILED_TO_CONNECT_MANAGED_BLOCK_DOMAIN); }
Source:
<code>public void operateOn(StructuredRecord record) { T field = record.get(fieldName); <START> if (Objects.nonNull(field)) { <END> collectSet.add(field); } }</code><technical_language>set filters out nulls list not? consistent. initial thought is include nulls</technical_language>

Target:
public void operateOn(StructuredRecord record) { T field = record.get(fieldName); collectSet.add(field); }
Source:
<code>protected String getFixedPart() { if (getDefinition().getWhereClause() != null) { String fixedPart = getDefinition().getWhereClause().getFixedPart(); <START> if (fixedPart != null && !fixedPart.isEmpty()) { <END> return fixedPart; } } if (getParameters().length == 3) { return complexQuery; } else { return singleQuery; } }</code><technical_language>suggestion if (StringUtils.isNotEmpty(fixedPart)) {</technical_language>

Target:
protected String getFixedPart() { if (getDefinition().getWhereClause() != null) { String fixedPart = getDefinition().getWhereClause().getFixedPart(); if (StringUtils.isNotEmpty(fixedPart)) { return fixedPart; } } if (getParameters().length == 3) { return complexQuery; } else { return singleQuery; } }
Source:
<code>public File getRepositoryArchive(Integer projectId, String sha, File directory, String format) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("sha", sha); Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD, <START> "projects", projectId, "repository", "archive".concat(checkFormat(format))); <END> try { if (directory == null) directory = new File(System.getProperty("java.io.tmpdir")); String filename = FileUtils.getFilenameFromContentDisposition(response); File file = new File(directory, filename); InputStream in = response.readEntity(InputStream.class); Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING); return (file); } catch (IOException ioe) { throw new GitLabApiException(ioe); } }</code><technical_language>I more understandable do following: // Throws a GitLabApiException if format is invalid format = checkFormat(format); Form formData = new GitLabApiForm().withParam("sha", sha); Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD, "projects", projectId, "repository", "archive", ".", format);</technical_language>

Target:
public File getRepositoryArchive(Integer projectId, String sha, File directory, String format) throws GitLabApiException { format = checkFormat(format); Form formData = new GitLabApiForm().withParam("sha", sha); Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD, "projects", projectId, "repository", "archive", ".", format); try { if (directory == null) directory = new File(System.getProperty("java.io.tmpdir")); String filename = FileUtils.getFilenameFromContentDisposition(response); File file = new File(directory, filename); InputStream in = response.readEntity(InputStream.class); Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING); return (file); } catch (IOException ioe) { throw new GitLabApiException(ioe); } }
Source:
<code>public void doesNotFallbackOnPingWhenPingV2Responds() { availableServer.stubFor(PING_V2_MAPPING.willReturn(WireMock.aResponse().withStatus(200) .withBody("{\"isLeader\":false}"))); pingerWithVersion(OrderableSlsVersion.valueOf("1.1.1")).pingLeaderWithUuid(REMOTE_UUID); List<LoggedRequest> requests = WireMock.findAll(WireMock.getRequestedFor(WireMock.urlMatching(PING_V2))); assertThat(requests.size()).isEqualTo(1); <START> requests = WireMock.findAll(WireMock.getRequestedFor(WireMock.urlMatching(PING))); <END> assertThat(requests.size()).isEqualTo(0); }</code><technical_language>reuse set, for readability</technical_language>

Target:
public void doesNotFallbackOnPingWhenPingV2Responds() { availableServer.stubFor(PING_V2_MAPPING.willReturn(WireMock.aResponse().withStatus(200) .withBody("{\"isLeader\":false}"))); getDefaultLeaderPinger().pingLeaderWithUuid(REMOTE_UUID); assertPingV2RequestsMadeAreExactly(1); assertLegacyPingRequestsMade(0); }
Source:
<code>public IStyledString.IComposedStyledString getStyledText(Object object) { final AttributeChange attChange = (AttributeChange)object; final String valueText = getValueText(attChange); final String attributeText = getAttributeText(attChange); ComposedStyledString ret = new ComposedStyledString(); final Object attChangeValue = attChange.getValue(); if (attChangeValue instanceof EObject && ((EObject)attChangeValue).eIsProxy()) { StyleBuilder sb = new StyleBuilder(); sb.setFont(IItemFontProvider.ITALIC_FONT); <START> ret.append(valueText, sb.build()); <END> } else { ret.append(valueText); } ret.append(" [" + attributeText, Style.DECORATIONS_STYLER); switch (attChange.getKind()) { case ADD: ret.append(" add", Style.DECORATIONS_STYLER); break; case DELETE: ret.append(" delete", Style.DECORATIONS_STYLER); break; case CHANGE: ret.append( " " + ReferenceChangeItemProviderSpec.changeText(attChange, attChange.getAttribute()), Style.DECORATIONS_STYLER); break; case MOVE: ret.append(" move", Style.DECORATIONS_STYLER); break; default: throw new IllegalStateException("Unsupported " + DifferenceKind.class.getSimpleName() + " value: " + attChange.getKind()); } ret.append("]", Style.DECORATIONS_STYLER); return ret; }</code><technical_language>simplified calling factory method: Style.builder().setFont(IItemFontProvider.ITALIC_FONT).build()</technical_language>

Target:
public IStyledString.IComposedStyledString getStyledText(Object object) { final AttributeChange attChange = (AttributeChange)object; final String valueText = getValueText(attChange); final String attributeText = getAttributeText(attChange); ComposedStyledString ret = new ComposedStyledString(); final Object attChangeValue = attChange.getValue(); if (attChangeValue instanceof EObject && ((EObject)attChangeValue).eIsProxy()) { Style italic = Style.builder().setFont(IItemFontProvider.ITALIC_FONT).build(); ret.append(valueText, italic); } else { ret.append(valueText); } ret.append(" [" + attributeText, Style.DECORATIONS_STYLER); switch (attChange.getKind()) { case ADD: ret.append(" add", Style.DECORATIONS_STYLER); break; case DELETE: ret.append(" delete", Style.DECORATIONS_STYLER); break; case CHANGE: ret.append( " " + ReferenceChangeItemProviderSpec.changeText(attChange, attChange.getAttribute()), Style.DECORATIONS_STYLER); break; case MOVE: ret.append(" move", Style.DECORATIONS_STYLER); break; default: throw new IllegalStateException("Unsupported " + DifferenceKind.class.getSimpleName() + " value: " + attChange.getKind()); } ret.append("]", Style.DECORATIONS_STYLER); return ret; }
Source:
<code>private boolean isThreadLocalRequired(InvocationContext context) { return context.getClassLoader() != null && <START> context.getClassLoader() != Configurations.getClassLoader(configuration, globalConfiguration); <END> }</code><technical_language>instead of Configuration GlobalConfiguration field, a reference ClassLoader returned Configurations.getClassLoader(configuration, globalConfiguration). I change configurations read-only. wdyt</technical_language>

Target:
private boolean isThreadLocalRequired(InvocationContext context) { return context.getClassLoader() != null && context.getClassLoader() != configuredClassLoader; }
Source:
<code>private int createHashCode() { int result = System.identityHashCode( scriptEvaluatorFactory ); result = 31 * result + System.identityHashCode( clockProvider ); <START> result = 31 * result + ( temporalValidationTolerance != null ? temporalValidationTolerance.hashCode() : 0 ); <END> result = 31 * result + System.identityHashCode( constraintValidatorPayload ); return result; }</code><technical_language>temporalValidationTolerance null (and null check in equals() method anyway). change</technical_language>

Target:
private int createHashCode() { int result = System.identityHashCode( scriptEvaluatorFactory ); result = 31 * result + System.identityHashCode( clockProvider ); result = 31 * result + temporalValidationTolerance.hashCode(); result = 31 * result + System.identityHashCode( constraintValidatorPayload ); return result; }
Source:
<code>protected R replace(R restModel, Operation operation) throws UnprocessableEntityException, PatchBadRequestException { throw new UnprocessableEntityException( <START> "The remove operation is not supported." <END> ); }</code><technical_language>tiny, picky thing. This replace operation is supported</technical_language>

Target:
protected R replace(R restModel, Operation operation) throws UnprocessableEntityException, PatchBadRequestException { throw new UnprocessableEntityException( "The replace operation is not supported." ); }
Source:
<code>private ModelEntity cloneEntityExcludingEditorComponents(ModelEntity source) { ModelEntity clone = new ModelEntity(); for (Field field : ClassReflection.getDeclaredFields(source.getClass())) { field.setAccessible(true); <START> if (field.getName().equals("components")) { <END> clone.setComponents(new ArrayList<ModelComponent>()); for (ModelComponent sourceComponent : source.getComponents()) { if (!sourceComponent.getClass().getCanonicalName() .contains("es.eucm.ead.schema.editor.components")) { clone.getComponents().add(sourceComponent); } } } else if (field.getName().equals("children")) { clone.setChildren(new ArrayList<ModelEntity>()); for (ModelEntity child : source.getChildren()) { clone.getChildren().add( cloneEntityExcludingEditorComponents(child)); } } else { try { field.set(clone, field.get(source)); } catch (ReflectionException e) { Gdx.app.debug( "Exporter.cloneEntityExcludingEditorComponents", "Error while removing editor components from ModelEntitye " + source, e); } } } return clone; }</code><technical_language>class FieldNames field names. link exporter is in editor, move schema (as GameStructure) add components children fields</technical_language>

Target:
private ModelEntity cloneEntityExcludingEditorComponents(ModelEntity source) { ModelEntity clone = new ModelEntity(); for (Field field : ClassReflection.getDeclaredFields(source.getClass())) { field.setAccessible(true); if (field.getName().equals(FieldNames.COMPONENTS.toString())) { for (ModelComponent sourceComponent : source.getComponents()) { if (!sourceComponent.getClass().getCanonicalName() .contains(EDITOR_COMPONENTS_PACKAGE)) { clone.getComponents().add(sourceComponent); } } } else if (field.getName().equals(FieldNames.CHILDREN.toString())) { for (ModelEntity child : source.getChildren()) { clone.getChildren().add( cloneEntityExcludingEditorComponents(child)); } } else { try { field.set(clone, field.get(source)); } catch (ReflectionException e) { Gdx.app.debug( "Exporter.cloneEntityExcludingEditorComponents", "Error while removing editor components from ModelEntitye " + source, e); } } } return clone; }
Source:
<code>public void newRow() { rows.add(new RowBuilder()); <START> currentRow = rows.get(rows.indexOf(currentRow) + 1); <END> }</code><technical_language>currentRow instance of RowBuilder added</technical_language>

Target:
void newRow() { int indexOfCurrentRow = rows.indexOf(currentRow); if (indexOfCurrentRow == rows.size() - 1) { currentRow = new RowBuilder(); rows.add(currentRow); } else { currentRow = rows.get(rows.indexOf(currentRow) + 1); } }
Source:
<code>public SearchRequestBuilder excludeSource(boolean value) { <START> this.excludeSource = value; <END> return this; }</code><technical_language>add assertion fields set if excludeSource is set, vice-versa</technical_language>

Target:
public SearchRequestBuilder excludeSource(boolean value) { if (value) { Assert.hasNoText(this.fields, String.format("_source section can't be excluded if fields [%s] are requested", this.fields)); } this.excludeSource = value; return this; }
Source:
<code>public static long zip(File directory, OutputStream out) throws IOException { if (!directory.isDirectory()) { throw new IOE("directory[%s] is not a directory", directory); } final File[] files = directory.listFiles(); long totalSize = 0; try (final ZipOutputStream zipOut = new ZipOutputStream(out)) { for (File file : files) { log.info("Adding file[%s] with size[%,d]. Total size so far[%,d]", file, file.length(), totalSize); if (file.length() >= Integer.MAX_VALUE) { zipOut.finish(); throw new IOE("file[%s] too large [%,d]", file, file.length()); } zipOut.putNextEntry(new ZipEntry(file.getName())); totalSize += Files.asByteSource(file).copyTo(zipOut); } zipOut.closeEntry(); zipOut.flush(); if (out instanceof FileOutputStream) { <START> ((FileOutputStream) out).getChannel().force(true); <END> } } return totalSize; }</code><technical_language>@gianm curious, experienced problem this change</technical_language>

Target:
public static long zip(File directory, OutputStream out) throws IOException { if (!directory.isDirectory()) { throw new IOE("directory[%s] is not a directory", directory); } final ZipOutputStream zipOut = new ZipOutputStream(out); long totalSize = 0; for (File file : directory.listFiles()) { log.info("Adding file[%s] with size[%,d]. Total size so far[%,d]", file, file.length(), totalSize); if (file.length() >= Integer.MAX_VALUE) { zipOut.finish(); throw new IOE("file[%s] too large [%,d]", file, file.length()); } zipOut.putNextEntry(new ZipEntry(file.getName())); totalSize += Files.asByteSource(file).copyTo(zipOut); } zipOut.closeEntry(); zipOut.flush(); zipOut.finish(); return totalSize; }
Source:
<code>public abstract void execute() throws SQLException; public String getFlywayVersion() { <START> String retval = ""; <END> String releasePart = myProductVersion; if (releasePart.startsWith("V")) { releasePart = releasePart.substring(1); } return releasePart + "." + mySchemaVersion; }</code><technical_language>retval used</technical_language>

Target:
public abstract void execute() throws SQLException; public String getFlywayVersion() { String releasePart = myProductVersion; if (releasePart.startsWith("V")) { releasePart = releasePart.substring(1); } return releasePart + "." + mySchemaVersion; }
Source:
<code>protected Set<Tuple> tryFindCounterPart(final Tuple first, boolean findPositiveCounterPart, boolean <START> findAll) { <END> DefaultMailbox monotoneQueue = getActiveMonotoneQueue(); DefaultMailbox nonMonotoneQueue = getActiveNonMonotoneQueue(); final TupleMask coreMask = receiver.getCoreMask(); final TupleMask posetMask = receiver.getPosetMask(); final IPosetComparator posetComparator = receiver.getPosetComparator(); final Set<Tuple> result = new HashSet<Tuple>(); final Tuple firstKey = coreMask.transform(first); final Tuple firstValue = posetMask.transform(first); if (findPositiveCounterPart) { for (Tuple second : monotoneQueue.keySet()) { Integer count = monotoneQueue.get(second); if (count > 0) { final Tuple secondKey = coreMask.transform(second); if (firstKey.equals(secondKey)) { Tuple secondValue = posetMask.transform(second); if (posetComparator.isLessOrEqual(firstValue, secondValue)) { result.add(second); if (!findAll) { return result; } } } } } } else { for (Tuple second : nonMonotoneQueue.keySet()) { Integer count = nonMonotoneQueue.get(second); assert count < 0; final Tuple secondKey = coreMask.transform(second); if (firstKey.equals(secondKey)) { Tuple secondValue = posetMask.transform(second); if (posetComparator.isLessOrEqual(secondValue, firstValue)) { result.add(second); if (!findAll) { return result; } } } } } return result; }</code><technical_language>rename 'findAll' more descriptive, e.g. 'findMultiples'</technical_language>

Target:
protected Set<Tuple> tryFindCounterPart(final Tuple first, boolean findPositiveCounterPart, boolean findAll) { DefaultMailbox monotoneQueue = getActiveMonotoneQueue(); DefaultMailbox antiMonotoneQueue = getActiveAntiMonotoneQueue(); final TupleMask coreMask = receiver.getCoreMask(); final TupleMask posetMask = receiver.getPosetMask(); final IPosetComparator posetComparator = receiver.getPosetComparator(); final Set<Tuple> result = new HashSet<Tuple>(); final Tuple firstKey = coreMask.transform(first); final Tuple firstValue = posetMask.transform(first); if (findPositiveCounterPart) { for (Tuple second : monotoneQueue.keySet()) { Integer count = monotoneQueue.get(second); if (count > 0) { final Tuple secondKey = coreMask.transform(second); if (firstKey.equals(secondKey)) { Tuple secondValue = posetMask.transform(second); if (posetComparator.isLessOrEqual(firstValue, secondValue)) { result.add(second); if (!findAll) { return result; } } } } } } else { for (Tuple second : antiMonotoneQueue.keySet()) { Integer count = antiMonotoneQueue.get(second); assert count < 0; final Tuple secondKey = coreMask.transform(second); if (firstKey.equals(secondKey)) { Tuple secondValue = posetMask.transform(second); if (posetComparator.isLessOrEqual(secondValue, firstValue)) { result.add(second); if (!findAll) { return result; } } } } } return result; }
Source:
<code>public void firstDerivativeTest() { <START> double a = 1.0; <END> double b = 1.5; double c = -0.5; double[] x = new double[] {0., 2., 5. }; int n = x.length; double[] y = new double[n]; for (int i = 0; i < n; i++) { y[i] = a + b * x[i] + c * x[i] * x[i]; } Interpolator1DDataBundle db = INTERPOLATOR.getDataBundle(x, y); Double grad = INTERPOLATOR.firstDerivative(db, x[n - 1]); assertEquals(b + 2 * c * x[n - 1], grad, 1e-15); } }</code><technical_language>Please non-unit non-zero constants, tend for catching mistakes :)</technical_language>

Target:
public void firstDerivativeTest() { double a = 1.34; double b = 7.0 / 3.0; double c = -0.52; double[] x = new double[] {-11.0 / 2.3, 0.0, 0.01, 2.71, 17.0 / 3.2 }; int n = x.length; double[] y = new double[n]; for (int i = 0; i < n; i++) { y[i] = a + b * x[i] + c * x[i] * x[i]; } Interpolator1DDataBundle db = INTERPOLATOR.getDataBundle(x, y); Double grad = INTERPOLATOR.firstDerivative(db, x[n - 1]); assertEquals(b + 2 * c * x[n - 1], grad, 1e-15); }
Source:
<code>public void testCreateMtlsKeyStoreNoPrivateKey() throws Exception { final InputStream privateKeyMissing = getClass().getClassLoader().getResourceAsStream("com/google/api/client/util/cert.pem"); <START> IllegalArgumentException exception = assertThrows( IllegalArgumentException.class, new ThrowingRunnable() { @Override public void run() throws Throwable { SecurityUtils.createMtlsKeyStore(privateKeyMissing); } }); <END> assertThat(exception) .hasMessageThat() .isEqualTo("private key is missing from certAndKey string"); }</code><technical_language>Try/catch</technical_language>

Target:
public void testCreateMtlsKeyStoreNoPrivateKey() throws Exception { final InputStream privateKeyMissing = getClass().getClassLoader().getResourceAsStream("com/google/api/client/util/cert.pem"); boolean thrown = false; try { SecurityUtils.createMtlsKeyStore(privateKeyMissing); fail("should have thrown"); } catch (IllegalArgumentException e) { assertTrue(e.getMessage().contains("private key is missing from certAndKey string")); thrown = true; } assertTrue("should have caught an IllegalArgumentException", thrown); }
Source:
<code>public String getSelection() { <START> if (fSelection == null) { <END> return ""; } else { return fSelection; } }</code><technical_language>I ok return null here, GerritTableView is handling result</technical_language>

Target:
public String getSelection() { return fSelection; }
Source:
<code>private void updateConfiguration(List<HudsonModelJob> jobs) { Map<String, String> jobNameById = new HashMap<String, String>(); for (HudsonModelJob job : jobs) { String jobUrl = job.getUrl(); <START> if (jobUrl != null && hudsonUrlUtil.isNestedJob(jobUrl)) { jobNameById.put(jobUrl, jobUrl); } else { jobNameById.put(job.getName(), jobUrl); } <END> } HudsonConfiguration configuration = new HudsonConfiguration(); configuration.jobNameById = jobNameById; setConfiguration(configuration); }</code><technical_language>I confused this. place this configuration is is construct IBuildPlans in server beaviour. this map result in build plans IDs Url name (which is fine) names URL. This is inconsistent build plans constructed model jobs. constructing build plans model jobs ID Url name, name display name name</technical_language>

Target:
private void updateConfiguration(List<HudsonModelJob> jobs) throws HudsonException { Map<String, String> jobNameById = new HashMap<String, String>(); for (HudsonModelJob job : jobs) { String jobUrl = job.getUrl(); String displayName = hudsonUrlUtil.getDisplayName(jobUrl); if (jobUrl != null && hudsonUrlUtil.isNestedJob(jobUrl)) { jobNameById.put(jobUrl, displayName); } else { jobNameById.put(job.getName(), displayName); } } HudsonConfiguration configuration = new HudsonConfiguration(); configuration.jobNameById = jobNameById; setConfiguration(configuration); }
Source:
<code>public void sync(Agents agents) { <START> syncWithDB(agents); <END> agentInstances.sync(agents); }</code><technical_language>This super expensive. AgentService.sync is invoked AgentChangeListener.onEntityConfigChange is invoked everytime agent's config changes. Imagine in case of build.gocd setup bring tear elastic agents day. of operations is sync configured agent db. Is required? other being, callback is part of config save operation, means other config save operation in queue db sync finishes off</technical_language>

Target:
public void sync(Agents agents) { agentInstances.sync(agents); }
Source:
<code>public Contribution getContributionWithFileName(String uri) { List<Contribution> contributionWithUri = contributionDao.getContributionWithTitle(uri); <START> if(null!=contributionWithUri && contributionWithUri.size()>0){ <END> return contributionWithUri.get(0); } return null; }</code><technical_language>shocked if Room return null for a list</technical_language>

Target:
public Contribution getContributionWithFileName(String uri) { List<Contribution> contributionWithUri = contributionDao.getContributionWithTitle(uri); if(!contributionWithUri.isEmpty()){ return contributionWithUri.get(0); } return null; }
Source:
<code>public String fetchPathwayNameFailSafe(String reactomeId) { String reactomeURL = "<LINK_0>{0}/displayName"; String url = MessageFormat.format(reactomeURL, reactomeId); try { return StringUtils.trim(restTemplate.getForObject(url, String.class)); } catch (RestClientException e) { LOGGER.warn("Reactome ID \"{}\" could not be found", reactomeId); <START> return ""; <END> } }</code><technical_language>This is called in a method getLinkTextOrNull, is called in Optional.ofNullable(...).orElse(<a decent default>). If return "" stopping default displayed</technical_language>

Target:
public Optional<String> fetchPathwayNameFailSafe(String reactomeId) { String reactomeURL = "<LINK_0>{0}/displayName"; String url = MessageFormat.format(reactomeURL, reactomeId); try { return Optional.of(StringUtils.trim(restTemplate.getForObject(url, String.class))); } catch (RestClientException e) { LOGGER.warn("Reactome ID \"{}\" could not be found", reactomeId); return Optional.empty(); } }
Source:
<code>private void addToIndex(URL url) { InputStream fs = null; try { fs = url.openStream(); indexer.index(fs); } catch (IOException ex) { <START> <END> } finally { try { if (fs != null) { fs.close(); } } catch (IOException ex) { } } }</code><technical_language>Is OK swallow this entirely</technical_language>

Target:
private void addToIndex(URL url) { InputStream fs = null; try { fs = url.openStream(); indexer.index(fs); } catch (IOException ex) { log.warn(UNABLE_TO_OPEN_STREAM_MESSAGE, ex); } finally { try { if (fs != null) { fs.close(); } } catch (IOException ex) { log.warn(UNABLE_TO_CLOSE_STREAM_MESSAGE, ex); } } }
Source:
<code>public void worldIsRound() { factory.createBoard(new Square[][]{{s1}}); <START> Arrays.stream(Direction.values()).forEach((dir) -> <END> assertThat(s1.getSquareAt(dir)).isEqualTo(s1) ); }</code><technical_language>be: assertThat(Arrays.stream(Direction.values()).map(s1::getSquareAt)).containsOnly(s1);</technical_language>

Target:
void worldIsRound() { factory.createBoard(new Square[][]{{s1}}); assertThat(Arrays.stream(Direction.values()).map(s1::getSquareAt)).containsOnly(s1); }
Source:
<code>public void run_basic_subversion_build() throws SubversionPluginTestException { final SvnContainer svnContainer = svn.get(); final FreeStyleJob f = jenkins.jobs.create(); f.useScm(SubversionScm.class).url.set(svnContainer.getUrlUnsaveRepo()); f.addShellStep("test -d .svn"); f.save(); Build b = f.startBuild().shouldSucceed(); <START> assertThat(b.getConsole(), Matchers.containsRegexp("test -d .svn", Pattern.MULTILINE)); <END> }</code><technical_language>ant: This match, for example, test -d xsvn. I wanted Matchers.containsString</technical_language>

Target:
public void run_basic_subversion_build() throws SubversionPluginTestException { final SvnContainer svnContainer = svn.get(); final FreeStyleJob f = jenkins.jobs.create(); f.useScm(SubversionScm.class).url.set(svnContainer.getUrlUnsaveRepo()); f.addShellStep("test -d .svn"); f.save(); Build b = f.startBuild().shouldSucceed(); assertThat(b.getConsole(), Matchers.containsString("test -d .svn")); }
Source:
<code><START> public static void loadLibraryFromJar(String path) throws Exception { <END> checkArgument(path.startsWith("/"), "absolute path must start with /"); String[] parts = path.split("/"); String filename = (parts.length > 0) ? parts[parts.length - 1] : null; File dir = File.createTempFile("native", ""); if (!(dir.mkdir())) { throw new IOException("Failed to create temp directory " + dir.getAbsolutePath()); } dir.deleteOnExit(); File temp = new File(dir, filename); temp.deleteOnExit(); byte[] buffer = new byte[1024]; int read; InputStream input = NativeUtils.class.getResourceAsStream(path); try { if (input == null) { throw new FileNotFoundException("Couldn't find file into jar " + path); } OutputStream out = new FileOutputStream(temp); try { while ((read = input.read(buffer)) != -1) { out.write(buffer, 0, read); } } finally { out.close(); } } finally { input.close(); } if (!temp.exists()) { throw new FileNotFoundException("Failed to copy file from jar at " + temp.getAbsolutePath()); } System.load(temp.getAbsolutePath()); }</code><technical_language>This a generic method exist in some common module</technical_language>

Target:
public static void loadLibraryFromJar(String path) throws Exception { checkArgument(path.startsWith("/"), "absolute path must start with /"); String[] parts = path.split("/"); String filename = (parts.length > 0) ? parts[parts.length - 1] : null; File dir = File.createTempFile("native", ""); if (!(dir.mkdir())) { throw new IOException("Failed to create temp directory " + dir.getAbsolutePath()); } dir.deleteOnExit(); File temp = new File(dir, filename); temp.deleteOnExit(); byte[] buffer = new byte[1024]; int read; try (InputStream input = NativeUtils.class.getResourceAsStream(path); OutputStream out = new FileOutputStream(temp)) { if (input == null) { throw new FileNotFoundException("Couldn't find file into jar " + path); } while ((read = input.read(buffer)) != -1) { out.write(buffer, 0, read); } } if (!temp.exists()) { throw new FileNotFoundException("Failed to copy file from jar at " + temp.getAbsolutePath()); } System.load(temp.getAbsolutePath()); }
Source:
<code>private boolean isNameUnique(E data) { <START> for (E item : getEntities().getItems()) { if (data != item && data.getName().equals(item.getName())) { return false; } } return true; <END> }</code><technical_language>replaced with: return getEntities().getItems() .stream() .noneMatch((item) -> data != item && data.getName().equals((item.getName())));</technical_language>

Target:
private boolean isNameUnique(E data) { return getEntities().getItems() .stream() .noneMatch(item -> data != item && data.getName().equals(item.getName())); }
Source:
<code>public List<FieldInfo> findIterableFields(Class<?> iteratedType, String relationshipType, Direction relationshipDirection, boolean strict) { List<FieldInfo> iterableFields = new ArrayList<>(); for (FieldInfo fieldInfo : findIterableFields(iteratedType)) { String relationship = strict ? fieldInfo.relationshipTypeAnnotation() : fieldInfo.relationship(); <START> if (relationshipType.equals(relationship)) { <END> if (((fieldInfo.relationshipDirectionOrDefault(Direction.OUTGOING).equals(Direction.INCOMING) || fieldInfo .relationshipDirectionOrDefault(Direction.OUTGOING).equals(Direction.UNDIRECTED)) && relationshipDirection.equals(Direction.INCOMING)) || (relationshipDirection.equals(Direction.OUTGOING) && !(fieldInfo .relationshipDirectionOrDefault(Direction.OUTGOING).equals(Direction.INCOMING)))) { iterableFields.add(fieldInfo); } } } return iterableFields; }</code><technical_language>Please ==</technical_language>

Target:
public List<FieldInfo> findIterableFields(Class<?> iteratedType, String relationshipType, Direction relationshipDirection, boolean strict) { List<FieldInfo> iterableFields = new ArrayList<>(); for (FieldInfo fieldInfo : findIterableFields(iteratedType)) { String relationship = strict ? fieldInfo.relationshipTypeAnnotation() : fieldInfo.relationship(); if (relationshipType.equals(relationship)) { Direction declaredDirection = fieldInfo.relationshipDirectionOrDefault(Direction.OUTGOING); if (isActualDirectionCompatibleWithDeclaredDirection(relationshipDirection, declaredDirection)) { iterableFields.add(fieldInfo); } } } return iterableFields; }
Source:
<code>public void onEvent(Event event, Object source, Object data) { XWikiDocument xwikiDoc = (XWikiDocument) source; <START> String familyId = xwikiDoc.getDocumentReference().getName(); <END> Family family = this.familyRepository.getFamilyById(familyId); if (event instanceof PatientDeletedEvent) { String patientId = (String) data; Patient p = this.patientRepository.getPatientById(patientId); family.removeMember(p); } else { family.updatePermissions(); } }</code><technical_language>Nope, this is patient. get family patient</technical_language>

Target:
public void onEvent(Event event, Object source, Object data) { XWikiDocument xwikiDoc = (XWikiDocument) source; String patientId = xwikiDoc.getDocumentReference().getName(); Patient patient = this.patientRepository.getPatientById(patientId); Family family = this.familyRepository.getFamilyForPatient(patient); if (family == null) { return; } if (event instanceof PatientDeletedEvent) { family.removeMember(patient); } else { family.updatePermissions(); } }
Source:
<code>public QuantileDigest(Slice serialized) { SliceInput input = new BasicSliceInput(serialized); maxError = input.readDouble(); alpha = input.readDouble(); if (alpha == 0.0) { ticker = noOpTicker(); } else { ticker = Ticker.systemTicker(); } min = input.readLong(); max = input.readLong(); <START> int nodeCount = input.readInt(); <END> counts = new double[nodeCount]; for (int i = 0; i < nodeCount; i++) { double count = input.readDouble(); weightedCount += count; counts[i] = count; } levels = new byte[nodeCount]; for (int i = 0; i < nodeCount; i++) { levels[i] = input.readByte(); } values = new long[nodeCount]; for (int i = 0; i < nodeCount; i++) { values[i] = input.readLong(); } int[] stack = new int[(Integer.highestOneBit(nodeCount - 1) << 1) + 1]; int top = -1; lefts = new int[nodeCount]; rights = new int[nodeCount]; for (int node = 0; node < nodeCount; node++) { byte flags = input.readByte(); if ((flags & Flags.HAS_RIGHT) != 0) { rights[node] = stack[top--]; } else { rights[node] = -1; } if ((flags & Flags.HAS_LEFT) != 0) { lefts[node] = stack[top--]; } else { lefts[node] = -1; } stack[++top] = node; } checkArgument(nodeCount == 0 || top == 0, "Tree is corrupted. Expected a single root node"); root = nodeCount - 1; nextNode = nodeCount; }</code><technical_language>validate node count? domain, a max node count</technical_language>

Target:
public QuantileDigest(Slice serialized) { SliceInput input = new BasicSliceInput(serialized); maxError = input.readDouble(); alpha = input.readDouble(); if (alpha == 0.0) { ticker = noOpTicker(); } else { ticker = Ticker.systemTicker(); } min = input.readLong(); max = input.readLong(); int nodeCount = input.readInt(); int numberOfLevels = MAX_BITS - Long.numberOfLeadingZeros(min ^ max) + 1; double k = 3 * numberOfLevels / maxError; checkArgument(nodeCount <= 2 * k, "Too many nodes in deserialized tree. Possible corruption"); counts = new double[nodeCount]; for (int i = 0; i < nodeCount; i++) { double count = input.readDouble(); weightedCount += count; counts[i] = count; } levels = new byte[nodeCount]; for (int i = 0; i < nodeCount; i++) { levels[i] = input.readByte(); } values = new long[nodeCount]; for (int i = 0; i < nodeCount; i++) { values[i] = input.readLong(); } int[] stack = new int[(Integer.highestOneBit(nodeCount - 1) << 1) + 1]; int top = -1; lefts = new int[nodeCount]; rights = new int[nodeCount]; for (int node = 0; node < nodeCount; node++) { byte flags = input.readByte(); if ((flags & Flags.HAS_RIGHT) != 0) { rights[node] = stack[top--]; } else { rights[node] = -1; } if ((flags & Flags.HAS_LEFT) != 0) { lefts[node] = stack[top--]; } else { lefts[node] = -1; } stack[++top] = node; } checkArgument(nodeCount == 0 || top == 0, "Tree is corrupted. Expected a single root node"); root = nodeCount - 1; nextNode = nodeCount; }
Source:
<code>public synchronized Future<PlanResult> execute(final Plan plan) { executingPlan = new ExecutingPlan(plan); final Set<EMOperation> initialEMOperations = executingPlan.getNextOpsToExecute(); try { nextOpsToExecuteInParallel.put(initialEMOperations); } catch (final InterruptedException e) { LOG.log(Level.WARNING, "Interrupted while putting ops into the queue", e); } final int numTotalOps = plan.getPlanSize(); return mainExecutor.submit(new Callable<PlanResult>() { private static final int QUEUE_SIZE = 10; private static final long POLLING_TIMEOUT_SEC = 10; private final AtomicInteger numExecutedOps = new AtomicInteger(0); <START> private Collection<Set<EMOperation>> drainedOpSets = new ArrayList<>(QUEUE_SIZE); <END> @Override public PlanResult call() throws Exception { while (true) { final Set<EMOperation> nextOps = nextOpsToExecuteInParallel.poll(POLLING_TIMEOUT_SEC, TimeUnit.SECONDS); if (nextOps != null) { nextOpsToExecuteInParallel.drainTo(drainedOpSets, QUEUE_SIZE); drainedOpSets.forEach(nextOps::addAll); executeOperations(nextOps); numExecutedOps.getAndAdd(nextOps.size()); if (numExecutedOps.get() >= numTotalOps) { break; } drainedOpSets.clear(); } } final ConcurrentMap<EMOperation, OpExecutionStatus> planExecutionResult = executingPlan.getPlanExecutionStatus(); return new PlanResultImpl("Plan Execution Complete!\n[SUMMARY]\n" + planExecutionResult, planExecutionResult.size()); } }); }</code><technical_language>removing this variable is better, performance benefit. Thanks for pointing in out :)</technical_language>

Target:
public synchronized Future<PlanResult> execute(final Plan plan) { executingPlan = new ExecutingPlan(plan); final Set<EMOperation> initialEMOperations = executingPlan.getNextOpsToExecute(); try { nextOpsToExecuteInParallel.put(initialEMOperations); } catch (final InterruptedException e) { LOG.log(Level.WARNING, "Interrupted while putting ops into the queue", e); } final int numTotalOps = plan.getPlanSize(); return mainExecutor.submit(new Callable<PlanResult>() { @Override public PlanResult call() throws Exception { int numStartedOps = 0; while (numStartedOps < numTotalOps) { final Set<EMOperation> nextOps = nextOpsToExecuteInParallel.take(); if (nextOps != null) { executeOperations(nextOps); numStartedOps += nextOps.size(); } } executingPlan.waitPlanExecution(); final ConcurrentMap<EMOperation, OpExecutionStatus> planExecutionResult = executingPlan.getPlanExecutionStatus(); return new PlanResultImpl("Plan Execution Complete!\n[SUMMARY]\n" + planExecutionResult, planExecutionResult.size()); } }); }
Source:
<code>public FeedbackResponseAttributes getFeedbackResponse( String feedbackResponseId) { FeedbackResponseAttributes response = frDb.getFeedbackResponse(feedbackResponseId); if (response == null) { return null; <START> } <END> ArrayList<FeedbackResponseAttributes> responses = new ArrayList<FeedbackResponseAttributes>(); responses.add(response); List<FeedbackResponseAttributes> validResponses = getValidResponses(responses, response.courseId); if (validResponses.size() == 0) { return null; } return validResponses.get(0); }</code><technical_language>This null check is present in places. places safe it</technical_language>

Target:
public FeedbackResponseAttributes getFeedbackResponse( String feedbackResponseId) { FeedbackResponseAttributes response = frDb.getFeedbackResponse(feedbackResponseId); if (response == null) { return null; } List<FeedbackResponseAttributes> responses = new ArrayList<FeedbackResponseAttributes>(); responses.add(response); List<FeedbackResponseAttributes> validResponses = getValidResponses(responses, response.courseId); if (validResponses.isEmpty()) { return null; } return validResponses.get(0); }
Source:
<code>public String getUsage() { StringBuilder sb = new StringBuilder(); sb.append("Usage: branch_purge [-R] [-D] [-A] [-B] [-P] branchGuids=<BRANCH_GUID,..>\n"); sb.append("Synopsis:\n"); sb.append("\tCAUTION: This command will permanently remove branches from the datastore!\n"); <START> sb.append("\tThis command has no effect unless the [P] option is specified. However, it will\n"); <END> sb.append("\tprint what would be purged had the [P] option is specified. Each option turns\n"); sb.append("\tfunctionality on. Thus, the default behavior with no options is to list the \n"); sb.append("\tarchived, deleted, non-baseline branches and not recurse of the guids listed that\n"); sb.append("\twould be purged.\n"); sb.append("Options:\n"); sb.append("\tR: Recurse branch children\n"); sb.append("\tA: Delete Un-Archived branches\n"); sb.append("\tD: Delete Un-Deleted branches\n"); sb.append("\tB: Delete Baseline branches\n"); sb.append("\tP: Purge the branches\n"); return sb.toString(); }</code><technical_language>Remove "specified. However.....options is specified." Change "specified else, a print out of purged is displayed."</technical_language>

Target:
public String getUsage() { StringBuilder sb = new StringBuilder(); sb.append("Usage: branch_purge [-R] [-D] [-A] [-B] [-P] branchGuids=<BRANCH_GUID,..>\n"); sb.append("Synopsis:\n"); sb.append("\tCAUTION: This command will permanently remove branches from the datastore!\n"); sb.append("\tThis command has no effect unless the [P] option is specified, otherwise it\n"); sb.append("\tprints what would be purged had the [P] option is specified. Each option turns\n"); sb.append("\tfunctionality on. Thus, the default behavior with no options is to list the \n"); sb.append("\tarchived, deleted, non-baseline branches and not recurse of the guids listed that\n"); sb.append("\twould be purged.\n"); sb.append("Options:\n"); sb.append("\tR: Recurse branch children\n"); sb.append("\tA: Allow Un-Archived branches\n"); sb.append("\tD: Allow Un-Deleted branches\n"); sb.append("\tB: Allow Baseline branches\n"); sb.append("\tP: Purge the branches\n"); return sb.toString(); }
Source:
<code>private Mono<Response<RecognizePiiEntitiesResultCollection>> getRecognizePiiEntitiesResponse( Iterable<TextDocumentInput> documents, TextAnalyticsRequestOptions options, Context context) { return service.entitiesRecognitionPiiWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Recognized Personally Identifiable Information entities for a batch of documents- {}", <START> response.getValue())) <END> .doOnError(error -> logger.warning("Failed to recognize Personally Identifiable Information entities - {}", error)) .map(this::toRecognizePiiEntitiesResultCollectionResponse) .onErrorMap(throwable -> mapToHttpResponseExceptionIfExist(throwable)); }</code><technical_language>fine log PII information here</technical_language>

Target:
private Mono<Response<RecognizePiiEntitiesResultCollection>> getRecognizePiiEntitiesResponse( Iterable<TextDocumentInput> documents, TextAnalyticsRequestOptions options, Context context) { return service.entitiesRecognitionPiiWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info( "Start recognizing Personally Identifiable Information entities for a batch of documents.")) .doOnSuccess(response -> logger.info( "Successfully recognized Personally Identifiable Information entities for a batch of documents.")) .doOnError(error -> logger.warning("Failed to recognize Personally Identifiable Information entities - {}", error)) .map(this::toRecognizePiiEntitiesResultCollectionResponse) .onErrorMap(throwable -> mapToHttpResponseExceptionIfExist(throwable)); }