auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public StatusInfo getCurrentStatus(@RequestParam(name = "token", required = true) String token) throws InvalidMonitoringTokenException { if (StringUtils.isNotEmpty(token) && StringUtils.equals(token, getConfiguredToken())) { return StatusInfo.getCurrentStatus(); } else { <START> throw new InvalidMonitoringTokenException("Invalid token for monitoring authorization"); <END> } }</code><technical_language>Change message of exception Monitoring authorization failed, invalid token</technical_language>

Target:
public StatusInfo getCurrentStatus(@RequestParam(name = "token", required = true) String token) throws InvalidManagementTokenException { if (StringUtils.isNotEmpty(token) && StringUtils.equals(token, getConfiguredToken())) { return StatusInfo.getCurrentStatus(); } else { throw new InvalidManagementTokenException("Management authorization failed, invalid token."); } }
Source:
<code><START> public Builder withSubAnalyses(Collection<? extends SubAnalysis> subAnalyses) { <END> if (null == subAnalyses) { throw new IllegalArgumentException("The 'subAnalyses' parameter cannot be null."); } for (SubAnalysis subAnalysis : subAnalyses) { addSubAnalysis(subAnalysis); } return this; }</code><technical_language>Suggestion: Similar issue setSteps/withSteps in funnel case. I generally improves API predictability if withXxx(...) assumed implemented setXxx(...); return this; (or addXxx(...); return this;, if more sense semantically - in singular withSubAnalysis case below)</technical_language>

Target:
public Builder withSubAnalyses(Collection<? extends SubAnalysis> subAnalyses) { if (null == subAnalyses) { throw new IllegalArgumentException("The 'subAnalyses' parameter cannot be null."); } setSubAnalyses(subAnalyses); return this; }
Source:
<code>public ItemStackSnapshot getExemplaryResult() { <START> return recipe.getExemplaryResult(); <END> }</code><technical_language>Field accesses qualified this. consistently codebase Protip: IDEs do this automatically</technical_language>

Target:
public ItemStackSnapshot getExemplaryResult() { return this.recipe.getExemplaryResult(); }
Source:
<code>public void testCompleteAndThenCancel() throws Exception { RunnableFuture<Integer> interruptible = new InterruptibleFuture<Integer>() { @Override public Integer call() throws InterruptedException { <START> if (Thread.interrupted()) throw new InterruptedException(); <END> return 1; } }; executor.execute(interruptible); assertThat(interruptible.get(), is(1)); interruptible.cancel(true); assertThat(interruptible.get(), is(1)); }</code><technical_language>required braces for single-line if statements</technical_language>

Target:
public void testCompleteAndThenCancel() throws Exception { RunnableFuture<Integer> interruptible = new InterruptibleFuture<Integer>() { @Override public Integer call() throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } return 1; } }; executor.execute(interruptible); assertThat(interruptible.get(), is(1)); interruptible.cancel(true); assertThat(interruptible.get(), is(1)); }
Source:
<code>protected SoundEvent getAmbientSound() { <START> return SoundEvents.ENTITY_SQUID_AMBIENT; <END> }</code><technical_language>find dolphin sounds eventually</technical_language>

Target:
protected SoundEvent getAmbientSound() { if(this.isInWater()) { return SoundEvents.ENTITY_SQUID_AMBIENT; }else { return SoundEvents.BLOCK_GRAVEL_STEP; } }
Source:
<code>public IBinding[] findBindings(IASTName n, boolean isPrefix, String[] namespaces) { IBinding[] bindings = CPPSemantics.findBindingsForContentAssist(n, isPrefix, namespaces); if (fQualifierPos >= 0) { IBinding binding = fQualifier[fQualifierPos].resolveBinding(); <START> IType type; <END> while (binding instanceof ITypedef) { ITypedef typedef = (ITypedef) binding; type = typedef.getType(); if (type instanceof IBinding) { binding = (IBinding) type; } else { binding = null; } } if (binding instanceof ICPPClassType) { ICPPClassType classType = (ICPPClassType) binding; final boolean isDeclaration = getParent().getParent() instanceof IASTSimpleDeclaration; List<IBinding> filtered = filterClassScopeBindings(classType, bindings, isDeclaration); if (isDeclaration && nameMatches(classType.getNameCharArray(), n.getLookupKey(), isPrefix)) { ICPPConstructor[] constructors = ClassTypeHelper.getConstructors(classType, n); for (int i = 0; i < constructors.length; i++) { if (!constructors[i].isImplicit()) { filtered.add(constructors[i]); } } } return filtered.toArray(new IBinding[filtered.size()]); } } return bindings; }</code><technical_language>declare this loop used</technical_language>

Target:
public IBinding[] findBindings(IASTName n, boolean isPrefix, String[] namespaces) { IBinding[] bindings = CPPSemantics.findBindingsForContentAssist(n, isPrefix, namespaces); if (fQualifierPos >= 0) { IBinding binding = fQualifier[fQualifierPos].resolveBinding(); while (binding instanceof ITypedef) { ITypedef typedef = (ITypedef) binding; IType type = typedef.getType(); if (type instanceof IBinding) { binding = (IBinding) type; } else { binding = null; } } if (binding instanceof ICPPClassType) { ICPPClassType classType = (ICPPClassType) binding; final boolean isDeclaration = getParent().getParent() instanceof IASTSimpleDeclaration; List<IBinding> filtered = filterClassScopeBindings(classType, bindings, isDeclaration); if (isDeclaration && nameMatches(classType.getNameCharArray(), n.getLookupKey(), isPrefix)) { ICPPConstructor[] constructors = ClassTypeHelper.getConstructors(classType, n); for (int i = 0; i < constructors.length; i++) { if (!constructors[i].isImplicit()) { filtered.add(constructors[i]); } } } return filtered.toArray(new IBinding[filtered.size()]); } } return bindings; }
Source:
<code>private static void validateMigrateStmt(String sql, VoltXMLElement xmlSQL, Database db) { final Map<String, String> attributes = xmlSQL.attributes; assert attributes.size() == 1; final Table targetTable = db.getTables().get(attributes.get("table")); assert targetTable != null; if (StringUtil.isEmpty(targetTable.getMigrationtarget())) { throw new PlanningErrorException(String.format( <START> "%s: Cannot migrate from table %s because the table does not contain migration target", <END> sql, targetTable.getTypeName())); } List<Pair<AbstractExpression, AbstractExpression>> leafAndParentList = ExpressionUtil.collectTerminalParentPairs( ExpressionUtil.from(db, VoltXMLElementHelper.getFirstChild( VoltXMLElementHelper.getFirstChild(xmlSQL, "condition"), "operation"))); for (Pair<AbstractExpression, AbstractExpression> leafAndParent : leafAndParentList) { if (leafAndParent.getFirst() instanceof FunctionExpression) { if (((FunctionExpression) leafAndParent.getFirst()).getFunctionName().equals("migrating") && leafAndParent.getSecond().getExpressionType() == ExpressionType.OPERATOR_NOT) { return; } } } throw new PlanningErrorException(String.format( "%s: Cannot migrate from table %s because the WHERE clause does not contain NOT MIGRATING()", sql, targetTable.getTypeName())); }</code><technical_language>check @ajgent for error message? (via email, etc.)</technical_language>

