auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public BloodTestingRule createEntity(BloodTestingRuleBackingForm bloodTestingRuleBackingForm) { BloodTestingRule bloodTestingRule = new BloodTestingRule(); bloodTestingRule.setId(bloodTestingRuleBackingForm.getId()); bloodTestingRule.setCategory(bloodTestingRuleBackingForm.getBloodTest().getCategory()); bloodTestingRule.setDonationFieldChanged(bloodTestingRuleBackingForm.getDonationFieldChanged()); bloodTestingRule.setIsDeleted(bloodTestingRuleBackingForm.getIsDeleted()); bloodTestingRule.setNewInformation(bloodTestingRuleBackingForm.getNewInformation()); bloodTestingRule.setPattern(bloodTestingRuleBackingForm.getPattern()); <START> bloodTestingRule.setBloodTest(bloodTestFactory.createEntity(bloodTestingRuleBackingForm.getBloodTest())); <END> bloodTestingRule.setPendingTestsIds(StringUtils.join(bloodTestingRuleBackingForm.getPendingTestsIds(), ',')); return bloodTestingRule; }</code><technical_language>@micnice This work factory is fetching bloodTest entity repo. need entity get category, BloodTestBackingForm id. @jmuzinda is busy working making changes, please chat him</technical_language>

Target:
public BloodTestingRule createEntity(BloodTestingRuleBackingForm bloodTestingRuleBackingForm) { BloodTestingRule bloodTestingRule = new BloodTestingRule(); bloodTestingRule.setId(bloodTestingRuleBackingForm.getId()); bloodTestingRule.setDonationFieldChanged(bloodTestingRuleBackingForm.getDonationFieldChanged()); bloodTestingRule.setIsDeleted(bloodTestingRuleBackingForm.getIsDeleted()); bloodTestingRule.setNewInformation(bloodTestingRuleBackingForm.getNewInformation()); bloodTestingRule.setPattern(bloodTestingRuleBackingForm.getPattern()); bloodTestingRule.setBloodTest(bloodTestRepository.findBloodTestById(bloodTestingRuleBackingForm.getBloodTest().getId())); List<Long> pendingTestsIds = new ArrayList<>(); for (BloodTestBackingForm pendingBloodTest : bloodTestingRuleBackingForm.getPendingTests()) { pendingTestsIds.add(pendingBloodTest.getId()); } bloodTestingRule.setPendingTestsIds(StringUtils.join(pendingTestsIds, ',')); return bloodTestingRule; }
Source:
<code>private boolean isRegexMatch(String pageMatcher, String toMatch) { <START> Pattern patt = Pattern.compile(pageMatcher); <END> return patt.matcher(toMatch).find(); }</code><technical_language>compile once? This called times</technical_language>

Target:
private boolean isRegexMatch(String pageMatcher, String toMatch) { if (pattern == null) { pattern = Pattern.compile(pageMatcher); } return pattern.matcher(toMatch).find(); }
Source:
<code>public long saveSequencerServiceRecord(SequencerServiceRecord record) throws IOException { <START> return sequencerServiceRecordStore.save(record); <END> }</code><technical_language>MISO convention for RequestManager initial check for if xStore is null (add this methods below)</technical_language>

Target:
public long saveSequencerServiceRecord(SequencerServiceRecord record) throws IOException { if (sequencerServiceRecordStore != null) { return sequencerServiceRecordStore.save(record); } else { throw new IOException("No sequencerServiceRecordStore available. Check that it has been declared in the Spring config."); } }
Source:
<code>public void toggleToC(int action) { if (tocHandler == null) { return; } switch (action) { case ShowToCEvent.ACTION_SHOW: tocHandler.show(); break; case ShowToCEvent.ACTION_HIDE: tocHandler.hide(); break; <START> default: <END> if (tocHandler.isVisible()) { tocHandler.hide(); } else { tocHandler.show(); } } }</code><technical_language>case ShowToCEvent.ACTION_TOGGLE? throw exception for default</technical_language>

Target:
public void toggleToC(int action) { if (tocHandler == null) { return; } switch (action) { case ShowToCEvent.ACTION_SHOW: tocHandler.show(); break; case ShowToCEvent.ACTION_HIDE: tocHandler.hide(); break; case ShowToCEvent.ACTION_TOGGLE: if (tocHandler.isVisible()) { tocHandler.hide(); } else { tocHandler.show(); } break; default: throw new RuntimeException("Unknown action!"); } }
Source:
<code>public ImmutableSetValue<BlockType> breakable() { <START> return new ImmutableSpongeSetValue<BlockType>(Keys.BREAKABLE_BLOCK_TYPES, Sets.newHashSet(this.breakable)); <END> }</code><technical_language>pass set</technical_language>

Target:
public ImmutableSetValue<BlockType> breakable() { return (ImmutableSetValue<BlockType>) getValueGetter(); }
Source:
<code>private void findAndWrite2OutputStream(MessageContext messageContext, OutputStream out, boolean preserve) throws AxisFault { try { SOAPEnvelope envelope = messageContext.getEnvelope(); OMElement contentEle = envelope.getBody().getFirstElement(); if (contentEle != null) { OMNode node = contentEle.getFirstOMChild(); if (!(node instanceof OMText)) { String msg = "Wrong Input for the Validator, " + "the content of the first child element of the Body " + "should have the zip file"; log.error(msg); throw new AxisFault(msg); } OMText binaryDataNode = (OMText) node; DataHandler dh = (DataHandler) binaryDataNode.getDataHandler(); DataSource dataSource = dh.getDataSource(); if (dataSource instanceof StreamingOnRequestDataSource) { if (((StreamingOnRequestDataSource) dataSource).isConsumed()) { Object httpMethodObj = messageContext.getProperty(Constants.Configuration.HTTP_METHOD); if ((httpMethodObj instanceof String) && "POST".equals(httpMethodObj)) { log.warn("Attempting to send an already consumed request [" + messageContext.getTo().getAddress() + " POST/Empty Message Body]"); } } <START> if (!preserve && dataSource instanceof StreamingOnRequestDataSource) { <END> ((StreamingOnRequestDataSource) dataSource).setLastUse(true); } } dh.writeTo(out); } } catch (OMException e) { log.error(e); throw AxisFault.makeFault(e); } catch (IOException e) { log.error(e); throw AxisFault.makeFault(e); } }</code><technical_language>"dataSource instanceof StreamingOnRequestDataSource" is redundant is checked in line 185</technical_language>

