auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public ParseFirewallRules(Json json) { <END> super(json, TypeLiteral.get(FirewallRules.class)); }</code><technical_language>Remove public modifier injection constructors</technical_language>

Target:
ParseFirewallRules(Json json) { super(json, TypeLiteral.get(FirewallRules.class)); }
Source:
<code><START> public ConfigurationStore() { END> }</code><technical_language>Do need public constructor private</technical_language>

Target:
private ConfigurationStore() { }
Source:
<code>public void close() { try { if (this.readingRaw.get() && !finalizeRaw() && LOGGER.isWarnEnabled()) { LOGGER.warn("Finalize on readRaw() returned false for " + this); } <START> if (this.client.isConnected()) <END> this.client.logout(); this.client.disconnect(); } catch (Exception e) { LOGGER.warn("failed to disconnect FTPClient", e); } }</code><technical_language>Checkstyle violation: [ant:checkstyle] [ERROR] /home/travis/build/spring-projects/spring-integration/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpSession.java:157: 'if' construct '{}'s. [NeedBraces] verify locally gradlew clean :spring-integration-ftp:check</technical_language>

Target:
public void close() { try { if (this.readingRaw.get() && !finalizeRaw() && LOGGER.isWarnEnabled()) { LOGGER.warn("Finalize on readRaw() returned false for " + this); } if (this.client.isConnected()) { this.client.logout(); } this.client.disconnect(); } catch (Exception e) { LOGGER.warn("failed to disconnect FTPClient", e); } }
Source:
<code>public WorkloadPartition(final MemoryStore memoryStore) { this.memoryStore = memoryStore; <START> this.ranges = new ConcurrentSet<>(); <END> }</code><technical_language>a package netty. Is use? Instead of 3rd party library, Collections.newSetFromMap(new ConcurrentHashMap())</technical_language>

Target:
public WorkloadPartition(final MemoryStore memoryStore) { this.memoryStore = memoryStore; this.ranges = Collections.newSetFromMap(new ConcurrentHashMap<>()); }
Source:
<code>public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); try { if (requestCode == UPLOAD_IMAGE_ACTIVITY_REQUEST_CODE && resultCode == RESULT_OK && null != data) { Uri selectedImage = data.getData(); String[] filePathColumn = { MediaStore.Images.Media.DATA }; Cursor cursor = getActivity().getApplicationContext().getContentResolver().query( selectedImage, filePathColumn, null, null, null); cursor.moveToFirst(); int columnIndex = cursor.getColumnIndex(filePathColumn[0]); imgDecodableString = cursor.getString(columnIndex); cursor.close(); Bitmap pickedImage = BitmapFactory.decodeFile(imgDecodableString); <START> saveBitmap("client_image", pickedImage); <END> uploadImage(ClientImageFile); } else if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE && resultCode == RESULT_OK) { uploadImage(ClientImageFile); } else { Toast.makeText(getActivity(), R.string.havent_picked_image, Toast.LENGTH_LONG).show(); } } catch (Exception e) { Toast.makeText(getActivity(), e.toString(), Toast.LENGTH_LONG) .show(); } }</code><technical_language>suggestion saveBitmap(pickedImage);</technical_language>

Target:
public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); try { if (requestCode == UPLOAD_IMAGE_ACTIVITY_REQUEST_CODE && resultCode == RESULT_OK && null != data) { Uri selectedImage = data.getData(); String[] filePathColumn = { MediaStore.Images.Media.DATA }; Cursor cursor = getActivity().getApplicationContext().getContentResolver().query( selectedImage, filePathColumn, null, null, null); cursor.moveToFirst(); int columnIndex = cursor.getColumnIndex(filePathColumn[0]); imgDecodableString = cursor.getString(columnIndex); cursor.close(); Bitmap pickedImage = BitmapFactory.decodeFile(imgDecodableString); saveBitmap(clientImageFile, pickedImage); uploadImage(clientImageFile); } else if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE && resultCode == RESULT_OK) { uploadImage(clientImageFile); } else { Toaster.show(rootView, R.string.havent_picked_image, Toast.LENGTH_LONG); } } catch (Exception e) { Toaster.show(rootView, e.toString(), Toast.LENGTH_LONG); } }
Source:
<code>public void afterPropertiesSet() { super.afterPropertiesSet(); proxyObject = ProxyFactory.getProxy(getServiceInterface(), this); <START> objectMapper = null; <END> if (applicationContext != null && applicationContext.containsBean("objectMapper")) { objectMapper = (ObjectMapper) applicationContext.getBean("objectMapper"); } if (objectMapper == null && applicationContext != null) { try { objectMapper = BeanFactoryUtils.beanOfTypeIncludingAncestors(applicationContext, ObjectMapper.class); } catch (Exception e) { logger.debug(e); } } if (objectMapper == null) { objectMapper = new ObjectMapper(); } try { jsonRpcHttpClient = new JsonRpcHttpClient(objectMapper, new URL(getServiceUrl()), extraHttpHeaders); jsonRpcHttpClient.setRequestListener(requestListener); jsonRpcHttpClient.setSslContext(sslContext); jsonRpcHttpClient.setHostNameVerifier(hostNameVerifier); if (contentType != null) { jsonRpcHttpClient.setContentType(contentType); } if (exceptionResolver!=null) { jsonRpcHttpClient.setExceptionResolver(exceptionResolver); } } catch (MalformedURLException mue) { throw new RuntimeException(mue); } ReflectionUtil.clearCache(); }</code><technical_language>question - purpose of removing null check setting objectMapper null</technical_language>

Target:
public void afterPropertiesSet() { super.afterPropertiesSet(); proxyObject = ProxyFactory.getProxy(getServiceInterface(), this); if (jsonRpcHttpClient==null) { if (objectMapper == null && applicationContext != null && applicationContext.containsBean("objectMapper")) { objectMapper = (ObjectMapper) applicationContext.getBean("objectMapper"); } if (objectMapper == null && applicationContext != null) { try { objectMapper = BeanFactoryUtils.beanOfTypeIncludingAncestors(applicationContext, ObjectMapper.class); } catch (Exception e) { logger.debug(e); } } if (objectMapper == null) { objectMapper = new ObjectMapper(); } try { jsonRpcHttpClient = new JsonRpcHttpClient(objectMapper, new URL(getServiceUrl()), extraHttpHeaders); jsonRpcHttpClient.setRequestListener(requestListener); jsonRpcHttpClient.setSslContext(sslContext); jsonRpcHttpClient.setHostNameVerifier(hostNameVerifier); if (contentType != null) { jsonRpcHttpClient.setContentType(contentType); } if (exceptionResolver!=null) { jsonRpcHttpClient.setExceptionResolver(exceptionResolver); } } catch (MalformedURLException mue) { throw new RuntimeException(mue); } } ReflectionUtil.clearCache(); }
Source:
<code>public void performHomingCycle() throws Exception { <START> sendCommandImmediately(new GcodeCommand("G28.2 X0 Y0 Z0")); <END> }</code><technical_language>a data point, this functional difference. Z axis homed anyway, g2core safer homing others</technical_language>

