auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private ContactService() { Random random = new Random(0); LocalDateTime time = LocalDateTime.of(1930, Month.JANUARY, 1, 0, 0); for (int i = 0; i < 100; i++) { Contact contact = new Contact(); contact.setFirstName(fnames[random.nextInt(fnames.length)]); contact.setLastName(lnames[random.nextInt(fnames.length)]); contact.setEmail(contact.getFirstName().toLowerCase(Locale.ENGLISH) + "@" + contact.getLastName().toLowerCase(Locale.ENGLISH) + ".com"); contact.setPhoneNumber("+ 358 555 " + (100 + random.nextInt(900))); time = time.plusYears(random.nextInt(70)); time = time.plusMonths(random.nextInt(11)); time = time.plusDays(random.nextInt(27)); contact.setBirthDate(time); <START> save(contact); <END> } }</code><technical_language>![MAJOR](<LINK_1> Remove this call a constructor overridable "save" method. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
private ContactService() { Random random = new Random(0); LocalDate time = LocalDate.of(1930, Month.JANUARY, 1); for (int i = 0; i < 100; i++) { Contact contact = new Contact(); contact.setFirstName(fnames[random.nextInt(fnames.length)]); contact.setLastName(lnames[random.nextInt(fnames.length)]); contact.setEmail(contact.getFirstName().toLowerCase(Locale.ENGLISH) + "@" + contact.getLastName().toLowerCase(Locale.ENGLISH) + ".com"); contact.setPhoneNumber("+ 358 555 " + (100 + random.nextInt(900))); time = time.plusYears(random.nextInt(70)); time = time.plusMonths(random.nextInt(11)); time = time.plusDays(random.nextInt(27)); contact.setBirthDate(time); save(contact); } }
Source:
<code>public OpsManager() { this.states = new HashMap<String, Integer>(); this.ops = new HashMap<String, Integer>(); this.revStates = new ArrayList<String>(); this.revOps = new ArrayList<String>(); this.truthTable = null; this.order = false; <START> ; <END> }</code><technical_language>redundant ";" character</technical_language>

Target:
public OpsManager() { this.states = new HashMap<String, Integer>(); this.ops = new HashMap<String, Integer>(); this.revStates = new ArrayList<String>(); this.revOps = new ArrayList<String>(); this.truthTable = null; this.order = false; }
Source:
<code>public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch (id) { case R.id.actionSubmit: submitAction(); <START> break; <END> default: break; } return super.onOptionsItemSelected(item); }</code><technical_language>menu item click handled, return true instead here</technical_language>

Target:
public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch (id) { case R.id.actionSubmit: submitAction(); return true; default: break; } return super.onOptionsItemSelected(item); }
Source:
<code><START> private void setLoggerLevel(String loggerConfig) { <END> int i = loggerConfig.indexOf('='); if (i < 0) { return; } String loggerName = loggerConfig.substring(0, i); String levelStr = loggerConfig.substring(i + 1); if (loggerName == null) { return; } if (levelStr == null) { return; } loggerName = loggerName.trim(); levelStr = levelStr.trim(); addInfo("Trying to set level " + levelStr + " to logger " + loggerName); LoggerContext lc = (LoggerContext) context; Logger logger = lc.getLogger(loggerName); if ("null".equalsIgnoreCase(levelStr)) { logger.setLevel(null); } else { Level level = Level.toLevel(levelStr, null); if (level != null) { logger.setLevel(level); } } }</code><technical_language>a bit if a private method is invokes</technical_language>

Target:
private void setLoggerLevel(String loggerConfig) { String[] parts = loggerConfig.split("=", 2); if (parts.length < 2) { return; } String loggerName = parts[0]; String levelStr = parts[1]; if (levelStr.isEmpty() || loggerName.isEmpty()) { return; } loggerName = loggerName.trim(); levelStr = levelStr.trim(); LoggerContext lc = (LoggerContext) context; Logger logger = lc.getLogger(loggerName); if ("null".equalsIgnoreCase(levelStr)) { logger.setLevel(null); } else { Level level = Level.toLevel(levelStr, null); if (level != null) { logger.setLevel(level); } } }
Source:
<code>public boolean isValid(String mask, ConstraintValidatorContext context) { <START> if (mask.isEmpty()) { <END> return true; } boolean isMaskFormatValid = isMaskFormatValid(mask); AConstraint.AConstraintArgsFormatValue args = new AConstraint.AConstraintArgsFormatValue(isMaskFormatValid, isMaskFormatValid ? isMaskValid(mask) : false, VdcBllMessages.UPDATE_NETWORK_ADDR_IN_SUBNET_BAD_FORMAT.name(), VdcBllMessages.UPDATE_NETWORK_ADDR_IN_SUBNET_BAD_VALUE.name()); return AConstraint.getInstance().isValid(args, context, "mask"); }</code><technical_language>if mask is null</technical_language>

Target:
public boolean isValid(String mask, ConstraintValidatorContext context) { if (mask.isEmpty()) { return true; } boolean isMaskFormatValid = isMaskFormatValid(mask); AValidatorConstraint.AValidatorConstraintArgsFormatValue args = new AValidatorConstraint.AValidatorConstraintArgsFormatValue(isMaskFormatValid, isMaskFormatValid ? isMaskValid(mask) : false, VdcBllMessages.UPDATE_NETWORK_ADDR_IN_SUBNET_BAD_FORMAT.name(), VdcBllMessages.UPDATE_NETWORK_ADDR_IN_SUBNET_BAD_VALUE.name()); return AValidatorConstraint.getInstance().isValid(args, context, "mask"); }
Source:
<code>public <T> T[] toArray(T[] newArray) { Class<?> componentType = newArray.getClass().getComponentType(); T[] returnArray = newArray; int size = fInnerElements.size(); if (returnArray.length < size) { returnArray = (T[]) Array.newInstance(componentType, size); } Iterator<E> iterator = iterator(); for (int i = 0; i < size; i++) { <START> @Nullable <END> E next = null; while (iterator.hasNext() && next == null) { next = iterator.next(); } if (next != null) { Class<? extends @NonNull Object> elementClass = next.getClass(); if (!Objects.equals(elementClass, componentType) && !elementClass.isInstance(componentType)) { throw new ArrayStoreException("Cannot convert from (" + elementClass + " to " + newArray.getClass().getComponentType()); } } returnArray[i] = (T) next; } return returnArray; }</code><technical_language>line</technical_language>

