auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean performDrop(Object data) { if (!this.rebaseInteractiveView.isDragAndDropEnabled()) return false; DropTargetEvent event = getCurrentEvent(); RebaseInteractivePlan.PlanElement sourceElement = null; if (event.data instanceof IStructuredSelection) { final IStructuredSelection structuredSelection = (IStructuredSelection) data; if (structuredSelection.size() > 1) return false; if (structuredSelection.getFirstElement() instanceof RebaseInteractivePlan.PlanElement) sourceElement = (RebaseInteractivePlan.PlanElement) structuredSelection .getFirstElement(); } if (sourceElement == null) return false; Object targetObj = getCurrentTarget(); if (!(targetObj instanceof RebaseInteractivePlan.PlanElement)) return false; RebaseInteractivePlan.PlanElement targetElement = (RebaseInteractivePlan.PlanElement) targetObj; boolean before = false; switch (getCurrentLocation()) { case ViewerDropAdapter.LOCATION_BEFORE: before = true; break; case ViewerDropAdapter.LOCATION_NONE: return false; } <START> if (RebaseInteractivePreferences.isOrderReversed()) { <END> before = !before; } rebaseInteractiveView.getCurrentPlan().moveTodoEntry(sourceElement, targetElement, before); return true; }</code><technical_language>style nit: braces single line blocks</technical_language>

Target:
public boolean performDrop(Object data) { if (!this.rebaseInteractiveView.isDragAndDropEnabled()) return false; DropTargetEvent event = getCurrentEvent(); RebaseInteractivePlan.PlanElement sourceElement = null; if (event.data instanceof IStructuredSelection) { final IStructuredSelection structuredSelection = (IStructuredSelection) data; if (structuredSelection.size() > 1) return false; if (structuredSelection.getFirstElement() instanceof RebaseInteractivePlan.PlanElement) sourceElement = (RebaseInteractivePlan.PlanElement) structuredSelection .getFirstElement(); } if (sourceElement == null) return false; Object targetObj = getCurrentTarget(); if (!(targetObj instanceof RebaseInteractivePlan.PlanElement)) return false; RebaseInteractivePlan.PlanElement targetElement = (RebaseInteractivePlan.PlanElement) targetObj; boolean before = false; switch (getCurrentLocation()) { case ViewerDropAdapter.LOCATION_BEFORE: before = true; break; case ViewerDropAdapter.LOCATION_NONE: return false; } if (RebaseInteractivePreferences.isOrderReversed()) before = !before; rebaseInteractiveView.getCurrentPlan().moveTodoEntry(sourceElement, targetElement, before); return true; }
Source:
<code>public void deleteFromIndex(RepositoryPath path) throws IOException { Repository repository = path.getFileSystem().getRepository(); if (!repositoryFeatures.isIndexingEnabled(repository) || isMetadata(path.toString())) { return; } final RepositoryIndexer indexer = getRepositoryIndexer(path); if (indexer != null) { String extension = FilenameUtils.getExtension(path.getFileName().toString()); <START> MavenArtifactCoordinates coordinates = getArtifactCoordinates(path.toString()); <END> indexer.delete(Collections.singletonList(new ArtifactInfo(repository.getId(), coordinates.getGroupId(), coordinates.getArtifactId(), coordinates.getVersion(), coordinates.getClassifier(), extension))); } }</code><technical_language>question</technical_language>

Target:
public void deleteFromIndex(RepositoryPath path) throws IOException { Repository repository = path.getFileSystem().getRepository(); if (!repositoryFeatures.isIndexingEnabled(repository) || RepositoryFiles.isMetadata(path)) { return; } final RepositoryIndexer indexer = getRepositoryIndexer(path); if (indexer != null) { MavenArtifactCoordinates coordinates = (MavenArtifactCoordinates) RepositoryFiles.readCoordinates(path); indexer.delete(Collections.singletonList(new ArtifactInfo(repository.getId(), coordinates.getGroupId(), coordinates.getArtifactId(), coordinates.getVersion(), coordinates.getClassifier(), coordinates.getExtension()))); } }
Source:
<code><START> public void nonReferencedObjects_onlyExpiredPruned() throws Exception { <END> RevBlob a = tr.blob("a"); long start = now(); RevBlob b = tr.blob("b"); gc.setExpireAgeMillis(now() - start); gc.prune(Collections.<ObjectId> emptySet()); assertFalse(repo.hasObject(a)); assertTrue(repo.hasObject(b)); }</code><technical_language>This test work reliable. multiple problems: 1) able create blobs fast calls System.currentTimeMillis() return value. system I create 20 new files System.currentTimeMillis() returns a new value. In cases call setExpireAgeMillis 0 ... object pruned. 2) filesystem store timestamps in granularity System.currentTimeMillis() returns it. Example: If clock get 12345678 create a file this file a lastModifed() of 12345000. linux system I create 20000 files in a row lastmodified(). For test this means: create a file currentTimeMillis() is 12345678. create file lastModified of 12345000 creation clock 12345679. call expireAgeMillis(1) of object pruned. problem if expireAgeMillis() expect absolute time specifications. I suggest wait filesystem timer advances creating blob. RepositoryTestCase.fsTick() that: File file_a = repo.getObjectDatabase().fileFor(a); long start=file_a.lastModified(); RepositoryTestCase.fsTick(file_a); RevBlob b = tr.blob("b"); File file_b = repo.getObjectDatabase().fileFor(b); gc.setExpireAgeMillis(file_b.lastModified() - start);</technical_language>

Target:
public void nonReferencedObjects_onlyExpiredPruned() throws Exception { RevBlob a = tr.blob("a"); fsTick(); long start = now(); fsTick(); RevBlob b = tr.blob("b"); gc.setExpireAgeMillis(now() - start); gc.prune(Collections.<ObjectId> emptySet()); assertFalse(repo.hasObject(a)); assertTrue(repo.hasObject(b)); }
Source:
<code><START> TelescopeProxy(Process process) { <END> this.process = process; TelescopeClientImpl client = TelescopeClientImpl.create(TelescopeConfiguration.TELESCOPE_HOST); if (client == null) { log.error( "Could not get a TelescopeClientImpl object with the given TELESCOPE_HOST={}", TelescopeConfiguration.TELESCOPE_HOST ); log.error( "This telescope proxy will not report to telescope, and will not print any further messages."); } else { this.telescopeClient = IngestTelescopeClientImpl.create(client); this.objectMapper = new ObjectMapper(); } }</code><technical_language>Read this if <LINK_0> #38</technical_language>