Target:
public void performHomingCycle() throws Exception { sendCommandImmediately(new GcodeCommand("G28.2 Z0 X0 Y0")); }
Source:
<code><START> public ImageInputStream openImageInputStream() throws IOException { <END> if (uri == null) throw new IllegalStateException("uri: null"); return this.uriLoader.openStream(this.toFileURI()); }</code><technical_language>removed openStream() method (replaced openImageInputStream()), BulkData works for pixeldata, longer for other BulkData overlay data etc.</technical_language>

Target:
public ImageInputStream openImageInputStream() throws IOException { if (uri == null) throw new IllegalStateException("uri: null"); ImageInputStream iis = LOADER.openStream(this.toURI()); return new BulkURIImageInputStream(iis, this.offset, this.length); }
Source:
<code>public void deletePluginIfExists(String pluginId) { String cacheKey = cacheKeyForPluginSettings(pluginId); Plugin plugin = this.findPlugin(pluginId); if (plugin instanceof NullPlugin) { return; } synchronized (cacheKey) { transactionTemplate.execute((TransactionCallback) transactionStatus -> sessionFactory.getCurrentSession() <START> .createQuery(String.format("delete from %s where pluginId=:pluginId", Plugin.class.getSimpleName())) <END> .setParameter("pluginId", pluginId) .executeUpdate()); goCache.remove(cacheKey); } }</code><technical_language>do sessionFactory.getCurrentSession().delete(plugin);</technical_language>

Target:
public void deletePluginIfExists(String pluginId) { String cacheKey = cacheKeyForPluginSettings(pluginId); Plugin plugin = this.findPlugin(pluginId); if (plugin instanceof NullPlugin) { return; } synchronized (cacheKey) { Plugin found = this.findPlugin(pluginId); if (found instanceof NullPlugin) { return; } transactionTemplate.execute(transactionStatus -> { sessionFactory.getCurrentSession().delete(plugin); return Boolean.TRUE; }); goCache.remove(cacheKey); } }
Source:
<code>private void storeSmsAsEvent(final PushNotificationSms pushNotificationSms) { try { this.eventNotificationMessageService.handleEvent(pushNotificationSms.getDeviceIdentification(), com.alliander.osgp.domain.core.valueobjects.EventType.SMS_NOTIFICATION, pushNotificationSms .getIpAddress().toString(), 0); } catch (final UnknownEntityException uee) { <START> LOGGER.warn("Unable to store event for Push Notification Sms from unknown device: " + pushNotificationSms, <END> uee); } catch (final Exception e) { LOGGER.error("Error storing event for Push Notification Sms: " + pushNotificationSms, e); } }</code><technical_language>forgot {}</technical_language>

Target:
private void storeSmsAsEvent(final PushNotificationSms pushNotificationSms) { try { this.eventNotificationMessageService.handleEvent(pushNotificationSms.getDeviceIdentification(), com.alliander.osgp.domain.core.valueobjects.EventType.SMS_NOTIFICATION, pushNotificationSms .getIpAddress().toString(), 0); } catch (final UnknownEntityException uee) { LOGGER.warn("Unable to store event for Push Notification Sms from unknown device: {}", pushNotificationSms, uee); } catch (final Exception e) { LOGGER.error("Error storing event for Push Notification Sms: {}", pushNotificationSms, e); } }
Source:
<code>public void detach() { boolean syncNetworkValues = false; if (!isInSync() && isManaged()) { getSetupModel().getNetworksToSync().add(getName()); syncNetworkValues = true; } assert attachedToNic != null; NetworkInterfaceModel attachingNic = attachedToNic; attachedToNic = null; List<LogicalNetworkModel> nicNetworks = attachingNic.getItems(); nicNetworks.remove(this); VdsNetworkInterface nicEntity = attachingNic.getEntity(); NetworkParameters netParams = new NetworkParameters(); if (!hasVlan()) { netParams.setBootProtocol(nicEntity.getBootProtocol()); netParams.setAddress(nicEntity.getAddress()); netParams.setSubnet(nicEntity.getSubnet()); } else { netParams.setBootProtocol(vlanNic.getEntity().getBootProtocol()); netParams.setAddress(vlanNic.getEntity().getAddress()); netParams.setSubnet(vlanNic.getEntity().getSubnet()); } if (isManagement()) { <START> if (!hasVlan()) { <END> netParams.setGateway(nicEntity.getGateway()); } else { netParams.setGateway(vlanNic.getEntity().getGateway()); } } getSetupModel().getNetworkToLastDetachParams().put(getName(), netParams); if (!hasVlan()) { nicEntity.setNetworkName(null); nicEntity.setBootProtocol(null); nicEntity.setAddress(null); nicEntity.setSubnet(null); nicEntity.setGateway(null); nicEntity.setNetworkImplementationDetails(null); } setBridge(null); if (nicEntity.getIsManagement()) { nicEntity.setType(0); } if (syncNetworkValues) { syncNetworkValues(); } }</code><technical_language>consider 'ternary if' instead..</technical_language>

