auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public <T> T invoke(K key, EntryProcessor<K, V, T> entryProcessor, Object... arguments) throws EntryProcessorException { checkNotClosed(); checkNotNull(key, "key"); checkNotNull(entryProcessor, "entryProcessor"); if (log.isTraceEnabled()) log.tracef("Invoke entry processor %s for key=%s", entryProcessor, key); V oldValue = cacheWithCacheStore.get(key); MutableJCacheEntry<K, V> mutable = createMutableCacheEntry(oldValue, key); T ret = processEntryProcessor(mutable, entryProcessor, arguments); switch (mutable.getOperation()) { case NONE: <START> Thread.dumpStack(); <END> break; case ACCESS: Thread.dumpStack(); updateTTLForAccessed(cache, key, oldValue); break; case UPDATE: Thread.dumpStack(); V newValue = mutable.getNewValue(); if (newValue == null) { throw new EntryProcessorException(); } if (oldValue != null) { replace(cache, cache, key, oldValue, newValue, true); } else { put(cache, cache, key, newValue, true); } writeToCacheWriter(key, newValue); break; case REMOVE: cache.remove(key); removeFromCacheWriter(key); break; } return ret; }</code><technical_language>want remove these</technical_language>

Target:
public <T> T invoke(K key, EntryProcessor<K, V, T> entryProcessor, Object... arguments) throws EntryProcessorException { checkNotClosed(); checkNotNull(key, "key"); checkNotNull(entryProcessor, "entryProcessor"); if (log.isTraceEnabled()) log.tracef("Invoke entry processor %s for key=%s", entryProcessor, key); V oldValue = cacheWithCacheStore.get(key); MutableJCacheEntry<K, V> mutable = createMutableCacheEntry(oldValue, key); T ret = processEntryProcessor(mutable, entryProcessor, arguments); switch (mutable.getOperation()) { case NONE: break; case ACCESS: updateTTLForAccessed(cache, key, oldValue); break; case UPDATE: V newValue = mutable.getNewValue(); if (newValue == null) { throw new EntryProcessorException(); } if (oldValue != null) { replace(cache, cache, key, oldValue, newValue, true); } else { put(cache, cache, key, newValue, true); } writeToCacheWriter(key, newValue); break; case REMOVE: cache.remove(key); removeFromCacheWriter(key); break; } return ret; }
Source:
<code>public Object execute(ExecutionEvent event) throws ExecutionException { PlotCommit commit = (PlotCommit) getSelection(event).getFirstElement(); final Repository repo = getRepository(event); try { PushBranchWizard wizard = null; Ref localBranch = null; for (int i = 0; i < commit.getRefCount(); i++) { Ref currentRef = commit.getRef(i); if (localBranch == null <START> && currentRef.getName().startsWith(Constants.R_HEADS)) { <END> localBranch = currentRef; } } if (localBranch == null) { wizard = new PushBranchWizard(repo, commit.getId()); } else { wizard = new PushBranchWizard(repo, localBranch); } WizardDialog dlg = new WizardDialog( HandlerUtil.getActiveShellChecked(event), wizard); dlg.setHelpAvailable(true); dlg.open(); } catch (Exception e) { Activator.handleError(e.getMessage(), e, true); } return null; }</code><technical_language>style nit: braces single line blocks</technical_language>

Target:
public Object execute(ExecutionEvent event) throws ExecutionException { PlotCommit commit = (PlotCommit) getSelection(event).getFirstElement(); final Repository repo = getRepository(event); try { PushBranchWizard wizard = null; Ref localBranch = null; for (int i = 0; i < commit.getRefCount(); i++) { Ref currentRef = commit.getRef(i); if (localBranch == null && currentRef.getName().startsWith(Constants.R_HEADS)) localBranch = currentRef; } if (localBranch == null) wizard = new PushBranchWizard(repo, commit.getId()); else wizard = new PushBranchWizard(repo, localBranch); WizardDialog dlg = new WizardDialog( HandlerUtil.getActiveShellChecked(event), wizard); dlg.setHelpAvailable(true); dlg.open(); } catch (Exception e) { Activator.handleError(e.getMessage(), e, true); } return null; }
Source:
<code>public String getPrefixedText() { return namespace == null || namespace.length() == 2 ? getText() : StringUtil.addUnderscores(namespace) + ":" + getText(); <START> } <END></code><technical_language>This is a partial workaround, I a more complete solution: Earlier in this file (in PageTitle constructor), split title string try detect namespace of title. point, check namespace is a language code, override "wiki" member of PageTitle a new WikiSite corresponds new language. way, *support* language prefixes in links. more hint: Android provides a function called Locale.getISOLanguages() returns a list of ISO codes</technical_language>

Target:
public String getPrefixedText() { return namespace == null ? getText() : StringUtil.addUnderscores(namespace) + ":" + getText(); }
Source:
<code>public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor) { ValidationResult result = new ValidationResult(); try { javaBuilder = new JavaBuilder(); javaBuilder.setSavedProject(resource.getProject()); javaBuilder.build(kind, null, monitor); } catch (CoreException e) { <START> e.printStackTrace(); <END> } return result; }</code><technical_language>log exception in Eclipse log instead</technical_language>

Target:
public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor) { ValidationResult result = new ValidationResult(); JavaProject project = (JavaProject) JavaScriptCore.create(resource.getProject()); INameEnvironment nameEnvironment = new NameEnvironment(project); Compiler compiler = newCompiler(project, nameEnvironment); if (resource instanceof IFile && resource.getFileExtension().equalsIgnoreCase("js")) { SourceFile sf = findSourceFile((IFile) resource, true, nameEnvironment); compiler.compile(new ICompilationUnit[]{ sf }); for (CategorizedProblem problem : resourceProblems) { ValidatorMessage vm = ValidatorMessage.create(problem.getMessage(), resource); vm.setAttribute(IMarker.SEVERITY, problem.isError() ? IMarker.SEVERITY_ERROR : IMarker.SEVERITY_WARNING); vm.setType(problem.getMarkerType()); vm.setAttribute(IMarker.LINE_NUMBER, problem.getSourceLineNumber()); vm.setAttribute(IMarker.CHAR_START, problem.getSourceStart()); vm.setAttribute(IMarker.CHAR_END, problem.getSourceEnd() + 1); result.add(vm); } } return result; }
Source:
<code><START> private Status waitForJobFinish(String jobId, long timeoutInSeconds) { <END> long timeout = 1000L * timeoutInSeconds; long checkInterval = 1000L * 1; long startTime = System.currentTimeMillis(); List<Status> jobFinishedStatuses = Lists.newArrayList(Status.SUCCEEDED, Status.FAILED, Status.KILLED, Status.SUSPENDED); while ((System.currentTimeMillis()-startTime)<timeout) { Status status; try { Thread.sleep(checkInterval); status = oozieClient.getJobInfo(jobId).getStatus(); } catch (OozieClientException e) { throw new RuntimeException("Unable to check oozie job status", e); } catch (InterruptedException e) { throw new RuntimeException(e); } if (jobFinishedStatuses.contains(status)) { return status; } System.out.println("Job " + jobId + " is still running with status: " + status + " [" + (System.currentTimeMillis()-startTime) + " ms]"); } try { log.info(oozieClient.getJobLog(jobId)); } catch (OozieClientException e) { log.warn("Unable to check job log"); } Assert.fail("Execution of job " + jobId + " exceeded waiting time limit"); return null; }</code><technical_language>wrong formatting in this method</technical_language>