Target:
TelescopeProxy(Process process) { this.process = process; TelescopeClientImpl client = TelescopeClientImpl.create(TelescopeFactory.TELESCOPE_HOST); if (client == null) { log.error( "Could not get a TelescopeClientImpl object with the given TELESCOPE_HOST={}", TelescopeFactory.TELESCOPE_HOST ); log.error( "This telescope proxy will not report to telescope, and will not print any further messages."); } else { this.telescopeClient = IngestTelescopeClientImpl.create(client); this.objectMapper = new ObjectMapper(); } }
Source:
<code>private void installProject() throws Exception { if (isSupportedType(project.getPackaging())) { if (looseConfig) { switch(project.getPackaging()) { case "war": installLooseConfigApp(); break; case "liberty-assembly": File dir = new File(project.getBasedir() + "/src/main/webapp"); if (dir.exists()) { installLooseConfigApp(); } else { log.debug("liberty-assembly project does not have soruce code for web project."); } break; default: <START> log.info("Can not generate loose configuration for Project artifact type. Project aritifact will be installed as is."); <END> installApp(project.getArtifact()); break; } } else { installApp(project.getArtifact()); } } else { throw new MojoExecutionException("Application type is not supported," + project.getPackaging()); } }</code><technical_language>suggestions for revise: Loose application configuration is supported for packaging type {0}. project artifact installed is</technical_language>

Target:
private void installProject() throws Exception { if (isSupportedType(project.getPackaging())) { if (looseApplication) { switch(project.getPackaging()) { case "war": installLooseConfigApp(); break; case "liberty-assembly": File dir = new File(project.getBasedir() + "/src/main/webapp"); if (dir.exists()) { installLooseConfigApp(); } else { log.debug("liberty-assembly project does not have source code for web project."); } break; default: log.info(MessageFormat.format("Loose application configuration is not supported for packaging type {0}. The project artifact will be installed as is.", project.getPackaging())); installApp(project.getArtifact()); break; } } else { installApp(project.getArtifact()); } } else { throw new MojoExecutionException("Application type is not supported," + project.getPackaging()); } }
Source:
<code>public void onCreate(@Nullable final Bundle savedInstanceState) { super.onCreate(savedInstanceState); softwareComponents = (SoftwareComponent[]) getArguments() .getParcelableArray(ARG_COMPONENTS); if (savedInstanceState != null) { <START> Serializable license = savedInstanceState.getSerializable(LICENSE_KEY); <END> if (license instanceof License) { activeLicense = (License) license; } } Arrays.sort(softwareComponents, (o1, o2) -> o1.getName().compareTo(o2.getName())); }</code><technical_language>Add final</technical_language>

Target:
public void onCreate(@Nullable final Bundle savedInstanceState) { super.onCreate(savedInstanceState); softwareComponents = (SoftwareComponent[]) getArguments() .getParcelableArray(ARG_COMPONENTS); if (savedInstanceState != null) { final Serializable license = savedInstanceState.getSerializable(LICENSE_KEY); if (license != null) { activeLicense = (License) license; } } Arrays.sort(softwareComponents, (o1, o2) -> o1.getName().compareTo(o2.getName())); }
Source:
<code>protected boolean shouldProcess(Map<String, String[]> requestParams) { for (String requiredParam : requiredParams) { if (StringUtils.isEmpty(getParameterValueOrNull(requiredParam, requestParams))) { return false; } } <START> return typeToProcess == null || typeToProcess.equals(getParameterValueOrNull(PARAMETER_TYPE, requestParams)); <END> }</code><technical_language>I remember discussing this in draft null for operation types -> introduce a new ALL-constant in ClientSpanTagProcessor? IMHO cleaner a null pseudotype. ClientSpanTypeTagProcessor need override shouldProcess anymore</technical_language>

Target:
protected boolean shouldProcess(Map<String, String[]> requestParams) { for (String requiredParam : requiredParams) { if (StringUtils.isEmpty(getParameterValueOrNull(requiredParam, requestParams))) { return false; } } if (typeToProcess.equals(TYPE_ALL)) { return true; } final String type = getParameterValueOrNull(ClientSpanServlet.PARAMETER_TYPE, requestParams); return typeToProcess.equals(type); }
Source:
<code>public void initialize(Bootstrap<TimeLockServerConfiguration> bootstrap) { <START> MetricRegistry metricRegistry = SharedMetricRegistries.getOrCreate("AtlasDbTest"); <END> AtlasDbMetrics.setMetricRegistry(metricRegistry); bootstrap.setMetricRegistry(metricRegistry); bootstrap.getObjectMapper().registerSubtypes(NonBlockingFileAppenderFactory.class); bootstrap.getObjectMapper().registerModule(new Jdk8Module()); super.initialize(bootstrap); }</code><technical_language>Hmm. need a ensure created differently - if TestableTimelockCluster, creates multiple timelock servers in JVM, this throw creating node. SharedMetricRegistries.getOrCreate(UUID.randomUUID().toString()) horrible,</technical_language>

Target:
public void initialize(Bootstrap<TimeLockServerConfiguration> bootstrap) { MetricRegistry metricRegistry = SharedMetricRegistries .getOrCreate("AtlasDbTest" + UUID.randomUUID().toString()); TaggedMetricRegistry taggedMetricRegistry = new DefaultTaggedMetricRegistry(); AtlasDbMetrics.setMetricRegistries(metricRegistry, taggedMetricRegistry); bootstrap.setMetricRegistry(metricRegistry); bootstrap.getObjectMapper().registerSubtypes(NonBlockingFileAppenderFactory.class); bootstrap.getObjectMapper().registerModule(new Jdk8Module()); super.initialize(bootstrap); }
Source:
<code>protected String match(Pattern re) { if (index >= input.length()) { return null; } try { Matcher matcher = re.matcher(input); matcher.region(index, input.length()); boolean m = matcher.find(); if (m) { index = matcher.end(); return matcher.group(); } else { return null; } <START> } catch (Error e) { <END> return null; } }</code><technical_language>Task: a good idea in general, catch specific error type instead</technical_language>