Target:
private void findAndWrite2OutputStream(MessageContext messageContext, OutputStream out, boolean preserve) throws AxisFault { try { SOAPEnvelope envelope = messageContext.getEnvelope(); OMElement contentEle = envelope.getBody().getFirstElement(); if (contentEle != null) { OMNode node = contentEle.getFirstOMChild(); if (!(node instanceof OMText)) { String msg = "Wrong Input for the Validator, " + "the content of the first child element of the Body " + "should have the zip file"; log.error(msg); throw new AxisFault(msg); } OMText binaryDataNode = (OMText) node; DataHandler dh = (DataHandler) binaryDataNode.getDataHandler(); DataSource dataSource = dh.getDataSource(); if (dataSource instanceof StreamingOnRequestDataSource) { if (((StreamingOnRequestDataSource) dataSource).isConsumed()) { Object httpMethodObj = messageContext.getProperty(Constants.Configuration.HTTP_METHOD); if ((httpMethodObj instanceof String) && "POST".equals(httpMethodObj)) { log.warn("Attempting to send an already consumed request [" + messageContext.getTo().getAddress() + " POST/Empty Message Body]"); } if (!preserve) { ((StreamingOnRequestDataSource) dataSource).setLastUse(true); } } } dh.writeTo(out); } } catch (OMException e) { log.error(e); throw AxisFault.makeFault(e); } catch (IOException e) { log.error(e); throw AxisFault.makeFault(e); } }
Source:
<code>public ConsumerDTO create( @ApiParam(name = "consumer", required = true) ConsumerDTO dto, @Context Principal principal, @QueryParam("username") String userName, @QueryParam("owner") String ownerKey, @QueryParam("activation_keys") String activationKeys, @QueryParam("identity_cert_creation") @DefaultValue("true") boolean identityCertCreation) throws BadRequestException { Consumer consumer = new Consumer(); if (dto.getUuid() != null) { consumer.setUuid(dto.getUuid()); } populateEntity(consumer, dto); <START> if (dto.getType() != null) { <END> ConsumerType ctype = this.consumerTypeCurator.lookupByLabel(dto.getType().getLabel()); if (ctype == null) { throw new BadRequestException(i18n.tr("Invalid unit type: {0}", dto.getType().getLabel())); } consumer.setType(ctype); } else { throw new BadRequestException(i18n.tr("Unit type must be specified.")); } if (dto.getCreated() != null) { consumer.setCreated(dto.getCreated()); } return translator.translate(createConsumerFromEntity(consumer, principal, userName, ownerKey, activationKeys, identityCertCreation), ConsumerDTO.class); }</code><technical_language>This is code, is a preference of mine, feel free ignore... but... I code read if this checked type == null threw BadRequestException is in else clause. remove else clause move new code left. if (dto.getType() == null) { throw new BadRequestException(i18n.tr("Unit type specified.")); } ConsumerType ctype = this.consumerTypeCurator.lookupByLabel(dto.getType().getLabel()); if (ctype == null) { throw new BadRequestException(i18n.tr("Invalid unit type: {0}", dto.getType().getLabel())); } consumer.setType(ctype);</technical_language>

Target:
public ConsumerDTO create( @ApiParam(name = "consumer", required = true) ConsumerDTO dto, @Context Principal principal, @QueryParam("username") String userName, @QueryParam("owner") String ownerKey, @QueryParam("activation_keys") String activationKeys, @QueryParam("identity_cert_creation") @DefaultValue("true") boolean identityCertCreation) throws BadRequestException { Consumer consumer = new Consumer(); if (dto.getUuid() != null) { consumer.setUuid(dto.getUuid()); } populateEntity(consumer, dto); if (dto.getType() == null) { throw new BadRequestException(i18n.tr("Unit type must be specified.")); } ConsumerType ctype = this.consumerTypeCurator.lookupByLabel(dto.getType().getLabel()); if (ctype == null) { throw new BadRequestException(i18n.tr("Invalid unit type: {0}", dto.getType().getLabel())); } consumer.setType(ctype); if (dto.getCreated() != null) { consumer.setCreated(dto.getCreated()); } return translator.translate(createConsumerFromEntity(consumer, principal, userName, ownerKey, activationKeys, identityCertCreation), ConsumerDTO.class); }
Source:
<code>protected void write(LogEntry entity, CSVPrinter printer) throws IOException { List<String> propertiesToFetch = getPropertiesToFetch(); for (String property : propertiesToFetch) { String getterName = "get" + property.substring(0, 1).toUpperCase() + property.substring(1); try { <START> printer.print(entity.getClass().getMethod(getterName).invoke(entity)); <END> } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { log.catching(e); } } }</code><technical_language>reflection? I a pain list methods, this is faster lead error/weird case for existing properties</technical_language>

Target:
protected void write(LogEntry entity, CSVPrinter printer) throws IOException { Set<String> propertiesToFetch = new HashSet<>(getPropertiesToFetch()); if (propertiesToFetch.contains(LOG_ID)) { printer.print(entity.getId()); } if (propertiesToFetch.contains(LOG_CATEGORY)) { printer.print(entity.getCategory()); } if (propertiesToFetch.contains(LOG_PRINCIPAL_NAME)) { printer.print(entity.getPrincipalName()); } if (propertiesToFetch.contains(LOG_COMMENT)) { printer.print(entity.getComment()); } if (propertiesToFetch.contains(LOG_DOC_LIFE_CYCLE)) { printer.print(entity.getDocLifeCycle()); } if (propertiesToFetch.contains(LOG_DOC_PATH)) { printer.print(entity.getDocPath()); } if (propertiesToFetch.contains(LOG_DOC_TYPE)) { printer.print(entity.getDocType()); } if (propertiesToFetch.contains(LOG_DOC_UUID)) { printer.print(entity.getDocUUID()); } if (propertiesToFetch.contains(LOG_EVENT_ID)) { printer.print(entity.getEventId()); } if (propertiesToFetch.contains(LOG_REPOSITORY_ID)) { printer.print(entity.getRepositoryId()); } if (propertiesToFetch.contains(LOG_EVENT_DATE)) { printer.print(entity.getEventDate()); } if (propertiesToFetch.contains(LOG_LOG_DATE)) { printer.print(entity.getLogDate()); } }
Source:
<code>public static Index loadIndex(final String source, final InputStream inputStream) { try (BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream, Defaults.NON_ZERO_BUFFER_SIZE)) { return createIndex(bufferedInputStream); } catch (final EOFException ex) { throw new TribbleException.CorruptedIndexFile("Index file is corrupted", source, ex); } catch (final IOException ex) { <START> throw new RuntimeIOException("Failed to read index file: " + source, ex); <END> } }</code><technical_language>Is a reason this is RuntimeException TribbleException</technical_language>

