auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String[] profilesToActivate() { if (topicExpression != null) { return new String[] { TOPIC_EXPRESSION_PROFILE }; } else if (topic != null) { this.topicExpression = "'" + this.topic + "'"; return new String[] { TOPIC_EXPRESSION_PROFILE }; } else if (queueExpression != null) { return new String[] { QUEUE_EXPRESSION_PROFILE }; } <START> else if (queue != null) { <END> this.queueExpression = "'" + this.queue + "'"; return new String[] { QUEUE_EXPRESSION_PROFILE }; } else if (keyExpression != null) { return new String[] { STORE_EXPRESSION_PROFILE }; } else if (key != null) { this.keyExpression = "'" + this.key + "'"; return new String[] { STORE_EXPRESSION_PROFILE }; } return new String[] {}; }</code><technical_language>sure, profilesToActivate() late for foo(literal) => fooExpression conversion</technical_language>

Target:
public String[] profilesToActivate() { if (topicExpression != null) { return new String[] { TOPIC_EXPRESSION_PROFILE }; } else if (queueExpression != null) { return new String[] { QUEUE_EXPRESSION_PROFILE }; } else if (keyExpression != null) { return new String[] { STORE_EXPRESSION_PROFILE }; } return new String[] {}; }
Source:
<code>public void registerOperationsGroup(String name, Set<Operation> operations) { if (groupOperationsMap.containsKey(name)) { <START> return; <END> } for (Map.Entry<String, Set<Operation>> entry : groupOperationsMap.entrySet()) { for (Operation operation : operations) { if (entry.getValue().contains(operation)) { return; } } } groupOperationsMap.put(name, operations); for (Operation operation : operations) { ensure(operation.id); operationGroupMap.put(operation, name); } }</code><technical_language>original PR throwing exception for this case, reason changed that</technical_language>

Target:
public void registerOperationsGroup(String name, Set<Operation> operations) { if (groupOperationsMap.containsKey(name)) { throw new IllegalArgumentException("Group with name " + name + " already exists"); } for (Map.Entry<String, Set<Operation>> entry : groupOperationsMap.entrySet()) { for (Operation operation : operations) { if (entry.getValue().contains(operation)) { throw new IllegalArgumentException("Operation " + operation + " is already included in group " + entry.getKey()); } } } groupOperationsMap.put(name, operations); for (Operation operation : operations) { ensure(operation.id); operationGroupMap.put(operation, name); } }
Source:
<code>public Map<Errors, Integer> errorCounts() { <START> return errorCounts(data.topics().stream().flatMap(topicResult -> topicResult.partitions().stream()) <END> .map(partitionResult -> Errors.forCode(partitionResult.errorCode()))); }</code><technical_language>Is a reason map flatMap</technical_language>

Target:
public Map<Errors, Integer> errorCounts() { return errorCounts(data.topics().stream().flatMap(topicResult -> topicResult.partitions().stream().map(partitionResult -> Errors.forCode(partitionResult.errorCode())))); }
Source:
<code>private void setMerged(Change c, ChangeMessage msg) throws OrmException, IOException { logDebug("Setting change merged", c.getId()); ChangeUpdate update = null; PatchSetApproval submitter; PatchSet merged; try { db.changes().beginTransaction(c.getId()); CodeReviewCommit commit = commits.get(c.getId()); PatchSet.Id mergedId = commit.change().currentPatchSetId(); merged = db.patchSets().get(mergedId); c = setMergedPatchSet(c.getId(), mergedId); submitter = approvalsUtil.getSubmitter(db, commit.notes(), mergedId); ChangeControl control = commit.getControl(); update = updateFactory.create(control, c.getLastUpdatedOn()); if (msg != null) { cmUtil.addChangeMessage(db, update, msg); } db.commit(); } finally { db.rollback(); } sendMergedEmail(c, submitter); indexer.index(db, c); if (submitter != null) { try { hooks.doChangeMergedHook(c, accountCache.get(submitter.getAccountId()).getAccount(), merged, db); } catch (OrmException ex) { logError("Cannot run hook for submitted patch set " + c.getId(), ex); } } <START> update.commit(); <END> }</code><technical_language>this moved hooks? effectively new database update</technical_language>

Target:
private void setMerged(Change c, ChangeMessage msg) throws OrmException, IOException { logDebug("Setting change merged", c.getId()); ChangeUpdate update = null; PatchSetApproval submitter; PatchSet merged; try { db.changes().beginTransaction(c.getId()); CodeReviewCommit commit = commits.get(c.getId()); PatchSet.Id mergedId = commit.change().currentPatchSetId(); merged = db.patchSets().get(mergedId); c = setMergedPatchSet(c.getId(), mergedId); submitter = approvalsUtil.getSubmitter(db, commit.notes(), mergedId); ChangeControl control = commit.getControl(); update = updateFactory.create(control, c.getLastUpdatedOn()); if (msg != null) { cmUtil.addChangeMessage(db, update, msg); } db.commit(); } finally { db.rollback(); } update.commit(); sendMergedEmail(c, submitter); indexer.index(db, c); if (submitter != null) { try { hooks.doChangeMergedHook(c, accountCache.get(submitter.getAccountId()).getAccount(), merged, db); } catch (OrmException ex) { logError("Cannot run hook for submitted patch set " + c.getId(), ex); } } }
Source:
<code>public void setUp() throws Exception { directory = FileUtilities.createTemporaryDirectory("directory"); entries = new FileEntry[3]; entries[0] = new FileEntry("foo.c", "foo.c", 0, 112, null); entries[1] = new FileEntry("bar.h", "bar.h", Long.MAX_VALUE, 0, null); entries[2] = new FileEntry("subdir", "subdir/", 0, DIRECTORY_INTERNAL_SIZE, Arrays.asList( new FileEntry[]{ <START> new FileEntry("SCCS", "SCCS", 0, DIRECTORY_INTERNAL_SIZE, Arrays.asList( <END> new FileEntry[]{ new FileEntry("version", "version", 0, 312, null) }) )} )); for (FileEntry entry : entries) { entry.create(); } FileEntry hgtags = new FileEntry(".hgtags", ".hgtags", 0, 1, null); hgtags.create(); RuntimeEnvironment env = RuntimeEnvironment.getInstance(); RepositoryFactory.setIgnored(env); }</code><technical_language>this href argument trailing slash this is a directory</technical_language>