Target:
public void detach() { boolean syncNetworkValues = false; if (!isInSync() && isManaged()) { getSetupModel().getNetworksToSync().add(getName()); syncNetworkValues = true; } assert attachedToNic != null; NetworkInterfaceModel attachingNic = attachedToNic; attachedToNic = null; List<LogicalNetworkModel> nicNetworks = attachingNic.getItems(); nicNetworks.remove(this); VdsNetworkInterface nicEntity = attachingNic.getEntity(); NetworkParameters netParams = new NetworkParameters(); if (!hasVlan()) { netParams.setBootProtocol(nicEntity.getBootProtocol()); netParams.setAddress(nicEntity.getAddress()); netParams.setSubnet(nicEntity.getSubnet()); } else { netParams.setBootProtocol(vlanNic.getEntity().getBootProtocol()); netParams.setAddress(vlanNic.getEntity().getAddress()); netParams.setSubnet(vlanNic.getEntity().getSubnet()); } if (isManagement()) { netParams.setGateway(!hasVlan() ? nicEntity.getGateway() : vlanNic.getEntity().getGateway()); } getSetupModel().getNetworkToLastDetachParams().put(getName(), netParams); if (!hasVlan()) { nicEntity.setNetworkName(null); nicEntity.setBootProtocol(null); nicEntity.setAddress(null); nicEntity.setSubnet(null); nicEntity.setGateway(null); nicEntity.setNetworkImplementationDetails(null); } setBridge(null); if (nicEntity.getIsManagement()) { nicEntity.setType(0); } if (syncNetworkValues) { syncNetworkValues(); } }
Source:
<code>public MessageParser(SecorConfig config) { mConfig = config; if (mConfig.getMessageTimestampName() != null && !mConfig.getMessageTimestampName().isEmpty() && mConfig.getMessageTimestampNameSeparator() != null && !mConfig.getMessageTimestampNameSeparator().isEmpty()) { String separatorPattern = Pattern.quote(mConfig.getMessageTimestampNameSeparator()); mNestedFields = mConfig.getMessageTimestampName().split(separatorPattern); } try { messageTransformer = ReflectionUtil .createMessageTransformer(mConfig.getMessageTransformerClass(), mConfig); } catch (Exception e) { <START> LOG.warn("Unable to initialize custom message transformer class... Using default", e); <END> messageTransformer = new IdentityMessageTransformer(mConfig); } }</code><technical_language>I prefer fail (throw RuntimeException)</technical_language>

Target:
public MessageParser(SecorConfig config) { mConfig = config; if (mConfig.getMessageTimestampName() != null && !mConfig.getMessageTimestampName().isEmpty() && mConfig.getMessageTimestampNameSeparator() != null && !mConfig.getMessageTimestampNameSeparator().isEmpty()) { String separatorPattern = Pattern.quote(mConfig.getMessageTimestampNameSeparator()); mNestedFields = mConfig.getMessageTimestampName().split(separatorPattern); } }
Source:
<code>void writeStatementRankTriple(Resource subject, StatementRank rank) { String rankRepresentation = rankToRdfRepresentation(rank); if (rankRepresentation != null){ try { this.rdfWriter.writeTripleStringObject(subject, RdfWriter.WB_RANK, rankRepresentation); } catch (RDFHandlerException e) { logger.warn("Could not write rank " + rank.toString() + " of statement " + subject.toString()); } <START> }else{ <END> logger.warn("Unkown rank " + rank.toString()); } }</code><technical_language>strange formatting (no spaces)</technical_language>

Target:
void writeStatementRankTriple(Resource subject, StatementRank rank) { try { this.rdfWriter.writeTripleUriObject(subject, RdfWriter.WB_RANK, getUriStringForRank(rank)); } catch (RDFHandlerException e) { throw new RuntimeException(e.getMessage(), e); } }
Source:
<code>private void addGraphicsOverlay() { PolygonBuilder polygonGeometry = new PolygonBuilder(SpatialReferences.getWebMercator()); polygonGeometry.addPoint(-20e5, 20e5); polygonGeometry.addPoint(20e5, 20.e5); polygonGeometry.addPoint(20e5, -20e5); polygonGeometry.addPoint(-20e5, -20e5); <START> int yellow = Color.argb(4, 255, 255, 0); <END> SimpleFillSymbol polygonSymbol = new SimpleFillSymbol(yellow, SimpleFillSymbol.Style.SOLID, null); Graphic graphic = new Graphic(polygonGeometry.toGeometry(), polygonSymbol); grOverlay = new GraphicsOverlay(); ListenableList<Graphic> graphics = grOverlay.getGraphics(); graphics.add(graphic); mMapView.getGraphicsOverlays().add(grOverlay); Log.i(TAG, "Graphic Overlay added to MapView"); }</code><technical_language>This is almost-completely-transparent fill symbol. Suggest Color.argb(255, 255, 255, 0) instead (or 128 for alpha component)</technical_language>

Target:
private void addGraphicsOverlay() { PolygonBuilder polygonGeometry = new PolygonBuilder(SpatialReferences.getWebMercator()); polygonGeometry.addPoint(-20e5, 20e5); polygonGeometry.addPoint(20e5, 20.e5); polygonGeometry.addPoint(20e5, -20e5); polygonGeometry.addPoint(-20e5, -20e5); int yellow = Color.argb(128, 255, 255, 0); SimpleFillSymbol polygonSymbol = new SimpleFillSymbol(yellow, SimpleFillSymbol.Style.SOLID, null); Graphic graphic = new Graphic(polygonGeometry.toGeometry(), polygonSymbol); grOverlay = new GraphicsOverlay(); ListenableList<Graphic> graphics = grOverlay.getGraphics(); graphics.add(graphic); mMapView.getGraphicsOverlays().add(grOverlay); }
Source:
<code>private void clearSweepProgress() { Optional<SweepProgress> progress = specificTableSweeper.getTxManager().runTaskReadOnly( specificTableSweeper.getSweepProgressStore()::loadProgress); <START> if (progress.isPresent()) { <END> specificTableSweeper.getSweepProgressStore().clearProgress(); } }</code><technical_language>Do need load values clear? Note #2552 implies loading a lot of data unnecessarily, calling deleteRange if progress is empty doesnt harmful, decided clear this time</technical_language>

Target:
private void clearSweepProgress() { specificTableSweeper.getSweepProgressStore().clearProgress(); }
Source:
<code>private boolean updateGtid(Event event) { EventHeader eventHeader = event.getHeader(); EventType eventType = eventHeader.getEventType(); if (gtidSet != null) { if (eventType == EventType.XID) { advanceGTID(); return true; } if (eventType == EventType.QUERY) { QueryEventData queryEventData = getInternalEventData(event); String query = queryEventData.getSql(); if ("COMMIT".equals(query) || "ROLLBACK".equals(query) || (previousEvent != null && previousEvent.getHeader().getEventType() == EventType.GTID && !"BEGIN".equals(query))) { advanceGTID(); } return true; } if (eventType == EventType.GTID) { if (previousGtidEvent != null) { if (advanceGTID()) { <START> if (logger.isLoggable(Level.WARNING)) { <END> logger.log(Level.WARNING, "GtidSet wasn't synchronized before GTID. " + "Please submit a bug report to <LINK_0>"); } } } return true; } } return false; }</code><technical_language>@rhauch I this line lost</technical_language>