Target:
public static Index loadIndex(final String source, final InputStream inputStream) { try (BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream, Defaults.NON_ZERO_BUFFER_SIZE)) { return createIndex(bufferedInputStream); } catch (final EOFException ex) { throw new TribbleException.CorruptedIndexFile("Index file is corrupted", source, ex); } catch (final IOException ex) { throw new TribbleException.UnableToReadIndexFile("Failed to read index file", source, ex); } }
Source:
<code>public CSVLoaderConsumer(String dataLoadingPolicy, Session session, String schema) { <START> this.dataLoadingPolicy = Objects.requireNonNull(dataLoadingPolicy, "duplicatePolicy must not be null"); <END> if (!DATA_LOADING_POLICIES.contains(dataLoadingPolicy)) { throw new DirectoryException("Invalid dataLoadingPolicy: " + dataLoadingPolicy + ", it should be one of: " + DATA_LOADING_POLICIES); } this.session = Objects.requireNonNull(session, "session is null"); this.schema = Objects.requireNonNull(schema, "schema is null"); }</code><technical_language>duplicatePolicy -> dataLoadingPolicy</technical_language>

Target:
public CSVLoaderConsumer(String dataLoadingPolicy, Session session, String schema) { this.dataLoadingPolicy = dataLoadingPolicy; this.session = session; this.schema = schema; }
Source:
<code>public void setUpProgressListener() throws Exception { <START> Method setCurrentMethod = TaskUtil.class.getDeclaredMethod( "setCurrent", ProgressListener.class ); <END> setCurrentMethod.setAccessible( true ); setCurrentMethod.invoke( null, new CancellableProgressListenerWrapper( null ) ); }</code><technical_language>this method public</technical_language>

Target:
public void setUpProgressListener() throws Exception { new TaskUtil() { { setCurrent( new CancellableProgressListenerWrapper( null ) ); } }; }
Source:
<code>public int add( final SegmentIdentifier identifier, final InputRow row, final Supplier<Committer> committerSupplier ) throws IndexSizeExceededException, SegmentNotWritableException { if (!identifier.getDataSource().equals(schema.getDataSource())) { throw new IAE( "Expected dataSource[%s] but was asked to insert row for dataSource[%s]?!", schema.getDataSource(), identifier.getDataSource() ); } final Sink sink = getOrCreateSink(identifier); metrics.reportMessageMaxTimestamp(row.getTimestampFromEpoch()); final int sinkRowsInMemoryBeforeAdd = sink.getNumRowsInMemory(); final int sinkRowsInMemoryAfterAdd; try { sinkRowsInMemoryAfterAdd = sink.add(row); } catch (IndexSizeExceededException e) { log.error(e, "Sink for segment[%s] was unexpectedly full!", identifier); throw e; } if (sinkRowsInMemoryAfterAdd < 0) { throw new SegmentNotWritableException("Attempt to add row to swapped-out sink for segment[%s].", identifier); } final int numAddedRows = sinkRowsInMemoryAfterAdd - sinkRowsInMemoryBeforeAdd; <START> rowsCurrentlyInMemory += numAddedRows; <END> totalRows += numAddedRows; if (!sink.canAppendRow() || System.currentTimeMillis() > nextFlush || rowsCurrentlyInMemory >= tuningConfig.getMaxRowsInMemory()) { persistAll(committerSupplier.get()); } return sink.getNumRows(); }</code><technical_language>This AtomicInteger is a regular int. safe? Is code required run in thread, Appenderator contract? If please beef contract</technical_language>

Target:
public int add( final SegmentIdentifier identifier, final InputRow row, final Supplier<Committer> committerSupplier ) throws IndexSizeExceededException, SegmentNotWritableException { if (!identifier.getDataSource().equals(schema.getDataSource())) { throw new IAE( "Expected dataSource[%s] but was asked to insert row for dataSource[%s]?!", schema.getDataSource(), identifier.getDataSource() ); } final Sink sink = getOrCreateSink(identifier); metrics.reportMessageMaxTimestamp(row.getTimestampFromEpoch()); final int sinkRowsInMemoryBeforeAdd = sink.getNumRowsInMemory(); final int sinkRowsInMemoryAfterAdd; try { sinkRowsInMemoryAfterAdd = sink.add(row); } catch (IndexSizeExceededException e) { log.error(e, "Sink for segment[%s] was unexpectedly full!", identifier); throw e; } if (sinkRowsInMemoryAfterAdd < 0) { throw new SegmentNotWritableException("Attempt to add row to swapped-out sink for segment[%s].", identifier); } final int numAddedRows = sinkRowsInMemoryAfterAdd - sinkRowsInMemoryBeforeAdd; rowsCurrentlyInMemory.addAndGet(numAddedRows); totalRows.addAndGet(numAddedRows); if (!sink.canAppendRow() || System.currentTimeMillis() > nextFlush || rowsCurrentlyInMemory.get() >= tuningConfig.getMaxRowsInMemory()) { persistAll(committerSupplier.get()); } return sink.getNumRows(); }
Source:
<code><START> protected AbstractEventGateway(Builder builder) { <END> this.eventBus = builder.eventBus; this.dispatchInterceptors = builder.dispatchInterceptors; }</code><technical_language>For consistency other infrastructure components, suggest do builder.validate() call in constructor</technical_language>