Target:
public void setUp() throws Exception { directory = FileUtilities.createTemporaryDirectory("directory"); entries = new FileEntry[3]; entries[0] = new FileEntry("foo.c", "foo.c", 0, 112); entries[1] = new FileEntry("bar.h", "bar.h", Long.MAX_VALUE, 0); entries[2] = new FileEntry("subdir", "subdir/", 0, Arrays.asList( new FileEntry[]{ new FileEntry("SCCS", "SCCS/", 0, Arrays.asList( new FileEntry[]{ new FileEntry("version", "version", 0, 312) }) )} )); for (FileEntry entry : entries) { entry.create(); } FileEntry hgtags = new FileEntry(".hgtags", ".hgtags", 0, 1); hgtags.create(); RuntimeEnvironment env = RuntimeEnvironment.getInstance(); RepositoryFactory.setIgnored(env); }
Source:
<code>DivXmlElementAccess(DivType div, Mets mets, Map<String, List<FileXmlElementAccess>> mediaUnitsMap, int parentOrder) { super(); super.setLabel(div.getLABEL()); for (Object mdSecType : div.getDMDID()) { super.getMetadata().addAll(readMetadata((MdSecType) mdSecType, MdSec.DMD_SEC)); } for (Object mdSecType : div.getADMID()) { super.getMetadata().addAll(readMetadata((MdSecType) mdSecType, amdSecTypeOf(mets, (MdSecType) mdSecType))); } metsReferrerId = div.getID(); BigInteger order = div.getORDER(); if (Objects.nonNull(order) && order.intValue() > 0) { <START> super.setOrder(order.intValue()); <END> } else if (parentOrder > 0) { super.setOrder(parentOrder); } else { super.setOrder(1); } super.setOrderlabel(div.getORDERLABEL()); for (DivType child : div.getDiv()) { super.getChildren().add(new DivXmlElementAccess(child, mets, mediaUnitsMap, super.getOrder())); } super.setType(div.getTYPE()); List<FileXmlElementAccess> fileXmlElementAccesses = mediaUnitsMap.get(div.getID()); if (Objects.nonNull(fileXmlElementAccesses)) { for (FileXmlElementAccess fileXmlElementAccess : fileXmlElementAccesses) { if (Objects.nonNull(fileXmlElementAccess) && !fileXmlElementAccessIsLinkedToChildren(fileXmlElementAccess, div.getDiv(), mediaUnitsMap)) { super.getViews().add(new AreaXmlElementAccess(fileXmlElementAccess).getView()); fileXmlElementAccess.getMediaUnit().getIncludedStructuralElements().add(this); } } } super.setLink(MptrXmlElementAccess.getLinkFromDiv(div)); }</code><technical_language>suggestion setOrder(order.intValue());</technical_language>

Target:
DivXmlElementAccess(DivType div, Mets mets, Map<String, List<FileXmlElementAccess>> mediaUnitsMap, int parentOrder) { super(); super.setLabel(div.getLABEL()); for (Object mdSecType : div.getDMDID()) { super.getMetadata().addAll(readMetadata((MdSecType) mdSecType, MdSec.DMD_SEC)); } for (Object mdSecType : div.getADMID()) { super.getMetadata().addAll(readMetadata((MdSecType) mdSecType, amdSecTypeOf(mets, (MdSecType) mdSecType))); } metsReferrerId = div.getID(); BigInteger order = div.getORDER(); if (Objects.nonNull(order) && order.intValue() > 0) { setOrder(order.intValue()); } else if (parentOrder > 0) { setOrder(parentOrder); } else { setOrder(1); } super.setOrderlabel(div.getORDERLABEL()); for (DivType child : div.getDiv()) { getChildren().add(new DivXmlElementAccess(child, mets, mediaUnitsMap, getOrder())); } super.setType(div.getTYPE()); List<FileXmlElementAccess> fileXmlElementAccesses = mediaUnitsMap.get(div.getID()); if (Objects.nonNull(fileXmlElementAccesses)) { for (FileXmlElementAccess fileXmlElementAccess : fileXmlElementAccesses) { if (Objects.nonNull(fileXmlElementAccess) && !fileXmlElementAccessIsLinkedToChildren(fileXmlElementAccess, div.getDiv(), mediaUnitsMap)) { super.getViews().add(new AreaXmlElementAccess(fileXmlElementAccess).getView()); fileXmlElementAccess.getMediaUnit().getIncludedStructuralElements().add(this); } } } super.setLink(MptrXmlElementAccess.getLinkFromDiv(div)); }
Source:
<code><START> public void testSuperIsSuper() throws Exception { <END> ZooKeeper zk = createClient(); try { zk.create("/digest_read", null, Arrays.asList(new ACL(Perms.READ, otherDigestUser)), CreateMode.PERSISTENT); zk.create("/digest_read/sub", null, Arrays.asList(new ACL(Perms.READ, otherDigestUser)), CreateMode.PERSISTENT); zk.create("/sasl_read", null, Arrays.asList(new ACL(Perms.READ, otherSaslUser)), CreateMode.PERSISTENT); zk.create("/sasl_read/sub", null, Arrays.asList(new ACL(Perms.READ, otherSaslUser)), CreateMode.PERSISTENT); zk.delete("/digest_read/sub", -1); zk.delete("/digest_read", -1); zk.delete("/sasl_read/sub", -1); zk.delete("/sasl_read", -1); Thread.sleep(1000); } finally { zk.close(); } }</code><technical_language>This test verify anything. put assert in a catch block auth error happen operations</technical_language>