Target:
private static void validateMigrateStmt(String sql, VoltXMLElement xmlSQL, Database db) { final Map<String, String> attributes = xmlSQL.attributes; assert attributes.size() == 1; final Table targetTable = db.getTables().get(attributes.get("table")); assert targetTable != null; if (StringUtil.isEmpty(targetTable.getMigrationtarget())) { throw new PlanningErrorException(String.format( "%s: Cannot migrate from table %s because the table definition does not specify a migration target", sql, targetTable.getTypeName())); } if (ExpressionUtil.containsTerminalParentPairs(ExpressionUtil.from(db, VoltXMLElementHelper.getFirstChild( VoltXMLElementHelper.getFirstChild(xmlSQL, "condition"), "operation")), isNotMigrating())) { return; } throw new PlanningErrorException(String.format( "%s: Cannot migrate from table %s because the WHERE clause does not contain NOT MIGRATING()", sql, targetTable.getTypeName())); }
Source:
<code>public Response updateInsertionFeature(@PathParam("programUuid") long programUuid, @PathParam("insertionUuid") long insertionUuid, JaxNewInsertionFeature newFeature) throws Exception { ArtifactReadable insertionFeatureArt = atsServer.getQuery().andUuid(newFeature.getUuid()).getResults().getExactlyOne(); if (!insertionFeatureArt.getArtifactType().equals(AtsArtifactTypes.InsertionFeature)) { throw new OseeCoreException("Given insertion feature uuid not insertion feature type"); } Response response = null; if (!insertionFeatureArt.getName().equals(newFeature.getName())) { <START> IAtsConfigObject updated = atsServer.getConfigItemFactory().updateInsertionFeature(newFeature); <END> response = getResponse(updated); } else { response = Response.notModified().build(); } return response; }</code><technical_language>update send a created response code (embedded in getResponse)</technical_language>

Target:
public Response updateInsertionFeature(@PathParam("programUuid") long programUuid, @PathParam("insertionUuid") long insertionUuid, JaxNewInsertionFeature newFeature) throws Exception { ArtifactReadable insertionFeatureArt = atsServer.getArtifactByUuid(newFeature.getUuid()); if (insertionFeatureArt == null) { throw new OseeCoreException("Given insertion feature uuid not found"); } if (!insertionFeatureArt.getArtifactType().equals(AtsArtifactTypes.InsertionFeature)) { throw new OseeCoreException("Given insertion feature uuid not insertion feature type"); } Response response = null; if (!insertionFeatureArt.getName().equals(newFeature.getName())) { IAtsConfigObject updated = atsServer.getConfigItemFactory().updateInsertionFeature(newFeature); response = Response.ok().entity(updated).build(); } else { response = Response.notModified().build(); } return response; }
Source:
<code>public void execute() throws JMXConnectionException, Exception { JMXConnectorMgr connMgr = null; <START> List<T> result = null; <END> try { connMgr = new JMXConnectorMgr(config); }catch (IOException | InterruptedException e){ measurement.incrementFailureCnt(1); this.metricPublisher.publish(measurement); throw new JMXConnectionException("Exception during creating JMX connection for operation: " + taskType.name(), e); } try { result = manageTask(connMgr); measurement.incrementSuccessCnt(1); this.metricPublisher.publish(measurement); logger.info("Successfully finished executing the cluster management task: with result: {}", taskType, result); } catch (Exception e) { measurement.incrementFailureCnt(1); this.metricPublisher.publish(measurement); throw new RuntimeException(String.format("Exception during %s.",taskType), e); } finally { if (connMgr != null) connMgr.close(); } if (result.isEmpty()) { logger.warn("{} task completed successfully but no action was done.", taskType.name()); } }</code><technical_language>simplify introduce a Result entity instead of List<T>, I List. Result entity a simple interface calling toString method implementations of Result in output use</technical_language>

Target:
public void execute() throws Exception { if (!lock.tryLock()) { logger.error("Operation is already running! Try again later."); throw new Exception("Operation already running"); } try { String result = runTask(); measurement.incrementSuccessCnt(1); this.metricPublisher.publish(measurement); logger.info("Successfully finished executing the cluster management task: with result: {}", taskType, result); if (result.isEmpty()) { logger.warn("{} task completed successfully but no action was done.", taskType.name()); } } catch (Exception e){ measurement.incrementFailureCnt(1); this.metricPublisher.publish(measurement); throw new Exception("Exception during execution of operation: " + taskType.name(), e); } finally { lock.unlock(); } }
Source:
<code>public Pipeline createPipelineInstance(PipelineConfig pipelineConfig, BuildCause buildCause, SchedulingContext context, String md5, Clock clock) { buildCause.assertMaterialsMatch(pipelineConfig.materialConfigs()); buildCause.assertPipelineConfigAndMaterialRevisionMatch(pipelineConfig); <START> Map<CaseInsensitiveString, String> variables = EnvironmentVariables.toEnvironmentVariables(pipelineConfig.getVariables()).insecureVariablesHash(); <END> variables.putAll(buildCause.getVariables().insecureVariablesHash()); return new Pipeline(CaseInsensitiveString.str(pipelineConfig.name()), pipelineConfig.getLabelTemplate(), buildCause, variables, createStageInstance(pipelineConfig.first(), context, md5, clock)); }</code><technical_language>Instead of creating this hash, easier pass EnvironmentVariables object later, insecure variables it. like: envVars.valueForInsecureEnvironmentVariable("ABC")</technical_language>

