auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public CoreEvent process(final CoreEvent event) throws MuleException { if (nestedChain == null) { return event; } final boolean txPrevoiuslyActive = isTransactionActive(); Transaction previousTx = TransactionCoordination.getInstance().getTransaction(); ExecutionTemplate<CoreEvent> executionTemplate = createScopeTransactionalExecutionTemplate(muleContext, transactionConfig); ExecutionCallback<CoreEvent> processingCallback = () -> { Transaction newTx = TransactionCoordination.getInstance().getTransaction(); if ((!txPrevoiuslyActive && isTransactionActive()) || (txPrevoiuslyActive && previousTx != newTx)) { TransactionAdapter transaction = (TransactionAdapter) newTx; transaction.setComponentLocation(getLocation()); return processWithChildContextBlocking(event, nestedChain, ofNullable(getLocation()), messagingExceptionHandler); } else { return processWithChildContextBlocking(event, nestedChain, ofNullable(getLocation()), messagingExceptionHandler); } }; try { return executionTemplate.execute(processingCallback); } catch (MuleException e) { throw e; } catch (Exception e) { throw new DefaultMuleException(errorInvokingMessageProcessorWithinTransaction(nestedChain, transactionConfig), e); } }

Target:
public CoreEvent process(final CoreEvent event) throws MuleException { if (nestedChain == null) { return event; } final boolean txPrevoiuslyActive = isTransactionActive(); Transaction previousTx = TransactionCoordination.getInstance().getTransaction(); ExecutionTemplate<CoreEvent> executionTemplate = createScopeTransactionalExecutionTemplate(muleContext, transactionConfig); ExecutionCallback<CoreEvent> processingCallback = () -> { Transaction currentTx = TransactionCoordination.getInstance().getTransaction(); if ((!txPrevoiuslyActive && isTransactionActive()) || (txPrevoiuslyActive && previousTx != currentTx)) { TransactionAdapter transaction = (TransactionAdapter) currentTx; transaction.setComponentLocation(getLocation()); return processWithChildContextBlocking(event, nestedChain, ofNullable(getLocation()), messagingExceptionHandler); } else { return processWithChildContextBlocking(event, nestedChain, ofNullable(getLocation()), messagingExceptionHandler); } }; try { return executionTemplate.execute(processingCallback); } catch (MuleException e) { throw e; } catch (Exception e) { throw new DefaultMuleException(errorInvokingMessageProcessorWithinTransaction(nestedChain, transactionConfig), e); } }
Source:
protected void parseInfo(Variant variant, String fileId, String studyId, String info, int numAllele) { VariantSourceEntry file = variant.getSourceEntry(fileId, studyId); for (String var : info.split(";")) { String[] splits = var.split("="); if (splits.length == 2) { switch (splits[0]) { case "ACC": String[] ids = splits[1].split(","); file.addAttribute(splits[0], ids[numAllele]); break; case "AC": String[] counts = splits[1].split(","); file.addAttribute(splits[0], counts[numAllele]); break; case "AF": String[] frequencies = splits[1].split(","); file.addAttribute(splits[0], frequencies[numAllele]); break; case "AN": file.addAttribute(splits[0], splits[1]); break; case "NS": file.addAttribute(splits[0], String.valueOf(file.getSamplesData().size())); break; case "DP": int dp = 0; for (Map<String, String> sampleData : file.getSamplesData()) { String sampleDp = sampleData.get("DP"); if (StringUtils.isNumeric(sampleDp)) { dp += Integer.parseInt(sampleDp); } } file.addAttribute(splits[0], String.valueOf(dp)); break; case "MQ": case "MQ0": int mq = 0; int mq0 = 0; for (Map<String, String> sampleData : file.getSamplesData()) { String sampleGq = sampleData.get("GQ"); if (StringUtils.isNumeric(sampleGq)) { int gq = Integer.parseInt(sampleGq); mq += gq * gq; if (gq == 0) { mq0++; } } } file.addAttribute("MQ", String.valueOf(mq)); file.addAttribute("MQ0", String.valueOf(mq0)); break; default: file.addAttribute(splits[0], splits[1]); break; } } else { variant.getSourceEntry(fileId, studyId).addAttribute(splits[0], ""); } } }

Target:
private void parseInfo(Variant variant, String fileId, String studyId, String info, int numAllele) { VariantSourceEntry file = variant.getSourceEntry(fileId, studyId); for (String var : info.split(";")) { String[] splits = var.split("="); if (splits.length == 2) { switch (splits[0]) { case ALLELE_COUNT: String[] counts = splits[1].split(","); file.addAttribute(splits[0], counts[numAllele]); break; case ALLELE_FREQUENCY: String[] frequencies = splits[1].split(","); file.addAttribute(splits[0], frequencies[numAllele]); break; case ALLELE_NUMBER: file.addAttribute(splits[0], splits[1]); break; case "NS": file.addAttribute(splits[0], String.valueOf(file.getSamplesData().size())); break; case "DP": int dp = 0; for (Map<String, String> sampleData : file.getSamplesData()) { String sampleDp = sampleData.get("DP"); if (StringUtils.isNumeric(sampleDp)) { dp += Integer.parseInt(sampleDp); } } file.addAttribute(splits[0], String.valueOf(dp)); break; case "MQ": case "MQ0": int mq = 0; int mq0 = 0; for (Map<String, String> sampleData : file.getSamplesData()) { String sampleGq = sampleData.get("GQ"); if (StringUtils.isNumeric(sampleGq)) { int gq = Integer.parseInt(sampleGq); mq += gq * gq; if (gq == 0) { mq0++; } } } file.addAttribute("MQ", String.valueOf(mq)); file.addAttribute("MQ0", String.valueOf(mq0)); break; default: file.addAttribute(splits[0], splits[1]); break; } } else { variant.getSourceEntry(fileId, studyId).addAttribute(splits[0], ""); } } }
Source:
public synchronized ListenableFuture<?> setBytes(long bytes) { checkState(!closed, "SimpleLocalMemoryContext is already closed"); if (bytes == usedBytes) { return NOT_BLOCKED; } ListenableFuture<?> future = parentMemoryContext.updateBytes(bytes - usedBytes); usedBytes = bytes; return future; }