Target:
public <T> T[] toArray(T[] newArray) { Class<?> componentType = newArray.getClass().getComponentType(); T[] returnArray = newArray; int size = fInnerElements.size(); if (returnArray.length < size) { returnArray = (T[]) Array.newInstance(componentType, size); } for (int i = size; i < returnArray.length; i++) { returnArray[i] = null; } Iterator<E> iterator = iterator(); for (int i = 0; i < size; i++) { @Nullable E next = null; while (iterator.hasNext() && next == null) { next = iterator.next(); } if (next != null) { Class<? extends @NonNull Object> elementClass = next.getClass(); if (!Objects.equals(elementClass, componentType) && !elementClass.isInstance(componentType)) { throw new ArrayStoreException("Cannot convert from (" + elementClass + " to " + newArray.getClass().getComponentType()); } } returnArray[i] = (T) next; } return returnArray; }
Source:
<code>private void removeSelectedPerson() { if (mSelectedPerson == null) { return; } PeopleUtils.removePerson(mSelectedPerson.getBlogId(), mSelectedPerson.getPersonID(), mSelectedPerson.getLocalTableBlogId(), new PeopleUtils.RemoveUserCallback() { @Override public void onSuccess(long personID, int localTableBlogId) { Person person = PeopleTable.getPerson(personID, localTableBlogId); String text; if (person != null) { PeopleTable.deletePerson(personID, localTableBlogId); <START> text = getString(R.string.person_removed, person.getUsername()); <END> } else { text = getString(R.string.person_removed_general); } ToastUtils.showToast(PeopleManagementActivity.this, text, ToastUtils.Duration.LONG); navigateBackToPeopleListFragment(); refreshPeopleListFragment(); } @Override public void onError() { ToastUtils.showToast(PeopleManagementActivity.this, R.string.error_remove_user, ToastUtils.Duration.LONG); } }); }</code><technical_language>if this is design but, asking for remove confirmation Person's display name, I sense in Toast well. Cheers</technical_language>

Target:
private void removeSelectedPerson() { Person person = getCurrentPerson(); if (person == null) { return; } PeopleUtils.removePerson(person.getBlogId(), person.getPersonID(), person.getLocalTableBlogId(), new PeopleUtils.RemoveUserCallback() { @Override public void onSuccess(long personID, int localTableBlogId) { Person person = PeopleTable.getPerson(personID, localTableBlogId); String text; if (person != null) { PeopleTable.deletePerson(personID, localTableBlogId); text = getString(R.string.person_removed, person.getUsername()); } else { text = getString(R.string.person_removed_general); } ToastUtils.showToast(PeopleManagementActivity.this, text, ToastUtils.Duration.LONG); navigateBackToPeopleListFragment(); refreshPeopleListFragment(); } @Override public void onError() { ToastUtils.showToast(PeopleManagementActivity.this, R.string.error_remove_user, ToastUtils.Duration.LONG); } }); }
Source:
<code>public static Pair<ClassificationCounter, Map<Serializable, ClassificationCounter>> countAllByAttributeValues( final Iterable<? extends AbstractInstance> instances, final String attribute, String splitAttribute, Serializable splitAttributeValue) { final Map<Serializable, ClassificationCounter> result = Maps.newHashMap(); final ClassificationCounter totals = new ClassificationCounter(); <START> for (final AbstractInstance instance : instances) { <END> final Serializable attrVal = instance.getAttributes().get(attribute); ClassificationCounter cc = null; boolean isAnAcceptableMissingValue = splitAttribute == null || splitAttributeValue == null || instance.getAttributes().get(splitAttribute).equals(splitAttributeValue); if (attrVal!=null) cc = result.get(attrVal); else if (isAnAcceptableMissingValue) cc = result.get(MISSING_VALUE); if (cc == null || isAnAcceptableMissingValue) { cc = new ClassificationCounter(); Serializable newKey = (attrVal != null) ? attrVal : MISSING_VALUE; result.put(newKey, cc); } cc.addClassification(instance.getClassification(), instance.getWeight()); totals.addClassification(instance.getClassification(), instance.getWeight()); } return Pair.with(totals, result); }</code><technical_language>This loop is duplicated, factored out</technical_language>

Target:
public static Pair<ClassificationCounter, Map<Serializable, ClassificationCounter>> countAllByAttributeValues( final Iterable<? extends AbstractInstance> instances, final String attribute, String splitAttribute, Serializable splitAttributeValue) { final Map<Serializable, ClassificationCounter> result = Maps.newHashMap(); final ClassificationCounter totals = new ClassificationCounter(); for (final AbstractInstance instance : instances) { final Serializable attrVal = instance.getAttributes().get(attribute); ClassificationCounter cc = null; boolean acceptableMissingValue = attrVal ==null && isAnAcceptableMissingValue(instance, splitAttribute, splitAttributeValue); if (attrVal!=null) cc = result.get(attrVal); else if (acceptableMissingValue) cc = result.get(MISSING_VALUE); else continue; if (cc == null) { cc = new ClassificationCounter(); Serializable newKey = (attrVal != null) ? attrVal : MISSING_VALUE; result.put(newKey, cc); } cc.addClassification(instance.getClassification(), instance.getWeight()); totals.addClassification(instance.getClassification(), instance.getWeight()); } return Pair.with(totals, result); }
Source:
<code>public CharSeq padTo(int length, Character element) { final StringBuilder sb = new StringBuilder(back); <START> for (int i = 0; i < length; i++) { <END> sb.append(element); } return new CharSeq(sb.toString()); }</code><technical_language>is i < length - back.length()? "12345".padTo(10, 'a') 12345aaaaa</technical_language>

Target:
public CharSeq padTo(int length, Character element) { if(length <= back.length()) { return this; } final StringBuilder sb = new StringBuilder(back); final int limit = length - back.length(); for (int i = 0; i < limit; i++) { sb.append(element); } return new CharSeq(sb.toString()); }
Source:
<code>public Tagger createDefaultTagger() { WeakReference<EnglishTagger> ref = cachedTagger; EnglishTagger tagger = ref == null ? null : ref.get(); if (tagger == null) { <START> cachedTagger = new WeakReference<>(tagger = new EnglishTagger()); <END> } return tagger; }</code><technical_language>split lines? I a bit uncommon a assignment this</technical_language>

