auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ResponseEntity<Object> uploadDicom(String accessToken, MultipartFile dicomFile, String participantId, String accessionId, String targetPath) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.MULTIPART_FORM_DATA); headers.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); MultiValueMap<String, Object> requestBody = new LinkedMultiValueMap<>(); try { Path tempDicomFile = Files.createTempFile("dicomFile" + System.nanoTime(), ".zip"); Files.write(tempDicomFile, dicomFile.getBytes()); File dicomFileToUpload = tempDicomFile.toFile(); requestBody.add(DICOM_FILE_PARAM, new FileSystemResource(dicomFileToUpload)); } catch (IOException e) { logger.error("Unable to read the zip file", e); return ResponseEntity.badRequest() .body(ErrorConstants.ERR_UNABLE_TO_READ_FILE); } requestBody.add(PARTICIPANT_ID_PARAM, participantId); requestBody.add(ACCESSION_ID_PARAM, accessionId); requestBody.add(TARGET_PATH_PARAM, targetPath); HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(requestBody, headers); RestTemplate restTemplate = new RestTemplate(); <START> String uploadDicomUrl = DICOM_SERVICE_URL + "/dicom"; <END> try { logger.debug("Calling dicom-service to upload dicom file"); restTemplate.postForEntity(uploadDicomUrl, requestEntity, Object.class); return ResponseEntity.ok().build(); } catch (HttpClientErrorException e) { logger.error("Failed to upload dicom file to dicom-service", e); return ResponseEntity .status(e.getRawStatusCode()) .body(e.getResponseBodyAsString()); } }</code><technical_language>uue DICOM_CLIENT constant if "+" + DICOM_CLIENT</technical_language>

Target:
public ResponseEntity<String> uploadDicom(String accessToken, MultipartFile dicomFile, String participantId, String accessionId, String targetPath) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.MULTIPART_FORM_DATA); headers.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); MultiValueMap<String, Object> requestBody = new LinkedMultiValueMap<>(); try { Path tempDicomFile = Files.createTempFile("dicomFile" + System.nanoTime(), ".zip"); Files.write(tempDicomFile, dicomFile.getBytes()); File dicomFileToUpload = tempDicomFile.toFile(); requestBody.add(DICOM_FILE_PARAM, new FileSystemResource(dicomFileToUpload)); } catch (IOException e) { logger.error("Unable to read the zip file", e); return ResponseEntity.badRequest() .body(ErrorConstants.ERR_UNABLE_TO_READ_FILE); } requestBody.add(PARTICIPANT_ID_PARAM, participantId); requestBody.add(ACCESSION_ID_PARAM, accessionId); requestBody.add(TARGET_PATH_PARAM, targetPath); HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(requestBody, headers); RestTemplate restTemplate = new RestTemplate(); String uploadDicomUrl = DICOM_SERVICE_URL + DICOM_PATH; try { logger.debug("Calling dicom-service to upload dicom file"); restTemplate.postForEntity(uploadDicomUrl, requestEntity, Object.class); return ResponseEntity.ok().build(); } catch (HttpClientErrorException e) { logger.error("Failed to upload dicom file to dicom-service", e); return ResponseEntity .status(e.getRawStatusCode()) .body(e.getResponseBodyAsString()); } }
Source:
<code>public List<NakadiCursor> convert(final List<SubscriptionCursorWithoutToken> cursors) throws InternalNakadiException, NoSuchEventTypeException, ServiceUnavailableException, InvalidCursorException { for (final SubscriptionCursorWithoutToken cursor: cursors) { if (null == cursor.getPartition()) { throw new InvalidCursorException(CursorError.NULL_PARTITION, cursor); <START> } else if (null == cursor.getOffset()) { <END> throw new InvalidCursorException(CursorError.NULL_OFFSET, cursor); } } final LinkedHashMap<SubscriptionCursorWithoutToken, AtomicReference<NakadiCursor>> orderingMap = new LinkedHashMap<>(); cursors.forEach(item -> orderingMap.put(item, new AtomicReference<>(null))); final Map<Version, List<SubscriptionCursorWithoutToken>> mappedByVersions = cursors.stream() .collect(Collectors.groupingBy(c -> guessVersion(c.getOffset()))); for (final Map.Entry<Version, List<SubscriptionCursorWithoutToken>> entry: mappedByVersions.entrySet()) { final List<NakadiCursor> result = converters.get(entry.getKey()).convertBatched(entry.getValue()); IntStream.range(0, entry.getValue().size()) .forEach(idx -> orderingMap.get(entry.getValue().get(idx)).set(result.get(idx))); } return orderingMap.values().stream().map(AtomicReference::get).collect(Collectors.toList()); }</code><technical_language>cursor.getOffset() cursor.getPartition() marked @Nullable. decided check for null here</technical_language>

Target:
public List<NakadiCursor> convert(final List<SubscriptionCursorWithoutToken> cursors) throws InternalNakadiException, NoSuchEventTypeException, ServiceUnavailableException, InvalidCursorException { final LinkedHashMap<SubscriptionCursorWithoutToken, AtomicReference<NakadiCursor>> orderingMap = new LinkedHashMap<>(); cursors.forEach(item -> orderingMap.put(item, new AtomicReference<>(null))); final Map<Version, List<SubscriptionCursorWithoutToken>> mappedByVersions = cursors.stream() .collect(Collectors.groupingBy(c -> guessVersion(c.getOffset()))); for (final Map.Entry<Version, List<SubscriptionCursorWithoutToken>> entry: mappedByVersions.entrySet()) { final List<NakadiCursor> result = converters.get(entry.getKey()).convertBatched(entry.getValue()); IntStream.range(0, entry.getValue().size()) .forEach(idx -> orderingMap.get(entry.getValue().get(idx)).set(result.get(idx))); } return orderingMap.values().stream().map(AtomicReference::get).collect(Collectors.toList()); }
Source:
<code>private <T extends AbstractDashboardViewPortlet> T getPortlet(List<AbstractDashboardViewPortlet> portlets, Class<T> portletClass) { for (AbstractDashboardViewPortlet p : portlets) { if (portletClass.isInstance(p)) { return portletClass.cast(p); } } <START> throw new java.util.NoSuchElementException(); <END> }</code><technical_language>Include portletClass in exception message</technical_language>