Target:
public Pipeline createPipelineInstance(PipelineConfig pipelineConfig, BuildCause buildCause, SchedulingContext context, String md5, Clock clock) { buildCause.assertMaterialsMatch(pipelineConfig.materialConfigs()); buildCause.assertPipelineConfigAndMaterialRevisionMatch(pipelineConfig); EnvironmentVariables variables = EnvironmentVariables.toEnvironmentVariables(pipelineConfig.getVariables()); variables.overrideWith(buildCause.getVariables()); return new Pipeline(CaseInsensitiveString.str(pipelineConfig.name()), pipelineConfig.getLabelTemplate(), buildCause, variables, createStageInstance(pipelineConfig.first(), context, md5, clock)); }
Source:
<code>public void run() { DownloadDetailsDTO currentDownload = null; try { while (true) { if(shutdownFlag.get() || Thread.currentThread().isInterrupted()) { break; } Thread.sleep(pollDelay); <START> currentDownload = persistentQueueDAO.getNextDownload(maxRecords, downloadType); <END> if (currentDownload != null) { downloadServiceExecutor.submitDownload(currentDownload); } } } catch (InterruptedException | RejectedExecutionException e) { Thread.currentThread().interrupt(); } finally { try { downloadServiceExecutor.shutdown(); downloadServiceExecutor.awaitTermination(3, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } finally { downloadServiceExecutor.shutdownNow(); } } }</code><technical_language>Wait for downloadServiceExecutor a free executor getNextDownload. This allow DownloadControllerThread a free executor consume nextDownload</technical_language>

Target:
public void run() { DownloadDetailsDTO currentDownload = null; try { while (true) { if(shutdownFlag.get() || Thread.currentThread().isInterrupted()) { break; } Thread.sleep(pollDelay); if(!downloadServiceExecutor.reserveCapacity(pollDelay, TimeUnit.MILLISECONDS)) { continue; } if(shutdownFlag.get() || Thread.currentThread().isInterrupted()) { break; } currentDownload = persistentQueueDAO.getNextDownload(maxRecords, downloadType); if (currentDownload != null) { downloadServiceExecutor.submitDownload(currentDownload, parallelQueryExecutor); } else { downloadServiceExecutor.returnCapacity(); } } } catch (InterruptedException | RejectedExecutionException e) { Thread.currentThread().interrupt(); } finally { try { downloadServiceExecutor.shutdown(); downloadServiceExecutor.awaitTermination(3, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } finally { downloadServiceExecutor.shutdownNow(); } } }
Source:
<code>public void testDeletePool() throws Exception { Pool pool = createPoolAndSub(o, socketLimitedProduct, 100L, TestUtil.createDate(2000, 3, 2), TestUtil.createDate(2050, 3, 2)); poolCurator.create(pool); List<Pool> pools = poolCurator.listByOwner(o); <START> assertEquals(5, poolCurator.listByOwner(o).size()); <END> poolManager.deletePools(Arrays.asList(pool, pools.get(0))); pools = poolCurator.listByOwner(o); assertEquals(3, pools.size()); poolManager.deletePools(pools); pools = poolCurator.listByOwner(o); assertTrue(pools.isEmpty()); }</code><technical_language>pools.size()</technical_language>

Target:
public void testDeletePool() throws Exception { Pool pool = createPoolAndSub(o, socketLimitedProduct, 100L, TestUtil.createDate(2000, 3, 2), TestUtil.createDate(2050, 3, 2)); poolCurator.create(pool); List<Pool> pools = poolCurator.listByOwner(o); assertEquals(5, pools.size()); poolManager.deletePools(Arrays.asList(pool, pools.get(0))); pools = poolCurator.listByOwner(o); assertEquals(3, pools.size()); poolManager.deletePools(pools); pools = poolCurator.listByOwner(o); assertTrue(pools.isEmpty()); }
Source:
<code>private void toggleNature(IProject project) throws CoreException { IProjectDescription description = project.getDescription(); String[] natures = description.getNatureIds(); for (int i = 0; i < natures.length; ++i) { <START> if (SampleNature.NATURE_ID.equals(natures[i])) { <END> String[] newNatures = new String[natures.length - 1]; System.arraycopy(natures, 0, newNatures, 0, i); System.arraycopy(natures, i + 1, newNatures, i, natures.length - i - 1); description.setNatureIds(newNatures); project.setDescription(description, null); return; } } String[] newNatures = new String[natures.length + 1]; System.arraycopy(natures, 0, newNatures, 0, natures.length); newNatures[natures.length] = SampleNature.NATURE_ID; description.setNatureIds(newNatures); project.setDescription(description, null); }</code><technical_language>Unintential change? IMHO placeholder is required</technical_language>

Target:
private void toggleNature(IProject project) throws CoreException { IProjectDescription description = project.getDescription(); String[] natures = description.getNatureIds(); for (int i = 0; i < natures.length; ++i) { if ($natureClassName$.NATURE_ID.equals(natures[i])) { String[] newNatures = new String[natures.length - 1]; System.arraycopy(natures, 0, newNatures, 0, i); System.arraycopy(natures, i + 1, newNatures, i, natures.length - i - 1); description.setNatureIds(newNatures); project.setDescription(description, null); return; } } String[] newNatures = new String[natures.length + 1]; System.arraycopy(natures, 0, newNatures, 0, natures.length); newNatures[natures.length] = $natureClassName$.NATURE_ID; description.setNatureIds(newNatures); project.setDescription(description, null); }
Source:
<code>public void should_support_jcasc_from_yaml() throws Exception { URL configFileUrl = ConfigAsCodeTest.class.getResource(getClass().getSimpleName() + "/configuration-as-code.yml"); ConfigurationAsCode.get().configure(configFileUrl.toString()); StashNotifier.DescriptorImpl stashNotifierConfig = rule.jenkins.getDescriptorByType(StashNotifier.DescriptorImpl.class); assertThat(stashNotifierConfig.getCredentialsId(), equalTo("bitbucket-credentials")); assertThat(stashNotifierConfig.isIgnoreUnverifiedSsl(), equalTo(true)); assertThat(stashNotifierConfig.isIncludeBuildNumberInKey(), equalTo(true)); assertThat(stashNotifierConfig.getProjectKey(), equalTo("JEN")); assertThat(stashNotifierConfig.isPrependParentProjectKey(), equalTo(true)); assertThat(stashNotifierConfig.isDisableInprogressNotification(), equalTo(true)); assertThat(stashNotifierConfig.isConsiderUnstableAsSuccess(), equalTo(true)); <START> } <END></code><technical_language>Verifying stashRootUrl is missing here</technical_language>

Target:
public void should_support_jcasc_from_yaml() throws Exception { URL configFileUrl = ConfigAsCodeTest.class.getResource(getClass().getSimpleName() + "/configuration-as-code.yml"); ConfigurationAsCode.get().configure(configFileUrl.toString()); StashNotifier.DescriptorImpl stashNotifierConfig = rule.jenkins.getDescriptorByType(StashNotifier.DescriptorImpl.class); assertThat(stashNotifierConfig.isConsiderUnstableAsSuccess(), equalTo(true)); assertThat(stashNotifierConfig.getCredentialsId(), equalTo("bitbucket-credentials")); assertThat(stashNotifierConfig.isDisableInprogressNotification(), equalTo(true)); assertThat(stashNotifierConfig.isIgnoreUnverifiedSsl(), equalTo(true)); assertThat(stashNotifierConfig.isIncludeBuildNumberInKey(), equalTo(true)); assertThat(stashNotifierConfig.isPrependParentProjectKey(), equalTo(true)); assertThat(stashNotifierConfig.getProjectKey(), equalTo("JEN")); assertThat(stashNotifierConfig.getStashRootUrl(), equalTo("https://my.company.intranet/bitbucket")); }
Source:
<code>protected void closeAllPreparedStatements() throws SQLException { for (Map.Entry<PreparedStatement, Integer> preparedStatementIntegerEntry : pStatements.entrySet()) { if (preparedStatementIntegerEntry.getValue() > 0) { preparedStatementIntegerEntry.getKey().executeBatch(); } <START> preparedStatementIntegerEntry.getKey().close(); <END> } }</code><technical_language>This code is readable previous, I leave previous one</technical_language>

Target:
protected void closeAllPreparedStatements() throws SQLException { for (PreparedStatement p : pStatements.keySet()) { if (pStatements.get(p) > 0) { p.executeBatch(); } p.close(); } }
Source:
<code>public boolean matches(AllocationAttempt attempt, AllocationCandidate candidate) { Set<Long> hostIds = candidate.getHosts(); <START> for (Long hostId : hostIds) { <END> boolean oneGood = false; CacheManager cm = CacheManager.getCacheManagerInstance(this.objectManager); HostInfo hostInfo = cm.getHostInfo(hostId); oneGood = checkDiskSize(cm, hostInfo, attempt.getInstanceId()); if (!oneGood) { log.debug("Scheduling instance to host rejected", attempt.getInstanceId(), hostId); return false; } } return true; }</code><technical_language>Do need oneGood variable? this logic simplified CacheManager cm = CacheManager.getCacheManagerInstance(this.objectManager); HostInfo hostInfo = cm.getHostInfo(hostId); // get a bunch of disks for host need disk // free space large enough // if disk big enough free space for this host, // candidate is good if (!checkDiskSize(cm, hostInfo, attempt.getInstanceId())) { log.debug("Scheduling instance host rejected", attempt.getInstanceId(), hostId); return false; }</technical_language>

Target:
public boolean matches(AllocationAttempt attempt, AllocationCandidate candidate) { Instance instance = attempt.getInstance(); if (instance == null) { return false; } Set<Long> hostIds = candidate.getHosts(); for (Long hostId : hostIds) { Map<Pair<String, Long>, DiskInfo> volumeToDiskMapping = AllocatorUtils.allocateDiskForVolumes(hostId, instance, this.objectManager); if (volumeToDiskMapping == null) { log.debug("Scheduling instance to host rejected", attempt.getInstanceId(), hostId); return false; } } return true; }
Source:
<code>private String writeFBParameterRequest(final String Dst, final String value) { return <START> MessageFormat.format(DeploymentExecutor.WRITE_PARAMTER, this.reqID++, <END> value, Dst); }</code><technical_language>typo</technical_language>

Target:
private String writeFBParameterRequest(final String Dst, final String value) { return MessageFormat.format(DeploymentExecutor.WRITE_PARAMETER, this.reqID++, value, Dst); }
Source:
<code>public int callJavaUserDefinedAggregateCombine() { UserDefinedAggregateFunctionRunner udafRunner = getUdafRunner(); int udafIndex = m_udfBuffer.getInt(); Object workerObject = null; try { assert(udafRunner != null); byte[] workerByteArray = UserDefinedAggregateFunctionRunner.readVarbinary(m_udfBuffer); ByteArrayInputStream bis = new ByteArrayInputStream(workerByteArray); ObjectInput in = new UDAFObjectInputStream(bis); try { workerObject = in.readObject(); } finally { try { in.close(); <START> } catch (IOException ex) <END> } udafRunner.combine(workerObject, udafIndex); m_udfBuffer.clear(); return 0; } catch (InvocationTargetException ex1) { handleUDAFError(ex1.getCause()); } catch (Throwable ex2) { handleUDAFError(ex2); } return -1; }</code><technical_language>Minor: unused exception variable is named ignored</technical_language>

Target:
public int callJavaUserDefinedAggregateCombine() { UserDefinedAggregateFunctionRunner udafRunner = getUdafRunner(); int udafIndex = m_udfBuffer.getInt(); Object workerObject = null; try { assert(udafRunner != null); byte[] workerByteArray = UserDefinedAggregateFunctionRunner.readVarbinary(m_udfBuffer); ByteArrayInputStream bis = new ByteArrayInputStream(workerByteArray); ObjectInput in = new UDAFObjectInputStream(bis); try { workerObject = in.readObject(); } finally { try { in.close(); } catch (IOException exIgnored) } udafRunner.combine(workerObject, udafIndex); m_udfBuffer.clear(); return 0; } catch (InvocationTargetException ex1) { handleUDAFError(ex1.getCause()); } catch (Throwable ex2) { handleUDAFError(ex2); } return -1; }
Source:
<code>public RowExpression rewriteCall(CallExpression node, Boolean isRoot, RowExpressionTreeRewriter<Boolean> treeRewriter) { <START> if (BooleanType.BOOLEAN.equals(node.getType()) && functionResolution.isNotFunction(node.getFunctionHandle())) { <END> return rewriteBooleanExpression(node, isRoot); } if (isRoot) { return treeRewriter.rewrite(node, false); } return null; }</code><technical_language>BooleanType.BOOLEAN.equals(node.getType()) assertion instead of a condition. Put a checkState</technical_language>

Target:
public RowExpression rewriteCall(CallExpression node, Boolean isRoot, RowExpressionTreeRewriter<Boolean> treeRewriter) { if (functionResolution.isNotFunction(node.getFunctionHandle())) { checkState(BooleanType.BOOLEAN.equals(node.getType()), "NOT must be boolean function"); return rewriteBooleanExpression(node, isRoot); } if (isRoot) { return treeRewriter.rewrite(node, false); } return null; }
Source:
<code><START> default String getTypeName() { <END> return this.getClass().getSimpleName(); }</code><technical_language>I this default is for backwards-compatibility value. If I create a factory - "OffsetDateTimeFactory" - I want logicalType name. In other words, do default implementation being: default String getTypeName() { throw new UnsupportedOperationException(); } This is required new LogicalTypeFactory implement it</technical_language>

Target:
default String getTypeName() { throw new UnsupportedOperationException(); }
Source:
<code>public UpdateMetrics parse(ContentResponse entity) { String content = entity.getContentAsString(); UpdateMetrics.Builder builder = UpdateMetrics.builder(); String[] split = content.split("\\r?\\n"); for (String line : split) { passMetrics(line, builder); } UpdateMetrics updateMetrics = builder.build(); <START> log.debug(updateMetrics.toString()); <END> return updateMetrics; }</code><technical_language>Call toString() is needed (and harmful, want create String log it)</technical_language>

Target:
public UpdateMetrics parse(ContentResponse entity) { String content = entity.getContentAsString(); String[] lines = content.split("\\r?\\n"); UpdateMetrics updateMetrics = extractMetrics(lines); log.debug("{}", updateMetrics); return updateMetrics; }
Source:
<code>public void AutoCompleteTest() throws Exception { LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); lma.prepareDAG(new AutoComplete(), conf); LocalMode.Controller lc = lma.getController(); long start = System.currentTimeMillis(); <START> lc.run(200000); <END> long end = System.currentTimeMillis(); long time = end - start; logger.info("Test used " + time + " ms"); }</code><technical_language>Add result verification</technical_language>

Target:
public void AutoCompleteTest() throws Exception { LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); lma.prepareDAG(new AutoComplete(), conf); LocalMode.Controller lc = lma.getController(); ((StramLocalCluster)lc).setExitCondition(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return AutoComplete.TweetsInput.isDone(); } }); lc.run(200000); Assert.assertTrue(AutoComplete.Collector.getResult().containsKey("chi")); Assert.assertTrue(AutoComplete.Collector.getResult().containsKey("china")); Assert.assertEquals(2, AutoComplete.Collector.getResult().get("china").get(0).getCount()); Assert.assertEquals("China", AutoComplete.Collector.getResult().get("china").get(0).getValue()); Assert.assertEquals(2, AutoComplete.Collector.getResult().get("d").size()); Assert.assertEquals(3, AutoComplete.Collector.getResult().get("f").size()); Assert.assertTrue(AutoComplete.Collector.getResult().get("f").get(0).getCount() >= AutoComplete.Collector.getResult().get("f").get(1).getCount()); Assert.assertTrue(AutoComplete.Collector.getResult().get("f").get(1).getCount() >= AutoComplete.Collector.getResult().get("f").get(2).getCount()); }
Source:
<code>protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException { assert state instanceof GoTestRunningState; GoTestRunningState runningState = (GoTestRunningState)state; GoTestRunConfiguration runConfiguration = ObjectUtils.tryCast(environment.getRunProfile(), GoTestRunConfiguration.class); if (runConfiguration == null) { return null; } FileDocumentManager.getInstance().saveAllDocuments(); CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(runConfiguration); CoveragePatcher runningStatePatcher = new CoveragePatcher(coverageEnabledConfiguration, runConfiguration); runningState.setPatcher(runningStatePatcher); if (runConfiguration.getKind() == GoTestRunConfiguration.Kind.DIRECTORY && !runningStatePatcher.hasPackageCoverageExecutable()) { promptForPackageCoverageTool(runConfiguration); } ExecutionResult executionResult = state.execute(environment.getExecutor(), this); if (executionResult == null) { return null; } executionResult.getProcessHandler().addProcessListener(new GoCoverageProcessListener( <START> runConfiguration.getDirectoryPath(), <END> coverageEnabledConfiguration.getCoverageFilePath())); CoverageHelper.attachToProcess(runConfiguration, executionResult.getProcessHandler(), environment.getRunnerSettings()); return new RunContentBuilder(executionResult, environment).showRunContent(environment.getContentToReuse()); }</code><technical_language>reports generated right in user's sources? Sorry, this is acceptable. 1. IDE pollute user's sources files other unrelated files 2. IDE overwrite existing files invoking Coverage 3. Recursing iterating directory files while coverage merging long of iterating files do coverage</technical_language>