Target:
private Status waitForJobFinish(String jobId, long timeoutInSeconds) { long timeout = 1000L * timeoutInSeconds; long checkInterval = 1000L * 1; long startTime = System.currentTimeMillis(); List<Status> jobFinishedStatuses = Lists.newArrayList(Status.SUCCEEDED, Status.FAILED, Status.KILLED, Status.SUSPENDED); while ((System.currentTimeMillis()-startTime)<timeout) { Status status; try { Thread.sleep(checkInterval); status = oozieClient.getJobInfo(jobId).getStatus(); } catch (OozieClientException e) { throw new RuntimeException("Unable to check oozie job status", e); } catch (InterruptedException e) { throw new RuntimeException(e); } if (jobFinishedStatuses.contains(status)) { return status; } System.out.println("Job " + jobId + " is still running with status: " + status + " [" + (System.currentTimeMillis()-startTime) + " ms]"); } printOozieJobLog(jobId); Assert.fail("Execution of job " + jobId + " exceeded waiting time limit"); return null; }
Source:
<code>void receiveTwoMessagesAutoComplete(MessagingEntityType entityType, boolean isSessionEnabled) { final int entityIndex = 0; setSenderAndReceiver(entityType, entityIndex, isSessionEnabled); final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); Mono.when(sendMessage(message), sendMessage(message)).block(TIMEOUT); StepVerifier.create(receiver.receiveMessages()) .assertNext(receivedMessage -> { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); <START> receiver.complete(receivedMessage).block(Duration.ofSeconds(15)); <END> }) .assertNext(receivedMessage -> { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); receiver.complete(receivedMessage).block(Duration.ofSeconds(15)); }) .thenCancel() .verify(); }</code><technical_language>explicitly completing these? method suggests auto completed receiveTwoMessagesAutoComplete. below</technical_language>

Target:
void receiveTwoMessagesAutoComplete(MessagingEntityType entityType, boolean isSessionEnabled) { final int entityIndex = 0; final boolean shareConnection = false; final boolean useCredentials = false; this.sender = getSenderBuilder(useCredentials, entityType, entityIndex, isSessionEnabled, shareConnection) .buildAsyncClient(); if (isSessionEnabled) { assertNotNull(sessionId, "'sessionId' should have been set."); this.receiver = getSessionReceiverBuilder(useCredentials, entityType, entityIndex, shareConnection) .buildAsyncClient().acceptSession(sessionId).block(); } else { this.receiver = getReceiverBuilder(useCredentials, entityType, entityIndex, shareConnection) .buildAsyncClient(); } final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); Mono.when(sendMessage(message), sendMessage(message)).block(TIMEOUT); StepVerifier.create(receiver.receiveMessages()) .assertNext(receivedMessage -> { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); }) .assertNext(receivedMessage -> { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); }) .thenCancel() .verify(); }
Source:
<code><START> Function<Integer,Boolean> getPropertyPermissions( Set<String> roles, Token token ) <END> { if ( propertyAuthorization ) { PrimitiveIntSet blackListed = Primitive.intSet(); for ( String role : roles ) { if ( roleToPropertyBlacklist.containsKey( role ) ) { assert roleToPropertyBlacklist.get( role ) != null : "Blacklist has to contain properties"; for ( String propName : roleToPropertyBlacklist.get( role ) ) { try { blackListed.add( token.propertyKeyGetOrCreateForName( propName ) ); } catch ( IllegalTokenNameException e ) { e.printStackTrace(); } } } } return property -> !blackListed.contains( property ); } else { return property -> true; } }</code><technical_language>a IntPredicate instead, remove some boxing</technical_language>

Target:
IntPredicate getPropertyPermissions( Set<String> roles, Token token ) { if ( propertyAuthorization ) { PrimitiveIntSet blackListed = Primitive.intSet(); for ( String role : roles ) { if ( roleToPropertyBlacklist.containsKey( role ) ) { assert roleToPropertyBlacklist.get( role ) != null : "Blacklist has to contain properties"; for ( String propName : roleToPropertyBlacklist.get( role ) ) { try { blackListed.add( token.propertyKeyGetOrCreateForName( propName ) ); } catch ( IllegalTokenNameException e ) { securityLog.error( "Error in setting up property permissions, '" + propName + "' is not a valid property name." ); } } } } return property -> !blackListed.contains( property ); } else { return property -> true; } }
Source:
<code>public void makeDirectoryTestCallHostPlugingReturningSomething() { <START> boolean makeDirectoryReturn = configureAndExecuteMakeDirectoryMethodForTest(pathMock, "Soemthing"); <END> assertTrue(makeDirectoryReturn); }</code><technical_language>Soemthing purpose intended</technical_language>

Target:
public void makeDirectoryTestCallHostPlugingReturningSomething() { boolean makeDirectoryReturn = configureAndExecuteMakeDirectoryMethodForTest(pathMock, "/fictitious/path/to/use/in/unit/test"); assertTrue(makeDirectoryReturn); }
Source:
<code><START> public Set<String> getUnmatchedLabels() { <END> return Collections.unmodifiableSet(unmatchedLabels); }</code><technical_language>Missing synchronization</technical_language>