Target:
private boolean updateGtid(Event event) { EventHeader eventHeader = event.getHeader(); EventType eventType = eventHeader.getEventType(); if (gtidSet != null) { if (eventType == EventType.XID) { advanceGTID(); return true; } if (eventType == EventType.QUERY) { QueryEventData queryEventData = getInternalEventData(event); String query = queryEventData.getSql(); if ("COMMIT".equals(query) || "ROLLBACK".equals(query) || (previousEvent != null && previousEvent.getHeader().getEventType() == EventType.GTID && !"BEGIN".equals(query))) { advanceGTID(); } return true; } if (eventType == EventType.GTID) { if (previousGtidEvent != null) { if (advanceGTID()) { if (logger.isLoggable(Level.WARNING)) { logger.log(Level.WARNING, "GtidSet wasn't synchronized before GTID. " + "Please submit a bug report to <LINK_0>"); } } } previousGtidEvent = event; return true; } } return false; }
Source:
<code>public void onShutdown() { processors.remove(processor); <START> processor = null; <END> if (processors.isEmpty()) { if (appStatus == ApplicationStatus.Running) { appStatus = ApplicationStatus.SuccessfulFinish; } else if (appStatus == ApplicationStatus.New) { appStatus = ApplicationStatus.UnsuccessfulFinish; } shutdownAndNotify(); } }</code><technical_language>Is this required (here in onFailure)? reference listener reference is removed set</technical_language>

Target:
public void onShutdown() { processors.remove(processor); processor = null; if (processors.isEmpty()) { shutdownAndNotify(); } }
Source:
<code>public void verifyTemplateListElementVisible(int element) { <START> waitForElementByElement(templateList.get(element)); <END> }</code><technical_language>Add PageLogging</technical_language>

Target:
public void verifyTemplateListElementVisible(int element) { waitForElementByElement(templateList.get(element)); PageObjectLogging.log("verifyTemplateListElementVisible", "Template element is visible ", true); }
Source:
<code><START> public void stop() <END></code><technical_language>sense add this.caches.clear() stop</technical_language>

Target:
public void stop() { this.caches.clear(); }
Source:
<code>public int write(ByteBuffer src, long position) throws IOException { if (readonly) throw new NonWritableChannelException(); if (readBuffer.limit() != 0) clearReadBuffer(); else if (writePending) { if (writeBuffer.position() < writeLength) <START> writeLength = writeBuffer.position(); <END> long writePosition = position - realFilePosition; if (writePosition >= -src.remaining() && writePosition < writeLength) { long startPosition = position; long writeBytes; if (writePosition < 0) { int srcLimit = src.limit(); try { src.limit(src.position () + (int)-writePosition); while (true) { writeBytes = fileChannel.write(src, position); if (writeBytes == 0) { return (int) (position - startPosition); } position += writeBytes; if (position == realFilePosition) { break; } } } finally { src.limit(srcLimit); } writePosition = 0; } int writeBufferPosition = writeBuffer.position(); int srcLimit = src.limit(); int bufferWriteLength = Math.min(writeBuffer.remaining(), src.remaining()); try { writeBuffer.position((int)writePosition); src.limit(src.position() + bufferWriteLength); writeBuffer.put(src); if (writeBuffer.position() > writeLength) { writeLength = writeBuffer.position(); } } finally { writeBuffer.position(writeBufferPosition); src.limit(srcLimit); } position += bufferWriteLength; if (!src.hasRemaining()) return (int)(position - startPosition); return fileChannel.write(src, position) + (int)(position - startPosition); } } return fileChannel.write(src, position); }</code><technical_language>this one...it shortening writeLength match writeBuffer.position() invalidating in writeBuffer position length. Is comparator inverted here</technical_language>

Target:
public int write(ByteBuffer src, long position) throws IOException { if (readonly) throw new NonWritableChannelException(); if (readBuffer.limit() != 0) clearReadBuffer(); else if (writePending) { if (writeBuffer.position() > writeLength) writeLength = writeBuffer.position(); long writePosition = position - realFilePosition; if (writePosition >= -src.remaining() && writePosition < writeLength) { long startPosition = position; long writeBytes; if (writePosition < 0) { int srcLimit = src.limit(); try { src.limit(src.position () + (int)-writePosition); while (true) { writeBytes = fileChannel.write(src, position); if (writeBytes == 0) { return (int) (position - startPosition); } position += writeBytes; if (position == realFilePosition) { break; } } } finally { src.limit(srcLimit); } writePosition = 0; } int writeBufferPosition = writeBuffer.position(); int srcLimit = src.limit(); int bufferWriteLength = Math.min(writeBuffer.remaining(), src.remaining()); try { writeBuffer.position((int)writePosition); src.limit(src.position() + bufferWriteLength); writeBuffer.put(src); if (writeBuffer.position() > writeLength) writeLength = writeBuffer.position(); } finally { writeBuffer.position(writeBufferPosition); src.limit(srcLimit); } position += bufferWriteLength; if (!src.hasRemaining()) return (int)(position - startPosition); return fileChannel.write(src, position) + (int)(position - startPosition); } } return fileChannel.write(src, position); }
Source:
<code>private HttpResponse executeDelete(String bucketName, String objectName, Map<String,String> queryParamMap) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException { updateRegionCache(bucketName); HttpResponse response = execute(Method.DELETE, BucketRegionCache.INSTANCE.region(bucketName), bucketName, objectName, null, <START> queryParamMap, null, null, -1); <END> response.body().close(); return response; }</code><technical_language>this true for 'executeDelete()' implement Multi object delete API. Change this executeDelete() content length</technical_language>