Target:
public void testSuperIsSuper() throws Exception { ZooKeeper zk = createClient(); try { zk.create("/digest_read", null, Arrays.asList(new ACL(Perms.READ, otherDigestUser)), CreateMode.PERSISTENT); zk.create("/digest_read/sub", null, Arrays.asList(new ACL(Perms.READ, otherDigestUser)), CreateMode.PERSISTENT); zk.create("/sasl_read", null, Arrays.asList(new ACL(Perms.READ, otherSaslUser)), CreateMode.PERSISTENT); zk.create("/sasl_read/sub", null, Arrays.asList(new ACL(Perms.READ, otherSaslUser)), CreateMode.PERSISTENT); zk.delete("/digest_read/sub", -1); zk.delete("/digest_read", -1); zk.delete("/sasl_read/sub", -1); zk.delete("/sasl_read", -1); Assert.assertEquals(authFailed.get(), 0); } finally { zk.close(); } }
Source:
<code><R> List<R> cleanResults(List<?> functionResults) { List<R> results = new ArrayList<>(); for (Object functionResult : functionResults) { if (functionResult == null) { continue; } if (functionResult instanceof Throwable) { <START> logger.info("Error executing CacheRealizationFunction.", (Throwable) functionResult); <END> continue; } results.add((R) functionResult); } return results; }</code><technical_language>A warn level more info level for Throwable. Some more information in log user diagnose in case of error. e.g. Function name etc. I consider logging stack trace</technical_language>

Target:
<R> List<R> cleanResults(List<?> functionResults) { List<R> results = new ArrayList<>(); for (Object functionResult : functionResults) { if (functionResult == null) { continue; } if (functionResult instanceof Throwable) { logger.warn("Error executing CacheRealizationFunction.", (Throwable) functionResult); continue; } results.add((R) functionResult); } return results; }
Source:
<code>public void blobStoreHardDeleteTestBlobV2Mixed() throws MessageFormatException, IOException { short[] blobVersions = new short[5]; BlobType[] blobTypes = new BlobType[5]; blobVersions[0] = MessageFormatRecord.Blob_Version_V1; blobTypes[0] = BlobType.DataBlob; <START> blobVersions[0] = MessageFormatRecord.Blob_Version_V2; <END> blobTypes[0] = BlobType.MetadataBlob; blobVersions[0] = MessageFormatRecord.Blob_Version_V2; blobTypes[0] = BlobType.MetadataBlob; blobVersions[0] = MessageFormatRecord.Blob_Version_V2; blobTypes[0] = BlobType.MetadataBlob; blobVersions[0] = MessageFormatRecord.Blob_Version_V2; blobTypes[0] = BlobType.DataBlob; blobStoreHardDeleteTestUtil(blobVersions, blobTypes); blobVersions = new short[5]; blobTypes = new BlobType[5]; blobVersions[0] = MessageFormatRecord.Blob_Version_V1; blobTypes[0] = BlobType.DataBlob; blobVersions[0] = MessageFormatRecord.Blob_Version_V2; blobTypes[0] = BlobType.DataBlob; blobVersions[0] = MessageFormatRecord.Blob_Version_V2; blobTypes[0] = BlobType.MetadataBlob; blobVersions[0] = MessageFormatRecord.Blob_Version_V2; blobTypes[0] = BlobType.DataBlob; blobVersions[0] = MessageFormatRecord.Blob_Version_V2; blobTypes[0] = BlobType.MetadataBlob; blobStoreHardDeleteTestUtil(blobVersions, blobTypes); }</code><technical_language>This is messed up. incrementing index. I worried tests passing this. I is versions checked correctly in initialize()</technical_language>

Target:
public void blobStoreHardDeleteTestBlobV2Mixed() throws MessageFormatException, IOException { short[] blobVersions = new short[5]; BlobType[] blobTypes = new BlobType[5]; blobVersions[0] = MessageFormatRecord.Blob_Version_V1; blobTypes[0] = BlobType.DataBlob; blobVersions[1] = MessageFormatRecord.Blob_Version_V2; blobTypes[1] = BlobType.MetadataBlob; blobVersions[2] = MessageFormatRecord.Blob_Version_V2; blobTypes[2] = BlobType.DataBlob; blobVersions[3] = MessageFormatRecord.Blob_Version_V2; blobTypes[3] = BlobType.MetadataBlob; blobVersions[4] = MessageFormatRecord.Blob_Version_V2; blobTypes[4] = BlobType.DataBlob; blobStoreHardDeleteTestUtil(blobVersions, blobTypes); blobVersions = new short[5]; blobTypes = new BlobType[5]; blobVersions[0] = MessageFormatRecord.Blob_Version_V1; blobTypes[0] = BlobType.DataBlob; blobVersions[1] = MessageFormatRecord.Blob_Version_V2; blobTypes[1] = BlobType.DataBlob; blobVersions[2] = MessageFormatRecord.Blob_Version_V2; blobTypes[2] = BlobType.MetadataBlob; blobVersions[3] = MessageFormatRecord.Blob_Version_V2; blobTypes[3] = BlobType.DataBlob; blobVersions[4] = MessageFormatRecord.Blob_Version_V2; blobTypes[4] = BlobType.MetadataBlob; blobStoreHardDeleteTestUtil(blobVersions, blobTypes); }
Source:
<code>private void validateModel(BpmnModel model) throws Exception { FlowElement flowElement = model.getMainProcess().getFlowElement("UserTask_0ej3luy"); <START> assertNotNull(flowElement); <END> assertTrue(flowElement instanceof UserTask); checkXml(model); }</code><technical_language>AssertJ assertions</technical_language>

Target:
private void validateModel(BpmnModel model) throws Exception { FlowElement flowElement = model.getMainProcess().getFlowElement("UserTask_0ej3luy"); assertThat(flowElement).isNotNull(); assertThat(flowElement instanceof UserTask).isTrue(); checkXml(model); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } DomainInfo other = (DomainInfo) obj; if (!fChannels.equals(other.fChannels)) { return false; } <START> if (fDomain != other.getDomain()) { <END> return false; } if (fBufferType != other.fBufferType) { return false; } return true; }</code><technical_language>need check for null case</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } DomainInfo other = (DomainInfo) obj; if (!fChannels.equals(other.fChannels)) { return false; } if (fDomain == null) { if (other.fDomain != null) { return false; } }else if (!fDomain.equals(other.fDomain)) { return false; } if (fBufferType != other.fBufferType) { return false; } return true; }
Source:
<code>private CompletableFuture<?> handleBatchGet(Collection<Operation<K, V>> operations) { Preconditions.checkNotNull(operations); final List<K> gets = getOperationKeys(operations); if (gets.isEmpty()) { <START> return CompletableFuture.completedFuture(null); <END> } final Object[] args = getOperationArgs(operations); final CompletableFuture<Map<K, V>> getsFuture = args == null ? table.getAllAsync(gets) : table.getAllAsync(gets, args); getsFuture.whenComplete((map, throwable) -> { operations.forEach(operation -> { GetOperation<K, V> getOperation = (GetOperation<K, V>) operation; if (throwable != null) { getOperation.completeExceptionally(throwable); } else { getOperation.complete(map.get(operation.getKey())); } }); }); return getsFuture; }</code><technical_language>return empty map value</technical_language>