Target:
public synchronized Set<String> getUnmatchedLabels() { return Collections.unmodifiableSet(unmatchedLabels); }
Source:
<code>public void afterClass() throws IOException { <START> if(BooleanUtils.isTrue(bucketsEnabled)) { <END> IntegrationTestHelper.cleanupTestBucket(mantaClient, bucketsTestPathPrefix); } else { IntegrationTestConfigContext.cleanupTestDirectory(mantaClient, testPathPrefix); } }</code><technical_language>IntegrationTestHelper a more generic method do right based testType? Is a in lessen duplication</technical_language>

Target:
public void afterClass() throws IOException { IntegrationTestHelper.cleanupTestBucketOrDirectory(mantaClient, testPathPrefix); }
Source:
<code><START> private Boolean isVideoPaused() { <END> return Boolean.valueOf(usingImaBridge(webDriver -> { final JavascriptActions js = new JavascriptActions(); return js.execute("document.querySelector('video') && document.querySelector('video').paused").toString(); })); }</code><technical_language>is a difference (isVideoPaused is true paused started), right, names precise enough</technical_language>

Target:
private Boolean isVideoPaused() { return isDesktop() ? isDesktopVideoPaused() : isMobileVideoPaused(); }
Source:
<code>public void initialize(TransformContext context) throws Exception { super.initialize(context); parseConfiguration(config.decompressor); try { outSchema = Schema.parseJson(config.schema); List<Field> outFields = outSchema.getFields(); for (Field field : outFields) { outSchemaMap.put(field.getName(), field.getSchema().getType()); } } catch (IOException e) { <START> throw new IllegalArgumentException("Format of schema specified is invalid. Please check the format."); <END> } }</code><technical_language>throw IOException? If want a proper error message, include e in IllegalArgumentException</technical_language>

Target:
public void initialize(TransformContext context) throws Exception { super.initialize(context); parseConfiguration(config.decompressor); try { outSchema = Schema.parseJson(config.schema); List<Field> outFields = outSchema.getFields(); for (Field field : outFields) { outSchemaMap.put(field.getName(), field.getSchema().getType()); } } catch (IOException e) { throw new IllegalArgumentException("Format of schema specified is invalid. Please check the format." + e.getMessage()); } }
Source:
<code>private boolean isLoggedStoreValid(String storeName, File loggedStoreDir) { long changeLogDeleteRetentionInMs = StorageConfig.DEFAULT_CHANGELOG_DELETE_RETENTION_MS(); if (new StorageConfig(config).getChangeLogDeleteRetentionsInMs().get(storeName).isDefined()) { changeLogDeleteRetentionInMs = (long) new StorageConfig(config).getChangeLogDeleteRetentionsInMs().get(storeName).get(); } <START> SystemStreamPartition changelogSSP = null; <END> if (changelogSystemStreams.containsKey(storeName)) changelogSSP = new SystemStreamPartition(changelogSystemStreams.get(storeName), taskModel.getChangelogPartition()); return this.taskStores.get(storeName).getStoreProperties().isPersistedToDisk() && StorageManagerUtil.isOffsetFileValid(loggedStoreDir, Collections.singleton(changelogSSP)) && !StorageManagerUtil.isStaleStore( loggedStoreDir, changeLogDeleteRetentionInMs, clock.currentTimeMillis()); }</code><technical_language>short circuit return false instead of path of validating offsets</technical_language>

Target:
private boolean isLoggedStoreValid(String storeName, File loggedStoreDir) { long changeLogDeleteRetentionInMs = StorageConfig.DEFAULT_CHANGELOG_DELETE_RETENTION_MS(); if (new StorageConfig(config).getChangeLogDeleteRetentionsInMs().get(storeName).isDefined()) { changeLogDeleteRetentionInMs = (long) new StorageConfig(config).getChangeLogDeleteRetentionsInMs().get(storeName).get(); } if (changelogSystemStreams.containsKey(storeName)) { SystemStreamPartition changelogSSP = new SystemStreamPartition(changelogSystemStreams.get(storeName), taskModel.getChangelogPartition()); return this.taskStores.get(storeName).getStoreProperties().isPersistedToDisk() && StorageManagerUtil.isOffsetFileValid(loggedStoreDir, Collections.singleton(changelogSSP)) && !StorageManagerUtil.isStaleStore(loggedStoreDir, changeLogDeleteRetentionInMs, clock.currentTimeMillis()); } return false; }
Source:
<code><START> public void testMultipartChunkedInputStream() throws InterruptedException, IOException { <END> String container = getContainerName(); try { BlobStore blobStore = view.getBlobStore(); long countBefore = blobStore.countBlobs(container); blobStore.createContainerInLocation(null, container); File testFile = createFileBiggerThan(PART_SIZE); InputStream contentToUpload = new FileInputStream(testFile); Blob blob = blobStore.blobBuilder("const.txt").payload(contentToUpload).contentLength(testFile.length()).build(); blobStore.putBlob(container, blob, PutOptions.Builder.multipart()); long countAfter = blobStore.countBlobs(container); assertNotEquals(countBefore, countAfter, "No blob was created"); assertTrue(countAfter - countBefore > 1, "expected 2 or more parts for a multipart blob"); } finally { returnContainer(container); } }</code><technical_language>OK this, sense verify blob was, in fact, uploaded _correctly_? a huge change, store identifier of created blob, download compare contents testFile</technical_language>

Target:
public void testMultipartChunkedInputStream() throws InterruptedException, IOException { String container = getContainerName(); try { BlobStore blobStore = view.getBlobStore(); blobStore.createContainerInLocation(null, container); File inFile = createFileBiggerThan(PART_SIZE); File outFile = new File("target/lots-of-const-readback.txt"); InputStream contentToUpload = new FileInputStream(inFile); Blob write = blobStore.blobBuilder("const.txt").payload(contentToUpload).contentLength(inFile.length()).build(); blobStore.putBlob(container, write, PutOptions.Builder.multipart()); Blob read = blobStore.getBlob(container, "const.txt"); read.getPayload().writeTo(new FileOutputStream(outFile)); assertEquals(Files.hash(outFile, Hashing.md5()), Files.hash(inFile, Hashing.md5())); } finally { returnContainer(container); } }
Source:
<code>public void maybeResolveSequences() { for (Iterator<TopicPartition> iter = partitionsWithUnresolvedSequences.keySet().iterator(); iter.hasNext(); ) { TopicPartition topicPartition = iter.next(); if (!hasInflightBatches(topicPartition)) { if (isNextSequence(topicPartition, sequenceNumber(topicPartition))) { iter.remove(); } else { if (isTransactional()) { String unackedMessagesErr = "The client hasn't received acknowledgment for some previously " + <START> "sent messages and can no longer retry them."; <END> if (canBumpEpoch()) { epochBumpRequired = true; KafkaException exception = new KafkaException(unackedMessagesErr + "It is safe to abort " + "the transaction and continue."); transitionToAbortableError(exception); } else { KafkaException exception = new KafkaException(unackedMessagesErr + "It isn't safe to continue."); transitionToFatalError(exception); } } else { log.info("No inflight batches remaining for {}, last ack'd sequence for partition is {}, next sequence is {}. " + "Going to bump epoch and reset sequence numbers.", topicPartition, lastAckedSequence(topicPartition).orElse(NO_LAST_ACKED_SEQUENCE_NUMBER), sequenceNumber(topicPartition)); requestEpochBumpForPartition(topicPartition); } this.partitionsWithUnresolvedSequences.remove(topicPartition); } } } }</code><technical_language>nit: message needs a space end period</technical_language>