Target:
public synchronized ListenableFuture<?> setBytes(long bytes) { checkState(!closed, "SimpleLocalMemoryContext is already closed"); checkArgument(bytes >= 0, "bytes cannot be negative"); if (bytes == usedBytes) { return NOT_BLOCKED; } ListenableFuture<?> future = parentMemoryContext.updateBytes(bytes - usedBytes); usedBytes = bytes; return future; }
Source:
public void testWaitUntilLeaseTableExistsPayPerRequest() throws LeasingException { KinesisClientLeaseManager manager = new KinesisClientLeaseManager("nagl_ShardProgress_PayPerRequest", ddbClient, true, KinesisClientLibConfiguration.DEFAULT_DDB_BILLING_MODE) { @Override long sleep(long timeToSleepMillis) { Assert.fail("Should not sleep"); return 0L; } }; Assert.assertTrue(manager.waitUntilLeaseTableExists(1, 1)); }

Target:
public void testWaitUntilLeaseTableExistsPayPerRequest() throws LeasingException { KinesisClientLeaseManager manager = new KinesisClientLeaseManager("nagl_ShardProgress_PayPerRequest", ddbClient, true, BillingMode.PAY_PER_REQUEST) { @Override long sleep(long timeToSleepMillis) { Assert.fail("Should not sleep"); return 0L; } }; Assert.assertTrue(manager.waitUntilLeaseTableExists(1, 1)); }
Source:
public Set<RuntimeIdentity> getIdentities() throws InfrastructureException { try { return managerProvider .get() .createQuery("SELECT r FROM KubernetesRuntime r", KubernetesRuntimeState.class) .getResultList() .stream() .map(KubernetesRuntimeState::getRuntimeId) .collect(Collectors.toSet()); } catch (RuntimeException x) { throw new InfrastructureException(x.getMessage(), x); } }

Target:
public Set<RuntimeIdentity> getIdentities() throws InfrastructureException { try { return managerProvider .get() .createNamedQuery("KubernetesRuntime.getAll", KubernetesRuntimeState.class) .getResultList() .stream() .map(KubernetesRuntimeState::getRuntimeId) .collect(Collectors.toSet()); } catch (RuntimeException x) { throw new InfrastructureException(x.getMessage(), x); } }
Source:
public Opt<Identity> enter(final Request req) throws IOException { final Iterator<String> cookies = new RqCookies.Base(req) .cookie(this.cookie).iterator(); Opt<Identity> retValue = null; if (cookies.hasNext()) { retValue = new Opt.Single<Identity>( this.codec.decode(cookies.next().getBytes()) ); } if (retValue == null) { retValue = new Opt.Empty<Identity>(); } return retValue; }

Target:
public Opt<Identity> enter(final Request req) throws IOException { final Iterator<String> cookies = new RqCookies.Base(req) .cookie(this.cookie).iterator(); Opt<Identity> user = new Opt.Empty<Identity>(); if (cookies.hasNext()) { user = new Opt.Single<Identity>( this.codec.decode(cookies.next().getBytes()) ); } return user; }
Source:
public ArrayList<VdcReturnValueBase> execute() { if (parameters == null || parameters.isEmpty()) { log.infoFormat("{0} of type {1} invoked with no actions", this.getClass().getSimpleName(), actionType); return new ArrayList<VdcReturnValueBase>(); } ArrayList<VdcReturnValueBase> returnValues = new ArrayList<VdcReturnValueBase>(); try { VdcReturnValueBase returnValue; for (VdcActionParametersBase parameter : getParameters()) { parameter.setMultipleAction(true); returnValue = ExecutionHandler.evaluateCorrelationId(parameter); if (returnValue == null) { CommandBase<?> command = isInternal ? CommandsFactory.createCommand(actionType, parameter, commandContext.duplicate() .resetCompensationContext() .resetExecutionContext()) : CommandsFactory.createCommand(actionType, parameter); command.setInternalExecution(isInternal); getCommands().add(command); } else { returnValues.add(returnValue); } } if (getCommands().size() == 1) { ThreadLocalParamsContainer.setCorrelationId(getCommands().get(0).getCorrelationId()); returnValues.add(getCommands().get(0).canDoActionOnly()); } else { checkCanDoActionsAsynchronously(returnValues); } boolean canRunActions = true; if (isRunOnlyIfAllCanDoPass) { for (VdcReturnValueBase value : returnValues) { if (!value.getCanDoAction()) { canRunActions = false; break; } } } if (canRunActions) { if (isWaitForResult) { invokeSyncCommands(); } else { invokeCommands(); } } } catch (RuntimeException e) { log.error("Failed to execute multiple actions of type: " + actionType, e); } return returnValues; }

Target:
public ArrayList<VdcReturnValueBase> execute() { if (parameters == null || parameters.isEmpty()) { log.infoFormat("{0} of type {1} invoked with no actions", this.getClass().getSimpleName(), actionType); return new ArrayList<VdcReturnValueBase>(); } ArrayList<VdcReturnValueBase> returnValues = new ArrayList<VdcReturnValueBase>(); try { VdcReturnValueBase returnValue; for (VdcActionParametersBase parameter : getParameters()) { parameter.setMultipleAction(true); returnValue = ExecutionHandler.evaluateCorrelationId(parameter); if (returnValue == null) { CommandBase<?> command = isInternal ? CommandsFactory.createCommand(actionType, parameter, commandContext.duplicate() .withoutCompensationContext() .withoutExecutionContext()) : CommandsFactory.createCommand(actionType, parameter); command.setInternalExecution(isInternal); getCommands().add(command); } else { returnValues.add(returnValue); } } if (getCommands().size() == 1) { ThreadLocalParamsContainer.setCorrelationId(getCommands().get(0).getCorrelationId()); returnValues.add(getCommands().get(0).canDoActionOnly()); } else { checkCanDoActionsAsynchronously(returnValues); } boolean canRunActions = true; if (isRunOnlyIfAllCanDoPass) { for (VdcReturnValueBase value : returnValues) { if (!value.getCanDoAction()) { canRunActions = false; break; } } } if (canRunActions) { if (isWaitForResult) { invokeSyncCommands(); } else { invokeCommands(); } } } catch (RuntimeException e) { log.error("Failed to execute multiple actions of type: " + actionType, e); } return returnValues; }
Source:
public void add(final RevCommit c) { sinceLastIndex++; if (++inQueue > REBUILD_INDEX_COUNT && sinceLastIndex > REBUILD_INDEX_COUNT) { sinceLastIndex = 0; buildIndex(); } Entry q = head; final long when = c.commitTime; if (index != null && index[first] != null && index[first].commit.commitTime > when) { int low = first, high = last; while (low <= high) { int mid = (low + high) / 2; if (index[mid].commit.commitTime < when) high = mid - 1; else if (index[mid].commit.commitTime > when) low = mid + 1; else break; } q = index[Math.min(low, high)]; } final Entry n = newEntry(c); if (q == null || when > q.commit.commitTime) { n.next = q; head = n; } else { Entry p = q.next; while (p != null && p.commit.commitTime > when) { q = p; p = q.next; } n.next = q.next; q.next = n; } }