Target:
private <T extends AbstractDashboardViewPortlet> T getPortlet(List<AbstractDashboardViewPortlet> portlets, Class<T> portletClass) { for (AbstractDashboardViewPortlet p : portlets) { if (portletClass.isInstance(p)) { return portletClass.cast(p); } } throw new java.util.NoSuchElementException(portletClass.getSimpleName()); }
Source:
<code>public boolean equals(Object obj) { if (obj == null) return false; if (!(obj instanceof DeployDestination)) <START> return false; <END> DeployDestination that = (DeployDestination)obj; if (_dc == null || that._dc == null) { return false; } if (_dc.getId() != that._dc.getId()) { return false; } if (_pod == null || that._pod == null) { return false; } if (_pod.getId() != that._pod.getId()) { return false; } if (_cluster == null || that._cluster == null) { return false; } if (_cluster.getId() != that._cluster.getId()) { return false; } if (_host == null || that._host == null) { return false; } return _host.getId() == that._host.getId(); }</code><technical_language>@1m2c3t4, thanks for PR! please format code in order follow CloudStack code conventions [1]? From: if (obj == null) return false; to: if (obj == null) { return false; } [1] <LINK_0></technical_language>

Target:
public boolean equals(Object obj) { if (obj == null) { return false; } if (!(obj instanceof DeployDestination)) { return false; } DeployDestination that = (DeployDestination)obj; if (this._dc == null || that._dc == null) { return false; } if (this._dc.getId() != that._dc.getId()) { return false; } if (this._pod == null || that._pod == null) { return false; } if (this._pod.getId() != that._pod.getId()) { return false; } if (this._cluster == null || that._cluster == null) { return false; } if (this._cluster.getId() != that._cluster.getId()) { return false; } if (this._host == null || that._host == null) { return false; } return this._host.getId() == that._host.getId(); }
Source:
<code>private void onSaveVm() { UnitVmModel model = (UnitVmModel) getWindow(); String name = model.getName().getEntity(); setcurrentVm(new VM()); <START> validateVM(model, name); <END> }</code><technical_language>for consistency reason prev line please "validateVm" (small "m")</technical_language>

Target:
private void onSaveVm() { UnitVmModel model = (UnitVmModel) getWindow(); String name = model.getName().getEntity(); setcurrentVm(new VM()); validateVm(model, name); }
Source:
<code>public Span apply(@Nullable Span span) { if (span == null) return null; long startNanos = ruleMetrics.ruleStart(); List<Annotation> annotations = span.getAnnotations().stream(). filter(x -> { <START> if (!whitelistedKeys.containsKey(x.getKey())) return false; <END> Pattern pattern = whitelistedKeys.get(x.getKey()); return pattern == null || pattern.matcher(x.getValue()).matches(); }).collect(Collectors.toList()); if (annotations.size() < span.getAnnotations().size()) { span.setAnnotations(annotations); ruleMetrics.incrementRuleAppliedCounter(); } ruleMetrics.ruleEnd(startNanos); return span; }</code><technical_language>technically express this filters for slightly easier readability</technical_language>

Target:
public Span apply(@Nullable Span span) { if (span == null) return null; long startNanos = ruleMetrics.ruleStart(); List<Annotation> annotations = span.getAnnotations().stream(). filter(x -> whitelistedKeys.containsKey(x.getKey())). filter(x -> isPatternNullOrMatches(whitelistedKeys.get(x.getKey()), x.getValue())). collect(Collectors.toList()); if (annotations.size() < span.getAnnotations().size()) { span.setAnnotations(annotations); ruleMetrics.incrementRuleAppliedCounter(); } ruleMetrics.ruleEnd(startNanos); return span; }
Source:
<code>public Language[] predictLanguages(CharSequence content) { double[] eval = model.getMaxentModel().eval(mContextGenerator.getContext(content.toString())); Language[] arr = new Language[eval.length]; for (int i = 0; i < eval.length; i++) { arr[i] = new Language(model.getMaxentModel().getOutcome(i), eval[i]); } <START> Arrays.sort(arr, new Comparator<Language>() { <END> @Override public int compare(Language o1, Language o2) { return Double.compare(o2.getConfidence(), o1.getConfidence()); } }); return arr; }</code><technical_language>lambda instead of anonymous ?</technical_language>

Target:
public Language[] predictLanguages(CharSequence content) { double[] eval = model.getMaxentModel().eval(mContextGenerator.getContext(content.toString())); Language[] arr = new Language[eval.length]; for (int i = 0; i < eval.length; i++) { arr[i] = new Language(model.getMaxentModel().getOutcome(i), eval[i]); } Arrays.sort(arr, (o1, o2) -> Double.compare(o2.getConfidence(), o1.getConfidence())); return arr; }
Source:
<code>@Override protected void onEntityAdded(Entity member) { try { ((MongoDBReplicaSetImpl) entity).serverAdded((MongoDBServer) member); } catch (Exception e) { <START> ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator((EntityLocal)member, "Failed to update replicaset", e); <END> } }</code><technical_language>prefer this happen in serverAdded event listener</technical_language>