Target:
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException { assert state instanceof GoTestRunningState; GoTestRunningState runningState = (GoTestRunningState)state; GoTestRunConfiguration runConfiguration = ObjectUtils.tryCast(environment.getRunProfile(), GoTestRunConfiguration.class); if (runConfiguration == null) { return null; } FileDocumentManager.getInstance().saveAllDocuments(); CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(runConfiguration); CoveragePatcher runningStatePatcher = new CoveragePatcher(coverageEnabledConfiguration, runConfiguration); runningState.setPatcher(runningStatePatcher); if (runConfiguration.getKind() == GoTestRunConfiguration.Kind.DIRECTORY && !runningStatePatcher.hasPackageCoverageExecutable()) { promptForPackageCoverageTool(runConfiguration); } ExecutionResult executionResult = state.execute(environment.getExecutor(), this); if (executionResult == null) { return null; } CoverageHelper.attachToProcess(runConfiguration, executionResult.getProcessHandler(), environment.getRunnerSettings()); return new RunContentBuilder(executionResult, environment).showRunContent(environment.getContentToReuse()); }
Source:
<code>public void init() { <START> getParameters().setUseCinderCommandCallback(isCinderDisksExist()); <END> getParameters().setEntityInfo(new EntityInfo(VdcObjectType.VM, getVmId())); setSnapshotName(getParameters().getDescription()); setStoragePoolId(getVm() != null ? getVm().getStoragePoolId() : null); }</code><technical_language>diskOfTypeExists() remove isCinderDisksExist()</technical_language>