Target:
public void add(final RevCommit c) { sinceLastIndex++; if (++inQueue > REBUILD_INDEX_COUNT && sinceLastIndex > REBUILD_INDEX_COUNT) { sinceLastIndex = 0; buildIndex(); } Entry q = head; final long when = c.commitTime; if (index != null && index[first] != null && index[first].commit.commitTime > when) { int low = first, high = last; while (low <= high) { int mid = (low + high) >>> 1; int t = index[mid].commit.commitTime; if (t < when) high = mid - 1; else if (t > when) { low = mid + 1; } else { low = mid - 1; break; } } low = Math.min(low, high); while (low >= first && when == index[low].commit.commitTime) --low; q = index[low]; } final Entry n = newEntry(c); if (q == null || (q == head && when > q.commit.commitTime)) { n.next = q; head = n; } else { Entry p = q.next; while (p != null && p.commit.commitTime > when) { q = p; p = q.next; } n.next = q.next; q.next = n; } }
Source:
private String extractChecksText(String testsURL) { StringBuilder builder = new StringBuilder(); if (summary.getFailCount() > 0) { List<CaseResult> failedTests = action.getResult().getFailedTests(); for (CaseResult failedTest: failedTests) { String testReport = mapFailedTestToTestReport(failedTest); int messageSize = testReport.getBytes(StandardCharsets.UTF_8).length + builder.toString().getBytes(StandardCharsets.UTF_8).length; if (messageSize > (MAX_MSG_SIZE_TO_CHECKS_API - 1024)){ builder.append("\n") .append("more test results are not shown here, view them on [Jenkins](") .append(testsURL).append(")"); break; } builder.append(testReport); } } return builder.toString(); }

Target:
private String extractChecksText(String testsURL) { StringBuilder builder = new StringBuilder(); if (summary.getFailCount() > 0) { List<CaseResult> failedTests = action.getResult().getFailedTests(); for (CaseResult failedTest: failedTests) { String testReport = mapFailedTestToTestReport(failedTest); int messageSize = testReport.length() + builder.toString().length(); if (messageSize > (MAX_MSG_SIZE_TO_CHECKS_API - 1024)){ builder.append("\n") .append("more test results are not shown here, view them on [Jenkins](") .append(testsURL).append(")"); break; } builder.append(testReport); } } return builder.toString(); }
Source:
private void throwProtocolAdapterException(final Map<String, AccessResultCode> failureAccessResultMap) throws ProtocolAdapterException { String keys = ""; String values = ""; for (final String key : failureAccessResultMap.keySet()) { keys += key + " "; } for (final Object value : failureAccessResultMap.values()) { values += value + " "; } LOGGER.error("ActivityCalendar: Requests for failed with result code: {}", keys, values); throw new ProtocolAdapterException("AccessResultCode for <" + keys + "> + set Activity Calendar: <" + values + ">"); }

Target:
private void throwProtocolAdapterException(final Map<String, AccessResultCode> failureAccessResultMap) throws ProtocolAdapterException { String keyValues = ""; for (final Map.Entry<String, AccessResultCode> entry : failureAccessResultMap.entrySet()) { final String keyValueString = entry.getKey() + ": " + entry.getValue(); if ("".equals(keyValues)) { keyValues = keyValueString; } else { keyValues += ", " + keyValueString; } } LOGGER.error("ActivityCalendar: Requests failed for: {}", keyValues); throw new ProtocolAdapterException("ActivityCalendar: Requests failed for: " + keyValues); }
Source:
public Iterable<E> read(Configuration configuration) throws IOException { DatasetReader<E> reader = view.newReader(); return reader; }

Target:
public Iterable<E> read(Configuration configuration) throws IOException { return view.newReader(); }
Source:
protected void clone(Q query) { super.clone(query); this.cachable = query.cachable; this.binds.addBinds((List) query.binds.getArgs()); }

Target:
protected void clone(Q query) { super.clone(query); this.cachable = query.cachable; this.binds.addBinds(((Operation) query.binds.accept(new ReplaceVisitor<Void>(), null)).getArgs()); }
Source:
public void clearImports() { unloadJavaExtensions(this.imports); this.imports.clear(); }

Target:
public void clearImports() { unloadJavaExtensions(this.imports); this.imports.clear(); this.couldNotBeLoaded.clear(); }
Source:
public void postReport(String urlString, Report report, Map<String, String> headers) throws NetworkException, BadResponseException { try { nullCheckLatch.await(20, TimeUnit.MILLISECONDS); } catch (InterruptedException exception) { exception.printStackTrace(); } super.postReport(urlString, report, headers); }

Target:
public void postReport(String urlString, Report report, Map<String, String> headers) throws NetworkException, BadResponseException { try { nullCheckLatch.await(100, TimeUnit.MILLISECONDS); } catch (InterruptedException exception) { exception.printStackTrace(); } super.postReport(urlString, report, headers); }
Source:
public AggregateResult aggregate(KeyType key) { try { final ByteBuffer keyBuffer = keySerde.toByteBuffer(key); if (keyBuffer.remaining() != keySize) { throw new IAE( "keySerde.toByteBuffer(key).remaining[%s] != keySerde.keySize[%s], buffer was the wrong size?!", keyBuffer.remaining(), keySize ); } final int prevRecordOffset = curWriteIndex * recordSize; if (curWriteIndex == -1 || !keyEquals(keyBuffer, buffer, prevRecordOffset)) { initNewSlot(keyBuffer); } final int curRecordOffset = curWriteIndex * recordSize; for (int i = 0; i < aggregatorOffsets.length; i++) { aggregators[i].aggregate(buffer, curRecordOffset + aggregatorOffsets[i]); } return AggregateResult.ok(); } catch (Throwable t) { finish(); throw t; } }