Target:
private CompletableFuture<?> handleBatchGet(Collection<Operation<K, V>> operations) { Preconditions.checkNotNull(operations); final List<K> gets = getOperationKeys(operations); if (gets.isEmpty()) { return CompletableFuture.completedFuture(Collections.EMPTY_MAP); } final Object[] args = getOperationArgs(operations); final CompletableFuture<Map<K, V>> getsFuture = args == null ? table.getAllAsync(gets) : table.getAllAsync(gets, args); getsFuture.whenComplete((map, throwable) -> { operations.forEach(operation -> { GetOperation<K, V> getOperation = (GetOperation<K, V>) operation; if (throwable != null) { getOperation.completeExceptionally(throwable); } else { getOperation.complete(map.get(operation.getKey())); } }); }); return getsFuture; }
Source:
<code>public GHMilestone createMilestone(String title, String description) throws IOException { return root.retrieve() <START> .method("POST") <END> .with("title", title) .with("description", description) .method("POST") .withUrlPath(getApiTailUrl("milestones")) .to(GHMilestone.class) .wrap(this); }</code><technical_language>redundant method("POST")</technical_language>

Target:
public GHMilestone createMilestone(String title, String description) throws IOException { return root.createRequest() .method("POST") .with("title", title) .with("description", description) .withUrlPath(getApiTailUrl("milestones")) .fetch(GHMilestone.class) .wrap(this); }
Source:
<code>private Optional<TargetedSweeperLock> tryToAcquireLockForNextShardAndStrategy() throws InterruptedException { for (int i = 0; i < queue.getNumShards(); i++) { int nextShardCandidate = getShardAndIncrement(); TargetedSweeperLock lock = TargetedSweeperLock.acquire(nextShardCandidate, sweepStrategy, lockService); if (lock.isHeld()) { return Optional.of(lock); } } <START> log.info("There are no candidates for this iteration of targeted sweep as all shards for sweep strategy " <END> + "are currently being swept by other threads. You may consider increasing the number of shards, " + "or reducing the number of threads.", SafeArg.of("sweepStrategy", sweepStrategy)); return Optional.empty(); }</code><technical_language>this info, get logged time</technical_language>

Target:
private Optional<TargetedSweeperLock> tryToAcquireLockForNextShardAndStrategy() { return IntStream.range(0, queue.getNumShards()) .map(ignore -> getShardAndIncrement()) .mapToObj(shard -> TargetedSweeperLock.tryAcquire(shard, sweepStrategy, timeLock)) .filter(Optional::isPresent) .map(Optional::get) .findFirst(); }
Source:
<code>protected void registerAllTypeVariables(Type classType) { <START> if (!(classType instanceof Class || classType instanceof ParameterizedType)) { <END> return; } Queue<Type> typesToRegister = new LinkedList<Type>(); Set<Type> registeredTypes = new HashSet<Type>(); typesToRegister.add(classType); while (!typesToRegister.isEmpty()) { Type typeToRegister = typesToRegister.poll(); if (typeToRegister == null || registeredTypes.contains(typeToRegister)) { continue; } registerTypeVariablesOn(typeToRegister); registeredTypes.add(typeToRegister); Class<?> rawType = getRawType(typeToRegister); typesToRegister.add(rawType.getGenericSuperclass()); typesToRegister.addAll(Arrays.asList(rawType.getGenericInterfaces())); } }</code><technical_language>Codecov complains testing this path. I this line is required <LINK_0> handles instanceof checks in inferFrom is method FromParameterizedTypeGenericMetadataSupport</technical_language>

Target:
protected void registerAllTypeVariables(Type classType) { Queue<Type> typesToRegister = new LinkedList<Type>(); Set<Type> registeredTypes = new HashSet<Type>(); typesToRegister.add(classType); while (!typesToRegister.isEmpty()) { Type typeToRegister = typesToRegister.poll(); if (typeToRegister == null || registeredTypes.contains(typeToRegister)) { continue; } registerTypeVariablesOn(typeToRegister); registeredTypes.add(typeToRegister); Class<?> rawType = extractRawTypeOf(typeToRegister); typesToRegister.add(rawType.getGenericSuperclass()); typesToRegister.addAll(Arrays.asList(rawType.getGenericInterfaces())); } }
Source:
<code>public TimelineLog(final Long accountId, final long dateOfNight) { <START> this(accountId, dateOfNight, DateTime.now().getMillis()); <END> }</code><technical_language>I I DateTime.now().withZone(DateTimeZone.UTC) in some lines above. timezone explicit? DateTime.now(DateTimeZone.UTC) is shortform iirc</technical_language>

Target:
public TimelineLog(final Long accountId, final long dateOfNight) { this(accountId, dateOfNight, DateTime.now(DateTimeZone.UTC).getMillis()); }
Source:
<code>public int[] convertFromState(State value, ComfoAirCommandType commandType) { int[] template = commandType.getChangeDataTemplate(); template[commandType.getChangeDataPos()] = ((DecimalType) value).intValue() == 1 <START> ? commandType.getPossibleValues()[0] <END> : 0x00; return template; }</code><technical_language>This method needs protect parameters null (value commandType)</technical_language>

