auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static Trade createTrade1() { return FraConvention.of(IborIndex.of("USD-LIBOR-3M")).toTrade( TradeInfo.builder() .id(StandardId.of("example", "1")) .addAttribute(TradeAttributeType.DESCRIPTION, "0x3 FRA") .counterparty(StandardId.of("example", "A")) .settlementDate(LocalDate.of(2014, 9, 14)) .build(), LocalDate.of(2014, 9, 12), LocalDate.of(2014, 12, 12), LocalDate.of(2014, 9, 12), BuySell.SELL, 10_000_000, 0.0125); }

Target:
private static Trade createTrade1() { Fra fra = Fra.builder() .buySell(BuySell.SELL) .index(IborIndices.USD_LIBOR_3M) .startDate(LocalDate.of(2014, 9, 12)) .endDate(LocalDate.of(2014, 12, 12)) .fixedRate(0.0125) .notional(10_000_000) .build(); return FraTrade.builder() .product(fra) .info(TradeInfo.builder() .id(StandardId.of("example", "1")) .addAttribute(TradeAttributeType.DESCRIPTION, "0x3 FRA") .counterparty(StandardId.of("example", "A")) .settlementDate(LocalDate.of(2014, 9, 14)) .build()) .build(); }
Source:
public void setup() { schema = "S_"+generateUniqueName(); tableName = "T_"+generateUniqueName(); viewName = "V_"+generateUniqueName(); viewIndex = "VI_"+generateUniqueName(); indexName = "I_"+generateUniqueName(); inputTable = Mockito.mock(PTable.class); }

Target:
public void setup() { schema = "S_" + generateUniqueName(); tableName = "T_" + generateUniqueName(); indexName = "I_" + generateUniqueName(); inputTable = Mockito.mock(PTable.class); }
Source:
protected Message createMessage(Object objectToConvert, MessageProperties messageProperties, @Nullable Type genericType) throws MessageConversionException { byte[] bytes; try { if (getDefaultCharset().equals("UTF-8")) { bytes = this.objectMapper.writeValueAsBytes(objectToConvert); } else { String jsonString = this.objectMapper .writeValueAsString(objectToConvert); bytes = jsonString.getBytes(getDefaultCharset()); } } catch (IOException e) { throw new MessageConversionException("Failed to convert Message content", e); } messageProperties.setContentType(this.supportedContentType.toString()); messageProperties.setContentEncoding(getDefaultCharset()); messageProperties.setContentLength(bytes.length); if (getClassMapper() == null) { getJavaTypeMapper().fromJavaType(this.objectMapper.constructType( genericType == null ? objectToConvert.getClass() : genericType), messageProperties); } else { getClassMapper().fromClass(objectToConvert.getClass(), messageProperties); } return new Message(bytes, messageProperties); }

Target:
protected Message createMessage(Object objectToConvert, MessageProperties messageProperties, @Nullable Type genericType) throws MessageConversionException { byte[] bytes; try { if (this.standardCharset) { bytes = this.objectMapper.writeValueAsBytes(objectToConvert); } else { String jsonString = this.objectMapper .writeValueAsString(objectToConvert); bytes = jsonString.getBytes(getDefaultCharset()); } } catch (IOException e) { throw new MessageConversionException("Failed to convert Message content", e); } messageProperties.setContentType(this.supportedContentType.toString()); messageProperties.setContentEncoding(getDefaultCharset()); messageProperties.setContentLength(bytes.length); if (getClassMapper() == null) { getJavaTypeMapper().fromJavaType(this.objectMapper.constructType( genericType == null ? objectToConvert.getClass() : genericType), messageProperties); } else { getClassMapper().fromClass(objectToConvert.getClass(), messageProperties); } return new Message(bytes, messageProperties); }
Source:
public void visitCompilationUnit(CompilationUnitTree tree) { exclusions.clear(); super.visitCompilationUnit(tree); for (Scope scope : context().symbolTable().getScopes()) { if (scope.tree() instanceof FunctionTree) { checkScope(scope); } } }

Target:
public void visitCompilationUnit(CompilationUnitTree tree) { exclusions.clear(); super.visitCompilationUnit(tree); for (Scope scope : context().symbolTable().getScopes()) { if (scope.tree().is(Kind.FUNCTION_EXPRESSION, Kind.FUNCTION_DECLARATION, Kind.METHOD_DECLARATION)) { checkScope(scope); } } }
Source:
public boolean isSpatialJoin() { return (type == INNER || type == LEFT) && criteria.isEmpty() && filter.isPresent() && isSpatialJoinFilter(left, right, filter.get()); }

Target:
public boolean isSpatialJoin() { if (spatialJoin.isPresent()) { return spatialJoin.get(); } spatialJoin = Optional.of((type == INNER || type == LEFT) && criteria.isEmpty() && filter.isPresent() && isSpatialJoinFilter(left, right, filter.get())); return spatialJoin.get(); }
Source:
public void testMain() { try { Assert.assertTrue( true ); } catch ( final Exception e ) { Assert.fail( "Exception occured: " + e ); } }

Target:
public void testMain() { try { StringUtil.main( null ); Assert.assertTrue( true ); } catch ( final Exception e ) { Assert.fail( "Exception occured: " + e ); } }
Source:
public List<WebElement> findElements() { if (cachedElementList != null && shouldCache) { return cachedElementList; } List<WebElement> result; try { result = waitFor(() -> { List<WebElement> list = searchContext .findElements(getBy(by, searchContext)); if (list.size() > 0) { return list; } return null; }); } catch (TimeoutException | StaleElementReferenceException e) { result = new ArrayList<>(); } if (shouldCache) { cachedElementList = result; } return result; }

Target:
public List<WebElement> findElements() { if (cachedElementList != null && shouldCache) { return cachedElementList; } List<WebElement> result; try { result = waitFor(() -> { List<WebElement> list = searchContext .findElements(getBy(by, searchContext)); return list.size() > 0 ? list : null; }); } catch (TimeoutException | StaleElementReferenceException e) { result = new ArrayList<>(); } if (shouldCache) { cachedElementList = result; } return result; }
Source:
public boolean canExecute(ITmfTrace trace) { return (CtfTmfTraceStub.class.isAssignableFrom(trace.getClass())); }