Target:
public AggregateResult aggregate(KeyType key) { try { final ByteBuffer keyBuffer = keySerde.toByteBuffer(key); if (keyBuffer.remaining() != keySize) { throw new IAE( "keySerde.toByteBuffer(key).remaining[%s] != keySerde.keySize[%s], buffer was the wrong size?!", keyBuffer.remaining(), keySize ); } final int prevRecordOffset = curWriteIndex * recordSize; if (curWriteIndex == -1 || !keyEquals(keyBuffer, buffer, prevRecordOffset)) { initNewSlot(keyBuffer); } final int curRecordOffset = curWriteIndex * recordSize; for (int i = 0; i < aggregatorOffsets.length; i++) { aggregators[i].aggregate(buffer, curRecordOffset + aggregatorOffsets[i]); } return AggregateResult.ok(); } catch (RuntimeException e) { finished = true; throw e; } }
Source:
public void testManyFiles() throws Exception { FileList files = new FileList(); List<File> fl = new ArrayList<>(); File f1 = new File(); fl.add(f1); File f2 = new File(); fl.add(f2); files.setFiles(fl); String q1 = "name='A' and 'root' in parents and mimeType='application/vnd.google-apps.folder'"; when(drive.files().list().setQ(q1).execute()).thenReturn(files); when(drive.files().list().setQ(anyString()).execute()).thenReturn(files); properties.file.setValue("/A"); testRuntime.initialize(container, properties); testRuntime.runAtDriver(container); fail("Should not be herer"); }

Target:
public void testManyFiles() throws Exception { FileList files = new FileList(); List<File> fl = new ArrayList<>(); File f1 = new File(); fl.add(f1); File f2 = new File(); fl.add(f2); files.setFiles(fl); String q1 = "name='A' and 'root' in parents and mimeType='application/vnd.google-apps.folder'"; when(drive.files().list().setQ(q1).execute()).thenReturn(files); when(drive.files().list().setQ(anyString()).execute()).thenReturn(files); properties.file.setValue("/A"); testRuntime.initialize(container, properties); testRuntime.runAtDriver(container); fail("Should not be here"); }
Source:
private void buildScript(Site site) { currentScript.add(new BecauseYouReadClient(site)); currentScript.add(new ContinueReadingClient()); currentScript.add(new IntegerListClient()); }

Target:
private void buildScript(Site site) { pendingClients.add(new BecauseYouReadClient(site)); pendingClients.add(new ContinueReadingClient()); pendingClients.add(new IntegerListClient()); }
Source:
private boolean usesCatalogsAsSchemas(DatabaseMetaData metaData) { boolean result = true; ResultSet rs = null; try { rs = metaData.getSchemas(); while (rs.next() && result) { result = false; } } catch (SQLException e) { throw JdbcUtils.wrapException(e, "retrieve schema and catalog metadata", JdbcActionType.METADATA); } finally { if(rs != null) { try { rs.close(); } catch (SQLException e) { e.printStackTrace(); } } close(null); } return result; }

Target:
private boolean usesCatalogsAsSchemas(DatabaseMetaData metaData) { boolean result = true; ResultSet rs = null; try { rs = metaData.getSchemas(); while (rs.next() && result) { result = false; } } catch (SQLException e) { throw JdbcUtils.wrapException(e, "retrieve schema and catalog metadata", JdbcActionType.METADATA); } finally { FileHelper.safeClose(rs); } return result; }
Source:
public PasswordVerificationResult checkPassword(String username, String password) { if (Strings.isFilled(passwordHash)) { for (PasswordHashFunction hashFunction : hashFunctions) { String givenPasswordHash = hashFunction.computeHash(username, salt, password); if (Strings.isFilled(givenPasswordHash) && Strings.areEqual(givenPasswordHash, passwordHash)) { return hashFunction.isOutdated() ? PasswordVerificationResult.VALID_NEEDS_RE_HASH : PasswordVerificationResult.VALID; } } } return PasswordVerificationResult.INVALID; }

Target:
public PasswordVerificationResult checkPassword(String username, String password) { if (!Strings.isFilled(passwordHash)) { return PasswordVerificationResult.INVALID; } for (PasswordHashFunction hashFunction : hashFunctions) { String givenPasswordHash = hashFunction.computeHash(username, salt, password); if (Strings.isFilled(givenPasswordHash) && Strings.areEqual(givenPasswordHash, passwordHash)) { return hashFunction.isOutdated() ? PasswordVerificationResult.VALID_NEEDS_RE_HASH : PasswordVerificationResult.VALID; } } return PasswordVerificationResult.INVALID; }
Source:
public Set<Change.Id> call() { final Map<Change.Id, Change> resultChanges = new HashMap<Change.Id, Change>(); AccountAccess dbAccounts = db.accounts(); try { Set<Account.Id> accountSources = getAccountSources(db, userName); for (Account.Id account : accountSources) { process(db, account, resultChanges); } } catch(OrmException ex) { throw new RuntimeException(ex); } return resultChanges.keySet(); }

Target:
public Set<Change.Id> call() throws OrmException { final Map<Change.Id, Change> resultChanges = new HashMap<Change.Id, Change>(); AccountAccess dbAccounts = db.accounts(); Set<Account.Id> accountSources = getAccountSources(db, userName); for (Account.Id account : accountSources) { process(db, account, resultChanges); } return resultChanges.keySet(); }
Source:
public final Object setBufferSize(final SFileDescriptor file, final int size) { file.setBufferSize(size); return Nil.nilObject; }

Target:
public final boolean setBufferSize(final SFileDescriptor file, final int size) { if (!file.isClosed()) { return false; } file.setBufferSize(size); return true; }
Source:
public int readMarker(SequenceFile.Reader reader) throws IOException { if (valueBytes == null) { valueBytes = reader.createValueBytes(); } rawKey.reset(); value.reset(); int status = reader.nextRaw(rawKey, valueBytes); if (status != -1 && isMarkerValid()) { valueBytes.writeUncompressedBytes(valueDataStream); valueDataStream.flush(); return Ints.fromByteArray(value.toByteArray()); } if (status != -1) { throw new IOException(String.format("Invalid key for num entries appended found %s, expected : %s", new String(rawKey.getData()), TxConstants.TransactionLog.NUM_ENTRIES_APPENDED)); } return -1; }