Target:
public int[] convertFromState(State value, ComfoAirCommandType commandType) { if (value == null || commandType == null) { logger.trace("\"DataTypeBoolean\" class \"convertFromState\" method parameter: null"); return null; } else { int[] template = commandType.getChangeDataTemplate(); template[commandType.getChangeDataPos()] = ((DecimalType) value).intValue() == 1 ? commandType.getPossibleValues()[0] : 0x00; return template; } }
Source:
<code>public void notifyReceived(final ChannelHandlerContext ctx, MessageEvent evt) throws Exception { NotifyMessage notifyMessage = (NotifyMessage) evt.getMessage(); final String barrier = notifyMessage.getBarrier(); if (logger.isDebugEnabled()) { logger.debug("NOTIFY: " + barrier); } robot.notifyBarrier(barrier); <START> final NotifiedMessage notifiedMessaged = new NotifiedMessage(); <END> notifiedMessaged.setBarrier(barrier); logger.debug("sending NOTIFIED: " + barrier); ChannelFuture pendingNotify = ctx.getChannel().write(notifiedMessaged); pendingWrites.add(pendingNotify); }</code><technical_language>typo notifiedMessage</technical_language>

Target:
public void notifyReceived(final ChannelHandlerContext ctx, MessageEvent evt) throws Exception { NotifyMessage notifyMessage = (NotifyMessage) evt.getMessage(); final String barrier = notifyMessage.getBarrier(); if (logger.isDebugEnabled()) { logger.debug("NOTIFY: " + barrier); } writeNotifiedOnBarrier(barrier, ctx); robot.notifyBarrier(barrier); }
Source:
<code>public void setActiveEditor(IEditorPart editor) { for (Object <START> element : <END> cache) { ((EditorContribution) element).editorChanged(editor); } }</code><technical_language>rename contribution</technical_language>

Target:
public void setActiveEditor(IEditorPart editor) { for (Object contribution : cache) { ((EditorContribution) contribution).editorChanged(editor); } }
Source:
<code>public InputStream getObject(GetObjectArgs args) throws ErrorResponseException, IllegalArgumentException, InsufficientDataException, InternalException, InvalidBucketNameException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException { checkArgs(args); args.validateSsec(this.baseUrl); Long offset = args.offset(); Long length = args.length(); if (length != null && offset == null) { offset = 0L; } <START> String range = (offset != null) ? ("bytes=" + offset + "-" + (length != null ? offset + length - 1 : "")) : null; <END> Multimap<String, String> headers = HashMultimap.create(); if (range != null) headers.put("Range", range); if (args.ssec() != null) headers.putAll(newMultimap(args.ssec().headers())); Multimap<String, String> queryParams = HashMultimap.create(); if (args.versionId() != null) queryParams.put("versionId", args.versionId()); Response response = executeGet(args, headers, queryParams); return response.body().byteStream(); }</code><technical_language>suggestion String range = null; if(offset != null) { range = "bytes=" + offset + "-"; if(length != null) { range = range + (offset + length - 1); } } Couple of more lines, I this is more readable</technical_language>

Target:
public InputStream getObject(GetObjectArgs args) throws ErrorResponseException, IllegalArgumentException, InsufficientDataException, InternalException, InvalidBucketNameException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException { checkArgs(args); args.validateSsec(this.baseUrl); Long offset = args.offset(); Long length = args.length(); if (length != null && offset == null) { offset = 0L; } String range = null; if (offset != null) { range = "bytes=" + offset + "-"; if (length != null) { range = range + (offset + length - 1); } } Multimap<String, String> headers = HashMultimap.create(); if (range != null) headers.put("Range", range); if (args.ssec() != null) headers.putAll(newMultimap(args.ssec().headers())); Multimap<String, String> queryParams = HashMultimap.create(); if (args.versionId() != null) queryParams.put("versionId", args.versionId()); Response response = executeGet(args, headers, queryParams); return response.body().byteStream(); }
Source:
<code>protected boolean canDoAction() { if (!super.canDoAction()) { return false; } if (getParameters().getBricks() == null || getParameters().getBricks().size() == 0) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_BRICKS_REQUIRED); <START> return false; <END> } if (getGlusterVolume().getBricks().size() == 1 || getGlusterVolume().getBricks().size() <= getParameters().getBricks().size()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME); return false; } if (getGlusterVolume().getVolumeType() == GlusterVolumeType.REPLICATE || getGlusterVolume().getVolumeType() == GlusterVolumeType.DISTRIBUTED_REPLICATE) { if (getParameters().getReplicaCount() < getGlusterVolume().getReplicaCount() - 1) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_REDUCE_REPLICA_COUNT_MORE_THAN_ONE); return false; } else if (getParameters().getReplicaCount() > getGlusterVolume().getReplicaCount()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_REPLICA_COUNT); return false; } } return validateBricks(getParameters().getBricks()); }</code><technical_language>failCanDoAction in this method</technical_language>

Target:
protected boolean canDoAction() { if (!super.canDoAction()) { return false; } if (getParameters().getBricks() == null || getParameters().getBricks().size() == 0) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_BRICKS_REQUIRED); } if (getGlusterVolume().getBricks().size() == 1 || getGlusterVolume().getBricks().size() <= getParameters().getBricks().size()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME); } if (getGlusterVolume().getVolumeType().isReplicatedType()) { if (getParameters().getReplicaCount() < getGlusterVolume().getReplicaCount() - 1) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_REDUCE_REPLICA_COUNT_MORE_THAN_ONE); } else if (getParameters().getReplicaCount() > getGlusterVolume().getReplicaCount()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_REPLICA_COUNT); } } GlusterBrickValidator brickValidator = new GlusterBrickValidator(); return validate(brickValidator.validateBricks(getParameters().getBricks(), getGlusterVolume())); }
Source:
<code><START> public Iterable<Header> getHeaders() { <END> return _headers; }</code><technical_language>if do change this store Headers directly, return Headers too</technical_language>

Target:
public Headers getHeaders() { return _headers; }
Source:
<code>public static void execute(String imagePath, QuestionWidget questionWidget, Context context) { ExifInterface exif = null; try { exif = new ExifInterface(imagePath); } catch (IOException e) { Timber.w(e); } rotateImageIfNeeded(imagePath); scaleDownImageIfNeeded(imagePath, questionWidget, context); try { <START> exif.saveAttributes(); <END> } catch (IOException e) { Timber.w(e); } }</code><technical_language>This NPE. Please add a null check here</technical_language>