Target:
public Tagger createDefaultTagger() { WeakReference<EnglishTagger> ref = cachedTagger; EnglishTagger tagger = ref == null ? null : ref.get(); if (tagger == null) { tagger = new EnglishTagger(); cachedTagger = new WeakReference<>(tagger); } return tagger; }
Source:
<code>public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException { MCMaterial i = StaticLayer.GetConvertor().getMaterial(Static.getInt32(args[0], t)); CArray ret = new CArray(t); ret.set("maxstacksize", new CInt(i.getMaxStackSize(), t), t); ret.set("maxdurability", new CInt(i.getMaxDurability(), t), t); ret.set("hasgravity", new CBoolean(i.hasGravity(), t), t); ret.set("isblock", new CBoolean(i.isBlock(), t), t); ret.set("isburnable", new CBoolean(i.isBurnable(), t), t); ret.set("isedible", new CBoolean(i.isEdible(), t), t); ret.set("isflammable", new CBoolean(i.isFlammable(), t), t); ret.set("isoccluding", new CBoolean(i.isOccluding(), t), t); ret.set("isrecord", new CBoolean(i.isRecord(), t), t); ret.set("issolid", new CBoolean(i.isSolid(), t), t); ret.set("istransparent", new CBoolean(i.isTransparent(), t), t); <START> return ret; <END> }</code><technical_language>I ok this formatting. talk this IRC</technical_language>

Target:
public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException { MCMaterial i = StaticLayer.GetConvertor().getMaterial(Static.getInt32(args[0], t)); CArray ret = new CArray(t); ret.set("maxStacksize", new CInt(i.getMaxStackSize(), t), t); ret.set("maxDurability", new CInt(i.getMaxDurability(), t), t); ret.set("hasGravity", new CBoolean(i.hasGravity(), t), t); ret.set("isBlock", new CBoolean(i.isBlock(), t), t); ret.set("isBurnable", new CBoolean(i.isBurnable(), t), t); ret.set("isEdible", new CBoolean(i.isEdible(), t), t); ret.set("isFlammable", new CBoolean(i.isFlammable(), t), t); ret.set("isOccluding", new CBoolean(i.isOccluding(), t), t); ret.set("isRecord", new CBoolean(i.isRecord(), t), t); ret.set("isSolid", new CBoolean(i.isSolid(), t), t); ret.set("isTransparent", new CBoolean(i.isTransparent(), t), t); return ret; }
Source:
<code>public ExceptionAwareTransactionMethod(InvocationContext context) { <START> super(); <END> this.context = context; }</code><technical_language>needed</technical_language>

Target:
public ExceptionAwareTransactionMethod(InvocationContext context) { this.context = context; }
Source:
<code>public static void waitTillInstanceReachState(ColoHelper cluster, Entity entity, String instanceTime, CoordinatorAction.Status expectedStatus, Frequency frequency, int totalMinutesToWait) throws URISyntaxException, AuthenticationException, InterruptedException, IOException { String entityName = entity.getName(); EntityType type = entity.getEntityType(); String endTime=getNextInstanceTime(instanceTime, frequency); String params = "?start=" + instanceTime + "&end=" + endTime; int maxTries = 50; int totalSleepTime = totalMinutesToWait * 60; int sleepTime = totalSleepTime / maxTries; LOGGER.info(String.format("Sleep for %d seconds", sleepTime)); for (int i = 0; i < maxTries; i++) { InstancesResult statusResult = cluster.getProcessHelper().getProcessInstanceStatus(entityName, params); if (statusResult.getInstances() != null) { if (statusResult.getInstances()[0].getStatus().name().equals(expectedStatus.toString())) { return; } } LOGGER.info(type + " " + entityName + " still doesn't have expected status"); <START> TimeUtil.sleepSeconds(5); <END> } Assert.fail("expected state of instance was never reached"); }</code><technical_language>TimeUtil.sleepSeconds(5) ?? I intended TimeUtil.sleepSeconds(sleepTime) ?</technical_language>

Target:
public static void waitTillInstanceReachState(ColoHelper cluster, Entity entity, String instanceTime, CoordinatorAction.Status expectedStatus, Frequency frequency, int totalMinutesToWait) throws URISyntaxException, AuthenticationException, InterruptedException, IOException { String entityName = entity.getName(); EntityType type = entity.getEntityType(); String endTime=getNextInstanceTime(instanceTime, frequency); String params = "?start=" + instanceTime + "&end=" + endTime; int totalSleepTime = totalMinutesToWait * 60; int sleepTime = 10; for (int i = 0; i < totalSleepTime; i = i+sleepTime) { InstancesResult statusResult = cluster.getProcessHelper().getProcessInstanceStatus(entityName, params); if (statusResult.getInstances() != null) { if (statusResult.getInstances()[0].getStatus().name() == expectedStatus.name()) { return; } } LOGGER.info(type + " " + entityName + " still doesn't have expected status"); TimeUtil.sleepSeconds(sleepTime); } Assert.fail("expected state of instance was never reached"); }
Source:
<code>public boolean processMessage(Message message) { switch (message.what) { case CMD_RECEIVE_CHILD_REQUEST: handleRequestIkeMessage( (IkeMessage) message.obj, message.arg1 , null ); return HANDLED; case CMD_SEND_CHILD_MESSAGE: throw new UnsupportedOperationException("Cannot handle it"); case CMD_CHILD_PROCEDURE_FINISH: ChildSessionSmCallback childCb = <START> (ChildSessionSmCallback) message.obj; <END> if (mChildInLocalProcedure != null && mChildInLocalProcedure.isMyCallback(childCb)) { mChildInLocalProcedure = null; } if (mChildInRemoteProcedure != null && mChildInRemoteProcedure.isMyCallback(childCb)) { mChildInRemoteProcedure = null; } if (mChildInLocalProcedure == null && mChildInRemoteProcedure == null) { transitionTo(mIdle); } return HANDLED; case CMD_HANDLE_FIRST_CHILD_NEGOTIATION: FirstChildNegotiationData childData = (FirstChildNegotiationData) message.obj; mChildInLocalProcedure = buildChildSession(childData.childSessionOptions); mChildInLocalProcedure.handleFirstChildExchange( childData.reqPayloads, childData.respPayloads); return HANDLED; case CMD_LOCAL_REQUEST_CREATE_CHILD: throw new UnsupportedOperationException("Cannot handle it"); default: return NOT_HANDLED; } }</code><technical_language>a strange if want is figure out Procedure message is interrogate callback pointer. Alternatives be: 1) finished procedure post a reference 2) hold a reference procedure in callback instance</technical_language>