Target:
public int readMarker(SequenceFile.Reader reader) throws IOException { if (valueBytes == null) { valueBytes = reader.createValueBytes(); } rawKey.reset(); rawValue.reset(); int status = reader.nextRaw(rawKey, valueBytes); if (status == -1) { return -1; } if (isMarkerValid()) { valueBytes.writeUncompressedBytes(rawValue); rawValue.flush(); return Ints.fromByteArray(rawValue.getData()); } throw new IOException(String.format("Invalid key for num entries appended found %s, expected : %s", new String(rawKey.getData()), TxConstants.TransactionLog.NUM_ENTRIES_APPENDED)); }
Source:
public CpkScopeInfo getEncryptionScope() { return encryptionScope; }

Target:
public String getEncryptionScope() { if (encryptionScope == null) { return null; } return encryptionScope.getEncryptionScope(); }
Source:
public StandaloneKieServerControllerImpl() { super(); ServiceLoader<KieServerTemplateStorage> storages = ServiceLoader.load(KieServerTemplateStorage.class); if (storages != null && storages.iterator().hasNext()) { KieServerTemplateStorage storage = storages.iterator().next(); this.setTemplateStorage(storage); logger.debug("Server template storage for standalone kie server controller is {}",storage.getClass().getName()); if (this.getTemplateStorage() instanceof FileBasedKieServerTemplateStorage) { logger.debug("Server template storage location is {}",((FileBasedKieServerTemplateStorage)storage).getTemplatesLocation()); } } }

Target:
public StandaloneKieServerControllerImpl() { super(); ServiceLoader<PersistingServerTemplateStorageService> storageServices = ServiceLoader.load(PersistingServerTemplateStorageService.class); if (storageServices != null && storageServices.iterator().hasNext()) { PersistingServerTemplateStorageService storageService = storageServices.iterator().next(); this.setTemplateStorage(storageService.getTemplateStorage()); logger.debug("Server template storage for standalone kie server controller is {}", storageService.getTemplateStorage().toString()); } else { logger.warn("No server template storage defined. Default storage: InMemoryKieServerTemplateStorage will be used"); } }
Source:
private void setCheckBoxClickListener(final int dishId) { mViewHolder.dishCheckBox.setId(dishId); mViewHolder.dishCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { OrderManager orderManager = OrderManager.getInstance(); DatabaseHelper dbHelper = DatabaseHelper.getInstance(); int categoryId = (int) dbHelper.getDishCategoryId(dishId); if (isChecked) { orderManager.addOneDish(dishId, categoryId); } else { orderManager.removeDish(dishId, categoryId); } } }); }

Target:
private void setCheckBoxClickListener(final int dishId) { mViewHolder.dishCheckBox.setId(dishId); OrderManager orderManager = OrderManager.getInstance(); if (orderManager.isOrderedDish(dishId)) { mViewHolder.dishCheckBox.setChecked(true); } else { mViewHolder.dishCheckBox.setChecked(false); } }
Source:
public Loader<Cursor> onCreateLoader(int id, Bundle args) { final ProviderFacade.QueryBuilder<Event> query = provider.query(Event.class); if (filterClusterId != null) query.where(CLUSTER_ID, filterClusterId); if (filterVmId != null) query.where(VM_ID, filterVmId); return query.orderByDescending(ID).asLoader(); }

Target:
public Loader<Cursor> onCreateLoader(int id, Bundle args) { final ProviderFacade.QueryBuilder<Event> query = provider.query(Event.class); if (filterClusterId != null) query.where(CLUSTER_ID, filterClusterId); if (filterVmId != null) query.where(VM_ID, filterVmId); return query.orderByDescending(ID).limit(page * EVENTS_PER_PAGE).asLoader(); }
Source:
private void castEveryonePermissionsToUser(permissions entity) { if (entity.getad_element_id() != null && entity.getad_element_id().equals(Guid.EVERYONE) && queryType.equals(VdcQueryType.GetPermissionsByAdElementId)) { entity.setad_element_id(((MultilevelAdministrationByAdElementIdParameters) queryParams).getAdElementId()); } }

Target:
private void castEveryonePermissionsToUser(permissions entity) { if (entity.getad_element_id() != null && entity.getad_element_id().equals(Guid.EVERYONE) && queryType.equals(VdcQueryType.GetPermissionsByAdElementId)) { entity.setad_element_id(this.targetId); } }
Source:
public void createAntOnBlockedCellTest() { inputFile = new String[] { "0000", "0*00", "0a00", "0000" }; runs = new Run[] { new ErrorRun("create h,1,1"), quit() }; sessionTest(runs, Input.getFile(inputFile)); inputFile = new String[] { "0000", "0b00", "0a00", "0000" }; runs = new Run[] { new ErrorRun("create h,1,1"), quit() }; sessionTest(runs, Input.getFile(inputFile)); inputFile = new String[] { "0000", "0000", "0A00", "0000" }; runs = new Run[] { new NoOutputRun("move 1"), new ErrorRun("create h,1,1"), quit() }; sessionTest(runs, Input.getFile(inputFile)); }

Target:
public void createAntOnBlockedCellTest() { inputFile = new String[] { "0000", "0*00", "0a00", "0000" }; runs = new Run[] { new ErrorRun("create h,1,1"), quit() }; sessionTest(runs, Input.getFile(inputFile)); inputFile = new String[] { "0000", "0b00", "0a00", "0000" }; runs = new Run[] { new ErrorRun("create h,1,1"), quit() }; sessionTest(runs, Input.getFile(inputFile)); inputFile = new String[] { "0000", "0000", "0a00", "0000" }; runs = new Run[] { new ErrorRun("create a,2,1"), quit() }; sessionTest(runs, Input.getFile(inputFile)); inputFile = new String[] { "0000", "0000", "0A00", "0000" }; runs = new Run[] { new NoOutputRun("move 1"), new ErrorRun("create h,1,1"), quit() }; sessionTest(runs, Input.getFile(inputFile)); }
Source:
protected void updateQuickAccessTriggerSequenceFormat() { TriggerSequence triggerSequence = bindingService.getBestActiveBindingFor(QUICK_ACCESS_COMMAND_ID); if (triggerSequence == null) { for (Binding b : bindingService.getBindings()) { if (b.getParameterizedCommand() != null && QUICK_ACCESS_COMMAND_ID.equalsIgnoreCase(b.getParameterizedCommand().getId())) { triggerSequence = b.getTriggerSequence(); } } } this.quickAccessTriggerSequenceFormat = triggerSequence.format(); }