Target:
public boolean canExecute(ITmfTrace trace) { return (TmfTraceStub.class.isAssignableFrom(trace.getClass())); }
Source:
public static void toJSON(OutputWriter outputWriter, StageInstanceModel stageInstanceModel) { if (stageInstanceModel.getResult() != null) { outputWriter.add("result", stageInstanceModel.getResult().toString()); } if (stageInstanceModel.getRerunOfCounter() == null) { outputWriter.add("rerun_of_counter", "null"); } else { outputWriter.add("rerun_of_counter", stageInstanceModel.getRerunOfCounter()); } outputWriter.add("id", stageInstanceModel.getId()) .add("name", stageInstanceModel.getName()) .add("counter", stageInstanceModel.getCounter()) .add("scheduled", stageInstanceModel.isScheduled()) .add("approval_type", stageInstanceModel.getApprovalType()) .add("approved_by", stageInstanceModel.getApprovedBy()) .add("operate_permission", stageInstanceModel.hasOperatePermission()) .add("can_run", stageInstanceModel.getCanRun()) .addChildList("jobs", jobsWriter -> stageInstanceModel.getBuildHistory() .forEach(jobHistoryItem -> jobsWriter.addChild(jobWriter -> JobHistoryItemRepresenter.toJSON(jobWriter, jobHistoryItem)))); }

Target:
public static void toJSON(OutputWriter outputWriter, StageInstanceModel stageInstanceModel) { if (stageInstanceModel.getResult() != null) { outputWriter.add("result", stageInstanceModel.getResult().toString()); } if (stageInstanceModel.getRerunOfCounter() == null) { outputWriter.renderNull("rerun_of_counter"); } else { outputWriter.add("rerun_of_counter", stageInstanceModel.getRerunOfCounter()); } outputWriter.add("id", stageInstanceModel.getId()) .add("name", stageInstanceModel.getName()) .add("counter", stageInstanceModel.getCounter()) .add("scheduled", stageInstanceModel.isScheduled()) .add("approval_type", stageInstanceModel.getApprovalType()) .add("approved_by", stageInstanceModel.getApprovedBy()) .add("operate_permission", stageInstanceModel.hasOperatePermission()) .add("can_run", stageInstanceModel.getCanRun()) .addChildList("jobs", jobsWriter -> stageInstanceModel.getBuildHistory() .forEach(jobHistoryItem -> jobsWriter.addChild(jobWriter -> JobHistoryItemRepresenter.toJSON(jobWriter, jobHistoryItem)))); }
Source:
public FetcherThread(Config conf, int num) { this.setDaemon(true); this.setName("FetcherThread #" + num); this.maxCrawlDelay = ConfUtils.getInt(conf, "fetcher.max.crawl.delay", 30) * 1000; this.crawlDelay = (long) (ConfUtils.getFloat(conf, "fetcher.server.delay", 1.0f) * 1000); this.threadNum = num; }

Target:
public FetcherThread(Config conf, int num) { this.setDaemon(true); this.setName("FetcherThread #" + num); this.maxCrawlDelay = ConfUtils.getInt(conf, "fetcher.max.crawl.delay", 30) * 1000; this.maxCrawlDelayForce = ConfUtils.getBoolean(conf, "fetcher.max.crawl.delay.force", false); this.crawlDelayForce = ConfUtils.getBoolean(conf, "fetcher.server.delay.force", false); this.threadNum = num; }
Source:
private static String findPath(IAdaptable adaptable) { String result = null; final IResourceVariant variant = (IResourceVariant)adaptable.getAdapter(IResourceVariant.class); if (variant != null) { try { IStorage storage = variant.getStorage(new NullProgressMonitor()); final Object adapter = Platform.getAdapterManager().loadAdapter(storage, IStoragePathProvider.class.getName()); if (adapter instanceof IStoragePathProvider) { IPath computeFixedPath = ((IStoragePathProvider)adapter).computeFixedPath(storage); result = computeFixedPath.toString(); } else if (variant instanceof CachedResourceVariant) { result = ((CachedResourceVariant)variant).getDisplayPath().toString(); } else if (storage instanceof IFile) { result = storage.getFullPath().toString(); } } catch (TeamException e) { } } return result; }

Target:
private static String findPath(IAdaptable adaptable) { String result = null; final IResourceVariant variant = (IResourceVariant)adaptable.getAdapter(IResourceVariant.class); if (variant != null) { try { final IStorage storage = variant.getStorage(new NullProgressMonitor()); final Object adapter = Platform.getAdapterManager().loadAdapter(storage, IStoragePathProvider.class.getName()); if (adapter instanceof IStoragePathProvider) { final IPath fixedPath = ((IStoragePathProvider)adapter).computeFixedPath(storage); result = fixedPath.toString(); } else if (variant instanceof CachedResourceVariant) { result = ((CachedResourceVariant)variant).getDisplayPath().toString(); } else if (storage instanceof IFile) { result = storage.getFullPath().toString(); } } catch (TeamException e) { } } return result; }
Source:
public List<Certificate> getEntitlementCertificates( @PathParam("consumer_uuid") @Verify(Consumer.class) String consumerUuid, @QueryParam("serials") String serials) { log.debug("Getting client certificates for consumer: {}", consumerUuid); Consumer consumer = consumerCurator.verifyAndLookupConsumer(consumerUuid); poolManager.regenerateDirtyEntitlements(consumer); Set<Long> serialSet = this.extractSerials(serials); List<Certificate> returnCerts = new LinkedList<Certificate>(); List<EntitlementCertificate> allCerts = entCertService .listForConsumer(consumer); for (EntitlementCertificate cert : allCerts) { if (serialSet.isEmpty() || serialSet.contains(cert.getSerial().getId())) { returnCerts.add(cert); } } if (consumer.getContentAccessCert() != null) { try { returnCerts.add(contentAccessCertService.getCertificate(consumer)); } catch (IOException ioe) { throw new BadRequestException(i18n.tr("Cannot retrieve content access certificate.")); } catch (GeneralSecurityException gse) { throw new BadRequestException(i18n.tr("Cannot retrieve content access certificate.")); } } return returnCerts; }