Target:
synchronized void maybeResolveSequences() { for (Iterator<TopicPartition> iter = partitionsWithUnresolvedSequences.keySet().iterator(); iter.hasNext(); ) { TopicPartition topicPartition = iter.next(); if (!hasInflightBatches(topicPartition)) { if (isNextSequence(topicPartition, sequenceNumber(topicPartition))) { iter.remove(); } else { if (isTransactional()) { String unackedMessagesErr = "The client hasn't received acknowledgment for some previously " + "sent messages and can no longer retry them. "; if (canBumpEpoch()) { epochBumpRequired = true; KafkaException exception = new KafkaException(unackedMessagesErr + "It is safe to abort " + "the transaction and continue."); transitionToAbortableError(exception); } else { KafkaException exception = new KafkaException(unackedMessagesErr + "It isn't safe to continue."); transitionToFatalError(exception); } } else { log.info("No inflight batches remaining for {}, last ack'd sequence for partition is {}, next sequence is {}. " + "Going to bump epoch and reset sequence numbers.", topicPartition, lastAckedSequence(topicPartition).orElse(NO_LAST_ACKED_SEQUENCE_NUMBER), sequenceNumber(topicPartition)); requestEpochBumpForPartition(topicPartition); } iter.remove(); } } } }
Source:
<code>protected boolean validate() { if (!validate(isTemplateExists())) { return false; } StorageDomainValidator validator = new StorageDomainValidator(getStorageDomain()); if (!validate(validator.isDomainExistAndActive())) { return false; } <START> if (getStorageDomain().getStorageDomainType() != StorageDomainType.Data) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); } <END> return true; }</code><technical_language>Please StorageDomainValidator.isDataDomain()</technical_language>

Target:
protected boolean validate() { if (!validate(isTemplateExists())) { return false; } StorageDomainValidator validator = new StorageDomainValidator(getStorageDomain()); if (!validate(validator.isDomainExistAndActive())) { return false; } if (!validate(validator.isDataDomain())) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); } return true; }
Source:
<code>public void updateFields() { CommitStatus status = new CommitStatus(); assertEquals(new Date(1234), status.setCreatedAt(new Date(1234)) .getCreatedAt()); User creator = new User().setId(1); assertEquals(creator, status.setCreator(creator).getCreator()); assertEquals("desc", status.setDescription("desc").getDescription()); assertEquals(40, status.setId(40).getId()); assertEquals("state", status.setState("state").getState()); assertEquals("targetUrl", status.setTargetUrl("targetUrl") .getTargetUrl()); assertEquals(new Date(5678), status.setUpdatedAt(new Date(5678)) .getUpdatedAt()); assertEquals("url", status.setUrl("url").getUrl()); assertEquals("context", <START> status.getContext("context").getContext()); <END> }</code><technical_language>setContext</technical_language>

Target:
public void updateFields() { CommitStatus status = new CommitStatus(); assertEquals(new Date(1234), status.setCreatedAt(new Date(1234)) .getCreatedAt()); User creator = new User().setId(1); assertEquals(creator, status.setCreator(creator).getCreator()); assertEquals("con/text", status.setContext("con/text").getContext()); assertEquals("desc", status.setDescription("desc").getDescription()); assertEquals(40, status.setId(40).getId()); assertEquals("state", status.setState("state").getState()); assertEquals("targetUrl", status.setTargetUrl("targetUrl") .getTargetUrl()); assertEquals(new Date(5678), status.setUpdatedAt(new Date(5678)) .getUpdatedAt()); assertEquals("url", status.setUrl("url").getUrl()); assertEquals("context", status.setContext("context").getContext()); }
Source:
<code>public String generateSASLMechanismNameFromGSSApiOIDs (String objectIdentifier) throws NoSuchAlgorithmException, IOException { <START> MessageDigest md = MessageDigest.getInstance("SHA-1"); <END> byte[] messageDigest = md.digest(getASN1DERencoding(objectIdentifier)); BigInteger no = new BigInteger(1, messageDigest); String hashtext = no.toString(16); while (hashtext.length() < 32) { hashtext = "0" + hashtext; } String binarySHA1Hash = getFirst_7_OctetsInBinary(hashtext); binarySHA1Hash = binarySHA1Hash.substring(0, 54); String mechanismName = GS2_PREFIX + getBase32Encoding(binarySHA1Hash); return mechanismName; }</code><technical_language>is reuse Smacks SHA1 class here. <LINK_0></technical_language>