Target:
private String match(Pattern re) { if (index >= input.length()) { return null; } try { Matcher matcher = re.matcher(input); matcher.region(index, input.length()); boolean m = matcher.find(); if (m) { index = matcher.end(); return matcher.group(); } else { return null; } } catch (StackOverflowError e) { return null; } }
Source:
<code><START> protected void setTemplateRegistry(TemplateRegistry<RuleTemplate> templateRegistry) { <END> this.templateRegistry = templateRegistry; templateRegistry.addRegistryChangeListener(this); }</code><technical_language>generic type information is lost runtime XML declared TemplateRegistry, I if this is correct</technical_language>

Target:
protected void setTemplateRegistry(TemplateRegistry<RuleTemplate> templateRegistry) { if (templateRegistry instanceof RuleTemplateRegistry) { this.templateRegistry = (RuleTemplateRegistry) templateRegistry; templateRegistry.addRegistryChangeListener(this); } }
Source:
<code>private static IConfigurationAnnotation createConfiguration( IConfigurationAnnotation bs, IConfigurationAnnotation as, IConfigurationAnnotation bt, IConfigurationAnnotation at, IConfigurationAnnotation bg, IConfigurationAnnotation ag, IConfigurationAnnotation bc, IConfigurationAnnotation ac, IConfigurationAnnotation bm, IConfigurationAnnotation am) { ConfigurationAnnotation result = new ConfigurationAnnotation(); if (bs != null) { result.setBeforeSuite(true); finishInitialize(result, bs); } if (as != null) { result.setAfterSuite(true); finishInitialize(result, as); } if (bt != null) { result.setBeforeTest(true); finishInitialize(result, bt); } if (at != null) { result.setAfterTest(true); finishInitialize(result, at); } if (bg != null) { result.setBeforeGroups(bg.getBeforeGroups()); <START> result.setBeforeGroups(true); <END> finishInitialize(result, bg); } if (ag != null) { result.setAfterGroups(ag.getAfterGroups()); result.setAfterGroups(true); finishInitialize(result, ag); } if (bc != null) { result.setBeforeTestClass(true); finishInitialize(result, bc); } if (ac != null) { result.setAfterTestClass(true); finishInitialize(result, ac); } if (bm != null) { result.setBeforeTestMethod(true); finishInitialize(result, bm); } if (am != null) { result.setAfterTestMethod(true); finishInitialize(result, am); } return result; }</code><technical_language>Code smells: 2 methods name signature</technical_language>

Target:
private static IConfigurationAnnotation createConfiguration( IConfigurationAnnotation bs, IConfigurationAnnotation as, IConfigurationAnnotation bt, IConfigurationAnnotation at, IConfigurationAnnotation bg, IConfigurationAnnotation ag, IConfigurationAnnotation bc, IConfigurationAnnotation ac, IConfigurationAnnotation bm, IConfigurationAnnotation am) { ConfigurationAnnotation result = new ConfigurationAnnotation(); if (bs != null) { result.setBeforeSuite(true); finishInitialize(result, bs); } if (as != null) { result.setAfterSuite(true); finishInitialize(result, as); } if (bt != null) { result.setBeforeTest(true); finishInitialize(result, bt); } if (at != null) { result.setAfterTest(true); finishInitialize(result, at); } if (bg != null) { result.setBeforeGroups(bg.getBeforeGroups()); finishInitialize(result, bg); } if (ag != null) { result.setAfterGroups(ag.getAfterGroups()); finishInitialize(result, ag); } if (bc != null) { result.setBeforeTestClass(true); finishInitialize(result, bc); } if (ac != null) { result.setAfterTestClass(true); finishInitialize(result, ac); } if (bm != null) { result.setBeforeTestMethod(true); finishInitialize(result, bm); } if (am != null) { result.setAfterTestMethod(true); finishInitialize(result, am); } return result; }
Source:
<code>public void processCommands(String aQuery) { <START> GerritUi.Ftracer.traceInfo(NLS.bind(Messages.GerritTableView_processCommand, aQuery)); <END> String lastSaved = fServerUtil.getLastSavedGerritServer(); if (lastSaved != null) { fTaskRepository = fServerUtil.getTaskRepo(lastSaved); } if (fTaskRepository == null) { fMapRepoServer = GerritServerUtility.getInstance().getGerritMapping(); Set<TaskRepository> mapSet = fMapRepoServer.keySet(); if (fMapRepoServer.size() == 1) { for (TaskRepository key : mapSet) { fTaskRepository = key; fServerUtil.saveLastGerritServer(key.getRepositoryUrl()); break; } } else if (fMapRepoServer.size() > 1) { List<TaskRepository> listTaskRepository = new ArrayList<TaskRepository>(); for (TaskRepository key : mapSet) { listTaskRepository.add(key); } fTaskRepository = getSelectedRepositoryURL(listTaskRepository); if (fTaskRepository != null) { fServerUtil.saveLastGerritServer(fTaskRepository.getRepositoryUrl()); } } } if (fTaskRepository == null) { UIUtils.showErrorDialog(Messages.GerritTableView_defineRepository, Messages.GerritTableView_noGerritRepository); } else { if (aQuery != null && !aQuery.equals("")) { updateTable(fTaskRepository, aQuery); } } }</code><technical_language>this externalized</technical_language>

Target:
public void processCommands(String aQuery) { GerritUi.Ftracer.traceInfo("Process command : " + aQuery); String lastSaved = fServerUtil.getLastSavedGerritServer(); if (lastSaved != null) { fTaskRepository = fServerUtil.getTaskRepo(lastSaved); } if (fTaskRepository == null) { fMapRepoServer = GerritServerUtility.getInstance().getGerritMapping(); Set<TaskRepository> mapSet = fMapRepoServer.keySet(); if (fMapRepoServer.size() == 1) { for (TaskRepository key : mapSet) { fTaskRepository = key; fServerUtil.saveLastGerritServer(key.getRepositoryUrl()); break; } } else if (fMapRepoServer.size() > 1) { List<TaskRepository> listTaskRepository = new ArrayList<TaskRepository>(); for (TaskRepository key : mapSet) { listTaskRepository.add(key); } fTaskRepository = getSelectedRepositoryURL(listTaskRepository); if (fTaskRepository != null) { fServerUtil.saveLastGerritServer(fTaskRepository.getRepositoryUrl()); } } } if (fTaskRepository == null) { UIUtils.showErrorDialog(Messages.GerritTableView_defineRepository, Messages.GerritTableView_noGerritRepository); } else { if (aQuery != null && !aQuery.equals("")) { updateTable(fTaskRepository, aQuery); } } }
Source:
<code>public BlockInfoContiguous(short size) { super(size); <START> hasProvidedStorage = false; <END> }</code><technical_language>set default false do here</technical_language>