Target:
public List<Certificate> getEntitlementCertificates( @PathParam("consumer_uuid") @Verify(Consumer.class) String consumerUuid, @QueryParam("serials") String serials) { log.debug("Getting client certificates for consumer: {}", consumerUuid); Consumer consumer = consumerCurator.verifyAndLookupConsumer(consumerUuid); checkForGuestMigration(consumer); poolManager.regenerateDirtyEntitlements(consumer); Set<Long> serialSet = this.extractSerials(serials); List<Certificate> returnCerts = new LinkedList<Certificate>(); List<EntitlementCertificate> allCerts = entCertService .listForConsumer(consumer); for (EntitlementCertificate cert : allCerts) { if (serialSet.isEmpty() || serialSet.contains(cert.getSerial().getId())) { returnCerts.add(cert); } } if (!consumer.getOwner().contentAccessMode() .equals(ContentAccessCertServiceAdapter.DEFAULT_CONTENT_ACCESS_MODE)) { try { Certificate cert = contentAccessCertService.getCertificate(consumer); if (cert != null) { returnCerts.add(cert); } } catch (IOException ioe) { throw new BadRequestException(i18n.tr("Cannot retrieve content access certificate"), ioe); } catch (GeneralSecurityException gse) { throw new BadRequestException(i18n.tr("Cannot retrieve content access certificate"), gse); } } return returnCerts; }
Source:
public void run() { String operationResult = null; Exception exception = null; try { String blobId = new BlobId(BlobId.DEFAULT_FLAG, ClusterMapUtils.UNKNOWN_DATACENTER_ID, Account.UNKNOWN_ACCOUNT_ID, Container.UNKNOWN_CONTAINER_ID, getPartitionForPut()).getID(); if (blobs.containsKey(blobId)) { exception = new RouterException("Blob ID duplicate created.", RouterErrorCode.UnexpectedInternalError); } ByteBuffer blobData = readBlob(postData.getReadableStreamChannel()); InMemoryRouter.InMemoryBlob blob = new InMemoryRouter.InMemoryBlob(postData.getBlobProperties(), postData.getUsermetadata(), blobData); blobs.put(blobId, blob); if (notificationSystem != null) { notificationSystem.onBlobCreated(blobId, postData.getBlobProperties(), postData.getUsermetadata(), NotificationBlobType.Simple); } operationResult = blobId; } catch (Exception e) { if (e instanceof RouterException) { exception = e; } else { exception = new RouterException(e, RouterErrorCode.UnexpectedInternalError); } } finally { InMemoryRouter.completeOperation(postData.getFuture(), postData.getCallback(), operationResult, exception); } }

Target:
public void run() { String operationResult = null; Exception exception = null; try { String blobId = new BlobId(BlobId.DEFAULT_FLAG, ClusterMapUtils.UNKNOWN_DATACENTER_ID, Account.UNKNOWN_ACCOUNT_ID, Container.UNKNOWN_CONTAINER_ID, getPartitionForPut()).getID(); if (blobs.containsKey(blobId)) { exception = new RouterException("Blob ID duplicate created.", RouterErrorCode.UnexpectedInternalError); } ByteBuffer blobData = readBlob(postData.getReadableStreamChannel()); InMemoryRouter.InMemoryBlob blob = new InMemoryRouter.InMemoryBlob(postData.getBlobProperties(), postData.getUsermetadata(), blobData); blobs.put(blobId, blob); if (notificationSystem != null) { notificationSystem.onBlobCreated(blobId, postData.getBlobProperties(), postData.getUsermetadata(), NotificationBlobType.Simple); } operationResult = blobId; } catch (RouterException e) { exception = e; } catch (Exception e) { exception = new RouterException(e, RouterErrorCode.UnexpectedInternalError); } finally { InMemoryRouter.completeOperation(postData.getFuture(), postData.getCallback(), operationResult, exception); } }
Source:
public void apply(OnlineCommandContext ctx) throws Exception { Operations ops = new Operations(ctx.client); Address address = Address.subsystem("resource-adapters").and("resource-adapter", resourceAdapterId) .and("connection-definitions", poolName); ops.add(address, Values.of("class-name", "org.jboss.resource.adapter.jms.JmsManagedConnectionFactory") .and("jndi-name", localJndiName)); if (security) { ops.writeAttribute(address, "security-application", true); } if (userName != null) { ops.writeAttribute(address, "recovery-username", userName); } if (password != null) { ops.writeAttribute(address, "recovery-password", password); } ops.writeAttribute(address, "tracking", tracking); if (properties.size() > 0) { Iterator it = properties.entrySet().iterator(); while (it.hasNext()) { Map.Entry pair = (Map.Entry) it.next(); Address configPropsAddress = Address.subsystem("resource-adapters") .and("resource-adapter", resourceAdapterId) .and("connection-definitions", poolName).and("config-properties", (String) pair.getKey()); ops.add(configPropsAddress, Values.of("value", (String) pair.getValue())); } } }

Target:
public void apply(OnlineCommandContext ctx) throws Exception { Batch batch = new Batch(); Address address = Address.subsystem("resource-adapters").and("resource-adapter", resourceAdapterId) .and("connection-definitions", poolName); batch.add(address, Values.of("class-name", "org.jboss.resource.adapter.jms.JmsManagedConnectionFactory") .and("jndi-name", localJndiName)); if (security) { batch.writeAttribute(address, "security-application", true); } if (userName != null) { batch.writeAttribute(address, "recovery-username", userName); } if (password != null) { batch.writeAttribute(address, "recovery-password", password); } batch.writeAttribute(address, "tracking", tracking); for (Map.Entry<String, String> pair : properties.entrySet()) { Address configPropsAddress = Address.subsystem("resource-adapters") .and("resource-adapter", resourceAdapterId) .and("connection-definitions", poolName).and("config-properties", pair.getKey()); batch.add(configPropsAddress, Values.of("value", pair.getValue())); } new Operations(ctx.client).batch(batch); }
Source:
private void migrateSections() { this.sections = new ConcurrentHashMap<>(); ExecutorService executor = Executors.newFixedThreadPool(THREAD_POOL_SIZE); for(School school : this.schools) { Long sourceSystemSchoolId = Long.valueOf(school.getSourceSystemId()); sections.put(sourceSystemSchoolId, new ConcurrentHashMap<>()); SectionSyncRunnable sectionRunnable = new SectionSyncRunnable( powerSchool, edPanel, school, this.courses.get(sourceSystemSchoolId), this.terms.get(sourceSystemSchoolId), staffAssociator, studentAssociator, this.sections.get(sourceSystemSchoolId), unresolvablePowerStudents); executor.execute(sectionRunnable); } executor.shutdown(); try { executor.awaitTermination(TOTAL_TTL_MINUTES, TimeUnit.MINUTES); } catch(InterruptedException e) { System.out.println("Max TTL for the migration process was exceeded and the migration terminated. " + "Max TTL (minutes) is: " + TOTAL_TTL_MINUTES); } }