Target:
@Override protected void onEntityAdded(Entity member) { ((MongoDBReplicaSetImpl) entity).serverAdded((MongoDBServer) member); }
Source:
<code><START> public static String calcSHA1(String content) { <END> String sha1 = null; try { MessageDigest messageDigest = MessageDigest.getInstance("SHA-1"); messageDigest.update(content.getBytes("UTF-8"), 0, content.length()); sha1 = DatatypeConverter.printHexBinary(messageDigest.digest()); sha1.toLowerCase(); } catch (UnsupportedOperationException | NoSuchAlgorithmException | UnsupportedEncodingException ex) { LOG.error("Unable to calculate sha1", ex); } return sha1; }</code><technical_language>Suggest return Optional<String> return a null. code this function check for a null, argument for returning Optional. :) other hand, if this is unlikely/impossible occurrence, is (if UTF-8 encoding is present, nothing's work, for SHA-1 algorithm present, UnsupportedOperationException), return a String throw exception</technical_language>

Target:
public static Optional<String> calcSHA1(String content) { if (content != null) { try { MessageDigest messageDigest = MessageDigest.getInstance("SHA-1"); final byte[] bytes = content.getBytes(StandardCharsets.UTF_8); messageDigest.update(bytes, 0, bytes.length); String sha1 = DatatypeConverter.printHexBinary(messageDigest.digest()).toLowerCase(); return Optional.of(sha1); } catch (UnsupportedOperationException | NoSuchAlgorithmException ex) { LOG.error("Unable to calculate SHA-1", ex); } } else { LOG.error("File descriptor content is null"); } return Optional.empty(); }
Source:
<code><START> public LocalDateTime getScheduled() { <END> return (task != null) ? task.getSchedule() : null; }</code><technical_language>Please change internally task.getScheduleAsLong(). need implement supplementary methods in Task object, including changes in serializer. for getStartTime getEndTime()</technical_language>

Target:
public Long getScheduled() { return (task != null) ? task.getScheduleAsLong() : null; }
Source:
<code>public int compactPartition(String partitionPath) throws CloudStorageException { if (isShuttingDown()) { logger.info("Skipping compaction of due to shut down.", partitionPath); return 0; } Map<String, Long> checkpoints; try { checkpoints = getCompactionProgress(partitionPath); } catch (BlobStorageException | UncheckedIOException e) { throw new CloudStorageException("Compaction of " + partitionPath + " failed reading checkpoint", e); } long now = System.currentTimeMillis(); long compactionStartTime = now; long timeToQuit = now + compactionTimeLimitMs; long queryEndTime = now - retentionPeriodMs; long queryStartTime = now - TimeUnit.DAYS.toMillis(lookbackDays); Date queryEndDate = new Date(queryEndTime); int totalBlobsPurged = 0; try { long deletionStartTime = Math.max(queryStartTime, checkpoints.get(CloudBlobMetadata.FIELD_DELETION_TIME)); int numPurged = compactPartition(partitionPath, CloudBlobMetadata.FIELD_DELETION_TIME, deletionStartTime, queryEndTime, timeToQuit); logger.info("Purged deleted blobs in partition up to {}", numPurged, partitionPath, queryEndDate); totalBlobsPurged += numPurged; long expirationStartTime = Math.max(queryStartTime, checkpoints.get(CloudBlobMetadata.FIELD_EXPIRATION_TIME)); numPurged = compactPartition(partitionPath, CloudBlobMetadata.FIELD_EXPIRATION_TIME, expirationStartTime, queryEndTime, <START> timeToQuit); <END> logger.info("Purged expired blobs in partition up to {}", numPurged, partitionPath, queryEndDate); totalBlobsPurged += numPurged; } catch (CloudStorageException ex) { logger.error("Compaction failed for partition {}", partitionPath, ex); vcrMetrics.compactionFailureCount.inc(); } if (System.currentTimeMillis() >= timeToQuit) { logger.info("Compaction terminated due to time limit exceeded."); } if (isShuttingDown()) { logger.info("Compaction terminated due to shut down."); } long compactionTime = (System.currentTimeMillis() - compactionStartTime) / 1000; return totalBlobsPurged; }</code><technical_language>need compute compactionTime end of this method anymore</technical_language>

Target:
public int compactPartition(String partitionPath) throws CloudStorageException { if (isShuttingDown()) { logger.info("Skipping compaction of due to shut down.", partitionPath); return 0; } Map<String, Long> checkpoints = getCompactionProgress(partitionPath); long now = System.currentTimeMillis(); long queryEndTime = now - retentionPeriodMs; long queryStartTime = now - TimeUnit.DAYS.toMillis(lookbackDays); int totalBlobsPurged = 0; for (String fieldName : compactionFields) { try { long optimizedStartTime = Math.max(queryStartTime, checkpoints.get(fieldName)); int numPurged = compactPartition(partitionPath, fieldName, optimizedStartTime, queryEndTime); logger.info("Purged blobs in partition based on {}", numPurged, partitionPath, fieldName); totalBlobsPurged += numPurged; } catch (CloudStorageException ex) { logger.error("Compaction failed for partition based on {}", partitionPath, fieldName, ex); vcrMetrics.compactionFailureCount.inc(); } } if (isShuttingDown()) { logger.info("Compaction terminated due to shut down."); } return totalBlobsPurged; }
Source:
<code>public void commence(ServletRequest request, ServletResponse response, AuthenticationException authException) throws IOException, ServletException { HttpServletResponse httpResponse = (HttpServletResponse) response; <START> httpResponse.addHeader("WWW-Authenticate", "Basic realm=\"" + realmName + "\""); <END> if (hasAccept(request, "application/vnd.go.cd.v1+json")) { httpResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED); httpResponse.getOutputStream().println("{"); httpResponse.getOutputStream().println(" \"message\": \"You are not authorized to access this resource!\""); httpResponse.getOutputStream().println("}"); return; } httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage()); }</code><technical_language>String.format for readability? Applicable other parts</technical_language>

Target:
public void commence(ServletRequest request, ServletResponse response, AuthenticationException authException) throws IOException, ServletException { HttpServletResponse httpResponse = (HttpServletResponse) response; httpResponse.addHeader("WWW-Authenticate", "Basic realm=\"GoCD\""); if (hasAccept(request, "application/vnd.go.cd.v1+json")) { httpResponse.setContentType("application/vnd.go.cd.v1+json"); httpResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED); httpResponse.getOutputStream().print("{\n"); httpResponse.getOutputStream().print(" \"message\": \"You are not authorized to access this resource!\"\n"); httpResponse.getOutputStream().print("}\n"); return; } httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage()); }
Source:
<code><START> public synchronized void notify(List<URL> urls) { <END> List<URL> categoryUrls = urls.stream() .filter(this::isValidCategory) .filter(this::isNotCompatibleFor26x) .collect(Collectors.toList()); this.configurators = Configurator.toConfigurators(classifyUrls(categoryUrls, UrlUtils::isConfigure)) .orElse(configurators); toRouters(classifyUrls(categoryUrls, UrlUtils::isRoute)).ifPresent(this::addRouters); refreshOverrideAndInvoker(classifyUrls(categoryUrls, UrlUtils::isProvider)); }</code><technical_language>public synchronized void notify(final List<URL> urls)</technical_language>