Target:
public BlockInfoContiguous(short size) { super(size); }
Source:
<code><START> public void updateAllInTransaction(Map<Guid, DiskImageDynamic> vmDiskImageDynamicToSave) { <END> updateAllInBatch("Updatedisk_image_dynamic", vmDiskImageDynamicToSave.values(), new MapSqlParameterMapper<DiskImageDynamic>() { @Override public MapSqlParameterSource map(DiskImageDynamic entity) { MapSqlParameterSource paramValue = new MapSqlParameterSource(); paramValue.addValue("image_id", entity.getId()); paramValue.addValue("read_rate", entity.getread_rate()); paramValue.addValue("write_rate", entity.getwrite_rate()); paramValue.addValue("actual_size", entity.getactual_size()); paramValue.addValue("read_latency_seconds", entity.getReadLatency()); paramValue.addValue("write_latency_seconds", entity.getWriteLatency()); paramValue.addValue("flush_latency_seconds", entity.getFlushLatency()); return paramValue; } }); }</code><technical_language>This entire method is redundant. do is implement updarteAllInBatch(Collection<T>) in MassOperationGenericDAO in a similar fashion updateAll(Collection<T>) call there. point in this type of method in DAOs</technical_language>

Target:
public void updateAllInTransaction(Map<Guid, DiskImageDynamic> vmDiskImageDynamicToSave) { updateAllInBatch("Updatedisk_image_dynamic", vmDiskImageDynamicToSave.values(), new MapSqlParameterMapper<DiskImageDynamic>() { @Override public MapSqlParameterSource map(DiskImageDynamic entity) { MapSqlParameterSource paramValue = new MapSqlParameterSource() .addValue("image_id", entity.getId()) .addValue("read_rate", entity.getread_rate()) .addValue("write_rate", entity.getwrite_rate()) .addValue("actual_size", entity.getactual_size()) .addValue("read_latency_seconds", entity.getReadLatency()) .addValue("write_latency_seconds", entity.getWriteLatency()) .addValue("flush_latency_seconds", entity.getFlushLatency()); return paramValue; } }); }
Source:
<code>private void matchNestedFile(Path file, List<Path> texFiles, List<Path> referencedFiles, String line) { Matcher includeMatch = INCLUDE_PATTERN.matcher(line); while (includeMatch.find()) { String include = includeMatch.group(INCLUDE_GROUP); Path inputFile = file.getParent().resolve( include.endsWith(TEX_EXT) ? include : String.format("%s%s", include, TEX_EXT)); <START> if (!texFiles.contains(inputFile)) { <END> referencedFiles.add(inputFile); } } }</code><technical_language>suggest check if file exists in file system adding here</technical_language>

Target:
private void matchNestedFile(Path file, List<Path> texFiles, List<Path> referencedFiles, String line) { Matcher includeMatch = INCLUDE_PATTERN.matcher(line); while (includeMatch.find()) { String include = includeMatch.group(INCLUDE_GROUP); Path nestedFile = file.getParent().resolve( include.endsWith(TEX_EXT) ? include : String.format("%s%s", include, TEX_EXT)); if (nestedFile.toFile().exists() && !texFiles.contains(nestedFile)) { referencedFiles.add(nestedFile); } } }
Source:
<code>private void syncGroupControlsEnabledState(GroupViewState newViewState) { <START> boolean noGroupSelected = newViewState == null || newViewState.getGroup() == null; <END> tagGroupMenuButton.setDisable(noGroupSelected); catGroupMenuButton.setDisable(noGroupSelected); }</code><technical_language>put booleans parentheses for easier reading</technical_language>

Target:
private void syncGroupControlsEnabledState(GroupViewState newViewState) { boolean noGroupSelected = (null == newViewState) || (null == newViewState.getGroup()); tagGroupMenuButton.setDisable(noGroupSelected); catGroupMenuButton.setDisable(noGroupSelected); }
Source:
<code>public void testCloseChannelWithUnhandledMsg() { final List<Long> inboundMsgs = new ArrayList<Long>(); EmbeddedChannel channel = new EmbeddedChannel(new ChannelInboundHandlerAdapter() { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { inboundMsgs.add((Long) msg); } }); channel.config().setAutoRead(false); ChannelFuture channelFuture = channel.writeOneInbound(1L, channel.newPromise()); assertEquals(0, inboundMsgs.size()); Queue<Object> inboundMessages = channel.inboundMessages(); assertEquals(inboundMessages.size(), 0); channel.finish(); try { channelFuture.get(); fail(); } catch (InterruptedException e) { fail(); } catch (ExecutionException e) { <START> assertTrue(e.getCause() instanceof ClosedChannelException); <END> } }</code><technical_language>nit: assertThat(e.getCause(), Matchers.instanceOf(ClosedChannelException.class));</technical_language>

Target:
public void testCloseChannelWithUnhandledMsg() { final List<Long> inboundMsgs = new ArrayList<Long>(); EmbeddedChannel channel = new EmbeddedChannel(new ChannelInboundHandlerAdapter() { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { inboundMsgs.add((Long) msg); } }); channel.config().setAutoRead(false); ChannelFuture channelFuture = channel.writeOneInbound(1L, channel.newPromise()); assertEquals(0, inboundMsgs.size()); Queue<Object> inboundMessages = channel.inboundMessages(); assertEquals(inboundMessages.size(), 0); assertFalse(channel.finish()); try { channelFuture.get(); fail(); } catch (InterruptedException e) { fail(); } catch (ExecutionException e) { assertThat(e.getCause(), Matchers.instanceOf(ClosedChannelException.class)); } }
Source:
<code>public StreamingOutput getContentOctets(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("path") final String path) throws IOException, ParseException { File file = getFile(path, response); if (file == null) { return null; } Document doc; if ((doc = getDocument(file)) == null) { response.sendError(HttpServletResponse.SC_NOT_FOUND, "Cannot get document for file"); return null; } <START> return transfer(file); <END> }</code><technical_language>this throws FileNotFoundException, possibly answer 404</technical_language>