Target:
public boolean processMessage(Message message) { switch (message.what) { case CMD_RECEIVE_CHILD_REQUEST: handleRequestIkeMessage( (IkeMessage) message.obj, message.arg1 , null ); return HANDLED; case CMD_SEND_CHILD_MESSAGE: throw new UnsupportedOperationException("Cannot handle it"); case CMD_CHILD_PROCEDURE_FINISH: ChildSessionStateMachine childSession = (ChildSessionStateMachine) message.obj; if (mChildInLocalProcedure == childSession) { mChildInLocalProcedure = null; } if (mChildInRemoteProcedure == childSession) { mChildInRemoteProcedure = null; } if (mChildInLocalProcedure == null && mChildInRemoteProcedure == null) { transitionTo(mIdle); } return HANDLED; case CMD_HANDLE_FIRST_CHILD_NEGOTIATION: FirstChildNegotiationData childData = (FirstChildNegotiationData) message.obj; mChildInLocalProcedure = buildChildSession(childData.childSessionOptions); mChildInLocalProcedure.handleFirstChildExchange( childData.reqPayloads, childData.respPayloads); return HANDLED; case CMD_LOCAL_REQUEST_CREATE_CHILD: throw new UnsupportedOperationException("Cannot handle it"); default: return NOT_HANDLED; } }
Source:
<code>protected void doExecute() throws Exception { if (skip) { return; } runMojo("org.apache.maven.plugins", "maven-compiler-plugin", "compile"); runMojo("org.apache.maven.plugins", "maven-resources-plugin", "resources"); if(!looseApplication) { runMojo("org.apache.maven.plugins", "maven-war-plugin", "war"); } runLibertyMojoCreate(); runLibertyMojoInstallFeature(null); <START> runLibertyMojoDeploy(); <END> ServerTask serverTask = initializeJava(); copyConfigFiles(); serverTask.setUseEmbeddedServer(embedded); serverTask.setClean(clean); serverTask.setOperation("run"); serverTask.execute(); }</code><technical_language>pass false call runLibertyMojoDeploy</technical_language>

Target:
protected void doExecute() throws Exception { if (skip) { return; } runMojo("org.apache.maven.plugins", "maven-compiler-plugin", "compile"); runMojo("org.apache.maven.plugins", "maven-resources-plugin", "resources"); if(!looseApplication) { runMojo("org.apache.maven.plugins", "maven-war-plugin", "war"); } runLibertyMojoCreate(); runLibertyMojoInstallFeature(null); runLibertyMojoDeploy(false); ServerTask serverTask = initializeJava(); copyConfigFiles(); serverTask.setUseEmbeddedServer(embedded); serverTask.setClean(clean); serverTask.setOperation("run"); serverTask.execute(); }
Source:
<code>public void test_MergingUpdater_updated() throws IOException, RDFParseException, RDFHandlerException { final AbstractTripleStore store = getStore(); try { final String originalResource = "data-original.ttl"; final MergingUpdater original = doMergingUpdate(store, originalResource); long originalStatementsCount = original.getInserted(); final String updatedResource = "data-updated.ttl"; final MergingUpdater reapplied = doMergingUpdate(store, updatedResource); assertEquals(originalStatementsCount - 17, reapplied.getCollectedToDelete()); assertEquals(originalStatementsCount, reapplied.getCollectedToInsert()); assertEquals(originalStatementsCount - 21, reapplied.getSkippedInserts()); assertEquals(originalStatementsCount - 21, reapplied.getSkippedRemovals()); <START> assertEquals(4, reapplied.getRemoved()); <END> assertEquals(4, reapplied.getInserted()); assertEquals(4, reapplied.getInsertModified()); assertEquals(originalStatementsCount - 4, reapplied.getInsertsSaved()); assertEquals(0L, reapplied.getRefsAndValuesRemoved()); } finally { store.__tearDownUnitTest(); } }</code><technical_language>test presence absence of triples want insert/delete counts reported updater</technical_language>

Target:
public void test_MergingUpdater_updated() throws IOException, RDFParseException, RDFHandlerException { final AbstractTripleStore store = getStore(); try { final String originalResource = "data-original.ttl"; final MergingUpdaterResult original = doMergingUpdate(store, originalResource); long originalStatementsCount = original.inserted; final String updatedResource = "data-updated.ttl"; final MergingUpdaterResult reapplied = doMergingUpdate(store, updatedResource); assertEquals(originalStatementsCount - 17, reapplied.collectedToDelete); assertEquals(originalStatementsCount, reapplied.collectedToInsert); assertEquals(originalStatementsCount - 21, reapplied.skippedInserts); assertEquals(originalStatementsCount - 21, reapplied.skippedRemovals); assertEquals(4, reapplied.removed); assertEquals(4, reapplied.inserted); assertEquals(4, reapplied.insertModified); assertEquals(originalStatementsCount - 4, reapplied.insertsSaved); assertEquals(0L, reapplied.refsAndValuesRemoved); } finally { store.__tearDownUnitTest(); } }
Source:
<code>public boolean hasLabel( int label ) { if ( hasChanges() ) { TransactionState txState = read.txState(); if ( txState.nodeStateLabelDiffSets( getId() ).getAdded().contains( label ) ) { return true; } } <START> <END> long[] longs = NodeLabelsField.get( this, labelCursor() ); for ( long labelToken : longs ) { if ( labelToken == label ) { return true; } } return false; }</code><technical_language>pretty check label is removed here</technical_language>