Target:
protected AbstractEventGateway(Builder builder) { builder.validate(); this.eventBus = builder.eventBus; this.dispatchInterceptors = builder.dispatchInterceptors; }
Source:
<code>public TransactionCoordinator buildTransactionCoordinator(TransactionCoordinatorOwner owner, TransactionCoordinatorOptions options) { if ( delegate.isJta() ) { TransactionCoordinator coordinator = delegate.buildTransactionCoordinator( owner, options ); return new Neo4jJtaTransactionCoordinator( coordinator, datastoreProvider ); } else { <START> NoopJdbcResourceTransactionCoordinatorOwner noopOwner = new NoopJdbcResourceTransactionCoordinatorOwner( owner ); <END> TransactionCoordinator coordinator = delegate.buildTransactionCoordinator( noopOwner, options ); return new Neo4jLocalTransactionCoordinator( coordinator, datastoreProvider ); } }</code><technical_language>wondering no-op impl plays in here. a "real" implementation in case of Neo4j Embedded, based JDBC Neo4j TX API</technical_language>

Target:
public TransactionCoordinator buildTransactionCoordinator(TransactionCoordinatorOwner owner, TransactionCoordinatorOptions options) { if ( delegate.isJta() ) { TransactionCoordinator coordinator = delegate.buildTransactionCoordinator( owner, options ); return new Neo4jJtaTransactionCoordinator( coordinator, datastoreProvider ); } else { return new Neo4jResourceLocalTransactionCoordinator( this, owner, datastoreProvider ); } }
Source:
<code>public void sendResponse(String message) { try (MDCCloseable mdc = Logging.withContextMapCloseable(loggingContext)) { if (message != null) { T response = rpcModule.unmarshalResponse(message); if (response.getErrorMessage() != null) { responseFuture.completeExceptionally(new RemoteExecutionException(response.getErrorMessage())); span.log(response.getErrorMessage()); failedMeter.mark(); } else { responseFuture.complete(response); } isProcessed = true; responseSize.update(message.getBytes().length); } else { responseFuture.completeExceptionally(new RequestTimedOutException(new TimeoutException())); span.setTag(TAG_TIMEOUT, "true"); failedMeter.mark(); } rpcDuration.update(System.currentTimeMillis() - requestCreationTime); span.finish(); rpcResponseMap.remove(rpcId); messageCache.remove(rpcId); } catch (Throwable e) { <START> LOG.warn("error while handling response for RPC module , response = \n \n", rpcModule.getId(), message, e); <END> } }</code><technical_language>suggestion LOG.warn("Error while handling response for RPC module: {}. Response string: {}", rpcModule.getId(), message, e);</technical_language>

Target:
public void sendResponse(String message) { try (MDCCloseable mdc = Logging.withContextMapCloseable(loggingContext)) { if (message != null) { T response = rpcModule.unmarshalResponse(message); if (response.getErrorMessage() != null) { responseFuture.completeExceptionally(new RemoteExecutionException(response.getErrorMessage())); span.log(response.getErrorMessage()); failedMeter.mark(); } else { responseFuture.complete(response); } isProcessed = true; responseSize.update(message.getBytes().length); } else { responseFuture.completeExceptionally(new RequestTimedOutException(new TimeoutException())); span.setTag(TAG_TIMEOUT, "true"); failedMeter.mark(); } rpcDuration.update(System.currentTimeMillis() - requestCreationTime); span.finish(); rpcResponseMap.remove(rpcId); messageCache.remove(rpcId); } catch (Throwable e) { LOG.warn("Error while handling response for RPC module: {}. Response string: {}", rpcModule.getId(), message, e); } }
Source:
<code>public InputStream wrap(InputStream inputStream) { if (inputStream == null) return null; ByteArrayOutputStream buffer = new ByteArrayOutputStream(); OutputStream tee = new FilterOutputStream(buffer) { @Override public void close() throws IOException { synchronized (FileStreamDumper.this) { dumpOutput.write(buffer.toByteArray()); <START> dumpOutput.flush(); <END> } super.close(); } }; return new TeeInputStream(inputStream, tee, true); }</code><technical_language>Do need flush? dealing single stream anyway, writes serialized (and synchronize this anyway), I care order long chunks interleaved, happening write chunk synchronized</technical_language>

Target:
public InputStream wrap(InputStream inputStream) { if (inputStream == null) return null; ByteArrayOutputStream buffer = new ByteArrayOutputStream(); OutputStream tee = new FilterOutputStream(buffer) { @Override public void close() throws IOException { synchronized (FileStreamDumper.this) { dumpOutput.write(buffer.toByteArray()); } super.close(); } }; return new TeeInputStream(inputStream, tee, true); }
Source:
<code>public Response getTermsOfUse() { <START> return response( req -> ok(systemConfig.getApiTermsOfUse())); <END> }</code><technical_language>If want, change this allowCors(response (like in "version", above) allow Cross-Origin Resource Sharing. sort of wondering returned if API terms of set</technical_language>

Target:
public Response getTermsOfUse() { return allowCors(response( req -> ok(systemConfig.getApiTermsOfUse()))); }
Source:
<code>public String toStringWithoutPersonalIdentifiableInformation() { return "ChargeCreateRequest{" + "amount=" + amount + ", reference='" + reference + '\'' + ", returnUrl='" + returnUrl + '\'' + delayedCapture != null ? ", delayed_capture=" + delayedCapture : "" + language != null ? ", language=" + language.toString() : "" + <START> email != null ? ", email='" + email + '\'' : "" + <END> '}'; }</code><technical_language>I log PIDs (email) ? present logging reference, amount, return_url. New fields (delayed_capture, language) fine</technical_language>

Target:
public String toStringWithoutPersonalIdentifiableInformation() { return "ChargeCreateRequest{" + "amount=" + amount + ", reference='" + reference + '\'' + ", returnUrl='" + returnUrl + '\'' + delayedCapture != null ? ", delayed_capture=" + delayedCapture : "" + language != null ? ", language=" + language.toString() : "" + '}'; }
Source:
<code>private static LeftToRightBitSet createMaskWithKBits(int sizeBytes, int baseSeqNum, List<Integer> protectedSeqNums) { int numBits = sizeBytes * 8; LeftToRightBitSet mask = new LeftToRightBitSet(numBits); for (Integer protectedSeqNum : protectedSeqNums) { int delta = protectedSeqNum - baseSeqNum; mask.set(delta); } if (sizeBytes > MASK_SIZE_SMALL) { if (sizeBytes > MASK_SIZE_MED) { LeftToRightBitSet.shiftBitsRight(mask, MASK_2_START_BIT - 3, numBits - 1, 1); } LeftToRightBitSet.shiftBitsRight(mask, MASK_1_START_BIT - 2, numBits - 1, 1); } <START> LeftToRightBitSet.shiftBitsRight(mask, MASK_0_START_BIT - 1, numBits - 1, 1); <END> if (sizeBytes > MASK_SIZE_MED) { mask.set(MASK_2_K_BIT); } else if (sizeBytes > MASK_SIZE_SMALL) { mask.set(MASK_1_K_BIT); } else { mask.set(MASK_0_K_BIT); } return mask; }</code><technical_language>I hope format changes for final spec. :)</technical_language>