Target:
public StreamingOutput getContentOctets(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("path") final String path) throws IOException, ParseException { File file = getFile(path, response); if (file == null) { return null; } Document doc; if ((doc = getDocument(file)) == null) { response.sendError(HttpServletResponse.SC_NOT_FOUND, "Cannot get document for file"); return null; } try { return transfer(file); } catch (FileNotFoundException e) { response.sendError(HttpServletResponse.SC_NOT_FOUND, "Cannot find file"); return null; } }
Source:
<code>public Response start(Action action) { RunVmParams params; ActionType actionType; if (action.isSetVm()) { Vm vm = action.getVm(); actionType = ActionType.RunVmOnce; params = createRunVmOnceParams(vm, action.isSetVolatile() && action.isVolatile()); } else { actionType = ActionType.RunVm; params = new RunVmParams(guid); } if (action.isSetPause() && action.isPause()) { params.setRunAndPause(true); } boolean sysPrepSet = action.isSetUseSysprep(); boolean useSysPrep = sysPrepSet && action.isUseSysprep(); boolean cloudInitSet = action.isSetUseCloudInit(); boolean useCloudInit = cloudInitSet && action.isUseCloudInit(); boolean ignitionSet = action.isSetUseIgnition(); boolean useIgnition = ignitionSet && action.isUseIgnition(); if (useSysPrep && useCloudInit || useSysPrep && useIgnition || useCloudInit && useIgnition) { Fault fault = new Fault(); <START> fault.setReason(localize(Messages.CANT_USE_SYSPREP_AND_CLOUD_INIT_SIMULTANEOUSLY)); <END> return Response.status(Response.Status.CONFLICT).entity(fault).build(); } if (useSysPrep) { params.setInitializationType(InitializationType.Sysprep); } else if (useCloudInit) { params.setInitializationType(InitializationType.CloudInit); } else if (useIgnition) { params.setInitializationType(InitializationType.Ignition); } else if ((sysPrepSet && !useSysPrep) || (cloudInitSet && !useCloudInit) || (ignitionSet && !useIgnition)) { params.setInitializationType(InitializationType.None); } else { params.setInitializationType(null); } return doAction(actionType, params, action); }</code><technical_language>I worth changing error in Messages.properties include ignition</technical_language>

Target:
public Response start(Action action) { RunVmParams params; ActionType actionType; if (action.isSetVm()) { Vm vm = action.getVm(); actionType = ActionType.RunVmOnce; params = createRunVmOnceParams(vm, action.isSetVolatile() && action.isVolatile()); } else { actionType = ActionType.RunVm; params = new RunVmParams(guid); } if (action.isSetPause() && action.isPause()) { params.setRunAndPause(true); } boolean sysPrepSet = action.isSetUseSysprep(); boolean useSysPrep = sysPrepSet && action.isUseSysprep(); boolean cloudInitSet = action.isSetUseCloudInit(); boolean useCloudInit = cloudInitSet && action.isUseCloudInit(); boolean ignitionSet = action.isSetUseIgnition(); boolean useIgnition = ignitionSet && action.isUseIgnition(); if (useSysPrep && useCloudInit || useSysPrep && useIgnition || useCloudInit && useIgnition) { Fault fault = new Fault(); fault.setReason(localize(Messages.CANT_USE_MIXED_INIT_SIMULTANEOUSLY)); return Response.status(Response.Status.CONFLICT).entity(fault).build(); } if (useSysPrep) { params.setInitializationType(InitializationType.Sysprep); } else if (useCloudInit) { params.setInitializationType(InitializationType.CloudInit); } else if (useIgnition) { params.setInitializationType(InitializationType.Ignition); } else if ((sysPrepSet && !useSysPrep) || (cloudInitSet && !useCloudInit) || (ignitionSet && !useIgnition)) { params.setInitializationType(InitializationType.None); } else { params.setInitializationType(null); } return doAction(actionType, params, action); }
Source:
<code>public List<Double> getConditionalProbabiltiesOfMeBeingInBed() { <START> List<Double> condProbs = Lists.newArrayList(); <END> for (int i = 0; i < conditionalProbsOfMeInBed.length; i++) { condProbs.add(conditionalProbsOfMeInBed[i]); } return condProbs; }</code><technical_language>final</technical_language>

Target:
public List<Double> getConditionalProbabiltiesOfMeBeingInBed() { final List<Double> condProbs = Lists.newArrayList(); for (int i = 0; i < conditionalProbsOfMeInBed.length; i++) { condProbs.add(conditionalProbsOfMeInBed[i]); } return condProbs; }
Source:
<code>public CardinalityAggregatorFactory( @JsonProperty("name") String name, @JsonProperty("fieldName") final String fieldName ) { <START> Preconditions.checkNotNull(name, "Must have a valid, non-null aggregator name"); <END> Preconditions.checkNotNull(fieldName, "Must have a valid, non-null fieldName"); this.name = name; this.fieldName = fieldName; }</code><technical_language>Fwiw, this "checkNotNull" testing validity of value, non-null</technical_language>

Target:
public CardinalityAggregatorFactory( @JsonProperty("name") String name, @JsonProperty("fieldName") final String fieldName ) { Preconditions.checkArgument(fieldName != null && fieldName.length() > 0, "Must have a valid, non-null aggregator name"); Preconditions.checkArgument(fieldName != null && fieldName.length() > 0, "Must have a valid, non-null fieldName"); this.name = name; this.fieldName = fieldName; }
Source:
<code>public boolean ok(Object object, RequestScope requestScope, Optional<ChangeSpec> changeSpec) { Principal principal = ((Principal) requestScope.getUser().getOpaqueUser()); <START> if(object.getClass().equals(AsyncQuery.class)) { <END> return ((AsyncQuery) object).getPrincipalName().equals(principal.getName()); } else { return ((AsyncQueryResult) object).getPrincipalName().equals(principal.getName()); } }</code><technical_language>Cast PrincipalOwned. need handle cases differently. - file a ticket move this a FilterExpressionCheck</technical_language>

Target:
public boolean ok(Object object, RequestScope requestScope, Optional<ChangeSpec> changeSpec) { Principal principal = requestScope.getUser().getPrincipal(); return ((PrincipalOwned) object).getPrincipalName().equals(principal.getName()); }
Source:
<code>private CVSTag[] fetchTags(ICVSRemoteFile file, IProgressMonitor monitor) throws TeamException { Set<CVSTag> tagSet = new HashSet<>(); ILogEntry[] entries = file.getLogEntries(monitor); for (ILogEntry <START> entrie : <END> entries) { CVSTag[] tags = entrie.getTags(); for (CVSTag tag : tags) { tagSet.add(tag); } } return tagSet.toArray(new CVSTag[0]); }</code><technical_language>entry</technical_language>