Target:
public String generateSASLMechanismNameFromGSSApiOIDs (String objectIdentifier) throws NoSuchAlgorithmException, IOException { byte[] ASN1_DER = getASN1DERencoding(objectIdentifier); String sha1_hash = SHA1.hex(ASN1_DER); String binary55Bits = getbinary55Bits(sha1_hash); String[] binaryGroups = new String[11]; for (int i = 0 ; i < binary55Bits.length() / 5 ; i++) { String binaryGroup = ""; for (int j = 0 ; j < 5 ; j++) { binaryGroup += binary55Bits.charAt(5 * i + j); } binaryGroups[i] = binaryGroup; } String base32Encoding = ""; for (int i = 0 ; i < 11 ; i++) { int decimalValue = Integer.parseInt(binaryGroups[i], 2); base32Encoding += Base32.encodeIntValue(decimalValue); } return GS2_PREFIX + base32Encoding; }
Source:
<code>public void onDeleteAccountsFromGroup(Id me, Collection<AccountGroupMember> removed) { List<AccountGroupMemberAudit> auditInserts = Lists.newLinkedList(); List<AccountGroupMemberAudit> auditUpdates = Lists.newLinkedList(); ReviewDb reviewDB = db.get(); try { for (AccountGroupMember m : removed) { AccountGroupMemberAudit audit = null; for (AccountGroupMemberAudit a : reviewDB.accountGroupMembersAudit() .byGroupAccount(m.getAccountGroupId(), m.getAccountId())) { if (a.isActive()) { audit = a; break; } } if (audit != null) { audit.removed(me, TimeUtil.nowTs()); auditUpdates.add(audit); } else { audit = new AccountGroupMemberAudit(m, me, TimeUtil.nowTs()); audit.removedLegacy(); auditInserts.add(audit); } } reviewDB.accountGroupMembersAudit().update(auditUpdates); reviewDB.accountGroupMembersAudit().insert(auditInserts); } catch (OrmException e) { <START> StringBuilder message = new StringBuilder( "Cannot log delete accounts from group event performed by user "); message.append(me); message.append(": "); message.append(Joiner.on("; ").join(removed)); log.error(message.toString(), e); <END> } }</code><technical_language>code duplication. This block is copy/pasted 3 times in this file wording. "group event performed user " suffix in message is same. This extracted reused</technical_language>

Target:
public void onDeleteAccountsFromGroup(Id me, Collection<AccountGroupMember> removed) { List<AccountGroupMemberAudit> auditInserts = Lists.newLinkedList(); List<AccountGroupMemberAudit> auditUpdates = Lists.newLinkedList(); ReviewDb reviewDB = db.get(); try { for (AccountGroupMember m : removed) { AccountGroupMemberAudit audit = null; for (AccountGroupMemberAudit a : reviewDB.accountGroupMembersAudit() .byGroupAccount(m.getAccountGroupId(), m.getAccountId())) { if (a.isActive()) { audit = a; break; } } if (audit != null) { audit.removed(me, TimeUtil.nowTs()); auditUpdates.add(audit); } else { audit = new AccountGroupMemberAudit(m, me, TimeUtil.nowTs()); audit.removedLegacy(); auditInserts.add(audit); } } reviewDB.accountGroupMembersAudit().update(auditUpdates); reviewDB.accountGroupMembersAudit().insert(auditInserts); } catch (OrmException e) { String header = "Cannot log delete accounts from group event performed by user "; logOrmExceptionForAccounts(me, removed, e, header); } }
Source:
<code>public void testUnmapped() { final String alignmentFromKris = "0\t4\t*\t0\t0\t*\t*\t0\t0\tGCCTCGTAGTGCGCCATCAGTCTATCGATGTCGTTG\t44\"44===;;;;;;;;;::::88844\"4\"\"\"\"\"\"\"\"\n"; <START> final SamReader samReader = createSamFileReader(alignmentFromKris); <END> final CloseableIterator<SAMRecord> iterator = samReader.iterator(); while (iterator.hasNext()) { iterator.next(); } iterator.close(); }</code><technical_language>iterator.close() close reader</technical_language>

Target:
public void testUnmapped() { final String alignmentFromKris = "0\t4\t*\t0\t0\t*\t*\t0\t0\tGCCTCGTAGTGCGCCATCAGTCTATCGATGTCGTTG\t44\"44===;;;;;;;;;::::88844\"4\"\"\"\"\"\"\"\"\n"; final SamReader samReader = createSamFileReader(alignmentFromKris); final CloseableIterator<SAMRecord> iterator = samReader.iterator(); while (iterator.hasNext()) { iterator.next(); } iterator.close(); CloserUtil.close(samReader); }
Source:
<code>private void injectBootstrapper() throws InfrastructureException { LOG.debug( <START> "Bootstrapping {}:{}. Creating folder for bootstrapper", runtimeIdentity, openShiftMachine); <END> openShiftMachine.exec("mkdir", "-p", BOOTSTRAPPER_DIR); LOG.debug( "Bootstrapping {}:{}. Downloading bootstrapper binary", runtimeIdentity, openShiftMachine); openShiftMachine.exec( "curl", "-o", BOOTSTRAPPER_DIR + BOOTSTRAPPER_FILE, bootstrapperBinaryUrl); openShiftMachine.exec("chmod", "+x", BOOTSTRAPPER_DIR + BOOTSTRAPPER_FILE); LOG.debug("Bootstrapping {}:{}. Creating config file", runtimeIdentity, openShiftMachine); openShiftMachine.exec( "sh", "-c", "cat > " + BOOTSTRAPPER_DIR + CONFIG_FILE + " << 'EOF'\n" + GSON.toJson(installers) + "\nEOF"); }</code><technical_language>OpenShift machine meaningful toString() here</technical_language>

Target:
private void injectBootstrapper() throws InfrastructureException { String machineName = openShiftMachine.getName(); LOG.debug( "Bootstrapping {}:{}. Creating folder for bootstrapper", runtimeIdentity, machineName); openShiftMachine.exec("mkdir", "-p", BOOTSTRAPPER_DIR); LOG.debug("Bootstrapping {}:{}. Downloading bootstrapper binary", runtimeIdentity, machineName); openShiftMachine.exec( "curl", "-o", BOOTSTRAPPER_DIR + BOOTSTRAPPER_FILE, bootstrapperBinaryUrl); openShiftMachine.exec("chmod", "+x", BOOTSTRAPPER_DIR + BOOTSTRAPPER_FILE); LOG.debug("Bootstrapping {}:{}. Creating config file", runtimeIdentity, machineName); openShiftMachine.exec( "sh", "-c", "cat > " + BOOTSTRAPPER_DIR + CONFIG_FILE + " << 'EOF'\n" + GSON.toJson(installers) + "\nEOF"); }
Source:
<code>public void doSample() { <START> checkCallState(); <END> transmitLatestState(); }</code><technical_language>@orhan89 transmitLatestState() created for this already. I store latest callState, get here: <LINK_0>, send in transmitLatestState()</technical_language>