Target:
protected void updateQuickAccessTriggerSequenceFormat() { TriggerSequence triggerSequence; ParameterizedCommand cmd = eCommandService.createCommand(QUICK_ACCESS_COMMAND_ID, null); ContextSet contextSet = manager.createContextSet(Arrays.asList(contextService.getDefinedContexts())); Binding binding = manager.getBestSequenceFor(contextSet, cmd); triggerSequence = binding.getTriggerSequence(); this.quickAccessTriggerSequenceFormat = (triggerSequence == null) ? "" : triggerSequence.format(); }
Source:
public Map<String, TaskFactory> getTaskFactory() { Map<String, TaskFactory> taskRegistry = new HashMap<>(); for (String taskClass : taskClasses) { TaskFactory taskFac = context -> { try { AbstractTask task = AbstractTask.class.cast(Class.forName(taskClass).newInstance()); task.setParticipant(GlobalParticipant.this); return task.setCallbackContext(context).setTaskHelper(new TaskHelperImpl()); } catch (InstantiationException | IllegalAccessException e) { logger.error("Failed to initialize the task", e); return null; } catch (ClassNotFoundException e) { logger.error("Task class can not be found in the class path", e); return null; } }; TaskDef taskDef; try { taskDef = Class.forName(taskClass).getAnnotation(TaskDef.class); taskRegistry.put(taskDef.name(), taskFac); } catch (ClassNotFoundException e) { e.printStackTrace(); } } return taskRegistry; }

Target:
public Map<String, TaskFactory> getTaskFactory() { Map<String, TaskFactory> taskRegistry = new HashMap<>(); for (String taskClass : taskClasses) { TaskFactory taskFac = context -> { try { return AbstractTask.class.cast(Class.forName(taskClass).newInstance()) .setParticipant(GlobalParticipant.this) .setCallbackContext(context) .setTaskHelper(new TaskHelperImpl()); } catch (InstantiationException | IllegalAccessException e) { logger.error("Failed to initialize the task", e); return null; } catch (ClassNotFoundException e) { logger.error("Task class can not be found in the class path", e); return null; } }; TaskDef taskDef; try { taskDef = Class.forName(taskClass).getAnnotation(TaskDef.class); taskRegistry.put(taskDef.name(), taskFac); } catch (ClassNotFoundException e) { e.printStackTrace(); } } return taskRegistry; }
Source:
private InsertRevisionCallable.Result doForceInsertNewDocumentWithHistory(SQLDatabase db, DocumentRevision rev, List<String> revHistory) throws AttachmentException, SQLException { logger.entering("DocumentRevision", "doForceInsertNewDocumentWithHistory()", new Object[]{rev, revHistory}); long docNumericID = insertDocumentID(db,rev.getId()); long parentSequence = 0L; for (int i = 0; i < revHistory.size() - 1; i++) { InsertRevisionCallable.Result result = insertStubRevision(db,docNumericID, revHistory.get(i), parentSequence); if (result.duplicate){ logger.warning(String.format(Locale.ENGLISH, "Attempted to insert duplicate revision with id: %s at revision, %s.", rev.getId(), revHistory.get(i))); } parentSequence = result.sequence; } InsertRevisionCallable callable = new InsertRevisionCallable(); callable.docNumericId = docNumericID; callable.revId = revHistory.get(revHistory.size() - 1); callable.parentSequence = parentSequence; callable.deleted = rev.isDeleted(); callable.current = true; callable.data = rev.getBody().asBytes(); callable.available = true; return callable.call(db); }

Target:
private long doForceInsertNewDocumentWithHistory(SQLDatabase db, DocumentRevision rev, List<String> revHistory) throws AttachmentException{ logger.entering("DocumentRevision", "doForceInsertNewDocumentWithHistory()", new Object[]{rev, revHistory}); long docNumericID = insertDocumentID(db,rev.getId()); long parentSequence = 0L; for (int i = 0; i < revHistory.size() - 1; i++) { parentSequence = insertStubRevision(db,docNumericID, revHistory.get(i), parentSequence); } InsertRevisionCallable callable = new InsertRevisionCallable(); callable.docNumericId = docNumericID; callable.revId = revHistory.get(revHistory.size() - 1); callable.parentSequence = parentSequence; callable.deleted = rev.isDeleted(); callable.current = true; callable.data = rev.getBody().asBytes(); callable.available = true; long sequence = callable.call(db); return sequence; }
Source:
private void notifyTetheringNoUpstream() { final Resources res = getResourcesForSubId(mContext, mActiveDataSubId); final String title = res.getString(R.string.no_upstream_notification_title); final String message = res.getString(R.string.no_upstream_notification_message); final String disableButton = res.getString(R.string.no_upstream_notification_disable_button); final PendingIntent pi = PendingIntent.getBroadcast( mContext.createContextAsUser(UserHandle.CURRENT, 0), 0 , new Intent(ACTION_DISABLE_TETHERING), 0 ); final Action action = new Action.Builder(NO_ICON_ID, disableButton, pi).build(); showNotification(R.drawable.stat_sys_tether_general, title, message, NO_UPSTREAM_NOTIFICATION_ID, null , action); }

Target:
private void notifyTetheringNoUpstream() { final Resources res = getResourcesForSubId(mContext, mActiveDataSubId); final String title = res.getString(R.string.no_upstream_notification_title); final String message = res.getString(R.string.no_upstream_notification_message); final String disableButton = res.getString(R.string.no_upstream_notification_disable_button); if (isEmpty(title) || isEmpty(message) || isEmpty(disableButton)) return; final Intent intent = new Intent(ACTION_DISABLE_TETHERING); intent.setPackage(mContext.getPackageName()); final PendingIntent pi = PendingIntent.getBroadcast( mContext.createContextAsUser(UserHandle.CURRENT, 0 ), 0 , intent, 0 ); final Action action = new Action.Builder(NO_ICON_ID, disableButton, pi).build(); showNotification(R.drawable.stat_sys_tether_general, title, message, NO_UPSTREAM_NOTIFICATION_ID, null , action); }
Source:
protected void runOneIteration() { log.debug("Reaping agents"); final List<String> deadAgents = getDeadAgents(masterModel, timeoutMillis, SYSTEM_CLOCK); log.debug("Reaping dead agents: {}", deadAgents.size(), deadAgents); for (final String agent : deadAgents) { log.info("Reaping dead agent {}", agent); try { masterModel.deregisterHost(agent); } catch (Exception e) { log.error("Failed to reap dead agent {}", agent, e); } } }