Target:
public synchronized void notify(List<URL> urls) { List<URL> categoryUrls = urls.stream() .filter(this::isValidCategory) .filter(this::isNotCompatibleFor26x) .collect(Collectors.toList()); this.configurators = Configurator.toConfigurators(classifyUrls(categoryUrls, UrlUtils::isConfigurator)) .orElse(configurators); toRouters(classifyUrls(categoryUrls, UrlUtils::isRoute)).ifPresent(this::addRouters); refreshOverrideAndInvoker(classifyUrls(categoryUrls, UrlUtils::isProvider)); }
Source:
<code>public void testRenameProcessVariableForInitColumns(){ ProcessInstanceListViewImpl processInstanceListView = view; GridGlobalPreferences gridPreferences = new GridGlobalPreferences("test",processInstanceListView.getInitColumns(),processInstanceListView.getBannedColumns()); ListTable<ProcessInstanceSummary> extendedPagedTable = new ListTable<ProcessInstanceSummary>(gridPreferences); extendedPagedTable.getGridPreferencesStore().getColumnPreferences().add(new GridColumnPreference("Name",-1,"")); extendedPagedTable.getGridPreferencesStore().getColumnPreferences().add(new GridColumnPreference("Id",-1,"")); extendedPagedTable.getGridPreferencesStore().getColumnPreferences().add(new GridColumnPreference("performance",-1,"")); processInstanceListView.initColumns(extendedPagedTable); <START> assertEquals(2, extendedPagedTable.getColumnMetaList().stream() <END> .filter(column -> column.getCaption().equals("Var_Name") || column.getCaption().equals("Var_Id")) .collect(Collectors.toList()).size()); }</code><technical_language>I a more comprehensive test check number/size in columnMetaList matches expected final size. check individual column is there, if expected names</technical_language>

Target:
public void testRenameProcessVariableForInitColumns(){ GridGlobalPreferences gridPreferences = new GridGlobalPreferences("test",view.getInitColumns(),view.getBannedColumns()); ListTable<ProcessInstanceSummary> extendedPagedTable = new ListTable<ProcessInstanceSummary>(gridPreferences); List<GridColumnPreference> gridColumnPreferenceList = extendedPagedTable.getGridPreferencesStore().getColumnPreferences(); gridColumnPreferenceList.add(new GridColumnPreference("Name",-1,"")); gridColumnPreferenceList.add(new GridColumnPreference("Id",-1,"")); gridColumnPreferenceList.add(new GridColumnPreference("performance",-1,"")); final ColumnMeta checkColumnMeta = view.initChecksColumn(extendedPagedTable); ColumnMeta<ProcessInstanceSummary> actionsColumnMeta = view.initActionsColumn(); Column<ProcessInstanceSummary, ?> errorCountColumn = view.initErrorCountColumn(); extendedPagedTable.addSelectionIgnoreColumn(checkColumnMeta.getColumn()); extendedPagedTable.addSelectionIgnoreColumn(actionsColumnMeta.getColumn()); extendedPagedTable.addSelectionIgnoreColumn(errorCountColumn); final Column<ProcessInstanceSummary, String> startColumn = view.createTextColumn(COLUMN_START, process -> DateUtils.getDateTimeStr(process.getStartTime())); List<ColumnMeta<ProcessInstanceSummary>> columnMetas = view.getGeneralColumnMetas(extendedPagedTable, startColumn, checkColumnMeta, actionsColumnMeta, errorCountColumn); assertThat(columnMetas.stream()).extracting(columnMeta -> columnMeta.getCaption()).hasSize(14).doesNotContain("Var_Name") .doesNotContain("Var_Id"); columnMetas.addAll(view.renameVariables(extendedPagedTable, columnMetas)); assertThat(columnMetas.stream()).extracting(columnMeta -> columnMeta.getCaption()).hasSize(17).containsOnlyOnce( "Var_Name") .containsOnlyOnce("Var_Id"); }
Source:
<code>public void selectLines(int fromLine, int numberOfLine) { <START> Actions action = actionsFactory.createAction(seleniumWebDriver); <END> setCursorToLine(fromLine); action.keyDown(SHIFT).perform(); for (int i = 0; i < numberOfLine; i++) { typeTextIntoEditor(Keys.ARROW_DOWN.toString()); } action.keyUp(SHIFT).perform(); }</code><technical_language>of "SeleniumWebDriverHelper#getAction()" method</technical_language>

Target:
public void selectLines(int fromLine, int numberOfLine) { Actions action = seleniumWebDriverHelper.getAction(seleniumWebDriver); setCursorToLine(fromLine); action.keyDown(SHIFT).perform(); for (int i = 0; i < numberOfLine; i++) { typeTextIntoEditor(Keys.ARROW_DOWN.toString()); } action.keyUp(SHIFT).perform(); action.sendKeys(Keys.END.toString()).keyUp(SHIFT).perform(); }
Source:
<code>private boolean hasIgnoredModifiers(DetailAST modifiers) { final boolean isStatic = modifiers.findFirstToken(TokenTypes.LITERAL_STATIC) != null; final boolean isFinal = modifiers.findFirstToken(TokenTypes.FINAL) != null; final boolean ignoredStatic = ignoreStatic && isStatic; final boolean ignoredFinal = ignoreFinal && isFinal; final boolean result; if (ignoreStaticFinal) { result = isStatic && isFinal || ignoredFinal || ignoredStatic; } else { result = ignoredFinal && !isStatic <START> || ignoredStatic && !isFinal; <END> } return result; }</code><technical_language>please simplify boolean expressions above. ignoredStatic ignoredFinal isStatic isFinal in initialization</technical_language>

Target:
private boolean hasIgnoredModifiers(DetailAST modifiers) { final boolean isStatic = modifiers.findFirstToken(TokenTypes.LITERAL_STATIC) != null; final boolean isFinal = modifiers.findFirstToken(TokenTypes.FINAL) != null; final boolean result; if (isStatic && isFinal) { result = ignoreStaticFinal; } else { result = ignoreStatic && isStatic || ignoreFinal && isFinal; } return result; }
Source:
<code>public void testConnectOnStartup() throws Exception { GerritServer gerritServerOne = new GerritServer(gerritServerOneName, true); PluginImpl.getInstance().addServer(gerritServerOne); gerritServerOne.start(); <START> assertEquals(true, gerritServerOne.isNoConnectionOnBootup()); <END> }</code><technical_language>check connect</technical_language>

