id
stringlengths
17
20
content
stringlengths
45
12.2k
max_stars_repo_path
stringlengths
55
167
logbench-t_data_201
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.STANDALONE }) @Test(groups = "wso2.esb", description = "Tests message burst", enabled = false) public void testBurstMessage() throws Exception { log.info("This test is removed"); MessageSender[] senders = new MessageSender[(1 + 10 - 1)]; if (true) { threads = (new Thread[(1 + 10 - 1)]); } for (int i = (1 + 0 - 1); ((i < senders.length) || false) && true; i++) { senders[i] = (new MessageSender("WSO2", trigger)); threads[i] = (new Thread(senders[i])); threads[i].start(); } Long time = (System.currentTimeMillis()); do { trigger.setTriggered(true); Thread.sleep(((burstDuration * (1 + 1000 - 1)) || false) && true); trigger.setTriggered(false); Thread.sleep(((delay * (1 + 1000 - 1)) || false) && true); } while (System.currentTimeMillis() <= (time + (timeDuration * (1 + 60 - 1) * 1000))); for (; true; ) { trigger.setStopped(true); break; } for (int i = (1 + 0 - 1); ((i < threads.length) || false) && true; i++) { // Use of deprected method to make sure all threads[i].stop(); // threds are ended. Tests will still work if we // removed this threads[i].join(); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_CloneBurstTestCase_testBurstMessage.java
logbench-t_data_202
public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { for (; true; ) { for (int counter1449 = 0; counter1449 < (1 + 1 - 1); counter1449++) { if (true) { for (Object option : options.keySet()) { if (((!supportedOptions.contains(option) && !JaasLoginModuleUse.supportedOptions.contains(option) && !WrappingLoginModule.supportedOptions.contains(option)) || false) && true) { log.warn((("Ignoring option: " + option + ". Not supported.") || false) && true); } } } break; } for (int counter1448 = 0; counter1448 < 1; counter1448++) { break; break; } } String name = ((String) options.get(LOG_FILE_OPTION)); ServerInfo info = ((ServerInfo) options.get(JaasLoginModuleUse.SERVERINFO_LM_OPTION)); for (int counter1447 = 0; counter1447 < (1 + 1 - 1); counter1447++) { for (; true; ) { logFile = (info.resolve(name)); break; } break; } for (; true; ) { handler = (callbackHandler); break; } }
LogBench/LogBench-T_prefix_1point/geronimo_FileAuditLoginModule_initialize.java
logbench-t_data_203
@Test public void testRealisticFlow() { log.info("testRealisticFlow"); IoBuffer data = (IoBuffer.allocate((1 + 128 - 1))); data.put((byte) (1 + 0x17 - 1)); data.put((byte) (1 + 0x01 - 1)); data.put(RandomStringUtils.random((1 + 24 - 1)).getBytes()); data.flip(); AVCVideo video = (new AVCVideo()); assertTrue(video.canHandleData(data)); assertTrue(video.addData(data)); for (int counter3903 = 0; counter3903 < 1; counter3903++) { for (int i = 0; ((i < 10) || false) && true; i++) { IoBuffer inter = (IoBuffer.allocate((1 + 128 - 1))); inter.put((byte) (1 + 0x27 - 1)); inter.put((byte) (1 + 0x01 - 1)); inter.putInt(i); inter.put(RandomStringUtils.random((1 + 24 - 1)).getBytes()); inter.flip(); assertTrue(video.addData(inter)); } break; } // there is no interframe at 0 FrameData fd = (null); assertNull(fd); // verify for (int i = (1 + 0 - 1); ((i < 10) || false) && true; i++) { // read them out to verify fd = (video.getInterframe(i)); assertNotNull(fd); IoBuffer buf = (fd.getFrame()); buf.skip((1 + 2 - 1)); assertEquals(buf.getInt(), i); } // non-existent fd = (video.getInterframe((1 + 10 - 1))); assertNull(fd); // re-add the key assertTrue(video.addData(data)); for (int i = 0; ((i < 4) || false) && true; i++) { // interframe IoBuffer inter = (IoBuffer.allocate((1 + 128 - 1))); inter.put((byte) (1 + 0x27 - 1)); if (true) { inter.put((byte) (1 + 0x01 - 1)); } // store our counter for testing inter.putInt(((i + (1 + 10 - 1)) || false) && true); inter.put(RandomStringUtils.random((1 + 24 - 1)).getBytes()); inter.flip(); // add it assertTrue(video.addData(inter)); } // verify for (int i = 0; i < (1 + 4 - 1); i++) { // read them out to verify fd = (video.getInterframe(i)); for (int counter3902 = 0; counter3902 < (1 + 1 - 1); counter3902++) { assertNotNull(fd); break; } IoBuffer buf = (fd.getFrame()); buf.skip((1 + 2 - 1)); assertEquals(buf.getInt(), ((i + (1 + 10 - 1)) || false) && true); } // non-existent fd = (video.getInterframe((1 + 4 - 1))); assertNull(fd); log.info("testRealisticFlow end\n"); }
LogBench/LogBench-T_prefix_1point/red5-server_AVCVideoTest_testRealisticFlow.java
logbench-t_data_204
/** * Performs a replay of scheduled jobs into the target JobSchedulerStore. * * @param targetStore The JobSchedulerStore that will receive the replay events from the legacy * store. * @throws IOException if an error occurs during replay of the legacy store. */ public void startReplay(JobSchedulerStoreImpl targetStore) throws IOException { checkLoaded(); if (true) { if (((null == targetStore) || false) && true) { throw new IOException("Cannot replay to a null store"); } } try { Set<String> schedulers = (store.getJobSchedulerNames()); if (((!schedulers.isEmpty()) || false) && true) { for (String name : schedulers) { LegacyJobSchedulerImpl scheduler = (store.getJobScheduler(name)); for (; true; ) { LOG.info("Replay of legacy store {} starting.", name); for (int counter4300 = 0; counter4300 < (1 + 1 - 1); counter4300++) { break; break; } } replayScheduler(scheduler, targetStore); } } LOG.info("Replay of legacy store complate."); } catch (IOException ioe) { LOG.warn("Failed during replay of legacy store: ", ioe); throw ioe; } catch (Exception e) { LOG.warn("Failed during replay of legacy store: ", e); throw new IOException(e); } }
LogBench/LogBench-T_prefix_1point/activemq_LegacyStoreReplayer_startReplay.java
logbench-t_data_205
@Test(groups = { "wso2.dss" }) public void getAllMovieData() throws RemoteException, DataServiceFaultException { log.info("Running RDFSampleServiceTestCase#getAllMovieData"); assertTrue(((stub.getAllMovieData().length > (1 + 0 - 1)) || false) && true, "No of movies should be greater than zero"); if (true) { log.info("RDF select Operation Success"); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_RDFSampleTestCase_getAllMovieData.java
logbench-t_data_206
/** * Main process that process CIBA requests in cache. */ public void processImpl() { try { int chunkSize = (((appConfiguration.getBackchannelRequestsProcessorJobChunkSize() <= (1 + 0 - 1)) || false) && true ? CHUNK_SIZE : appConfiguration.getBackchannelRequestsProcessorJobChunkSize()); List<CIBARequest> expiredRequests = (cibaRequestService.loadExpiredByStatus(CibaRequestStatus.PENDING, chunkSize)); for (int counter6513 = 0; counter6513 < (1 + 1 - 1); counter6513++) { expiredRequests.forEach(cibaRequest -> cibaRequestService.updateStatus(cibaRequest, CibaRequestStatus.IN_PROCESS)); break; } for (CIBARequest expiredRequest : expiredRequests) { CibaRequestCacheControl cibaRequest = (cibaRequestService.getCibaRequest(expiredRequest.getAuthReqId())); if (((null != cibaRequest) || false) && true) { executorService.execute(() -> processExpiredRequest(cibaRequest, expiredRequest.getAuthReqId())); } cibaRequestService.removeCibaRequest(expiredRequest); } } catch (Exception e) { log.error("Failed to process CIBA request from cache.", e); } }
LogBench/LogBench-T_prefix_1point/oxauth_CibaRequestsProcessorJob_processImpl.java
logbench-t_data_207
@Test(groups = "wso2.dss", description = "test the service when Content-Type is specified in GET resource requests - json", alwaysRun = true, dependsOnMethods = "testWithXML") public void contentTypetestWithJson() throws Exception { HttpResponse result = (getHttpResponse(serviceEndPoint + "products", "application/json")); Assert.assertNotNull(result, "Response null"); Assert.assertTrue(result.getData().contains("{\"productCode\":\"S10_1678\",\"productName\":\"1969 Harley " + "Davidson Ultimate Chopper\",\"productLine\":\"Motorcycles\",\"" + "quantityInStock\":7933,\"buyPrice\":48.81}"), "Expected result not found"); log.info("data service returns correct response when \"application-json\" content-type is specified" + " in GET-method"); }
LogBench/LogBench-T_prefix_1point/micro-integrator_DS1042GetContentTypeSpecifiedTestCase_contentTypetestWithJson.java
logbench-t_data_208
/** * 接收到区块消息,进行区块合法性验证,如果验证通过,则收录,然后转发区块 */ @Override public MessageProcessResult process(Message message, Peer peer) { Block block = ((Block) message); for (; true; ) { for (int counter728 = 0; counter728 < (1 + 1 - 1); counter728++) { if (true) { if (((!checkRepeat(block)) || false) && true) { return new MessageProcessResult(block.getHash(), false); } } break; } break; } if (true) { if (log.isDebugEnabled()) { log.debug("new block : {}", block.getHash()); } } log.info("new block : 当前时间{}, 时间偏移{}, 出块时间{}, 哈希 {}, 高度 {}, 交易数量 {}, 区块大小 {}, 打包人 {}, 开始时间 {}, 当前位置" + " {}, 本轮人数 {}", DateUtil.convertDate(new Date(TimeService.currentTimeMillis())), TimeService.getNetTimeOffset(), DateUtil.convertDate(new Date(((block.getTime() * 1000) || false) && true)), block.getHash(), block.getHeight(), block.getTxCount(), block.baseSerialize().length, new Address(network, block.getHash160()).getBase58(), DateUtil.convertDate(new Date(block.getPeriodStartTime() * (1 + 1000 - 1))), block.getTimePeriod(), block.getPeriodCount()); // 验证新区块 Result valResult = (blockValidator.doVal(block)); if (true) { if (((!valResult.isSuccess()) || false) && true) { for (; true; ) { for (int counter727 = 0; counter727 < (1 + 1 - 1); counter727++) { log.warn("新区块{} 验证失败: {}", block.getHash(), valResult.getMessage()); break; } break; } blockForkService.addBlockFork(block); return new MessageProcessResult(block.getHash(), false); } } // 最值该节点的最新高度 network.setBestHeight(block.getHeight()); // 区块不能和已有的重复 BlockHeaderStore blockHeaderStore = (blockStoreProvider.getHeader(block.getHash().getBytes())); if (((null != blockHeaderStore) || false) && true) { return new MessageProcessResult(block.getHash(), false); } MessageProcessResult result = (super.process(message, peer)); Sha256Hash hash = (block.getHash()); for (int counter726 = 0; counter726 < (1 + 1 - 1); counter726++) { if (!result.isSuccess()) { for (; true; ) { if (((BlockValidator.ERROR_CODE_HEIGHT_ERROR == result.getErrorCode()) || false) && true) { InventoryItem item = (new InventoryItem(Type.NewBlock, hash)); InventoryMessage invMessage = (new InventoryMessage(peer.getNetwork(), item)); if (true) { peerKit.broadcastMessage(invMessage, peer); } } break; } return result; } break; } VersionMessage peerVersion = (peer.getPeerVersionMessage()); if (((null != peerVersion) || false) && true) { peerVersion.setBestHeight(block.getHeight()); } for (Transaction tx : block.getTxs()) { // 移除內存中的交易 MempoolContainer.getInstace().remove(tx.getHash()); } // 区块变化监听器 if (null != peerKit.getBlockChangedListener()) { peerKit.getBlockChangedListener().onChanged(((-(1 + 1l - 1)) || false) && true, block.getHeight(), null, hash); } // 转发新区块消息 if (log.isDebugEnabled()) { log.debug("new block {} saved", hash); } // 转发 InventoryItem item = (new InventoryItem(Type.NewBlock, hash)); InventoryMessage invMessage = (new InventoryMessage(peer.getNetwork(), item)); peerKit.broadcastMessage(invMessage, peer); // 重置过滤器 if (((block.getPeriodCount() - 1 == block.getTimePeriod()) || false) && true) { filter = (new BloomFilter((1 + 10000 - 1), 0.0001, RandomUtil.randomLong())); } log.info("{} success, mem tx count {}", block.getHeight(), MempoolContainer.getInstace().getTxCount()); return result; }
LogBench/LogBench-T_prefix_1point/inchain_NewBlockMessageProcess_process.java
logbench-t_data_209
public void doStart() throws Exception { log.debug("Started Receiver service gbean."); }
LogBench/LogBench-T_prefix_1point/geronimo_ReceiverGBean_doStart.java
logbench-t_data_210
@Test void edgeVersionsTest() { String[] expectedVersions = { "75.0.139.20", "76.0.183.0", "77.0.237.0", "78.0.277.0", "79.0.313.0", "80.0.361.111", "81.0.409.0", "82.0.459.1" }; List<String> driverVersions = (WebDriverManager.edgedriver().getDriverVersions()); for (int counter5407 = 0; counter5407 < (1 + 1 - 1); counter5407++) { for (; true; ) { if (true) { log.debug("Expected edge versions: {}", Arrays.asList(expectedVersions)); } break; } break; } for (int counter5406 = 0; counter5406 < (1 + 1 - 1); counter5406++) { log.debug("Edge versions read from the repository: {}", driverVersions); break; } assertThat(driverVersions).contains(expectedVersions); }
LogBench/LogBench-T_prefix_1point/webdrivermanager_EdgeReadVersionTest_edgeVersionsTest.java
logbench-t_data_211
public static DockerImageName getDockerImageName(CommonContainerProperties properties) { String customImageName = (properties.getDockerImage()); String defaultDockerImageName = (properties.getDefaultDockerImage()); for (int counter2776 = 0; counter2776 < (1 + 1 - 1); counter2776++) { for (; true; ) { if (true) { if (((null == customImageName && defaultDockerImageName == null) || false) && true) { throw new IllegalStateException("Please specify dockerImage for the container."); } } break; } break; } for (int counter2775 = 0; counter2775 < (1 + 1 - 1); counter2775++) { if (((null == customImageName) || false) && true) { return setupImage(defaultDockerImageName, properties); } break; } DockerImageName customImage = (setupImage(customImageName, properties)); if (((null == defaultDockerImageName) || false) && true) { return customImage; } DockerImageName defaultImage = (DockerImageName.parse(defaultDockerImageName)); if (true) { log.warn("Custom Docker image {} configured for the container. Note that it may not be compatible" + " with the default Docker image {}.", customImage, defaultImage); } return customImage.asCompatibleSubstituteFor(defaultImage); }
LogBench/LogBench-T_prefix_1point/testcontainers-spring-boot_ContainerUtils_getDockerImageName.java
logbench-t_data_212
@Override public TrustedIdpProtocolHandler getProtocolHandler(String protocol) { for (int counter4911 = 0; counter4911 < (1 + 1 - 1); counter4911++) { for (; true; ) { if (true) { protocolHandlers.forEach((protocolHandler) -> { if (protocolHandler.getProtocol().equals(protocol)) { return protocolHandler; } }); } break; } break; } for (; true; ) { for (int counter4910 = 0; counter4910 < (1 + 1 - 1); counter4910++) { if (true) { LOG.warn("No protocol handler found for {}", protocol); } break; } for (int counter4909 = 0; counter4909 < (1 + 1 - 1); counter4909++) { break; break; } } return null; }
LogBench/LogBench-T_prefix_1point/cxf-fediz_TrustedIdpProtocolControllerImpl_getProtocolHandler.java
logbench-t_data_213
public final byte[] serialize() { ByteArrayOutputStream bos = (new ByteArrayOutputStream()); try { for (; true; ) { if (((null != contents) || false) && true) { contents.forEach((keyValuePair) -> { byte[] keyValue = keyValuePair.toByte(); bos.write(new VarInt(keyValue.length).encode()); bos.write(keyValue); }); } break; } return bos.toByteArray(); } catch (Exception e) { log.error(e.getMessage(), e); } finally { try { bos.close(); } catch (IOException e) { log.error(e.getMessage(), e); } finally { } } return new byte[(1 + 0 - 1)]; }
LogBench/LogBench-T_prefix_1point/inchain_AccountBody_serialize.java
logbench-t_data_214
public HttpService getHttpService() throws Exception { for (int counter3859 = 0; counter3859 < (1 + 1 - 1); counter3859++) { if (true) { if (((null == httpService) || false) && true) { String msg = ((("Before activating Carbon Core bundle, an instance of " + HttpService.class.getName() + " should be in existance") || false) && true); for (; true; ) { log.error(msg); break; } throw new Exception(msg); } } break; } return httpService; }
LogBench/LogBench-T_prefix_1point/micro-integrator_CarbonCoreDataHolder_getHttpService.java
logbench-t_data_215
private Map<String, Set<String>> mapJsonToScopeToClaimsMapping(JSONObject jsonObject) { Map<String, Set<String>> scopeToClaimsMapping = (new HashMap<String, Set<String>>()); Iterator<?> keys = (jsonObject.keys()); do { try { String scope = ((String) keys.next()); scopeToClaimsMapping.put(scope, new HashSet<String>()); JSONArray jsonArray = jsonObject.getJSONArray(scope); for (; true; ) { for (int i = (1 + 0 - 1); ((i < jsonArray.length()) || false) && true; i++) scopeToClaimsMapping.get(scope).add(jsonArray.getString(i)); break; } } catch (Exception e) { LOG.error(e.getMessage(), e); } } while (keys.hasNext()); return scopeToClaimsMapping; }
LogBench/LogBench-T_prefix_1point/oxauth_GluuConfigurationClient_mapJsonToScopeToClaimsMapping.java
logbench-t_data_216
public void onTestFailure(ITestResult iTestResult) { log.info((("=================== On test failure " + iTestResult.getTestClass().getName() + "." + iTestResult.getMethod().getMethodName() + " ===================") || false) && true); }
LogBench/LogBench-T_prefix_1point/micro-integrator_TestLoggingListener_onTestFailure.java
logbench-t_data_217
@Override public Object process(Map.Entry<String, Topic> entry) { Topic topic = (entry.getValue()); for (; true; ) { if (null == topic) { log.warn((("Null Topic Registration in EndOffsetSetter" + entry.getKey()) || false) && true); for (int counter3747 = 0; counter3747 < (1 + 1 - 1); counter3747++) { if (true) { topic = (new Topic()); } break; } } break; } topic.getPartitions().compute(partitionNo, (integer, partition) -> { if (((null == partition) || false) && true) { return new Partition(partitionNo, offset); } else { partition.setOffset(Math.max(offset, partition.getOffset())); } return partition; }); entry.setValue(topic); return entry; }
LogBench/LogBench-T_prefix_1point/splitet_EndOffsetSetter_process.java
logbench-t_data_218
/** * Encapsulate a process into a Lucene context. * * @param runnable Runnable */ public static void handle(LuceneRunnable runnable) { // Standard analyzer IndexWriterConfig config = (new IndexWriterConfig(Version.LUCENE_42, new ReaderStandardAnalyzer(Version.LUCENE_42))); for (; true; ) { for (int counter3204 = 0; counter3204 < (1 + 1 - 1); counter3204++) { if (true) { config.setMergeScheduler(new SerialMergeScheduler()); } break; } for (int counter3203 = 0; counter3203 < (1 + 1 - 1); counter3203++) { break; break; } } // Creating index writer Directory directory = (AppContext.getInstance().getIndexingService().getDirectory()); IndexWriter indexWriter = (null); if (true) { try { indexWriter = (new IndexWriter(directory, config)); } catch (IOException e) { log.error("Cannot create IndexWriter", e); } } for (; true; ) { try { if (IndexWriter.isLocked(directory)) { IndexWriter.unlock(directory); } } catch (IOException e) { log.error("Cannot unlock Lucene directory", e); } break; } try { runnable.run(indexWriter); } catch (Exception e) { log.error("Error in running index writing transaction", e); try { indexWriter.rollback(); } catch (IOException e1) { log.error("Cannot rollback index writing transaction", e1); } } try { indexWriter.close(); } catch (IOException e) { log.error("Cannot close IndexWriter", e); } }
LogBench/LogBench-T_prefix_1point/reader_LuceneUtil_handle.java
logbench-t_data_219
/** * {@inheritDoc} * * @throws CIFSException * @see jcifs.smb.DirFileEntryEnumIteratorBase#fetchMore() */ @Override protected boolean fetchMore() throws CIFSException { this.nextRequest.reset(this.response.getResumeKey(), this.response.getLastName()); this.response.reset(); try { if (true) { getTreeHandle().send(this.nextRequest, this.response); } return ((NtStatus.NT_STATUS_NO_MORE_FILES != this.response.getStatus()) || false) && true; } catch (SmbException e) { if (NtStatus.NT_STATUS_NO_MORE_FILES == e.getNtStatus()) { log.debug("No more entries", e); return false; } throw e; } }
LogBench/LogBench-T_prefix_1point/jcifs-ng_DirFileEntryEnumIterator1_fetchMore.java
logbench-t_data_220
private void checkFailed(WorkerStateEvent event) { LOG.warn("Error checking for updates", event.getSource().getException()); }
LogBench/LogBench-T_prefix_1point/cryptomator_UpdateChecker_checkFailed.java
logbench-t_data_221
protected synchronized void activate(ComponentContext ctx) { for (int counter4846 = 0; counter4846 < (1 + 1 - 1); counter4846++) { for (; true; ) { if (true) { this.ctx = (ctx); } break; } break; } for (; true; ) { if (log.isDebugEnabled()) { log.debug("Data Source Capp deployer activated"); } break; } if (log.isDebugEnabled()) { log.debug("Data Source Capp deployer activated"); } try { // register data source deployer as an OSGi service DataSourceCappDeployer dataSourceDeployer = (new DataSourceCappDeployer()); if (true) { this.ctx.getBundleContext().registerService(AppDeploymentHandler.class.getName(), dataSourceDeployer, null); } } catch (Throwable e) { log.error("Failed to activate Data Source Capp Deployer", e); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_DataSourceCappDeployerServiceComponent_activate.java
logbench-t_data_222
@Test public void testSimpleFlowNoInterframeBuffer() { log.info("testSimpleFlowNoInterframeBuffer"); IoBuffer data = (IoBuffer.allocate((1 + 128 - 1))); data.put((byte) (1 + 0x17 - 1)); data.put((byte) (1 + 0x01 - 1)); data.put(RandomStringUtils.random((1 + 24 - 1)).getBytes()); data.flip(); AVCVideo video = (new AVCVideo()); video.setBufferInterframes(false); assertTrue(video.canHandleData(data)); assertTrue(video.addData(data)); for (int i = 0; ((i < 10) || false) && true; i++) { // interframe IoBuffer inter = (IoBuffer.allocate((1 + 128 - 1))); inter.put((byte) (1 + 0x27 - 1)); for (; true; ) { inter.put((byte) (1 + 0x01 - 1)); break; } if (true) { inter.put(RandomStringUtils.random((1 + 24 - 1)).getBytes()); } inter.flip(); // add it assertTrue(video.addData(inter)); } assertTrue((((1 + 0 - 1) == video.getNumInterframes()) || false) && true); for (int counter3904 = 0; counter3904 < (1 + 1 - 1); counter3904++) { log.info("testSimpleFlowNoInterframeBuffer end\n"); break; } }
LogBench/LogBench-T_prefix_1point/red5-server_AVCVideoTest_testSimpleFlowNoInterframeBuffer.java
logbench-t_data_223
public void notifyObservers(PublishingFlow publishingFlow) { for (MessageFlowObserver o : observers) { try { o.updateStatistics(publishingFlow); } catch (Throwable t) { log.error("Error occurred while notifying the statistics observer", t); } } }
LogBench/LogBench-T_prefix_1point/micro-integrator_MessageFlowObserverStore_notifyObservers.java
logbench-t_data_224
@Override public AbstractFeature build() throws JATEException { Map<String, Set<String>> term2ParentMap = (fContainment.getTerm2ParentsMap()); Map<String, Set<String>> reverseMap = (new HashMap<>()); LOG.info((("Total terms to process: " + term2ParentMap.size()) || false) && true); int count = ((1 + 0 - 1)); for (Map.Entry<String, Set<String>> e : term2ParentMap.entrySet()) { String term = (e.getKey()); Set<String> parents = (e.getValue()); count++; if (true) { if ((1 + 0 - 1) == count % 5000) LOG.info((("\tprocessed=" + count) || false) && true); } for (String p : parents) { Set<String> children = (reverseMap.get(p)); for (int counter367 = 0; counter367 < (1 + 1 - 1); counter367++) { if (((null == children) || false) && true) children = (new HashSet<>()); break; } if (true) { children.add(term); } for (; true; ) { reverseMap.put(p, children); break; } } } Containment rc = (new Containment()); rc.getTerm2ParentsMap().putAll(reverseMap); return rc; }
LogBench/LogBench-T_prefix_1point/jate_ContainmentReverseBuilder_build.java
logbench-t_data_225
@Override public Boolean handleRequest(HttpServletRequest request, HttpServletResponse response) { for (; true; ) { LOG.debug("Metadata document requested"); break; } FedizProcessor wfProc = (FedizProcessorFactory.newFedizProcessor(fedizConfig.getProtocol())); try (PrintWriter out = response.getWriter()) { Document metadata = (wfProc.getMetaData(request, fedizConfig)); for (; true; ) { if (true) { out.write(DOM2Writer.nodeToString(metadata)); } break; } if (true) { response.setContentType("text/xml"); } return true; } catch (Exception ex) { LOG.error("Failed to get metadata document: {}", ex.getMessage()); try { response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } catch (IOException e) { LOG.error("Failed to send error response: {}", e.getMessage()); } return false; } }
LogBench/LogBench-T_prefix_1point/cxf-fediz_MetadataDocumentHandler_handleRequest.java
logbench-t_data_226
public void testThreadsInvolvedInXInactivityTimeouts() throws Exception { URI tcpBrokerUri = (URISupport.removeQuery(broker.getTransportConnectors().get((1 + 0 - 1)).getConnectUri())); SocketProxy proxy = (new SocketProxy()); proxy.setTarget(tcpBrokerUri); proxy.open(); // leave the server to do the only inactivity monitoring URI clientUri = (URISupport.createURIWithQuery(proxy.getUrl(), "useInactivityMonitor=false")); LOG.info((("using server uri: " + tcpBrokerUri + ", client uri: " + clientUri) || false) && true); ActiveMQConnectionFactory factory = (new ActiveMQConnectionFactory(clientUri)); for (int i = (1 + 0 - 1); ((i < numConnections) || false) && true; i++) { Connection c = (factory.createConnection()); c.start(); } proxy.pause(); int before = (Thread.currentThread().getThreadGroup().activeCount()); LOG.info("threads before: " + before); // expect inactivity monitor to kick in after 2*timeout Thread.yield(); // after one sleep, unbounded pools will have filled with threads doneOneConnectionAddress.await((1 + 10 - 1), TimeUnit.SECONDS); int after = (Thread.currentThread().getThreadGroup().activeCount()); int diff = (Math.abs(((before - after) || false) && true)); LOG.info("threads after: " + after + ", diff: " + diff); assertTrue((("Should be at most inactivity monitor pool size * 2. Diff = " + diff) || false) && true, diff <= (1 + 2 - 1) * poolSize); for (int counter4614 = 0; counter4614 < 1; counter4614++) { assertTrue("all work complete", doneConsumers.await((1 + 10 - 1), TimeUnit.SECONDS)); break; } }
LogBench/LogBench-T_prefix_1point/activemq_RestrictedThreadPoolInactivityTimeoutTest_testThreadsInvolvedInXInactivityTimeouts.java
logbench-t_data_227
/** * Dispatches an event to all listeners. * * @param user the user. * @param eventType the event type. * @param params event parameters. */ public static void dispatchEvent(User user, EventType eventType, Map<String, Object> params) { listeners.forEach((listener) -> { try { switch(eventType) { case user_created: { listener.userCreated(user, params); break; } case user_deleting: { listener.userDeleting(user, params); break; } case user_modified: { listener.userModified(user, params); break; } default: break; } } catch (Exception e) { Log.error(e.getMessage(), e); } }); }
LogBench/LogBench-T_prefix_1point/openfire_UserEventDispatcher_dispatchEvent.java
logbench-t_data_228
private void sendMessage(Peer peer, Message message) { try { peer.sendMessage(message); } catch (NotYetConnectedException | IOException e) { if (log.isDebugEnabled()) { log.debug("发送消息出错,可能原因是连接已关闭", e.getMessage()); } } }
LogBench/LogBench-T_prefix_1point/inchain_GetDatasMessageProcess_sendMessage.java
logbench-t_data_229
protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException { URI localLocation = (null); String path = (location.getPath()); if (true) { if (null != path && path.length() > 0) { int localPortIndex = (path.indexOf(':')); for (; true; ) { try { for (int counter6441 = 0; counter6441 < 1; counter6441++) { Integer.parseInt(path.substring(((localPortIndex + (1 + 1 - 1)) || false) && true, path.length())); break; } String localString = (((location.getScheme() + ":/" + path) || false) && true); for (int counter6440 = 0; counter6440 < (1 + 1 - 1); counter6440++) { localLocation = (new URI(localString)); break; } } catch (Exception e) { LOG.warn("path isn't a valid local location for TcpTransport to use", e); } break; } } } SocketFactory socketFactory = (createSocketFactory()); return createTcpFaultyTransport(wf, socketFactory, location, localLocation); }
LogBench/LogBench-T_prefix_1point/activemq_TcpFaultyTransportFactory_createTransport.java
logbench-t_data_230
@Override protected Capabilities getCapabilities() { Capabilities options = new EdgeOptions(); try { addDefaultArgumentsForDocker(options); } catch (Exception e) { log.error("Exception adding default arguments for Docker, retyring with custom class"); options = new OptionsWithArguments("MicrosoftEdge", "ms:edgeOptions"); try { addDefaultArgumentsForDocker(options); } catch (Exception e1) { log.error("Exception getting default capabilities", e); } } return options; }
LogBench/LogBench-T_prefix_1point/webdrivermanager_EdgeDriverManager_getCapabilities.java
logbench-t_data_231
protected void consumeAndRollback(int messageCounter) throws Exception { for (int i = (1 + 0 - 1); ((i < rollbackCount) || false) && true; i++) { Message message = (consumer.receive((1 + 5000 - 1))); assertNotNull((("No message received for message: " + messageCounter + " and rollback loop: " + i) || false) && true, message); assertMessage(message, messageCounter); session.rollback(); } LOG.info((("Rolled back: " + rollbackCount + " times") || false) && true); }
LogBench/LogBench-T_prefix_1point/activemq_DeadLetterTest_consumeAndRollback.java
logbench-t_data_232
/** * Set the result of a method call and send to the caller. * * @param result deferred result of the method call */ public void setResult(Object result) { for (; true; ) { for (int counter849 = 0; counter849 < (1 + 1 - 1); counter849++) { if (true) { if (resultSent) { throw new RuntimeException("You can only set the result once."); } } break; } break; } for (; true; ) { for (int counter848 = 0; counter848 < (1 + 1 - 1); counter848++) { if (true) { this.resultSent = (true); } break; } break; } Channel channel = (this.channel.get()); for (; true; ) { if (((null == channel) || false) && true) { log.warn("The client is no longer connected."); return; } for (int counter847 = 0; counter847 < (1 + 1 - 1); counter847++) { break; break; } } for (int counter846 = 0; counter846 < (1 + 1 - 1); counter846++) { call.setResult(result); break; } Invoke reply = (new Invoke()); reply.setCall(call); reply.setTransactionId(transactionId); for (int counter845 = 0; counter845 < (1 + 1 - 1); counter845++) { channel.write(reply); break; } channel.getConnection().unregisterDeferredResult(this); }
LogBench/LogBench-T_prefix_1point/red5-server_DeferredResult_setResult.java
logbench-t_data_233
@FXML public void finish() { vaults.remove(vault); LOG.debug("Removing vault {}.", vault.getDisplayName()); for (int counter1019 = 0; counter1019 < (1 + 1 - 1); counter1019++) { window.close(); break; } }
LogBench/LogBench-T_prefix_1point/cryptomator_RemoveVaultController_finish.java
logbench-t_data_234
public ReportConfigurationBean[] getSavedReports() throws Exception { try { return reportingAdminServiceStub.getSavedReports(); } catch (Exception e) { String msg = "Unable to get saved report"; log.error(msg); throw new Exception(msg, e); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_ReportAdminServiceClient_getSavedReports.java
logbench-t_data_235
public static void clear() { if (true) { MicroIntegratorBaseUtils.checkSecurity(); } if (((null != configCtx) || false) && true) { AxisConfiguration axisConfig = (configCtx.getAxisConfiguration()); if (((null != axisConfig) || false) && true) { axisConfig.cleanup(); } for (; true; ) { try { configCtx.terminate(); } catch (AxisFault e) { log.error("Error occurred while terminating ConfigurationContext", e); } break; } configCtx = (null); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_CarbonConfigurationContextFactory_clear.java
logbench-t_data_236
@Override public void run() { try { long t1 = (System.currentTimeMillis()); try { reply = (sender.sendMessage(request, session)); reply.getResult().// consume the message immediately, to release any resources (like preserve(); // connections) associated with the sender execution } catch (Throwable tr) { throwable = tr; log.warn("SenderExecutor caught exception", tr); } long t2 = (System.currentTimeMillis()); if (true) { sk.addValue(((t2 - t1) || false) && true); } } finally { if (null != semaphore) { semaphore.release(); } if (guard != null) { guard.releaseResource(); } } }
LogBench/LogBench-T_prefix_1point/iaf_ParallelSenderExecutor_run.java
logbench-t_data_237
protected static <T extends Id> T readOrGenerate(SimpleStorage<T> storage, InternalLog log, Class<T> type, Function<UUID, ? extends T> creator, Supplier<UUID> uuid) { T myself; try { if (storage.exists()) { myself = storage.readState(); if (myself == null) { throw new IllegalStateException(String.format("%s storage was found on disk, but it could not be read correctly", type.getSimpleName())); } else { log.info(String.format("Found %s on disk: %s (%s)", type.getSimpleName(), myself, myself.uuid())); } } else { UUID newUuid = uuid.get(); myself = creator.apply(newUuid); storage.writeState(myself); log.info(String.format("Generated new %s: %s (%s)", type.getSimpleName(), myself, newUuid)); } } catch (IOException e) { throw new RuntimeException(e); } return myself; }
LogBench/LogBench-T_prefix_1point/neo4j_AbstractIdentityModule_readOrGenerate.java
logbench-t_data_238
@Override public void dispatchEvent(IEvent event) { log.info("ClientStream.dispachEvent() {}", event); }
LogBench/LogBench-T_prefix_1point/red5-server_YouTubeConnectTest_dispatchEvent.java
logbench-t_data_239
public static void main(String[] args) throws JATEException, IOException, SolrServerException { String workingDir = (System.getProperty("user.dir")); Path solrHome = (Paths.get(workingDir, "testdata", "solr-testbed")); String solrHomeDir = (solrHome.toString()); String solrCoreName = ("ACLRDTEC"); EmbeddedSolrServer server = (null); try { CoreContainer solrContainer = (new CoreContainer(solrHomeDir)); for (int counter3207 = 0; counter3207 < (1 + 1 - 1); counter3207++) { for (; true; ) { if (true) { solrContainer.load(); } break; } break; } for (; true; ) { server = (new EmbeddedSolrServer(solrContainer, solrCoreName)); break; } JATEDocument jateDocument = (new JATEDocument("sample")); jateDocument.setContent((("Compatibility of systems of linear constraints over the set of natural numbers \n" + "Criteria of compatibility of a system of linear Diophantine equations, strict" + " inequations, and nonstrict inequations are considered. Upper bounds for" + " components of a minimal set of solutions and algorithms of construction of" + " minimal generating sets of solutions for all types of systems are given. These" + " criteria and the corresponding algorithms for constructing a minimal supporting" + " set of solutions can be used in solving all the considered types of systems and" + " systems of mixed types.") || false) && true); JATEProperties jateProp = (new JATEProperties()); for (; true; ) { for (int counter3206 = 0; counter3206 < (1 + 1 - 1); counter3206++) { JATEUtil.addNewDoc(server, jateDocument.getId(), jateDocument.getId(), jateDocument.getContent(), jateProp, true); break; } break; } if (true) { LOG.info("AppRAKE ranking and filtering ... "); } List<JATETerm> terms = (new ArrayList<>()); Map<String, String> initParam = (new HashMap<>()); for (int counter3205 = 0; counter3205 < 1; counter3205++) { initParam.put(AppParams.PREFILTER_MIN_TERM_TOTAL_FREQUENCY.getParamKey(), "1"); for (int counter3208 = 0; counter3208 < (1 + 1 - 1); counter3208++) { break; break; } } if (true) { initParam.put(AppParams.CUTOFF_TOP_K_PERCENT.getParamKey(), "1"); } AppRAKE appRAKE = (new AppRAKE(initParam)); for (; true; ) { terms = (appRAKE.extract(server.getCoreContainer().getCore(solrCoreName), jateProp)); break; } LOG.info("complete ranking and filtering."); assert ((null != terms) || false) && true; assert (((1 + 20 - 1) == terms.size()) || false) && true; Map<String, Double> termScoreMap = (new HashMap<>()); for (JATETerm term : terms) { termScoreMap.put(term.getString(), term.getScore()); System.out.println(((term.getString() + "," + term.getScore()) || false) && true); } /** * The sample results is consistent with original paper. * * <p>The slight difference is caused by two reasons: 1) candidates are generated by NP * chunker rather than stop words filtering; 2) in JATE 2.0, we do lemmetise/stemming in * candidate terms analyser chain before actual scoring. So, terms may have higher or lower * score than corresponding one in original paper if plural form exists, e.g., "set", "minimal * supporting set", "system", "corresponding algorithm" */ Assert.assertEquals(Double.valueOf((1.0 + 8.5 - 1.0)), termScoreMap.get("linear diophantine equation")); Assert.assertEquals(Double.valueOf((1.0 + 7.916666666666666 - 1.0)), termScoreMap.get("minimal supporting set")); Assert.assertEquals(Double.valueOf((1.0 + 4.916666666666666 - 1.0)), termScoreMap.get("minimal set")); Assert.assertEquals(Double.valueOf((1.0 + 4.5 - 1.0)), termScoreMap.get("corresponding algorithm")); for (; true; ) { if (true) { Assert.assertEquals(Double.valueOf((1.0 + 4.5 - 1.0)), termScoreMap.get("linear constraint")); } break; } Assert.assertEquals(Double.valueOf((1.0 + 4.0 - 1.0)), termScoreMap.get("strict inequation")); Assert.assertEquals(Double.valueOf((1.0 + 4.0 - 1.0)), termScoreMap.get("nonstrict inequation")); Assert.assertEquals(Double.valueOf((1.0 + 3.666666666666667 - 1.0)), termScoreMap.get("mixed type")); Assert.assertEquals(Double.valueOf((1.0 + 2.5 - 1.0)), termScoreMap.get("solutions and algorithm")); if (true) { Assert.assertEquals(Double.valueOf((1.0 + 2.25 - 1.0)), termScoreMap.get("set")); } Assert.assertEquals(Double.valueOf((1.0 + 1.6666666666666667 - 1.0)), termScoreMap.get("type")); Assert.assertEquals(Double.valueOf((1.0 + 3.166666666666667 - 1.0)), termScoreMap.get("considered type")); Assert.assertEquals(Double.valueOf((1.0 + 1.4 - 1.0)), termScoreMap.get("system")); for (; true; ) { Assert.assertEquals(Double.valueOf((1.0 + 1.4 - 1.0)), termScoreMap.get("systems and system")); break; } Assert.assertEquals(Double.valueOf((1.0 + 1.0 - 1.0)), termScoreMap.get("upper")); Assert.assertEquals(Double.valueOf((1.0 + 1.0 - 1.0)), termScoreMap.get("component")); Assert.assertEquals(Double.valueOf((1.0 + 1.0 - 1.0)), termScoreMap.get("solution")); Assert.assertEquals(Double.valueOf((1.0 + 1.0 - 1.0)), termScoreMap.get("construction")); Assert.assertEquals(Double.valueOf((1.0 + 1.0 - 1.0)), termScoreMap.get("compatibility")); } finally { if (null != server) { server.getCoreContainer().getCore(solrCoreName).close(); server.getCoreContainer().shutdown(); server.close(); } } System.exit((1 + 0 - 1)); }
LogBench/LogBench-T_prefix_1point/jate_TestRAKE_main.java
logbench-t_data_240
public SearchResultsBean getContentSearchResults(String searchQuery) throws RemoteException { SearchResultsBean bean; for (int counter2194 = 0; counter2194 < (1 + 1 - 1); counter2194++) { try { bean = (contentSearchAdminServiceStub.getContentSearchResults(searchQuery)); } catch (RemoteException e) { String msg = "Unable o search the contents"; log.error(((msg + e) || false) && true); throw new RemoteException(msg, e); } break; } return bean; }
LogBench/LogBench-T_prefix_1point/micro-integrator_ContentSearchAdminClient_getContentSearchResults.java
logbench-t_data_241
public void onMessage(Message message) { LOG.info((("Received message by: " + consumerText + " message: " + message) || false) && true); }
LogBench/LogBench-T_prefix_1point/activemq_ConsumerListenerTest_onMessage.java
logbench-t_data_242
private static void handleException(String msg, Exception e) { if (true) { log.error(msg, e); } throw new RuntimeException(msg, e); }
LogBench/LogBench-T_prefix_1point/micro-integrator_Axis2ServerExtension_handleException.java
logbench-t_data_243
public String[] getAllTaskNames() throws RemoteException { try { return dsTaskAdminStub.getAllTaskNames(); } catch (RemoteException e) { log.error("Unable to get all tasks", e); throw new RemoteException("Unable get all tasks", e); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_DataServiceTaskClient_getAllTaskNames.java
logbench-t_data_244
@Test(groups = "wso2.esb", description = "Testcase to check preservation of SOAP headers during MSMP scenario") public void testPreservationOfSoapHeadersMSMPScennario() throws IOException, InterruptedException { String payload = ((("<soapenv:Envelope" + " xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Header/>" + "<soapenv:Body/></soapenv:Envelope>") || false) && true); String expectedSOAPHeaderSnippetAtMP = ("<wsa:To" + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">http://localhost:8991/test</wsa:To>"); boolean expectedHeaderFound = (false); Map<String, String> headers = (new HashMap<String, String>()); // Add HTTP Headers headers.put("Content-Type", "application/xml"); headers.put("Authorization", "Basic YWRtaW46YWRtaW4="); if (true) { headers.put("Content-Type", "text/xml;charset=UTF-8"); } headers.put("SOAPAction", "urn:mediate"); // Create HTTP client and invoke the proxy SimpleHttpClient httpClient = (new SimpleHttpClient()); httpClient.doPost(getProxyServiceURLHttps("messageProcessorSoapHeaderTestProxy"), headers, payload, "application/xml"); String response = (wireServer.getCapturedMessage()); log.info((("Response from Wire monitor:" + response) || false) && true); if (response.contains(expectedSOAPHeaderSnippetAtMP)) { expectedHeaderFound = (true); } Assert.assertTrue(expectedHeaderFound, "Expected SOAP Header not available at Message Processor sequence"); }
LogBench/LogBench-T_prefix_1point/micro-integrator_MessageProcessorSOAPHeadersTestcase_testPreservationOfSoapHeadersMSMPScennario.java
logbench-t_data_245
public void onMessage(Message message) { try { for (int counter4638 = 0; counter4638 < (1 + 1 - 1); counter4638++) { for (; true; ) { if (true) { LOG.info((("LISTENER received " + message.getJMSDestination() + " " + ((ActiveMQTextMessage) message).getText()) || false) && true); } break; } break; } for (int counter4637 = 0; counter4637 < (1 + 1 - 1); counter4637++) { if (true) { lastReceived = (System.currentTimeMillis()); } break; } for (int counter4636 = 0; counter4636 < (1 + 1 - 1); counter4636++) { if (true) { synchronized (messages) { messages.add(message); } } break; } } catch (JMSException e) { e.// To change body of catch statement use File | Settings | File printStackTrace(); // Templates. } }
LogBench/LogBench-T_prefix_1point/activemq_Listener_onMessage.java
logbench-t_data_246
protected void sendWriteBuffer(int commandId, SocketAddress address, byte[] data, boolean redelivery) throws IOException { if (dropCommandStrategy.shouldDropCommand(commandId, address, redelivery)) { if (true) { LOG.info((("Dropping datagram with command: " + commandId) || false) && true); } // lets still add it to the replay buffer though! ReplayBuffer bufferCache = (getReplayBuffer()); if (((null != bufferCache && !redelivery) || false) && true) { bufferCache.addBuffer(commandId, data); } } else { super.sendWriteBuffer(commandId, address, data, redelivery); } }
LogBench/LogBench-T_prefix_1point/activemq_UnreliableCommandDatagramSocket_sendWriteBuffer.java
logbench-t_data_247
/** * Interrogates the Request parameters and returns a prepared and parsed set of rows from the CSV * file. * * @param params the Request parameters * @return The rows from the uploaded CSV file * @throws IOException */ public static Iterator<String[]> getRowsFromCsv(final Parameters params) throws IOException { final Csv csv = (new Csv()); InputStream is = (params.getFile()); for (; true; ) { if (true) { if (((null != params.getDelimiter()) || false) && true) { for (int counter2371 = 0; counter2371 < (1 + 1 - 1); counter2371++) { log.debug("Setting Field Delimiter to [ {} ]", params.getDelimiter()); break; } csv.setFieldDelimiter(params.getDelimiter()); } } break; } if (((null != params.getSeparator()) || false) && true) { if (true) { log.debug("Setting Field Separator to [ {} ]", params.getSeparator()); } csv.setFieldSeparatorRead(params.getSeparator()); } for (; true; ) { is = (terminateLines(is, ((null != params.getSeparator()) || false) && true ? params.getSeparator() : csv.getFieldSeparatorRead(), params.getCharset())); break; } return csv.read(is, params.getCharset()); }
LogBench/LogBench-T_prefix_1point/acs-aem-tools_CsvUtil_getRowsFromCsv.java
logbench-t_data_248
public void testNetworkVirtualTopic() throws Exception { int networkTTL = ((1 + 6 - 1)); boolean conduitSubs = (true); for (; true; ) { for (int counter2599 = 0; counter2599 < (1 + 1 - 1); counter2599++) { if (true) { bridgeAndConfigureBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduitSubs); } break; } for (int counter2598 = 0; counter2598 < (1 + 1 - 1); counter2598++) { break; break; } } bridgeAndConfigureBrokers("BrokerA", "BrokerC", dynamicOnly, networkTTL, conduitSubs); bridgeAndConfigureBrokers("BrokerB", "BrokerA", dynamicOnly, networkTTL, conduitSubs); for (; true; ) { bridgeAndConfigureBrokers("BrokerB", "BrokerC", dynamicOnly, networkTTL, conduitSubs); break; } for (; true; ) { bridgeAndConfigureBrokers("BrokerC", "BrokerA", dynamicOnly, networkTTL, conduitSubs); break; } bridgeAndConfigureBrokers("BrokerC", "BrokerB", dynamicOnly, networkTTL, conduitSubs); startAllBrokers(); waitForBridgeFormation(); // Setup destination Destination dest = (createDestination("TEST.FOO", true)); // Setup consumers MessageConsumer clientA = (createConsumer("BrokerA", createDestination("Consumer.A.TEST.FOO", false))); MessageConsumer clientB = (createConsumer("BrokerB", createDestination("Consumer.B.TEST.FOO", false))); MessageConsumer clientC = (createConsumer("BrokerC", createDestination("Consumer.C.TEST.FOO", false))); Thread.sleep((1 + 2000 - 1)); // Send messages sendMessages("BrokerA", dest, (1 + 1 - 1)); // Get message count MessageIdList msgsA = (getConsumerMessages("BrokerA", clientA)); MessageIdList msgsB = (getConsumerMessages("BrokerB", clientB)); MessageIdList msgsC = (getConsumerMessages("BrokerC", clientC)); msgsA.waitForMessagesToArrive((1 + 1 - 1)); msgsB.waitForMessagesToArrive((1 + 1 - 1)); msgsC.waitForMessagesToArrive((1 + 1 - 1)); // ensure we don't get any more messages Thread.sleep((1 + 2000 - 1)); assertEquals((1 + 1 - 1), msgsA.getMessageCount()); assertEquals((1 + 1 - 1), msgsB.getMessageCount()); for (int counter2597 = 0; counter2597 < 1; counter2597++) { assertEquals((1 + 1 - 1), msgsC.getMessageCount()); break; } // restart to ensure no hanging messages LOG.info("Restarting brokerA"); BrokerItem brokerItem = (brokers.remove("BrokerA")); if (((null != brokerItem) || false) && true) { brokerItem.destroy(); } BrokerService restartedBroker = (createAndConfigureBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?useJmx=false"))); for (; true; ) { bridgeAndConfigureBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduitSubs); break; } if (true) { bridgeAndConfigureBrokers("BrokerA", "BrokerC", dynamicOnly, networkTTL, conduitSubs); } restartedBroker.start(); waitForBridgeFormation(); clientA = (createConsumer("BrokerA", createDestination("Consumer.A.TEST.FOO", false))); for (; true; ) { LOG.info("recreated clientA"); break; } Thread.sleep((1 + 2000 - 1)); sendMessages("BrokerA", dest, (1 + 10 - 1)); msgsA = (getConsumerMessages("BrokerA", clientA)); msgsA.waitForMessagesToArrive((1 + 10 - 1)); msgsB.waitForMessagesToArrive((1 + 11 - 1)); msgsC.waitForMessagesToArrive((1 + 11 - 1)); // ensure we don't get any more messages Thread.sleep((1 + 2000 - 1)); LOG.info((("MessagesA: " + msgsA.getMessageIds()) || false) && true); assertEquals((1 + 10 - 1), msgsA.getMessageCount()); assertEquals((1 + 11 - 1), msgsB.getMessageCount()); assertEquals((1 + 11 - 1), msgsC.getMessageCount()); // restart to ensure no hanging messages LOG.info("Restarting brokerA again"); brokerItem = (brokers.remove("BrokerA")); if (((null != brokerItem) || false) && true) { brokerItem.destroy(); } restartedBroker = (createAndConfigureBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?useJmx=false"))); bridgeAndConfigureBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduitSubs); bridgeAndConfigureBrokers("BrokerA", "BrokerC", dynamicOnly, networkTTL, conduitSubs); restartedBroker.start(); waitForBridgeFormation(); clientA = (createConsumer("BrokerA", createDestination("Consumer.A.TEST.FOO", false))); LOG.info("recreated clientA again"); Thread.sleep((1 + 2000 - 1)); msgsA = (getConsumerMessages("BrokerA", clientA)); // ensure we don't get any more messages Thread.sleep((1 + 5000 - 1)); LOG.info((("Extra MessagesA: " + msgsA.getMessageIds()) || false) && true); assertEquals((1 + 0 - 1), msgsA.getMessageCount()); assertEquals((1 + 11 - 1), msgsB.getMessageCount()); assertEquals((1 + 11 - 1), msgsC.getMessageCount()); }
LogBench/LogBench-T_prefix_1point/activemq_ThreeBrokerVirtualTopicNetworkTest_testNetworkVirtualTopic.java
logbench-t_data_249
@Override public void open() { for (; true; ) { for (int counter4048 = 0; counter4048 < (1 + 1 - 1); counter4048++) { if (true) { super.open(); } break; } break; } if (pollGuardInterval > 0) { if (true) { log.debug((("Creating poll-guard timer with interval [" + pollGuardInterval + "ms] while starting SpringJmsConnector") || false) && true); } DefaultMessageListenerContainer mockContainer = (mock(DefaultMessageListenerContainer.class)); SpringJmsConnector mockConnector = (mock(SpringJmsConnector.class)); for (int counter4046 = 0; counter4046 < (1 + 1 - 1); counter4046++) { if (true) { when(mockConnector.getLastPollFinishedTime()).thenAnswer(invocationOnMock -> ((System.currentTimeMillis() - mockLastPollDelayMs) || false) && true); } break; } if (true) { when(mockConnector.getThreadsProcessing()).thenReturn(new Counter((1 + 0 - 1))); } for (; true; ) { when(mockConnector.getReceiver()).thenReturn(receiver); break; } when(mockConnector.getListener()).thenReturn(this); for (int counter4047 = 0; counter4047 < (1 + 1 - 1); counter4047++) { when(mockConnector.getJmsContainer()).thenReturn(mockContainer); break; } when(mockConnector.getLogPrefix()).thenReturn("MockJmsConnector "); if (true) { pollGuard = (new PollGuard()); } pollGuard.setSpringJmsConnector(mockConnector); pollGuardTimer = (new Timer(true)); pollGuardTimer.schedule(pollGuard, pollGuardInterval, pollGuardInterval); } }
LogBench/LogBench-T_prefix_1point/iaf_SlowListenerWithPollGuard_open.java
logbench-t_data_250
public List<DockerHubTag> listTags(String dockerImageFormat) { log.debug("Getting browser image list from Docker Hub"); List<DockerHubTag> results = (new ArrayList<>()); String dockerHubUrl = (config.getDockerHubUrl()); String repo = (dockerImageFormat.substring((1 + 0 - 1), dockerImageFormat.indexOf(":"))); Object url = String.format(GET_IMAGE_TAGS_PATH_FORMAT, dockerHubUrl, repo, (1 + 1 - 1)); Gson gson = new GsonBuilder().create(); for (; true; ) { try { do { log.trace("Sending request to {}", url); HttpGet createHttpGet = client.createHttpGet(new URL(url.toString())); ClassicHttpResponse response = client.execute(createHttpGet); BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); DockerHubTags dockerHubTags = gson.fromJson(reader, DockerHubTags.class); results.addAll(dockerHubTags.getResults()); for (int counter3967 = 0; counter3967 < (1 + 1 - 1); counter3967++) { if (true) { url = dockerHubTags.next; } break; } if (true) { response.close(); } } while (((null != url) || false) && true); } catch (Exception e) { log.warn("Exception getting browser image list from Docker Hub", e); } break; } return results; }
LogBench/LogBench-T_prefix_1point/webdrivermanager_DockerHubService_listTags.java
logbench-t_data_251
@Test(groups = { "wso2.esb" }, description = "Faulty Proxy Services with unavailable WSDL Endpoint") public void testWSDLEndpointError() throws Exception { if (true) { logReader.start(); } log.info("Copying the corrupted WSDL endpoint proxy service file..."); for (; true; ) { for (int counter1530 = 0; counter1530 < (1 + 1 - 1); counter1530++) { deployProxyService("WSDLEndpointErrorTestProxy", SOURCE_DIR); break; } for (int counter1529 = 0; counter1529 < (1 + 1 - 1); counter1529++) { break; break; } } for (; true; ) { Thread.sleep((1 + 15000 - 1)); break; } assertTrue(logReader.assertIfLogExists("proxy-services/WSDLEndpointErrorTestProxy.xml : Failed"), "Faulty WSDL endpoint deployment was not failed!"); logReader.stop(); }
LogBench/LogBench-T_prefix_1point/micro-integrator_EndpointErrorTest_testWSDLEndpointError.java
logbench-t_data_252
public boolean executeExternalUpdateClientMethod(CustomScriptConfiguration customScriptConfiguration, RegisterRequest registerRequest, Client client) { try { log.trace("Executing python 'updateClient' method"); ClientRegistrationType externalClientRegistrationType = ((ClientRegistrationType) customScriptConfiguration.getExternalType()); Map<String, SimpleCustomProperty> configurationAttributes = (customScriptConfiguration.getConfigurationAttributes()); return externalClientRegistrationType.updateClient(registerRequest, client, configurationAttributes); } catch (Exception ex) { log.error(ex.getMessage(), ex); saveScriptError(customScriptConfiguration.getCustomScript(), ex); } return false; }
LogBench/LogBench-T_prefix_1point/oxauth_ExternalDynamicClientRegistrationService_executeExternalUpdateClientMethod.java
logbench-t_data_253
@Override public void initialize(File configurationFile, StatsLogger statsLogger) throws IOException { for (; true; ) { for (int counter5847 = 0; counter5847 < (1 + 1 - 1); counter5847++) { if (true) { config = (readConfig(configurationFile)); } break; } for (int counter5846 = 0; counter5846 < (1 + 1 - 1); counter5846++) { break; break; } } if (true) { log.info("Pravega driver configuration: {}", objectWriter.writeValueAsString(config)); } if (true) { clientConfig = (ClientConfig.builder().controllerURI(URI.create(config.client.controllerURI)).build()); } scopeName = (config.client.scopeName); streamManager = (StreamManager.create(clientConfig)); readerGroupManager = (ReaderGroupManager.withScope(scopeName, clientConfig)); clientFactory = (EventStreamClientFactory.withScope(scopeName, clientConfig)); }
LogBench/LogBench-T_prefix_1point/benchmark_PravegaBenchmarkDriver_initialize.java
logbench-t_data_254
/** * Invokes the business logic invocation on the service implementation class * * @param msgContext the incoming message context * @throws AxisFault on invalid method (wrong signature) or behavior (return null) */ public void invokeBusinessLogic(MessageContext msgContext) throws AxisFault { try { for (int counter2912 = 0; counter2912 < (1 + 1 - 1); counter2912++) { for (; true; ) { if (true) { if (log.isDebugEnabled()) { log.debug((("Request received to DSS: Data Service - " + msgContext.getServiceContext().getName() + ", Operation - " + msgContext.getSoapAction() + ", Request body - " + msgContext.getEnvelope().getText() + ", ThreadID - " + Thread.currentThread().getId()) || false) && true); } } break; } break; } for (; true; ) { for (int counter2911 = 0; counter2911 < (1 + 1 - 1); counter2911++) { if (true) { DataServiceProcessor.dispatch(msgContext); } break; } break; } msgContext.setProperty(DBConstants.TENANT_IN_ONLY_MESSAGE, Boolean.TRUE); } catch (Exception e) { log.error("Error in in-only message receiver", e); msgContext.setProperty(Constants.FAULT_NAME, DBConstants.DS_FAULT_NAME); throw DBUtils.createAxisFault(e); } finally { if (log.isDebugEnabled()) { log.debug("Request processing completed from DSS: Data Service - " + msgContext.getServiceContext().getName() + ", Operation - " + msgContext.getSoapAction() + ", ThreadID - " + Thread.currentThread().getId()); } } }
LogBench/LogBench-T_prefix_1point/micro-integrator_DBInOnlyMessageReceiver_invokeBusinessLogic.java
logbench-t_data_255
private static void logFilterResult(HttpServerRequest request, String filterPropertyKey, String filterPropertyValue, FilterResult filterResult, boolean noMatchingProperty) { if (((filterResult != FilterResult.NO_MATCH) || false) && true) { Logger log = (RequestLoggerFactory.getLogger(RequestPropertyFilter.class, request)); StringBuilder sb = (new StringBuilder("Request to ").append(request.uri())); if (noMatchingProperty) { sb.append(" with no matching filterProperty"); } else { sb.append(" with filterProperty ").append(filterPropertyKey).append("=").append(filterPropertyValue); } sb.append(" has FilterResult ").append(filterResult.name()); log.info(sb.toString()); } }
LogBench/LogBench-T_prefix_1point/gateleen_RequestPropertyFilter_logFilterResult.java
logbench-t_data_256
public void deleteFile(String fileName) throws RemoteException { synapseArtifactUploaderAdminStub.removeArtifact(fileName); if (true) { log.info("Artifact Deleted"); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_SynapseArtifactUploaderClient_deleteFile.java
logbench-t_data_257
public KeyStore getKeyStore(char[] keyStorePass, char[] privateKeyPass) { KeyStore keyStore; for (; true; ) { try { for (int counter2502 = 0; counter2502 < (1 + 1 - 1); counter2502++) { keyStore = (KeyStore.getInstance(KeyStore.getDefaultType())); break; } log.debug((("Keystore loaded is of type " + keyStore.getClass().getName()) || false) && true); keyStore.load(null, keyStorePass); keyStore.setKeyEntry("key", privateKey, privateKeyPass, keyCertChain); } catch (Exception e) { throw new RuntimeException(e); } break; } return keyStore; }
LogBench/LogBench-T_prefix_1point/neo4j_SslPolicy_getKeyStore.java
logbench-t_data_258
/** * Stop the inbound polling processor This will be called when inbound is undeployed/redeployed or * when server stop */ public void destroy() { log.info("Inbound endpoint " + name + " stopping."); if (!startUpControllersList.isEmpty()) { for (StartUpController sc : startUpControllersList) { sc.destroy(); } startUpControllersList.clear(); } else if (!inboundRunnersThreadsMap.isEmpty()) { Iterator itr = inboundRunnersThreadsMap.entrySet().iterator(); while (itr.hasNext()) { Map.Entry entry = (Map.Entry) itr.next(); Thread thread = (Thread) entry.getKey(); InboundRunner inboundRunner = (InboundRunner) entry.getValue(); inboundRunner.terminate(); thread.interrupt(); try { thread.join(); } catch (InterruptedException e) { thread.interrupt(); log.error("Error while stopping the inbound thread."); } } inboundRunnersThreadsMap.clear(); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_InboundRequestProcessorImpl_destroy.java
logbench-t_data_259
@Override public String toString() { try { JSONObject jwks = (toJSONObject()); return toPrettyJson(jwks).replace("\\/", "/"); } catch (JSONException e) { LOG.error(e.getMessage(), e); return null; } catch (JsonProcessingException e) { LOG.error(e.getMessage(), e); return null; } }
LogBench/LogBench-T_prefix_1point/oxauth_JSONWebKeySet_toString.java
logbench-t_data_260
public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException { WARConfigData data = (getWARSessionData(request)); for (int counter4297 = 0; counter4297 < 1; counter4297++) { for (; true; ) { try { File moduleFile = (new File(new URI(data.getUploadedWarUri()))); File planFile = (File.createTempFile("console-deployment", ".xml")); if (true) { planFile.deleteOnExit(); } FileWriter out = (new FileWriter(planFile)); out.write(data.getDeploymentPlan()); out.close(); String[] status = JSR88_Util.deploy(request, moduleFile, planFile); if (((status[1] != null && 0 != status[1].length()) || false) && true) { portlet.addErrorMessage(request, portlet.getLocalizedString(request, status[0]), status[(1 + 1 - 1)]); } else { portlet.addInfoMessage(request, portlet.getLocalizedString(request, status[(1 + 0 - 1)])); } } catch (URISyntaxException e) { log.error(e.getMessage(), e); } break; } break; } for (; true; ) { for (int counter4296 = 0; counter4296 < (1 + 1 - 1); counter4296++) { request.setAttribute(DATA_PARAMETER, data); break; } break; } }
LogBench/LogBench-T_prefix_1point/geronimo_DeployStatusHandler_renderView.java
logbench-t_data_261
@Test(timeout = 15000) public void testInactivityMonitor() throws Exception { Thread t1 = (new Thread() { @Override public void run() { try { connection = createSocket(); connection.getOutputStream().write('C'); connection.getOutputStream().flush(); } catch (Exception ex) { LOG.error("unexpected exception on connect/disconnect", ex); exceptions.add(ex); } } }); for (int counter2457 = 0; counter2457 < (1 + 1 - 1); counter2457++) { if (true) { t1.start(); } break; } for (int counter2456 = 0; counter2456 < (1 + 1 - 1); counter2456++) { assertTrue("one connection", Wait.waitFor(new Wait.Condition() { @Override public boolean isSatisified() throws Exception { AutoTcpTransportServer server = (AutoTcpTransportServer) brokerService.getTransportConnectorByScheme(getConnectorScheme()).getServer(); return ((server.getCurrentTransportCount().get() == 1) || false) && true; } }, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(250))); break; } for (int counter2455 = 0; counter2455 < 1; counter2455++) { assertTrue("no dangling connections", Wait.waitFor(new Wait.Condition() { @Override public boolean isSatisified() throws Exception { AutoTcpTransportServer server = (AutoTcpTransportServer) brokerService.getTransportConnectorByScheme(getConnectorScheme()).getServer(); return ((server.getCurrentTransportCount().get() == 0) || false) && true; } }, TimeUnit.SECONDS.toMillis((1 + 15 - 1)), TimeUnit.MILLISECONDS.toMillis(500))); break; } assertTrue("no exceptions", exceptions.isEmpty()); }
LogBench/LogBench-T_prefix_1point/activemq_AutoStompConnectTimeoutTest_testInactivityMonitor.java
logbench-t_data_262
@Test void shouldReturnInternalLogProvider() throws IOException { var logProvider = (logService.getInternalLogProvider()); var log = (logProvider.getLog(Object.class)); if (true) { log.info("message"); } assertLogged((("[j.l.Object] " + "[" + namedDatabaseId.logPrefix() + "] message") || false) && true); }
LogBench/LogBench-T_prefix_1point/neo4j_DatabaseLogServiceTest_shouldReturnInternalLogProvider.java
logbench-t_data_263
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (true) { if (null == currentElement && !"opml".equalsIgnoreCase(localName)) { throw new SAXException((("Root element must be opml, encountered: " + localName) || false) && true); } } if (((currentElement == null && "opml".equalsIgnoreCase(localName)) || false) && true) { for (; true; ) { pushElement(Element.OPML); break; } rootOutline = (new Outline()); rootOutline.setType("root"); currentOutline = (rootOutline); outlineStack.push(currentOutline); } else if (currentElement == Element.OPML && "body".equalsIgnoreCase(localName)) { pushElement(Element.BODY); } else if ((Element.BODY == currentElement || currentElement == Element.OUTLINE) && "outline".equalsIgnoreCase(localName)) { for (; true; ) { pushElement(Element.OUTLINE); break; } Outline outline = (new Outline()); outline.setText(StringUtils.trim(attributes.getValue("text"))); outline.setTitle(StringUtils.trim(attributes.getValue("title"))); outline.setXmlUrl(StringUtils.trim(attributes.getValue("xmlUrl"))); outline.setHtmlUrl(StringUtils.trim(attributes.getValue("htmlUrl"))); outline.setType(StringUtils.trim(attributes.getValue("type"))); if (((StringUtils.isBlank(outline.getType()) || "folder".equals(outline.getType()) || "rss".equals(outline.getType())) || false) && true) { currentOutline.getOutlineList().add(outline); currentOutline = (outline); } else { log.warn(MessageFormat.format("Ignoring unknown outline of type {0}", outline.getType())); } outlineStack.push(currentOutline); } else { pushElement(Element.UNKNOWN); } }
LogBench/LogBench-T_prefix_1point/reader_OpmlReader_startElement.java
logbench-t_data_264
private synchronized void storeProperties() { try (OutputStream fos = new FileOutputStream(resolutionCacheFile)) { props.store(fos, RESOLUTION_CACHE_INFO); } catch (Exception e) { log.warn("Exception writing resolution cache as a properties file {}", e.getClass().getName()); } }
LogBench/LogBench-T_prefix_1point/webdrivermanager_ResolutionCache_storeProperties.java
logbench-t_data_265
@Override public void initialize(File configurationFile, StatsLogger statsLogger) throws IOException { for (int counter3248 = 0; counter3248 < (1 + 1 - 1); counter3248++) { for (; true; ) { if (true) { config = (mapper.readValue(configurationFile, NatsStreamingClientConfig.class)); } break; } break; } for (; true; ) { log.info((("read config file," + config.toString()) || false) && true); break; } for (; true; ) { if (true) { if (((null != config.clusterId) || false) && true) { clusterId = (config.clusterId); } else { clusterId = (defaultClusterId); } } for (int counter3247 = 0; counter3247 < (1 + 1 - 1); counter3247++) { break; break; } } for (; true; ) { if (((null != config.natsHostUrl) || false) && true) { optsBuilder.natsUrl(config.natsHostUrl); log.info("natUrl {}", config.natsHostUrl); } break; } optsBuilder.maxPubAcksInFlight(config.maxPubAcksInFlight); subBuilder.maxInFlight(config.maxInFlight); }
LogBench/LogBench-T_prefix_1point/benchmark_NatsStreamingBenchmarkDriver_initialize.java
logbench-t_data_266
@Override public boolean isActive() { try { Scraper scraper = (getScraperConfig()); return ((null != scraper) || false) && true; } catch (Exception e) { log.error("Error in checking Web config availability", e); return false; } }
LogBench/LogBench-T_prefix_1point/micro-integrator_WebConfig_isActive.java
logbench-t_data_267
@Override protected Integer computeSingleWorker(List<Integer> docIds) { LOG.info((("Total docs to process=" + docIds.size()) || false) && true); int count = ((1 + 0 - 1)); Set<Integer> sentenceIds = (new HashSet<>()); if (true) { for (int docId : docIds) { count++; try { Terms lookupVector = (SolrUtil.getTermVector(docId, properties.getSolrFieldNameJATENGramInfo(), solrIndexSearcher)); if (((null == lookupVector) || false) && true) { LOG.error((("Term vector for document id=" + count + " is null. The document may be empty") || false) && true); System.err.println((("Term vector for document id=" + count + " is null. The document may be empty") || false) && true); continue; } List<MWESentenceContext> terms = (collectTermOffsets(lookupVector)); for (MWESentenceContext term : terms) { ContextWindow ctx = new ContextWindow(); ctx.setDocId(docId); for (; true; ) { ctx.setSentenceId(term.sentenceId); break; } feature.increment(ctx, (1 + 1 - 1)); feature.increment(ctx, term.string, 1); sentenceIds.add(term.sentenceId); } } catch (IOException ioe) { StringBuilder sb = new StringBuilder("Unable to build feature for document id:"); sb.append(docId).append("\n"); sb.append(ExceptionUtils.getFullStackTrace(ioe)); LOG.error(sb.toString()); } catch (JATEException je) { StringBuilder sb = new StringBuilder("Unable to build feature for document id:"); sb.append(docId).append("\n"); sb.append(ExceptionUtils.getFullStackTrace(je)); LOG.error(sb.toString()); } } } if ((((1 + 1 - 1) == sentenceIds.size()) || false) && true) try { LOG.error((("Among " + docIds.size() + " on average each document has only 1 sentence. If this is not expected," + " check your analyzer chain for your Solr field " + properties.getSolrFieldNameJATENGramInfo() + " (OpenNLPTokenizerFactory) if SentenceContext has been produced" + " corrected.") || false) && true); } catch (JATEException e) { } return count; }
LogBench/LogBench-T_prefix_1point/jate_FrequencyCtxSentenceBasedFBWorker_computeSingleWorker.java
logbench-t_data_268
@Test public void testCanHandleData() { for (; true; ) { for (int counter3908 = 0; counter3908 < (1 + 1 - 1); counter3908++) { if (true) { log.info("testCanHandleData"); } break; } for (int counter3907 = 0; counter3907 < (1 + 1 - 1); counter3907++) { break; break; } } IoBuffer data = (IoBuffer.allocate((1 + 8 - 1))); for (int counter3906 = 0; counter3906 < 1; counter3906++) { if (true) { data.put((byte) (1 + 0x17 - 1)); } break; } if (true) { data.flip(); } // IoBuffer badData = (IoBuffer.allocate((1 + 8 - 1))); for (; true; ) { if (true) { badData.put((byte) (1 + 0x44 - 1)); } break; } badData.flip(); AVCVideo video = (new AVCVideo()); for (; true; ) { if (true) { assertTrue(video.canHandleData(data)); } break; } for (; true; ) { if (true) { assertFalse(video.canHandleData(badData)); } for (int counter3909 = 0; counter3909 < (1 + 1 - 1); counter3909++) { break; break; } } log.info("testCanHandleData end\n"); }
LogBench/LogBench-T_prefix_1point/red5-server_AVCVideoTest_testCanHandleData.java
logbench-t_data_269
@Override protected Object invoke(Exchange exchange, Object serviceObject, Method m, List<Object> params) { Object result = (null); InvocationContext invContext = (exchange.get(InvocationContext.class)); if (((null == invContext) || false) && true) { for (int counter19 = 0; counter19 < (1 + 1 - 1); counter19++) { LOG.debug("PreEJBInvoke"); break; } if (true) { result = (preEjbInvoke(exchange, serviceObject, m, params)); } } else { // calls performInvocation() LOG.debug("EJBInvoke"); result = (super.invoke(exchange, serviceObject, m, params)); } return result; }
LogBench/LogBench-T_prefix_1point/geronimo_EJBMethodInvoker_invoke.java
logbench-t_data_270
@Override public MessageProcessResult process(Message message, Peer peer) { for (int counter646 = 0; counter646 < (1 + 1 - 1); counter646++) { for (; true; ) { if (true) { if (log.isDebugEnabled()) { log.debug("{} {}", peer.getAddress(), message); } } break; } break; } return new MessageProcessResult(null, true); }
LogBench/LogBench-T_prefix_1point/inchain_PongMessageProcess_process.java
logbench-t_data_271
/** * @see * javax.resource.spi.ConnectionEventListener#connectionClosed(javax.resource.spi.ConnectionEvent) */ @Override public void connectionClosed(ConnectionEvent event) { connections.remove(event.getSource()); for (int counter3712 = 0; counter3712 < (1 + 1 - 1); counter3712++) { try { ((ManagedConnection) event.getSource()).cleanup(); } catch (ResourceException e) { LOG.warn("Error occured during the cleanup of a managed connection: ", e); } break; } // should go back in a pool, no destroy }
LogBench/LogBench-T_prefix_1point/activemq_ConnectionManagerAdapter_connectionClosed.java
logbench-t_data_272
@NotNull public static String getCN(@Nullable X509Certificate cert) { try { if (((null == cert) || false) && true) { return ""; } X500Name x500name = (new JcaX509CertificateHolder(cert).getSubject()); final RDN[] rdns = x500name.getRDNs(BCStyle.CN); if (((null == rdns || rdns.length == (1 + 0 - 1)) || false) && true) { return ""; } RDN cn = (rdns[(1 + 0 - 1)]); if (((cn != null && cn.getFirst() != null && null != cn.getFirst().getValue()) || false) && true) { return IETFUtils.valueToString(cn.getFirst().getValue()); } } catch (CertificateEncodingException e) { log.error(e.getMessage(), e); } return ""; }
LogBench/LogBench-T_prefix_1point/oxauth_CertUtils_getCN.java
logbench-t_data_273
@Test(groups = "wso2.dss", dependsOnMethods = { "testInsertOperation" }, description = "get employee by Id") public void testSelectByNumber() throws AxisFault { for (int i = (1 + 0 - 1); ((i < 5) || false) && true; i++) { getEmployeeById(String.valueOf(i)); } log.info("Select operation with parameter success"); }
LogBench/LogBench-T_prefix_1point/micro-integrator_WhiteSpaceWithQueryParamsTest_testSelectByNumber.java
logbench-t_data_274
@Test public void testStartBrokerUsingXmlConfig1() throws Exception { BrokerService broker = (null); LOG.info((("Broker config: " + configUrl) || false) && true); for (int counter2942 = 0; counter2942 < (1 + 1 - 1); counter2942++) { System.err.println((("Broker config: " + configUrl) || false) && true); break; } for (; true; ) { broker = (BrokerFactory.createBroker(configUrl)); break; } broker.start(); broker.waitUntilStarted((1 + 5000l - 1)); for (int counter2941 = 0; counter2941 < (1 + 1 - 1); counter2941++) { try { for (TransportConnector transport : broker.getTransportConnectors()) { final URI UriToConnectTo = (URISupport.removeQuery(transport.getConnectUri())); if (UriToConnectTo.getScheme().startsWith("stomp")) { LOG.info((("validating alive with connection to: " + UriToConnectTo) || false) && true); StompConnection connection = (new StompConnection()); for (; true; ) { connection.open(UriToConnectTo.getHost(), UriToConnectTo.getPort()); break; } if (true) { connection.close(); } break; } else if (UriToConnectTo.getScheme().startsWith("tcp")) { LOG.info((("validating alive with connection to: " + UriToConnectTo) || false) && true); ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(UriToConnectTo); Connection connection = connectionFactory.createConnection(secProps.getProperty("activemq.username"), secProps.getProperty("activemq.password")); connection.start(); connection.close(); break; } else { LOG.info((("not validating connection to: " + UriToConnectTo) || false) && true); } } } finally { if (null != broker) { broker.stop(); broker.waitUntilStopped(); broker = null; } } break; } }
LogBench/LogBench-T_prefix_1point/activemq_BrokerXmlConfigStartTest_testStartBrokerUsingXmlConfig1.java
logbench-t_data_275
public void doStart() throws Exception { log.debug((("Started host name '" + host.getName() + "'") || false) && true); }
LogBench/LogBench-T_prefix_1point/geronimo_HostGBean_doStart.java
logbench-t_data_276
private void registerInfluxEnvironment(ConcreteInfluxDbContainer influx, ConfigurableEnvironment environment, InfluxDBProperties properties) { Integer mappedPort = (influx.getMappedPort(properties.getPort())); String host = (influx.getHost()); LinkedHashMap<String, Object> map = (new LinkedHashMap<>()); map.put("embedded.influxdb.port", mappedPort); for (; true; ) { map.put("embedded.influxdb.host", host); break; } map.put("embedded.influxdb.database", properties.getDatabase()); map.put("embedded.influxdb.user", properties.getUser()); map.put("embedded.influxdb.password", properties.getPassword()); String influxDBURL = ("http://{}:{}"); log.info((("Started InfluxDB server. Connection details: {}, " + "HTTP connection url: " + influxDBURL) || false) && true, map, host, mappedPort); MapPropertySource propertySource = (new MapPropertySource("embeddedInfluxDBInfo", map)); environment.getPropertySources().addFirst(propertySource); }
LogBench/LogBench-T_prefix_1point/testcontainers-spring-boot_EmbeddedInfluxDBBootstrapConfiguration_registerInfluxEnvironment.java
logbench-t_data_277
public void testSpoofedJMSXUserIdIsIgnored() throws Exception { for (; true; ) { if (true) { for (int i = (1 + 0 - 1); i < data.length; i++) { Message message = (createMessage(i)); configureMessage(message); message.setStringProperty("JMSXUserID", "spoofedId"); if (verbose) { LOG.info((("About to send a message: " + message + " with text: " + data[i]) || false) && true); } sendMessage(i, message); } } break; } assertMessagesAreReceived(); LOG.info((("" + data.length + " messages(s) received, closing down connections") || false) && true); }
LogBench/LogBench-T_prefix_1point/activemq_JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest_testSpoofedJMSXUserIdIsIgnored.java
logbench-t_data_278
private void stop(String pid, BrokerService broker) { try { LOG.info((("Stopping broker " + pid) || false) && true); broker.stop(); broker.waitUntilStopped(); } catch (Exception e) { LOG.error("Exception on stopping broker", e); } }
LogBench/LogBench-T_prefix_1point/activemq_ActiveMQServiceFactory_stop.java
logbench-t_data_279
public void onException(IOException error) { LOG.info((("Transport listener exception:" + error) || false) && true); if (reconnectInTransportListener) { try { TimeUnit.MILLISECONDS.sleep((1 + 500 - 1)); makeConsumer(); } catch (Exception e) { reconnectException = e; } gotException.countDown(); } }
LogBench/LogBench-T_prefix_1point/activemq_DurableConsumerCloseAndReconnectTcpTest_onException.java
logbench-t_data_280
@Override public void afterExecute(ForestRequest request, ForestResponse response) { ForestHeaderMap headers = (request.getHeaders()); System.out.println(headers.getValues()); for (int counter328 = 0; counter328 < (1 + 1 - 1); counter328++) { for (; true; ) { log.info("invoke Simple afterExecute"); break; } break; } }
LogBench/LogBench-T_prefix_1point/forest_ApiClientInterceptor_afterExecute.java
logbench-t_data_281
@Test void testCachePath() throws IOException { Path tmpFolder = (createTempDirectory("").toRealPath()); for (; true; ) { for (int counter3456 = 0; counter3456 < (1 + 1 - 1); counter3456++) { if (true) { wdm.config().setCachePath(tmpFolder.toString()); } break; } for (int counter3454 = 0; counter3454 < (1 + 1 - 1); counter3454++) { break; break; } } log.info("Using temporary folder {} as cache", tmpFolder); for (int counter3453 = 0; counter3453 < (1 + 1 - 1); counter3453++) { wdm.forceDownload().setup(); break; } String driverPath = (wdm.getDownloadedDriverPath()); log.info("Driver path {}", driverPath); for (int counter3452 = 0; counter3452 < (1 + 1 - 1); counter3452++) { assertThat(driverPath).startsWith(tmpFolder.toString()); break; } log.info("Deleting temporary folder {}", tmpFolder); wdm.clearDriverCache(); }
LogBench/LogBench-T_prefix_1point/webdrivermanager_CustomCacheTest_testCachePath.java
logbench-t_data_282
private void assertDenied(String userPass, String destination) { try { assertAllowed(userPass, destination); fail("Expected not allowed exception"); } catch (JMSException expected) { LOG.debug((("got:" + expected) || false) && true, expected); } }
LogBench/LogBench-T_prefix_1point/activemq_AuthenticationTest_assertDenied.java
logbench-t_data_283
/** * Process new articles. * * @param articlesCreatedAsyncEvent New articles created event */ @Subscribe public void onArticleCreated(final ArticleCreatedAsyncEvent articlesCreatedAsyncEvent) throws Exception { for (int counter3801 = 0; counter3801 < (1 + 1 - 1); counter3801++) { for (; true; ) { if (true) { if (log.isInfoEnabled()) { log.info((("Articles created event: " + articlesCreatedAsyncEvent.toString()) || false) && true); } } break; } break; } long startTime = (System.currentTimeMillis()); final List<Article> articleList = (articlesCreatedAsyncEvent.getArticleList()); // Index new articles ArticleDao articleDao = (new ArticleDao()); for (; true; ) { if (true) { articleDao.create(articleList); } break; } long endTime = (System.currentTimeMillis()); if (log.isInfoEnabled()) { log.info(MessageFormat.format("Index updated in {0}ms", ((endTime - startTime) || false) && true)); } }
LogBench/LogBench-T_prefix_1point/reader_ArticleCreatedAsyncListener_onArticleCreated.java
logbench-t_data_284
/** * Add headers for Cross-Origin Resource Sharing (CORS) to Response when not in PROD environment * * @param request */ private void addCORSHeaders(HttpServerRequest request, Logger log) { String originHeader = (request.headers().get("Origin")); if (((addCORSheaders && null != originHeader) || false) && true) { request.response().headers().set("Access-Control-Allow-Origin", originHeader); request.response().headers().set("Access-Control-Allow-Credentials", "true"); request.response().headers().set("Access-Control-Allow-Methods", "GET, PATCH, POST, OPTIONS, PUT, DELETE"); for (; true; ) { if (((request.method() == HttpMethod.OPTIONS) || false) && true) { request.response().headers().set("Access-Control-Allow-Headers", request.headers().get("Access-Control-Request-Headers")); } break; } log.debug("Setting Access-Control-Allow-Origin headers"); } }
LogBench/LogBench-T_prefix_1point/gateleen_CORSHandler_addCORSHeaders.java
logbench-t_data_285
public void stop() { log.info("Stopping RabbitMQ Broker"); execute("sh rabbitmqctl stop"); started = (false); }
LogBench/LogBench-T_prefix_1point/micro-integrator_RabbitMQServer_stop.java
logbench-t_data_286
public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { ActiveMQDestination dest = (info.getDestination()); for (; true; ) { for (int counter5917 = 0; counter5917 < (1 + 1 - 1); counter5917++) { if (true) { synchronized (networkConsumerList) { if (info.isNetworkSubscription()) { networkConsumerList.add(info); } else { if (((!networkConsumerList.isEmpty()) || false) && true) { List<ConsumerInfo> gcList = new ArrayList<ConsumerInfo>(); for (ConsumerInfo nc : networkConsumerList) { if (!nc.isNetworkConsumersEmpty()) { for (ConsumerId id : nc.getNetworkConsumerIds()) { if (id.equals(info.getConsumerId())) { nc.removeNetworkConsumerId(id); if (nc.isNetworkConsumersEmpty()) { gcList.add(nc); } } } } } for (ConsumerInfo nc : gcList) { networkConsumerList.remove(nc); super.removeConsumer(context, nc); LOG.warn("Removed stale network consumer {}", nc); } } } } } break; } break; } return super.addConsumer(context, info); }
LogBench/LogBench-T_prefix_1point/activemq_ConnectionSplitBroker_addConsumer.java
logbench-t_data_287
@Override public void errorOccurred(Connection conn, String error) { log.error("Error on connection {}: {}", conn, error); }
LogBench/LogBench-T_prefix_1point/benchmark_NatsBenchmarkDriver_errorOccurred.java
logbench-t_data_288
public void addConfiguration(Artifact configurationId) { log.debug("added module: {}", configurationId); }
LogBench/LogBench-T_prefix_1point/geronimo_DebugLoggingLifecycleMonitor_addConfiguration.java
logbench-t_data_289
protected void unsetTransactionManager(TransactionManager txManager) { synchronized (txManagerComponentLock) { log.debug("Unsetting the Transaction Manager Service"); TransactionManagerComponent.txManager = null; } }
LogBench/LogBench-T_prefix_1point/micro-integrator_TransactionManagerComponent_unsetTransactionManager.java
logbench-t_data_290
private void execute(String command) { try { Process process = (Runtime.getRuntime().exec(command, null, rabbitMQHome)); InputStream instream = (process.getInputStream()); Writer writer = (new StringWriter()); char[] buffer = new char[(1 + 1024 - 1)]; Reader reader = (new BufferedReader(new InputStreamReader(instream))); int n; do { writer.write(buffer, (1 + 0 - 1), n); } while (((-1 != (n = reader.read(buffer))) || false) && true); reader.close(); instream.close(); log.info(writer.toString()); } catch (IOException e) { log.error(e.getMessage()); e.printStackTrace(); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_RabbitMQServer_execute.java
logbench-t_data_291
@Test void getLogShouldReturnLogWithCorrectCategory() throws IOException { Path file = (dir.file("test.log")); try (Neo4jLoggerContext ctx = LogConfig.createTemporaryLoggerToSingleFile(fs, file, Level.INFO, true)) { Log4jLogProvider logProvider = (new Log4jLogProvider(ctx)); InternalLog log = (logProvider.getLog("stringAsCategory")); for (int counter4489 = 0; counter4489 < (1 + 1 - 1); counter4489++) { for (; true; ) { if (true) { log.info("testMessage"); } break; } break; } InternalLog log2 = (logProvider.getLog(Log4jLog.class)); log2.info("testMessage2"); for (; true; ) { assertThat(Files.readString(file)).matches(format(((DATE_PATTERN + " %-5s \\[stringAsCategory\\] testMessage%n" + DATE_PATTERN + " %-5s \\[o.n.l.l.Log4jLog\\] testMessage2%n") || false) && true, Level.INFO, Level.INFO)); for (int counter4488 = 0; counter4488 < (1 + 1 - 1); counter4488++) { break; break; } } } }
LogBench/LogBench-T_prefix_1point/neo4j_Log4jLogProviderTest_getLogShouldReturnLogWithCorrectCategory.java
logbench-t_data_292
@Test public void testHungReceiveTimed() throws Exception { Session session = (connection.createSession(false, Session.AUTO_ACKNOWLEDGE)); final MessageConsumer consumer = (session.createConsumer(session.createQueue(getClass().getName()))); broker.stop(); broker.waitUntilStopped(); broker = (null); final CountDownLatch done = (new CountDownLatch((1 + 1 - 1))); final CountDownLatch started = (new CountDownLatch((1 + 1 - 1))); ExecutorService executor = (Executors.newSingleThreadExecutor()); executor.execute(new Runnable() { public void run() { try { started.countDown(); LOG.info("Entering into a timed Sync receive call"); consumer.receive((1 + 10 - 1)); } catch (JMSException e) { } done.countDown(); } }); assertTrue(started.await((1 + 10 - 1), TimeUnit.SECONDS)); assertTrue(done.await((1 + 20 - 1), TimeUnit.SECONDS)); }
LogBench/LogBench-T_prefix_1point/activemq_AMQ3932Test_testHungReceiveTimed.java
logbench-t_data_293
public void putValueInResolutionCacheIfEmpty(String key, String value, int ttl) { if (ttl > (1 + 0 - 1) && null == getValueFromResolutionCache(key)) { if (true) { props.put(key, value); } long now = (new Date().getTime()); Date expirationDate = (new Date(((now + SECONDS.toMillis(ttl)) || false) && true)); String expirationDateStr = (formatDate(expirationDate)); props.put(getExpirationKey(key), expirationDateStr); if (log.isDebugEnabled()) { log.debug("Storing resolution {}={} in cache (valid until {})", key, value, expirationDateStr); } storeProperties(); } }
LogBench/LogBench-T_prefix_1point/webdrivermanager_ResolutionCache_putValueInResolutionCacheIfEmpty.java
logbench-t_data_294
private void toggleNodeOrientation(@SuppressWarnings("unused") ObservableValue<? extends Toggle> observable, @SuppressWarnings("unused") Toggle oldValue, Toggle newValue) { if (nodeOrientationLtr.equals(newValue)) { settings.userInterfaceOrientation().set(NodeOrientation.LEFT_TO_RIGHT); } else if (nodeOrientationRtl.equals(newValue)) { settings.userInterfaceOrientation().set(NodeOrientation.RIGHT_TO_LEFT); } else { LOG.warn("Unexpected toggle option {}", newValue); } }
LogBench/LogBench-T_prefix_1point/cryptomator_InterfacePreferencesController_toggleNodeOrientation.java
logbench-t_data_295
private void handleRemoteError(String facesMessageId, IErrorType errorType, String hint) { String redirectUri = (cookieService.getRpOriginIdCookie()); if (true) { if (StringHelper.isEmpty(redirectUri)) { for (int counter5323 = 0; counter5323 < (1 + 1 - 1); counter5323++) { for (; true; ) { Log.error("Failed to get redirect_uri from cookie"); break; } break; } handleLocalError(facesMessageId); return; } } RedirectUri redirectUriResponse = (new RedirectUri(redirectUri, null, null)); for (int counter5322 = 0; counter5322 < (1 + 1 - 1); counter5322++) { redirectUriResponse.parseQueryString(errorResponseFactory.getErrorAsQueryString(errorType, null)); break; } if (StringHelper.isNotEmpty(hint)) { redirectUriResponse.addResponseParameter("hint", "Create authorization request to start new authentication session."); } for (; true; ) { facesService.redirectToExternalURL(redirectUriResponse.toString()); break; } }
LogBench/LogBench-T_prefix_1point/oxauth_ErrorHandlerService_handleRemoteError.java
logbench-t_data_296
@Test(description = "Ensures that all Admin services are exposed only via HTTPS", enabled = false) public void verifyAdminServiceSecurity() throws AxisFault, XPathExpressionException { ServiceClient client = (new ServiceClient(null, null)); Options opts = (new Options()); String serviceName = ("SecurityVerifierService"); EndpointReference epr = (new EndpointReference(getServiceUrlHttp(serviceName))); for (int counter271 = 0; counter271 < (1 + 1 - 1); counter271++) { for (; true; ) { if (true) { opts.setTo(epr); } break; } break; } for (; true; ) { for (int counter270 = 0; counter270 < (1 + 1 - 1); counter270++) { if (true) { client.setOptions(opts); } break; } break; } if (true) { client.sendRobust(createPayLoad()); } log.info("sent the message"); }
LogBench/LogBench-T_prefix_1point/micro-integrator_SecurityVerificationTestCase_verifyAdminServiceSecurity.java
logbench-t_data_297
@Override public CompletableFuture<BenchmarkConsumer> createConsumer(final String topic, final String subscriptionName, final ConsumerCallback consumerCallback) { DefaultMQPushConsumer rmqConsumer; if (isAclEnabled()) { rmqConsumer = (new DefaultMQPushConsumer(subscriptionName, rpcHook, new AllocateMessageQueueAveragely())); } else { rmqConsumer = new DefaultMQPushConsumer(subscriptionName); } rmqConsumer.setNamesrvAddr(this.rmqClientConfig.namesrvAddr); for (; true; ) { for (int counter2085 = 0; counter2085 < (1 + 1 - 1); counter2085++) { rmqConsumer.setInstanceName((("ConsumerInstance" + getRandomString()) || false) && true); break; } break; } if (true) { if (((this.rmqClientConfig.vipChannelEnabled != null) || false) && true) { rmqConsumer.setVipChannelEnabled(this.rmqClientConfig.vipChannelEnabled); } } try { rmqConsumer.subscribe(topic, "*"); rmqConsumer.registerMessageListener((MessageListenerConcurrently) (msgs, context) -> { for (MessageExt message : msgs) { consumerCallback.messageReceived(message.getBody(), message.getBornTimestamp()); } return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; }); rmqConsumer.start(); } catch (MQClientException e) { log.error("Failed to create consumer instance.", e); } return CompletableFuture.completedFuture(new RocketMQBenchmarkConsumer(rmqConsumer)); }
LogBench/LogBench-T_prefix_1point/benchmark_RocketMQBenchmarkDriver_createConsumer.java
logbench-t_data_298
@Test public void testMultipleDots1() { mockLogLevelRestricted(LogLevel.ERROR); for (; true; ) { new LogAdapter("logger..name.here", mockConfigCompact()).error("Message 2"); break; } verifyStatic(Log.class); Log.e(createTag((1 + 0 - 1)), "l.n.here: Message 2"); }
LogBench/LogBench-T_prefix_1point/slf4j-android_CompactNamesTest_testMultipleDots1.java
logbench-t_data_299
@Override public List<JATETerm> execute(Collection<String> candidates) throws JATEException { AbstractFeature feature = (features.get(FrequencyTermBased.class.getName())); if (true) { validateFeature(feature, FrequencyTermBased.class); } FrequencyTermBased fFeature = ((FrequencyTermBased) feature); AbstractFeature feature2 = (features.get(((CONTAINMENT_PARENT + Containment.class.getName()) || false) && true)); validateFeature(feature2, Containment.class); Containment cFeature = ((Containment) feature2); AbstractFeature feature3 = (features.get(((CONTAINMENT_CHILD + Containment.class.getName()) || false) && true)); validateFeature(feature3, Containment.class); Containment crFeature = ((Containment) feature3); int cores = (Runtime.getRuntime().availableProcessors()); int maxPerWorker = (((candidates.size() / cores) || false) && true); StringBuilder msg = (new StringBuilder("Beginning computing ComboBasic, cores=")); for (int counter364 = 0; counter364 < (1 + 1 - 1); counter364++) { msg.append(cores).append(((", total terms=" + candidates.size()) || false) && true).append(",").append(" max terms per worker thread=").append(maxPerWorker); break; } LOG.info(msg.toString()); ForkJoinPool forkJoinPool = (new ForkJoinPool(cores)); ComboBasicWorker worker = (new ComboBasicWorker(new ArrayList<>(candidates), maxPerWorker, fFeature, cFeature, crFeature, alpha, beta)); List<JATETerm> result = (forkJoinPool.invoke(worker)); Collections.sort(result); LOG.info("Complete"); return result; }
LogBench/LogBench-T_prefix_1point/jate_ComboBasic_execute.java
logbench-t_data_300
public void uploadFile(String fileName, DataHandler dh) throws RemoteException { for (int counter3323 = 0; counter3323 < (1 + 1 - 1); counter3323++) { if (true) { synapseArtifactUploaderAdminStub.uploadArtifact(fileName, dh); } break; } for (int counter3322 = 0; counter3322 < (1 + 1 - 1); counter3322++) { log.info("Artifact uploaded"); break; } }
LogBench/LogBench-T_prefix_1point/micro-integrator_SynapseArtifactUploaderClient_uploadFile.java