Target:
private void migrateSections() { this.sections = new ConcurrentHashMap<>(); ExecutorService executor = Executors.newFixedThreadPool(THREAD_POOL_SIZE); for(School school : this.schools) { Long sourceSystemSchoolId = Long.valueOf(school.getSourceSystemId()); sections.put(sourceSystemSchoolId, new ConcurrentHashMap<>()); SectionSyncRunnable sectionRunnable = new SectionSyncRunnable( powerSchool, edPanel, school, this.courses.get(sourceSystemSchoolId), this.terms.get(sourceSystemSchoolId), staffAssociator, studentAssociator, this.sections.get(sourceSystemSchoolId), unresolvablePowerStudents); executor.execute(sectionRunnable); } executor.shutdown(); try { executor.awaitTermination(TOTAL_TTL_MINUTES, TimeUnit.MINUTES); } catch(InterruptedException e) { System.out.println("Executor thread pool interrupted " + e.getMessage()); } }
Source:
public void testStartSession() { final String TEST_SESSION_NAME = "testStartSession"; final int TEST_THREAD_ID = 0; assertTrue(mTestSessionManager.mSessionMapper.isEmpty()); mTestSessionManager.mCurrentThreadId = () -> TEST_THREAD_ID; mTestSessionManager.startSession(TEST_SESSION_NAME, null); Session testSession = mTestSessionManager.mSessionMapper.get(TEST_THREAD_ID); assertEquals(TEST_SESSION_NAME, testSession.getShortMethodName()); assertFalse(testSession.isSessionCompleted()); assertFalse(testSession.isStartedFromActiveSession()); }

Target:
public void testStartSession() { assertTrue(mTestSessionManager.mSessionMapper.isEmpty()); mTestSessionManager.mCurrentThreadId = () -> TEST_PARENT_THREAD_ID; mTestSessionManager.startSession(TEST_PARENT_NAME, null); Session testSession = mTestSessionManager.mSessionMapper.get(TEST_PARENT_THREAD_ID); assertEquals(TEST_PARENT_NAME, testSession.getShortMethodName()); assertFalse(testSession.isSessionCompleted()); assertFalse(testSession.isStartedFromActiveSession()); }
Source:
public void tickCubeServer(BooleanSupplier tryToTickFaster, Random rand) { if (!isFullyPopulated || this.storage == null) { return; } tickCubeCommon(tryToTickFaster); Iterator<NextTickListEntry> pti = pendingTickListEntriesTreeSet.iterator(); while (pti.hasNext()) { NextTickListEntry ntle = pti.next(); if (ntle.scheduledTime > world.getTotalWorldTime()) return; BlockPos pos = ntle.position; IBlockState iblockstate = this.storage.get(pos.getX() & 15, pos.getY() & 15, pos.getZ() & 15); if (iblockstate.getMaterial() != Material.AIR && iblockstate.getBlock() == ntle.getBlock()) { iblockstate.getBlock().updateTick((WorldServer) world, ntle.position, iblockstate, rand); } pti.remove(); } int tickLimit = 256; pti = pendingTickListEntriesHashSet.iterator(); while (pti.hasNext() && --tickLimit != 0) { NextTickListEntry ntle = pti.next(); pendingTickListEntriesTreeSet.add(ntle); pti.remove(); } }

Target:
public void tickCubeServer(BooleanSupplier tryToTickFaster, Random rand) { if (!isFullyPopulated) { return; } tickCubeCommon(tryToTickFaster); Iterator<NextTickListEntry> pti = pendingTickListEntriesTreeSet.iterator(); while (pti.hasNext()) { NextTickListEntry ntle = pti.next(); if (ntle.scheduledTime > world.getTotalWorldTime()) return; BlockPos pos = ntle.position; IBlockState iblockstate = this.storage.get(pos.getX() & 15, pos.getY() & 15, pos.getZ() & 15); if (iblockstate.getMaterial() != Material.AIR && iblockstate.getBlock() == ntle.getBlock()) { iblockstate.getBlock().updateTick((WorldServer) world, ntle.position, iblockstate, rand); } pti.remove(); } int tickLimit = 256; pti = pendingTickListEntriesHashSet.iterator(); while (pti.hasNext() && --tickLimit != 0) { NextTickListEntry ntle = pti.next(); pendingTickListEntriesTreeSet.add(ntle); pti.remove(); } }
Source:
public final void consume(final Span span) { if (numInflights.incrementAndGet() <= maxInflights) { ListenableFuture<Span> future = executorService.submit(() -> { doConsume(span); return span; }); Futures.addCallback(future, new FutureCallback<Span>() { @Override public void onSuccess(Span result) { numInflights.decrementAndGet(); } @Override public void onFailure(Throwable error) { log.trace("Failed to notify observer", error); numInflights.decrementAndGet(); } }); } else { log.trace("Failed to notify span observer since the maximum number of allowed concurrent observations was " + "exceeded: {}", SafeArg.of("maxInflights", maxInflights)); numInflights.decrementAndGet(); } }

Target:
public final void consume(final Span span) { if (numInflights.incrementAndGet() <= maxInflights) { ListenableFuture<Span> future = executorService.submit(() -> { doConsume(span); return span; }); Futures.addCallback(future, new FutureCallback<Span>() { @Override public void onSuccess(Span result) { numInflights.decrementAndGet(); } @Override public void onFailure(Throwable error) { log.trace("Failed to notify observer", error); numInflights.decrementAndGet(); } }); } else { log.trace("Failed to notify span observer since the maximum number of allowed concurrent observations was " + "exceeded", SafeArg.of("maxInflights", maxInflights)); numInflights.decrementAndGet(); } }
Source:
public FileBasedConfig openUserConfig(Config parent, FS fs) { final File home = fs.userHome(); File userConfig = new File(home, ".gitconfig"); try { userConfig.canRead(); } catch (AccessControlException e) { return new FileBasedConfig(parent, null, fs) { public void load() { } public boolean isOutdated() { return false; } }; } return new FileBasedConfig(parent, userConfig, fs); }

Target:
public FileBasedConfig openUserConfig(Config parent, FS fs) { final File home = fs.userHome(); File userConfig = new File(home, ".gitconfig"); try { userConfig.canRead(); } catch (AccessControlException e) { LOG.warn(MessageFormat.format(JGitText.get().unableToAccessUserConfig, userConfig.getAbsolutePath())); return new FileBasedConfig(parent, null, fs) { public void load() { } public boolean isOutdated() { return false; } }; } return new FileBasedConfig(parent, userConfig, fs); }
Source:
public TransactionId execute() throws OseeCoreException { Conditions.checkNotNull(comment, "comment"); if (isEmpty() && execptionIfEmpty) { throw new OseeArgumentException("objects/deleteObjects cannot be empty"); } for (IAtsObject atsObject : new ArrayList<>(atsObjects)) { if (atsObject instanceof IAtsWorkItem) { IAtsWorkItem workItem = (IAtsWorkItem) atsObject; if (workItem.getStateMgr().isDirty()) { atsServer.getStateFactory().writeToStore(asUser, workItem, this); } if (workItem.getLog().isDirty()) { atsServer.getLogFactory().writeToStore(workItem, atsServer.getAttributeResolver(), this); } } } TransactionReadable transactionReadable = getTransaction().commit(); System.err.println("too many listeners or processed too many times"); for (IExecuteListener listener : listeners) { listener.changesStored(this); } notifier.sendNotifications(getNotifications()); if (!workItemsCreated.isEmpty()) { WorkflowRuleRunner runner = new WorkflowRuleRunner(RuleEventType.CreateWorkflow, workItemsCreated, atsServer); runner.run(); } return transactionReadable; }