Target:
public void testConnectOnStartup() throws Exception { GerritServer gerritServerOne = new GerritServer(gerritServerOneName, true); PluginImpl.getInstance().addServer(gerritServerOne); gerritServerOne.start(); assertEquals(true, gerritServerOne.isNoConnectionOnStartup()); }
Source:
<code>public void toggleTrackIndividualEndpoints() throws Exception { ModelNodeResult originalValue = operations.readAttribute(REQUEST_CONTROLLER_SUBSYSTEM_ADDRESS, <START> TRACK_INDIVIDUAL_ENDPOINTS, ReadAttributeOption.INCLUDE_DEFAULTS); <END> originalValue.assertSuccess(); boolean originalValueBool = originalValue.booleanValue(); try { new ConfigChecker.Builder(client, REQUEST_CONTROLLER_SUBSYSTEM_ADDRESS) .configFragment(page.getConfigFragment()) .editAndSave(ConfigChecker.InputType.CHECKBOX, TRACK_INDIVIDUAL_ENDPOINTS, !originalValueBool) .verifyFormSaved() .verifyAttribute(TRACK_INDIVIDUAL_ENDPOINTS, !originalValueBool); new ConfigChecker.Builder(client, REQUEST_CONTROLLER_SUBSYSTEM_ADDRESS) .configFragment(page.getConfigFragment()) .editAndSave(ConfigChecker.InputType.CHECKBOX, TRACK_INDIVIDUAL_ENDPOINTS, originalValueBool) .verifyFormSaved() .verifyAttribute(TRACK_INDIVIDUAL_ENDPOINTS, originalValueBool); } finally { operations.writeAttribute(REQUEST_CONTROLLER_SUBSYSTEM_ADDRESS, TRACK_INDIVIDUAL_ENDPOINTS, originalValue.value()).assertSuccess(); } }</code><technical_language>NOT_INCLUDE_DEFAULTS</technical_language>

Target:
public void toggleTrackIndividualEndpoints() throws Exception { ModelNodeResult originalValue = operations.readAttribute(REQUEST_CONTROLLER_SUBSYSTEM_ADDRESS, TRACK_INDIVIDUAL_ENDPOINTS, ReadAttributeOption.NOT_INCLUDE_DEFAULTS); originalValue.assertSuccess(); boolean originalValueBool = originalValue.booleanValue(); try { new ConfigChecker.Builder(client, REQUEST_CONTROLLER_SUBSYSTEM_ADDRESS) .configFragment(page.getConfigFragment()) .editAndSave(ConfigChecker.InputType.CHECKBOX, TRACK_INDIVIDUAL_ENDPOINTS, !originalValueBool) .verifyFormSaved() .verifyAttribute(TRACK_INDIVIDUAL_ENDPOINTS, !originalValueBool); new ConfigChecker.Builder(client, REQUEST_CONTROLLER_SUBSYSTEM_ADDRESS) .configFragment(page.getConfigFragment()) .editAndSave(ConfigChecker.InputType.CHECKBOX, TRACK_INDIVIDUAL_ENDPOINTS, originalValueBool) .verifyFormSaved() .verifyAttribute(TRACK_INDIVIDUAL_ENDPOINTS, originalValueBool); } finally { operations.writeAttribute(REQUEST_CONTROLLER_SUBSYSTEM_ADDRESS, TRACK_INDIVIDUAL_ENDPOINTS, originalValue.value()).assertSuccess(); } }
Source:
<code>public Feign build() { if (library == null) { throw new IllegalStateException("A Reactive Streams Library has not been specified"); } <START> super.contract(new ReactiveDelegatingContract(this.contract)); <END> super.invocationHandlerFactory(new ReactiveInvocationHandlerFactory(this.library)); return super.build(); }</code><technical_language>recommend checking if contract is instance of ReactiveC warp of</technical_language>

Target:
public Feign build() { if (!(this.contract instanceof ReactiveDelegatingContract)) { super.contract(new ReactiveDelegatingContract(this.contract)); } else { super.contract(this.contract); } return super.build(); }
Source:
<code><START> protected ToStringBuilder appendAttributes(ToStringBuilder tsb) { <END> return tsb.append("id", getId()) .append("name", getName()) .append("vdsId", getVdsId()) .append("networkName", getNetworkName()) .append("ipv4BootProtocol", getIpv4BootProtocol()) .append("ipv4Address", getIpv4Address()) .append("ipv4Subnet", getIpv4Subnet()) .append("ipv4Gateway", getIpv4Gateway()) .append("ipv6BootProtocol", getIpv6BootProtocol()) .append("ipv6Address", getIpv6Address()) .append("ipv6Prefix", getIpv6Prefix()) .append("ipv6Gateway", getIpv6Gateway()) .append("mtu", getMtu()) .append("bridged", isBridged()) .append("reportedSwitchType", getReportedSwitchType()) .append("type", getType()) .append("networkImplementationDetails", getNetworkImplementationDetails()) .append("qos", getQos()) .append("adPartnerMac", getAdPartnerMac()); }</code><technical_language>want add adAggregationId well</technical_language>

Target:
protected ToStringBuilder appendAttributes(ToStringBuilder tsb) { return tsb.append("id", getId()) .append("name", getName()) .append("vdsId", getVdsId()) .append("networkName", getNetworkName()) .append("ipv4BootProtocol", getIpv4BootProtocol()) .append("ipv4Address", getIpv4Address()) .append("ipv4Subnet", getIpv4Subnet()) .append("ipv4Gateway", getIpv4Gateway()) .append("ipv6BootProtocol", getIpv6BootProtocol()) .append("ipv6Address", getIpv6Address()) .append("ipv6Prefix", getIpv6Prefix()) .append("ipv6Gateway", getIpv6Gateway()) .append("mtu", getMtu()) .append("bridged", isBridged()) .append("reportedSwitchType", getReportedSwitchType()) .append("type", getType()) .append("networkImplementationDetails", getNetworkImplementationDetails()) .append("qos", getQos()) .append("adPartnerMac", getAdPartnerMac()) .append("adAggregatorId", adAggregatorId); }
Source:
<code>static void validateVersion(short version) { if (version < Replica_Metadata_Request_Version_V1 || version > Replica_Metadata_Request_Version_V2) { <START> throw new IllegalArgumentException("Invalid version"); <END> } }</code><technical_language>Include version in message</technical_language>