Target:
protected void runOneIteration() { log.debug("Reaping agents"); final List<String> agents = masterModel.listHosts(); for (final String agent : agents) { try { final HostStatus hostStatus = masterModel.getHostStatus(agent); if (hostStatus == null || hostStatus.getStatus() != HostStatus.Status.DOWN) { continue; } final AgentInfo agentInfo = hostStatus.getAgentInfo(); if (agentInfo == null) { continue; } final long downSince = agentInfo.getStartTime() + agentInfo.getUptime(); final long downDurationMillis = clock.now().getMillis() - downSince; if (downDurationMillis >= timeoutMillis) { try { log.info("Reaping dead agent '{}' (DOWN for hours)", DurationFormatUtils.formatDurationHMS(downDurationMillis)); masterModel.deregisterHost(agent); } catch (Exception e) { log.warn("Failed to reap agent '{}'", agent, e); } } } catch (Exception e) { log.warn("Failed to determine if agent '{}' should be reaped", agent, e); } } }
Source:
public Response cancelPayment(@ApiParam(value = "accountId", hidden = true) @Auth Account account, @PathParam("paymentId") String paymentId) { logger.info("Payment cancel request - payment_id=[{}]", paymentId); String url = account.getPaymentType().equals(DIRECT_DEBIT) ? connectorDDUrl : connectorUrl; UriBuilder builder = UriBuilder .fromPath(url) .path(format("/v1/api/accounts/%s/charges/%s/cancel", account.getAccountId(), paymentId)); Collections.<Pair<String, String>>emptyList().stream().forEach(pair -> { if (isNotBlank(pair.getRight())) { builder.queryParam(pair.getKey(), pair.getValue()); } }); Response connectorResponse = client .target(builder.toString()) .request() .post(Entity.json("{}")); if (connectorResponse.getStatus() == HttpStatus.SC_NO_CONTENT) { connectorResponse.close(); return Response.noContent().build(); } throw new CancelChargeException(connectorResponse); }

Target:
public Response cancelPayment(@ApiParam(value = "accountId", hidden = true) @Auth Account account, @PathParam("paymentId") String paymentId) { logger.info("Payment cancel request - payment_id=[{}]", paymentId); Response connectorResponse = client .target(connectorUriGenerator.cancelURI(account, paymentId)) .request() .post(Entity.json("{}")); if (connectorResponse.getStatus() == HttpStatus.SC_NO_CONTENT) { connectorResponse.close(); return Response.noContent().build(); } throw new CancelChargeException(connectorResponse); }
Source:
public long getDelayBetweenSyncs(@NonNull TimeUnit unit) { return TimeUnit.MILLISECONDS.convert(this.getDelayBetweenSyncs(), unit); }

Target:
public long getDelayBetweenSyncs(@NonNull TimeUnit unit) { return unit.convert(this.getDelayBetweenSyncs(), TimeUnit.MILLISECONDS); }
Source:
public String testConnection(Request request, Response response) { JsonReader jsonReader = GsonTransformer.getInstance().jsonReaderFrom(request.body()); String type = jsonReader.getString("type"); haltIfMaterialTypeIsInvalid(type); haltIfMaterialTypeDoesNotSupportsCheckConnection(type); ScmMaterialConfig scmMaterialConfig = buildEntityFromRequestBody(request); validateMaterialConfig(scmMaterialConfig, jsonReader); if (!scmMaterialConfig.errors().isEmpty()) { List<String> errorsList = new ArrayList<>(); scmMaterialConfig.errors().forEach((key, errors) -> errorsList.add(String.format("- %s: %s", key, StringUtils.join(errors, ", ")))); response.status(422); return MessageJson.create(String.format("There was an error with the material configuration.\n%s", StringUtils.join(errorsList, "\n")), jsonWriter(scmMaterialConfig)); } performParamExpansion(scmMaterialConfig, jsonReader); Material material = materialConfigConverter.toMaterial(scmMaterialConfig); try { ValidationBean validationBean = material.checkConnection(new CheckConnectionSubprocessExecutionContext(systemEnvironment)); return handleValidationBeanResponse(validationBean, response); } catch (UnsupportedOperationException e) { response.status(422); return MessageJson.create(String.format("The material of type '%s' does not support connection testing.", type)); } }

Target:
public String testConnection(Request request, Response response) { JsonReader jsonReader = GsonTransformer.getInstance().jsonReaderFrom(request.body()); String type = jsonReader.getString("type"); String pipelineName = jsonReader.getStringOrDefault("pipeline_name", ""); String pipelineGroupName = jsonReader.getStringOrDefault("pipeline_group", ""); haltIfMaterialTypeIsInvalid(type); haltIfMaterialTypeDoesNotSupportsCheckConnection(type); ScmMaterialConfig scmMaterialConfig = buildEntityFromRequestBody(request); validateMaterialConfig(scmMaterialConfig, pipelineName, pipelineGroupName); if (!scmMaterialConfig.errors().isEmpty()) { List<String> errorsList = new ArrayList<>(); scmMaterialConfig.errors().forEach((key, errors) -> errorsList.add(String.format("- %s: %s", key, StringUtils.join(errors, ", ")))); response.status(422); return MessageJson.create(String.format("There was an error with the material configuration.\n%s", StringUtils.join(errorsList, "\n")), jsonWriter(scmMaterialConfig)); } if (isNotBlank(pipelineName)) { performParamExpansion(scmMaterialConfig, pipelineName); } Material material = materialConfigConverter.toMaterial(scmMaterialConfig); ValidationBean validationBean = material.checkConnection(new CheckConnectionSubprocessExecutionContext(systemEnvironment)); return handleValidationBeanResponse(validationBean, response); }
Source:
public static UserAgentProperties getUserAgentProperties(String propertiesFileName) { Map<String, String> propertyMap = getProperties(propertiesFileName); String name = propertyMap.getOrDefault(NAME, "UnknownName"); String version = propertyMap.getOrDefault(VERSION, "UnknownVersion"); return new UserAgentProperties(name, version); }