Target:
private static FlexFec03BitSet createMaskWithKBits(int sizeBytes, int baseSeqNum, List<Integer> protectedSeqNums) { int numBits = getNumBitsExcludingKBits(sizeBytes); FlexFec03BitSet mask = new FlexFec03BitSet(numBits); for (Integer protectedSeqNum : protectedSeqNums) { int delta = RTPUtils.getSequenceNumberDelta(protectedSeqNum , baseSeqNum); mask.set(delta); } if (sizeBytes > MASK_SIZE_MED) { mask.addBit(MASK_0_K_BIT, false); mask.addBit(MASK_1_K_BIT, false); mask.addBit(MASK_2_K_BIT, true); } else if (sizeBytes > MASK_SIZE_SMALL) { mask.addBit(MASK_0_K_BIT, false); mask.addBit(MASK_1_K_BIT, true); } else { mask.addBit(MASK_0_K_BIT, true); } return mask; }
Source:
<code>public void setInitialPositionY(final HTMLElement dragAndDropElement, final List<HTMLElement> children) { Integer parentY = Position.getY(dragAndDropElement); <START> for (final Element element : children) { parentY++; Position.setY(element, parentY); <END> } }</code><technical_language>This is below, I fine if want is. java for (final Element element : children) { Position.setY(element, ++parentY); }</technical_language>

Target:
public void setInitialPositionY(final HTMLElement dragAndDropElement, final List<HTMLElement> children) { Integer parentY = Position.getY(dragAndDropElement); for (final Element element : children) { Position.setY(element, ++parentY); } }
Source:
<code>public int postEventsFromFile(String file) { try ( BufferedReader reader = new BufferedReader( new InputStreamReader( EventReceiverFirehoseTestClient.class.getResourceAsStream( file ) ) ); ) { String s; Collection<Map<String, Object>> events = new ArrayList<Map<String, Object>>(); int totalEventsPosted = 0; int expectedEvents = 0; while ((s = reader.readLine()) != null) { events.add( (Map<String, Object>) this.jsonMapper.readValue( s, new TypeReference<Map<String, Object>>() { } ) ); ObjectMapper mapper = (totalEventsPosted % 2 == 0) ? jsonMapper : smileMapper; String mediaType = (totalEventsPosted % 2 == 0) ? MediaType.APPLICATION_JSON : SmileMediaTypes.APPLICATION_JACKSON_SMILE; totalEventsPosted += postEvents(events, mapper, mediaType); <START> expectedEvents += events.size(); <END> events = new ArrayList<>(); } if (totalEventsPosted != expectedEvents) { throw new ISE("All events not posted, expected : %d actual : %d", expectedEvents, totalEventsPosted); } return totalEventsPosted; } catch (Exception e) { throw Throwables.propagate(e); } }</code><technical_language>Is this related rest of PR</technical_language>

Target:
public int postEventsFromFile(String file) { try ( BufferedReader reader = new BufferedReader( new InputStreamReader( EventReceiverFirehoseTestClient.class.getResourceAsStream( file ) ) ); ) { String s; Collection<Map<String, Object>> events = new ArrayList<Map<String, Object>>(); int totalEventsPosted = 0; int expectedEventsPosted = 0; while ((s = reader.readLine()) != null) { events.add( (Map<String, Object>) this.jsonMapper.readValue( s, new TypeReference<Map<String, Object>>() { } ) ); ObjectMapper mapper = (totalEventsPosted % 2 == 0) ? jsonMapper : smileMapper; String mediaType = (totalEventsPosted % 2 == 0) ? MediaType.APPLICATION_JSON : SmileMediaTypes.APPLICATION_JACKSON_SMILE; totalEventsPosted += postEvents(events, mapper, mediaType); ; expectedEventsPosted += events.size(); events = new ArrayList<>(); } if (totalEventsPosted != expectedEventsPosted) { throw new ISE("All events not posted, expected : %d actual : %d", events.size(), totalEventsPosted); } return totalEventsPosted; } catch (Exception e) { throw Throwables.propagate(e); } }
Source:
<code>private boolean prereqSatisfied(String cdnURL) throws Exception { <START> for (String namenode: props.getList("other_namenodes")) { <END> if (removeTrailingSlash(namenode).equals(cdnURL)) { return true; } } return false; }</code><technical_language>define this property name in 'VoldemortBuildAndPushJob' other cdn related properties? this is important execute distcp job</technical_language>

Target:
private boolean prereqSatisfied(String cdnURL) throws Exception { for (String namenode: props.getList(OTHER_NAMENODES)) { if (removeTrailingSlash(namenode).equals(cdnURL)) { return true; } } return false; }
Source:
<code>public Path matchingFileSystem(Path source, Set<String> options) { URI sourceUri = source.toUri(); return options.stream().filter(opt -> { URI optUri = URI.create(opt); return sourceUri.getScheme().equals(optUri.getScheme()) && Objects.equals(sourceUri.getAuthority(), optUri.getAuthority()); <START> }).map(Path::new).findFirst().orElse(null); <END> }</code><technical_language>Path strange subtle differences constructors. original code constructor a String explicitly. This code work if type changed URI, instead of String, behavior identical. original version protects subtle differences that. For this reason, a big fan of method references for constructors, type is *very* stable well-known (like ArrayList::new). change is fine... if want protect subtle changes in this code keeping explicit String type declaration</technical_language>