Target:
public boolean hasLabel( int label ) { if ( hasChanges() ) { TransactionState txState = read.txState(); ReadableDiffSets<Integer> diffSets = txState.nodeStateLabelDiffSets( getId() ); if ( diffSets.getAdded().contains( label ) ) { return true; } if ( diffSets.getRemoved().contains( label ) ) { return false; } } long[] longs = NodeLabelsField.get( this, labelCursor() ); for ( long labelToken : longs ) { if ( labelToken == label ) { assert (int) labelToken == labelToken : "value too big to be represented as and int"; return true; } } return false; }
Source:
<code>public StorageTraversal resolveLocalModel(IResource start, IProgressMonitor monitor) throws InterruptedException { if (!(start instanceof IFile)) { return new StorageTraversal(new LinkedHashSet<IStorage>()); } ThreadSafeProgressMonitor subMonitor = new ThreadSafeProgressMonitor(SubMonitor.convert(monitor, 100)); <START> createThreadPools(); <END> lock.lockInterruptibly(); try { while (!currentlyResolving.isEmpty()) { notResolving.await(); } resolvedResources = new LinkedHashSet<URI>(); diagnostic = new BasicDiagnostic(EMFCompareIDEUIPlugin.PLUGIN_ID, 0, null, new Object[0]); if (getResolutionScope() != CrossReferenceResolutionScope.SELF) { final SynchronizedResourceSet resourceSet = new SynchronizedResourceSet(); updateDependencies(resourceSet, (IFile)start, subMonitor); updateChangedResources(resourceSet, subMonitor); } while (!currentlyResolving.isEmpty()) { resolutionEnd.await(); } final Set<IStorage> traversalSet = resolveTraversal((IFile)start, Collections.<URI> emptySet()); StorageTraversal traversal = new StorageTraversal(traversalSet, diagnostic); return traversal; } finally { diagnostic = null; resolvedResources = null; notResolving.signal(); lock.unlock(); shutdownThreadPools(); subMonitor.setWorkRemaining(0); } }</code><technical_language>This done whitin locked block, received sigal "notResolving". a new thread dispose of pools. for calls createThreadPools</technical_language>

Target:
public StorageTraversal resolveLocalModel(IResource start, IProgressMonitor monitor) throws InterruptedException { if (!(start instanceof IFile)) { return new StorageTraversal(new LinkedHashSet<IStorage>()); } ThreadSafeProgressMonitor subMonitor = null; lock.lockInterruptibly(); try { subMonitor = new ThreadSafeProgressMonitor(SubMonitor.convert(monitor, 100)); createThreadPools(); while (!currentlyResolving.isEmpty()) { notResolving.await(); } resolvedResources = new LinkedHashSet<URI>(); diagnostic = new BasicDiagnostic(EMFCompareIDEUIPlugin.PLUGIN_ID, 0, null, new Object[0]); if (getResolutionScope() != CrossReferenceResolutionScope.SELF) { final SynchronizedResourceSet resourceSet = new SynchronizedResourceSet(); updateDependencies(resourceSet, (IFile)start, subMonitor); updateChangedResources(resourceSet, subMonitor); } while (!currentlyResolving.isEmpty()) { resolutionEnd.await(); } final Set<IStorage> traversalSet = resolveTraversal((IFile)start, Collections.<URI> emptySet()); StorageTraversal traversal = new StorageTraversal(traversalSet, diagnostic); return traversal; } finally { diagnostic = null; resolvedResources = null; notResolving.signal(); lock.unlock(); shutdownThreadPools(); if (subMonitor != null) { subMonitor.setWorkRemaining(0); } } }
Source:
<code><START> private Project fetchProjectByName(Connection connection, String name) <END> throws ProjectManagerException { QueryRunner runner = new QueryRunner(); Project project = null; ProjectResultHandler handler = new ProjectResultHandler(); try { List<Project> projects = runner.query(connection, ProjectResultHandler.SELECT_PROJECT_BY_NAME, handler, name); if (projects.isEmpty()) { throw new ProjectManagerException( "No active project with name " + name + " exists in db."); } project = projects.get(0); } catch (SQLException e) { logger.error(ProjectResultHandler.SELECT_PROJECT_BY_NAME + " failed."); throw new ProjectManagerException( "Query for existing project failed. Project " + name, e); } List<Triple<String, Boolean, Permission>> permissions = fetchPermissionsForProject(connection, project); for (Triple<String, Boolean, Permission> perm : permissions) { if (perm.getThird().toFlags() != 0) { if (perm.getSecond()) { project .setGroupPermission(perm.getFirst(), perm.getThird()); } else { project.setUserPermission(perm.getFirst(), perm.getThird()); } } } return project; }</code><technical_language>I surprised a method this already</technical_language>

Target:
private Project fetchProjectByName(Connection connection, String name) throws ProjectManagerException { QueryRunner runner = new QueryRunner(); Project project = null; ProjectResultHandler handler = new ProjectResultHandler(); try { List<Project> projects = runner.query(connection, ProjectResultHandler.SELECT_PROJECT_BY_NAME, handler, name); if (projects.isEmpty()) { throw new ProjectManagerException( "No project with name " + name + " exists in db."); } project = projects.get(0); } catch (SQLException e) { logger.error(ProjectResultHandler.SELECT_PROJECT_BY_NAME + " failed."); throw new ProjectManagerException( "Query for existing project failed. Project " + name, e); } List<Triple<String, Boolean, Permission>> permissions = fetchPermissionsForProject(connection, project); for (Triple<String, Boolean, Permission> perm : permissions) { if (perm.getThird().toFlags() != 0) { if (perm.getSecond()) { project .setGroupPermission(perm.getFirst(), perm.getThird()); } else { project.setUserPermission(perm.getFirst(), perm.getThird()); } } } return project; }
Source:
<code>public void performSingleTenantMultipleUserQueueTestCase() { int sendMessageCount = 200; int runTime = 40; int expectedMessageCount = 200; AndesClient adminReceivingClient = new AndesClient("receive", "127.0.0.1:5672", "queue:topictenant1.com/tenantTopic", "100", "false", Integer.toString(runTime), Integer.toString(expectedMessageCount), "1", "listener=true,ackMode=1,delayBetweenMsg=0,stopAfter=" + expectedMessageCount, "", "admin!topictenant1.com", "admin"); adminReceivingClient.startWorking(); AndesClient tenant1SendingClient = new AndesClient("send", "127.0.0.1:5672", "queue:topictenant1.com/tenantTopic", "100", "false", Integer.toString(runTime), Integer.toString(sendMessageCount), "1", "ackMode=1,delayBetweenMsg=0,stopAfter=" + sendMessageCount, "", "topictenantuser1!topictenant1.com", "topictenantuser1"); tenant1SendingClient.startWorking(); boolean adminReceiveSuccess = AndesClientUtils.waitUntilMessagesAreReceived(adminReceivingClient, expectedMessageCount, runTime); boolean tenant1SendSuccess = AndesClientUtils.getIfSenderIsSuccess(tenant1SendingClient, sendMessageCount); Assert.assertTrue(tenant1SendSuccess, "Sending failed for tenant 1 user 1."); Assert.assertEquals(expectedMessageCount, adminReceivingClient.getReceivedTopicMessagecount()); <START> Assert.assertTrue(adminReceiveSuccess, "Message receiving failed for admin of tenant 1."); <END> }</code><technical_language>print received message count</technical_language>