Target:
public TransactionId execute() throws OseeCoreException { Conditions.checkNotNull(comment, "comment"); if (isEmpty() && execptionIfEmpty) { throw new OseeArgumentException("objects/deleteObjects cannot be empty"); } for (IAtsObject atsObject : new ArrayList<>(atsObjects)) { if (atsObject instanceof IAtsWorkItem) { IAtsWorkItem workItem = (IAtsWorkItem) atsObject; if (workItem.getStateMgr().isDirty()) { atsServer.getStateFactory().writeToStore(asUser, workItem, this); } if (workItem.getLog().isDirty()) { atsServer.getLogFactory().writeToStore(workItem, atsServer.getAttributeResolver(), this); } } } TransactionReadable transactionReadable = getTransaction().commit(); for (IExecuteListener listener : listeners) { listener.changesStored(this); } notifier.sendNotifications(getNotifications()); if (!workItemsCreated.isEmpty()) { WorkflowRuleRunner runner = new WorkflowRuleRunner(RuleEventType.CreateWorkflow, workItemsCreated, atsServer); runner.run(); } return transactionReadable; }
Source:
public Date getLastActivity() { return latestSuccess != null ? (Date)latestSuccess.clone() : null; }

Target:
public long getLastActivity() { return latestSuccess != null ? latestSuccess.getTime() : 0; }
Source:
public MethodBehavior execute(MethodTree methodTree) { ExplodedGraphWalker walker = egwFactory.createWalker(behaviorCache, (SemanticModel) context.getSemanticModel()); try { Symbol.MethodSymbol methodSymbol = methodTree.symbol(); if (methodCanNotBeOverriden(methodSymbol)) { MethodBehavior methodBehavior = behaviorCache.add(methodSymbol); if(!methodBehavior.isVisited()) { methodBehavior = walker.visitMethod(methodTree, methodBehavior); methodBehavior.completed(); } return methodBehavior; } else { return walker.visitMethod(methodTree); } } catch (ExplodedGraphWalker.MaximumStepsReachedException | ExplodedGraphWalker.ExplodedGraphTooBigException | RelationalSymbolicValue.TransitiveRelationExceededException exception) { LOG.debug("Could not complete symbolic execution: ", exception); if(walker.methodBehavior != null) { walker.methodBehavior.visited(); } } return null; }

Target:
public MethodBehavior execute(MethodTree methodTree) { ExplodedGraphWalker walker = egwFactory.createWalker(behaviorCache, (SemanticModel) context.getSemanticModel()); try { Symbol.MethodSymbol methodSymbol = methodTree.symbol(); if (methodCanNotBeOverriden(methodSymbol)) { MethodBehavior methodBehavior = behaviorCache.methodBehaviorForSymbol(methodSymbol); if (!methodBehavior.isVisited()) { methodBehavior = walker.visitMethod(methodTree, methodBehavior); methodBehavior.completed(); } return methodBehavior; } else { return walker.visitMethod(methodTree); } } catch (ExplodedGraphWalker.MaximumStepsReachedException | ExplodedGraphWalker.ExplodedGraphTooBigException | RelationalSymbolicValue.TransitiveRelationExceededException exception) { LOG.debug("Could not complete symbolic execution: ", exception); if (walker.methodBehavior != null) { walker.methodBehavior.visited(); } } return null; }
Source:
public void testDisconnectedListOnClose() throws Exception { String connectionId = blockingConnect(); selector.close(connectionId); selector.poll(0); assertEquals("There should be a disconnect", 1, selector.disconnected().size()); assertTrue("Expected connectionId " + connectionId + " missing from selector's disconnected list ", selector.disconnected().contains(connectionId)); }

Target:
public void testDisconnectedListOnClose() throws Exception { String connectionId = blockingConnect(); assertEquals("Disconnect list should be empty", 0, selector.disconnected().size()); selector.close(connectionId); selector.poll(0); assertEquals("There should be a disconnect", 1, selector.disconnected().size()); assertTrue("Expected connectionId " + connectionId + " missing from selector's disconnected list ", selector.disconnected().contains(connectionId)); selector.poll(0); assertEquals("Disconnect list should be empty", 0, selector.disconnected().size()); }
Source:
public Future<BlobInfo> getBlobInfo(String blobId, Callback<BlobInfo> callback) { currentOperationsCount.incrementAndGet(); routerMetrics.getBlobInfoOperationRate.mark(); routerMetrics.operationQueuingRate.mark(); FutureResult<BlobInfo> futureResult = new FutureResult<BlobInfo>(); if (isOpen.get()) { getOperationController().getBlobInfo(blobId, futureResult, callback); } else { RouterException routerException = new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed); routerMetrics.operationDequeuingRate.mark(); routerMetrics.operationAbortCount.inc(); routerMetrics.getBlobInfoErrorCount.inc(); routerMetrics.countError(routerException); operationCompleteCallback.completeOperation(futureResult, callback, null, routerException); } return futureResult; }

Target:
public Future<BlobInfo> getBlobInfo(String blobId, Callback<BlobInfo> callback) { currentOperationsCount.incrementAndGet(); routerMetrics.getBlobInfoOperationRate.mark(); routerMetrics.operationQueuingRate.mark(); FutureResult<BlobInfo> futureResult = new FutureResult<BlobInfo>(); if (isOpen.get()) { getOperationController().getBlobInfo(blobId, futureResult, callback); } else { RouterException routerException = new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed); routerMetrics.operationDequeuingRate.mark(); routerMetrics.getBlobInfoErrorCount.inc(); routerMetrics.countError(routerException); operationCompleteCallback.completeOperation(futureResult, callback, null, routerException); } return futureResult; }
Source:
public static void main(String[] args) throws Exception { Map<String, Object> cl = CLI.opt("w", "wait", null, CLI.AS_INT) .boolOpt("i", "ignore-errors") .arg("TOPO", CLI.INTO_LIST) .parse(args); @SuppressWarnings("unchecked") final List<String> names = (List<String>) cl.get("TOPO"); for (String name : names) { Utils.validateTopologyName(name); } Integer wait = (Integer) cl.get("w"); Boolean continueOnError = (Boolean) cl.get("i"); final KillOptions opts = new KillOptions(); if (wait != null) { opts.set_wait_secs(wait); } NimbusClient.withConfiguredClient(new NimbusClient.WithNimbus() { @Override public void run(Nimbus.Iface nimbus) throws Exception { int errorCount = 0; for (String name : names) { try { nimbus.killTopologyWithOpts(name, opts); LOG.info("Killed topology: {}", name); } catch (Exception e) { errorCount += 1; if (!continueOnError) { throw e; } else { LOG.error( "Caught error killing topology '{}'; continuing as -i was passed.", name, e ); } } } if (errorCount > 0) { throw new RuntimeException("Failed to successfully kill " + errorCount + " topologies."); } } }); }