Target:
public Path matchingFileSystem(Path source, Set<String> options) { URI sourceUri = source.toUri(); return options.stream().filter(opt -> { URI optUri = URI.create(opt); return sourceUri.getScheme().equals(optUri.getScheme()) && Objects.equals(sourceUri.getAuthority(), optUri.getAuthority()); }).map((String opt) -> new Path(opt)).findFirst().orElse(null); }
Source:
<code>public void generateAutoGenNote() { <START> outputln(" "); <END> outputln(); }</code><technical_language>tools auto-generate files edit (usually markers) changes lost. swt tools more exlicit. smth like: "Auto-generated file." "DO EDIT - changes erased!"</technical_language>

Target:
public void generateAutoGenNote() { outputln(" "); outputln(" "); outputln(); }
Source:
<code>public void check() { if (timeOut > 0 && <START> System.currentTimeMillis() <END> - startTime > timeOut) { throw new TaskCancelledException("Timed out"); } }</code><technical_language>this monotonic, nanoTime() for measuring elapsed time</technical_language>

Target:
public void check() { if (timeOut > 0 && System.nanoTime() - startTime > timeOut) { throw new TaskCancelledException("Timed out"); } }
Source:
<code>private boolean runUpdateMomPolicy(final VDS vds, boolean ballooningEnabled) { <START> VDSReturnValue returnValue = new VDSReturnValue(); <END> try { returnValue = runVdsCommand(VDSCommandType.SetMOMPolicyParameters, new MomPolicyVDSParameters(vds, ballooningEnabled)); } catch (VdcBLLException e) { log.errorFormat("Could not update MoM policy on host {0}", vds.getName()); } return returnValue.getSucceeded(); }</code><technical_language>initialize default value? could: 1. Save a boolean of "succeeded" 2. Save a null check for later. I option 1 better, method return false in end, if vdsm command throw error return getSucceeded()</technical_language>

Target:
private boolean runUpdateMomPolicy(final VDS vds, boolean ballooningEnabled) { boolean succeeded = false; try { succeeded = runVdsCommand(VDSCommandType.SetMOMPolicyParameters, new MomPolicyVDSParameters(vds, ballooningEnabled)).getSucceeded(); } catch (VdcBLLException e) { log.errorFormat("Could not update MoM policy on host {0}", vds.getName()); } return succeeded; }
Source:
<code>static List<Expression> fromInternal(Class<?>[] targetTypes, List<Expression> expressions, boolean varArgs) { final List<Expression> list = new ArrayList<>(); if (varArgs) { Class<?> varArgsType = targetTypes[targetTypes.length - 1].getComponentType(); <START> for (int i = 0; i < expressions.size(); i++) { <END> list.add( fromInternal(expressions.get(i), i < targetTypes.length - 1 ? targetTypes[i] : varArgsType)); } } else { for (int i = 0; i < expressions.size(); i++) { list.add(fromInternal(expressions.get(i), targetTypes[i])); } } return list; }</code><technical_language>add some assert varArgsType is null</technical_language>

Target:
static List<Expression> fromInternal(Class<?>[] targetTypes, List<Expression> expressions, boolean varArgs) { final List<Expression> list = new ArrayList<>(); if (varArgs) { Class<?> varTargetType = targetTypes[targetTypes.length - 1]; Preconditions.checkArgument(varTargetType != null && varTargetType.isArray(), "the var target type should not null and it must be an array."); Class<?> varArgsType = varTargetType.getComponentType(); for (int i = 0; i < expressions.size(); i++) { list.add( fromInternal(expressions.get(i), i < targetTypes.length - 1 ? targetTypes[i] : varArgsType)); } } else { if (targetTypes.length == expressions.size()) { for (int i = 0; i < expressions.size(); i++) { list.add(fromInternal(expressions.get(i), targetTypes[i])); } } else { int j = 0; for (int i = 0; i < expressions.size(); i++) { Class<?> type; if (!targetTypes[j].isArray()) { type = targetTypes[j]; j++; } else { type = targetTypes[j].getComponentType(); } list.add(fromInternal(expressions.get(i), type)); } } } return list; }
Source:
<code>private void decreasePendingVms() { Guid vdsId = getCurrentVdsId(); VM vm = getVm(); if (vdsId == null || vdsId.equals(lastDecreasedVds)) { <START> log.debugFormat("PendingVms for {0} was already released, not releasing again", vm.getName()); <END> return; } lastDecreasedVds = vdsId; VmHandler.decreasePendingVms(vm, vdsId); getBlockingQueue(vdsId).offer(Boolean.TRUE); }</code><technical_language>printing vdsId? useful in future</technical_language>

Target:
private void decreasePendingVms() { Guid vdsId = getCurrentVdsId(); VM vm = getVm(); if (vdsId == null || vdsId.equals(lastDecreasedVds)) { log.debugFormat("PendingVms for the guest {0} running on host {1} was already released, not releasing again", vm.getName(), vdsId); return; } lastDecreasedVds = vdsId; VmHandler.decreasePendingVms(vm, vdsId); getBlockingQueue(vdsId).offer(Boolean.TRUE); }
Source:
<code><START> public void removeTempInstance() { <END> if (formController != null && formController.getInstanceFile() != null) { SaveFormToDisk.removeSavepointFiles(formController.getInstanceFile().getName()); if (!InstancesDaoHelper.isInstanceAvailable(getAbsoluteInstancePath())) { String instanceFolder = formController.getInstanceFile().getParent(); Timber.i("Attempting to delete: %s", instanceFolder); File file = formController.getInstanceFile().getParentFile(); int images = MediaUtils.deleteImagesInFolderFromMediaProvider(file); int audio = MediaUtils.deleteAudioInFolderFromMediaProvider(file); int video = MediaUtils.deleteVideoInFolderFromMediaProvider(file); Timber.i("Removed from content providers: %d image files, %d audio files and %d audio files.", images, audio, video); FileUtils.purgeMediaPath(instanceFolder); } } else { Timber.w("null returned by getFormController()"); } }</code><technical_language>good move this a ViewModel</technical_language>