Target:
private HttpResponse executeDelete(String bucketName, String objectName, Map<String,String> queryParamMap) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException { updateRegionCache(bucketName); HttpResponse response = execute(Method.DELETE, BucketRegionCache.INSTANCE.region(bucketName), bucketName, objectName, null, queryParamMap, null, 0); response.body().close(); return response; }
Source:
<code>public HttpResponse doUpgrade() throws IOException { try { if (new VersionNumber("2.0").compareTo(getCurrentLevel())>0) { <START> LOGGER.log(WARNING, "Performing 1.0 to 2.0 upgrade"); <END> for (String shortName : Arrays.asList("workflow-aggregator", "pipeline-stage-view", "github-organization-folder")) { Plugin p = jenkins.getUpdateCenter().getPlugin(shortName); if (p==null) { LOGGER.warning("Plugin not found in the update center: " + shortName); } else { p.deploy(true); } } FileUtils.writeStringToFile(getStateFile(),"2.0"); return HttpResponses.redirectViaContextPath("updateCenter/"); } return NOOP; } finally { updateUpToDate(); } }</code><technical_language>technically true, confusing. call is - adding plugins recommended for 2.0</technical_language>

Target:
public HttpResponse doUpgrade() throws IOException { jenkins.checkPermission(Jenkins.ADMINISTER); try { if (new VersionNumber("2.0").compareTo(getCurrentLevel())>0) { LOGGER.log(WARNING, "Performing 1.0 to 2.0 upgrade"); for (String shortName : Arrays.asList("workflow-aggregator", "pipeline-stage-view", "github-organization-folder")) { Plugin p = jenkins.getUpdateCenter().getPlugin(shortName); if (p==null) { LOGGER.warning("Plugin not found in the update center: " + shortName); } else { p.deploy(true); } } FileUtils.writeStringToFile(getStateFile(),"2.0"); return HttpResponses.redirectViaContextPath("updateCenter/"); } return NOOP; } finally { updateUpToDate(); } }
Source:
<code>public String toString() { return "GreaterThanHavingSpec{" + <START> "{aggregationName='" + aggregationName + '\'' + <END> ", value=" + value + '}'; }</code><technical_language>extra { added here</technical_language>

Target:
public String toString() { return "GreaterThanHavingSpec{" + "aggregationName='" + aggregationName + '\'' + ", value=" + value + '}'; }
Source:
<code>public boolean saveEntity(Entity entity) { if (!ctx.isPOST()) { return false; } try { boolean wasNew = entity.isNew(); if (preSaveHandler != null) { preSaveHandler.accept(wasNew); } if (columns != null && !columns.isEmpty()) { load(ctx, entity, columns); } else { load(ctx, entity); } <START> <END> if (onSaveHandler != null) { onSaveHandler.accept(entity); } oma.update(entity); if (postSaveHandler != null) { postSaveHandler.accept(wasNew); } if (wasNew && Strings.isFilled(createdURI)) { ctx.respondWith() .redirectToGet(Formatter.create(createdURI).set("id", entity.getIdAsString()).format()); return true; } if (!oma.hasValidationWarnings(entity) && Strings.isFilled(afterSaveURI)) { ctx.respondWith().redirectToGet(afterSaveURI); return true; } showSavedMessage(); } catch (Exception e) { UserContext.handle(e); } return false; }</code><technical_language>move presave handler here</technical_language>

Target:
public boolean saveEntity(Entity entity) { if (!ctx.isPOST()) { return false; } try { boolean wasNew = entity.isNew(); if (columns != null && !columns.isEmpty()) { load(ctx, entity, columns); } else { load(ctx, entity); } if (preSaveHandler != null) { preSaveHandler.accept(wasNew); } oma.update(entity); if (postSaveHandler != null) { postSaveHandler.accept(wasNew); } if (wasNew && Strings.isFilled(createdURI)) { ctx.respondWith() .redirectToGet(Formatter.create(createdURI).set("id", entity.getIdAsString()).format()); return true; } if (!oma.hasValidationWarnings(entity) && Strings.isFilled(afterSaveURI)) { ctx.respondWith().redirectToGet(afterSaveURI); return true; } showSavedMessage(); } catch (Exception e) { UserContext.handle(e); } return false; }
Source:
<code>protected InputStream getInputStream() throws IOException { try { return contentResolver.openInputStream(uri); } catch (final FileNotFoundException e) { if (uri.toString().startsWith("http")) { return Network.getResponseStream(Network.getRequest(uri.toString())); } <START> Log.e("GpxZip import cannot resolve " + uri); <END> } return null; }</code><technical_language>No, I Log.e() return null;</technical_language>

Target:
protected InputStream getInputStream() throws IOException { try { return contentResolver.openInputStream(uri); } catch (final FileNotFoundException e) { if (uri.toString().startsWith("http")) { return Network.getResponseStream(Network.getRequest(uri.toString())); } } Log.e("GpxZip import cannot resolve " + uri); return null; }
Source:
<code>public void updateParticipantPhoneCannotBeChanged() { mockHealthCodeAndAccountRetrieval(EMAIL, PHONE); when(account.getPhoneVerified()).thenReturn(Boolean.TRUE); StudyParticipant participant = new StudyParticipant.Builder().copyOf(PARTICIPANT) .withPhone(OTHER_PHONE).withEmailVerified(Boolean.FALSE).build(); participantService.updateParticipant(STUDY, ImmutableSet.of(), participant); verify(accountDao).updateAccount(accountCaptor.capture()); Account account = accountCaptor.getValue(); verify(account, never()).setPhone(PHONE); verify(account, never()).setPhoneVerified(Boolean.TRUE); <START> verify(accountWorkflowService, never()).sendEmailVerificationToken(STUDY, ID, EMAIL); <END> }</code><technical_language>Similarly, is worth changing call sendEmailVerificationToken(any()), calling null? (Here in next test.)</technical_language>

Target:
public void updateParticipantPhoneCannotBeChanged() { mockHealthCodeAndAccountRetrieval(EMAIL, PHONE); when(account.getPhoneVerified()).thenReturn(Boolean.TRUE); StudyParticipant participant = new StudyParticipant.Builder().copyOf(PARTICIPANT) .withPhone(OTHER_PHONE).withEmailVerified(Boolean.FALSE).build(); participantService.updateParticipant(STUDY, ImmutableSet.of(), participant); verify(accountDao).updateAccount(accountCaptor.capture()); Account account = accountCaptor.getValue(); verify(account, never()).setPhone(any()); verify(account, never()).setPhoneVerified(anyBoolean()); verify(accountWorkflowService, never()).sendEmailVerificationToken(eq(STUDY), eq(ID), anyString()); }
Source:
<code>SynchronousReceiveWork(long id, int numberToReceive, Duration timeout, FluxSink<ServiceBusReceivedMessageContext> emitter) { this.id = id; this.remaining = new AtomicInteger(numberToReceive); this.numberToReceive = numberToReceive; this.timeout = timeout; this.emitter = emitter; nextMessageSubscriber = Flux.switchOnNext(messageReceivedEmitter .map(messageContext -> { <START> emitter.next(messageContext); <END> remaining.decrementAndGet(); return messageContext; }) .flatMap(lockToken -> Mono.delay(SHORT_TIMEOUT_BETWEEN_MESSAGES)) .handle((l, sink) -> { emitter.complete(); sink.complete(); })) .subscribe(); }</code><technical_language>need logic in here. In onNext() override, is call emitter.next. flux is attached Emitter messageReceivedEmitter. MessageReceivedEmitter exist</technical_language>

Target:
SynchronousReceiveWork(long id, int numberToReceive, Duration timeout, FluxSink<ServiceBusReceivedMessageContext> emitter) { this.id = id; this.remaining = new AtomicInteger(numberToReceive); this.numberToReceive = numberToReceive; this.timeout = timeout; this.emitter = emitter; emitterProcessor = DirectProcessor.create(); messageReceivedSink = emitterProcessor.sink(); nextMessageSubscriber = Flux.switchOnNext(emitterProcessor.map(messageContext -> Flux.interval(TIMEOUT_BETWEEN_MESSAGES))) .handle((delay, sink) -> { logger.info("[{}]: Timeout between the messages occurred. Completing the work.", id); sink.next(delay); emitter.complete(); }) .subscribe(); }
Source:
<code>public YarnAppHandleImpl launchApp(final StreamingApplication app, Configuration conf, Attribute.AttributeMap launchParameters) throws LauncherException { <START> this.conf = conf; <END> if (launchParameters != null) { for (Map.Entry<Attribute<?>, Object> entry : launchParameters.entrySet()) { String property = propMapping.get(entry.getKey()); if (property != null) { setConfiguration(conf, property, entry.getValue()); } } } try { String name = app.getClass().getName(); StramAppLauncher appLauncher = new StramAppLauncher(name, conf); appLauncher.loadDependencies(); StreamingAppFactory appFactory = new StreamingAppFactory(name, app.getClass()) { @Override public LogicalPlan createApp(LogicalPlanConfiguration planConfig) { return super.createApp(app, planConfig); } }; ApplicationId appId = appLauncher.launchApp(appFactory); return new YarnAppHandleImpl(appId); } catch (Exception ex) { throw new LauncherException(ex); } }</code><technical_language>configuration belong this class. in YarnAppHandleImpl</technical_language>

Target:
public YarnAppHandleImpl launchApp(final StreamingApplication app, Configuration conf, Attribute.AttributeMap launchParameters) throws LauncherException { if (launchParameters != null) { for (Map.Entry<Attribute<?>, Object> entry : launchParameters.entrySet()) { String property = propMapping.get(entry.getKey()); if (property != null) { setConfiguration(conf, property, entry.getValue()); } } } try { String name = app.getClass().getName(); StramAppLauncher appLauncher = new StramAppLauncher(name, conf); appLauncher.loadDependencies(); StreamingAppFactory appFactory = new StreamingAppFactory(name, app.getClass()) { @Override public LogicalPlan createApp(LogicalPlanConfiguration planConfig) { return super.createApp(app, planConfig); } }; ApplicationId appId = appLauncher.launchApp(appFactory); return new YarnAppHandleImpl(appId, conf); } catch (Exception ex) { throw new LauncherException(ex); } }
Source:
<code><START> @Before public void setUp() { <END> FileUtil.fullyDelete(TEST_DIR); assertTrue(TEST_DIR.mkdirs()); }</code><technical_language>A line break @Before better</technical_language>

Target:
public void setUp() { FileUtil.fullyDelete(TEST_DIR); assertTrue(TEST_DIR.mkdirs()); }
Source:
<code>Mono<Response<FileUploadInfo>> clearRangeWithResponse(long length, long offset, Context context) { FileRange range = new FileRange(offset, offset + length - 1); <START> return azureFileStorageClient.files().uploadRangeWithRestResponseAsync(shareName, filePath, range.toString(), FileRangeWriteType.CLEAR, 0L, null, null, null, Context.NONE) <END> .map(this::uploadResponse); }</code><technical_language>context is here. Need pass service call</technical_language>

Target:
Mono<Response<FileUploadInfo>> clearRangeWithResponse(long length, long offset, Context context) { FileRange range = new FileRange(offset, offset + length - 1); return azureFileStorageClient.files().uploadRangeWithRestResponseAsync(shareName, filePath, range.toString(), FileRangeWriteType.CLEAR, 0L, null, null, null, context) .map(this::uploadResponse); }
Source:
<code>public int hashCode() { <START> return commitMetadata.getCommitId().hashCode(); <END> }</code><technical_language>getId().hashCode();</technical_language>

Target:
public int hashCode() { return getId().hashCode(); }
Source:
<code>public boolean hasPermisssion() { for(String p : permissions) { <START> if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p)) <END> { return false; } } return true; }</code><technical_language>this API call guarded a check for Android version M</technical_language>