Target:
public static void main(String[] args) throws Exception { Map<String, Object> cl = CLI.opt("w", "wait", null, CLI.AS_INT) .boolOpt("i", "ignore-errors") .arg("TOPO", CLI.INTO_LIST) .parse(args); @SuppressWarnings("unchecked") final List<String> names = (List<String>) cl.get("TOPO"); Boolean continueOnError = (Boolean) cl.get("i"); errorCount = 0; Iterator<String> iterator = names.iterator(); while (iterator.hasNext()) { String name = iterator.next(); try { Utils.validateTopologyName(name); } catch (IllegalArgumentException e) { if (!continueOnError) { throw e; } else { iterator.remove(); errorCount += 1; LOG.error("Format of topology name is not valid ", name); } } } if (names.isEmpty()) { throw new RuntimeException("Failed to successfully kill " + errorCount + " topologies."); } Integer wait = (Integer) cl.get("w"); final KillOptions opts = new KillOptions(); if (wait != null) { opts.set_wait_secs(wait); } NimbusClient.withConfiguredClient(new NimbusClient.WithNimbus() { @Override public void run(Nimbus.Iface nimbus) throws Exception { for (String name : names) { try { nimbus.killTopologyWithOpts(name, opts); LOG.info("Killed topology: {}", name); } catch (Exception e) { errorCount += 1; if (!continueOnError) { throw e; } else { LOG.error( "Caught error killing topology '{}'; continuing as -i was passed.", name, e ); } } } if (errorCount > 0) { throw new RuntimeException("Failed to successfully kill " + errorCount + " topologies."); } } }); }
Source:
public void VEAndRTEDisabledEditorEntryAnonTests_009_actionEdit() { SourceEditModePageObject src = base.navigateToArticleEditPageSrc(wikiURL, PageContent.articleNamePrefix + base.getTimeStamp()); src.verifySourceOnlyMode(); }

Target:
public void VEAndRTEDisabledEditorEntryAnonTests_009_actionEdit() { SourceEditModePageObject src = base.navigateToArticleEditPageSrc(wikiURL, base.getNameForArticle()); src.verifySourceOnlyMode(); }
Source:
protected PersistenceExceptionTranslator detectPersistenceExceptionTranslators(ListableBeanFactory beanFactory) { Map<String, PersistenceExceptionTranslator> pets = BeanFactoryUtils.beansOfTypeIncludingAncestors( beanFactory, PersistenceExceptionTranslator.class, false, false); Comparator<Object> comparatorToUse = null; if (beanFactory instanceof DefaultListableBeanFactory) { comparatorToUse = ((DefaultListableBeanFactory) beanFactory).getDependencyComparator(); } if (comparatorToUse == null) { comparatorToUse = OrderComparator.INSTANCE; } List<PersistenceExceptionTranslator> translators = new ArrayList<>(pets.values()); translators.sort(comparatorToUse); ChainedPersistenceExceptionTranslator cpet = new ChainedPersistenceExceptionTranslator(); for (PersistenceExceptionTranslator pet : translators) { cpet.addDelegate(pet); } return cpet; }

Target:
protected PersistenceExceptionTranslator detectPersistenceExceptionTranslators(ListableBeanFactory beanFactory) { Map<String, PersistenceExceptionTranslator> pets = BeanFactoryUtils.beansOfTypeIncludingAncestors( beanFactory, PersistenceExceptionTranslator.class, false, false); List<PersistenceExceptionTranslator> translators = new ArrayList<>(pets.values()); if (translators.size() > 1) { Comparator<Object> comparatorToUse = null; if (beanFactory instanceof DefaultListableBeanFactory) { comparatorToUse = ((DefaultListableBeanFactory) beanFactory).getDependencyComparator(); } if (comparatorToUse == null) { comparatorToUse = OrderComparator.INSTANCE; } translators.sort(comparatorToUse); } ChainedPersistenceExceptionTranslator cpet = new ChainedPersistenceExceptionTranslator(); for (PersistenceExceptionTranslator pet : translators) { cpet.addDelegate(pet); } return cpet; }
Source:
private static boolean hasConcreteSubclass(CompositeIndex index, ClassInfo classInfo) { final Set<ClassInfo> subclasses; if (Modifier.isInterface(classInfo.flags())) { subclasses = index.getAllKnownImplementors(classInfo.name()); } else { subclasses = index.getAllKnownSubclasses(classInfo.name()); } return subclasses.stream().anyMatch(ModuleJndiBindingProcessor::isConcreteClass); }

Target:
private static boolean hasConcreteSubclass(CompositeIndex index, ClassInfo classInfo) { final Set<ClassInfo> subclasses; if (Modifier.isInterface(classInfo.flags())) { subclasses = index.getAllKnownImplementors(classInfo.name()); } else { subclasses = index.getAllKnownSubclasses(classInfo.name()); } for (ClassInfo subclass: subclasses) { if (isConcreteClass(subclass)) { return true; } } return false; }
Source:
private List<Map<String, Object>> unfoldFacets(Map<String, List<String>> model) { List<SimpleEntry<String, String>> unlfoldModel = unfoldListMultimap(model); List<Map<String, Object>> results = new ArrayList<>(); for (Map.Entry entry: unlfoldModel) { ImmutableMap.Builder<String, Object> map = ImmutableMap.<String, Object>builder(); map.put("group", entry.getKey()); map.put("value", entry.getKey()); map.put("label", StringUtils.capitalize(entry.getValue().toString())); if(!isNullOrEmpty(getTooltipText(entry.getKey().toString()))){ map.put("description", getTooltipText(entry.getKey().toString())); } results.add(map.build()); } return results; }