Target:
public void init() { getParameters().setUseCinderCommandCallback(diskOfTypeExists(DiskStorageType.CINDER)); getParameters().setEntityInfo(new EntityInfo(VdcObjectType.VM, getVmId())); setSnapshotName(getParameters().getDescription()); setStoragePoolId(getVm() != null ? getVm().getStoragePoolId() : null); }
Source:
<code>private static long[][] serializeEmcData() { long[][] ret = new long[EMCMapper.emc.size()][]; int i = 0; for (Map.Entry<SimpleStack, Long> entry : EMCMapper.emc.entrySet()) { SimpleStack stack = entry.getKey(); int id = Item.REGISTRY.getIDForObject(Item.REGISTRY.getObject(stack.id)); ret[i] = new long[] { id, stack.damage, entry.getValue() }; i++; } <START> PECore.debugLog("EMC data size: bytes", ret.length * 3 * 4); <END> return ret; }</code><technical_language>update this * 3 * 8 longs 8 bytes long</technical_language>

Target:
private static EmcPKTInfo[] serializeEmcData() { EmcPKTInfo[] ret = new EmcPKTInfo[EMCMapper.emc.size()]; int i = 0; for (Map.Entry<SimpleStack, Long> entry : EMCMapper.emc.entrySet()) { SimpleStack stack = entry.getKey(); int id = Item.REGISTRY.getIDForObject(Item.REGISTRY.getObject(stack.id)); ret[i] = new EmcPKTInfo(id, stack.damage, entry.getValue()); i++; } PECore.debugLog("EMC data size: bytes", ret.length * (2 * 4 + 8)); return ret; }
Source:
<code>private TypeSystemImpl readDKProHeader(BufferedInputStream bis, byte[] header, TypeSystemImpl ts) { if (Arrays.equals(header, DKPRO_HEADER)) { getLogger().debug("Found DKPro-Core-style embedded type system"); ObjectInputStream ois; try { ois = new ObjectInputStream(bis); CASMgrSerializer casMgr = (CASMgrSerializer) ois.readObject(); if (ts == null) { ts = casMgr.getTypeSystem(); ts.commit(); } } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); <START> } <END> } else { try { bis.reset(); } catch (IOException e) { e.printStackTrace(); } } return ts; }</code><technical_language>catch (IOException | ClassNotFoundException e) { throw new CollectionException(e); } Please "swallow" exceptions catch/e.printStackTrace</technical_language>