Target:
public boolean hasPermisssion() { if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { return true; } for(String p : permissions) { if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p)) { return false; } } return true; }
Source:
<code>public String getBucketPolicy(GetBucketPolicyArgs args) throws BucketPolicyTooLargeException, ErrorResponseException, IllegalArgumentException, InsufficientDataException, InternalException, InvalidBucketNameException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, XmlParserException { <START> if (args == null) { throw new IllegalArgumentException("null arguments"); } <END> Map<String, String> queryParamMap = new HashMap<>(); queryParamMap.put("policy", ""); try (Response response = executeGet(args.bucket(), null, null, queryParamMap)) { byte[] buf = new byte[MAX_BUCKET_POLICY_SIZE]; int bytesRead = 0; bytesRead = response.body().byteStream().read(buf, 0, MAX_BUCKET_POLICY_SIZE); if (bytesRead < 0) { throw new IOException("unexpected EOF when reading bucket policy"); } if (bytesRead == MAX_BUCKET_POLICY_SIZE) { int byteRead = 0; while (byteRead == 0) { byteRead = response.body().byteStream().read(); if (byteRead < 0) { break; } if (byteRead > 0) { throw new BucketPolicyTooLargeException(args.bucket()); } } } return new String(buf, 0, bytesRead, StandardCharsets.UTF_8); } catch (ErrorResponseException e) { if (e.errorResponse().errorCode() != ErrorCode.NO_SUCH_BUCKET_POLICY) { throw e; } } return ""; }</code><technical_language>This replaced checkArgs(args); rebasing latest master branch</technical_language>