Target:
public void removeTempInstance() { if (formController != null && formController.getInstanceFile() != null) { SaveFormToDisk.removeSavepointFiles(formController.getInstanceFile().getName()); if (!InstancesDaoHelper.isInstanceAvailable(getAbsoluteInstancePath())) { String instanceFolder = formController.getInstanceFile().getParent(); Timber.i("Attempting to delete: %s", instanceFolder); File file = formController.getInstanceFile().getParentFile(); int images = MediaUtils.deleteImagesInFolderFromMediaProvider(file); int audio = MediaUtils.deleteAudioInFolderFromMediaProvider(file); int video = MediaUtils.deleteVideoInFolderFromMediaProvider(file); Timber.i("Removed from content providers: %d image files, %d audio files and %d audio files.", images, audio, video); FileUtils.purgeMediaPath(instanceFolder); } } }
Source:
<code>private List<EmailLogEntry> filterLogsForEmailLogPage(List<AppLogLine> appLogLines, AdminEmailLogPageData data) { List<EmailLogEntry> emailLogs = new LinkedList<EmailLogEntry>(); for (AppLogLine appLog : appLogLines) { String logMsg = appLog.getLogMessage(); boolean isNotEmailLog = (!logMsg.contains("TEAMMATESEMAILLOG")); if (isNotEmailLog) { continue; } EmailLogEntry emailLogEntry = new EmailLogEntry(appLog); if(!data.shouldShowLog(emailLogEntry)) { continue; } <START> emailLogs.add(emailLogEntry); <END> } return emailLogs; }</code><technical_language>This logically clearer: java if (data.shouldShowLog(emailLogEntry)) { emailLogs.add(emailLogEntry); }</technical_language>

Target:
private List<EmailLogEntry> filterLogsForEmailLogPage(List<AppLogLine> appLogLines, AdminEmailLogPageData data) { List<EmailLogEntry> emailLogs = new LinkedList<EmailLogEntry>(); for (AppLogLine appLog : appLogLines) { String logMsg = appLog.getLogMessage(); boolean isNotEmailLog = (!logMsg.contains("TEAMMATESEMAILLOG")); if (isNotEmailLog) { continue; } EmailLogEntry emailLogEntry = new EmailLogEntry(appLog); if (data.shouldShowLog(emailLogEntry)) { emailLogs.add(emailLogEntry); } } return emailLogs; }
Source:
<code>public void navigate() { FinderNavigation navigation; if (ConfigUtils.isDomain()) { navigation = new FinderNavigation(browser, DomainConfigEntryPoint.class) .addAddress(FinderNames.CONFIGURATION, FinderNames.PROFILES) <START> .addAddress(FinderNames.PROFILE, "full"); <END> } else { navigation = new FinderNavigation(browser, StandaloneConfigEntryPoint.class) .addAddress(FinderNames.CONFIGURATION, FinderNames.SUBSYSTEMS); } navigation.addAddress(FinderNames.SUBSYSTEM, "Transactions"); navigation.selectRow().invoke(FinderNames.VIEW); Application.waitUntilVisible(); }</code><technical_language>Please ConfigUtils.getDefaultProfile() instead of hardcoded "full" profile name</technical_language>

Target:
public void navigate() { FinderNavigation navigation; if (ConfigUtils.isDomain()) { navigation = new FinderNavigation(browser, DomainConfigEntryPoint.class) .addAddress(FinderNames.CONFIGURATION, FinderNames.PROFILES) .addAddress(FinderNames.PROFILE, ConfigUtils.getDefaultProfile()); } else { navigation = new FinderNavigation(browser, StandaloneConfigEntryPoint.class) .addAddress(FinderNames.CONFIGURATION, FinderNames.SUBSYSTEMS); } navigation.addAddress(FinderNames.SUBSYSTEM, "Transactions"); navigation.selectRow().invoke(FinderNames.VIEW); Application.waitUntilVisible(); }
Source:
<code>private void validate() { <START> ArgChecker.isTrue(fixedLeg.getCurrency().equals(floatingLeg.getCurrency()), "Conventions must have same currency"); <END> }</code><technical_language>This error message helpful. this instead: ArgChecker.isTrue( fixedLeg.getCurrency().equals(floatingLeg.getCurrency()), Messages.format( "Swap leg conventions currency {}, conventions {}", fixedLeg.getCurrency(), floatingLeg.getCurrency(), fixedLeg, floatingLeg));</technical_language>

Target:
private void validate() { ArgChecker.isTrue( fixedLeg.getCurrency().equals(floatingLeg.getCurrency()), Messages.format( "Swap leg conventions must have same currency but found and {}, conventions and {}", fixedLeg.getCurrency(), floatingLeg.getCurrency(), fixedLeg, floatingLeg)); }
Source:
<code>public List getList(String key) { for (Config child : children) { if (child.containsKey(key)) { return child.getList(key); } } <START> return null; <END> }</code><technical_language>call notFound instead of returning null</technical_language>

Target:
public List getList(String key) { for (Config child : children) { if (child.containsKey(key)) { return child.getList(key); } } return notFound(key); }
Source:
<code><START> private String getExternalUserPassword() { <END> if (externalUserPassword == null) { externalUserPassword = UUID.randomUUID().toString(); } return externalUserPassword; }</code><technical_language>Synthetic access</technical_language>

Target:
String getExternalUserPassword() { if (externalUserPassword == null) { externalUserPassword = UUID.randomUUID().toString(); } return externalUserPassword; }
Source:
<code>private <DATA_TYPE> void handleBackgroundOperationException(OperationAndData<DATA_TYPE> operationAndData, Throwable e) { if ( (operationAndData != null) && RetryLoop.isRetryException(e) ) { if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) ) { log.debug("Retry-able exception received", e); } if ( client.getRetryPolicy().allowRetry(operationAndData.getThenIncrementRetryCount(), operationAndData.getElapsedTimeMs(), operationAndData) ) { if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) ) { log.debug("Retrying operation"); } backgroundOperations.offer(operationAndData); return; } else { if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) ) { log.debug("Retry policy did not allow retry"); } if ( operationAndData.getErrorCallback() != null ) { operationAndData.getErrorCallback().retriesExhausted(operationAndData); } } } <START> logError("Background exception was not retry-able or retry gave up", e); <END> }</code><technical_language>Yes, please revert. Create a separate PR if like</technical_language>