Target:
private TypeSystemImpl readDKProHeader(BufferedInputStream bis, byte[] header, TypeSystemImpl ts) throws CollectionException { getLogger().debug("Found DKPro-Core-style embedded type system"); ObjectInputStream ois; try { ois = new ObjectInputStream(bis); CASMgrSerializer casMgr = (CASMgrSerializer) ois.readObject(); if (ts == null) { ts = casMgr.getTypeSystem(); ts.commit(); } } catch (IOException | ClassNotFoundException e) { throw new CollectionException(e); } return ts; }
Source:
<code>public void search_shouldReturnEmptySearchResultIfTitleDoesNotExist() throws Exception { request.setParameter(MrrtReportTemplateSearchHandler.REQUEST_PARAM_TITLE, NON_EXISTING_TITLE); <START> requestContext.setRequest(request); <END> PageableResult pageableResult = mrrtReportTemplateSearchHandler.search(requestContext); assertThat(pageableResult, is(instanceOf(EmptySearchResult.class))); }</code><technical_language>this is done in setUp</technical_language>

Target:
public void search_shouldReturnEmptySearchResultIfTitleDoesNotExist() throws Exception { request.setParameter(MrrtReportTemplateSearchHandler.REQUEST_PARAM_TITLE, NON_EXISTING_TITLE); PageableResult pageableResult = mrrtReportTemplateSearchHandler.search(requestContext); assertThat(pageableResult, is(instanceOf(EmptySearchResult.class))); }
Source:
<code>protected void executeSave() { boolean addOnProvider = getExport().getEntity(); IFrontendActionAsyncCallback addNetworkCallback = addNetworkCallback(addOnProvider); final AddNetworkStoragePoolParameters parameters = new AddNetworkStoragePoolParameters(getSelectedDc().getId(), getNetwork()); parameters.setVnicProfileRequired(false); if <START> (addOnProvider) { <END> Provider externalProvider = getExternalProviders().getSelectedItem(); ProviderNetwork providerNetwork = new ProviderNetwork(); providerNetwork.setProviderId(externalProvider.getId()); getNetwork().setProvidedBy(providerNetwork); Frontend.getInstance().runAction(VdcActionType.AddNetworkOnProvider, parameters, addNetworkCallback, null); } else { Frontend.getInstance().runAction(VdcActionType.AddNetwork, parameters, addNetworkCallback, null); } }</code><technical_language>Please consider polymorphic approach passing booleans</technical_language>

Target:
protected void executeSave() { final AddNetworkStoragePoolParameters parameters = new AddNetworkStoragePoolParameters(getSelectedDc().getId(), getNetwork()); parameters.setVnicProfileRequired(false); if (getExport().getEntity()) { Provider externalProvider = getExternalProviders().getSelectedItem(); ProviderNetwork providerNetwork = new ProviderNetwork(); providerNetwork.setProviderId(externalProvider.getId()); getNetwork().setProvidedBy(providerNetwork); Frontend.getInstance().runAction(VdcActionType.AddNetworkOnProvider, parameters, addNetworkOnProviderCallback(), null); } else { Frontend.getInstance().runAction(VdcActionType.AddNetwork, parameters, addNetworkCallback(), null); } }
Source:
<code>public void onEvent(NetworkConnectivityChangeEvent event) { <START> if (!NetworkUtil.isConnected(getContext())) { <END> if (getActivity() instanceof SnackbarStatusListener && getUserVisibleHint()) { ((SnackbarStatusListener) getActivity()).resetSnackbarVisibility(authWebView.isShowingError()); } } }</code><technical_language>2 conditions merged 1 condition</technical_language>