Target:
private CVSTag[] fetchTags(ICVSRemoteFile file, IProgressMonitor monitor) throws TeamException { Set<CVSTag> tagSet = new HashSet<>(); ILogEntry[] entries = file.getLogEntries(monitor); for (ILogEntry entry : entries) { CVSTag[] tags = entry.getTags(); for (CVSTag tag : tags) { tagSet.add(tag); } } return tagSet.toArray(new CVSTag[0]); }
Source:
<code>protected void customizeWatchQueueReader(AbstractWatchService watchService, Path toWatch, boolean watchSubDirectories) { try { if (watchSubDirectories) { registerWithSubDirectories(watchService, toWatch); } else { registerDirectoryInternal(watchService, watchService.getWatchEventKinds(toWatch), toWatch); } } catch (IOException e) { <START> e.printStackTrace(); <END> logger.warn("Cannot customize folder watcher for folder '{}'", toWatch, e); } }</code><technical_language>I assume this deleted</technical_language>

Target:
protected void customizeWatchQueueReader(AbstractWatchService watchService, Path toWatch, boolean watchSubDirectories) { try { if (watchSubDirectories) { registerWithSubDirectories(watchService, toWatch); } else { registerDirectoryInternal(watchService, watchService.getWatchEventKinds(toWatch), toWatch); } } catch (IOException e) { logger.warn("Cannot customize folder watcher for folder '{}'", toWatch, e); } }
Source:
<code>public void recycleConnection(Connection<CL> connection) { try { this.closeConnection(connection); <START> createConnectionWithRetries(); <END> } finally { monitor.incConnectionRecycled(host); } }</code><technical_language>@kishorekasi Generally wondering if this increase latency of operation failing retrying connection</technical_language>

Target:
public void recycleConnection(Connection<CL> connection) { this.closeConnection(connection); monitor.incConnectionReturned(host); if (createConnectionWithRetries()) { monitor.incConnectionRecycled(host); } else { Logger.error("Connection recycle failed to create a new connection"); } }
Source:
<code>RFileScanner(Opts opts) { if (!opts.auths.equals(Authorizations.EMPTY) && !opts.useSystemIterators) { throw new IllegalArgumentException( "Set authorizations and specified not to use system iterators"); } this.opts = opts; <START> ConfigurationCopy tableConf = new ConfigurationCopy(DefaultConfiguration.getInstance()); <END> if (null != opts.tableConfig) { opts.tableConfig.forEach(tableConf::set); } this.tableConf = tableConf; if (opts.indexCacheSize > 0 || opts.dataCacheSize > 0) { ConfigurationCopy cc = new ConfigurationCopy(this.tableConf); try { blockCacheManager = BlockCacheManagerFactory.getClientInstance(cc); if (opts.indexCacheSize > 0) { cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(opts.indexCacheSize)); } if (opts.dataCacheSize > 0) { cc.set(Property.TSERV_DATACACHE_SIZE, Long.toString(opts.dataCacheSize)); } blockCacheManager.start(new BlockCacheConfiguration(cc)); this.indexCache = blockCacheManager.getBlockCache(CacheType.INDEX); this.dataCache = blockCacheManager.getBlockCache(CacheType.DATA); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } } if (null == indexCache) { this.indexCache = new NoopCache(); } if (null == this.dataCache) { this.dataCache = new NoopCache(); } }</code><technical_language>nice void creating config copy if opt.tableConfig is null. do this : java AccumuloConfiguration tableConf; if(null != opts.tableConfig && opts.tableConfig.size() > 0) { tableConf = new ConfigurationCopy(DefaultConfiguration.getInstance()); opts.tableConfig.forEach(tableConf::set); } else { tableConf = DefaultConfiguration.getInstance(); }</technical_language>

Target:
RFileScanner(Opts opts) { if (!opts.auths.equals(Authorizations.EMPTY) && !opts.useSystemIterators) { throw new IllegalArgumentException( "Set authorizations and specified not to use system iterators"); } this.opts = opts; if (null != opts.tableConfig && opts.tableConfig.size() > 0) { ConfigurationCopy tableCC = new ConfigurationCopy(DefaultConfiguration.getInstance()); opts.tableConfig.forEach(tableCC::set); this.tableConf = tableCC; } else { this.tableConf = DefaultConfiguration.getInstance(); } if (opts.indexCacheSize > 0 || opts.dataCacheSize > 0) { ConfigurationCopy cc = tableConf instanceof ConfigurationCopy ? (ConfigurationCopy) tableConf : new ConfigurationCopy(tableConf); try { blockCacheManager = BlockCacheManagerFactory.getClientInstance(cc); if (opts.indexCacheSize > 0) { cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(opts.indexCacheSize)); } if (opts.dataCacheSize > 0) { cc.set(Property.TSERV_DATACACHE_SIZE, Long.toString(opts.dataCacheSize)); } blockCacheManager.start(new BlockCacheConfiguration(cc)); this.indexCache = blockCacheManager.getBlockCache(CacheType.INDEX); this.dataCache = blockCacheManager.getBlockCache(CacheType.DATA); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } } if (null == indexCache) { this.indexCache = new NoopCache(); } if (null == this.dataCache) { this.dataCache = new NoopCache(); } }
Source:
<code>public void rightClickBlock(GlowPlayer player, GlowBlock against, BlockFace face, ItemStack holding, Vector clickedLoc) { GlowBlock target = against.getRelative(face); GlowBlockState newState = target.getState(); <START> if (against.getType() == Material.LONG_GRASS || against.getType() == Material.FIRE) { <END> target = against; } else if (!target.isEmpty() && !target.isLiquid()) { return; } PlayerBucketEmptyEvent emptyBucketEvent = EventFactory.onPlayerBucketEmpty(player, against, face, holding.getType(), holding); if (emptyBucketEvent.isCancelled()) { return; } this.getPlaceAs().placeBlock(player, newState, face, holding, clickedLoc); newState.update(true); if (player.getGameMode() != GameMode.CREATIVE) { holding.setType(Material.BUCKET); } }</code><technical_language>Hardcoding this is a bit of a pain. a BlockType.isReplaceable() something</technical_language>