Target:
public static UserAgentProperties getUserAgentProperties(String propertiesFileName) { Map<String, String> propertyMap = getProperties(propertiesFileName); String name = propertyMap.getOrDefault(NAME, UNKNOWN_NAME); String version = propertyMap.getOrDefault(VERSION, UNKNOWN_VERSION); return new UserAgentProperties(name, version); }
Source:
public void testTranslateServiceCreationConfigurationWithoutTags() { ManagementRegistryServiceConfigurationParser configTranslator = new ManagementRegistryServiceConfigurationParser(); DefaultManagementRegistryConfiguration defaultManagementRegistryConfiguration = new DefaultManagementRegistryConfiguration().setCacheManagerAlias("my-cache-alias"). setCollectorExecutorAlias("my-executor"); Node retElement = configTranslator.unparseServiceCreationConfiguration(defaultManagementRegistryConfiguration); assertThat(retElement, is(notNullValue())); assertThat(retElement.getNodeName(), is("mgm:management")); assertThat(retElement.getAttributes(), is(notNullValue())); assertThat(retElement.getAttributes().getLength(), is(3)); assertThat(retElement.getAttributes().item(0).getNodeName(), is("cache-manager-alias")); assertThat(retElement.getAttributes().item(0).getNodeValue(), is("my-cache-alias")); assertThat(retElement.getAttributes().item(1).getNodeName(), is("collector-executor-alias")); assertThat(retElement.getAttributes().item(1).getNodeValue(), is("my-executor")); assertThat(retElement.getAttributes().item(2).getNodeName(), is("xmlns:mgm")); assertThat(retElement.getAttributes().item(2).getNodeValue(), is("<LINK_0>")); assertThat(retElement.getFirstChild(), is(nullValue())); }

Target:
public void testTranslateServiceCreationConfigurationWithoutTags() { ManagementRegistryServiceConfigurationParser configTranslator = new ManagementRegistryServiceConfigurationParser(); DefaultManagementRegistryConfiguration defaultManagementRegistryConfiguration = new DefaultManagementRegistryConfiguration().setCacheManagerAlias("my-cache-alias"). setCollectorExecutorAlias("my-executor"); Node retElement = configTranslator.unparseServiceCreationConfiguration(defaultManagementRegistryConfiguration); assertThat(retElement, is(notNullValue())); assertThat(retElement.getNodeName(), is("mgm:management")); checkAttributeItems(retElement); assertThat(retElement.getFirstChild(), is(nullValue())); }
Source:
protected void ExecuteIrsBrokerCommand() { final P params = getParameters(); final String storagePoolId = params.getStoragePoolId().toString(); final String targetVersion = params.getCompatibilityVersion(); log.info("Upgrading storage pool \"" + storagePoolId + "\" to version \"" + targetVersion + "\""); status = getIrsProxy().upgradeStoragePool(storagePoolId, targetVersion); ProceedProxyReturnValue(); }

Target:
protected void ExecuteIrsBrokerCommand() { final P params = getParameters(); final String storagePoolId = params.getStoragePoolId().toString(); final String targetVersion = params.getCompatibilityVersion(); log.infoFormat("Upgrading storage pool {0} to version {1}", storagePoolId, targetVersion); status = getIrsProxy().upgradeStoragePool(storagePoolId, targetVersion); ProceedProxyReturnValue(); }
Source:
public void close() { if (watchDog != null) { ipythonClient.stop(StopRequest.newBuilder().build()); watchDog.destroyProcess(); LOGGER.debug("Kill IPython Process"); } }

Target:
public void close() { if (watchDog != null) { LOGGER.debug("Kill IPython Process"); ipythonClient.stop(StopRequest.newBuilder().build()); watchDog.destroyProcess(); gatewayServer.shutdown(); } }
Source:
protected String createHttpRequestURL() { String bugUrl = getUrlSuffix(); LoginToken token = ((BugzillaRestHttpClient) getClient()).getLoginToken(); if ((!(this instanceof BugzillaRestValidateRequest) && !(this instanceof BugzillaRestUnauthenticatedGetRequest)) && token != null && bugUrl.length() > 0) { if (!bugUrl.endsWith("?")) { bugUrl += "&"; } bugUrl += "token=" + token.getToken(); } return baseUrl() + bugUrl; }

Target:
protected String createHttpRequestURL() { String bugUrl = getUrlSuffix(); LoginToken token = ((BugzillaRestHttpClient) getClient()).getLoginToken(); if (token != null && bugUrl.length() > 0) { if (!bugUrl.endsWith("?")) { bugUrl += "&"; } bugUrl += "token=" + token.getToken(); } return baseUrl() + bugUrl; }
Source:
public void testDecode() throws Exception { Xrb28ProtocolDecoder decoder = new Xrb28ProtocolDecoder(null); verifyAttributes(decoder, text( "*SCOR,OM,123456789123456,Q0,412,80,28#")); verifyPosition(decoder, text( "*SCOR,OM,867584030387299,D0,0,012102.00,A,0608.00062,S,10659.70331,E,12,0.69,151118,30.3,M,A#")); verifyAttributes(decoder, text( "*SCOR,OM,863158022988725,H0,0,412,28,80,0#")); verifyAttributes(decoder, text( "*HBCR,OM,123456789123456,R0,0,55,1234,1497689816#")); verifyPosition(decoder, text( "*HBCR,OM,123456789123456,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); verifyPosition(decoder, text( "*SCOR,OM,863158022988725,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); verifyPosition(decoder, text( "*HBCR,OM,123456789123456,D0,1,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); verifyPosition(decoder, text( "*SCOR,OM,863158022988725,D0,1,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); }

Target:
public void testDecode() throws Exception { Xrb28ProtocolDecoder decoder = new Xrb28ProtocolDecoder(null); verifyAttributes(decoder, text( "*SCOR,OM,123456789123456,Q0,412,80,28#")); verifyPosition(decoder, text( "*SCOR,OM,867584030387299,D0,0,012102.00,A,0608.00062,S,10659.70331,E,12,0.69,151118,30.3,M,A#")); verifyAttributes(decoder, text( "*SCOR,OM,863158022988725,H0,0,412,28,80,0#")); verifyAttributes(decoder, text( "*HBCR,OM,123456789123456,R0,0,55,1234,1497689816#")); verifyPosition(decoder, text( "*HBCR,OM,123456789123456,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); verifyPosition(decoder, text( "*SCOR,OM,863158022988725,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); verifyPosition(decoder, text( "*SCOR,NG,868020030308430,D0,1,020455.00,A,2359.36129,S,04615.24677,W,12,0.72,201119,8.5,M,A#")); }