Target:
public String getBucketPolicy(GetBucketPolicyArgs args) throws BucketPolicyTooLargeException, ErrorResponseException, IllegalArgumentException, InsufficientDataException, InternalException, InvalidBucketNameException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, XmlParserException { checkArgs(args); Map<String, String> queryParamMap = new HashMap<>(); queryParamMap.put("policy", ""); try (Response response = executeGet(args.bucket(), null, null, queryParamMap)) { byte[] buf = new byte[MAX_BUCKET_POLICY_SIZE]; int bytesRead = 0; bytesRead = response.body().byteStream().read(buf, 0, MAX_BUCKET_POLICY_SIZE); if (bytesRead < 0) { throw new IOException("unexpected EOF when reading bucket policy"); } if (bytesRead == MAX_BUCKET_POLICY_SIZE) { int byteRead = 0; while (byteRead == 0) { byteRead = response.body().byteStream().read(); if (byteRead < 0) { break; } if (byteRead > 0) { throw new BucketPolicyTooLargeException(args.bucket()); } } } return new String(buf, 0, bytesRead, StandardCharsets.UTF_8); } catch (ErrorResponseException e) { if (e.errorResponse().errorCode() != ErrorCode.NO_SUCH_BUCKET_POLICY) { throw e; } } return ""; }
Source:
<code>public TracingActivityThread(final ForkJoinPool pool) { super(pool); if (VmSettings.SNAPSHOTS_ENABLED) { this.snapshotBuffer = new SnapshotBuffer((ActorProcessingThread) this); } if (VmSettings.ACTOR_TRACING || VmSettings.KOMPOS_TRACING) { threadId = threadIdGen.getAndIncrement(); <START> traceBuffer = TraceBuffer.create(this.threadId); <END> nextEntityId = 1 + (threadId << TraceData.ENTITY_ID_BITS); externalData = new Object[EXTERNAL_BUFFER_SIZE]; } else { threadId = 0; nextEntityId = 0; traceBuffer = null; externalData = null; } setName(getClass().getSimpleName() + "-" + threadId); }</code><technical_language>this. need explicit</technical_language>

Target:
public TracingActivityThread(final ForkJoinPool pool) { super(pool); if (VmSettings.SNAPSHOTS_ENABLED) { this.snapshotBuffer = new SnapshotBuffer((ActorProcessingThread) this); } if (VmSettings.ACTOR_TRACING || VmSettings.KOMPOS_TRACING) { threadId = threadIdGen.getAndIncrement(); traceBuffer = TraceBuffer.create(threadId); nextEntityId = 1 + (threadId << TraceData.ENTITY_ID_BITS); externalData = new Object[EXTERNAL_BUFFER_SIZE]; } else { threadId = 0; nextEntityId = 0; traceBuffer = null; externalData = null; } setName(getClass().getSimpleName() + "-" + threadId); }
Source:
<code>public void postInstallFreeIpa(Long stackId, boolean fullPostInstall) throws Exception { LOGGER.debug("Performing post-install configuration for stack {}. {}.", stackId, fullPostInstall ? "Full post install" : "Partial post install"); Stack stack = stackService.getStackById(stackId); FreeIpaClient freeIpaClient = freeIpaClientFactory.getFreeIpaClientForStack(stack); freeIpaTopologyService.updateReplicationTopology(stackId, freeIpaClient); <START> if (!fullPostInstall) { return; } <END> Set<Permission> permission = freeIpaClient.findPermission(SET_PASSWORD_EXPIRATION_PERMISSION); if (permission.isEmpty()) { freeIpaClient.addPasswordExpirationPermission(SET_PASSWORD_EXPIRATION_PERMISSION); } freeIpaClient.addPermissionToPrivilege(USER_ADMIN_PRIVILEGE, SET_PASSWORD_EXPIRATION_PERMISSION); freeIpaPermissionService.setPermissions(freeIpaClient); if (!Objects.equals(MAX_USERNAME_LENGTH, freeIpaClient.getUsernameLength())) { LOGGER.debug("Set maximum username length to {}", MAX_USERNAME_LENGTH); freeIpaClient.setUsernameLength(MAX_USERNAME_LENGTH); } passwordPolicyService.updatePasswordPolicy(freeIpaClient); modifyAdminPasswordExpirationIfNeeded(freeIpaClient); userSyncService.synchronizeUsers( ThreadBasedUserCrnProvider.getAccountId(), ThreadBasedUserCrnProvider.getUserCrn(), Set.of(stack.getEnvironmentCrn()), Set.of(), Set.of()); }</code><technical_language>refactor this? move rest of method a separate one, put call in if</technical_language>

Target:
public void postInstallFreeIpa(Long stackId, boolean fullPostInstall) throws Exception { LOGGER.debug("Performing post-install configuration for stack {}. {}.", stackId, fullPostInstall ? "Full post install" : "Partial post install"); Stack stack = stackService.getStackById(stackId); FreeIpaClient freeIpaClient = freeIpaClientFactory.getFreeIpaClientForStack(stack); freeIpaTopologyService.updateReplicationTopology(stackId, freeIpaClient); if (fullPostInstall) { setInitialFreeIpaPolicies(stack, freeIpaClient); } }
Source:
<code>public List<CourseAttributes> getCoursesForStudentAccount(String googleId) throws EntityDoesNotExistException { List<StudentAttributes> studentDataList = studentsLogic.getStudentsForGoogleId(googleId); if (studentDataList.size() == 0) { throw new EntityDoesNotExistException("Student with Google ID " + googleId + " does not exist"); } <START> List<String> courses = new ArrayList<String>(); <END> for (StudentAttributes s : studentDataList) { courses.add(s.course); } List<CourseAttributes> courseList = coursesDb.getCourses(courses); return courseList; }</code><technical_language>Rename courseIDs</technical_language>