Target:
public void doSample() { int callState = telMgr.getCallState(); updateCallState(callState); int dataConnectionState = telMgr.getDataState(); updateDataConnectionState(dataConnectionState); updateConnectionType(); transmitLatestState(); }
Source:
<code>public void test() { <START> JavaCheckVerifier.verify("src/test/files/checks/CompareToNotOverloadedCheck/CompareToNotOverloadedCheck.java", new CompareToNotOverloadedCheck()); <END> }</code><technical_language>subfolder CompareToNotOverloadedCheck/CompareToNotOverloadedCheck.java ? multiple cases, simply place file in src/test/files/checks/</technical_language>

Target:
public void test() { JavaCheckVerifier.verify("src/test/files/checks/CompareToNotOverloadedCheck.java", new CompareToNotOverloadedCheck()); }
Source:
<code>public MessageSendingThread() { <START> mMessageQueue = new ArrayBlockingQueue<String>(QUEUE_CAPACITY); <END> }</code><technical_language>mMessageQueue in use, please remove</technical_language>

Target:
public MessageSendingThread() { }
Source:
<code>public CachingClassificationEngine(ClassificationEngine delegate) { this.delegate = Objects.requireNonNull(delegate); this.cache = CacheBuilder.newBuilder() <START> .maximumSize(5000) END> .expireAfterAccess(60 * 1000, TimeUnit.MILLISECONDS) .build( new CacheLoader<ClassificationRequest, Optional<String>>() { @Override public Optional<String> load(ClassificationRequest key) { return Optional.ofNullable(delegate.classify(key)); } }); }</code><technical_language>configurable instead of deferring this</technical_language>

Target:
public CachingClassificationEngine(ClassificationEngine delegate) { this.delegate = Objects.requireNonNull(delegate); this.cache = CacheBuilder.newBuilder() .maximumSize(Integer.getInteger("org.opennms.features.flows.classification.caching.maxSize", 5000)) .expireAfterAccess(Long.getLong("org.opennms.features.flows.classification.caching.expireTime", 60 * 1000), TimeUnit.MILLISECONDS) .build( new CacheLoader<ClassificationRequest, Optional<String>>() { @Override public Optional<String> load(ClassificationRequest key) { return Optional.ofNullable(delegate.classify(key)); } }); }
Source:
<code>private void setLoaderColumnsProperty(Loader loader, List<Field> columns){ boolean isUpperCase = sprops.convertColumnsAndTableToUppercase.getValue(); List<String> keyStr = new ArrayList<>(); List<String> columnsStr = new ArrayList<>(); int i = 0; for (Field overlapField : columns) { Field f = overlapField == null ? mainSchema.getFields().get(i) : overlapField; i++; String dbColumnName = f.getProp(SchemaConstants.TALEND_COLUMN_DB_COLUMN_NAME); if(dbColumnName == null){ dbColumnName = f.name(); } String fName = isUpperCase ? dbColumnName.toUpperCase() : dbColumnName; columnsStr.add(fName); if (null != f.getProp(SchemaConstants.TALEND_COLUMN_IS_KEY)) { keyStr.add(fName); } } row = new Object[columnsStr.size()]; loader.setProperty(LoaderProperty.columns, columnsStr); <START> if (sprops.outputAction.getValue() == UPSERT) { <END> keyStr.clear(); keyStr.add(sprops.upsertKeyColumn.getValue()); } if (keyStr.size() > 0) { loader.setProperty(LoaderProperty.keys, keyStr); } }</code><technical_language>a flipped equals..</technical_language>

Target:
private void setLoaderColumnsProperty(Loader loader, List<Field> columns){ boolean isUpperCase = sprops.convertColumnsAndTableToUppercase.getValue(); List<String> keyStr = new ArrayList<>(); List<String> columnsStr = new ArrayList<>(); int i = 0; for (Field overlapField : columns) { Field f = overlapField == null ? mainSchema.getFields().get(i) : overlapField; i++; String dbColumnName = f.getProp(SchemaConstants.TALEND_COLUMN_DB_COLUMN_NAME); if(dbColumnName == null){ dbColumnName = f.name(); } String fName = isUpperCase ? dbColumnName.toUpperCase() : dbColumnName; columnsStr.add(fName); if (null != f.getProp(SchemaConstants.TALEND_COLUMN_IS_KEY)) { keyStr.add(fName); } } row = new Object[columnsStr.size()]; loader.setProperty(LoaderProperty.columns, columnsStr); if (UPSERT.equals(sprops.outputAction.getValue())) { keyStr.clear(); keyStr.add(sprops.upsertKeyColumn.getValue()); } if (keyStr.size() > 0) { loader.setProperty(LoaderProperty.keys, keyStr); } }
Source:
<code>public boolean repack(ProgressMonitor pm) throws IOException { if (pm == null) pm = NullProgressMonitor.INSTANCE; PackConfig packConfig = new PackConfig(repo); if (packConfig.getIndexVersion() != 2) <START> throw new IllegalStateException("Only index version 2"); <END> Map<String, Ref> refsBefore = repo.getAllRefs(); HashSet<ObjectId> allHeads = new HashSet<ObjectId>(); HashSet<ObjectId> nonHeads = new HashSet<ObjectId>(); HashSet<ObjectId> tagTargets = new HashSet<ObjectId>(); for (Ref ref : refsBefore.values()) { if (ref.isSymbolic() || ref.getObjectId() == null) continue; if (isHead(ref)) allHeads.add(ref.getObjectId()); else nonHeads.add(ref.getObjectId()); if (ref.getPeeledObjectId() != null) tagTargets.add(ref.getPeeledObjectId()); } tagTargets.addAll(allHeads); packHeads(pm, allHeads); return true; }</code><technical_language>Drop this assertion. is legal for JGit create a index version 1 a FileRepository</technical_language>

Target:
public Collection<PackFile> repack(ProgressMonitor pm) throws IOException { PackConfig packConfig = new PackConfig(repo); if (packConfig.getIndexVersion() != 2) throw new IllegalStateException("Only index version 2"); Map<String, Ref> refsBefore = repo.getAllRefs(); HashSet<ObjectId> allHeads = new HashSet<ObjectId>(); HashSet<ObjectId> nonHeads = new HashSet<ObjectId>(); HashSet<ObjectId> tagTargets = new HashSet<ObjectId>(); HashSet<ObjectId> indexObjects = listNonHEADIndexObjects(); for (Ref ref : refsBefore.values()) { if (ref.isSymbolic() || ref.getObjectId() == null) continue; if (isHead(ref)) allHeads.add(ref.getObjectId()); else nonHeads.add(ref.getObjectId()); if (ref.getPeeledObjectId() != null) tagTargets.add(ref.getPeeledObjectId()); } tagTargets.addAll(allHeads); nonHeads.addAll(indexObjects); List<PackFile> ret = new ArrayList<PackFile>(2); ret.add(packHeads(pm, allHeads)); if (!nonHeads.isEmpty()) ret.add(packRest(pm, nonHeads, allHeads)); return ret; }
Source:
<code>protected Request getHttpRequest(String url) { <START> HttpClient httpClient = new HttpClient(); <END> startHttpClient(httpClient); return httpClient.newRequest(url).method(HttpMethod.GET); }</code><technical_language>If create a new HttpClient' time start it, need stopped again</technical_language>