Target:
public void performSingleTenantMultipleUserQueueTestCase() { int sendMessageCount = 200; int runTime = 40; int expectedMessageCount = 200; AndesClient adminReceivingClient = new AndesClient("receive", "127.0.0.1:5672", "queue:topictenant1.com/tenantTopic", "100", "false", Integer.toString(runTime), Integer.toString(expectedMessageCount), "1", "listener=true,ackMode=1,delayBetweenMsg=0,stopAfter=" + expectedMessageCount, "", "admin!topictenant1.com", "admin"); adminReceivingClient.startWorking(); AndesClient tenant1SendingClient = new AndesClient("send", "127.0.0.1:5672", "queue:topictenant1.com/tenantTopic", "100", "false", Integer.toString(runTime), Integer.toString(sendMessageCount), "1", "ackMode=1,delayBetweenMsg=0,stopAfter=" + sendMessageCount, "", "topictenantuser1!topictenant1.com", "topictenantuser1"); tenant1SendingClient.startWorking(); boolean adminReceiveSuccess = AndesClientUtils.waitUntilMessagesAreReceived(adminReceivingClient, expectedMessageCount, runTime); boolean tenant1SendSuccess = AndesClientUtils.getIfSenderIsSuccess(tenant1SendingClient, sendMessageCount); Assert.assertTrue(tenant1SendSuccess, "Sending failed for tenant 1 user 1."); Assert.assertEquals(adminReceivingClient.getReceivedqueueMessagecount(),expectedMessageCount); Assert.assertTrue(adminReceiveSuccess, "Message receiving failed for admin of tenant 1. Received message count : " + adminReceivingClient.getReceivedqueueMessagecount()); }
Source:
<code>public int getToolTipDisplayDelayTime(Object object_p) { <START> return 100; <END> }</code><technical_language>this refer a platform-relative constant</technical_language>

Target:
public int getToolTipDisplayDelayTime(Object object_p) { return TOOLTIP_DISPLAY_DELAY_TIME; }
Source:
<code>private String initializeServerInstance(String id) { try { LOG.debug("Initializing of a language server instance for server '{}': started", id); synchronized (idRegistry.get(id)) { if (serverCapabilitiesRegistry.contains(id)) { LOG.debug("Already initialized"); return id; } LanguageServer languageServer = languageServerRegistry.get(id); InitializeParams initializeParams = initializeParamsProvider.get(id); <START> InitializeResult initializeResult = <END> languageServer.initialize(initializeParams).get(5, SECONDS); LanguageServerInitializedEvent event = new LanguageServerInitializedEvent(id, languageServer); eventService.publish(event); LOG.debug("Published a corresponding event: {}", event); LOG.debug("Initializing of a language server instance for server '{}': finished", id); LOG.info("Initialized language server '{}'", id); return serverCapabilitiesRegistry.add(id, initializeResult.getCapabilities()); } } catch (LanguageServerException | InterruptedException | ExecutionException | TimeoutException e) { LOG.error("Can't initialize language server for '{}'", id, e); } return null; }</code><technical_language>timeout is short for jdt.ls</technical_language>

Target:
private String initializeServerInstance(String id) { try { LOG.debug("Initializing of a language server instance for server '{}': started", id); synchronized (idRegistry.get(id)) { if (serverCapabilitiesRegistry.contains(id)) { LOG.debug("Already initialized"); return id; } LanguageServer languageServer = languageServerRegistry.get(id); InitializeParams initializeParams = initializeParamsProvider.get(id); InitializeResult initializeResult = languageServer.initialize(initializeParams).get(30, SECONDS); LanguageServerInitializedEvent event = new LanguageServerInitializedEvent(id, languageServer); eventService.publish(event); LOG.debug("Published a corresponding event: {}", event); LOG.debug("Initializing of a language server instance for server '{}': finished", id); LOG.info("Initialized language server '{}'", id); return serverCapabilitiesRegistry.add(id, initializeResult.getCapabilities()); } } catch (LanguageServerException | InterruptedException | ExecutionException | TimeoutException e) { LOG.error("Can't initialize language server for '{}'", id, e); } return null; }
Source:
<code>public void startArrayOrObjects(int count) { if (valueSeq != null && !this.arrayCounters.isEmpty()) { boolean addCounter = levelArray - count < this.keysOrMembers.size() ? this.keysOrMembers.get(levelArray - count) : true; if (itemStack.get(itemStack.size() - 1) == itemType.ARRAY) { if (addCounter) { this.arrayCounters.set(levelArray - count, this.arrayCounters.get(levelArray - count) + 1); this.allKeys.add(this.toBytes(this.arrayCounters.get(levelArray - count))); } else { <START> Byte[] bool = { (byte) 0x2B, 0x01 }; <END> this.allKeys.add(bool); } } } if (count == 2 && valueSeq != null) { this.arrayCounters.add(Integer.valueOf(0)); } }</code><technical_language>Instead of hard coding bytes XDMConstants.BOOLEAN_TRUE_CONSTANT</technical_language>