Target:
public List<CourseAttributes> getCoursesForStudentAccount(String googleId) throws EntityDoesNotExistException { List<StudentAttributes> studentDataList = studentsLogic.getStudentsForGoogleId(googleId); if (studentDataList.size() == 0) { throw new EntityDoesNotExistException("Student with Google ID " + googleId + " does not exist"); } List<String> courseIds = new ArrayList<String>(); for (StudentAttributes s : studentDataList) { courseIds.add(s.course); } List<CourseAttributes> courseList = coursesDb.getCourses(courseIds); return courseList; }
Source:
<code>protected void createRepositoryInternal(Storage storage, Repository repository) throws RepositoryManagementStrategyException { if (!repositoryFeatures.isIndexingEnabled(repository)) { return; } String storageId = storage.getId(); String repositoryId = repository.getId(); MavenRepositoryConfiguration repositoryConfig = (MavenRepositoryConfiguration) repository.getRepositoryConfiguration(); if (repository.isHostedRepository()) { createRebuildMavenIndexCronJob(storageId, repositoryId, repositoryConfig.getRebuildMavenIndexesCronExpression()); } if (repository.isProxyRepository()) { createRemoteIndexDownloaderCronTask(storageId, repositoryId, <START> repositoryConfig.getDownloadRemoteMavenIndexCronExpression()); <END> } if (repository.isGroupRepository()) { createMergeMavenGroupRepositoryIndexCronJob(storageId, repositoryId); } }</code><technical_language>applied group repository indexing enabled</technical_language>

Target:
protected void createRepositoryInternal(Storage storage, Repository repository) throws RepositoryManagementStrategyException { if (!repositoryFeatures.isIndexingEnabled(repository)) { return; } String storageId = storage.getId(); String repositoryId = repository.getId(); MavenRepositoryConfiguration repositoryConfig = (MavenRepositoryConfiguration) repository.getRepositoryConfiguration(); if (repository.isHostedRepository()) { createRebuildMavenIndexCronJob(storageId, repositoryId, repositoryConfig.getCronExpression()); } if (repository.isProxyRepository()) { createRemoteIndexDownloaderCronTask(storageId, repositoryId, repositoryConfig.getCronExpression()); } if (repository.isGroupRepository()) { createMergeMavenGroupRepositoryIndexCronJob(storageId, repositoryId, repositoryConfig.getCronExpression()); } }
Source:
<code>public void testShutdown() throws Exception { File tmpDir = createTempDir("stateManger", "test"); final ServerConfiguration conf = TestBKConfiguration.newServerConfiguration(); conf.setJournalDirName(tmpDir.getPath()) .setLedgerDirNames(new String[] { tmpDir.getPath() }) .setZkServers(zkUtil.getZooKeeperConnectString()); BookieServer bkServer = new BookieServer(conf) { protected Bookie newBookie(ServerConfiguration conf) throws IOException, KeeperException, InterruptedException, BookieException { Bookie bookie = new Bookie(conf); rm.setRegisterFail(true); rm.initialize(conf, () -> {}, NullStatsLogger.INSTANCE); <START> LOG.info(" is ", zkc == null); <END> bookie.setRegistrationManager(rm); return bookie; } }; bkServer.start(); bkServer.join(); assertTrue("Failed to return failCode ZK_REG_FAIL", ExitCode.ZK_REG_FAIL == bkServer.getExitCode()); }</code><technical_language>this logging statement is missing some info</technical_language>

Target:
public void testShutdown() throws Exception { File tmpDir = createTempDir("stateManger", "test"); final ServerConfiguration conf = TestBKConfiguration.newServerConfiguration(); conf.setJournalDirName(tmpDir.getPath()) .setLedgerDirNames(new String[] { tmpDir.getPath() }) .setJournalDirName(tmpDir.toString()) .setZkServers(zkUtil.getZooKeeperConnectString()); BookieServer bkServer = new BookieServer(conf) { protected Bookie newBookie(ServerConfiguration conf) throws IOException, KeeperException, InterruptedException, BookieException { Bookie bookie = new Bookie(conf); rm.setRegisterFail(true); rm.initialize(conf, () -> {}, NullStatsLogger.INSTANCE); bookie.setRegistrationManager(rm); return bookie; } }; bkServer.start(); bkServer.join(); assertTrue("Failed to return failCode ZK_REG_FAIL", ExitCode.ZK_REG_FAIL == bkServer.getExitCode()); }
Source:
<code>Map<SystemStreamPartition, String> getFileOffsets() { LOG.info("Loading initial offsets from the file for side input stores."); Map<SystemStreamPartition, String> fileOffsets = new HashMap<>(); stores.keySet().forEach(storeName -> { LOG.debug("Reading local offsets for store: {}", storeName); File storeLocation = getStoreLocation(storeName); if (isValidSideInputStore(storeName, storeLocation)) { try { String fileContents = StorageManagerUtil.readOffsetFile(storeLocation, OFFSET_FILE); <START> TypeReference<HashMap<SystemStreamPartition, String>> ref = <END> new TypeReference<HashMap<SystemStreamPartition, String>>() { }; Map<SystemStreamPartition, String> offsets = OBJECT_MAPPER.readValue(fileContents, ref); fileOffsets.putAll(offsets); } catch (Exception e) { LOG.warn("Failed to load the offset file for side input store:" + storeName, e); } } }); return fileOffsets; }</code><technical_language>Save final field</technical_language>

Target:
Map<SystemStreamPartition, String> getFileOffsets() { LOG.info("Loading initial offsets from the file for side input stores."); Map<SystemStreamPartition, String> fileOffsets = new HashMap<>(); stores.keySet().forEach(storeName -> { LOG.debug("Reading local offsets for store: {}", storeName); File storeLocation = getStoreLocation(storeName); if (isValidSideInputStore(storeName, storeLocation)) { try { String fileContents = StorageManagerUtil.readOffsetFile(storeLocation, OFFSET_FILE); Map<SystemStreamPartition, String> offsets = OBJECT_MAPPER.readValue(fileContents, OFFSETS_TYPE_REFERENCE); fileOffsets.putAll(offsets); } catch (Exception e) { LOG.warn("Failed to load the offset file for side input store:" + storeName, e); } } }); return fileOffsets; }
Source:
<code>public void onBindViewHolder(@NonNull final ContributionViewHolder holder, final int position) { final Contribution contribution = getItem(position); <START> if (contribution != null) { <END> holder.init(position, contribution); } }</code><technical_language>longer need this null check placeholders</technical_language>

Target:
public void onBindViewHolder(@NonNull final ContributionViewHolder holder, final int position) { final Contribution contribution = getItem(position); holder.init(position, contribution); }