Target:
protected Request getHttpRequest(String url) { startHttpClient(httpClient); return httpClient.newRequest(url).method(HttpMethod.GET); }
Source:
<code><START> public int compareTo(ActivityEvent object) { <END> if (date == null || object.getDate() == null) { return 0; } return date.compareTo(object.getDate()); }</code><technical_language>This implementation is transitive. null elements ordered last</technical_language>

Target:
public int compareTo(ActivityEvent object) { if (date == null && object.getDate() == null) { return 0; } if (date == null || object.getDate() == null) { return -1; } return date.compareTo(object.getDate()); }
Source:
<code>private void configureFeedbackUrl() { AsyncQuery _asyncQuery = new AsyncQuery(); _asyncQuery.setModel(this); _asyncQuery.asyncCallback = new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { String version = (String) result; feedbackUrl = dynamicMessages.feedbackUrl(version); if (feedbackUrl != null && feedbackUrl.length() > 0) { getView().setFeedbackText(feedbackLinkLabel); registerHandler(getView().getFeedbackLink().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { <START> WebUtils.openUrlInNewWindow(feedbackLinkLabel, feedbackUrl); <END> } })); } } }; AsyncDataProvider.getRpmVersionViaPublic(_asyncQuery); }</code><technical_language>worth adding version label (feedback (version: XYZ), justification for fetching version :-) (in case placeholder in feedback_url, in oVirt brand)</technical_language>

Target:
private void configureFeedbackUrl() { AsyncQuery _asyncQuery = new AsyncQuery(); _asyncQuery.setModel(this); _asyncQuery.asyncCallback = new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { String version = (String) result; feedbackUrl = dynamicMessages.feedbackUrl(version); if (feedbackUrl != null && feedbackUrl.length() > 0) { getView().setFeedbackText(feedbackLinkLabel); registerHandler(getView().getFeedbackLink().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { WebUtils.openUrlInNewWindow(feedbackLinkLabel, feedbackUrl); } })); } } }; AsyncDataProvider.getRpmVersion(_asyncQuery); }
Source:
<code>public List<ReplicaId> getReplicaIds() { List<Replica> replicas = getReplicas(); <START> return new ArrayList<>(replicas); <END> }</code><technical_language>Wondering if combine get methods return Collections.unmodifiableList(replicas)</technical_language>

Target:
public List<ReplicaId> getReplicaIds() { return getReplicaIdsByState(ReplicaState.STANDBY, null); }
Source:
<code>private void startVerifySeedActivity(DeterministicSeed seed) { List<String> mnemonicCode = seed.getMnemonicCode(); String seedArray = mnemonicCode.toArray(new String[0]); <START> Intent intent = VerifySeedActivity.Companion.createIntent(this, seedArray); <END> startActivity(intent); }</code><technical_language>add @JvmStatic annotation createIntent(context: Context, seed: Array<String>) method definition in VerifySeedActivity class in order able simply call VerifySeedActivity.createIntent(this, seedArray) Companion</technical_language>

Target:
private void startVerifySeedActivity(DeterministicSeed seed) { List<String> mnemonicCode = seed.getMnemonicCode(); String seedArray = mnemonicCode.toArray(new String[0]); Intent intent = VerifySeedActivity.createIntent(this, seedArray); startActivity(intent); }
Source:
<code>public void verifyMonetizationModuleShown() { Assertion.assertTrue(checkIfElementOnPage(monetizationModuleContainer)); <START> PageObjectLogging.log("verifyMonetizationModuleShown", "Monetization module is shown", true); <END> waitForElementByElement(monetizationModuleContainer); PageObjectLogging.log("verifyMonetizationModuleShown", "Monetization module is visible", true); }</code><technical_language>is necessary log here? assertion put logging file already. Also, I another logging end of method</technical_language>

Target:
public void verifyMonetizationModuleShown() { Assertion.assertTrue(checkIfElementOnPage(monetizationModuleContainer)); waitForElementByElement(monetizationModuleContainer); PageObjectLogging.log("verifyMonetizationModuleShown", "Monetization module is visible", true); }
Source:
<code>public void run() { updateStatus("Started " + getStatus()); String previousThreadName = Thread.currentThread().getName(); <START> Thread.currentThread().setName(previousThreadName + "; AsyncOperation ID " + status.getId() + ": " + status.getDescription()); <END> try { operate(); } catch(Exception e) { status.setException(e); } finally { Thread.currentThread().setName(previousThreadName); updateStatus("Finished " + getStatus()); markComplete(); } }</code><technical_language>description ? If is long, replace System.currentTimeMillis(). If is short concise ignore this</technical_language>

Target:
public void run() { updateStatus("Started " + getStatus()); String previousThreadName = Thread.currentThread().getName(); Thread.currentThread().setName(previousThreadName + "; AsyncOp ID " + status.getId()); try { operate(); } catch(Exception e) { status.setException(e); } finally { Thread.currentThread().setName(previousThreadName); updateStatus("Finished " + getStatus()); markComplete(); } }
Source:
<code>} catch (SAXException e) { <START> e.printStackTrace(); <END> }</code><technical_language>I wondering if avoid e.printStackTrace() here: - If I understand correctly, schema available, able throw a (runtime) exception avoid a NPE later. - If is expected schema creation fail (and do want fail static initializer throwing exception), exception e logged. do think</technical_language>