Target:
public void startArrayOrObjects(int count) { if (valueSeq != null && !this.arrayCounters.isEmpty()) { boolean addCounter = levelArray - count < this.keysOrMembers.size() ? this.keysOrMembers.get(levelArray - count) : true; if (itemStack.get(itemStack.size() - 1) == itemType.ARRAY) { if (addCounter) { this.arrayCounters.set(levelArray - count, this.arrayCounters.get(levelArray - count) + 1); this.allKeys.add(this.toBytes(this.arrayCounters.get(levelArray - count))); } else { XDMConstants.setTrue(bp); this.allKeys.add(ArrayUtils.toObject(bp.getByteArray())); } } } if (count == 2 && valueSeq != null) { this.arrayCounters.add(Integer.valueOf(0)); } }
Source:
<code>private static Map<String, String> buildSimpleReplacements(Set<DativePluralsEntry> datives) { Map<String, String> out = new HashMap<>(); for(DativePluralsEntry entry : datives) { out.put(entry.getForm(), entry.getStandard()); <START> String lenited_form = Utils.lenite(entry.getForm()); <END> String lenited_repl = Utils.lenite(entry.getStandard()); if(!lenited_form.equals(entry.getForm())) { out.put(lenited_form, lenited_repl); } String eclipsed_form = Utils.eclipse(entry.getForm()); String eclipsed_repl = Utils.eclipse(entry.getStandard()); if(!eclipsed_form.equals(entry.getForm())) { out.put(eclipsed_form, eclipsed_repl); } if(Utils.isVowel(entry.getForm().charAt(0))) { out.put("h" + entry.getForm(), "h" + entry.getStandard()); out.put("h-" + entry.getForm(), "h" + entry.getStandard()); } if(entry.hasModernised()) { out.put(entry.getModern(), entry.getStandard()); lenited_form = Utils.lenite(entry.getModern()); lenited_repl = Utils.lenite(entry.getStandard()); if(!lenited_form.equals(entry.getModern())) { out.put(lenited_form, lenited_repl); } eclipsed_form = Utils.eclipse(entry.getModern()); eclipsed_repl = Utils.eclipse(entry.getStandard()); if(!eclipsed_form.equals(entry.getModern())) { out.put(eclipsed_form, eclipsed_repl); } if(Utils.isVowel(entry.getModern().charAt(0))) { out.put("h" + entry.getModern(), "h" + entry.getStandard()); out.put("h-" + entry.getModern(), "h" + entry.getStandard()); } } } return out; }</code><technical_language>camelCase instead of underscores for variable names? a convention helps a more coherent source code</technical_language>

Target:
private static Map<String, String> buildSimpleReplacements(Set<DativePluralsEntry> datives) { Map<String, String> out = new HashMap<>(); for(DativePluralsEntry entry : datives) { out.put(entry.getForm(), entry.getStandard()); String lenitedForm = Utils.lenite(entry.getForm()); String lenitedRepl = Utils.lenite(entry.getStandard()); if(!lenitedForm.equals(entry.getForm())) { out.put(lenitedForm, lenitedRepl); } String eclipsedForm = Utils.eclipse(entry.getForm()); String eclipsedRepl = Utils.eclipse(entry.getStandard()); if(!eclipsedForm.equals(entry.getForm())) { out.put(eclipsedForm, eclipsedRepl); } if(Utils.isVowel(entry.getForm().charAt(0))) { out.put("h" + entry.getForm(), "h" + entry.getStandard()); out.put("h-" + entry.getForm(), "h" + entry.getStandard()); } if(entry.hasModernised()) { out.put(entry.getModern(), entry.getStandard()); lenitedForm = Utils.lenite(entry.getModern()); lenitedRepl = Utils.lenite(entry.getStandard()); if(!lenitedForm.equals(entry.getModern())) { out.put(lenitedForm, lenitedRepl); } eclipsedForm = Utils.eclipse(entry.getModern()); eclipsedRepl = Utils.eclipse(entry.getStandard()); if(!eclipsedForm.equals(entry.getModern())) { out.put(eclipsedForm, eclipsedRepl); } if(Utils.isVowel(entry.getModern().charAt(0))) { out.put("h" + entry.getModern(), "h" + entry.getStandard()); out.put("h-" + entry.getModern(), "h" + entry.getStandard()); } } } return out; }
Source:
<code>public void testNonStandardPort() throws Exception { redis = app.createAndManageChild(EntitySpec.create(RedisStore.class) .configure(RedisStore.REDIS_PORT, PortRanges.fromString("10000+"))); app.start(ImmutableList.of(loc)); EntityTestUtils.assertAttributeEqualsEventually(redis, Startable.SERVICE_UP, true); JedisSupport support = new JedisSupport(redis); support.redisTest(); EntityTestUtils.assertPredicateEventuallyTrue(redis, new Predicate<RedisStore>() { @Override public boolean apply(@Nullable RedisStore input) { <START> return input != null && input.getAttribute(RedisStore.UPTIME) > 0; <END> } }); }</code><technical_language>Is worth checking other attributes >= 0? if if field names change in output of redis-cli it</technical_language>

Target:
public void testNonStandardPort() throws Exception { redis = app.createAndManageChild(EntitySpec.create(RedisStore.class) .configure(RedisStore.REDIS_PORT, PortRanges.fromString("10000+"))); app.start(ImmutableList.of(loc)); EntityTestUtils.assertAttributeEqualsEventually(redis, Startable.SERVICE_UP, true); JedisSupport support = new JedisSupport(redis); support.redisTest(); EntityTestUtils.assertPredicateEventuallyTrue(redis, new Predicate<RedisStore>() { @Override public boolean apply(@Nullable RedisStore input) { return input != null && input.getAttribute(RedisStore.UPTIME) > 0 && input.getAttribute(RedisStore.TOTAL_COMMANDS_PROCESSED) >= 0 && input.getAttribute(RedisStore.TOTAL_CONNECTIONS_RECEIVED) >= 0 && input.getAttribute(RedisStore.EXPIRED_KEYS) >= 0 && input.getAttribute(RedisStore.EVICTED_KEYS) >= 0 && input.getAttribute(RedisStore.KEYSPACE_HITS) >= 0 && input.getAttribute(RedisStore.KEYSPACE_MISSES) >= 0; } }); }
Source:
<code>public Boolean getspacingCompliesPDFA() { <START> logger.warn("Current feature not supported yet. Result is always true."); <END> return true; }</code><technical_language>This implemented</technical_language>

Target:
public Boolean getspacingCompliesPDFA() { return ((COSStream) baseObject).getEndStreamSpacingsComplyPDFA() == null && ((COSStream) baseObject).getStreamSpacingsComplyPDFA() == null; }
Source:
<code>public List<User> call(ApiCaller ac, Deserializer parms) throws PerunException { if(parms.contains("role")) { String roleName = parms.readString("role"); if (roleName == null) { <START> throw new RpcException(RpcException.Type.WRONG_PARAMETER, "wrong parameter in role, cannot be null."); <END> } else { roleName = roleName.toUpperCase(); } return ac.getVosManager().getAdmins(ac.getSession(), ac.getVoById(parms.readInt("vo")), roleName, parms.readBoolean("onlyDirectAdmins")); } else { return ac.getVosManager().getAdmins(ac.getSession(), ac.getVoById(parms.readInt("vo"))); } }</code><technical_language>please fix occurrences of this exception message</technical_language>