Target:
public static void execute(String imagePath, QuestionWidget questionWidget, Context context) { ExifInterface exif = null; try { exif = new ExifInterface(imagePath); } catch (IOException e) { Timber.w(e); } rotateImageIfNeeded(imagePath); scaleDownImageIfNeeded(imagePath, questionWidget, context); if (exif != null) { try { exif.saveAttributes(); } catch (IOException e) { Timber.w(e); } } }
Source:
<code><START> protected static void validateConfigParameters(Schema inputSchema, @Nullable String featuresToInclude, <END> @Nullable String featuresToExclude, String predictionField, @Nullable String cardinalityMapping) { if (!Strings.isNullOrEmpty(featuresToExclude) && !Strings.isNullOrEmpty(featuresToInclude)) { throw new IllegalArgumentException("Cannot specify values for both featuresToInclude and featuresToExclude. " + "Please specify fields for one."); } Map<String, Integer> fields = getFeatureList(inputSchema, featuresToInclude, featuresToExclude, predictionField); for (String field : fields.keySet()) { Schema.Field inputField = inputSchema.getField(field); Schema schema = inputField.getSchema(); Schema.Type features = schema.isNullableSimple() ? schema.getNonNullable().getType() : schema.getType(); if (!(features.equals(Schema.Type.INT) || features.equals(Schema.Type.LONG) || features.equals(Schema.Type.FLOAT) || features.equals(Schema.Type.DOUBLE))) { throw new IllegalArgumentException(String.format("Field to classify must be continuous : int, double, " + "float, long but was %s.", features)); } } getCategoricalFeatureInfo(inputSchema, featuresToInclude, featuresToExclude, predictionField, cardinalityMapping); }</code><technical_language>sense protected modified in util class, inheriting this class. this class is package private, non-private methods in this class package private</technical_language>

Target:
static void validateConfigParameters(Schema inputSchema, @Nullable String featuresToInclude, @Nullable String featuresToExclude, String predictionField, @Nullable String cardinalityMapping) { if (!Strings.isNullOrEmpty(featuresToExclude) && !Strings.isNullOrEmpty(featuresToInclude)) { throw new IllegalArgumentException("Cannot specify values for both featuresToInclude and featuresToExclude. " + "Please specify fields for one."); } Map<String, Integer> fields = getFeatureList(inputSchema, featuresToInclude, featuresToExclude, predictionField); for (String field : fields.keySet()) { Schema.Field inputField = inputSchema.getField(field); Schema schema = inputField.getSchema(); Schema.Type features = schema.isNullableSimple() ? schema.getNonNullable().getType() : schema.getType(); if (!(features.equals(Schema.Type.INT) || features.equals(Schema.Type.LONG) || features.equals(Schema.Type.FLOAT) || features.equals(Schema.Type.DOUBLE))) { throw new IllegalArgumentException(String.format("Features must be of type : int, double, float, long but " + "was of type %s for field %s.", features, field)); } } getCategoricalFeatureInfo(inputSchema, featuresToInclude, featuresToExclude, predictionField, cardinalityMapping); }
Source:
<code>void executeRefresh(ZWaveNode node, ZWaveThermostatFanStateCommandClass commandClass, int endpointId, Map<String, String> arguments) { <START> logger.debug("NODE {}: Generating poll message for for node endpoint {}", commandClass.getCommandClass().getLabel(), node.getNodeId(), endpointId); <END> SerialMessage serialMessage = node.encapsulate(commandClass.getValueMessage(), commandClass, endpointId); if (serialMessage == null) { logger.warn("NODE {}: Generating message failed for command class = {}, endpoint = {}", node.getNodeId(), commandClass.getCommandClass().getLabel(), endpointId); return; } this.getController().sendData(serialMessage); }</code><technical_language>Node command class parameters wrong is 'for node {}' in format string</technical_language>

Target:
void executeRefresh(ZWaveNode node, ZWaveThermostatFanStateCommandClass commandClass, int endpointId, Map<String, String> arguments) { logger.debug("NODE {}: Generating poll message for endpoint {}", node.getNodeId(), commandClass.getCommandClass().getLabel(), endpointId); SerialMessage serialMessage = node.encapsulate(commandClass.getValueMessage(), commandClass, endpointId); if (serialMessage == null) { logger.warn("NODE {}: Generating message failed for command class = {}, endpoint = {}", node.getNodeId(), commandClass.getCommandClass().getLabel(), endpointId); return; } this.getController().sendData(serialMessage); }
Source:
<code>public void completeUpdate() { mAppUpdateManager.completeUpdate() .addOnSuccessListener(result -> { Logger.log(TAG, "completeUpdate|was successful"); <START> publishStatus(); <END> }) .addOnFailureListener(exception -> { Logger.log(TAG, "completeUpdate|failed with : " + exception.getMessage()); publishStatus(); }); }</code><technical_language>Guessing this call publishStatus() do app restarted success listeners active</technical_language>

Target:
public void completeUpdate() { mAppUpdateManager.completeUpdate() .addOnSuccessListener(result -> { Logger.log(TAG, "completeUpdate|was successful"); }) .addOnFailureListener(exception -> { Logger.log(TAG, "completeUpdate|failed with : " + exception.getMessage()); publishStatus(); }); }
Source:
<code>public synchronized CauseOfBlockage canRun(Queue.Item item) { <START> if (!(item.task instanceof AbstractProject)) { <END> logger.debug("Not an abstract project: {}", item.task); return null; } GerritCause cause = getGerritCause(item); if (cause == null) { logger.debug("Not a gerrit cause: {}", cause); return null; } GerritTriggeredEvent event = cause.getEvent(); if (event == null) { logger.debug("Does not contain an event"); return null; } if (item.isBuildable()) { logger.debug("Item is already buildable"); return null; } AbstractProject p = (AbstractProject)item.task; GerritTrigger trigger = GerritTrigger.getTrigger(p); if (trigger == null) { logger.debug("Project does not contain a trigger"); return null; } List<AbstractProject> dependencies = getProjectsFromString(trigger.getDependencyJobsNames(), (Item)p); if ((dependencies == null) || (dependencies.size() == 0)) { logger.debug("No dependencies on project: {}", p); return null; } if (currentlyTriggeringEvents.contains(event)) { logger.debug("We need to wait while is being triggered", event); return new BecauseWaitingForOtherProjectsToTrigger(); } List<AbstractProject> blockingProjects = getBlockingDependencyProjects(dependencies, event); if (blockingProjects.size() > 0) { return new BecauseDependentBuildIsBuilding(blockingProjects); } else { logger.info("No active dependencies on project: , it will now build", p); return null; } }</code><technical_language>some project types AbstractProject Build Flow literate, potentially triggered a gerrit event dependencies. I other assumptions in this trigger AbstractProject problems in scenarios fixed time (hopefully) try avoid problems here. find a class interface check for getTriggers</technical_language>