Target:
public void rightClickBlock(GlowPlayer player, GlowBlock against, BlockFace face, ItemStack holding, Vector clickedLoc) { GlowBlock target = against.getRelative(face); BlockType againstBlockType = ItemTable.instance().getBlock(against.getType()); if (againstBlockType.canAbsorb(target, face, holding)) { target = against; } else if (!target.isEmpty()) { BlockType targetType = ItemTable.instance().getBlock(target.getTypeId()); if (!targetType.canOverride(target, face, holding)) { return; } } GlowBlockState newState = target.getState(); PlayerBucketEmptyEvent emptyBucketEvent = EventFactory.onPlayerBucketEmpty(player, target, face, holding.getType(), holding); if (emptyBucketEvent.isCancelled()) { return; } this.getPlaceAs().placeBlock(player, newState, face, holding, clickedLoc); newState.update(true); if (player.getGameMode() != GameMode.CREATIVE) { holding.setType(Material.BUCKET); } }
Source:
<code>public void searchForIsOnStockInChannels() { withChannelOfRole(client(), ChannelRole.INVENTORY_SUPPLY, channel -> { withProductOfStockAndChannel(client(), 2, channel, product -> { final ProductProjectionSearch request = ProductProjectionSearch.ofStaged() .plusQueryFilters(m -> m.id().is(product.getId())) .plusQueryFilters(m -> m.allVariants().availability() <START> .isOnStockInChannels().channels(Arrays.asList("noChannelId", channel.getId()))); <END> assertEventually(() -> { final PagedSearchResult<ProductProjection> res = client().executeBlocking(request); assertThat(res.getResults()).hasSize(1); }); }); }); }</code><technical_language>m.allVariants().availability().isOnStockInChannels(Arrays.asList("noChannelId", channel.getId()))'</technical_language>

Target:
public void searchForIsOnStockInChannels() { final String nonExistingChannel = "nonExistingChannelId"; withChannelOfRole(client(), ChannelRole.INVENTORY_SUPPLY, channel -> { withProductOfStockAndChannel(client(), 2, channel, product -> { final ProductProjectionSearch isOnStockInAnyChannelRequest = ProductProjectionSearch.ofStaged() .plusQueryFilters(m -> m.id().is(product.getId())) .plusQueryFilters(m -> m.allVariants().availability() .isOnStockByChannels().containsAny(Arrays.asList(nonExistingChannel, channel.getId()))); assertEventually(() -> { final PagedSearchResult<ProductProjection> res = client().executeBlocking(isOnStockInAnyChannelRequest); assertThat(res.getResults()).hasSize(1); }); final ProductProjectionSearch isOnStockInAnyChannelExistsRequest = ProductProjectionSearch.ofStaged() .plusQueryFilters(m -> m.id().is(product.getId())) .plusQueryFilters(m -> m.allVariants().availability() .isOnStockByChannels().exists()); assertEventually(() -> { final PagedSearchResult<ProductProjection> res = client().executeBlocking(isOnStockInAnyChannelExistsRequest); assertThat(res.getResults()).hasSize(1); }); final ProductProjectionSearch isOnStockInAllChannelsRequest = ProductProjectionSearch.ofStaged() .plusQueryFilters(m -> m.id().is(product.getId())) .plusQueryFilters(m -> m.allVariants().availability() .isOnStockByChannels().containsAll(Arrays.asList(nonExistingChannel, channel.getId()))); assertEventually(() -> { final PagedSearchResult<ProductProjection> res = client().executeBlocking(isOnStockInAllChannelsRequest); assertThat(res.getResults()).isEmpty(); }); }); }); }
Source:
<code>public void validate_shouldFailIfStartDateTimeIsBeforeBirthDateWhereBirthDateIsNotEstimated() { Calendar calendar = Calendar.getInstance(); Visit visit = new Visit(); visit.setVisitType(visitService.getVisitType(1)); visit.setPatient(Context.getPatientService().getPatient(2)); <START> Patient p = visit.getPatient(); <END> p.setBirthdate(calendar.getTime()); calendar.set(2000, 9,8); visit.setStartDatetime(calendar.getTime()); assertTrue("BirthDate Cannot be after visit startDateTime for same patient", p.getBirthdate().after(visit.getStartDatetime()) && !p.getBirthdateEstimated()); }</code><technical_language>calling VisitValidator.validate()</technical_language>

Target:
public void validate_shouldFailIfStartDateTimeIsBeforeBirthDateWhereBirthDateIsNotEstimated() { Calendar calendar = Calendar.getInstance(); Visit visit = new Visit(); visit.setPatient(Context.getPatientService().getPatient(2)); visit.getPatient().setBirthdate(calendar.getTime()); calendar.set(2000, 9,8); visit.setStartDatetime(calendar.getTime()); Errors errors = new BindException(visit, "visit"); new VisitValidator().validateBirthDate(visit, errors); assertEquals(true, errors.hasFieldErrors("startDatetime")); }
Source:
<code>public RecoveryApplier getRecoveryApplier( TransactionApplicationMode mode ) throws Exception { <START> transactionsToApply = new TransactionQueue( 100, ( first, last ) -> storageEngine.apply( first, mode ) ); <END> return new RecoveryVisitor( transactionsToApply ); }</code><technical_language>need transactionsToApply field anymore</technical_language>