Target:
public List<Vo> call(ApiCaller ac, Deserializer parms) throws PerunException { return ac.getVosManager().getVos(ac.getSession()); }
Source:
<code>protected final void execute() { getReturnValue().setCanDoAction(true); getReturnValue().setIsSyncronious(true); <START> getParameters().setTaskStartTime(System.currentTimeMillis()); <END> ExecutionHandler.addStep(getExecutionContext(), StepEnum.EXECUTING, null); try { handleTransactivity(); TransactionSupport.executeInScope(scope, this); } catch (TransactionRolledbackLocalException e) { log.infoFormat("Transaction was aborted in {0}", this.getClass().getName()); compensate(); } finally { try { freeLock(); if (getCommandShouldBeLogged()) { logCommand(); } if (getSucceeded()) { startPollingAsyncTasks(); } } finally { if (!hasTasks() && !ExecutionHandler.checkIfJobHasTasks(getExecutionContext())) { ExecutionHandler.endJob(getExecutionContext(), getSucceeded()); } } } }</code><technical_language>patch work merge, :(</technical_language>

Target:
protected final void execute() { getReturnValue().setCanDoAction(true); getReturnValue().setIsSyncronious(true); ExecutionHandler.addStep(getExecutionContext(), StepEnum.EXECUTING, null); try { handleTransactivity(); TransactionSupport.executeInScope(scope, this); } catch (TransactionRolledbackLocalException e) { log.infoFormat("Transaction was aborted in {0}", this.getClass().getName()); compensate(); } finally { try { freeLock(); if (getCommandShouldBeLogged()) { logCommand(); } if (getSucceeded()) { startPollingAsyncTasks(); } } finally { if (!hasTasks() && !ExecutionHandler.checkIfJobHasTasks(getExecutionContext())) { ExecutionHandler.endJob(getExecutionContext(), getSucceeded()); } } } }
Source:
<code>public CompletionStage<?> applyState(Address sender, int topologyId, boolean pushTransfer, Collection<StateChunk> stateChunks) { expectLatch.countDown(); try { assertTrue(blockLatch.await(10, TimeUnit.SECONDS)); } catch (InterruptedException e) { throw new RuntimeException(e); } super.applyState(sender, topologyId, pushTransfer, stateChunks); <START> return null; <END> }</code><technical_language>this return of previous line</technical_language>

Target:
public CompletionStage<?> applyState(Address sender, int topologyId, boolean pushTransfer, Collection<StateChunk> stateChunks) { expectLatch.countDown(); try { assertTrue(blockLatch.await(10, TimeUnit.SECONDS)); } catch (InterruptedException e) { throw new RuntimeException(e); } return super.applyState(sender, topologyId, pushTransfer, stateChunks); }
Source:
<code>public Stream<PageInfo> getPages() throws IOException { try { byte[] confData = mDb.get(CONF_KEY); Cache.PRocksPageStoreOptions pOptions = mOptions.toProto(); if (confData != null) { Cache.PRocksPageStoreOptions persistedOptions = Cache.PRocksPageStoreOptions.parseFrom(confData); if (!persistedOptions.equals(pOptions)) { mDb.close(); throw new IOException("Inconsistent configuration for RocksPageStore"); } } mDb.put(CONF_KEY, pOptions.toByteArray()); <START> return Streams.stream(new PageIterator(mDb.newIterator())); <END> } catch (RocksDBException e) { mDb.close(); throw new IOException("Failed to restore RocksPageStore:", e); } }</code><technical_language>call close this stream, is a no-op</technical_language>

Target:
public Stream<PageInfo> getPages() { RocksIterator iter = mDb.newIterator(); iter.seekToFirst(); return Streams.stream(new PageIterator(iter)).onClose(iter::close); }
Source:
<code>public MaxwellKafkaProducer(MaxwellContext context, Properties kafkaProperties, String kafkaTopic) { super(context); this.topic = kafkaTopic; if ( this.topic == null ) { this.topic = "maxwell"; } this.setDefaults(kafkaProperties); this.kafka = new KafkaProducer<>(kafkaProperties, new StringSerializer(), new StringSerializer()); this.numPartitions = kafka.partitionsFor(topic).size(); String partitionParams = this.context.getConfig().kafkaPartitionHash + "|" + this.context.getConfig().kafkaPartitionKey; switch (partitionParams) { case "murmur3|database": this.partitioner = new Murmur3KafkaDatabasePartitioner(this.context.getConfig().murmur3Seed); break; case "murmur3|table": this.partitioner = new Murmur3KafkaTablePartitioner(this.context.getConfig().murmur3Seed); break; case "murmur3|primary_key": this.partitioner = new Murmur3KafkaPrimaryKeyPartitioner(this.context.getConfig().murmur3Seed); break; case "default|primary_key": this.partitioner = new MaxwellKafkaPrimaryKeyPartitioner(); break; case "default|table": this.partitioner = new MaxwellKafkaTablePartitioner(); break; <START> case "default|database": <END> default: this.partitioner = new MaxwellKafkaDatabasePartitioner(); break; } }</code><technical_language>simpler a single KafkaPartitioner class instantiated some options: this.partitioner = new MaxwellKafkaPartitioner(PARTITION_BY_DATABASE, HASH_MURMER3, murmer3SeedValue) separate responsibility 1. a group of classes choose a string for partitioning 2. a group of classes hashes string integer way, sense a dedicated class for string/hash function combination</technical_language>

Target:
public MaxwellKafkaProducer(MaxwellContext context, Properties kafkaProperties, String kafkaTopic) { super(context); this.topic = kafkaTopic; if ( this.topic == null ) { this.topic = "maxwell"; } this.setDefaults(kafkaProperties); this.kafka = new KafkaProducer<>(kafkaProperties, new StringSerializer(), new StringSerializer()); this.numPartitions = kafka.partitionsFor(topic).size(); String hash = context.getConfig().kafkaPartitionHash; String partitionKey = context.getConfig().kafkaPartitionKey; this.partitioner = new MaxwellKafkaPartitioner(hash, partitionKey); }