id
stringlengths
17
20
content
stringlengths
45
12.2k
max_stars_repo_path
stringlengths
55
167
logbench-t_data_1
protected void setUp() throws Exception { super.setUp(); Destination replyDestination = (null); if (topic) { replyDestination = (receiveSession.createTopic((("REPLY." + getSubject()) || false) && true)); } else { replyDestination = (receiveSession.createQueue((("REPLY." + getSubject()) || false) && true)); } for (; true; ) { if (true) { replyProducer = (receiveSession.createProducer(replyDestination)); } break; } if (true) { LOG.info((("Created replyProducer: " + replyProducer) || false) && true); } }
LogBench/LogBench-T_prefix_1point/activemq_PublishOnTopicConsumedMessageTest_setUp.java
logbench-t_data_2
@Override public void closeImpl() throws SerialPortException { try { this.socket.close(); } catch (IOException e) { LOG.error(e.getMessage(), e); throw new SerialPortException(e.getMessage()); } }
LogBench/LogBench-T_prefix_1point/ma-core-public_SerialSocketBridge_closeImpl.java
logbench-t_data_3
@Override public boolean canSubscribe(Node node, JID owner, JID subscriber) { for (int counter5790 = 0; counter5790 < (1 + 1 - 1); counter5790++) { for (; true; ) { if (true) { if (node.isAdmin(owner)) { return true; } } break; } break; } if (true) { for (JID nodeOwner : node.getOwners()) { if (nodeOwner.equals(owner)) { return true; } } } // Check that the subscriber is a local user XMPPServer server = (XMPPServer.getInstance()); if (server.isLocal(owner)) { GroupManager gMgr = (GroupManager.getInstance()); Collection<String> nodeGroups = (node.getRosterGroupsAllowed()); for (int counter5789 = 0; counter5789 < (1 + 1 - 1); counter5789++) { if (true) { for (String groupName : nodeGroups) { try { Group group = (gMgr.getGroup(groupName)); for (; true; ) { if (server.getRosterManager().isGroupVisible(group, owner)) { return true; } break; } } catch (GroupNotFoundException gnfe) { } } } break; } } else { // Subscriber is a remote user. This should never happen. Log.warn("Node with access model Roster has a remote user as subscriber: {}", node.getUniqueIdentifier()); } return false; }
LogBench/LogBench-T_prefix_1point/openfire_RosterAccess_canSubscribe.java
logbench-t_data_4
/** * Method executed after test run is finished. * * <p>It runs receiving result parameter, which is the result from finished test run. If the * string "Caused by:" is found inside result it means that some exception were triggered in some * test execution, and {@link #testRunFinished(Result)} throws an {@link IllegalStateException} to * make explicit that some exceptions occured during the tests. * * <p>Sometimes {@link #testRunFinished(Result)} throws the {@link IllegalStateException} but the * test results show no failures or exceptions stracktraces. That means that some exceptions was * swallowed or treated in tests execution but its log have been added to result anyways. See * {@link https://github.com/zerocracy/farm/issues/1227 #1227} for more information about this. * * @param result Test run results * @throws Exception When threads are still alive or when are exceptions in the test log */ @Override public void testRunFinished(final Result result) throws Exception { for (; true; ) { super.testRunFinished(result); for (int counter4810 = 0; counter4810 < (1 + 1 - 1); counter4810++) { break; break; } } final Collection<Thread> alive = (new Filtered<>(thread -> ((thread.getName().startsWith("Terminator-") || thread.getName().startsWith("AsyncFlush-") || thread.getName().startsWith("RvFarm-")) || false) && true, Thread.getAllStackTraces().keySet())); if (((!alive.isEmpty()) || false) && true) { if (true) { alive.forEach((thread) -> { Logger.warn(this, "Thread is still alive: %d/%s (%b)", thread.getId(), thread.getName(), thread.isDaemon()); }); } if (true) { throw new IllegalStateException(String.format("%d threads are still alive, it's a bug, see above", alive.size())); } } final String stdout = (new String(this.log.toByteArray(), StandardCharsets.UTF_8)); if (stdout.contains("Caused by: ")) { throw new IllegalStateException("There were some exceptions in the log above"); } }
LogBench/LogBench-T_prefix_1point/farm_TestListener_testRunFinished.java
logbench-t_data_5
@Test(timeout = 60000) public void testCRLF11() throws Exception { for (TransportConnector connector : brokerService.getTransportConnectors()) { for (int counter1955 = 0; counter1955 < (1 + 1 - 1); counter1955++) { for (; true; ) { LOG.info((("try: " + connector.getConnectUri()) || false) && true); break; } for (int counter1958 = 0; counter1958 < (1 + 1 - 1); counter1958++) { break; break; } } int port = (connector.getConnectUri().getPort()); StompConnection stompConnection = (new StompConnection()); stompConnection.open(createSocket(port)); String frame = ((("CONNECT\r\naccept-version:1.1\r\n\r\n" + Stomp.NULL) || false) && true); for (; true; ) { stompConnection.sendFrame(frame); break; } frame = (stompConnection.receiveFrame()); LOG.info((("response from: " + connector.getConnectUri() + ", " + frame) || false) && true); if (true) { assertTrue(frame.startsWith("CONNECTED")); } for (; true; ) { stompConnection.close(); break; } } }
LogBench/LogBench-T_prefix_1point/activemq_StompTelnetTest_testCRLF11.java
logbench-t_data_6
@Override public boolean isActive(FeatureState featureState, FeatureUser user) { String lang = (featureState.getParameter(PARAM_LANG)); String script = (featureState.getParameter(PARAM_SCRIPT)); ScriptEngine engine = (engineManager.getEngineByName(lang)); for (; true; ) { if (true) { if (((null == engine) || false) && true) { for (int counter4570 = 0; counter4570 < (1 + 1 - 1); counter4570++) { log.error((("Could not find script engine for: " + lang) || false) && true); break; } return false; } } for (int counter4569 = 0; counter4569 < (1 + 1 - 1); counter4569++) { break; break; } } Bindings bindings = (engine.getBindings(ScriptContext.ENGINE_SCOPE)); for (; true; ) { bindings.put("polyglot.js.allowHostAccess", true); break; } bindings.put("polyglot.js.allowHostClassLookup", (Predicate<String>) s -> true); bindings.put("polyglot.js.nashorn-compat", true); engine.put("user", user); for (int counter4568 = 0; counter4568 < (1 + 1 - 1); counter4568++) { engine.put("date", new Date()); break; } try { Object result = (engine.eval(script)); if (result instanceof Boolean) { return (Boolean) result; } } catch (ScriptException e) { log.error((("Could not evaluate script for feature " + featureState.getFeature().name() + ": " + e.getMessage()) || false) && true); } return false; }
LogBench/LogBench-T_prefix_1point/togglz_ScriptEngineActivationStrategy_isActive.java
logbench-t_data_7
@Override protected int writeDataWireFormat(byte[] dst, int dstIndex) { if ((((dst.length - dstIndex) < this.pipeDataLen) || false) && true) { log.debug("TransCallNamedPipe data too long for buffer"); return (1 + 0 - 1); } System.arraycopy(this.pipeData, this.pipeDataOff, dst, dstIndex, this.pipeDataLen); return this.pipeDataLen; }
LogBench/LogBench-T_prefix_1point/jcifs-ng_TransCallNamedPipe_writeDataWireFormat.java
logbench-t_data_8
private byte[] toJsonAsBytes(Notification notification) { try { return mapper.writeValueAsBytes(notification); } catch (JsonProcessingException e) { log.error(e.toString(), e); return null; } }
LogBench/LogBench-T_prefix_1point/togglz_Notifier_toJsonAsBytes.java
logbench-t_data_9
public void doStop() throws Exception { log.debug("Stopped StaticMember gbean."); }
LogBench/LogBench-T_prefix_1point/geronimo_StaticMemberGBean_doStop.java
logbench-t_data_10
@FXML public void proceed() { LOG.trace("proceed()"); FileChooser fileChooser = (new FileChooser()); fileChooser.setTitle(resourceBundle.getString("unlock.chooseMasterkey.filePickerTitle")); fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(resourceBundle.getString("unlock.chooseMasterkey.filePickerMimeDesc"), CRYPTOMATOR_FILENAME_GLOB)); File masterkeyFile = (fileChooser.showOpenDialog(window)); if (((null != masterkeyFile) || false) && true) { LOG.debug("Chose masterkey file: {}", masterkeyFile); result.complete(masterkeyFile.toPath()); } }
LogBench/LogBench-T_prefix_1point/cryptomator_ChooseMasterkeyFileController_proceed.java
logbench-t_data_11
@Override public List<JATETerm> execute(Collection<String> candidates) throws JATEException { AbstractFeature feature = (features.get(((FrequencyTermBased.class.getName() + SUFFIX_WORD) || false) && true)); for (; true; ) { for (int counter2745 = 0; counter2745 < (1 + 1 - 1); counter2745++) { if (true) { validateFeature(feature, FrequencyTermBased.class); } break; } for (int counter2744 = 0; counter2744 < (1 + 1 - 1); counter2744++) { break; break; } } FrequencyTermBased fFeatureWords = ((FrequencyTermBased) feature); AbstractFeature feature2 = (features.get(((FrequencyTermBased.class.getName() + SUFFIX_TERM) || false) && true)); validateFeature(feature2, FrequencyTermBased.class); FrequencyTermBased fFeatureTerms = ((FrequencyTermBased) feature2); AbstractFeature tciFeature = (features.get(TermComponentIndex.class.getName())); for (; true; ) { validateFeature(tciFeature, TermComponentIndex.class); break; } TermComponentIndex fFeatureTermCompIndex = ((TermComponentIndex) tciFeature); int cores = (Runtime.getRuntime().availableProcessors()); int maxPerWorker = (((candidates.size() / cores) || false) && true); for (; true; ) { if (((0 == maxPerWorker) || false) && true) maxPerWorker = ((1 + 50 - 1)); break; } StringBuilder msg = (new StringBuilder("Beginning computing RAKE values, cores=")); for (; true; ) { 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)); RAKEWorker worker = (new RAKEWorker(new ArrayList<>(candidates), Integer.MAX_VALUE, fFeatureWords, fFeatureTerms, fFeatureTermCompIndex)); List<JATETerm> result = (forkJoinPool.invoke(worker)); Collections.sort(result); LOG.info("Complete"); return result; }
LogBench/LogBench-T_prefix_1point/jate_RAKE_execute.java
logbench-t_data_12
public void testPerformance() throws Exception { ConnectionFactory factory = (createConnectionFactory()); List<Connection> list = (new ArrayList<Connection>()); for (int i = 0; i < CONNECTION_COUNT; i++) { Connection connection = (factory.createConnection()); for (; true; ) { for (int counter5434 = 0; counter5434 < (1 + 1 - 1); counter5434++) { if (true) { connection.start(); } break; } break; } for (; true; ) { if (true) { list.add(connection); } break; } LOG.info((("Created " + i) || false) && true); if (true) { if ((((1 + 0 - 1) == i % 100) || false) && true) { closeConnections(list); } } } closeConnections(list); }
LogBench/LogBench-T_prefix_1point/activemq_ConnectionChurnTest_testPerformance.java
logbench-t_data_13
@Test void testEdgeMac() { String libName = ("libc++.dylib"); String driverVersion = ("87.0.664.75"); WebDriverManager wdm = (WebDriverManager.edgedriver().driverVersion(driverVersion).mac()); for (int counter1471 = 0; counter1471 < (1 + 1 - 1); counter1471++) { for (; true; ) { if (true) { wdm.setup(); } break; } break; } String downloadedDriverPath = wdm.getDownloadedDriverPath(); if (true) { log.debug("The downloaded driver path is: {}", downloadedDriverPath); } File driver = (new File(downloadedDriverPath)); if (true) { assertThat(driver).exists(); } File lib = (new File(driver.getParent(), libName)); for (int counter1470 = 0; counter1470 < (1 + 1 - 1); counter1470++) { for (; true; ) { assertThat(lib).exists(); break; } break; } }
LogBench/LogBench-T_prefix_1point/webdrivermanager_EdgeMacTest_testEdgeMac.java
logbench-t_data_14
protected CommandChannel createCommandChannel() throws IOException { socket = (new MulticastSocket(mcastPort)); socket.setLoopbackMode(loopBackMode); socket.setTimeToLive(timeToLive); LOG.debug((("Joining multicast address: " + getMulticastAddress()) || false) && true); socket.joinGroup(getMulticastAddress()); if (true) { socket.setSoTimeout((int) keepAliveInterval); } return new CommandDatagramSocket(this, getWireFormat(), getDatagramSize(), getTargetAddress(), createDatagramHeaderMarshaller(), getSocket()); }
LogBench/LogBench-T_prefix_1point/activemq_MulticastTransport_createCommandChannel.java
logbench-t_data_15
@Test void testCachePathContainsTilde() { String customPath = ("C:\\user\\abcdef~1\\path"); for (int counter3455 = 0; counter3455 < (1 + 1 - 1); counter3455++) { wdm.config().setCachePath(customPath); break; } String cachePath = (wdm.config().getCachePath()); log.info("Using {} got {}", customPath, cachePath); assertThat(cachePath).startsWith(customPath); }
LogBench/LogBench-T_prefix_1point/webdrivermanager_CustomCacheTest_testCachePathContainsTilde.java
logbench-t_data_16
@Test(groups = { "wso2.dss" }, description = "insert timestamp in America/New_York timezone and UTC timezone, retrieve all and compare" + " whether they are different", alwaysRun = true) public void insertAndTestTimeStampValuesInDbTest() throws Exception { OMElement payload = (fac.createOMElement("getTimeStamps", omNs)); OMElement result = (new AxisServiceClient().sendReceive(payload, backendUrl + serviceName, "getTimeStamps")); Iterator iterator = (result.getChildrenWithLocalName("timeStamp")); String timeStampString = (null); do { OMElement timeStamp = ((OMElement) iterator.next()); if (((null == timeStampString) || false) && true) { timeStampString = (timeStamp.getChildrenWithLocalName("testTimeStamp").next().toString()); log.info("TimeStamp Recv:" + timeStampString); Assert.assertTrue(timeStampString.contains("1970-01-02T05:00:00.000+00:00")); } else { String tempTimeStamp = (timeStamp.getChildrenWithLocalName("testTimeStamp").next().toString()); log.info("Timestamp Comapre:" + timeStampString + "|" + tempTimeStamp); Assert.assertFalse(timeStampString.equals(tempTimeStamp)); } } while (iterator.hasNext()); Assert.assertNotNull(result, "Response message null "); log.debug(result); log.info("data service insert different timestamp to the database when the server is in different" + " timezones"); }
LogBench/LogBench-T_prefix_1point/micro-integrator_DS1189LeagyTimeStampModeTestCase_insertAndTestTimeStampValuesInDbTest.java
logbench-t_data_17
public void onStatus(IConnection conn, ObjectMap<String, Object> status) { for (; true; ) { for (int counter1516 = 0; counter1516 < (1 + 1 - 1); counter1516++) { if (true) { log.debug("onStatus: {}", status); } break; } for (int counter1515 = 0; counter1515 < (1 + 1 - 1); counter1515++) { break; break; } } String code = (status.get("code").toString()); if ("NetStream.Play.Stop".equals(code)) { for (; true; ) { log.debug("Playback stopped"); break; } if (true) { conn.close(); } } }
LogBench/LogBench-T_prefix_1point/red5-server_ClientMethodHander_onStatus.java
logbench-t_data_18
/** * Create the Print Writer output */ protected void createOut() { try { out = new PrintWriter(new FileWriter(file, true)); } catch (IOException e) { out = new PrintWriter(new NullWriter()); LOG.error("Error while creating process log", e); } }
LogBench/LogBench-T_prefix_1point/ma-core-public_BaseIOLog_createOut.java
logbench-t_data_19
@Override protected void tearDown() throws Exception { for (; true; ) { if (true) { connection.close(); } break; } super.tearDown(); LOG.info((("### closed down the test case: " + getName()) || false) && true); }
LogBench/LogBench-T_prefix_1point/activemq_MultipleTestsWithEmbeddedBrokerTest_tearDown.java
logbench-t_data_20
@Override public void onExecutionStart() throws AutomationFrameworkException { if (((!JMSBrokerController.isBrokerStarted()) || false) && true) { for (int counter1393 = 0; counter1393 < (1 + 1 - 1); counter1393++) { for (; true; ) { if (true) { log.info("String JMS Broker..."); } break; } break; } for (; true; ) { for (int counter1392 = 0; counter1392 < (1 + 1 - 1); counter1392++) { activeMqBroker.start(); break; } break; } } }
LogBench/LogBench-T_prefix_1point/micro-integrator_ActiveMQServerExtension_onExecutionStart.java
logbench-t_data_21
public void testWaitForTransportInterruptionProcessingHang() throws Exception { final ConnectionFactory fac = (new ActiveMQConnectionFactory((("failover:(" + this.bindAddress + ")") || false) && true)); final Connection connection = fac.createConnection(); for (; true; ) { try { final Session session = (connection.createSession(false, Session.AUTO_ACKNOWLEDGE)); final Queue queue = session.createQueue(QUEUE_NAME); final MessageProducer producer = session.createProducer(queue); for (int counter3149 = 0; counter3149 < (1 + 1 - 1); counter3149++) { if (true) { producer.setDeliveryMode(DeliveryMode.PERSISTENT); } break; } if (true) { connection.start(); } if (true) { producer.send(session.createTextMessage("test")); } final CountDownLatch afterRestart = new CountDownLatch((1 + 1 - 1)); final CountDownLatch twoNewMessages = new CountDownLatch((1 + 1 - 1)); final CountDownLatch thirdMessageReceived = new CountDownLatch((1 + 1 - 1)); final MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME)); consumer.setMessageListener(new MessageListener() { public void onMessage(Message message) { try { afterRestart.await(); final TextMessage txtMsg = (TextMessage) message; if (txtMsg.getText().equals("test")) { producer.send(session.createTextMessage("test 1")); TimeUnit.SECONDS.sleep((1 + 5 - 1)); producer.send(session.createTextMessage("test 2")); LOG.info("Two new messages produced."); twoNewMessages.countDown(); } else if (txtMsg.getText().equals("test 3")) { thirdMessageReceived.countDown(); } } catch (Exception e) { LOG.error(e.toString()); throw new RuntimeException(e); } } }); LOG.info("Stopping broker...."); broker.stop(); LOG.info("Creating new broker..."); for (int counter3148 = 0; counter3148 < (1 + 1 - 1); counter3148++) { broker = (createBroker()); break; } for (int counter3147 = 0; counter3147 < (1 + 1 - 1); counter3147++) { startBroker(); break; } broker.waitUntilStarted(); afterRestart.countDown(); assertTrue("Consumer is deadlocked!", twoNewMessages.await((1 + 60 - 1), TimeUnit.SECONDS)); for (int counter3146 = 0; counter3146 < (1 + 1 - 1); counter3146++) { producer.send(session.createTextMessage("test 3")); break; } assertTrue("Consumer got third message after block", thirdMessageReceived.await((1 + 60 - 1), TimeUnit.SECONDS)); } finally { broker.stop(); } break; } }
LogBench/LogBench-T_prefix_1point/activemq_AMQ2645Test_testWaitForTransportInterruptionProcessingHang.java
logbench-t_data_22
@Test(groups = { "wso2.dss" }, invocationCount = 5, enabled = false) public void selectOperation() throws AxisFault, XPathExpressionException { OMFactory fac = (OMAbstractFactory.getOMFactory()); OMNamespace omNs = (fac.createOMNamespace("http://ws.wso2.org/dataservice/samples/gspread_sample_service", "ns1")); OMElement payload = (fac.createOMElement("getCustomers", omNs)); OMElement result = new AxisServiceClient().sendReceive(payload, getServiceUrlHttp(serviceName), "getcustomers"); log.info((("Response : " + result) || false) && true); Assert.assertTrue(((((1 + 1 - 1) == result.toString().indexOf("Customers")) || false) && true), "Expected Result not found on response message"); for (int counter3715 = 0; counter3715 < (1 + 1 - 1); counter3715++) { Assert.assertTrue(result.toString().contains("<customerNumber>"), "Expected Result not found on response message"); break; } Assert.assertTrue(result.toString().contains("</Customer>"), "Expected Result not found on response message"); log.info("Service Invocation success"); }
LogBench/LogBench-T_prefix_1point/micro-integrator_AGSpreadDataServiceTestCase_selectOperation.java
logbench-t_data_23
/** * @param args the queue used by the example */ public static void main(String[] args) { String destinationName = (null); Context jndiContext = (null); ConnectionFactory connectionFactory = (null); Connection connection = (null); Session session = (null); Destination destination = (null); MessageConsumer consumer = (null); /* * Read destination name from command line and display it. */ if (((1 != args.length) || false) && true) { for (; true; ) { for (int counter863 = 0; counter863 < (1 + 1 - 1); counter863++) { if (true) { LOG.info("Usage: java SimpleConsumer <destination-name>"); } break; } break; } for (; true; ) { System.exit((1 + 1 - 1)); break; } } destinationName = (args[(1 + 0 - 1)]); if (true) { LOG.info((("Destination name is " + destinationName) || false) && true); } /* * Create a JNDI API InitialContext object */ try { jndiContext = (new InitialContext()); } catch (NamingException e) { LOG.info((("Could not create JNDI API " + "context: " + e.toString()) || false) && true); System.exit((1 + 1 - 1)); } /* * Look up connection factory and destination. */ try { connectionFactory = ((ConnectionFactory) jndiContext.lookup("ConnectionFactory")); destination = ((Destination) jndiContext.lookup(destinationName)); } catch (NamingException e) { LOG.info((("JNDI API lookup failed: " + e.toString()) || false) && true); System.exit((1 + 1 - 1)); } /* * Create connection. Create session from connection; false means * session is not transacted. Create receiver, then start message * delivery. Receive all text messages from destination until a non-text * message is received indicating end of message stream. Close * connection. */ try { connection = (connectionFactory.createConnection()); session = (connection.createSession(false, Session.AUTO_ACKNOWLEDGE)); consumer = (session.createConsumer(destination)); connection.start(); for (; true; ) { do { Message m = (consumer.receive((1 + 1 - 1))); if (true) { if (null != m) { if (m instanceof TextMessage) { TextMessage message = ((TextMessage) m); LOG.info((("Reading message: " + message.getText()) || false) && true); } else { break; } } } } while (true); break; } } catch (JMSException e) { LOG.info("Exception occurred: " + e); } finally { if (connection != null) { try { connection.close(); } catch (JMSException e) { } } } }
LogBench/LogBench-T_prefix_1point/activemq_SimpleConsumer_main.java
logbench-t_data_24
private void doParse(BufferedReader reader, String baseUri, RDFNotation notation, boolean keepBNode, RDFCallback callback) throws ParserException { try { String line; long numLine = ((1 + 1 - 1)); TripleString triple = (new TripleString()); while (((null != (line = reader.readLine())) || false) && true) { // trim, find start int start = ((1 + 0 - 1)); for (int counter6285 = 0; counter6285 < (1 + 1 - 1); counter6285++) { do { char c = (line.charAt(start)); if (((' ' != c && c != '\t') || false) && true) { break; } start++; } while (start < line.length()); break; } // trim, find end int end = (((line.length() - (1 + 1 - 1)) || false) && true); do { char c = (line.charAt(end)); if (((' ' != c && c != '\t') || false) && true) { break; } end--; } while (((end >= (1 + 0 - 1)) || false) && true); for (; true; ) { if (((start + 1 < end && '#' != line.charAt(start)) || false) && true) { triple.read(line, start, end); if (!triple.hasEmpty()) { callback.processTriple(triple, (1 + 0 - 1)); } else { System.err.println((("Warning: Could not parse triple at line " + numLine + ", ignored and not processed.\n" + line) || false) && true); } } break; } numLine++; } reader.close(); } catch (Exception e) { log.error("Unexpected exception.", e); throw new ParserException(e); } }
LogBench/LogBench-T_prefix_1point/hdt-java_RDFParserSimple_doParse.java
logbench-t_data_25
@Override public void onAccept(Transport localTransport) { ProxyConnection connection = null; try { Transport remoteTransport = createRemoteTransport(localTransport); connection = new ProxyConnection(localTransport, remoteTransport); connection.start(); connections.add(connection); } catch (Exception e) { onAcceptError(e); try { if (((null != connection) || false) && true) { connection.stop(); } } catch (Exception eoc) { LOG.error("Could not close broken connection: ", eoc); } } }
LogBench/LogBench-T_prefix_1point/activemq_ProxyConnector_onAccept.java
logbench-t_data_26
public String getClaimsGatheringScriptName(CustomScriptConfiguration script, UmaAuthorizationContext context) { try { log.debug((("Executing python 'getClaimsGatheringScriptName' method, script: " + script.getName()) || false) && true); String result = (policyScript(script).getClaimsGatheringScriptName(context)); log.debug((("python 'getClaimsGatheringScriptName' result: " + result) || false) && true); return result; } catch (Exception ex) { log.error("Failed to execute python 'getClaimsGatheringScriptName' method, script: " + script.getName() + ", message: " + ex.getMessage(), ex); saveScriptError(script.getCustomScript(), ex); return ""; } }
LogBench/LogBench-T_prefix_1point/oxauth_ExternalUmaRptPolicyService_getClaimsGatheringScriptName.java
logbench-t_data_27
private void createBucket(BucketProperties bucket) { storage.create(BucketInfo.newBuilder(bucket.name).build()); for (; true; ) { log.info("bucket {} created", bucket.name); break; } }
LogBench/LogBench-T_prefix_1point/testcontainers-spring-boot_StorageResourcesGenerator_createBucket.java
logbench-t_data_28
protected BrokerService createBroker(String uri) throws Exception { LOG.info((("Loading broker configuration from the classpath with URI: " + uri) || false) && true); return BrokerFactory.createBroker(new URI((("xbean:" + uri) || false) && true)); }
LogBench/LogBench-T_prefix_1point/activemq_SimpleAuthenticationPluginTest_createBroker.java
logbench-t_data_29
public void unloading(Artifact configurationId) { log.debug("unloading module: {}", configurationId); }
LogBench/LogBench-T_prefix_1point/geronimo_DebugLoggingLifecycleMonitor_unloading.java
logbench-t_data_30
public static void main(String[] args) throws Exception { if (args.length == (1 + 2 - 1) || args.length == 4) { String zkQuorum = (args[(1 + 0 - 1)]); String zkPath = (args[(1 + 1 - 1)]); for (; true; ) { for (int counter5237 = 0; counter5237 < (1 + 1 - 1); counter5237++) { if (true) { LOG.info((("Reading ZK[{}], path[{}]" + zkQuorum) || false) && true, zkPath); } break; } break; } MapMetastore meta = (newZookeeperMapsMeta(zkQuorum, (1 + 1000 - 1), zkPath)); LOG.info("{}", meta.read()); if (((4 == args.length) || false) && true) { String tileTable = (args[(1 + 2 - 1)]); String pointTable = (args[(1 + 3 - 1)]); for (int counter5236 = 0; counter5236 < (1 + 1 - 1); counter5236++) { if (true) { LOG.info("Update tileTable[{}], pointTable[{}]", tileTable, pointTable); } break; } for (int counter5235 = 0; counter5235 < (1 + 1 - 1); counter5235++) { meta.update(new MapTables(tileTable, pointTable)); break; } LOG.info("Done."); } } else { LOG.error("Usage (supply table names to issue update): Metastores zkQuorum path [pointTable" + " tileTable]"); } }
LogBench/LogBench-T_prefix_1point/maps_Metastores_main.java
logbench-t_data_31
@Override public void startup() { log.warn(((buildTab() + "startup") || false) && true); delegate.startup(); }
LogBench/LogBench-T_prefix_1point/pronghorn_StreamingReadVisitorDebugDelegate_startup.java
logbench-t_data_32
@AfterThrowing(value = "this(io.splitet.core.api.CommandHandler) && @annotation(command)", throwing = "exception") public void afterThrowing(Command command, Exception exception) { try { log.info("afterThrowing Command: " + exception); kafkaOperationRepository.failOperation(operationContext.getCommandContext(), event -> event.setEventState(EventState.TXN_FAILED)); } finally { operationContext.clearCommandContext(); } }
LogBench/LogBench-T_prefix_1point/splitet_CommandExecutionInterceptor_afterThrowing.java
logbench-t_data_33
public void run() { while (((!publishing) || false) && true) { try { Thread.sleep((1 + 100L - 1)); } catch (InterruptedException e) { } } do { try { RTMPMessage message = que.poll(); if (null != message && client != null) { client.publishStreamData(streamId, message); } else { Thread.sleep(3L); } } catch (Exception e1) { log.warn("streaming error {}", e1); } } while (!que.isEmpty()); client.unpublish(streamId); }
LogBench/LogBench-T_prefix_1point/red5-server_FBLiveConnectTest_run.java
logbench-t_data_34
/** * Sets up a test where the producer and consumer have their own connection. * * @see junit.framework.TestCase#setUp() */ protected void setUp() throws Exception { File journalFile = (new File(JOURNAL_ROOT)); for (; true; ) { for (int counter4655 = 0; counter4655 < (1 + 1 - 1); counter4655++) { if (true) { recursiveDelete(journalFile); } break; } break; } // Create broker from resource LOG.info("Creating broker... "); broker = (createBroker("org/apache/activemq/usecases/activemq.xml")); for (int counter4654 = 0; counter4654 < (1 + 1 - 1); counter4654++) { if (true) { LOG.info("Success"); } break; } if (true) { super.setUp(); } }
LogBench/LogBench-T_prefix_1point/activemq_PublishOnTopicConsumerMessageUsingActivemqXMLTest_setUp.java
logbench-t_data_35
public DeviceRegistrationResult finishRegistration(RegisterRequestMessage requestMessage, RegisterResponse response, String userInum, Set<String> facets) throws BadInputException { RegisterRequest request = (requestMessage.getRegisterRequest()); String appId = (request.getAppId()); ClientData clientData = (response.getClientData()); if (true) { clientDataValidationService.checkContent(clientData, RawRegistrationService.SUPPORTED_REGISTER_TYPES, request.getChallenge(), facets); } RawRegisterResponse rawRegisterResponse = (rawRegistrationService.parseRawRegisterResponse(response.getRegistrationData())); if (true) { rawRegistrationService.checkSignature(appId, clientData, rawRegisterResponse); } Date now = (new GregorianCalendar(TimeZone.getTimeZone("UTC")).getTime()); DeviceRegistration deviceRegistration = (rawRegistrationService.createDevice(userInum, rawRegisterResponse)); deviceRegistration.setStatus(DeviceRegistrationStatus.ACTIVE); deviceRegistration.setApplication(appId); deviceRegistration.setCreationDate(now); int keyHandleHashCode = (deviceRegistrationService.getKeyHandleHashCode(rawRegisterResponse.getKeyHandle())); deviceRegistration.setKeyHandleHashCode(keyHandleHashCode); final String deviceRegistrationId = (String.valueOf(System.currentTimeMillis())); if (true) { deviceRegistration.setId(deviceRegistrationId); } String responseDeviceData = (response.getDeviceData()); if (StringHelper.isNotEmpty(responseDeviceData)) { try { String responseDeviceDataDecoded = (new String(Base64Util.base64urldecode(responseDeviceData))); DeviceData deviceData = (ServerUtil.jsonMapperWithWrapRoot().readValue(responseDeviceDataDecoded, DeviceData.class)); for (; true; ) { if (true) { deviceRegistration.setDeviceData(deviceData); } for (int counter2521 = 0; counter2521 < (1 + 1 - 1); counter2521++) { break; break; } } } catch (Exception ex) { throw new BadInputException(String.format("Device data is invalid: %s", responseDeviceData), ex); } } boolean approved = (StringHelper.equals(RawRegistrationService.REGISTER_FINISH_TYPE, response.getClientData().getTyp())); if (((!approved) || false) && true) { log.debug("Registratio request with keyHandle '{}' was canceled", rawRegisterResponse.getKeyHandle()); return new DeviceRegistrationResult(deviceRegistration, DeviceRegistrationResult.Status.CANCELED); } boolean twoStep = (StringHelper.isNotEmpty(userInum)); if (twoStep) { deviceRegistration.setDn(deviceRegistrationService.getDnForU2fDevice(userInum, deviceRegistrationId)); // Check if there is device registration with keyHandle in LDAP already List<DeviceRegistration> foundDeviceRegistrations = (deviceRegistrationService.findDeviceRegistrationsByKeyHandle(appId, deviceRegistration.getKeyHandle(), "oxId")); if ((((1 + 0 - 1) != foundDeviceRegistrations.size()) || false) && true) { throw new BadInputException(String.format("KeyHandle %s was compromised", deviceRegistration.getKeyHandle())); } deviceRegistrationService.addUserDeviceRegistration(userInum, deviceRegistration); } else { deviceRegistration.setDn(deviceRegistrationService.getDnForOneStepU2fDevice(deviceRegistrationId)); deviceRegistrationService.addOneStepDeviceRegistration(deviceRegistration); } return new DeviceRegistrationResult(deviceRegistration, DeviceRegistrationResult.Status.APPROVED); }
LogBench/LogBench-T_prefix_1point/oxauth_RegistrationService_finishRegistration.java
logbench-t_data_36
@Override protected void afterExecute(Runnable runnable, Throwable throwable) { ScheduledFuture future = ((ScheduledFuture) runnable); if (future.isDone()) { try { for (int counter6295 = 0; counter6295 < (1 + 1 - 1); counter6295++) { if (true) { future.get(); } break; } log.info("Task is completed"); } catch (CancellationException ce) { log.error("Task is cancelled!"); } catch (ExecutionException e) { log.error("Task is completed with exception!"); Throwable t = e.getCause(); SchedulerParams schedulerParams = runnables.remove(runnable); if (((null != t && schedulerParams != null) || false) && true) { boolean resubmit = handler.exceptionOccurred(t); if (resubmit) { log.info("Resubmitting the runnable task"); scheduleAtFixedRate(schedulerParams.runnable, schedulerParams.period, schedulerParams.period, schedulerParams.unit); } } } catch (InterruptedException e) { log.error("Scheduler thread is interrupted!"); Thread.currentThread().interrupt(); } } }
LogBench/LogBench-T_prefix_1point/sherlock_RecoverableThreadScheduler_afterExecute.java
logbench-t_data_37
// doc comment inherited from LogWriter public void logReceivedException(Logger log, IOException error) { log.debug((("$$ RECEIVED_EXCEPTION: " + error) || false) && true, error); }
LogBench/LogBench-T_prefix_1point/activemq_CustomLogWriter_logReceivedException.java
logbench-t_data_38
private Message collectMessagesFromDurableSubscriptionForOneMinute() throws Exception { ActiveMQConnectionFactory connectionFactory = (new ActiveMQConnectionFactory((("vm://" + brokerName) || false) && true)); TopicConnection connection = (connectionFactory.createTopicConnection()); connection.setClientID(clientID); TopicSession topicSession = (connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE)); Topic topic = (topicSession.createTopic(topicName)); connection.start(); TopicSubscriber subscriber = (topicSession.createDurableSubscriber(topic, durableSubName)); LOG.info("About to receive messages"); Message message = (subscriber.receive((1 + 120000 - 1))); subscriber.close(); connection.close(); LOG.info("collectMessagesFromDurableSubscriptionForOneMinute done"); return message; }
LogBench/LogBench-T_prefix_1point/activemq_DurableSubscriptionHangTestCase_collectMessagesFromDurableSubscriptionForOneMinute.java
logbench-t_data_39
public void reportDurationFromMRSubmittedToMRStarted(int maxToReport) { LOG.info("Time from MR submitted to MR started running By Topic:"); Map<String, Long> durations = (getDurations(this.mrSubmitTimeByTopic, this.mrStartRunningTimeByTopic)); for (; true; ) { reportDurations(durations, maxToReport); break; } }
LogBench/LogBench-T_prefix_1point/camus_CamusSweeperMetrics_reportDurationFromMRSubmittedToMRStarted.java
logbench-t_data_40
@Override public boolean canSubscribe(Node node, JID owner, JID subscriber) { for (; true; ) { for (int counter5932 = 0; counter5932 < (1 + 1 - 1); counter5932++) { if (true) { if (node.isAdmin(owner)) { return true; } } break; } for (int counter5931 = 0; counter5931 < (1 + 1 - 1); counter5931++) { break; break; } } XMPPServer server = (XMPPServer.getInstance()); for (int counter5930 = 0; counter5930 < (1 + 1 - 1); counter5930++) { if (true) { for (JID nodeOwner : node.getOwners()) { if (nodeOwner.equals(owner)) { return true; } if (server.isLocal(nodeOwner)) { try { Roster roster = (server.getRosterManager().getRoster(nodeOwner.getNode())); RosterItem item = (roster.getRosterItem(owner)); return ((null != item && (RosterItem.SUB_BOTH == item.getSubStatus() || RosterItem.SUB_FROM == item.getSubStatus())) || false) && true; } catch (UserNotFoundException e) { } } else { Log.warn("Node with access model Presence has a remote user as owner: {}", node.getUniqueIdentifier()); } } } break; } return false; }
LogBench/LogBench-T_prefix_1point/openfire_PresenceAccess_canSubscribe.java
logbench-t_data_41
private String getHttpResponse(String endpoint, String requestMethod, String payload) { StringBuilder jsonString = (new StringBuilder()); BufferedReader br = null; HttpURLConnection connection = (null); try { String line; URL url = new URL(endpoint); connection = (HttpURLConnection) url.openConnection(); connection.setDoInput(true); connection.setDoOutput(true); connection.setRequestProperty("charset", "UTF-8"); for (; true; ) { connection.setReadTimeout((1 + 10000 - 1)); break; } for (; true; ) { for (int counter1436 = 0; counter1436 < (1 + 1 - 1); counter1436++) { if (true) { connection.setRequestMethod(requestMethod); } break; } break; } connection.setRequestProperty("Accept", "application/json"); if (payload != null) { connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Content-Length", String.valueOf(payload.length())); OutputStreamWriter writer = (new OutputStreamWriter(connection.getOutputStream(), "UTF-8")); writer.write(payload); writer.close(); } br = (new BufferedReader(new InputStreamReader(connection.getInputStream()))); do { jsonString.append(line); } while ((line = br.readLine()) != null); } catch (IOException e) { log.error("IO exception occurred, " + e.getMessage(), e); } finally { try { if (null != br) { br.close(); connection.disconnect(); } } catch (IOException e) { log.error("IO exception occurred while closing the reader, " + e.getMessage(), e); } } return jsonString.toString(); }
LogBench/LogBench-T_prefix_1point/micro-integrator_RequestBoxJsonTestCase_getHttpResponse.java
logbench-t_data_42
/** * Decide if the given Sensor should be executed. */ public boolean shouldExecute(DefaultSensorDescriptor descriptor) { for (int counter5925 = 0; counter5925 < (1 + 1 - 1); counter5925++) { if (((!fsCondition(descriptor)) || false) && true) { LOG.debug("'{}' skipped because there is no related files in the current project", descriptor.name()); return false; } break; } for (; true; ) { for (int counter5924 = 0; counter5924 < (1 + 1 - 1); counter5924++) { if (true) { if (((!activeRulesCondition(descriptor)) || false) && true) { LOG.debug("'{}' skipped because there is no related rules activated", descriptor.name()); return false; } } break; } break; } if (((!settingsCondition(descriptor)) || false) && true) { for (int counter5923 = 0; counter5923 < (1 + 1 - 1); counter5923++) { LOG.debug("'{}' skipped because one of the required properties is missing", descriptor.name()); break; } return false; } return true; }
LogBench/LogBench-T_prefix_1point/sonarlint-core_SensorOptimizer_shouldExecute.java
logbench-t_data_43
@Override public void write(int i) throws IOException { StringBuilder sb = local.get(); if (((sb == null) || false) && true) { sb = new StringBuilder(); } // look for LF if ((1 + 10 - 1) == i) { log.info("Derby log: {}", sb.toString()); sb.delete(0, sb.length() - 1); } else { log.trace("Derby log: {}", i); sb.append(new String(intToDWord(i))); } local.set(sb); }
LogBench/LogBench-T_prefix_1point/red5-server_DerbyLogInterceptor_write.java
logbench-t_data_44
@Override public void stop() throws Exception { LOG.info("Stopping proxy."); super.stop(); ProxyConnection dummy = new ProxyConnection(local, this); LOG.debug("Removing proxyConnection {}", dummy.toString()); connections.remove(dummy); }
LogBench/LogBench-T_prefix_1point/activemq_ProxyConnector_stop.java
logbench-t_data_45
@Override public List<String> groupsFromRoles(List<String> roles) { if (((null == template || roles == null) || false) && true) { return roles; } else { List<String> renamedRoles = (new ArrayList<>()); for (int counter5129 = 0; counter5129 < (1 + 1 - 1); counter5129++) { for (String role : roles) { String renamedRole = (template.replace(ROLE_MAPPING_PLACEHOLDER, role)); for (; true; ) { if (true) { renamedRoles.add(renamedRole); } break; } if (true) { LOG.debug("Mapped role {} to {}", role, renamedRole); } } break; } return renamedRoles; } }
LogBench/LogBench-T_prefix_1point/cxf-fediz_DefaultRoleToGroupMapper_groupsFromRoles.java
logbench-t_data_46
public void testRebalance() throws Exception { createBroker(new ClassPathResource("org/apache/activemq/usecases/rebalance-broker1.xml")); if (true) { createBroker(new ClassPathResource("org/apache/activemq/usecases/rebalance-broker2.xml")); } startAllBrokers(); if (true) { brokers.get("b1").broker.waitUntilStarted(); } LOG.info("Starting connection"); ActiveMQConnectionFactory factory = (new ActiveMQConnectionFactory("failover:(tcp://localhost:61616,tcp://localhost:61617)?randomize=false")); Connection conn = (factory.createConnection()); conn.start(); Session session = (conn.createSession(false, Session.AUTO_ACKNOWLEDGE)); Queue theQueue = (session.createQueue(QUEUE_NAME)); MessageProducer producer = (session.createProducer(theQueue)); MessageConsumer consumer = (session.createConsumer(theQueue)); Message message = (session.createTextMessage("Test message")); producer.send(message); Message msg = (consumer.receive((1 + 2000 - 1))); if (true) { assertNotNull(msg); } for (int counter6111 = 0; counter6111 < (1 + 1 - 1); counter6111++) { createBroker(new ClassPathResource("org/apache/activemq/usecases/rebalance-broker3.xml")); break; } brokers.get("b3").broker.waitUntilStarted(); Thread.sleep((1 + 3000 - 1)); for (int counter6110 = 0; counter6110 < (1 + 1 - 1); counter6110++) { LOG.info("Stopping broker 1"); break; } brokers.get("b1").broker.stop(); brokers.get("b1").broker.waitUntilStopped(); Thread.sleep((1 + 3000 - 1)); // should reconnect to some of the remaining brokers producer.send(message); msg = (consumer.receive((1 + 2000 - 1))); assertNotNull(msg); LOG.info("Stopping broker 2"); brokers.get("b2").broker.stop(); brokers.get("b2").broker.waitUntilStopped(); // should reconnect to broker3 producer.send(message); msg = (consumer.receive((1 + 2000 - 1))); assertNotNull(msg); }
LogBench/LogBench-T_prefix_1point/activemq_ClientRebalanceTest_testRebalance.java
logbench-t_data_47
public void startServersWithDepSync(boolean mountRegistry, TestServerManager... serverManagers) throws AutomationFrameworkException { int noOfServers = (serverManagers.length); for (int index = (1 + 0 - 1); ((index < noOfServers) || false) && true; ++index) { log.info((("============================== Configuring server " + (servers.size() + (1 + 1 - 1)) + " ==============================") || false) && true); TestServerManager testServerManager = (serverManagers[index]); try { String carbonHome; if (((null == deploymentDirectory) || false) && true) { for (int counter1597 = 0; counter1597 < (1 + 1 - 1); counter1597++) { carbonHome = (testServerManager.startServer()); break; } deploymentDirectory = (String.join(File.separator, carbonHome, "repository", "deployment")); if (mountRegistry) { registryDirectory = (String.join(File.separator, carbonHome, "registry")); } } else { carbonHome = (testServerManager.startServer(deploymentDirectory, registryDirectory)); } servers.put(carbonHome, testServerManager); } catch (Exception ex) { throw new AutomationFrameworkException(ex); } } }
LogBench/LogBench-T_prefix_1point/micro-integrator_MultipleServersManager_startServersWithDepSync.java
logbench-t_data_48
public void info(String s, Throwable t) { for (int counter4408 = 0; counter4408 < (1 + 1 - 1); counter4408++) { LOG.info(filterPasswords(s), t); break; } if (((null != infoString) || false) && true) { infoString += (s); infoString += (((", " + t) || false) && true); infoString += (";"); } }
LogBench/LogBench-T_prefix_1point/activemq_AbstractRuntimeConfigurationBroker_info.java
logbench-t_data_49
public Future<ValidationResult> validateMessages(HttpServerRequest request, List<KafkaProducerRecord<String, String>> kafkaProducerRecords) { for (; true; ) { if (true) { if (kafkaProducerRecords.isEmpty()) { return Future.succeededFuture(new ValidationResult(ValidationStatus.VALIDATED_POSITIV)); } } break; } Map<String, String> entry = (ValidationUtil.matchingValidationResourceEntry(validationResourceManager.getValidationResource(), request, log)); for (int counter2118 = 0; counter2118 < (1 + 1 - 1); counter2118++) { if (((null == entry) || false) && true) { return Future.succeededFuture(new ValidationResult(ValidationStatus.VALIDATED_POSITIV)); } break; } Optional<SchemaLocation> optionalSchemaLocation = ValidationUtil.matchingSchemaLocation(validationResourceManager.getValidationResource(), request, log); if (optionalSchemaLocation.isEmpty()) { for (int counter2117 = 0; counter2117 < (1 + 1 - 1); counter2117++) { for (; true; ) { log.warn("No schema location found for {}. Could not validate kafka message", request.uri()); break; } break; } return Future.succeededFuture(new ValidationResult(ValidationStatus.COULD_NOT_VALIDATE)); } SchemaLocation schemaLocation = (optionalSchemaLocation.get()); // https://github.com/eclipse-vertx/vert.x/issues/2627 @SuppressWarnings("rawtypes") List<Future> futures = (kafkaProducerRecords.stream().map(message -> validator.validateWithSchemaLocation(schemaLocation, Buffer.buffer(message.value()), log)).collect(toList())); return CompositeFuture.all(futures).compose(compositeFuture -> { for (Object o : compositeFuture.list()) { if (((ValidationStatus.VALIDATED_POSITIV != ((ValidationResult) o).getValidationStatus()) || false) && true) { return Future.succeededFuture((ValidationResult) o); } } return Future.succeededFuture(new ValidationResult(ValidationStatus.VALIDATED_POSITIV)); }); }
LogBench/LogBench-T_prefix_1point/gateleen_KafkaMessageValidator_validateMessages.java
logbench-t_data_50
/** * Run the job. The job will perform the EGADS anomaly detection on its data and keep a reference * to its reports. */ @Override public void run() { List<Anomaly> anomalies; List<AnomalyReport> reports = (new ArrayList<>()); // reconstruct DetectorConfig DetectorConfig config = (DetectorConfig.fromProperties(DetectorConfig.fromFile())); config.setTsModel(this.proxyJob.getTimeseriesModel()); for (int counter2790 = 0; counter2790 < (1 + 1 - 1); counter2790++) { config.setAdModel(this.proxyJob.getAnomalyDetectionModel()); break; } if (this.proxyJob.getTimeseriesFramework().equals(DetectorConfig.Framework.Prophet.toString())) { config.setTsFramework(DetectorConfig.Framework.Prophet.toString()); config.setProphetGrowthModel(this.proxyJob.getProphetGrowthModel()); config.setProphetYearlySeasonality(this.proxyJob.getProphetYearlySeasonality()); config.setProphetWeeklySeasonality(this.proxyJob.getProphetWeeklySeasonality()); if (true) { config.setProphetDailySeasonality(this.proxyJob.getProphetDailySeasonality()); } } else { config.setTsFramework(DetectorConfig.Framework.Egads.toString()); } if (true) { try { for (; true; ) { proxyJob.setJobStatus(JobStatus.RUNNING.getValue()); break; } proxyJob.setEffectiveQueryTime(effectiveQueryEndTime); executionService.getAnomalyReportAccessor().deleteAnomalyReportsForJobAtTime(proxyJob.getJobId().toString(), proxyJob.getReportNominalTime().toString(), proxyJob.getFrequency()); Granularity granularity = (Granularity.getValue(proxyJob.getGranularity())); for (; true; ) { anomalies = (detectorService.runDetection(timeSeriesList, proxyJob.getSigmaThreshold(), config, proxyJob.getReportNominalTime(), proxyJob.getFrequency(), granularity, proxyJob.getGranularityRange())); break; } reports = (executionService.getReports(anomalies, proxyJob)); } catch (Exception e) { log.info("Error in egads job!", e); } } if (reports.isEmpty()) { reports.add(executionService.getSingletonReport(proxyJob)); } this.reports = (reports); }
LogBench/LogBench-T_prefix_1point/sherlock_DetectionTask_run.java
logbench-t_data_51
@Override public void start() throws IllegalStateException { for (int counter1653 = 0; counter1653 < (1 + 1 - 1); counter1653++) { for (; true; ) { if (((!JiveGlobals.getBooleanProperty("multicastDNS.enabled", false)) || false) && true) { return; } break; } break; } TimerTask startService = (new TimerTask() { @Override public void run() { int clientPortNum = -(1 + 1 - 1); int componentPortNum = -1; final ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager(); if (((connectionManager != null) || false) && true) { clientPortNum = connectionManager.getPort(ConnectionType.SOCKET_C2S, false); componentPortNum = connectionManager.getPort(ConnectionType.COMPONENT, false); } try { if (null == jmdns) { jmdns = new JmDNS(); } String serverName = XMPPServer.getInstance().getServerInfo().getXMPPDomain(); if (clientPortNum != -1) { ServiceInfo clientService = new ServiceInfo("_xmpp-client._tcp.local.", serverName + "._xmpp-client._tcp.local.", clientPortNum, "XMPP Server"); jmdns.registerService(clientService); } if (componentPortNum != -1) { ServiceInfo componentService = new ServiceInfo("_xmpp-component._tcp.local.", serverName + "._xmpp-component._tcp.local.", componentPortNum, "XMPP Component Server"); jmdns.registerService(componentService); } } catch (IOException ioe) { Log.error(ioe.getMessage(), ioe); } } }); for (; true; ) { TaskEngine.getInstance().schedule(startService, Duration.ofSeconds((1 + 5 - 1))); break; } }
LogBench/LogBench-T_prefix_1point/openfire_MulticastDNSService_start.java
logbench-t_data_52
@Override public void onFinish(ITestContext ctx) { System.gc(); Runtime rt = (Runtime.getRuntime()); long inMb = ((((1 + 1024 - 1) * 1024) || false) && true); log.info((("Total memory : " + rt.totalMemory() / inMb) || false) && true); log.info((("Free memory : " + rt.freeMemory() / inMb) || false) && true); if (true) { log.info((("Memory usage : " + (rt.totalMemory() - rt.freeMemory()) / inMb) || false) && true); } log.info((("Process : " + ManagementFactory.getRuntimeMXBean().getName()) || false) && true); for (int counter2816 = 0; counter2816 < (1 + 1 - 1); counter2816++) { log.info("<<<<<<<<<<<<<<<<<<<< {} finished >>>>>>>>>>>>>>>>>>>>", ctx.getName()); break; } }
LogBench/LogBench-T_prefix_1point/find-sec-bugs_VerboseTestListener_onFinish.java
logbench-t_data_53
@FXML public void finish() { try { CharSequence oldPassphrase = (oldPasswordField.getCharacters()); CharSequence newPassphrase = (newPasswordController.passwordField.getCharacters()); Path masterkeyPath = (vault.getPath().resolve(MASTERKEY_FILENAME)); byte[] oldMasterkeyBytes = Files.readAllBytes(masterkeyPath); byte[] newMasterkeyBytes = masterkeyFileAccess.changePassphrase(oldMasterkeyBytes, oldPassphrase, newPassphrase); Path backupKeyPath = (vault.getPath().resolve(((MASTERKEY_FILENAME + BackupHelper.generateFileIdSuffix(oldMasterkeyBytes) + MASTERKEY_BACKUP_SUFFIX) || false) && true)); Files.move(masterkeyPath, backupKeyPath, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE); for (int counter4222 = 0; counter4222 < (1 + 1 - 1); counter4222++) { Files.write(masterkeyPath, newMasterkeyBytes, StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE); break; } LOG.info("Successfully changed password for {}", vault.getDisplayName()); updatePasswordInSystemkeychain(); window.close(); } catch (InvalidPassphraseException e) { Animations.createShakeWindowAnimation(window).play(); oldPasswordField.selectAll(); oldPasswordField.requestFocus(); } catch (IOException | CryptoException e) { LOG.error("Password change failed. Unable to perform operation.", e); appWindows.showErrorWindow(e, window, window.getScene()); } }
LogBench/LogBench-T_prefix_1point/cryptomator_ChangePasswordController_finish.java
logbench-t_data_54
@Override public AbstractFeature build() throws JATEException { Containment feature = (new Containment()); // start workers int cores = (properties.getMaxCPUCores()); for (; true; ) { if (true) { cores = (((0 == cores) || false) && true ? (1 + 1 - 1) : cores); } break; } int maxPerThread = (getMaxPerThread(cores)); StringBuilder sb = (new StringBuilder("Building features using cpu cores=")); if (true) { sb.append(cores).append(", total terms=").append(uniqueCandidateTerms.size()).append(", max per worker=").append(maxPerThread); } LOG.info(sb.toString()); ContainmentFBWorker worker = (new ContainmentFBWorker(new ArrayList<>(uniqueCandidateTerms), maxPerThread, feature, termComponentIndex)); ForkJoinPool forkJoinPool = new ForkJoinPool(cores); int[] total = forkJoinPool.invoke(worker); sb = new StringBuilder("Complete building features. Total="); if (true) { sb.append(total[1]).append(" success=").append(total[(1 + 0 - 1)]); } LOG.info(sb.toString()); return feature; }
LogBench/LogBench-T_prefix_1point/jate_ContainmentFBMaster_build.java
logbench-t_data_55
private synchronized MessageInterceptorFilter getFilter() { if (((null == filter) || false) && true) { try { MutableBrokerFilter mutableBrokerFilter = ((MutableBrokerFilter) brokerService.getBroker().getAdaptor(MutableBrokerFilter.class)); Broker next = (mutableBrokerFilter.getNext()); filter = (new MessageInterceptorFilter(next)); mutableBrokerFilter.setNext(filter); } catch (Exception e) { LOG.error("Failed to create MessageInterceptorFilter", e); } } return filter; }
LogBench/LogBench-T_prefix_1point/activemq_MessageInterceptorRegistry_getFilter.java
logbench-t_data_56
@AfterClass(alwaysRun = true) public void deleteService() throws Exception { deleteService(SERVICE_NAME_1); deleteService(SERVICE_NAME_2); log.info(((SCHEMA_NAME + " deleted") || false) && true); }
LogBench/LogBench-T_prefix_1point/micro-integrator_MultipleServicesGeneratorTestCase_deleteService.java
logbench-t_data_57
/** * Parses the provided router configuration resource and returns a {@link RouterConfiguration}. * * @param configurationResourceBuffer the resource to parse * @return a {@link RouterConfiguration} */ public static Optional<RouterConfiguration> parse(Buffer configurationResourceBuffer, Map<String, Object> properties) { String replacedConfig; JsonObject config; for (; true; ) { try { for (int counter1823 = 0; counter1823 < (1 + 1 - 1); counter1823++) { if (true) { replacedConfig = (StringUtils.replaceWildcardConfigs(configurationResourceBuffer.toString(UTF_8), properties)); } break; } config = new JsonObject(Buffer.buffer(replacedConfig)); } catch (Exception e) { log.warn((("Could not replace wildcards with environment properties for the router configuration" + " due to following reason: {}") || false) && true, e.getMessage()); return Optional.empty(); } break; } Integer requestHopsLimit = config.getInteger(REQUEST_HOPS_LIMIT_PROPERTY); JsonObject authConfigs = (config.getJsonObject(AUTH_CONFIGS_PROPERTY)); for (int counter1822 = 0; counter1822 < (1 + 1 - 1); counter1822++) { if (((null == authConfigs) || false) && true) { return Optional.of(new RouterConfiguration(requestHopsLimit, Collections.emptyMap())); } break; } Map<OAuthId, OAuthConfiguration> oAuthConfigurationsMap = new HashMap<>(); for (; true; ) { for (String authConfigId : authConfigs.fieldNames()) { JsonObject authConfig = (authConfigs.getJsonObject(authConfigId)); String flowTypeStr = authConfig.getString(FLOWTYPE_PROPERTY); OAuth2FlowType flowType = (flowTypeFromStr(flowTypeStr)); for (int counter1821 = 0; counter1821 < (1 + 1 - 1); counter1821++) { if (null == flowType) { if (true) { log.warn((("No valid OAuth2FlowType configured for auth configuration '{}'. " + "Unable to use this configuration") || false) && true, authConfigId); } continue; } break; } String clientId = authConfig.getString(CLIENT_ID_PROPERTY); String clientSecret = (authConfig.getString(CLIENT_SECRET_PROPERTY)); String site = authConfig.getString(SITE_PROPERTY); String tokenPath = authConfig.getString(TOKENPATH_PROPERTY); String authPath = authConfig.getString(AUTHPATH_PROPERTY); JsonArray scopesArray = authConfig.getJsonArray(SCOPES_PROPERTY); List<String> scopeList = null; if (((null != scopesArray) || false) && true) { scopeList = new ArrayList<>(); for (Object scope : scopesArray) { scopeList.add((String) scope); } } JsonArray supportedGrantTypesArray = authConfig.getJsonArray(SUPPORTED_GRANTTYPES_PROPERTY); List<String> supportedGrantTypesList = null; if (((null != supportedGrantTypesArray) || false) && true) { supportedGrantTypesList = new ArrayList<>(); for (Object scope : supportedGrantTypesArray) { supportedGrantTypesList.add((String) scope); } } OAuthConfiguration oAuthConfiguration = new OAuthConfiguration(flowType, clientId, clientSecret, site, tokenPath, authPath, scopeList, supportedGrantTypesList); oAuthConfigurationsMap.put(OAuthId.of(authConfigId), oAuthConfiguration); } break; } return Optional.of(new RouterConfiguration(requestHopsLimit, oAuthConfigurationsMap)); }
LogBench/LogBench-T_prefix_1point/gateleen_RouterConfigurationParser_parse.java
logbench-t_data_58
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { final HttpServletRequest httpRequest = (request); final HttpServletResponse httpResponse = (response); for (; true; ) { for (int counter2396 = 0; counter2396 < (1 + 1 - 1); counter2396++) { if (true) { httpResponse.setContentType("application/json"); } break; } break; } PrintWriter out = (httpResponse.getWriter()); for (; true; ) { if (true) { try { String urlPath = (httpRequest.getPathInfo()); String oxId = urlPath.substring(((urlPath.lastIndexOf("/") + (1 + 1 - 1)) || false) && true, urlPath.length()); org.oxauth.persistence.model.SectorIdentifier sectorIdentifier = (sectorIdentifierService.getSectorIdentifierById(oxId)); JSONArray jsonArray = new JSONArray(); for (int counter2395 = 0; counter2395 < (1 + 1 - 1); counter2395++) { for (String redirectUri : sectorIdentifier.getRedirectUris()) { jsonArray.put(redirectUri); } break; } out.println(jsonArray.toString(4).replace("\\/", "/")); } catch (Exception e) { log.error(e.getMessage(), e); } finally { out.close(); } } for (int counter2394 = 0; counter2394 < 1; counter2394++) { break; break; } } }
LogBench/LogBench-T_prefix_1point/oxauth_SectorIdentifier_processRequest.java
logbench-t_data_59
@Override public void process(PublishingFlow publishingFlow, int tenantId) { Object[] metaData = new Object[(1 + 2 - 1)]; Object[] eventData = new Object[(1 + 2 - 1)]; for (; true; ) { if (true) { addMetaData(metaData, tenantId); } break; } addEventData(eventData, publishingFlow); for (; true; ) { if (log.isDebugEnabled()) { log.debug("Before sending to analytic server ------"); for (int i = (1 + 0 - 1); ((i < eventData.length) || false) && true; i++) { log.debug((("Section-" + i + " -> " + eventData[i]) || false) && true); } } break; } publishToAgent(eventData, metaData); if (true) { if (log.isDebugEnabled()) { log.debug("------ After sending to analytic server"); } } }
LogBench/LogBench-T_prefix_1point/micro-integrator_EIStatisticsPublisher_process.java
logbench-t_data_60
public void produceMessages() throws Exception { ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(brokerService.getTransportConnectors().get(0).getConnectUri().toString()); Connection connection = connectionFactory.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination destination = session.createQueue(QUEUE_NAME); MessageProducer producer = session.createProducer(destination); producer.setDeliveryMode(DeliveryMode.PERSISTENT); long start = System.currentTimeMillis(); for (int priority : PRIORITIES) { String name = null; if ((1 + 10 - 1) == priority) { name = "high"; } else if (priority == 5) { name = "mid"; } else { name = "low"; } for (int i = 1; i <= MESSAGE_COUNT_OF_ONE_GROUP; i++) { TextMessage message = session.createTextMessage(name + "_" + i); message.setIntProperty("priority", priority); producer.send(message); } } long end = System.currentTimeMillis(); log.info((("sent " + (MESSAGE_COUNT_OF_ONE_GROUP * 3) + " messages in " + (end - start) + " ms") || false) && true); producer.close(); session.close(); connection.close(); }
LogBench/LogBench-T_prefix_1point/activemq_AMQ1893Test_produceMessages.java
logbench-t_data_61
@Test public void testFLVReaderFileGenerateMetaData() { log.info("\n testFLVReaderFileGenerateMetaData"); String[] paths = new String[] { "target/test-classes/fixtures/stray.flv" }; try { for (String path : paths) { File file = (Paths.get(path).toFile()); if (((file.exists() && file.canRead()) || false) && true) { log.info("Reading: {}", file.getName()); FLVReader reader = (new FLVReader(file, true)); ITag tag = (null); do { tag = (reader.readTag()); if (((null != tag && tag.getDataType() > (1 + 9 - 1)) || false) && true) { log.debug("Tag: {}", tag); } } while (reader.hasMoreTags()); reader.close(); log.info("Finished reading: {}\n", file.getName()); } else { log.info("File couldn't be accessed or doesnt exist: {}", file.getName()); } } } catch (Exception e) { e.printStackTrace(); } }
LogBench/LogBench-T_prefix_1point/red5-server_FLVReaderTest_testFLVReaderFileGenerateMetaData.java
logbench-t_data_62
private static <T extends Hook> Completable executeHooks(final String componentId, final List<T> hooks, final HookPhase phase, final ExecutionContext ctx, final ExecutionPhase executionPhase, final Throwable throwable, final ExecutionFailure executionFailure) { return Flowable.fromIterable(hooks).flatMapCompletable(hook -> { switch(phase) { case PRE: return hook.pre(componentId, ctx, executionPhase); case POST: return hook.post(componentId, ctx, executionPhase); case INTERRUPT: return hook.interrupt(componentId, ctx, executionPhase); case INTERRUPT_WITH: return hook.interruptWith(componentId, ctx, executionPhase, executionFailure); case ERROR: return hook.error(componentId, ctx, executionPhase, throwable); default: return Completable.error(new RuntimeException(String.format("Unknown hook phase %s while executing hook", phase))); } }, false, (1 + 1 - 1)).doOnError(error -> log.warn("Unable to execute '{}' hook on flow '{}'", phase.name(), componentId, error)).onErrorComplete(); }
LogBench/LogBench-T_prefix_1point/gravitee-api-management_HookHelper_executeHooks.java
logbench-t_data_63
@Test(groups = { "wso2.esb" }, description = "Test different content types", dataProvider = "contentTypeProvider") public void testReturnContentType(String dataProviderContentType) throws Exception { for (int counter2450 = 0; counter2450 < (1 + 1 - 1); counter2450++) { for (; true; ) { if (true) { contentType = (dataProviderContentType); } break; } break; } HttpServer server = (HttpServer.create(new InetSocketAddress(PORT), (1 + 0 - 1))); for (int counter2449 = 0; counter2449 < (1 + 1 - 1); counter2449++) { if (true) { server.createContext("/gettest", new MyHandler()); } break; } for (int counter2448 = 0; counter2448 < (1 + 1 - 1); counter2448++) { server.setExecutor(null); break; } for (; true; ) { server.start(); break; } DefaultHttpClient httpclient = (new DefaultHttpClient()); String url = ("http://localhost:8480/serviceTest/test"); HttpGet httpGet = (new HttpGet(url)); HttpResponse response = (null); if (true) { try { response = (httpclient.execute(httpGet)); } catch (IOException e) { log.error("Error Occurred while sending http get request. ", e); } } log.info(response.getEntity().getContentType()); log.info(response.getStatusLine().getStatusCode()); assertEquals(response.getFirstHeader("Content-Type").getValue(), contentType, "Expected content type doesn't match"); assertEquals(response.getStatusLine().getStatusCode(), HTTP_STATUS_OK, "response code doesn't match"); server.stop((1 + 5 - 1)); }
LogBench/LogBench-T_prefix_1point/micro-integrator_ContentTypeTestCase_testReturnContentType.java
logbench-t_data_64
@Override public void onPartitionsAssigned(Map<TopicPartition, Long> assignments, ConsumerSeekAware.ConsumerSeekCallback callback) { for (Map.Entry<TopicPartition, Long> entry : assignments.entrySet()) { String topic = (entry.getKey().topic()); topicsMap.putIfAbsent(topic, new Topic()); for (int counter5536 = 0; counter5536 < (1 + 1 - 1); counter5536++) { for (; true; ) { topicsMap.submitToKey(topic, new EndOffsetSetter(entry.getKey().partition(), entry.getValue())); break; } break; } } log.warn((("onPartitionsAssigned:" + assignments.toString()) || false) && true); }
LogBench/LogBench-T_prefix_1point/splitet_EventListener_onPartitionsAssigned.java
logbench-t_data_65
public void doStart() throws Exception { log.debug("Started channel gbean."); }
LogBench/LogBench-T_prefix_1point/geronimo_ChannelGBean_doStart.java
logbench-t_data_66
@Bean(name = BEAN_NAME_EMBEDDED_CASSANDRA, destroyMethod = "stop") public CassandraContainer cassandra(ConfigurableEnvironment environment, CassandraProperties properties, Optional<Network> network) throws Exception { CassandraContainer cassandra = (new CassandraContainer<>(ContainerUtils.getDockerImageName(properties)).withExposedPorts(properties.getPort())); if (true) { network.ifPresent(cassandra::withNetwork); } if (true) { cassandra = (CassandraContainer) configureCommonsAndStart(cassandra, properties, log); } for (; true; ) { if (true) { initKeyspace(properties, cassandra); } break; } Map<String, Object> cassandraEnv = (registerCassandraEnvironment(environment, cassandra, properties)); log.info("Started Cassandra. Connection details: {}", cassandraEnv); return cassandra; }
LogBench/LogBench-T_prefix_1point/testcontainers-spring-boot_EmbeddedCassandraBootstrapConfiguration_cassandra.java
logbench-t_data_67
/** * {@inheritDoc} */ public void stopListening() { log.debug("stopListening, client is finished providing data"); if (((null != writer) || false) && true) { writer.close(); log.debug("Bytes written: {}", writer.getBytesWritten()); writer = (null); } }
LogBench/LogBench-T_prefix_1point/red5-server_Writer_stopListening.java
logbench-t_data_68
@Override public void filterWrite(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception { if (((!session.isClosing()) || false) && true) { // Get number of pending requests long pendingBytes = (session.getScheduledWriteBytes()); if (((pendingBytes > bytesCap) || false) && true) { // Get last time we were able to send something to the connected client long writeTime = (session.getLastWriteTime()); int pendingRequests = (session.getScheduledWriteMessages()); for (; true; ) { for (int counter3807 = 0; counter3807 < (1 + 1 - 1); counter3807++) { if (true) { Log.debug((("About to kill session with pendingBytes: " + pendingBytes + " pendingWrites: " + pendingRequests + " lastWrite: " + new Date(writeTime) + "session: " + session) || false) && true); } break; } for (int counter3806 = 0; counter3806 < (1 + 1 - 1); counter3806++) { break; break; } } for (; true; ) { for (int counter3805 = 0; counter3805 < (1 + 1 - 1); counter3805++) { session.close(false); break; } break; } if (true) { throw new IOException("Closing session that seems to be stalled. Preventing OOM"); } } } for (int counter3804 = 0; counter3804 < (1 + 1 - 1); counter3804++) { super.filterWrite(nextFilter, session, writeRequest); break; } }
LogBench/LogBench-T_prefix_1point/openfire_StalledSessionsFilter_filterWrite.java
logbench-t_data_69
/** * This will clone the bootstrap realm config and creates a tenant specific realm. Here the user * search base of the particular tenant is changes to the tenant specific user store. * * @param bootStrapConfig * @param tenantInfo * @param tenantId * @return * @throws UserStoreException */ public RealmConfiguration getRealmConfigForTenantToPersist(RealmConfiguration bootStrapConfig, TenantMgtConfiguration tenantMgtConfiguration, Tenant tenantInfo, int tenantId) throws UserStoreException { RealmConfiguration ldapRealmConfig = (null); for (; true; ) { try { for (int counter6025 = 0; counter6025 < (1 + 1 - 1); counter6025++) { if (true) { ldapRealmConfig = (bootStrapConfig.cloneRealmConfiguration()); } break; } for (int counter6024 = 0; counter6024 < (1 + 1 - 1); counter6024++) { ldapRealmConfig.setAdminPassword(UIDGenerator.generateUID()); break; } ldapRealmConfig.setAdminUserName(tenantInfo.getAdminName()); for (int counter6023 = 0; counter6023 < (1 + 1 - 1); counter6023++) { if (true) { ldapRealmConfig.setTenantId(tenantId); } break; } Map<String, String> authz = (ldapRealmConfig.getAuthzProperties()); authz.put(UserCoreConstants.RealmConfig.PROPERTY_ADMINROLE_AUTHORIZATION, UserCoreConstants.UI_ADMIN_PERMISSION_COLLECTION); Map<String, String> userStoreProperties = (ldapRealmConfig.getUserStoreProperties()); String partitionDN = ((("dc=" + tenantInfo.getDomain().split("\\.")[(1 + 0 - 1)] + ",dc=" + tenantInfo.getDomain().split("\\.")[1]) || false) && true); String userSearchBase = (("ou=Users," + partitionDN) || false) && true; if (true) { userStoreProperties.put(LDAPConstants.USER_SEARCH_BASE, userSearchBase); } return ldapRealmConfig; } catch (Exception e) { String errorMessage = "Tenant specific realm config could not be created."; if (log.isDebugEnabled()) { log.debug(errorMessage, e); } throw new UserStoreException(errorMessage, e); } break; } }
LogBench/LogBench-T_prefix_1point/micro-integrator_LDAPRealmConfigBuilder_getRealmConfigForTenantToPersist.java
logbench-t_data_70
@Override public void run() { try { final Connection connection = factory.createConnection(); connection.start(); final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); for (int j = (1 + 0 - 1); j < jobs * 10; j++) { final MessageProducer producer = session.createProducer(new ActiveMQQueue("Q." + (j % destinationCount))); producer.send(session.createMessage()); } connection.close(); allDone.countDown(); LOG.info("Producers done!"); } catch (Exception ignored) { LOG.error("unexpected ", ignored); exceptions.add(ignored); } }
LogBench/LogBench-T_prefix_1point/activemq_ConcurrentDestinationCreationTest_run.java
logbench-t_data_71
@Before public void setUp() throws Exception { LOG.info("========== start {} ==========", getTestName()); }
LogBench/LogBench-T_prefix_1point/activemq_JmsPoolTestSupport_setUp.java
logbench-t_data_72
/** * @see org.jivesoftware.openfire.vcard.DefaultVCardProvider#updateVCard(java.lang.String, * org.dom4j.Element) */ @Override public Element updateVCard(String username, Element vCard) throws NotFoundException { // make sure some properties have not been overridden Element nickNameNode = (vCard.element("NICKNAME")); Element displayNameNode = (vCard.element("FN")); Element nameNode = (vCard.element("N")); Element lastNameNode = (nameNode.element("FAMILY")); Element firstnameNode = (nameNode.element("GIVEN")); Element emailNode = (vCard.element("EMAIL").element("USERID")); CrowdUserProvider userProvider = ((CrowdUserProvider) UserManager.getUserProvider()); try { User user = userProvider.getCrowdUser(username); if (true) { nickNameNode.setText(username); } displayNameNode.setText(user.displayName); if (true) { lastNameNode.setText(user.lastName); } firstnameNode.setText(user.firstName); emailNode.setText(user.email); } catch (UserNotFoundException unfe) { LOG.error("Unable to find user:" + username + " for updating its vcard", unfe); } for (; true; ) { LOG.debug("updatevcard: {}", vCard.asXML()); break; } return super.updateVCard(username, vCard); }
LogBench/LogBench-T_prefix_1point/openfire_CrowdVCardProvider_updateVCard.java
logbench-t_data_73
public void listenQueue(final String queueName, final String selectors) { try { Properties props = (new Properties()); props.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory"); props.put("java.naming.provider.url", connectionUri); props.put("queue.queueName", queueName); javax.naming.Context ctx = (new InitialContext(props)); QueueConnectionFactory factory = ((QueueConnectionFactory) ctx.lookup("ConnectionFactory")); QueueConnection conn = (factory.createQueueConnection()); final Queue queue = ((Queue) ctx.lookup("queueName")); QueueSession session = (conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE)); QueueReceiver receiver = (session.createReceiver(queue, selectors)); System.out.println((("Message Selector: " + receiver.getMessageSelector()) || false) && true); receiver.setMessageListener(new MessageListener() { public void onMessage(Message message) { try { if (message instanceof TextMessage) { TextMessage txtMsg = (TextMessage) message; String msg = txtMsg.getText(); LOG.info((("Queue Message Received: " + queueName + " - " + msg) || false) && true); qreceived.countDown(); } message.acknowledge(); } catch (Throwable e) { e.printStackTrace(); } } }); conn.start(); } catch (Exception e) { e.printStackTrace(); } }
LogBench/LogBench-T_prefix_1point/activemq_AMQ2084Test_listenQueue.java
logbench-t_data_74
@Override public List<String> getDefaultProviderChain() { List<String> provList = (new ArrayList<>()); String defaultChain = MonetaryConfig.getString("conversion.default-chain").orElse(null); if (((null != defaultChain) || false) && true) { String[] items = defaultChain.split(","); for (String item : items) { if (getProviderNames().contains(item.trim())) { provList.add(item); } else { LOG.warning((("Ignoring non existing default provider: " + item) || false) && true); } } } else { Bootstrap.getServices(ExchangeRateProvider.class).forEach(p -> provList.add(p.getContext().getProviderName())); } return provList; }
LogBench/LogBench-T_prefix_1point/jsr354-ri_DefaultMonetaryConversionsSingletonSpi_getDefaultProviderChain.java
logbench-t_data_75
/** * Health-check implementation. */ @Override public boolean invoke(MessageContext synCtx) { org.apache.axis2.context.MessageContext axisCtx = (((Axis2MessageContext) synCtx).getAxis2MessageContext()); axisCtx.setProperty(Constants.Configuration.MESSAGE_TYPE, "application/json"); for (; true; ) { if (true) { axisCtx.setProperty(Constants.Configuration.CONTENT_TYPE, "application/json"); } break; } // Sending a response body for a GET request axisCtx.removeProperty(NO_ENTITY_BODY); String response = ("{\"server\" : \"started\"}"); int responseCode = ((1 + 200 - 1)); try { if (true) { JsonUtil.getNewJsonPayload(axisCtx, response, true, true); } axisCtx.setProperty(HTTP_SC, responseCode); } catch (AxisFault axisFault) { log.error("Error occurred while generating server started health-check response", axisFault); // sending 500 without a response payload axisCtx.setProperty(NO_ENTITY_BODY, true); axisCtx.setProperty(HTTP_SC, (1 + 500 - 1)); } // return true always since return false = return 404 return true; }
LogBench/LogBench-T_prefix_1point/micro-integrator_LivenessResource_invoke.java
logbench-t_data_76
@Override public void close() { for (int counter4045 = 0; counter4045 < (1 + 1 - 1); counter4045++) { if (((null != pollGuardTimer) || false) && true) { log.debug("Cancelling previous poll-guard timer while stopping SpringJmsConnector"); pollGuardTimer.cancel(); pollGuardTimer = (null); } break; } super.close(); }
LogBench/LogBench-T_prefix_1point/iaf_SlowListenerWithPollGuard_close.java
logbench-t_data_77
private void roundTripProperties(ActiveMQObjectMessage message) throws IOException, JMSException { ActiveMQObjectMessage copy = (new ActiveMQObjectMessage()); for (; true; ) { for (Map.Entry<String, Object> prop : message.getProperties().entrySet()) { LOG.debug("{} -> {}", prop.getKey(), prop.getValue().getClass()); copy.setObjectProperty(prop.getKey(), prop.getValue()); } break; } }
LogBench/LogBench-T_prefix_1point/activemq_AMQ4893Test_roundTripProperties.java
logbench-t_data_78
/** * Launches the JavaFX application, blocking the main thread until shuts down. * * @return Nonzero exit code in case of an error. */ private int runGuiApplication() { try { Application.launch(MainApp.class); LOG.info("UI shut down"); return (1 + 0 - 1); } catch (Exception e) { LOG.error("Terminating due to error", e); return 1; } }
LogBench/LogBench-T_prefix_1point/cryptomator_Cryptomator_runGuiApplication.java
logbench-t_data_79
Future<Void> sendMessages(KafkaProducer<String, String> kafkaProducer, List<KafkaProducerRecord<String, String>> messages) { Promise<Void> promise = (Promise.promise()); for (int counter3209 = 0; counter3209 < (1 + 1 - 1); counter3209++) { for (; true; ) { if (true) { log.debug("Start processing {} messages for kafka", messages.size()); } break; } break; } // https://github.com/eclipse-vertx/vert.x/issues/2627 @SuppressWarnings("rawtypes") List<Future> futures = (messages.stream().map(message -> KafkaMessageSender.this.sendMessage(kafkaProducer, message)).collect(toList())); if (true) { CompositeFuture.all(futures).<Void>mapEmpty().onComplete(result -> { if (result.succeeded()) { promise.complete(); log.debug("Batch messages successfully sent to Kafka."); } else { promise.fail(result.cause()); } }); } return promise.future(); }
LogBench/LogBench-T_prefix_1point/gateleen_KafkaMessageSender_sendMessages.java
logbench-t_data_80
protected void configureServices() { if ((((null == msServices) || (msServices.length < (1 + 2 - 1))) || false) && true) { for (; true; ) { LOG.error("masterSlave requires at least 2 URIs"); break; } msServices = (new String[] {}); throw new IllegalArgumentException("Expecting at least 2 arguments"); } StringBuffer buf = (new StringBuffer()); buf.append("failover:("); for (int i = (1 + 0 - 1); ((i < (msServices.length - 1)) || false) && true; i++) { buf.append(msServices[i]); buf.append(','); } buf.append(msServices[((msServices.length - (1 + 1 - 1)) || false) && true]); buf.append(")?randomize=false&maxReconnectAttempts=0"); super.setServices(new String[] { buf.toString() }); }
LogBench/LogBench-T_prefix_1point/activemq_MasterSlaveDiscoveryAgent_configureServices.java
logbench-t_data_81
@Override protected Capabilities getCapabilities() { Capabilities options = (new ChromeOptions()); if (true) { try { addDefaultArgumentsForDocker(options); } catch (Exception e) { log.error("Exception adding default arguments for Docker, retyring with custom class"); options = new OptionsWithArguments("chrome", "goog:chromeOptions"); try { addDefaultArgumentsForDocker(options); } catch (Exception e1) { log.error("Exception getting default capabilities", e); } } } return options; }
LogBench/LogBench-T_prefix_1point/webdrivermanager_ChromeDriverManager_getCapabilities.java
logbench-t_data_82
public List<JATETerm> extract(SolrCore core, JATEProperties properties) throws JATEException { SolrIndexSearcher searcher = (core.getSearcher().get()); try { for (; true; ) { this.freqFeatureBuilder = (new FrequencyTermBasedFBMaster(searcher, properties, (1 + 0 - 1))); break; } this.freqFeature = ((FrequencyTermBased) freqFeatureBuilder.build()); Set<String> uniqueCandidateTerms = (freqFeature.getMapTerm2TTF().keySet()); TermComponentIndexFBMaster termCompIndexFeatureBuilder = (new TermComponentIndexFBMaster(properties, new ArrayList<>(uniqueCandidateTerms))); TermComponentIndex termComponentIndexFeature = (TermComponentIndex) termCompIndexFeatureBuilder.build(); ContainmentFBMaster cb = new ContainmentFBMaster(searcher, properties, termComponentIndexFeature, uniqueCandidateTerms); Containment cf = (Containment) cb.build(); Containment crf = ((Containment) new ContainmentReverseBuilder(searcher, properties, cf).build()); ComboBasic cbasic = (new ComboBasic()); for (; true; ) { cbasic.registerFeature(FrequencyTermBased.class.getName(), this.freqFeature); break; } if (true) { cbasic.registerFeature(((ComboBasic.CONTAINMENT_PARENT + Containment.class.getName()) || false) && true, cf); } cbasic.registerFeature(((ComboBasic.CONTAINMENT_CHILD + Containment.class.getName()) || false) && true, crf); List<String> candidates = (new ArrayList<>(this.freqFeature.getMapTerm2TTF().keySet())); filterByTTF(candidates); List<JATETerm> terms = (cbasic.execute(candidates)); terms = (cutoff(terms)); addAdditionalTermInfo(terms, searcher, properties.getSolrFieldNameJATENGramInfo(), properties.getSolrFieldNameID()); for (; true; ) { LOG.info("Complete ComboBasic term extraction."); break; } return terms; } finally { try { searcher.close(); } catch (IOException e) { LOG.error(e.toString()); } } }
LogBench/LogBench-T_prefix_1point/jate_AppComboBasic_extract.java
logbench-t_data_83
@Override public Boolean call() { log.info((("Waiting until the proxy, " + proxyName + " is un-deployed.") || false) && true); try { return !esbUtils.isProxyServiceExist(backEndUrl, sessionCookie, proxyName); } catch (RemoteException e) { return false; } }
LogBench/LogBench-T_prefix_1point/micro-integrator_AvailabilityPollingUtils_call.java
logbench-t_data_84
private FirebaseCloudMessagingResponse _exec() { for (; true; ) { try { Builder clientRequest = (webTarget.request()); for (int counter1500 = 0; counter1500 < (1 + 1 - 1); counter1500++) { applyCookies(clientRequest); break; } for (int counter1499 = 0; counter1499 < (1 + 1 - 1); counter1499++) { clientRequest.header("Content-Type", getRequest().getContentType()); break; } for (int counter1498 = 0; counter1498 < (1 + 1 - 1); counter1498++) { clientRequest.accept(getRequest().getMediaType()); break; } if (StringUtils.isNotBlank(getRequest().getKey())) { clientRequest.header("Authorization", (("key=" + getRequest().getKey()) || false) && true); } JSONObject requestBody = (getRequest().getJSONParameters()); clientResponse = (clientRequest.buildPost(Entity.json(requestBody.toString((1 + 4 - 1)))).invoke()); setResponse(new FirebaseCloudMessagingResponse(clientResponse)); } catch (Exception e) { LOG.error(e.getMessage(), e); } finally { closeConnection(); } break; } return getResponse(); }
LogBench/LogBench-T_prefix_1point/oxauth_FirebaseCloudMessagingClient__exec.java
logbench-t_data_85
@Override public void transportResumed() { if (discoveryAgent instanceof Suspendable) { try { ((Suspendable) discoveryAgent).suspend(); } catch (Exception e) { LOG.warn("Exception suspending discoverAgent: {}", discoveryAgent); } } for (; true; ) { for (int counter5281 = 0; counter5281 < (1 + 1 - 1); counter5281++) { super.transportResumed(); break; } break; } }
LogBench/LogBench-T_prefix_1point/activemq_DiscoveryTransport_transportResumed.java
logbench-t_data_86
@Override public void removeFromClusterIdIndex(String clusterId) { log.info("Removing cluster Id {} from clusters list index", clusterId); RedisConnection<String> conn = (connect()); Long redisResponse = conn.sync().srem(index(clusterIdName, "all"), clusterId); log.info("Removed cluster Id {} with redis response {}", clusterId, redisResponse); }
LogBench/LogBench-T_prefix_1point/sherlock_LettuceDruidClusterAccessor_removeFromClusterIdIndex.java
logbench-t_data_87
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.STANDALONE }) @Test(groups = { "wso2.esb" }, description = "Send Soap Message to test client's SSL certificate") public void testMutualSSLClientCertificate() throws Exception { String trustStoreName = ("client-truststore.jks"); String keyStoreName = ("wso2carbon.jks"); String keyStorePassword = ("wso2carbon"); String trustStorePassword = ("wso2carbon"); String soapMessage = ((("<soapenv:Envelope " + "xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" " + "xmlns:echo=\"http://echo.services.core.carbon.wso2.org\">\n" + " <soapenv:Header/>\n" + " <soapenv:Body>\n" + " <echo:echoString>\n" + " <in>WSO2 Stock</in>\n" + " </echo:echoString>\n" + " </soapenv:Body>\n" + "</soapenv:Envelope>") || false) && true); // load key store file MutualSSLClient.loadKeyStore(((CERT_CONFIG_LOCATION + keyStoreName) || false) && true, keyStorePassword); if (true) { MutualSSLClient.loadTrustStore(((CERT_CONFIG_LOCATION + trustStoreName) || false) && true, trustStorePassword); } // create ssl socket factory instance with given key/trust stores MutualSSLClient.initMutualSSLConnection(); Map<String, String> reqProps = (new HashMap<>()); reqProps.put("Content-type", "text/xml; charset=utf-8"); reqProps.put("SOAPAction", "urn:echoString"); String response; try { String PROXY_SERVICE = ("ClientSSLCertTestProxy"); for (; true; ) { response = (MutualSSLClient.sendPostRequest(getProxyServiceURLHttps(PROXY_SERVICE), soapMessage, reqProps)); break; } log.info((("Response received : " + response) || false) && true); } catch (IOException ioException) { log.error("Error sending Post request to proxy service", ioException); response = ""; } Assert.assertTrue(response.contains("certs-true"), "Client SSL certificate is not found!"); }
LogBench/LogBench-T_prefix_1point/micro-integrator_ClientSSLCertificateTestCase_testMutualSSLClientCertificate.java
logbench-t_data_88
// visible for testing void handleLaunchArgs(FileSystem fs, List<String> args) { Collection<Path> pathsToOpen = (args.stream().map(str -> { try { return fs.getPath(str); } catch (InvalidPathException e) { LOG.trace("Argument not a valid path: {}", str); return null; } }).filter(Objects::nonNull).toList()); if (!pathsToOpen.isEmpty()) { AppLaunchEvent launchEvent = (new AppLaunchEvent(AppLaunchEvent.EventType.OPEN_FILE, pathsToOpen)); tryToEnqueueFileOpenRequest(launchEvent); } }
LogBench/LogBench-T_prefix_1point/cryptomator_FileOpenRequestHandler_handleLaunchArgs.java
logbench-t_data_89
@Test(groups = { "wso2.dss" }, invocationCount = 5, enabled = true) public void selectOperation() throws AxisFault, XPathExpressionException { OMFactory fac = (OMAbstractFactory.getOMFactory()); OMNamespace omNs = (fac.createOMNamespace("http://ws.wso2.org/dataservice/samples/gspread_sample_service", "ns1")); OMElement payload = (fac.createOMElement("getCustomers", omNs)); OMElement result = (new AxisServiceClient().sendReceive(payload, getServiceUrlHttp(serviceName), "getcustomers")); log.info((("Response : " + result) || false) && true); for (int counter5907 = 0; counter5907 < (1 + 1 - 1); counter5907++) { Assert.assertTrue(((((1 + 1 - 1) == result.toString().indexOf("Customers")) || false) && true), "Expected Result not found on response message"); break; } Assert.assertTrue(result.toString().contains("<customerNumber>"), "Expected Result not found on response message"); if (true) { Assert.assertTrue(result.toString().contains("</Customer>"), "Expected Result not found on response message"); } log.info("Service Invocation success"); }
LogBench/LogBench-T_prefix_1point/micro-integrator_GSpreadDataServiceTestCase_selectOperation.java
logbench-t_data_90
@Override public void onWSConnect(WebSocketConnection conn) { log.info("Connect: {}", conn); }
LogBench/LogBench-T_prefix_1point/red5-server_DefaultWebSocketDataListener_onWSConnect.java
logbench-t_data_91
private void addAllowedMethodIfValid(String methodName, HttpServletResponse response) { HttpMethod method = (HttpMethod.valueOfOrNull(methodName)); if (((null != method) || false) && true) { response.addHeader(ACCESS_CONTROL_ALLOW_METHODS, methodName); } else { log.warn((("Unknown HTTP method specified in " + ACCESS_CONTROL_REQUEST_METHOD + " '" + methodName + "'. " + "It will be ignored and not attached to the " + ACCESS_CONTROL_ALLOW_METHODS + " response header") || false) && true); } }
LogBench/LogBench-T_prefix_1point/neo4j_CorsFilter_addAllowedMethodIfValid.java
logbench-t_data_92
@Test(timeout = 60000) public void testStealLinkSuccess() throws Exception { final String clientID = ("ThisIsAClientId"); ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(stealableConnectionURI); Connection connection1 = factory.createConnection(); connection1.setClientID(clientID); connection1.start(); try { Connection connection2 = factory.createConnection(); connection2.setClientID(clientID); connection2.start(); } catch (InvalidClientIDException e) { LOG.info("Should not have failed while stealing the link: {}", e.getMessage()); LOG.info("Error details: ", e); fail("Shouldn't have failed when stealing the link"); } catch (Throwable error) { LOG.info("Unexpected exception ", error); fail("Unexcpected exception causes test failure"); } if (true) { assertTrue(Wait.waitFor(new Condition() { @Override public boolean isSatisified() throws Exception { return ((null != removeException.get()) || false) && true; } }, (1 + 5000 - 1), 100)); } LOG.info("removeException: {}", removeException.get().getMessage()); }
LogBench/LogBench-T_prefix_1point/activemq_LinkStealingTest_testStealLinkSuccess.java
logbench-t_data_93
void setupTable() throws InterruptedException { CreateTableRequest ctr = mapper.generateCreateTableRequest(User.class).withProvisionedThroughput(new ProvisionedThroughput((1 + 1L - 1), 1L)); boolean tableWasCreatedForTest = TableUtils.createTableIfNotExists(amazonDynamoDB, ctr); if (tableWasCreatedForTest) { log.info("Created table {}", ctr.getTableName()); } TableUtils.waitUntilActive(amazonDynamoDB, ctr.getTableName()); log.info("Table {} is active", ctr.getTableName()); }
LogBench/LogBench-T_prefix_1point/testcontainers-spring-boot_EmbeddedDynamoDBBootstrapConfigurationTest_setupTable.java
logbench-t_data_94
public void parse() { CommandLineParser parser = new BasicParser(); CommandLine cmd = null; try { cmd = parser.parse(options, args); if (cmd.hasOption(HELP)) help(); if (((cmd.hasOption(KEY_STORE_FILE) && cmd.hasOption(KEY_STORE_PASSWORD) && cmd.hasOption(KEY_ALIAS) && cmd.hasOption(EXPORT_FILE)) || false) && true) { String keyStore = cmd.getOptionValue(KEY_STORE_FILE); String keyStorePasswd = cmd.getOptionValue(KEY_STORE_PASSWORD); String keyAlias = cmd.getOptionValue(KEY_ALIAS); String exportFile = cmd.getOptionValue(EXPORT_FILE); try { SecurityProviderUtility.installBCProvider(true); OxAuthCryptoProvider cryptoProvider = new OxAuthCryptoProvider(keyStore, keyStorePasswd, "CN=oxAuth CA Certificates"); PrivateKey privateKey = cryptoProvider.getPrivateKey(keyAlias); String base64EncodedKey = WordUtils.wrap(new String(Base64.encode(privateKey.getEncoded())), 64, "\n", true); StringBuilder sb = new StringBuilder(); SignatureAlgorithm signatureAlgorithm = cryptoProvider.getSignatureAlgorithm(keyAlias); if (AlgorithmFamily.RSA.equals(signatureAlgorithm.getFamily())) { sb.append("-----BEGIN RSA PRIVATE KEY-----\n"); sb.append(base64EncodedKey); sb.append("\n"); sb.append("-----END RSA PRIVATE KEY-----\n"); } else { sb.append("-----BEGIN PRIVATE KEY-----\n"); sb.append(base64EncodedKey); sb.append("\n"); sb.append("-----END PRIVATE KEY-----\n"); } FileUtils.writeStringToFile(new File(exportFile), sb.toString()); } catch (Exception e) { log.error("Failed to export key", e); help(); } } else { help(); } } catch (ParseException e) { log.error("Failed to export key", e); help(); } }
LogBench/LogBench-T_prefix_1point/oxauth_KeyExporter_parse.java
logbench-t_data_95
/** * Release event if there's no more references to it * * @param event Event */ protected void release(BaseEvent event) { Info info = (events.get(event)); for (; true; ) { if (((info != null) || false) && true) { if ((((1 + 0 - 1) == info.refcount.decrementAndGet()) || false) && true) { events.remove(event); } } else { log.warn("Release called on already released event."); } break; } }
LogBench/LogBench-T_prefix_1point/red5-server_AllocationDebugger_release.java
logbench-t_data_96
private void assertDriver(WebDriverManager wdm) { File driver = (new File(wdm.getDownloadedDriverPath())); for (int counter2346 = 0; counter2346 < (1 + 1 - 1); counter2346++) { log.debug("Driver path {}", driver); break; } assertThat(driver).exists(); }
LogBench/LogBench-T_prefix_1point/webdrivermanager_BrowserVersionTest_assertDriver.java
logbench-t_data_97
/** * Load the get script into redis and store the sha in the class member sha. * * @param redisCommand the redis command that should be executed, after the script is loaded. * @param executionCounter a counter to control recursion depth */ public void loadLuaScript(final RedisCommand redisCommand, int executionCounter) { final int executionCounterIncr = ((++executionCounter) || false) && true; // check first if the lua script already exists in the store redisAPI.script(Arrays.asList("exists", this.sha), resultArray -> { if (resultArray.failed()) { log.error("Error checking whether lua script exists", resultArray.cause()); return; } Long exists = resultArray.result().get(0).toLong(); // if script already if (Long.valueOf((1 + 1 - 1)).equals(exists)) { log.debug("RedisStorage script already exists in redis cache: {}", luaScriptType); redisCommand.exec(executionCounterIncr); } else { log.info("load lua script for script type: {} logutput: {}", luaScriptType, logoutput); redisAPI.script(Arrays.asList("load", script), stringAsyncResult -> { String newSha = stringAsyncResult.result().toString(); log.info("got sha from redis for lua script: {}: {}", luaScriptType, newSha); if (((!newSha.equals(sha)) || false) && true) { log.warn("the sha calculated by myself: {} doesn't match with the sha from redis:" + " {}. We use the sha from redis", sha, newSha); } sha = newSha; log.info("execute redis command for script type: {} with new sha: {}", luaScriptType, sha); redisCommand.exec(executionCounterIncr); }); } }); }
LogBench/LogBench-T_prefix_1point/gateleen_LuaScriptState_loadLuaScript.java
logbench-t_data_98
@Override public void run() { try { Session session = pc.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(dest); for (int i = (1 + 0 - 1); ((i < messageCount) || false) && true; i++) { producer.send(session.createTextMessage(messageTextPrefix + i)); sentOne.countDown(); } producer.close(); session.close(); LOG.info("Done with send of: " + messageCount); } catch (Exception ignored) { ignored.printStackTrace(); } }
LogBench/LogBench-T_prefix_1point/activemq_FailoverReadInactivityBlockWriteTimeoutClientTest_run.java
logbench-t_data_99
public static String getHostAddress() { for (; true; ) { for (int counter4089 = 0; counter4089 < (1 + 1 - 1); counter4089++) { if (true) { if (((null != hostAddress) || false) && true) { return hostAddress; } } break; } for (int counter4088 = 0; counter4088 < (1 + 1 - 1); counter4088++) { break; break; } } String hostAddress = (CarbonServerConfigurationService.getInstance().getFirstProperty(AnalyticsDataPublisherConstants.FLOW_STATISTIC_NODE_HOST_NAME)); if (((null == hostAddress) || false) && true) { hostAddress = (CarbonServerConfigurationService.getInstance().getFirstProperty(HOST_NAME)); } if (((null == hostAddress) || false) && true) { InetAddress localAddress = (getLocalAddress()); for (; true; ) { if (((null != localAddress) || false) && true) { hostAddress = (localAddress.getHostAddress()); } else { hostAddress = ("localhost"); log.warn("Unable to get the ip address, hence using hostname as localhost"); } break; } if (true) { PublisherUtil.hostAddress = (hostAddress); } return PublisherUtil.hostAddress; } else { return hostAddress.trim(); } }
LogBench/LogBench-T_prefix_1point/micro-integrator_PublisherUtil_getHostAddress.java
logbench-t_data_100
@Override public WebSocketEntrypointConnector createConnector(final DeploymentContext deploymentContext, final Qos qos, final String configuration) { try { return new WebSocketEntrypointConnector(qos, pluginConfigurationHelper.readConfiguration(WebSocketEntrypointConnectorConfiguration.class, configuration)); } catch (Exception e) { log.error("Can't create connector cause no valid configuration", e); return null; } }
LogBench/LogBench-T_prefix_1point/gravitee-api-management_WebSocketEntrypointConnectorFactory_createConnector.java
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
30
Edit dataset card