Target:
public RecoveryApplier getRecoveryApplier( TransactionApplicationMode mode ) throws Exception { return new RecoveryVisitor( new TransactionQueue( 100, ( first, last ) -> storageEngine.apply( first, mode ) ) ); }
Source:
<code>public Response updateChargeStatus(@PathParam("chargeId") String chargeId, Map newStatusMap) { if (invalidInput(newStatusMap)) { return fieldsMissingResponse(ImmutableList.of(NEW_STATUS)); } String chargeStatusString = newStatusMap.get(NEW_STATUS).toString(); if (!ChargeStatus.isValid(chargeStatusString)) { String msg = "charge status not recognized: " + chargeStatusString; logger.error(msg); <START> return badRequestResponse(msg); <END> } ChargeStatus newChargeStatus = ChargeStatus.fromString(newStatusMap.get(NEW_STATUS).toString()); if (!isValidStateTransition(newChargeStatus)) { return getInvalidStatusResponse(chargeId, newChargeStatus); } return chargeService.updateFromInitialStatus(chargeId, newChargeStatus) .map(chargeEntity -> Response.noContent().build()) .orElseGet(() -> getInvalidStatusResponse(chargeId, newChargeStatus)); }</code><technical_language>repeating error message (it's IllegalArgumentException message ChargeStatus.fromString(String)): I wrapping ChargeStatus.fromString(String) in a try/catch returning badRequestResponse(e.getMessage()) (closer behaved fine)</technical_language>

Target:
public Response updateChargeStatus(@PathParam("chargeId") String chargeId, Map newStatusMap) { if (invalidInput(newStatusMap)) { return fieldsMissingResponse(ImmutableList.of(NEW_STATUS)); } ChargeStatus newChargeStatus; try { newChargeStatus = ChargeStatus.fromString(newStatusMap.get(NEW_STATUS).toString()); } catch (IllegalArgumentException e) { logger.error(e.getMessage(), e); return badRequestResponse(e.getMessage()); } if (!isValidStateTransition(newChargeStatus)) { return getInvalidStatusResponse(chargeId, newChargeStatus); } return chargeService.updateFromInitialStatus(chargeId, newChargeStatus) .map(chargeEntity -> Response.noContent().build()) .orElseGet(() -> getInvalidStatusResponse(chargeId, newChargeStatus)); }
Source:
<code>public void testLocalTime() throws Exception { Session localSession = testSessionBuilder() .setSystemProperty("legacy_timestamp", "false") <START> .setTimeZoneKey(TIME_ZONE_KEY) <END> .setStartTime(new DateTime(2017, 3, 1, 10, 0, 0, 0, DateTimeZone.UTC).getMillis()) .build(); FunctionAssertions localAssertion = new FunctionAssertions(localSession); localAssertion.assertFunctionString("LOCALTIME", TimeType.TIME, "15:45:00.000"); }</code><technical_language>need set legacy_timestamp TZ in tests method separately. create session build this.session. (here & elsewhere)</technical_language>

Target:
public void testLocalTime() throws Exception { Session localSession = testSessionBuilder() .setSystemProperty("legacy_timestamp", "false") .setTimeZoneKey(TIME_ZONE_KEY) .setStartTime(new DateTime(2017, 3, 1, 10, 0, 0, 0, DateTimeZone.UTC).getMillis()) .build(); FunctionAssertions localAssertion = new FunctionAssertions(localSession); localAssertion.assertFunctionString("LOCALTIME", TimeType.TIME, "14:30:00.000"); }
Source:
<code>public CacheContent build(HttpCacheServletResponseWrapper responseWrapper) throws HttpCacheDataStreamException { <START> this.status = responseWrapper.getStatus(); <END> this.charEncoding = responseWrapper.getCharacterEncoding(); this.contentType = responseWrapper.getContentType(); List<String> headerNames = new ArrayList<String>(); headerNames.addAll(responseWrapper.getHeaderNames()); for (String headerName: headerNames) { List<String> values = new ArrayList<String>(); values.addAll(responseWrapper.getHeaders(headerName)); headers.put(headerName, values); } this.tempSink = responseWrapper.getTempSink(); this.dataInputStream = responseWrapper.getTempSink().createInputStream(); this.writeMethod = responseWrapper.getWriteMethod(); return this; }</code><technical_language>call non-deprecated build(..) method, duplicating work. suggestion // Extracting HTTP Response Header Names Values Map<String, List<String>> headers = new HashMap<>(); List<String> headerNames = new ArrayList<>(); headerNames.addAll(responseWrapper.getHeaderNames()); for (String headerName: headerNames) { List<String> values = new ArrayList<>(); values.addAll(responseWrapper.getHeaders(headerName)); headers.put(headerName, values); } return build(responseWrapper, responseWrapper.getStatus(), responseWrapper.getCharacterEncoding(), responseWrapper. getContentType(), headerNames);</technical_language>

Target:
public CacheContent build(HttpCacheServletResponseWrapper responseWrapper) throws HttpCacheDataStreamException { Map<String, List<String>> extractedHeaders = responseWrapper.getHeaderNames().stream().collect( Collectors.toMap(headerName -> headerName, headerName -> new ArrayList<>(responseWrapper.getHeaders(headerName) ) )); return build(responseWrapper, responseWrapper.getStatus(), responseWrapper.getCharacterEncoding(), responseWrapper. getContentType(), extractedHeaders); }
Source:
<code>private void deleteTempPacksIdx() { Path packDir = <START> Paths.get(repo.getObjectsDirectory().getAbsolutePath(), "pack"); END> Instant threshold = Instant.now().minus(1, ChronoUnit.DAYS); try { Files.newDirectoryStream(packDir, "gc_*_tmp") .forEach(t -> { try { Instant lastModified = Files.getLastModifiedTime(t) .toInstant(); if (lastModified.isBefore(threshold)) { Files.deleteIfExists(t); } } catch (IOException e) { LOG.error(e.getMessage(), e); } }); } catch (IOException e) { LOG.error(e.getMessage(), e); } }</code><technical_language>In master do: repo.getObjectDatabase().getPackDirectory().toPath(); in deleteOrphans()</technical_language>

Target:
private void deleteTempPacksIdx() { Path packDir = repo.getObjectDatabase().getPackDirectory().toPath(); Instant threshold = Instant.now().minus(1, ChronoUnit.DAYS); try { Files.newDirectoryStream(packDir, "gc_*_tmp") .forEach(t -> { try { Instant lastModified = Files.getLastModifiedTime(t) .toInstant(); if (lastModified.isBefore(threshold)) { Files.deleteIfExists(t); } } catch (IOException e) { LOG.error(e.getMessage(), e); } }); } catch (IOException e) { LOG.error(e.getMessage(), e); } }
Source:
<code>public MessageInfo(StoreKey key, long size, boolean deleted, boolean ttlUpdated, long expirationTimeInMs, short accountId, short containerId, long operationTimeMs) { <START> this(key, size, deleted, ttlUpdated, expirationTimeInMs, null, accountId, containerId, operationTimeMs, (short) -1); <END> }</code><technical_language>is thought -1 default value? I feel more natural 0 default existing Put/Delete/TtlUpdate get updateVersion 0, is expected. default 0, need introduce hasUpdateVersion. 0 auto compatible</technical_language>

Target:
public MessageInfo(StoreKey key, long size, boolean deleted, boolean ttlUpdated, long expirationTimeInMs, short accountId, short containerId, long operationTimeMs) { this(key, size, deleted, ttlUpdated, false, expirationTimeInMs, null, accountId, containerId, operationTimeMs, (short) 0); }