Target:
static void validateVersion(short version) { if (version < Replica_Metadata_Request_Version_V1 || version > Replica_Metadata_Request_Version_V2) { throw new IllegalArgumentException("Invalid replicametadata request version: " + version); } }
Source:
<code>public SessionKey getSessionKey() { return new SessionKey() { private volatile boolean active = true; <START> private void updateActive() { <END> active = sender.getBlock().getType() == Material.COMMAND_BLOCK || sender.getBlock().getType() == Material.CHAIN_COMMAND_BLOCK || sender.getBlock().getType() == Material.REPEATING_COMMAND_BLOCK; } @Override public String getName() { return sender.getName(); } @Override public boolean isActive() { if (Bukkit.isPrimaryThread()) { updateActive(); } else { Bukkit.getScheduler().callSyncMethod(plugin, () -> { updateActive(); return null; }); } return active; } @Override public boolean isPersistent() { return true; } @Override public UUID getUniqueId() { return uuid; } }; }</code><technical_language>this needs check if chunk is loaded. unloaded block = inactive block</technical_language>

Target:
public SessionKey getSessionKey() { return new SessionKey() { private volatile boolean active = true; private void updateActive() { Block block = sender.getBlock(); if (!block.getWorld().isChunkLoaded(block.getX() >> 4, block.getZ() >> 4)) { active = false; return; } Material type = block.getType(); active = type == Material.COMMAND_BLOCK || type == Material.CHAIN_COMMAND_BLOCK || type == Material.REPEATING_COMMAND_BLOCK; } @Override public String getName() { return sender.getName(); } @Override public boolean isActive() { if (Bukkit.isPrimaryThread()) { updateActive(); } else { Bukkit.getScheduler().callSyncMethod(plugin, () -> { updateActive(); return null; }); } return active; } @Override public boolean isPersistent() { return true; } @Override public UUID getUniqueId() { return uuid; } }; }
Source:
<code>public KafkaIndexTaskClient( HttpClient httpClient, ObjectMapper jsonMapper, TaskInfoProvider taskInfoProvider, String dataSource, int numThreads, Duration httpTimeout, long numRetries ) { this.httpClient = httpClient; this.jsonMapper = jsonMapper; this.taskInfoProvider = taskInfoProvider; this.httpTimeout = httpTimeout; this.numRetries = numRetries; this.retryPolicyFactory = createRetryPolicyFactory(); <START> String threadId = String.format("KafkaIndexTaskClient-%s", dataSource); <END> this.executorService = MoreExecutors.listeningDecorator(Execs.multiThreaded(numThreads, threadId + "-%d")); }</code><technical_language>String.format("KafkaIndexTaskClient-%s-%%d", dataSource) work too, changing is unnecessary</technical_language>

Target:
public KafkaIndexTaskClient( HttpClient httpClient, ObjectMapper jsonMapper, TaskInfoProvider taskInfoProvider, String dataSource, int numThreads, Duration httpTimeout, long numRetries ) { this.httpClient = httpClient; this.jsonMapper = jsonMapper; this.taskInfoProvider = taskInfoProvider; this.httpTimeout = httpTimeout; this.numRetries = numRetries; this.retryPolicyFactory = createRetryPolicyFactory(); this.executorService = MoreExecutors.listeningDecorator( Execs.multiThreaded( numThreads, String.format( "KafkaIndexTaskClient-%s-%%d", dataSource ) ) ); }
Source:
<code>protected String getModelFilename(final Blob zipContent) throws IOException { ZipEntry zipEntry; String threeDFilename = null; try (ZipInputStream zipInputStream = new ZipInputStream(zipContent.getStream())) { while ((zipEntry = zipInputStream.getNextEntry()) != null) { <START> boolean isSupported = SUPPORTED_EXTENSIONS.contains(lowerCaseFileExtension(zipEntry.getName())); <END> if (zipEntry.isDirectory() || !isSupported || zipEntry.getName().startsWith(".")) { continue; } threeDFilename = FileManagerUtils.fetchTitle(zipEntry.getName()); break; } } return threeDFilename; }</code><technical_language>using: java String ext = FilenameUtils.getExtension(zipEntry.getName).toLowerCase(); boolean isSupported = SUPPORTED_EXTENSIONS.contains(ext);</technical_language>

Target:
protected String getModelFilename(final Blob zipContent) throws IOException { ZipEntry zipEntry; String threeDFilename = null; try (ZipInputStream zipInputStream = new ZipInputStream(zipContent.getStream())) { while ((zipEntry = zipInputStream.getNextEntry()) != null) { String ext = FilenameUtils.getExtension(zipEntry.getName()).toLowerCase(); boolean isSupported = SUPPORTED_EXTENSIONS.contains(ext); if (zipEntry.isDirectory() || !isSupported || zipEntry.getName().startsWith(".")) { continue; } threeDFilename = FileManagerUtils.fetchTitle(zipEntry.getName()); break; } } return threeDFilename; }
Source:
<code>public static ILttngRelaydConnector getNewConnector(Socket myConnection) throws IOException { DataOutputStream outNet = new DataOutputStream(myConnection.getOutputStream()); DataInputStream inNet = new DataInputStream(myConnection.getInputStream()); ViewerCommand connectCommand = new ViewerCommand(); <START> ConnectResponse connectPayload = new ConnectResponse(0, 2, 4, ConnectionType.VIEWER_CLIENT_COMMAND); <END> connectCommand.setCommand(Command.VIEWER_CONNECT); connectCommand.setDataSize(connectPayload.size()); outNet.write(connectCommand.serialize()); outNet.flush(); ConnectResponse connectReply = new ConnectResponse(inNet); switch (connectReply.getMajor()) { case 2: switch (connectReply.getMinor()) { case 0: case 1: case 2: case 3: return new LttngRelaydConnector_Unsupported(); case 4: default: return new LttngRelaydConnector_2_4(inNet, outNet); } default: return new LttngRelaydConnector_Unsupported(); } }</code><technical_language>This class version-agnostic, hardcode version 2.4 here. this a parameter getNewConnector</technical_language>