Target:
public void onEvent(NetworkConnectivityChangeEvent event) { CourseTabsUtils.onNetworkConnectivityChangeEvent(getActivity(), getUserVisibleHint(), authWebView.isShowingError()); }
Source:
<code><START> protected void after() throws Exception { <END> }</code><technical_language>Exception instead of Throwable for before()</technical_language>

Target:
protected void after() throws Throwable { }
Source:
<code><START> public Memo explore(PlanNode plan, Session session, SymbolAllocator symbolAllocator, PlanNodeIdAllocator idAllocator) <END> { Memo memo = new Memo(idAllocator, plan); Lookup lookup = Lookup.from(planNode -> ImmutableList.of(memo.resolve(planNode))); Matcher matcher = new PlanNodeMatcher(lookup); Duration timeout = SystemSessionProperties.getOptimizerTimeout(session); Context context = new Context(memo, lookup, idAllocator, symbolAllocator, System.nanoTime(), timeout.toMillis(), session); exploreGroup(memo.getRootGroup(), context, matcher); return memo; }</code><technical_language>I dislike idea of introducing tight coupling Iterative Optimizer's internal state (Memo) outer world</technical_language>

Target:
public Memo explore(PlanNode plan, Session session, SymbolAllocator symbolAllocator, PlanNodeIdAllocator idAllocator) { Memo memo = new Memo(idAllocator, plan); Lookup lookup = memo.getLookup(); Matcher matcher = new PlanNodeMatcher(lookup); Duration timeout = SystemSessionProperties.getOptimizerTimeout(session); Context context = new Context(memo, lookup, idAllocator, symbolAllocator, System.nanoTime(), timeout.toMillis(), session); exploreGroup(memo.getRootGroup(), context, matcher); return memo; }
Source:
<code>private void filterListForCurrentText() { String text = mTagsEditText.getText().toString(); int endIndex = text.lastIndexOf(","); if (endIndex == -1) { mAdapter.filter(text); } else { <START> String textToFilter = text.substring(endIndex + 1); <END> mAdapter.filter(textToFilter); } }</code><technical_language>I trim textToFilter here, work if user adds a whitespace comma</technical_language>

Target:
private void filterListForCurrentText() { String text = mTagsEditText.getText().toString(); int endIndex = text.lastIndexOf(","); if (endIndex == -1) { mAdapter.filter(text); } else { String textToFilter = text.substring(endIndex + 1).trim(); mAdapter.filter(textToFilter); } }
Source:
<code>public void testFlow() { final OaiPmhOpener opener = new OaiPmhOpener(); opener.setDateFrom("2013-08-11"); opener.setDateUntil("2013-08-12"); opener.setMetadataPrefix("PicaPlus-xml"); opener.setSetSpec("bib"); <START> final XmlDecoder xmldecoder = new XmlDecoder(); <END> final PicaXmlHandler handler = new PicaXmlHandler(); final Metamorph metamorph = new Metamorph("morph_zdb-isil-file-pica2ld.xml"); final PipeLobidOrganisationEnrichment enrich = new PipeLobidOrganisationEnrichment(); enrich.setGeonameFilename("geonames_DE_sample.csv"); enrich.doApiLookup = false; enrich.setSerialization("TURTLE"); final ObjectWriter<String> writer = new ObjectWriter<String>( "update_zdb-isil-file2lobid-organisations1.ttl"); opener.setReceiver(xmldecoder); xmldecoder.setReceiver(handler); handler.setReceiver(metamorph); metamorph.setReceiver(enrich); enrich.setReceiver(writer); opener.process("<LINK_0>"); opener.closeStream(); }</code><technical_language>camel case</technical_language>

Target:
public void testFlow() { final OaiPmhOpener opener = new OaiPmhOpener(); opener.setDateFrom("2013-08-11"); opener.setDateUntil("2013-08-12"); opener.setMetadataPrefix("PicaPlus-xml"); opener.setSetSpec("bib"); final XmlDecoder xmlDecoder = new XmlDecoder(); final PicaXmlHandler handler = new PicaXmlHandler(); final Metamorph metamorph = new Metamorph("morph_zdb-isil-file-pica2ld.xml"); final PipeLobidOrganisationEnrichment enrich = new PipeLobidOrganisationEnrichment(); enrich.setGeonameFilename("geonames_DE_sample.csv"); enrich.doApiLookup = false; enrich.setSerialization("TURTLE"); final ObjectWriter<String> writer = new ObjectWriter<String>( "update_zdb-isil-file2lobid-organisations1.ttl"); opener.setReceiver(xmlDecoder); xmlDecoder.setReceiver(handler); handler.setReceiver(metamorph); metamorph.setReceiver(enrich); enrich.setReceiver(writer); opener.process("<LINK_0>"); opener.closeStream(); }
Source:
<code>public void run() { final VoltDBInterface voltdb = VoltDB.instance(); <START> if (voltdb.getMode() == OperationMode.PAUSED) { <END> return; } ClientInterface cl = voltdb.getClientInterface(); if (!canceled.get() && cl != null && cl.isAcceptingConnections()) { TimeToLive ttl = ttlRef.get(); cl.runTimeToLive(ttl.getTtlcolumn().getName(), transformValue(ttl), CHUNK_SIZE, TIMEOUT, this); } }</code><technical_language>happen, want issue TTL case other Operation.Running ? (i.e. Initilize shuttingDown Paused )</technical_language>