Target:
private List<Map<String, String>> unfoldFacets(Map<String, List<String>> model) { List<SimpleEntry<String, String>> unfoldedModel = unfoldListMultimap(model); List<Map<String, String>> results = new ArrayList<>(); for (Map.Entry<String, String> entry : unfoldedModel) { ImmutableMap.Builder<String, String> mapBuilder = ImmutableMap.<String, String>builder() .put("group", entry.getKey()) .put("value", entry.getKey()) .put("label", StringUtils.capitalize(entry.getValue())); if(!isNullOrEmpty(getTooltipText(entry.getKey()))) { mapBuilder.put("description", getTooltipText(entry.getKey())); } results.add(mapBuilder.build()); } return results; }
Source:
private FedoraResource getBaseVersion(final FedoraResource resource) { final Session internalSession = sessionFactory.getInternalSession(); try { final VersionHistory base = ((Version) resource.getNode()).getContainingHistory(); if (base.hasProperty("jcr:versionableUuid")) { LOGGER.debug("versionableUuid : {}", base.getProperty("jcr:versionableUuid").getValue().getString()); final Node baseNode = internalSession .getNodeByIdentifier(base.getProperty("jcr:versionableUuid").getValue().getString()); return nodeService.cast(baseNode); } } catch (final ItemNotFoundException e) { LOGGER.error("Node with jcr:versionableUuid not found : {}", e.getMessage()); } catch (final RepositoryException e) { throw new RepositoryRuntimeException(e); } return resource; }

Target:
private FedoraResource getBaseVersion(final FedoraResource resource) { final Session internalSession = sessionFactory.getInternalSession(); try { final VersionHistory base = ((Version) resource.getNode()).getContainingHistory(); if (base.hasProperty(JCR_VERSIONABLE_UUID_PROPERTY)) { final String versionUuid = base.getProperty(JCR_VERSIONABLE_UUID_PROPERTY).getValue().getString(); LOGGER.debug("versionableUuid : {}", versionUuid); final Node baseNode = internalSession.getNodeByIdentifier(versionUuid); return nodeService.cast(baseNode); } } catch (final ItemNotFoundException e) { LOGGER.error("Node with jcr:versionableUuid not found : {}", e.getMessage()); } catch (final RepositoryException e) { throw new RepositoryRuntimeException(e); } return resource; }
Source:
public void reverse() { assertThat( value.apply( "Foo" ).reverse(), equalTo( value.apply( "ooF" ) ) ); assertThat( value.apply( "" ).reverse(), equalTo( StringValue.EMTPY ) ); assertThat( value.apply( " L" ).reverse(), equalTo( value.apply( "L " ) ) ); assertThat( value.apply( "\r\n" ).reverse(), equalTo( value.apply( "\n\r" ) ) ); assertThat( value.apply( "\uD801\uDC37" ).reverse(), equalTo( value.apply( "\uD801\uDC37" ) ) ); }

Target:
public void reverse() { assertThat( value.apply( "Foo" ).reverse(), equalTo( value.apply( "ooF" ) ) ); assertThat( value.apply( "" ).reverse(), equalTo( StringValue.EMTPY ) ); assertThat( value.apply( " L" ).reverse(), equalTo( value.apply( "L " ) ) ); assertThat( value.apply( "\r\n" ).reverse(), equalTo( value.apply( "\n\r" ) ) ); assertThat( value.apply( "\uD801\uDC37" ).reverse(), equalTo( value.apply( "\uD801\uDC37" ) ) ); assertThat( value.apply( "This is literally a pile of crap \uD83D\uDCA9, it is fantastic" ).reverse(), equalTo( value.apply( "citsatnaf si ti ,\uD83D\uDCA9 parc fo elip a yllaretil si sihT" ) ) ); assertThat( value.apply( "\uD83D\uDE21\uD83D\uDCA9\uD83D\uDC7B" ).reverse(), equalTo( value.apply( "\uD83D\uDC7B\uD83D\uDCA9\uD83D\uDE21" ) ) ); }
Source:
public void run(ExtendedHiveMetastore metastore) { boolean done = false; try { metastore.createTable(newTable, privileges); done = true; } catch (RuntimeException e) { try { Optional<Table> existingTable = metastore.getTable(newTable.getDatabaseName(), newTable.getTableName()); if (existingTable.isPresent()) { Table table = existingTable.get(); if (getPrestoQueryId(table).equals(getPrestoQueryId(newTable))) { done = true; } else { if (!hasTheSameSchema(newTable, table)) { e = new TableAlreadyExistsException( new SchemaTableName(newTable.getDatabaseName(), newTable.getTableName()), format("Table already exists with a different schema: '%s'", newTable.getTableName()), e); } else { done = ignoreExisting; } } } } catch (RuntimeException ignored) { } if (!done) { throw e; } } tableCreated = true; }

Target:
public void run(ExtendedHiveMetastore metastore) { boolean done = false; try { metastore.createTable(newTable, privileges); done = true; } catch (RuntimeException e) { try { Optional<Table> existingTable = metastore.getTable(newTable.getDatabaseName(), newTable.getTableName()); if (existingTable.isPresent()) { Table table = existingTable.get(); if (getPrestoQueryId(table).equals(queryId)) { done = true; } else { if (!hasTheSameSchema(newTable, table)) { e = new PrestoException(TRANSACTION_CONFLICT, format("Table already exists with a different schema: '%s'", newTable.getTableName())); } else { done = ignoreExisting; } } } } catch (RuntimeException ignored) { } if (!done) { throw e; } } tableCreated = true; }
Source:
public void beforeMarshal(final Object o, final QNameMap qmap) { qmap.registerMapping(new QName(KIE.getUri(), COMPONENTS_WIDTHS_EXTENSION_ALIAS, KIE.getPrefix()), COMPONENTS_WIDTHS_EXTENSION_ALIAS); qmap.registerMapping(new QName(KIE.getUri(), COMPONENT_WIDTHS_ALIAS, KIE.getPrefix()), COMPONENT_WIDTHS_ALIAS); qmap.registerMapping(new QName(KIE.getUri(), COMPONENT_WIDTH_ALIAS, KIE.getPrefix()), COMPONENT_WIDTH_ALIAS); }