Target:
public CauseOfBlockage canRun(Queue.Item item) { if (!(item.task instanceof AbstractProject)) { logger.debug("Not an abstract project: {}", item.task); return null; } GerritCause cause = getGerritCause(item); if (cause == null) { logger.debug("Not a gerrit cause: {}", cause); return null; } GerritTriggeredEvent event = cause.getEvent(); if (event == null) { logger.debug("Does not contain an event"); return null; } if (item.isBuildable()) { logger.debug("Item is already buildable"); return null; } AbstractProject p = (AbstractProject)item.task; GerritTrigger trigger = GerritTrigger.getTrigger(p); if (trigger == null) { logger.debug("Project does not contain a trigger"); return null; } List<AbstractProject> dependencies = getProjectsFromString(trigger.getDependencyJobsNames(), (Item)p); if ((dependencies == null) || (dependencies.size() == 0)) { logger.debug("No dependencies on project: {}", p); return null; } if (currentlyTriggeringEvents.contains(event)) { logger.debug("We need to wait while is being triggered", event); return new BecauseWaitingForOtherProjectsToTrigger(); } List<AbstractProject> blockingProjects = getBlockingDependencyProjects(dependencies, event); if (blockingProjects.size() > 0) { return new BecauseDependentBuildIsBuilding(blockingProjects); } else { logger.info("No active dependencies on project: , it will now build", p); return null; } }
Source:
<code>private void addTokensToUGI(Subject subject) { if (subject != null) { Set<Credentials> privateCredentials = subject.getPrivateCredentials(Credentials.class); if (privateCredentials != null) { for (Credentials cred : privateCredentials) { Collection<Token<? extends TokenIdentifier>> allTokens = cred.getAllTokens(); if (allTokens != null) { for (Token<? extends TokenIdentifier> token : allTokens) { try { LOG.debug("Current user: {}", UserGroupInformation.getCurrentUser()); <START> LOG.debug("Extracted Token from Credentials : {}", token); <END> UserGroupInformation.getCurrentUser().addToken(token); LOG.info("Added delegation tokens to UGI."); } catch (IOException e) { LOG.error("Exception while trying to add tokens to ugi", e); } } } } } } }</code><technical_language>token.toString() print token.decodeIdentifier().getUser()) useful in debugging. UserGroupInformation.getCurrentUser().addToken(token) ignores null tokens. log skip token is null instead of changing current log statements. for (Token<? extends TokenIdentifier> token : allTokens) { try { if(token == null) { LOG.debug("Ignoring null token"); continue; } LOG.debug("Current user: {}", UserGroupInformation.getCurrentUser()); LOG.debug("Token credential: / {}", token.toString(), token.decodeIdentifier().getUser()); UserGroupInformation.getCurrentUser().addToken(token); LOG.info("Added delegation tokens UGI."); } catch (IOException e) { LOG.error("Exception while add tokens ugi", e); } }</technical_language>

Target:
private void addTokensToUGI(Subject subject) { if (subject != null) { Set<Credentials> privateCredentials = subject.getPrivateCredentials(Credentials.class); if (privateCredentials != null) { for (Credentials cred : privateCredentials) { Collection<Token<? extends TokenIdentifier>> allTokens = cred.getAllTokens(); if (allTokens != null) { for (Token<? extends TokenIdentifier> token : allTokens) { try { if (token == null) { LOG.debug("Ignoring null token"); continue; } LOG.debug("Current user: {}", UserGroupInformation.getCurrentUser()); LOG.debug("Token from Credentials : {}", token); UserGroupInformation.getCurrentUser().addToken(token); LOG.info("Added delegation tokens to UGI."); } catch (IOException e) { LOG.error("Exception while trying to add tokens to ugi", e); } } } } } } }
Source:
<code><START> public void testHttpIngestionAllInvalidStringBooleanMetrics() throws Exception { <END> HttpResponse response = httpPost(TENANT_ID, postPath, generateJSONMetricsDataWithAllWrongTypes(System.currentTimeMillis())); ErrorResponse errorResponse = getErrorResponse(response); try { assertEquals("number of errors", 3, errorResponse.getErrors().size()); assertEquals("Should get status 400 from " + String.format(postPath, TENANT_ID), 400, response.getStatusLine().getStatusCode() ); for (int i = 0; i < errorResponse.getErrors().size(); i++) { assertEquals("Invalid error source", "metricValue", errorResponse.getErrors().get(i).getSource()); } } finally { EntityUtils.consume( response.getEntity() ); } }</code><technical_language>good</technical_language>

Target:
public void testHttpIngestionAllInvalidStringBooleanMetrics() throws Exception { HttpResponse response = httpPost(TENANT_ID, postPath, generateJSONMetricsDataWithAllWrongTypes(false, System.currentTimeMillis())); ErrorResponse errorResponse = getErrorResponse(response); try { assertEquals("number of errors", 3, errorResponse.getErrors().size()); assertEquals("Should get status 400 from " + String.format(postPath, TENANT_ID), 400, response.getStatusLine().getStatusCode() ); for (int i = 0; i < errorResponse.getErrors().size(); i++) { assertEquals("Invalid error source", "metricValue", errorResponse.getErrors().get(i).getSource()); } } finally { EntityUtils.consume( response.getEntity() ); } }
Source:
<code>protected void stop() throws Exception { <START> logger.info("Service Component is deactivated"); <END> }</code><technical_language>Get service registration reference unregister deactivate method</technical_language>

Target:
protected void stop() throws Exception { logger.info("Service Component is deactivated"); serviceRegistration.unregister(); }
Source:
<code>private String generateUniqueStudentEmailStatsInWholeSystem(){ String q = "SELECT FROM " + Student.class.getName(); List<Student> allStudents = (List<Student>) pm.newQuery(q).execute(); HashSet<String> set = new HashSet<String>(); int totalRealStudent = 0; for(Student s: allStudents){ if(!isTestingStudentData(s)){ <START> set.add(s.getEmail()); <END> totalRealStudent ++; } } String result = "===============Unique Student Emails===============\n" + "Format=> Total Unique Emails [Total Emails]\n" + "===================================================\n" + set.size() + " [ " + totalRealStudent + " ]\n"; return result; }</code><technical_language>convert lowecase first? in case email appears in cases</technical_language>