Target:
public static ILttngRelaydConnector getNewConnector(Socket myConnection) throws IOException { DataOutputStream outNet = new DataOutputStream(myConnection.getOutputStream()); DataInputStream inNet = new DataInputStream(myConnection.getInputStream()); ConnectResponse connectPayload = new ConnectResponse(0, MAJOR_VERSION, MINOR_VERSION, ConnectionType.VIEWER_CLIENT_COMMAND); ViewerCommand connectCommand = new ViewerCommand(Command.VIEWER_CONNECT, connectPayload.size(), 0); outNet.write(connectCommand.serialize()); outNet.flush(); ConnectResponse connectReply = new ConnectResponse(inNet); switch (connectReply.getMajor()) { case 2: switch (connectReply.getMinor()) { case 0: case 1: case 2: case 3: return new LttngRelaydConnector_Unsupported(); case 4: default: return new LttngRelaydConnector_2_4(inNet, outNet); } default: return new LttngRelaydConnector_Unsupported(); } }
Source:
<code>public void nextImage() { int size = images.size(); int prevIndex = index; if (size > 0) { if (index == size - 1) { if (infinite) { index = 0; } else { stop(); } } else { index++; } if (prevIndex != index) { <START> currentImage.set(images.get(index)); <END> } } }</code><technical_language>### Option B Change this setting currentImage new image, set _texture_ new texture. If wanted get fancy a binding, bind texture images.get(index) ReadOnlyBinding this texture automatically update set it</technical_language>

Target:
public void nextImage() { int size = images.size(); if (size > 0) { if (index == size - 1) { if (infinite) { index = 0; } else { stop(); } } else { index++; } } }
Source:
<code>public void toStream(@NonNull JsonStream writer) throws IOException { exception.setProjectPackages(projectPackages); <START> exception.toStream(writer); <END> }</code><technical_language>I need spend a bit more time understanding interactions Exceptions BugsnagException a confusing BugsnagException represents array individual exception value, in introduce a situation "cause" exception of a Streamable skipped serialization. deleted logic in Exceptions more correct simplify execution path BugsnagException.toStream, BugsnagException.serializeException, BugsnagException.writeThrowable</technical_language>

Target:
public void toStream(@NonNull JsonStream writer) throws IOException { writer.beginArray(); Throwable currentEx = exception; while (currentEx != null) { if (currentEx instanceof JsonStream.Streamable) { ((JsonStream.Streamable) currentEx).toStream(writer); } else { String exceptionName = currentEx.getClass().getName(); String localizedMessage = currentEx.getLocalizedMessage(); StackTraceElement[] stackTrace = currentEx.getStackTrace(); exceptionToStream(writer, exceptionName, localizedMessage, stackTrace); } currentEx = currentEx.getCause(); } writer.endArray(); }
Source:
<code>public boolean isAttachable() { <START> return attachable == null ? false : attachable; <END> }</code><technical_language>please return raw value, end-user code wrap simply BooleanUtils null in return means is value. != false req/rsp view point</technical_language>

Target:
public Boolean isAttachable() { return attachable; }
Source:
<code>public void run() { if (!fStateSystemAssigned) { Activator.logError("Cannot run event manager without assigning a target state system first!"); return; } @NonNull ITmfEvent event = fEventsQueue.take(); while (event != END_EVENT) { if (event == EMPTY_QUEUE_EVENT) { event = fEventsQueue.take(); continue; } currentEvent = event; <START> fLatestTime = event.getTimestamp().toNanos(); <END> eventHandle(event); event = fEventsQueue.take(); } closeStateSystem(); }</code><technical_language>eventHandle() below</technical_language>

Target:
public void run() { if (!fStateSystemAssigned) { Activator.logError("Cannot run event manager without assigning a target state system first!"); return; } @NonNull ITmfEvent event = fEventsQueue.take(); while (event != END_EVENT) { if (event == EMPTY_QUEUE_EVENT) { event = fEventsQueue.take(); continue; } currentEvent = event; fSafeTime = event.getTimestamp().toNanos() - 1; eventHandle(event); event = fEventsQueue.take(); } closeStateSystem(); }
Source:
<code>public final Observable<Message> listen() { checkState(!stopped, "Transport is stopped"); <START> return incomingMessagesSubject.onBackpressureBuffer().asObservable(); <END> }</code><technical_language>this memory overflow? need limit buffer</technical_language>

Target:
public final Observable<Message> listen() { checkState(!stopped, "Transport is stopped"); return incomingMessagesSubject.onBackpressureBuffer(DEFAULT_BUFFER_LIMIT).asObservable(); }
Source:
<code>private void doThreadedTasks() { Thread httpsInfoThread = new Thread("ZAP-httpsinfo") { @Override public void run() { try { initSession(getTarget()); } catch (DVException e) { String warnMsg = Constant.messages.getString( "httpsinfo.init.warning", <START> getTarget() == null ? Constant.messages.getString( "httpsinfo.init.warning.missing") : getTarget().toString(), <END> e.getCause()); LOGGER.warn(warnMsg); View.getSingleton().showWarningDialog(warnMsg); return; } try { setDvEng(getSession()); } catch (DVException e) { LOGGER.warn(e.getMessage(), e); } showGeneral(); showCipherSuites(); } }; httpsInfoThread.start(); }</code><technical_language>show target is invalid</technical_language>

Target:
private void doThreadedTasks() { Thread httpsInfoThread = new Thread("ZAP-httpsinfo") { @Override public void run() { if (getTarget() == null) { String missingMsg = Constant.messages.getString("httpsinfo.init.warning.missing"); LOGGER.warn(missingMsg); View.getSingleton().showWarningDialog(missingMsg); return; } try { initSession(getTarget()); } catch (DVException e) { String warnMsg = Constant.messages.getString( "httpsinfo.init.warning", getTarget().toString(), e.getCause()); LOGGER.warn(warnMsg); View.getSingleton().showWarningDialog(warnMsg); return; } try { setDvEng(getSession()); } catch (DVException e) { LOGGER.warn(e.getMessage(), e); } showGeneral(); showCipherSuites(); } }; httpsInfoThread.start(); }
Source:
<code>public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException { List<String> command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, LTTngControlServiceConstants.OPTION_KERNEL); ICommandResult result = executeCommand(command, monitor, false); List<IBaseEventInfo> events = new ArrayList<>(); <START> if (isError(result) && result.getErrorOutput().length > 0) { <END> if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN)) { return events; } throw new ExecutionException(Messages.TraceControl_CommandError + toCommandString(command)); } Document document = getDocumentFromStrings(result.getOutput()); NodeList rawEvents = document.getElementsByTagName(MIStrings.EVENT); getBaseEventInfo(rawEvents, events); return events; }</code><technical_language>necessary</technical_language>