Target:
public void beforeMarshal(final Object o, final QNameMap qmap) { if (o instanceof TDefinitions) { final TDefinitions tDefinitions = (TDefinitions) o; final String prefix = tDefinitions.getPrefixForNamespaceURI(KieDMNModelInstrumentedBase.URI_KIE).orElse(KIE.getPrefix()); qmap.registerMapping(new QName(KIE.getUri(), COMPONENTS_WIDTHS_EXTENSION_ALIAS, prefix), COMPONENTS_WIDTHS_EXTENSION_ALIAS); qmap.registerMapping(new QName(KIE.getUri(), COMPONENT_WIDTHS_ALIAS, prefix), COMPONENT_WIDTHS_ALIAS); qmap.registerMapping(new QName(KIE.getUri(), COMPONENT_WIDTH_ALIAS, prefix), COMPONENT_WIDTH_ALIAS); } }
Source:
public void invert(Matrix matrix) throws SingularMatrixException { if (matrix.getNumRow()!=SIZE || matrix.getNumCol()!=SIZE) { throw new IllegalArgumentException(Errors.format(ErrorKeys.ILLEGAL_MATRIX_SIZE)); } m00 = 1.0/matrix.getElement(0, 0); }

Target:
public void invert(Matrix matrix) throws SingularMatrixException { if (matrix.getNumRow()!=SIZE || matrix.getNumCol()!=SIZE) { throw new IllegalArgumentException(Errors.format(ErrorKeys.ILLEGAL_MATRIX_SIZE)); } if (matrix.getElement(0, 0) == 0) { throw new SingularMatrixException("1 dimensional matrix is singular"); } m00 = 1.0/matrix.getElement(0, 0); }
Source:
private synchronized void handleStreamsAddressRequest(CorfuPayloadMsg<StreamsAddressRequest> msg, ChannelHandlerContext ctx, IServerRouter r) { List<StreamAddressRange> streamsRangesRequested = msg.getPayload().getStreamsRanges(); Map<UUID, StreamAddressSpace> streamsAddressSpaceMapToReturn = new HashMap<>(); Roaring64NavigableMap addressMap; for (StreamAddressRange streamAddressRange : streamsRangesRequested) { UUID streamId = streamAddressRange.getStreamID(); try { addressMap = streamsAddressSpaceMap.get(streamId).getAddressesInRange(streamAddressRange.start, streamAddressRange.end); Long trimMark = streamsAddressSpaceMap.get(streamId).getTrimMark(); streamsAddressSpaceMapToReturn.put(streamId, new StreamAddressSpace(trimMark, addressMap)); } catch (NullPointerException ne) { log.warn("handleStreamsAddressRequest: address space map is not present for stream {}. " + "Verify this is a valid stream.", streamId); } } log.trace("handleStreamsAddressRequest: return address space maps for streams [{}]", streamsAddressSpaceMapToReturn.keySet()); r.sendResponse(ctx, msg, CorfuMsgType.STREAMS_ADDRESS_RESPONSE.payloadMsg( new StreamsAddressResponse(streamsAddressSpaceMapToReturn))); }

Target:
private void handleStreamsAddressRequest(CorfuPayloadMsg<StreamsAddressRequest> msg, ChannelHandlerContext ctx, IServerRouter r) { StreamsAddressRequest req = msg.getPayload(); Map<UUID, StreamAddressSpace> streamsAddressMap; switch (req.getReqType()) { case StreamsAddressRequest.STREAMS: streamsAddressMap = getStreamsAddresses(req.getStreamsRanges()); break; default: streamsAddressMap = new HashMap<>(this.streamsAddressMap); break; } log.trace("handleStreamsAddressRequest: return address space for streams [{}]", streamsAddressMap.keySet()); r.sendResponse(ctx, msg, CorfuMsgType.STREAMS_ADDRESS_RESPONSE.payloadMsg( new StreamsAddressResponse(getGlobalLogTail(), streamsAddressMap))); }
Source:
public void compareLargeSimpleMapTypeReferenceSets() { long startTime = StopWatch.time(); final String baseSimpleMapReferenceSet = "900000000000497000"; final String compareSimpleMapReferenceSet = "447562003"; ComponentURI baseURI = ComponentURI.of(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, SnomedTerminologyComponentConstants.REFSET_NUMBER, baseSimpleMapReferenceSet); ComponentURI compareURI = ComponentURI.of(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, SnomedTerminologyComponentConstants.REFSET_NUMBER, compareSimpleMapReferenceSet); CodeSystemRequests.prepareConceptMapCompare(baseURI, compareURI) .build(codeSystemURI) .execute(getBus()) .getSync(); long endTime = StopWatch.time(); assertThat(endTime-startTime).isLessThan(1000); }

Target:
public void compareLargeSimpleMapTypeReferenceSets() { final String baseSimpleMapReferenceSet = "900000000000497000"; final String compareSimpleMapReferenceSet = "447562003"; ComponentURI baseURI = ComponentURI.of(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, SnomedTerminologyComponentConstants.REFSET_NUMBER, baseSimpleMapReferenceSet); ComponentURI compareURI = ComponentURI.of(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, SnomedTerminologyComponentConstants.REFSET_NUMBER, compareSimpleMapReferenceSet); CodeSystemRequests.prepareConceptMapCompare(baseURI, compareURI) .build(codeSystemURI) .execute(getBus()) .getSync(1, TimeUnit.SECONDS); }
Source:
public XmlPatternSegmentStoreModule() { registerListener(); }

Target:
public XmlPatternSegmentStoreModule() { super(); registerListener(); }
Source:
public void saveRuns(final Collection<Run> runs) throws IOException { log.info("Migrating runs..."); for (Run newRun : runs) { Run run = serviceManager.getRunDao().getByAlias(newRun.getAlias()); if (run == null) { run = newRun; run.getStatus().setLastUpdated(new Date()); } else { updateRun(newRun, run); } for (SequencerPartitionContainer<SequencerPoolPartition> container : run.getSequencerPartitionContainers()) { container.setLastModifier(migrationUser); container.setId(serviceManager.getSequencerPartitionContainerDao().save(container)); } run.setLastModifier(migrationUser); run.setId(serviceManager.getRequestManager().saveRun(run)); log.debug("Saved run " + run.getAlias()); } log.info(runs.size() + " runs migrated."); }

Target:
public void saveRuns(final Collection<Run> runs) throws IOException { log.info("Migrating runs..."); for (Run newRun : runs) { Run run = serviceManager.getRunDao().getByAlias(newRun.getAlias()); if (run == null) { run = newRun; run.getStatus().setLastUpdated(timeStamp); } else { updateRun(newRun, run); } for (SequencerPartitionContainer<SequencerPoolPartition> container : run.getSequencerPartitionContainers()) { container.setLastModifier(migrationUser); container.setId(serviceManager.getSequencerPartitionContainerDao().save(container)); } run.setLastModifier(migrationUser); run.setId(serviceManager.getRequestManager().saveRun(run)); log.debug("Saved run " + run.getAlias()); } log.info(runs.size() + " runs migrated."); }