Target:
private <DATA_TYPE> void handleBackgroundOperationException(OperationAndData<DATA_TYPE> operationAndData, Throwable e) { do { if ( (operationAndData != null) && RetryLoop.isRetryException(e) ) { if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) ) { log.debug("Retry-able exception received", e); } if ( client.getRetryPolicy().allowRetry(operationAndData.getThenIncrementRetryCount(), operationAndData.getElapsedTimeMs(), operationAndData) ) { if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) ) { log.debug("Retrying operation"); } backgroundOperations.offer(operationAndData); break; } else { if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) ) { log.debug("Retry policy did not allow retry"); } if ( operationAndData.getErrorCallback() != null ) { operationAndData.getErrorCallback().retriesExhausted(operationAndData); } } } logError("Background exception was not retry-able or retry gave up", e); } while ( false ); }
Source:
<code><START> public List<Kind> nodesToVisit() { <END> return ImmutableList.of(Tree.Kind.SWITCH_STATEMENT); }</code><technical_language>Tree.Kind instead, remove import</technical_language>

Target:
public List<Tree.Kind> nodesToVisit() { return ImmutableList.of(Tree.Kind.SWITCH_STATEMENT); }
Source:
<code>private static PreSharedKeyIdentity deserializeIdentity(final DatagramReader reader) { byte scoped = reader.readNextByte(); if (scoped == 1) { byte[] bytes = readBytesWithLength(PSK_LENGTH_BITS, reader); String virtualHost = bytes.length == 0 ? null : new String(bytes, StandardCharsets.UTF_8); bytes = readBytesWithLength(PSK_LENGTH_BITS, reader); return new PreSharedKeyIdentity(virtualHost, new String(bytes, StandardCharsets.UTF_8)); } else { byte[] bytes = readBytesWithLength(PSK_LENGTH_BITS, reader); return new PreSharedKeyIdentity(new String(bytes, StandardCharsets.UTF_8)); } <START> } <END></code><technical_language>I if this is issue deserialization compatible</technical_language>

Target:
private static PreSharedKeyIdentity deserializeIdentity(final DatagramReader reader) { byte scoped = reader.readNextByte(); if (scoped == 1) { byte[] bytes = readBytesWithLength(PSK_HOSTNAME_LENGTH_BITS, reader); String virtualHost = bytes.length == 0 ? null : new String(bytes, StandardCharsets.UTF_8); bytes = readBytesWithLength(PSK_IDENTITY_LENGTH_BITS, reader); return new PreSharedKeyIdentity(virtualHost, new String(bytes, StandardCharsets.UTF_8)); } else { byte[] bytes = readBytesWithLength(PSK_IDENTITY_LENGTH_BITS, reader); return new PreSharedKeyIdentity(new String(bytes, StandardCharsets.UTF_8)); } }
Source:
<code>private void addItemsToBudgetSpinner() { final List<Budget> budgetList = appData.getBudgetList(); List<String> budgetNameList = new ArrayList<String>(); for (Budget b : budgetList) { Log.d(TAG, b.getName()); budgetNameList.add(b.getName()); } budgetNameList.add(getResources().getString(R.string.new_budget)); ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, R.layout.spinner_layout, budgetNameList); dataAdapter.setDropDownViewResource(R.layout.spinner_entry_layout); mBudgetView.setAdapter(dataAdapter); mBudgetView.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { if (pos == budgetList.size()) { startActivity(new Intent(AddEntryActivity.this, AddBudgetActivity.class)); <START> Toast.makeText(parent.getContext(), "new budget!", Toast.LENGTH_LONG).show(); <END> } } @Override public void onNothingSelected(AdapterView<?> arg0) { } }); }</code><technical_language>this toast. annoying</technical_language>

Target:
private void addItemsToBudgetSpinner() { final List<Budget> budgetList = appData.getBudgetList(); List<String> budgetNameList = new ArrayList<String>(); for (Budget b : budgetList) { Log.d(TAG, b.getName()); budgetNameList.add(b.getName()); } budgetNameList.add(getResources().getString(R.string.new_budget)); ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, R.layout.spinner_layout, budgetNameList); dataAdapter.setDropDownViewResource(R.layout.spinner_entry_layout); mBudgetView.setAdapter(dataAdapter); mBudgetView.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { if (pos == budgetList.size()) { startActivity(new Intent(AddEntryActivity.this, AddBudgetActivity.class)); } } @Override public void onNothingSelected(AdapterView<?> arg0) { } }); }
Source:
<code>public void shouldWarnAboutRocksDBConfigSetterIsNotGuaranteedToBeBackwardsCompatible() { props.setProperty(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG, TestRocksDbConfigSetter.class.getName()); <START> final LogCaptureAppender appender = LogCaptureAppender.createAndRegister(); <END> try { new KafkaStreams(new StreamsBuilder().build(), props, supplier, time); } finally { LogCaptureAppender.unregister(appender); } assertThat(appender.getMessages(), hasItem("stream-client [" + CLIENT_ID + "] " + "RocksDB's version will be bumped to version 6+ via KAFKA-8897 in a future release. " + "If you use `org.rocksdb.CompactionOptionsFIFO#setTtl(long)` or `#ttl()` you will need to rewrite " + "your code after KAFKA-8897 is resolved and set TTL via `org.rocksdb.Options` " + "(or `org.rocksdb.ColumnFamilyOptions`).")); }</code><technical_language>this appender scoped class logs message want capture, right</technical_language>

Target:
public void shouldWarnAboutRocksDBConfigSetterIsNotGuaranteedToBeBackwardsCompatible() { props.setProperty(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG, TestRocksDbConfigSetter.class.getName()); try (final LogCaptureAppender appender = LogCaptureAppender.createAndRegister()) { new KafkaStreams(new StreamsBuilder().build(), props, supplier, time); assertThat(appender.getMessages(), hasItem("stream-client [" + CLIENT_ID + "] " + "RocksDB's version will be bumped to version 6+ via KAFKA-8897 in a future release. " + "If you use `org.rocksdb.CompactionOptionsFIFO#setTtl(long)` or `#ttl()` you will need to rewrite " + "your code after KAFKA-8897 is resolved and set TTL via `org.rocksdb.Options` " + "(or `org.rocksdb.ColumnFamilyOptions`).")); } }
Source:
<code>private Object getScriptResult(String script, ScriptEngine engine) { String scriptToExecute = script.substring(script.indexOf(":") + 1); try { return engine.eval(scriptToExecute); } catch (Exception e) { <START> return null; <END> } }</code><technical_language>want, right? some logging least? fail in a case</technical_language>

Target:
private Object getScriptResult(String script, ScriptEngine engine) throws ScriptException { String scriptToExecute = script.substring(script.indexOf(":") + 1); return engine.eval(scriptToExecute); }