Target:
public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException { List<String> command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, LTTngControlServiceConstants.OPTION_KERNEL); ICommandResult result = executeCommand(command, monitor, false); List<IBaseEventInfo> events = new ArrayList<>(); if (isError(result)) { if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN)) { return events; } throw new ExecutionException(Messages.TraceControl_CommandError + toCommandString(command)); } Document document = getDocumentFromStrings(result.getOutput()); NodeList rawEvents = document.getElementsByTagName(MIStrings.EVENT); getBaseEventInfo(rawEvents, events); return events; }
Source:
<code>public void killMessage(SimpleString nodeID) throws Exception { if (clientVersion < DisconnectConsumerWithKillMessage.VERSION_INTRODUCED) { <START> throw new Exception(String.valueOf(clientVersion)); <END> } Channel clientChannel = getChannel(1, -1); DisconnectConsumerWithKillMessage response = new DisconnectConsumerWithKillMessage(nodeID); clientChannel.send(response, -1); }</code><technical_language>this a more specific ActiveMQ Exception? if ActiveMQException</technical_language>

Target:
public void killMessage(SimpleString nodeID) { if (clientVersion < DisconnectConsumerWithKillMessage.VERSION_INTRODUCED) { return; } Channel clientChannel = getChannel(1, -1); DisconnectConsumerWithKillMessage response = new DisconnectConsumerWithKillMessage(nodeID); clientChannel.send(response, -1); }
Source:
<code>public void testConcatMultiple() throws Throwable { int numFiles = GoogleHadoopFileSystemBase.MAX_COMPOSE_OBJECTS * 3 / 2; Path testPath = path("test"); byte[][] blocks = new byte[numFiles][0]; Path[] srcs = new Path[numFiles]; for (int i = 0; i < numFiles; i++) { Path srcFile = new Path(testPath, "" + i); blocks[i] = dataset(TEST_FILE_LEN, i, 255); createFile(getFileSystem(), srcFile, true, blocks[i]); srcs[i] = srcFile; } Path target = new Path(testPath, "target"); createFile(getFileSystem(), target, false, new byte[0]); <START> getFileSystem().concat(target, srcs); <END> assertFileHasLength(getFileSystem(), target, TEST_FILE_LEN * numFiles); ContractTestUtils.validateFileContent( ContractTestUtils.readDataset(getFileSystem(), target, TEST_FILE_LEN * numFiles), blocks); }</code><technical_language>For understanding, Hadoop api requires target path exists call concat</technical_language>

Target:
public void testConcatMultiple() throws Throwable { int numFiles = GoogleCloudStorage.MAX_COMPOSE_OBJECTS * 3 / 2; Path testPath = path("test"); byte[][] blocks = new byte[numFiles][0]; Path[] srcs = new Path[numFiles]; for (int i = 0; i < numFiles; i++) { Path srcFile = new Path(testPath, "" + i); blocks[i] = dataset(TEST_FILE_LEN, i, 255); createFile(getFileSystem(), srcFile, true, blocks[i]); srcs[i] = srcFile; } Path target = new Path(testPath, "target"); createFile(getFileSystem(), target, false, new byte[0]); getFileSystem().concat(target, srcs); assertFileHasLength(getFileSystem(), target, TEST_FILE_LEN * numFiles); ContractTestUtils.validateFileContent( ContractTestUtils.readDataset(getFileSystem(), target, TEST_FILE_LEN * numFiles), blocks); }
Source:
<code><START> public BaseDialectNamingAdaptor() { <END> }</code><technical_language>Ah yes, sure. "protected" maybe. public constructor DEFAULT_INSTANCE constant stumble</technical_language>

Target:
protected BaseDialectNamingAdaptor() { }
Source:
<code>private void restart() { if(state.get() == State.STARTING) { <START> Trace.debug("Resturning early from restart. Already staring for project {0} and kind {1}", project.getName(), kind); <END> return; } Trace.debug("Rescheduling watch job for project {0} and kind {1}", project.getName(), kind); startWatch(project, backoff, lastConnect, this); }</code><technical_language>s/Resturning/Returning s/staring/starting ??</technical_language>

Target:
private void restart() { if(state.get() == State.STARTING) { Trace.debug("Returning early from restart. Already starting for project {0} and kind {1}", project.getName(), kind); return; } Trace.debug("Rescheduling watch job for project {0} and kind {1}", project.getName(), kind); startWatch(project, backoff, lastConnect, this); }
Source:
<code>public <T> T deserialize(String value, final Type type, SerializerEncoding encoding) throws IOException { if (CoreUtils.isNullOrEmpty(value) || value.equals(BOM) || value.equals(BOM_STRING)) { return null; } <START> if (encoding == SerializerEncoding.XML) { if (value.startsWith(BOM)) { value = value.replaceFirst(BOM, ""); } else if (value.startsWith(BOM_STRING)) { value = value.replaceFirst(BOM_STRING, ""); } <END> } final JavaType javaType = createJavaType(type); try { if (encoding == SerializerEncoding.XML) { return (T) xmlMapper.readValue(value, javaType); } else { return (T) serializer().readValue(value, javaType); } } catch (JsonParseException jpe) { throw logger.logExceptionAsError(new MalformedValueException(jpe.getMessage(), jpe)); } }</code><technical_language>discussed, please file issue for investigation this. This is good for release this this issue noticed in smoke tests get this fix out customers impacted</technical_language>

Target:
public <T> T deserialize(String value, final Type type, SerializerEncoding encoding) throws IOException { if (CoreUtils.isNullOrEmpty(value) || value.equals(BOM) || value.equals(BOM_STRING)) { return null; } if (value.startsWith(BOM)) { value = value.replaceFirst(BOM, ""); } else if (value.startsWith(BOM_STRING)) { value = value.replaceFirst(BOM_STRING, ""); } final JavaType javaType = createJavaType(type); try { if (encoding == SerializerEncoding.XML) { return (T) xmlMapper.readValue(value, javaType); } else { return (T) serializer().readValue(value, javaType); } } catch (JsonParseException jpe) { throw logger.logExceptionAsError(new MalformedValueException(jpe.getMessage(), jpe)); } }