Target:
} catch (SAXException e) { throw new RuntimeException("Unable to initialize correctly DMNValidator.", e); }
Source:
<code>protected void executeCommand() { GlusterGeoRepSession session = getGeoRepSession(); VDSReturnValue returnValue = runVdsCommand(VDSCommandType.SetGlusterVolumeGeoRepConfigDefault, new GlusterVolumeGeoRepConfigVdsParameters(upServer.getId(), session.getMasterVolumeName(), session.getSlaveHostName(), session.getSlaveVolumeName(), getParameters().getConfigKey(), null, session.getUserName())); <START> GlusterGeoRepSyncJob.getInstance().updateDiscoveredSessionConfig(getVdsGroupDAO().get(getGlusterVolume().getClusterId()), session); <END> setSucceeded(returnValue.getSucceeded()); if (!getSucceeded()) { handleVdsError(AuditLogType.GLUSTER_GEOREP_CONFIG_SET_DEFAULT_FAILED, returnValue.getVdsError() .getMessage()); return; } }</code><technical_language>getVdsGroup() - get cluster</technical_language>

Target:
protected void executeCommand() { GlusterGeoRepSession session = getGeoRepSession(); VDSReturnValue returnValue = runVdsCommand(VDSCommandType.SetGlusterVolumeGeoRepConfigDefault, new GlusterVolumeGeoRepConfigVdsParameters(upServer.getId(), session.getMasterVolumeName(), session.getSlaveHostName(), session.getSlaveVolumeName(), getParameters().getConfigKey(), null, session.getUserName())); GlusterGeoRepSyncJob.getInstance().updateDiscoveredSessionConfig(getVdsGroup(), session); setSucceeded(returnValue.getSucceeded()); if (!getSucceeded()) { handleVdsError(AuditLogType.GLUSTER_GEOREP_CONFIG_SET_DEFAULT_FAILED, returnValue.getVdsError() .getMessage()); return; } }
Source:
<code>public void testPartialRamMapScaling() throws Exception { long maxContainerRam = 10L * Constants.GB; long boltRam = 4L * Constants.GB; topologyConfig.setContainerMaxRamHint(maxContainerRam); topologyConfig.setComponentRam(BOLT_NAME, boltRam); TopologyAPI.Topology topologyExplicitRamMap = getTopology(spoutParallelism, boltParallelism, topologyConfig); PackingPlan packingPlanExplicitRamMap = getFirstFitDecreasingPackingPlan(topologyExplicitRamMap); Assert.assertEquals(2, packingPlanExplicitRamMap.getContainers().size()); Assert.assertEquals(totalInstances, packingPlanExplicitRamMap.getInstanceCount()); AssertPacking.assertContainers(packingPlanExplicitRamMap.getContainers(), BOLT_NAME, SPOUT_NAME, boltRam, instanceDefaultResources.getRam(), null); int numScalingInstances = 3; Map<String, Integer> componentChanges = new HashMap<>(); componentChanges.put(BOLT_NAME, numScalingInstances); PackingPlan newPackingPlan = getFirstFitDecreasingPackingPlanRepack(topologyExplicitRamMap, packingPlanExplicitRamMap, componentChanges); <START> Assert.assertEquals(4, newPackingPlan.getContainers().size()); <END> Assert.assertEquals((Integer) (totalInstances + numScalingInstances), newPackingPlan.getInstanceCount()); AssertPacking.assertContainers(newPackingPlan.getContainers(), BOLT_NAME, SPOUT_NAME, boltRam, instanceDefaultResources.getRam(), null); }</code><technical_language>asserting expected container size (ram), above</technical_language>

Target:
public void testPartialRamMapScaling() throws Exception { long maxContainerRam = 10L * Constants.GB; long boltRam = 4L * Constants.GB; topologyConfig.setContainerMaxRamHint(maxContainerRam); topologyConfig.setComponentRam(BOLT_NAME, boltRam); TopologyAPI.Topology topologyExplicitRamMap = getTopology(spoutParallelism, boltParallelism, topologyConfig); PackingPlan packingPlanExplicitRamMap = getFirstFitDecreasingPackingPlan(topologyExplicitRamMap); Assert.assertEquals(2, packingPlanExplicitRamMap.getContainers().size()); Assert.assertEquals(totalInstances, packingPlanExplicitRamMap.getInstanceCount()); AssertPacking.assertContainers(packingPlanExplicitRamMap.getContainers(), BOLT_NAME, SPOUT_NAME, boltRam, instanceDefaultResources.getRam(), null); int numScalingInstances = 3; Map<String, Integer> componentChanges = new HashMap<>(); componentChanges.put(BOLT_NAME, numScalingInstances); PackingPlan newPackingPlan = getFirstFitDecreasingPackingPlanRepack(topologyExplicitRamMap, packingPlanExplicitRamMap, componentChanges); Assert.assertEquals(4, newPackingPlan.getContainers().size()); Assert.assertEquals((Integer) (totalInstances + numScalingInstances), newPackingPlan.getInstanceCount()); AssertPacking.assertContainers(newPackingPlan.getContainers(), BOLT_NAME, SPOUT_NAME, boltRam, instanceDefaultResources.getRam(), null); AssertPacking.assertContainerRam(newPackingPlan.getContainers(), maxContainerRam); }
Source:
<code>private String generateDeviceID(List<GpodnetDevice> gpodnetDevices) { String baseId = Build.MODEL.replaceAll("\\W", ""); String id = baseId; int num = 0; while (isDeviceWithIdInList(id, gpodnetDevices)) { <START> id = baseId + "filterdialog_" + num; <END> num++; } return id; }</code><technical_language>this change intended</technical_language>

Target:
private String generateDeviceID(List<GpodnetDevice> gpodnetDevices) { String baseId = Build.MODEL.replaceAll("\\W", ""); String id = baseId; int num = 0; while (isDeviceWithIdInList(id, gpodnetDevices)) { id = baseId + "_" + num; num++; } return id; }
Source:
<code>public SubmitJobCommand(String... params) throws CLIException { if (params == null || params.length == 0) { <START> logger.log(Level.WARNING, "Error message: Workflow file path is required"); <END> throw new CLIException(REASON_INVALID_ARGUMENTS, "Workflow file path is required"); } this.pathname = params[0]; if (params.length > 1) { this.variables = params[1]; } this.jobKeyValueTransformer = new JobKeyValueTransformer(); }</code><technical_language>this a ERROR level message</technical_language>

Target:
public SubmitJobCommand(String... params) throws NullPointerException { Objects.requireNonNull(params); this.pathname = params[0]; if (params.length > 1) { this.variables = params[1]; } this.jobKeyValueTransformer = new JobKeyValueTransformer(); }