Target:
private String generateUniqueStudentEmailStatsInWholeSystem(){ String q = "SELECT FROM " + Student.class.getName(); List<Student> allStudents = (List<Student>) pm.newQuery(q).execute(); HashSet<String> set = new HashSet<String>(); int totalRealStudent = 0; for(Student s: allStudents){ if(!isTestingStudentData(s)){ set.add(s.getEmail().toLowerCase()); totalRealStudent ++; } } String result = "===============Unique Student Emails===============\n" + "Format=> Total Unique Emails [Total Emails]\n" + "===================================================\n" + set.size() + " [ " + totalRealStudent + " ]\n"; return result; }
Source:
<code>private static boolean isOperator(Signature signature) { for (OperatorType operator : OperatorType.values()) { <START> if (signature.getName().equals(FunctionUtils.mangleOperatorName(operator))) { <END> return true; } } return false; }</code><technical_language>static import</technical_language>

Target:
private static boolean isOperator(Signature signature) { for (OperatorType operator : OperatorType.values()) { if (signature.getName().equals(mangleOperatorName(operator))) { return true; } } return false; }
Source:
<code>private @Nullable long[] getCardIdsForModel(long modelId, int[] ords) { String cardIdsToDeleteSql = "select c2.id from cards c2, notes n2 where c2.nid=n2.id and n2.mid = " + modelId + " and c2.ord in " + Utils.ids2str(ords); long[] cids = Utils.toPrimitive(mCol.getDb().queryColumn(Long.class, cardIdsToDeleteSql, 0)); Timber.d("getCardIdsForModel found %s cards to delete for model %s and ords %s", cids.length, modelId, Utils.ids2str(ords)); String noteCountPreDeleteSql = "select count() from notes where mid = " + modelId; int preDeleteNoteCount = mCol.getDb().queryScalar(noteCountPreDeleteSql); Timber.d("preDeleteNoteCount is %s", preDeleteNoteCount); String noteCountPostDeleteSql = "select count(n.id) from cards c, notes n where c.nid=n.id and n.mid = " + modelId + " and c.id not in (" + cardIdsToDeleteSql + ")"; int postDeleteNoteCount = mCol.getDb().queryScalar(noteCountPostDeleteSql); Timber.d("postDeleteNoteCount would be %s", postDeleteNoteCount); if (preDeleteNoteCount != postDeleteNoteCount) { <START> Timber.d("There will be orphan notes if these cards are deleted."); <END> return null; } Timber.d("Deleting these cards will not orphan notes."); return cids; }</code><technical_language>afraid I of SQL, strategy sounds reasonable I . I get Damien double check SQL logic ready, diverging pretty drastically libanki</technical_language>

Target:
public @Nullable long[] getCardIdsForModel(long modelId, int[] ords) { String cardIdsToDeleteSql = "select c2.id from cards c2, notes n2 where c2.nid=n2.id and n2.mid = " + modelId + " and c2.ord in " + Utils.ids2str(ords); long[] cids = Utils.toPrimitive(mCol.getDb().queryColumn(Long.class, cardIdsToDeleteSql, 0)); Timber.d("getCardIdsForModel found %s cards to delete for model %s and ords %s", cids.length, modelId, Utils.ids2str(ords)); String noteCountPreDeleteSql = "select count(distinct(nid)) from cards where nid in (select id from notes where mid = ?)"; int preDeleteNoteCount = mCol.getDb().queryScalar(noteCountPreDeleteSql, new Long[] {modelId}); Timber.d("noteCountPreDeleteSql was '%s'", noteCountPreDeleteSql); Timber.d("preDeleteNoteCount is %s", preDeleteNoteCount); String noteCountPostDeleteSql = "select count(distinct(nid)) from cards where nid in (select id from notes where mid = ?) and ord not in " + Utils.ids2str(ords); Timber.d("noteCountPostDeleteSql was '%s'", noteCountPostDeleteSql); int postDeleteNoteCount = mCol.getDb().queryScalar(noteCountPostDeleteSql, new Long[] {modelId}); Timber.d("postDeleteNoteCount would be %s", postDeleteNoteCount); if (preDeleteNoteCount != postDeleteNoteCount) { Timber.d("There will be orphan notes if these cards are deleted."); return null; } Timber.d("Deleting these cards will not orphan notes."); return cids; }
Source:
<code>public User userSetWorkloadCredentials(String user, String hashedPassword, String unencryptedKrbPrincipalKey, Optional<Instant> expiration, List<String> sshPublicKeys) throws FreeIpaClientException { Map<String, Object> params = new HashMap<>(); List<String> attributes = new ArrayList<>(); <START> if (null != hashedPassword && !hashedPassword.isBlank()) { <END> attributes.add("cdpHashedPassword=" + hashedPassword); attributes.add("cdpUnencryptedKrbPrincipalKey=" + unencryptedKrbPrincipalKey); attributes.add("krbPasswordExpiration=" + formatDate(expiration)); params.put("setattr", attributes); } params.put("ipasshpubkey", sshPublicKeys); return userMod(user, params); }</code><technical_language>apache StringUtils.isNotBlank(hashPassword) is a shorter</technical_language>

Target:
public User userSetWorkloadCredentials(String user, String hashedPassword, String unencryptedKrbPrincipalKey, Optional<Instant> expiration, List<String> sshPublicKeys) throws FreeIpaClientException { Map<String, Object> params = new HashMap<>(); List<String> attributes = new ArrayList<>(); if (StringUtils.isNotBlank(hashedPassword)) { attributes.add("cdpHashedPassword=" + hashedPassword); attributes.add("cdpUnencryptedKrbPrincipalKey=" + unencryptedKrbPrincipalKey); attributes.add("krbPasswordExpiration=" + formatDate(expiration)); params.put("setattr", attributes); } params.put("ipasshpubkey", sshPublicKeys); return userMod(user, params); }