Target:
public void run() { final VoltDBInterface voltdb = VoltDB.instance(); if (voltdb.getMode() != OperationMode.RUNNING) { return; } ClientInterface cl = voltdb.getClientInterface(); if (!canceled.get() && cl != null && cl.isAcceptingConnections()) { TimeToLive ttl = ttlRef.get(); cl.runTimeToLive(ttl.getTtlcolumn().getName(), transformValue(ttl), CHUNK_SIZE, TIMEOUT, this); } }
Source:
<code>public void encodeCollectionLink(String link, HierarchicalStreamWriter writer) { String path = request.getRequestURI(); if (path.contains("script")) { try { link = URLDecoder.decode(link, "UTF-8"); encodeAlternateAtomLinkNoExt(link, writer); writer.addAttribute("type", getMediaType()); writer.endNode(); } catch (UnsupportedEncodingException e) { } } else { <START> encodeAlternateAtomLink(link, writer); <END> } }</code><technical_language>this delegating a method encodeLink, above</technical_language>

Target:
public void encodeCollectionLink(String link, HierarchicalStreamWriter writer) { if (checkPath(request)) { try { link = URLDecoder.decode(link, "UTF-8"); encodeAlternateAtomLinkNoExt(link, writer); writer.addAttribute("type", getMediaType()); writer.endNode(); } catch (UnsupportedEncodingException e) { } } else { encodeAlternateAtomLink(link, writer); } }
Source:
<code>public ImageDescriptor getImageDescriptorForProgram(String extension) { ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(extension); if (imageDescriptor == null && extension != null) { Program program = <START> ProgramFinder.findProgram(extension.toLowerCase()); <END> if (program == null || program.getImageData() == null) { } else { imageDescriptor = ImageDescriptor.createFromImageData(program.getImageData()); getImageRegistry().put(extension, imageDescriptor); } } return imageDescriptor; }</code><technical_language>Perform this operation in custom ProgramFinder.findProgram() method instead</technical_language>

Target:
public ImageDescriptor getImageDescriptorForProgram(String extension) { ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(extension); if (imageDescriptor == null && extension != null) { Program program = ProgramFinder.findProgram(extension); if (program == null || program.getImageData() == null) { } else { imageDescriptor = ImageDescriptor.createFromImageData(program.getImageData()); getImageRegistry().put(extension, imageDescriptor); } } return imageDescriptor; }
Source:
<code>private ResultScanner<Row> streamRows(ReadRowsRequest request) { PooledChannel reservedChannel = channelPool.reserveChannel(); final ClientCall<ReadRowsRequest, ReadRowsResponse> readRowsCall = reservedChannel.newCall(BigtableServiceGrpc.METHOD_READ_ROWS, CallOptions.DEFAULT); CancellationToken cancellationToken = new CancellationToken(); cancellationToken.addListener(new Runnable() { @Override public void run() { readRowsCall.cancel(); } }, executorService); <START> int bufferCapacity = retryOptions.getStreamingBufferSize(); <END> int timeout = retryOptions.getReadPartialRowTimeoutMillis(); ResponseQueueReader responseQueueReader = new ResponseQueueReader(timeout, readRowsCall); StreamingBigtableResultScanner resultScanner = new StreamingBigtableResultScanner(reservedChannel, responseQueueReader, cancellationToken); clientCallService.asyncServerStreamingCall( readRowsCall, request, bufferCapacity, createClientCallListener(resultScanner)); return resultScanner; }</code><technical_language>nit: move this clientCallService.asyncServerStreamingCall() is used</technical_language>

Target:
private ResultScanner<Row> streamRows(ReadRowsRequest request) { PooledChannel reservedChannel = channelPool.reserveChannel(); final ClientCall<ReadRowsRequest, ReadRowsResponse> readRowsCall = reservedChannel.newCall(BigtableServiceGrpc.METHOD_READ_ROWS, CallOptions.DEFAULT); CancellationToken cancellationToken = new CancellationToken(); cancellationToken.addListener(new Runnable() { @Override public void run() { readRowsCall.cancel(); } }, executorService); int timeout = retryOptions.getReadPartialRowTimeoutMillis(); int streamingBufferSize = retryOptions.getStreamingBufferSize(); int batchRequestSize = streamingBufferSize / 2; ResponseQueueReader responseQueueReader = new ResponseQueueReader(timeout, streamingBufferSize, batchRequestSize, batchRequestSize, readRowsCall); StreamingBigtableResultScanner resultScanner = new StreamingBigtableResultScanner(reservedChannel, responseQueueReader, cancellationToken); clientCallService.asyncServerStreamingCall( readRowsCall, request, batchRequestSize, createClientCallListener(resultScanner)); return resultScanner; }
Source:
<code>private boolean rootResourceDirsEqual( Collection<String> currentRootResourceDirs, Collection<String> newRootResourceDirs) { <START> return (currentRootResourceDirs.size() == newRootResourceDirs.size()) <END> && newRootResourceDirs.containsAll(currentRootResourceDirs); }</code><technical_language>I curious equals() work here</technical_language>

Target:
private boolean rootResourceDirsEqual( Collection<String> currentRootResourceDirs, Collection<String> newRootResourceDirs) { return (currentRootResourceDirs != null) && (currentRootResourceDirs.size() == newRootResourceDirs.size()) && newRootResourceDirs.containsAll(currentRootResourceDirs); }
Source:
<code>public LocalStackContainer(String version) { <START> super(TestcontainersConfiguration.getInstance().getLocalStackImage().split(":")[0] + ":" + version); <END> withFileSystemBind(" waitingFor(Wait.forLogMessage(".*Ready\\.\n", 1)); }</code><technical_language>if user specifies version, official image</technical_language>

Target:
public LocalStackContainer(String version) { super("localstack/localstack:" + version); sharedSetup(); }
Source:
<code>public static final BundleContext getBundleContext() { if (bundleContext == null) { <START> throw new NullPointerException("There is no bundle context"); <END> } return bundleContext; }</code><technical_language>I prefer IllegalStateExceptions in cases</technical_language>

Target:
public static final BundleContext getBundleContext() { if (bundleContext == null) { throw new IllegalStateException("There is no bundle context"); } return bundleContext; }
Source:
<code>protected AbstractDataCommand(Object key, long flagsBitSet) { this.key = key; <START> setFlagsBitSet(flagsBitSet); <END> }</code><technical_language>changes needed</technical_language>

Target:
protected AbstractDataCommand(Object key, long flagsBitSet) { this.key = key; this.flags = flagsBitSet; }