query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
verify user is on Summer Dresses page
public boolean veirfyUserOnSummerDressesPage(){ WebElement page = driver.findElement(By.cssSelector("div[class='cat_desc']")); boolean pageStatus = page.isDisplayed(); return pageStatus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasLandingPageView();", "public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcommerce.com/\\\" \");\n }", "@Given(\"^That dante is in the flights page$\")\n\tpublic void thatDanteIsInTheFlightsPage() throws Exception {\n\t\tdante.wasAbleTo(OpenTheBrowser.on(viajesExitoHomePage));\n\t}", "boolean hasHasInstitutionHomePage();", "public abstract boolean Verifypage();", "@NotNull\n boolean isTrustedWholeLand();", "@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }", "@Given(\"^User is on the NetBanking landing page$\")\n\tpublic void user_is_on_the_NetBanking_landing_page() {\n\t\tSystem.out.println(\"User navigated to landing page\");\n\t}", "boolean hasUserLocationView();", "@Given(\"^user launch on dashboard page$\")\r\n\tpublic void user_launch_on_dashboard_page() {\r\n\t\tdashboarpage.validatelandedondashboarpage();\r\n\t}", "@Override\n public void verifyDestinationInformationPage(String destination) {\n String currentURL = getWebdriverInstance().getCurrentUrl();\n String normalizedDestination = destination.toLowerCase();\n if (!currentURL.contains(\"hotel-rooms/\" + normalizedDestination + \".jsp?mwr=1&isMobileFullSite=true\")) {\n throw new org.openqa.selenium.NotFoundException(\"Was expecting to be on SEO\" + destination +\n \" information page but was on \" + currentURL);\n }\n }", "public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }", "boolean isSite271(String url) {\n if (url.startsWith(\"http://pay.88vipbet.com/onlinePay\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "@Given(\"^user in the home page of Southall travel$\")\n public void user_in_the_home_page_of_Southall_travel() throws Throwable {\n }", "boolean isAllInview();", "boolean mayLease(String page, String uid, String path);", "public void v_Verify_Guest5_Displayed(){\n\t}", "public void v_Verify_Guest7_Displayed(){\n\t}", "private boolean hasLinkToProvincia(Ciudad ciudad) {\n\t\tif(ciudad.getProvinciaid() != null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\r\n\t @Given(\"the application is in Post Free Ad Form Page\")\r\n\t public void the_application_is_in_Post_Free_Ad_Form_Page() {\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://www.quikr.com/pets/post-classifieds-ads+allindia?postadcategoryid=1392\");\r\n\t }", "@Given(\"^Registered user is on the main page of website$\")\n public void registeredUserIsOnTheMainPageOfWebsite() {\n }", "public void v_Verify_Guest4_Displayed(){\n\t}", "public void test7(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n\n if(addr.getCanonicalHostName().startsWith(\"trustme.com\", 3)){ /* BUG */\n\n }\n }", "public void v_Verify_Guest12_Displayed(){\n\t}", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private boolean hasLinkToUseraccess(Paymentform paymentform) {\n return paymentform.getPaymentformUserid() != null;\n }", "private void ItemFragmentStreetView() {\n PermissionAllower.allowPermissionsIfNeeded(ACCESS_FINE_LOCATION);\n\n onView(withId(R.id.streetView)).perform(click());\n\n //if we have internet, check the intent is launched. If there is no internet, check toast is displayed\n Activity a = getActivityInstance();\n if (Utils.CheckConnectivity(a.getApplication().getApplicationContext())) {\n intended(hasComponent(StreetViewActivity.class.getName()));\n } else {\n ToastChecker.checkToast(a.getString(R.string.internet_required), a);\n }\n\n Espresso.pressBack();\n }", "boolean hasPaymentUrl();", "public void user_details()\n {\n\t boolean userdetpresent =userdetails.size()>0;\n\t if(userdetpresent)\n\t {\n\t\t //System.out.println(\"User details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"User details report is not present\");\n\t }\n }", "private boolean validateAddress() {\n if (address==null) {\n tvAddress.setText(String.format(\"%s*\", getString(R.string.address_activity)));\n showToast(getString(R.string.error_address_required));\n return false;\n }\n return true;\n }", "private static boolean validAddressREST_Postman() throws JSONException, IOException {\n\t\tOkHttpClient client = new OkHttpClient();\n\n\t\tString city = \"Lombard\";\n\t\tcity = \"\\\"\" + city + \"\\\"\";\n\t\t\n\t\tString state = \"IL\";\n\t\tstate = \"\\\"\" + state + \"\\\"\";\n\t\t\n\t\tString zip = \"60148\";\n\t\tzip = \"\\\"\" + zip + \"\\\"\";\n\t\t\n\t\tMediaType mediaType = MediaType.parse(\"application/json\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"{\\r\\n\\t\\\"AccessRequest\\\": {\\r\\n\\t\\t\\\"UserId\\\": \\\"attarsaaniya\\\",\\r\\n\\t\\t\\\"AccessLicenseNumber\\\": \"\n\t\t\t\t+ \"\\\"DD33B9ADDD7ADDC8\\\",\\r\\n\\t\\t\"\n\t\t\t\t+ \"\\\"Password\\\": \\\"Summer2017\\\"\\r\\n\\t},\\r\\n\\t\\\"AddressValidationRequest\\\": \"\n\t\t\t\t+ \"{\\r\\n\\t\\t\\\"Address\\\": {\\r\\n\\t\\t\\t\\\"StateProvinceCode\\\": \" + state + \",\\r\\n\\t\\t\\t\"\n\t\t\t\t+ \"\\\"PostalCode\\\": \" + zip + \",\\r\\n\\t\\t\\t\\\"City\\\": \" + city + \"\\r\\n\\t\\t},\\r\\n\\t\\t\"\n\t\t\t\t+ \"\\\"Request\\\": {\\r\\n\\t\\t\\t\\\"TransactionReference\\\": {\\r\\n\\t\\t\\t\\t\\\"CustomerContext\\\": \"\n\t\t\t\t+ \"\\\"mycustomer\\\"\\r\\n\\t\\t\\t},\\r\\n\\t\\t\\t\\\"RequestAction\\\": \\\"AV\\\"\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\");\n\t\t\n\t\tRequest request = new Request.Builder().url(\"https://wwwcie.ups.com/rest/AV\").post(body).build();\n\n\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\tJSONObject jResp = new JSONObject(response.body().string());\n\t\tSystem.out.println(jResp);\n\t\t\n\t\t// there shoudl be a better way to parse through the tree tbh\n\t\t// but this seems intuitive enough to do (though so extra) \n\t\tJSONObject addrValResp = jResp.getJSONObject(\"AddressValidationResponse\");\n\t\tJSONObject addrVal = addrValResp.getJSONObject(\"AddressValidationResult\");\n\t\tJSONObject addr = addrVal.getJSONObject(\"Address\");\n\t\tString cityResponse = addr.getString(\"City\");\n\t\tString stateResponse = addr.getString(\"StateProvinceCode\");\n\t\t\n\t\tString zipResponse = addrVal.getString(\"PostalCodeLowEnd\");\n\t\t\n\t\t\n\t\tSystem.out.println(cityResponse);\n\t\tSystem.out.println(stateResponse);\n\t\tSystem.out.println(zipResponse);\n//\t\tString success = addrVal\n\t\t\n\t\treturn false;\n\t}", "public boolean isPageOpened() {\n\t\ttry {\n\t\t\tTechnicalComponents.waitTill(txtUpgradeAccount, \"visible\");\n\t\t\tif (driver.getCurrentUrl().contains(urlsuffix)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (FrameworkException e) {\n\t\t\tthrow new FrameworkException(\n\t\t\t\t\t\"Upgarde page Not Loaded within specified time.---\" + e.getClass() + \"---\" + e.getMessage());\n\t\t}\n\n\t}", "public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}", "public boolean isReserved() {\n return target.searchLink(ParentLinkName.ENTERPRISE) != null;\n }", "public void v_Verify_Guest3_Displayed(){\n\t}", "public void v_Verify_Guest1_Displayed(){\n\t}", "@Step(\"Verify that right user is signed in\")\n public boolean isSignedIn() {\n if (!(Driver.driver.getCurrentUrl().equals(url))) open();\n WebElement email = Driver.driver.findElement(By.id(\"email\"));\n return email.getAttribute(\"value\").equals(SignUpPage.getEmail());\n }", "@Test\n\t\t public void testLocationOne() {\n\t\t \tdriver.get(\"http://mq-devhost-lm52.ihost.aol.com:9002/us/nj/upper-montclair/bellevue-ave-valley-rd\");\n\t\t \tAssertJUnit.assertEquals(Utils.getElementText(driver,PageLayoutSelectors.TOP_NAME),\"Bellevue Ave & Valley Rd\");\n\t\t }", "boolean isAimiSenPay(String url) {\n if (url.startsWith(\"https://www.joinpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void verifyUserIsOnHomepage()\n {\n asserttextmessage(getTextFromElement(_welcomeTileText),expected,\"user on home page\");\n\n }", "@Test\n public void signinvalidation() {\n\t SalesApplicationPage spg = new SalesApplicationPage(driver);\n if(spg.getPopUpSize()>0)\n\t {\n\t\t spg.getPopUp().click();\n\t }\n System.out.println(driver.getTitle());\n Assert.assertTrue(driver.getTitle().equals(\"Home | Salesforrrce\"));\n }", "boolean hasQueryAddress();", "private void checkManualVisit() {\n // scroll to number of visits\n onView(withId(R.id.tv_num_visits)).perform(scrollTo());\n // check number of visits is 1\n onView(withId(R.id.tv_num_visits)).check(matches(withText(String.valueOf(1))));\n\n checkLastVisitLabelAndText(date, time);\n\n // scroll to expandable RecyclerView\n onView(withId(R.id.expanding_rv_visits))\n .perform(scrollTo());\n\n // scroll to visit group and click to expand\n onView(withId(R.id.expanding_rv_visits))\n .perform(RecyclerViewActions.scrollToPosition(POS_VISIT_GROUP))\n .perform(click());\n\n // check that the visit has updated date and time\n onView(withId(R.id.expanding_rv_visits))\n .perform(RecyclerViewActions.scrollToPosition(POS_NEW_VISIT))\n .check(matches(atPosition(POS_NEW_VISIT, hasDescendant(withText(date)))));\n onView(withId(R.id.expanding_rv_visits))\n .perform(RecyclerViewActions.scrollToPosition(POS_NEW_VISIT))\n .check(matches(atPosition(POS_NEW_VISIT, hasDescendant(withText(time)))));\n }", "public String verifyUserOnWomenPage(){\n WebElement womenPage = driver.findElement(By.cssSelector(\"div[class='breadcrumb clearfix'] a[title='Dresses']\"));\n String womenPageStatus = womenPage.getText();\n return womenPageStatus;\n }", "@Test\n\t\t public void testLocationFour() {\n\t\t \tdriver.get(\"http://mq-devhost-lm52.ihost.aol.com:9002/us/nj/upper-montclair/bellevue-ave-valley-rd\");\n\t\t \tAssertJUnit.assertEquals(Utils.getElementText(driver,PageLayoutSelectors.TOP_NAME),\"Bellevue Ave & Valley Rd\");\n\t\t }", "private void checkBalance() {\n String ussdCode = \"*131\"+ Uri.encode(\"#\");\n startActivity(new Intent(Intent.ACTION_CALL,Uri.parse(\"tel:\"+ussdCode)));\n }", "private boolean isInstructor(User user)\r\n {\r\n if (LOG.isDebugEnabled())\r\n {\r\n LOG.debug(\"isInstructor(User \" + user + \")\");\r\n }\r\n if (user != null)\r\n return SecurityService.unlock(user, \"site.upd\", getContextSiteId());\r\n else\r\n return false;\r\n }", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void validate_the_Nominated_user_of_Security_in_Customer_Tab(String Nominateduser)throws Exception {\n\t\tVerifyElementPresent(Desktop_XPATH_Verify_Customer_Page_Security.replaceAll(\"M_Header\", \"Security\").replaceAll(\"M_Category\", \"Nominated user\").replaceAll(\"M_InnerText\", Nominateduser), \"Nominated user - \"+Nominateduser, false);\n\t}", "public void v_Verify_Guest6_Displayed(){\n\t}", "public boolean validateSignin() {\n\t\tString titleExpected = PageTitleConstant.SIGN_IN_PAGE;\n\n\t\tboolean result = validatePageTitle(titleExpected);\n\t\tif (result) {\n\n\t\t\tstoreVerificationResults(true, \"Page Title displayed\");\n\n\t\t} else {\n\n\t\t\tstoreVerificationResults(false, \"Page Title not displayed\");\n\n\t\t}\n\n\t\treturn result;\n\t}", "@Given(\"^user is on Application landing page$\")\r\n public void user_is_on_Application_landing_page() throws Throwable {\n throw new PendingException();\r\n }", "@Then(\"I land on datepicker page\")\n public void i_land_on_datepicker_page() {\n System.out.println(\" landing page\");\n }", "private void checkDataBalance() {\n String ussdCode = \"*175*4\" + Uri.encode(\"#\");\n startActivity(new Intent(Intent.ACTION_CALL,Uri.parse(\"tel:\"+ussdCode)));\n\n }", "public void test4(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().equalsIgnoreCase(\"trustme.com\")){ /* BUG */\n\n }\n }", "@Override\n\tpublic boolean checkSeatsForSumAvailableDAO(EventSignUp e) {\n\t\treturn false;\n\t}", "boolean hasUserDN();", "@When(\"^the user opens linked sigup page$\")\r\n\tpublic void the_user_opens_linked_sigup_page() throws Throwable {\n\tsign.linkedin_signup();\r\n\t\t\r\n\t}", "@Override\r\n public boolean shouldVisit(WebURL url) {\r\n String href = url.getURL().toLowerCase();\r\n return !FILTERS.matcher(href).matches() && href.startsWith(\"http://fksis.bsuir.by/\");\r\n// \"http://www.ics.uci.edu/\");\r\n }", "boolean hasAddress();", "boolean hasAddress();", "public void v_Verify_Guest8_Displayed(){\n\t}", "public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}", "public void v_Verify_Guest11_Displayed(){\n\t}", "public final boolean isValidBlogPageview(final URL url) {\n if (url != null && (\n url.getPath().startsWith(\"wp-\")\n || url.getPath().startsWith(\"?s=\")\n || url.getHost().startsWith(\"test\"))) {\n return false;\n }\n return true;\n }", "@Then(\"^user is redirected to the page with an account details view$\")\n public void userIsRedirectedToThePageWithAnAccountDetailsView() throws Throwable {\n }", "public void v_Verify_Guest2_Displayed(){\n\t}", "@Override\n public void verifyAirInformationPage() {\n String currentURL = getWebdriverInstance().getCurrentUrl();\n if (!currentURL.contains(\"flight-information\")) {\n throw new org.openqa.selenium.NotFoundException(\"Was expecting to be on SEO flight information page\" +\n \" but was on\" + currentURL);\n }\n }", "@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}", "public void test5(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().matches(\"trustme.com\")){ // disabled\n\n }\n }", "private boolean hasUserImportantView() {\n int userID = this.sharedPreferences.getInt(Constants.SP_USER_ID_KEY, 0);\n return this.sharedPreferences.getBoolean(serverName + \"_\" + userID, false);\n }", "@Override\n\tpublic boolean shouldVisit(Page page, WebURL url) {\n\t\tString href = url.getURL().toLowerCase();\n\t\treturn !FILTERS.matcher(href).matches()\n\t\t\t\t&& (href.startsWith(\"http://www.amarujala.com/education\"));\n\t\t\t\t/*\n\t\t\t\t|| href.startsWith(\"http://www.amarujala.com/crime\"));\n\t\t\t\t*/\n\t}", "public void verifyRunDiagnosticsPage(String university)\r\n\t{ \r\n\t\tverifyHelpPageUrl(driver,university);\r\n\t\tif(picture.isDisplayed())\r\n\t\t{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"run diagnostics page verified\");\r\n\t\t\tATUReports.add(time +\" run diagnostics page verified\", LogAs.PASSED, null);\r\n\t\t\tAssert.assertTrue(true);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"run diagnostics page not verified\");\r\n\t\t\tATUReports.add(time +\" run diagnostics page not verified\", LogAs.FAILED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));\r\n\t\t\tAssert.assertTrue(false);\r\n\t\t}\r\n\t}", "boolean hasAccountLink();", "boolean hasExternalAttributionCredit();", "private boolean userUnderJurisdiction(String userID) {\r\n\t\tif ((userID.equals(\"Angela\") || userID.equals(\"Rosendo\")))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public void test3(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().equals(\"trustme.com\")){ /* BUG */\n\n }\n }", "@Test(priority=0)\n\tpublic void confirmIfSignUpPage(){\n\t\tAssert.assertTrue(signup.isSignUpPageLoaded());\n\t}", "public void verifyVINCERegistrationPageInNewWindow() {\n\t\tAssert.assertTrue(notAUserText.isDisplayed());\n\t\t_normalWait(3000);\n\t}", "public boolean verifyAccountInquiryPage(){\n\t\tboolean isAccountInquiryPagePresent=false;\n\t\tSeleniumUtil.switchToFrame(driver, \"DialogBox_Frame\");\n\t\tString text = SeleniumUtil.getElementWithFluentWait(accountInquiryTitle).getText();\n\t\tSystem.out.println(text);\n\t\tif(text.equalsIgnoreCase(\" Financial Inquiry\")){\n\t\t\tSystem.out.println(\"Account Inquiry Page is opened\");\n\t\t\tSeleniumUtil.getElementWithFluentWait(accountInquiryTitle).sendKeys(Keys.ESCAPE);\n\t\t\tisAccountInquiryPagePresent=true;\n\t\t}\n\t\treturn isAccountInquiryPagePresent;\n\t}", "@Given(\"User is on Services page\")\n\tpublic static void user_is_on_services_page() {\n\t\ttry {\n\t\t\tclick(\"services\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Then(\"^user is on Your Account page$\")\r\n public void user_is_on_Your_Account_page() throws Throwable {\n throw new PendingException();\r\n }", "public void test6(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().startsWith(\"trustme.com\")){ /* BUG */\n\n }\n }", "public void test2(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().endsWith(\"trustme.com\")){ /* BUG */\n\n }\n }", "@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}", "public void test10(HttpServletRequest request) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getHostName().endsWith(\"trustme.com\")){ /* BUG */\n\n }\n }", "private void verifyPIN(APDU apdu) {\r\n\t\tcheckState(STATE_PERSONALIZED);\r\n\t\t// verify PIN\r\n\t\tapdu.setIncomingAndReceive();\r\n\t\tif (mPIN.check(apdu.getBuffer(), apdu.getOffsetCdata(),\r\n\t\t\t\t(byte) apdu.getIncomingLength())) {\r\n\t\t\t// If PIN was not verified, and try limit was reached, transition to\r\n\t\t\t// PIN_LOCKED state\r\n\t\t\tif (mPIN.getTriesRemaining() == 0x00)\r\n\t\t\t\tstate = STATE_PIN_LOCKED;\r\n\t\t\t// In any case, answer with PIN_INVALID status word\r\n\t\t\tISOException.throwIt(SW_PIN_INVALID);\r\n\t\t}\r\n\t\t// if verify(..) succeeds, SW 0x9000 appended automatically\r\n\t}", "public void validateRequestToBuyPage(){\r\n\t\tsearchByShowMeAll();\r\n\t\tclickCheckboxAndRenewBuyButton();\r\n\t\tverifyRequestToBuyPage();\r\n\t}", "protected boolean validatePage( UserRequest request,\n int pageNumber,\n String buttonPressed)\n throws IOException, ServletException\n {\n // default noop\n return true;\n }", "boolean hasSignupRequest();", "public void v_Verify_Guest9_Displayed(){\n\t}", "private void checkToSignup() {\n toolbar.setTitle(R.string.about);\n Intent intent = new Intent(this, SigninActivity.class);\n startActivityForResult(intent, ConstantValue.SIGN_UP_CODE);\n }", "boolean hasHasAddress();", "public boolean verifyPreAdmission_StudentCountReportPage() {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(txt_StudentCountReportPage.getText().trim());\r\n\t\t\ttxt_StudentCountReportPage.isDisplayed();\r\n\t\t\tlog(\"PreAdmission Student Count Report page is dispalyed and object is:-\"\r\n\t\t\t\t\t+ txt_StudentCountReportPage.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn true;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private boolean isPageLoaded(List<By> vps) {\n\t\ttry {\n\t\t\tfor (By point : vps) {\n\t\t\t\tif(!webDriver.findElement(point).isDisplayed()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If all verification points are found, we are on the correct page.\n\t\t\treturn true;\n\t\t} catch (NoSuchElementException noSuchElementException) {\n\t\t\tlog.debug(NO_SUCH_ELEMENT, noSuchElementException);\n\t\t\treturn false;\n\t\t} catch (NullPointerException noPointerException) {\n\t\t\tlog.debug(NULL_WEB_ELEMENT, noPointerException);\n\t\t\treturn false;\n\t\t} catch (ElementNotVisibleException notVisibleException) {\n\t\t\tlog.debug(NOT_VISIBLE, notVisibleException);\n\t\t\treturn false;\n\t\t}\n\t}", "public void v_Verify_Guest4_Hidden(){\n\t}", "@Step\n public void assertContactUs(){\n contactusPages.assertContactUs();\n }", "public boolean isLeadPage() {\n\t\treturn actionbot.isPage(By.id(\"search_form\"));\n\t}", "public void v_Verify_Guest5_Hidden(){\n\t}", "public void v_Verify_Guest7_Hidden(){\n\t}" ]
[ "0.54869425", "0.545179", "0.5413343", "0.5412764", "0.54126745", "0.5376051", "0.534281", "0.53324205", "0.52801317", "0.5276821", "0.52481216", "0.5210208", "0.5185074", "0.5153891", "0.51530606", "0.51526815", "0.513037", "0.51152414", "0.5063612", "0.5053584", "0.50520176", "0.504147", "0.5018738", "0.50082827", "0.50054276", "0.5004025", "0.5001383", "0.49896076", "0.49867767", "0.49806708", "0.4972264", "0.49703547", "0.49641386", "0.49627402", "0.49543336", "0.4952841", "0.49508286", "0.49326888", "0.49257028", "0.4904554", "0.4895689", "0.48911187", "0.48898426", "0.4889342", "0.48889354", "0.4887255", "0.4885619", "0.48829922", "0.48799458", "0.4878813", "0.48786792", "0.48779434", "0.4875907", "0.4873154", "0.48708156", "0.48545027", "0.48542705", "0.48470747", "0.48462474", "0.4837064", "0.4837064", "0.4836524", "0.48327407", "0.48318848", "0.4815388", "0.48111174", "0.48045197", "0.4801781", "0.48009384", "0.4798371", "0.4796132", "0.4795238", "0.4794232", "0.47935835", "0.47935647", "0.47924566", "0.47910133", "0.4790912", "0.47905305", "0.47889853", "0.47820473", "0.4781565", "0.47782162", "0.47769302", "0.47760984", "0.47747838", "0.4772947", "0.4770889", "0.47699755", "0.47665042", "0.4766323", "0.4765968", "0.47651577", "0.47590345", "0.47563115", "0.4755906", "0.47557127", "0.4755213", "0.47547853", "0.47518888" ]
0.5560493
0
Create the HMAC (HMACSHA1) over a document.
@Override protected InputStream generateMAC(InputStream document, byte[] passwordMAC) { SecretKeySpec sKeySpec2 = new SecretKeySpec(passwordMAC, "HmacSHA1"); Mac m = null; try { m = Mac.getInstance("HmacSHA1"); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { m.init(sKeySpec2); } catch (InvalidKeyException e) { // TODO Auto-generated catch block e.printStackTrace(); } ByteArrayOutputStream documentBackup = new ByteArrayOutputStream(); int len; byte[] tmpBuf = new byte[10]; try { while ((len = document.read(tmpBuf, 0, 10)) >= 0) { documentBackup.write(tmpBuf, 0, len); m.update(tmpBuf); } } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } byte[] hmac = m.doFinal(); // mac contains the byte-Array with the computed MAC return new SequenceInputStream(new ByteArrayInputStream(hmac), new ByteArrayInputStream(documentBackup.toByteArray())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] hmacSha1(byte[] value) {\n try {\n // Get an hmac_sha1 key from the raw key bytes\n byte[] keyBytes = secretkey;\n SecretKeySpec signingKey = new SecretKeySpec(keyBytes, \"HmacSHA1\");\n // Get an hmac_sha1 Mac instance and initialize with the signing key\n Mac mac = Mac.getInstance(\"HmacSHA1\");\n mac.init(signingKey);\n // Compute the hmac on input data bytes\n byte[] rawHmac = mac.doFinal(value);\n // hmacLenght = (byte) rawHmac.length;\n // Sh.d(\"h: \"+rawHmac.length);\n // Convert raw bytes to Hex\n/* byte[] hexBytes = new Hex().encode(rawHmac);\n // Covert array of Hex bytes to a String\n return new String(hexBytes, ENCODING);*/\n return rawHmac;\n //todo changed ^\n } catch (Exception e) {\n Sh.d(\"hmac exc :\"+e.getMessage());\n throw new RuntimeException(e);\n }\n }", "@Test\n public void testCreateHmacSha1() throws Exception {\n Mac macAlgorithm = Mac.getInstance(MAC_ALGORITHM_STRING);\n macAlgorithm.init(new SecretKeySpec(K_AUT, MAC_ALGORITHM_STRING));\n byte[] mac = macAlgorithm.doFinal(MAC_INPUT);\n assertFalse(Arrays.equals(MAC_INPUT, mac));\n }", "public String hmacSha1(String value) {\n try {\n // Get an hmac_sha1 key from the raw key bytes\n byte[] keyBytes = secretkey;\n SecretKeySpec signingKey = new SecretKeySpec(keyBytes, \"HmacSHA1\");\n // Get an hmac_sha1 Mac instance and initialize with the signing key\n Mac mac = Mac.getInstance(\"HmacSHA1\");\n mac.init(signingKey);\n // Compute the hmac on input data bytes\n byte[] rawHmac = mac.doFinal(fromBase64(value));\n hmacLenght = (byte) rawHmac.length;\n // Sh.d(\"h: \"+rawHmac.length);\n // Convert raw bytes to Hex\n/* byte[] hexBytes = new Hex().encode(rawHmac);\n // Covert array of Hex bytes to a String\n return new String(hexBytes, ENCODING);*/\n return ivmacToString(rawHmac);\n } catch (Exception e) {\n Sh.d(\"hmac exc :\"+e.getMessage());\n throw new RuntimeException(e);\n }\n }", "private static byte[] hmac_sha1(String crypto, byte[] keyBytes, byte[] text) throws GeneralSecurityException {\n Mac hmac;\n hmac = Mac.getInstance(crypto);\n SecretKeySpec macKey = new SecretKeySpec(keyBytes, \"RAW\");\n hmac.init(macKey);\n return hmac.doFinal(text);\n }", "private String calculateHMAC(String hmacKey, String signingString) throws GeneralSecurityException, UnsupportedEncodingException {\n\t\tSecretKeySpec keySpec = new SecretKeySpec(hmacKey.getBytes(), \"HmacSHA1\");\n\t\tMac mac = Mac.getInstance(\"HmacSHA1\");\n\t\tmac.init(keySpec);\n\n\t\tbyte[] result = mac.doFinal(signingString.getBytes(\"UTF-8\"));\n\t\treturn Base64.encodeBase64String(result);\n\t}", "private synchronized byte[] createHmac(byte[] content) {\n\t\treturn hmac.doFinal(content);\n\t}", "public void testEncryptionSHA1SymmetricBytes() throws Exception {\n WSSecEncrypt builder = new WSSecEncrypt();\n builder.setKeyIdentifierType(WSConstants.ENCRYPTED_KEY_SHA1_IDENTIFIER);\n builder.setEphemeralKey(keyData);\n builder.setEncryptSymmKey(false);\n builder.setUseKeyIdentifier(true);\n \n LOG.info(\"Before Encrypting EncryptedKeySHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc); \n Document encryptedDoc = builder.build(doc, crypto, secHeader);\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Encrypted message with ENCRYPTED_KEY_SHA1_IDENTIFIER:\");\n LOG.debug(outputString);\n }\n assertTrue(outputString.indexOf(\"#EncryptedKeySHA1\") != -1);\n \n LOG.info(\"After Encrypting EncryptedKeySHA1....\");\n verify(encryptedDoc);\n }", "public static byte[] encryptHmacSHA1(final byte[] data, final byte[] key) {\n return hmacTemplate(data, key, \"HmacSHA1\");\n }", "public void testEncryptionSHA1Symmetric() throws Exception {\n WSSecEncrypt builder = new WSSecEncrypt();\n builder.setKeyIdentifierType(WSConstants.ENCRYPTED_KEY_SHA1_IDENTIFIER);\n builder.setSymmetricKey(key);\n builder.setEncryptSymmKey(false);\n builder.setUseKeyIdentifier(true);\n \n LOG.info(\"Before Encrypting EncryptedKeySHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc); \n Document encryptedDoc = builder.build(doc, crypto, secHeader);\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Encrypted message with ENCRYPTED_KEY_SHA1_IDENTIFIER:\");\n LOG.debug(outputString);\n }\n assertTrue(outputString.indexOf(\"#EncryptedKeySHA1\") != -1);\n \n LOG.info(\"After Encrypting EncryptedKeySHA1....\");\n verify(encryptedDoc);\n }", "public static HashDescriptionWriter sha1Writer() {\n return hashWriter(Hashing.sha1());\n }", "public void testX509EncryptionSHA1() throws Exception {\n WSSecEncrypt builder = new WSSecEncrypt();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n builder.setKeyIdentifierType(WSConstants.ENCRYPTED_KEY_SHA1_IDENTIFIER);\n builder.setUseKeyIdentifier(true);\n \n LOG.info(\"Before Encrypting EncryptedKeySHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc); \n Document encryptedDoc = builder.build(doc, crypto, secHeader);\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Encrypted message with ENCRYPTED_KEY_SHA1_IDENTIFIER:\");\n LOG.debug(outputString);\n }\n assertTrue(outputString.indexOf(\"#EncryptedKeySHA1\") != -1);\n \n LOG.info(\"After Encrypting EncryptedKeySHA1....\");\n verify(encryptedDoc);\n }", "public static byte[] createSignature(String key, String data)\n throws java.security.SignatureException {\n // String result;\n byte[] rawHmac;\n try {\n // get an hmac_sha1 key from the raw key bytes\n SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(),\n HMAC_SHA1_ALGORITHM);\n\n // get an hmac_sha1 Mac instance and initialize with the signing key\n Mac mac = Mac.getInstance(HMAC_SHA1_ALGORITHM);\n mac.init(signingKey);\n\n // compute the hmac on input data bytes\n rawHmac = mac.doFinal(data.getBytes());\n\n // base64-encode the hmac\n // result = Base64.Encoder.Encoding.EncodeBase64(rawHmac);\n\n } catch (Exception e) {\n throw new SignatureException(\"Failed to generate HMAC : \"\n + e.getMessage());\n }\n return rawHmac;\n }", "private static String generateSignature(String data, String key) throws SignatureException {\n String result;\n try {\n // get an hmac_sha1 key from the raw key bytes\n SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), \"HmacSHA1\");\n // get an hmac_sha1 Mac instance and initialize with the signing key\n Mac mac = Mac.getInstance(\"HmacSHA1\");\n mac.init(signingKey);\n // compute the hmac on input data bytes\n byte[] rawHmac = mac.doFinal(data.getBytes(StandardCharsets.UTF_8));\n result = Base64.encodeBase64String(rawHmac);\n }\n catch (Exception e) {\n throw new SignatureException(\"Failed to generate HMAC : \" + e.getMessage());\n }\n return result;\n }", "public void initHmacOperations() throws NoSuchAlgorithmException, Base64DecodingException, DecoderException {\n byte[] macKeyBytes = new byte[40];\n this.randomize.nextBytes(macKeyBytes);\n this.macKey = new SecretKeySpec(macKeyBytes, \"HmacSHA1\");\n this.macSignature = Mac.getInstance(\"HmacSHA1\");\n }", "public void testX509SignatureThumb() throws Exception {\n WSSecSignature builder = new WSSecSignature();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);\n // builder.setUserInfo(\"john\", \"keypass\");\n LOG.info(\"Before Signing ThumbprintSHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n \n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc);\n\n Document signedDoc = builder.build(doc, crypto, secHeader);\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Signed message with ThumbprintSHA1 key identifier:\");\n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);\n LOG.debug(outputString);\n }\n LOG.info(\"After Signing ThumbprintSHA1....\");\n verify(signedDoc);\n }", "public void testEncryptionSHA1SymmetricBytesHandler() throws Exception {\n final WSSConfig cfg = WSSConfig.getNewInstance();\n final RequestData reqData = new RequestData();\n reqData.setWssConfig(cfg);\n java.util.Map messageContext = new java.util.TreeMap();\n messageContext.put(WSHandlerConstants.ENC_SYM_ENC_KEY, \"false\");\n messageContext.put(WSHandlerConstants.ENC_KEY_ID, \"EncryptedKeySHA1\");\n messageContext.put(WSHandlerConstants.PW_CALLBACK_REF, this);\n reqData.setMsgContext(messageContext);\n reqData.setUsername(\"\");\n \n final java.util.Vector actions = new java.util.Vector();\n actions.add(new Integer(WSConstants.ENCR));\n \n Document doc = unsignedEnvelope.getAsDocument();\n MyHandler handler = new MyHandler();\n handler.send(\n WSConstants.ENCR, \n doc, \n reqData, \n actions,\n true\n );\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(outputString);\n }\n \n verify(doc);\n }", "public static byte[] generateSHA1(byte[] bytes) {\n byte[] encryted = null;\n try {\n MessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n digest.reset();\n digest.update(bytes);\n encryted = digest.digest();\n\n } catch (Exception e) {\n Logger.e(\"Error generating SHA1. \" + e.getMessage());\n }\n return encryted;\n }", "@Test\n public void testCreateSha1() throws Exception {\n MessageDigest sha1 = MessageDigest.getInstance(MASTER_KEY_GENERATION_ALG);\n byte[] sha1Result = sha1.digest(SHA_1_INPUT);\n assertFalse(Arrays.equals(SHA_1_INPUT, sha1Result));\n }", "public static String buildHmacSignature(String privateKey, String inputToSign) {\n String lSignature = \"None\";\n try {\n Mac mac = Mac.getInstance(\"HmacSHA1\");\n SecretKeySpec secret = new SecretKeySpec(privateKey.getBytes(), \"HmacSHA1\");\n mac.init(secret);\n\n byte[] lDigest = mac.doFinal(inputToSign.getBytes());\n BigInteger lHash = new BigInteger(1, lDigest);\n lSignature = lHash.toString(16);\n if ((lSignature.length() % 2) != 0) {\n lSignature = \"0\" + lSignature;\n }\n } catch (NoSuchAlgorithmException lEx) {\n throw new RuntimeException(\"Problems calculating HMAC\", lEx);\n } catch (InvalidKeyException lEx) {\n throw new RuntimeException(\"Problems calculating HMAC\", lEx);\n }\n return lSignature;\n }", "public String calculateSignature(String str) {\n try {\n String signingKey = getSigningKey();\n byte[] bytes = str.getBytes(\"UTF8\");\n SecretKeySpec secretKeySpec = new SecretKeySpec(signingKey.getBytes(\"UTF8\"), \"HmacSHA1\");\n Mac instance = Mac.getInstance(\"HmacSHA1\");\n instance.init(secretKeySpec);\n byte[] doFinal = instance.doFinal(bytes);\n return ByteString.of(doFinal, 0, doFinal.length).base64();\n } catch (InvalidKeyException e) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e);\n return \"\";\n } catch (NoSuchAlgorithmException e2) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e2);\n return \"\";\n } catch (UnsupportedEncodingException e3) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e3);\n return \"\";\n }\n }", "public static String calculateRFC2104HMAC(byte[] data, byte[] key,\n\t\t\tString algo) throws java.security.SignatureException {\n\n\t\tassert (null != key);\n\t\tassert (null != data);\n\n\t\tString result;\n\t\ttry {\n\n\t\t\t// get an hmac_sha1 key from the raw key bytes\n\t\t\tSecretKeySpec signingKey = new SecretKeySpec(key, algo);\n\n\t\t\t// get an hmac_sha1 Mac instance and initialize with the signing key\n\t\t\tMac mac = Mac.getInstance(algo);\n\t\t\tmac.init(signingKey);\n\n\t\t\t// compute the hmac on input data bytes\n\t\t\tbyte[] rawHmac = mac.doFinal(data);\n\n\t\t\t// base64-encode the hmac\n\t\t\tbyte[] b64 = Base64.encodeBase64(rawHmac);\n\n\t\t\tresult = new String(b64);\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new SignatureException(\"Failed to generate HMAC : \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\treturn result;\n\t}", "public byte[] ComputeHmac(String mode, byte[] text) {\r\n HMac hmac;\r\n\t\tif(mode.equalsIgnoreCase(\"sha1\")){\r\n\t\t\tSHA1Digest digest = new SHA1Digest();\r\n\t\t\thmac=new HMac(digest);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSHA256Digest digest = new SHA256Digest();\r\n\t\t\thmac=new HMac(digest);\r\n\t\t}\r\n\t\tbyte[] resBuf=new byte[hmac.getMacSize()];\r\n\t\thmac.init(new KeyParameter(KEY));\r\n\t\thmac.update(text,0,text.length);\r\n\t\thmac.doFinal(resBuf,0);\r\n\t\treturn resBuf;\r\n }", "public static byte[] encryptSHA1(final byte[] data) {\n return hashTemplate(data, \"SHA-1\");\n }", "private String signature() {\n\t\t++this.nonce;\n\t\tString message = new String(this.nonce + this.username + this.apiKey);\n\t\tMac hmac = null;\n\n\t\ttry {\n\t\t\thmac = Mac.getInstance(\"HmacSHA256\");\n\t\t\tSecretKeySpec secret_key = new SecretKeySpec(\n\t\t\t\t\t((String) this.apiSecret).getBytes(\"UTF-8\"), \"HmacSHA256\");\n\t\t\thmac.init(secret_key);\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn String.format(\"%X\",\n\t\t\t\tnew BigInteger(1, hmac.doFinal(message.getBytes())));\n\t}", "@Override\n public String generateSignature(String requestPath, String method, String body, String timestamp) {\n try {\n String prehash = timestamp + method.toUpperCase() + requestPath + body;\n byte[] secretDecoded = Base64.getDecoder().decode(secretKey);\n SecretKeySpec keyspec = new SecretKeySpec(secretDecoded, \"HmacSHA256\");\n Mac sha256 = (Mac) GdaxConstants.SHARED_MAC.clone();\n sha256.init(keyspec);\n return Base64.getEncoder().encodeToString(sha256.doFinal(prehash.getBytes()));\n } catch (CloneNotSupportedException | InvalidKeyException e) {\n e.printStackTrace();\n throw new RuntimeErrorException(new Error(\"Cannot set up authentication headers.\"));\n }\n }", "private void generatePkcs1Sha1Signature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// receive the data that needs to be signed\r\n\t\tshort byteRead = apdu.setIncomingAndReceive();\r\n\t\t// check Lc\r\n\t\t\r\n\t\t\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\tif ((lc != 20) || (byteRead != 20))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t\r\n\t\t\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t// use the correct key\r\n\t\tif (getSignatureType() == NON_REPUDIATION) {\r\n\t\t\t////cipher.init(nonRepPrivateKey, Cipher.MODE_ENCRYPT); // stond al in comments\r\n\t\t\tcipher.init((RSAPrivateCrtKey)nonRepKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\t\r\n\t\tif (getSignatureType() == AUTHENTICATION) {\r\n\t\t\tcipher.init((RSAPrivateCrtKey)authKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\t\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\tJCSystem.beginTransaction();\r\n\t\t////@ open valid(); // auto\r\n\t\t\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as);\r\n\t\t//@ foreachp_remove(messageBuffer, as);\r\n\t\t////@ open transient_byte_array(messageBuffer); // auto\r\n\r\n\t\t// prepare the message buffer to the PKCS#1 (v1.5) structure\r\n\t\tpreparePkcs1ClearText(messageBuffer, ALG_SHA1_PKCS1, lc);\r\n\t\t// copy the SHA1 hash from the APDU to the message buffer\r\n\t\tUtil.arrayCopy(buffer, (short) (ISO7816.OFFSET_CDATA), messageBuffer, (short) (128 - lc), lc);\r\n\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as);\r\n\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t// generate signature\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as1);\r\n\t\t//@ foreachp_remove(messageBuffer, as1);\r\n\t\t////@ open transient_byte_array(messageBuffer); // auto\r\n\t\tcipher.doFinal(messageBuffer, (short) 0, (short) 128, buffer, (short) 0);\r\n\t\t//@ close transient_byte_array(messageBuffer); // todo\r\n\t\t//@ foreachp_unremove(messageBuffer, as1);\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t}", "protected byte[] getHMAC(byte[] Ki, byte[] seqnum, byte[] msg, int start, int len) throws SaslException {\n byte[] seqAndMsg = new byte[4 + len];\n System.arraycopy(seqnum, 0, seqAndMsg, 0, 4);\n System.arraycopy(msg, start, seqAndMsg, 4, len);\n try {\n SecretKey keyKi = new SecretKeySpec(Ki, \"HmacMD5\");\n Mac m = Mac.getInstance(\"HmacMD5\");\n m.init(keyKi);\n m.update(seqAndMsg);\n byte[] hMAC_MD5 = m.doFinal();\n byte macBuffer[] = new byte[10];\n System.arraycopy(hMAC_MD5, 0, macBuffer, 0, 10);\n return macBuffer;\n } catch (InvalidKeyException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid bytes used for \" + \"key of HMAC-MD5 hash.\", e);\n } catch (NoSuchAlgorithmException e) {\n throw new SaslException(\"DIGEST-MD5: Error creating \" + \"instance of MD5 digest algorithm\", e);\n }\n }", "public String constructSignatureBase(String str, String str2) {\n URI create = URI.create(this.url);\n TreeMap queryParams = UrlUtils.getQueryParams(create, true);\n Map<String, String> map = this.postParams;\n if (map != null) {\n queryParams.putAll(map);\n }\n String str3 = this.callback;\n if (str3 != null) {\n queryParams.put(\"oauth_callback\", str3);\n }\n queryParams.put(\"oauth_consumer_key\", this.authConfig.getConsumerKey());\n queryParams.put(\"oauth_nonce\", str);\n queryParams.put(\"oauth_signature_method\", \"HMAC-SHA1\");\n queryParams.put(\"oauth_timestamp\", str2);\n TwitterAuthToken twitterAuthToken = this.authToken;\n if (!(twitterAuthToken == null || twitterAuthToken.token == null)) {\n queryParams.put(\"oauth_token\", this.authToken.token);\n }\n queryParams.put(\"oauth_version\", \"1.0\");\n StringBuilder sb = new StringBuilder();\n sb.append(create.getScheme());\n sb.append(\"://\");\n sb.append(create.getHost());\n sb.append(create.getPath());\n String sb2 = sb.toString();\n StringBuilder sb3 = new StringBuilder();\n sb3.append(this.method.toUpperCase(Locale.ENGLISH));\n sb3.append(Typography.amp);\n sb3.append(UrlUtils.percentEncode(sb2));\n sb3.append(Typography.amp);\n sb3.append(getEncodedQueryParams(queryParams));\n return sb3.toString();\n }", "private byte[] createHash(String message) {\n Key secretKey;\n Mac hMac;\n try {\n secretKey = Keys.readSecretKey(new File(\"./keys/hmac.key\"));\n hMac = Mac.getInstance(secretKey.getAlgorithm());\n hMac.init(secretKey);\n } catch (IOException e) {\n System.out.println(\n \"Failure during signation: Couldn't read \\\"hmac.key\\\" file: \" + e.getMessage());\n return null;\n } catch (NoSuchAlgorithmException e) {\n System.out.println(\"Failure during signation: Invalid algorithm\");\n return null;\n } catch (InvalidKeyException e) {\n System.out.println(\"Failure during signation: InvalidKeyException\");\n return null;\n }\n\n // generate hash\n hMac.update(message.getBytes());\n byte[] hash = hMac.doFinal();\n return hash;\n }", "public String createSha1(File file) throws Exception {\n\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n\t\tInputStream fis = new FileInputStream(file);\n\t\tint n = 0;\n\n\t\tbyte[] buffer = new byte[8192];\n\t\twhile (n != -1) {\n\t\t\tn = fis.read(buffer);\n\t\t\tif (n > 0) {\n\t\t\t\tdigest.update(buffer, 0, n);\n\t\t\t}\n\t\t}\n\t\tfis.close();\n\t\treturn new HexBinaryAdapter().marshal(digest.digest());\n\t}", "public void initHmacOperations(byte[] macKeyBytes) throws NoSuchAlgorithmException, Base64DecodingException, DecoderException {\n this.macKey = new SecretKeySpec(Hex.decodeHex(new String(macKeyBytes).toCharArray()), \"HmacSHA1\");\n this.macSignature = Mac.getInstance(\"HmacSHA1\");\n }", "public void testX509EncryptionThumb() throws Exception {\n WSSecEncrypt builder = new WSSecEncrypt();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);\n \n LOG.info(\"Before Encrypting ThumbprintSHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc); \n Document encryptedDoc = builder.build(doc, crypto, secHeader);\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Encrypted message with THUMBPRINT_IDENTIFIER:\");\n LOG.debug(outputString);\n }\n assertTrue(outputString.indexOf(\"#ThumbprintSHA1\") != -1);\n \n LOG.info(\"After Encrypting ThumbprintSHA1....\");\n verify(encryptedDoc);\n }", "public static String calculateRfc2104Hmac(String data, String key) throws SignatureException {\n String result;\n try {\n // get an hmac_sha1 key from the raw key bytes\n SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(), HMAC_SHA1_ALGORITHM);\n // get an hmac_sha1 Mac instance and initialize with the signing key\n Mac mac = Mac.getInstance(HMAC_SHA1_ALGORITHM);\n mac.init(signingKey);\n // compute the hmac on input data bytes\n byte[] rawHmac = mac.doFinal(data.getBytes());\n // base64-encode the hmac\n result = TextUtils.base64Encode(rawHmac);\n } catch (Exception e) {\n throw new SignatureException(\"Failed to generate HMAC: \" + e.getMessage());\n }\n\n return result;\n }", "private byte[] createSignatureBase() {\n final Charset utf8 = StandardCharsets.UTF_8;\n byte[] urlBytes = url.getBytes(utf8);\n byte[] timeStampBytes = Long.toString(timestamp).getBytes(utf8);\n byte[] secretBytes = secret.getBytes(utf8);\n\n // concatenate\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n try {\n stream.write(urlBytes);\n stream.write(body);\n stream.write(timeStampBytes);\n stream.write(secretBytes);\n } catch (IOException ex){\n logger.error(\"Could not create signature base\", ex);\n return new byte[0];\n }\n\n return stream.toByteArray();\n }", "public static byte[] computeSHA1HMac(String data, String cookie) throws GeneralSecurityException {\n byte[] hash;\n MessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n hash = digest.digest(cookie.getBytes());\n byte[] hmacResult;\n Mac hm;\n hm = Mac.getInstance(\"HMacSHA1\");\n Key k1 = new SecretKeySpec(hash, 0, hash.length, \"HMacSHA1\");\n hm.init(k1);\n return hm.doFinal(data.getBytes());\n }", "public static String buildHmacSha256SignedJWT(String sharedSecretString) throws JOSEException {\n\t\tJWSObject jwsObject = new JWSObject(new JWSHeader(JWSAlgorithm.HS256), new Payload(\"Hello world!\"));\n\n\t\t// create JWS header with HMAC-SHA256 algorithm.\n\t\tjwsObject.sign(new MACSigner(sharedSecretString));\n\n\t\t// serialize into base64-encoded text.\n\t\tString jwtInText = jwsObject.serialize();\n\n\t\t// print the value of the JWT.\n\t\tSystem.out.println(jwtInText);\n\n\t\treturn jwtInText;\n\t}", "public static String generateSHA1toString(String str) {\n try {\n byte[] datos = generateSHA1(str.getBytes());\n return byteArrayToHexString(datos);\n } catch (Exception e) {\n Logger.e(\"Error generating SHA1. \" + e.getMessage());\n return \"\";\n }\n }", "public static String sha1(String s) {\n MessageDigest digest = createDigest(\"SHA-1\");\n byte[] result = digest.digest(s.getBytes(Charset.forName(\"UTF-8\")));\n return toBase64(result);\n }", "@Override\r\n public int hashCode() {\r\n return doc1.hashCode() + doc2.hashCode();\r\n }", "String sendDocument(String uniqueId, String type, byte[] document) throws XRoadServiceConsumptionException;", "public static String encryptHmacSHA1ToString(final byte[] data, final byte[] key) {\n return bytes2HexString(encryptHmacSHA1(data, key));\n }", "public static String toSHA1(String filename){\n\t\tMessageDigest md=null;\n\t\ttry{\n\t\t\tmd = MessageDigest.getInstance(\"SHA-1\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tFileInputStream in = new FileInputStream(filename);\n\t\t\tBufferedInputStream buffIn = new BufferedInputStream(in);\n\t\t\tDigestInputStream dis = new DigestInputStream(buffIn, md);\n\t\t\t\n\t\t\tFile f = new File(filename);\n\t\t\tLong fileSize = f.length();\n\t\t\t\n\t\t\tString blob = \"blob \" + fileSize.toString() + '\\0';\n\t\t\tmd.update(blob.getBytes());\n\t\t\t\t\t\t\n\t\t\t// read the file and update the hash calculation\n while (dis.read() != -1);\n\n // get the hash value as byte array\n byte[] hash = md.digest();\n\n return byteArray2Hex(hash);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t\treturn \"\";\n\t}", "public final void testSHA1AgainstMessageDigest() throws UnsupportedEncodingException,\n NoSuchAlgorithmException {\n final String[] inputs = {\n \"password\",\n \"saranghae\",\n \"aoeusnthaoeusnthaoeusnth \\0 12345098765432109876_!\"\n };\n \n final MessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n for (final String input : inputs) {\n final byte[] inputBytes = input.getBytes(\"US-ASCII\");\n \n final byte[] mdBytes = digest.digest(inputBytes);\n final byte[] ourBytes = NativeCrypto.sha1(inputBytes);\n assertTrue(\"MessageDigest hash is the same as NativeCrypto SHA-1 hash\",\n Arrays.equals(ourBytes, mdBytes));\n }\n }", "byte[] digest();", "public void appendHmac(Hmacs alg)\n\t{\n\t\tappendAlgorithm(hmacAlgs, alg);\n\t}", "public static byte[] toHMac(String source, String secretKey) {\r\n byte[] result = null;\r\n \r\n try {\r\n // Create the HMAC/SHA1 key\r\n SecretKeySpec signingKey = new SecretKeySpec(secretKey.getBytes(),\r\n \"HmacSHA1\");\r\n \r\n // Create the message authentication code (MAC)\r\n Mac mac = Mac.getInstance(\"HmacSHA1\");\r\n mac.init(signingKey);\r\n \r\n // Compute the HMAC value\r\n result = mac.doFinal(source.getBytes());\r\n } catch (NoSuchAlgorithmException nsae) {\r\n throw new RuntimeException(\r\n \"Could not find the SHA-1 algorithm. HMac conversion failed.\",\r\n nsae);\r\n } catch (InvalidKeyException ike) {\r\n throw new RuntimeException(\r\n \"Invalid key exception detected. HMac conversion failed.\",\r\n ike);\r\n }\r\n \r\n return result;\r\n }", "@Override\n public String createSignature(final BreinConfig config, final Map<String, Object> requestData) {\n final long unixTimestamp = BreinMapUtil.getNestedValue(requestData, UNIX_TIMESTAMP_FIELD);\n\n final String message = String.format(\"%d\", unixTimestamp);\n return BreinUtil.generateSignature(message, config.getSecret());\n }", "public byte[] sign(byte[] digest, int token, String pin) \n throws SignedDocException;", "public HMACInputStream(String digest, byte[] key, InputStream in){\n _HMACInputStream(digest,key,in);\n }", "@Test\n public void testHmacSha1() throws Exception {\n\n }", "private static String sign(String data, String key)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMac mac = Mac.getInstance(\"HmacSHA1\");\n\t\t\t\tmac.init(new SecretKeySpec(key.getBytes(), \"HmacSHA1\"));\n\t\t\t\treturn Base64.encodeBytes(mac.doFinal(data.getBytes(\"UTF-8\")));\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tthrow new RuntimeException(new SignatureException(\"Failed to generate signature: \" + e.getMessage(), e));\n\t\t\t}\n\t\t}", "public void testDoubleX509SignatureThumb() throws Exception {\n WSSecSignature builder = new WSSecSignature();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n // builder.setUserInfo(\"john\", \"keypass\");\n builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER); \n Document doc = unsignedEnvelope.getAsDocument();\n \n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc);\n\n Document signedDoc = builder.build(doc, crypto, secHeader);\n Document signedDoc1 = builder.build(signedDoc, crypto, secHeader);\n verify(signedDoc1);\n }", "private static byte[] hmacTemplate(final byte[] data,\n final byte[] key,\n final String algorithm) {\n if (data == null || data.length == 0 || key == null || key.length == 0) return null;\n try {\n SecretKeySpec secretKey = new SecretKeySpec(key, algorithm);\n Mac mac = Mac.getInstance(algorithm);\n mac.init(secretKey);\n return mac.doFinal(data);\n } catch (InvalidKeyException | NoSuchAlgorithmException e) {\n e.printStackTrace();\n return null;\n }\n }", "ByteArrayIndex createByteArrayIndex();", "public HMACInputStream(String digest,String key,InputStream out){\n try {\n\t md=MessageDigest.getInstance(digest);\n\t _HMACInputStream(digest,md.digest(key.getBytes()),out);\n\t \t\n } catch (java.lang.Exception e){\n\t throw new InternalError(e.toString());\n }\n }", "byte[] getDigest();", "static String sha1(Object... vals) {\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-1\");\n for (Object val : vals) {\n if (val instanceof byte[]) {\n md.update((byte[]) val);\n } else if (val instanceof String) {\n md.update(((String) val).getBytes(StandardCharsets.UTF_8));\n } else {\n throw new IllegalArgumentException(\"improper type to sha1\");\n }\n }\n Formatter result = new Formatter();\n for (byte b : md.digest()) {\n result.format(\"%02x\", b);\n }\n return result.toString();\n } catch (NoSuchAlgorithmException excp) {\n throw new IllegalArgumentException(\"System does not support SHA-1\");\n }\n }", "public String constructAuthorizationHeader(String str, String str2, String str3) {\n StringBuilder sb = new StringBuilder(\"OAuth\");\n appendParameter(sb, \"oauth_callback\", this.callback);\n appendParameter(sb, \"oauth_consumer_key\", this.authConfig.getConsumerKey());\n appendParameter(sb, \"oauth_nonce\", str);\n appendParameter(sb, \"oauth_signature\", str3);\n appendParameter(sb, \"oauth_signature_method\", \"HMAC-SHA1\");\n appendParameter(sb, \"oauth_timestamp\", str2);\n TwitterAuthToken twitterAuthToken = this.authToken;\n appendParameter(sb, \"oauth_token\", twitterAuthToken != null ? twitterAuthToken.token : null);\n appendParameter(sb, \"oauth_version\", \"1.0\");\n return sb.substring(0, sb.length() - 1);\n }", "public static String encryptHmacSHA1ToString(final String data, final String key) {\n if (data == null || data.length() == 0 || key == null || key.length() == 0) return \"\";\n return encryptHmacSHA1ToString(data.getBytes(), key.getBytes());\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "@Override\n public String digestParams(RestInvocation restInvocation) {\n Params params = Params.of();\n restInvocation.getParamsMap().get(FormParam.class).asHttpHeaders().entrySet().stream()\n .filter(e -> !e.getKey().equalsIgnoreCase(\"signature\"))\n .forEach(e -> params.add(e.getKey(), e.getValue()));\n\n // Parse Query String\n byte[] queryString = params.asQueryString().trim().getBytes(UTF8);\n\n // Create And Return Signature\n return hex(getMac().doFinal(queryString));\n }", "@Override\n\tpublic Document signDocument(Document doc, PrivateKey privateKey, Certificate cert) throws XMLSecurityException {\n\t\tElement rootEl = doc.getDocumentElement();\n\t\tcom.sun.org.apache.xml.internal.security.Init.init();\n\t\tXMLSignature sig = new XMLSignature(doc, null, XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1);\n\n\t\tTransforms transform = new Transforms(doc);\n\n\t\ttransform.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE);\n\n\t\ttransform.addTransform(Transforms.TRANSFORM_C14N11_WITH_COMMENTS);\n\n\t\tsig.addDocument(\"\", transform, MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1);\n\n\t\tsig.addKeyInfo(cert.getPublicKey());\n\t\tsig.addKeyInfo((X509Certificate) cert);\n\n\t\trootEl.appendChild(sig.getElement());\n\t\tsig.sign(privateKey);\n\t\treturn doc;\n\n\t}", "public static String SHA1(String string) throws XLWrapException {\n MessageDigest md;\n try {\n md = MessageDigest.getInstance(\"SHA-1\");\n } catch (NoSuchAlgorithmException e) {\n throw new XLWrapException(\"SHA-1 message digest is not available.\");\n }\n byte[] data = new byte[40];\n md.update(string.getBytes());\n data = md.digest();\n StringBuffer buf = new StringBuffer();\n for (int i = 0; i < data.length; i++) {\n int halfbyte = (data[i] >>> 4) & 0x0F;\n int two_halfs = 0;\n do {\n if ((0 <= halfbyte) && (halfbyte <= 9)) buf.append((char) ('0' + halfbyte)); else buf.append((char) ('a' + (halfbyte - 10)));\n halfbyte = data[i] & 0x0F;\n } while (two_halfs++ < 1);\n }\n return buf.toString();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtCadena = new javax.swing.JTextField();\n btnSHA1 = new javax.swing.JButton();\n txtSHA1 = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n btnSHA1.setText(\"SHA-1\");\n btnSHA1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSHA1ActionPerformed(evt);\n }\n });\n\n txtSHA1.setEditable(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(156, 156, 156)\n .addComponent(btnSHA1)\n .addGap(0, 171, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtSHA1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(txtCadena))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(txtCadena, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSHA1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtSHA1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public String getSHA(String input) {\n byte[] messageDigest = md.digest(input.getBytes());\n String padding = \"00000000000000000000000000000000\";\n String returnValue;\n\n // Convert byte array into signum representation\n BigInteger no = new BigInteger(1, messageDigest);\n\n // Convert message digest into hex value\n String hashtext = no.toString(16);\n\n // pad with zeros of not long enough\n if (hashtext.length() < 32) {\n returnValue = padding.substring(0, 32-hashtext.length()) + hashtext;\n } else {\n returnValue = hashtext;\n }\n\n return returnValue;\n }", "private static String m29107b(byte[] bArr) throws Exception {\n Mac instance = Mac.getInstance(\"HmacSHA1\");\n instance.init(new SecretKeySpec(\"d6fc3a4a06adbde89223bvefedc24fecde188aaa9161\".getBytes(), instance.getAlgorithm()));\n return C6797b.encodeToString(instance.doFinal(bArr), 2);\n }", "public static byte[] transformHmacKey(byte[] digest, byte[] transform) {\n MessageDigest md = Encryption.getSha512MessageDigestInstance();\n md.update(transform);\n return md.digest(digest);\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] generateSignature()\n {\n if (!forSigning)\n {\n throw new IllegalStateException(\"PairingDigestSigner not initialised for signature generation.\");\n }\n\n byte[] hash = new byte[digest.getDigestSize()];\n digest.doFinal(hash, 0);\n\n Element[] sig = pairingSigner.generateSignature(hash);\n\n try {\n return pairingSigner.derEncode(sig);\n } catch (IOException e) {\n throw new IllegalStateException(\"unable to encode signature\");\n }\n }", "public static String getOAuthSignature(String restAction, String url, ParameterMap params) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException{\r\n\t\t\r\n\r\n\t\tString parameters = getParametersString(params);\r\n\t\tString signature;\r\n\t\t\r\n\t\tsignature = restAction+\"&\"+URLEncoder.encode(url, NetflixUtils.ENCODING_UTF8)+\"&\"+URLEncoder.encode(parameters, NetflixUtils.ENCODING_UTF8);\r\n\r\n\t\tString keyString = NetflixConfig.CONSUMER_SECRET + '&';\r\n\t\tbyte[] keyBytes = keyString.getBytes(NetflixUtils.ENCODING_UTF8);\r\n\r\n\t\tSecretKey key = new SecretKeySpec(keyBytes, HMACSHA1_NAME);\r\n\t\tMac mac = Mac.getInstance(HMACSHA1_NAME);\r\n\t\tmac.init(key);\r\n\r\n\t\tbyte[] text = signature.getBytes(NetflixUtils.ENCODING_UTF8);\r\n\r\n\t\tbyte[] result = mac.doFinal(text);\r\n\t\tString sign = new String(Base64.encodeBase64(result));\r\n\r\n\t\t//we don't URL encode the signature because it is encoded by the Datalib process\r\n\t\tsignature = sign; //URLEncoder.encode(sign, NetflixUtils.ENCODING_UTF8);\r\n\r\n\t\treturn signature;\r\n\t}", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key addNewKey();", "ISModifySignature createISModifySignature();", "public SignatureAlgorithm(Document paramDocument, String paramString, int paramInt) throws XMLSecurityException {\n/* 92 */ super(paramDocument, paramString);\n/* 93 */ this.algorithmURI = paramString;\n/* */ \n/* 95 */ this.signatureAlgorithm = getSignatureAlgorithmSpi(paramString);\n/* 96 */ this.signatureAlgorithm.engineGetContextFromElement(this.constructionElement);\n/* */ \n/* 98 */ this.signatureAlgorithm.engineSetHMACOutputLength(paramInt);\n/* 99 */ ((IntegrityHmac)this.signatureAlgorithm).engineAddContextToElement(this.constructionElement);\n/* */ }", "public long getSha2();", "public static String create(final String key,\n final String verb,\n final String contentMD5,\n final String contentType,\n final String date,\n final String path) {\n\n final String input = verb + \"\\n\" +\n contentMD5 + \"\\n\" +\n contentType + \"\\n\" +\n date + \"\\n\" +\n path;\n\n // sign with SHA-1\n final byte[] raw = sign(key, input);\n\n // encode via Base64\n return new String(Base64Util.encode(raw));\n }", "private byte[] RIPEMD160(byte[] tobeHashed){\r\n\tRIPEMD160Digest digester = new RIPEMD160Digest();\r\n\tbyte[] retValue=new byte[digester.getDigestSize()]; \r\n\tdigester.update(tobeHashed, 0, tobeHashed.length); \r\n\tdigester.doFinal(retValue, 0);\t \r\n\tbyte[] version = new byte[]{0x00};\r\n\treturn concateByteArray(version,retValue);\t\r\n}", "private void generatePkcs1Md5Signature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// receive the data that needs to be signed\r\n\t\tshort byteRead = apdu.setIncomingAndReceive();\r\n\t\t// check Lc\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\tif ((lc != 16) || (byteRead != 16))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t// use the correct key\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t\r\n\t\tif (getSignatureType() == NON_REPUDIATION) {\t\t\r\n\t\t\tcipher.init((RSAPrivateCrtKey)nonRepKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\tif (getSignatureType() == AUTHENTICATION) {\r\n\t\t\tcipher.init((RSAPrivateCrtKey)authKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\tJCSystem.beginTransaction();\r\n\t\t\r\n\t\t////@ open valid(); // todo\r\n\t\t\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as);\r\n\t\t//@ foreachp_remove(messageBuffer, as);\r\n\t\t////@ open transient_byte_array(messageBuffer); // auto\r\n\t\t\r\n\t\t// prepare the message buffer to the PKCS#1 (v1.5) structure\r\n\t\t////@ open [1/2]valid();\r\n\t\tpreparePkcs1ClearText(messageBuffer, ALG_MD5_PKCS1, lc);\r\n\t\t// copy the MD5 hash from the APDU to the message buffer\r\n\t\tUtil.arrayCopy(buffer, (short) (ISO7816.OFFSET_CDATA), messageBuffer, (short) (128 - lc), lc);\r\n\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as);\r\n\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t// generate signature\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as1);\r\n\t\t//@ foreachp_remove(messageBuffer, as1);\r\n\t\t//@ open transient_byte_array(messageBuffer);\r\n\t\tcipher.doFinal(messageBuffer, (short) 0, (short) 128, buffer, (short) 0);\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as1);\r\n\r\n\t\t////@ close [1/2]valid(); // auto\r\n\r\n\r\n\t}", "DocumentContent createDocumentContent(byte[] bytes);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "Entry<StatusType, String> verifyInternalSignature(final Document document);", "public static String computeSHA(byte[] filebytes) throws NoSuchAlgorithmException {\r\n\t\tMessageDigest messageDigest = MessageDigest.getInstance(\"SHA-1\");\r\n\t\tbyte[] hash = messageDigest.digest(filebytes);\r\n\t\t\r\n\t\tFormatter formatter = new Formatter();\r\n\t\t\r\n\t\tfor (byte b : hash) {\r\n\t\t\tformatter.format(\"%02x\", b);\r\n\t\t}\r\n\t\t\r\n\t\treturn formatter.toString();\r\n\t}", "public void indexCreate()\n {\n try{\n Directory dir = FSDirectory.open(Paths.get(\"indice/\"));\n Analyzer analyzer = new StandardAnalyzer();\n IndexWriterConfig iwc = new IndexWriterConfig(analyzer);\n iwc.setOpenMode(OpenMode.CREATE);\n IndexWriter writer = new IndexWriter(dir,iwc);\n MongoConnection mongo = MongoConnection.getMongo();\n mongo.OpenMongoClient();\n DBCursor cursor = mongo.getTweets();\n Document doc = null;\n\n while (cursor.hasNext()) {\n DBObject cur = cursor.next();\n if (cur.get(\"retweet\").toString().equals(\"false\")) {\n doc = new Document();\n doc.add(new StringField(\"id\", cur.get(\"_id\").toString(), Field.Store.YES));\n doc.add(new TextField(\"text\", cur.get(\"text\").toString(), Field.Store.YES));\n doc.add(new StringField(\"analysis\", cur.get(\"analysis\").toString(), Field.Store.YES));\n //doc.add(new StringField(\"finalCountry\",cur.get(\"finalCountry\").toString(),Field.Store.YES));\n doc.add(new StringField(\"userScreenName\", cur.get(\"userScreenName\").toString(), Field.Store.YES));\n doc.add(new StringField(\"userFollowersCount\", cur.get(\"userFollowersCount\").toString(), Field.Store.YES));\n doc.add(new StringField(\"favoriteCount\", cur.get(\"favoriteCount\").toString(), Field.Store.YES));\n\n if (writer.getConfig().getOpenMode() == OpenMode.CREATE) {\n System.out.println(\"Indexando el tweet: \" + doc.get(\"text\") + \"\\n\");\n writer.addDocument(doc);\n System.out.println(doc);\n } else {\n System.out.println(\"Actualizando el tweet: \" + doc.get(\"text\") + \"\\n\");\n writer.updateDocument(new Term(\"text\" + cur.get(\"text\")), doc);\n System.out.println(doc);\n }\n }\n }\n cursor.close();\n writer.close();\n }\n catch(IOException ioe){\n System.out.println(\" Error en \"+ ioe.getClass() + \"\\n mensaje: \" + ioe.getMessage());\n }\n }", "public wsihash create(long wsihashId);", "public static String GetHash(String input)\n {\n String hash = DigestUtils.sha1Hex(input);\n System.out.println(hash);\n return hash;\n }", "public static byte[] encryptHmacMD5(final byte[] data, final byte[] key) {\n return hmacTemplate(data, key, \"HmacMD5\");\n }", "public byte[] macAlgorithm(SecretKey encryptionkey, byte[] message) throws Exception\n {\n Mac mac = Mac.getInstance(\"HmacMD5\");\t\t// MAC mode\n mac.init(encryptionkey);\t\t// Initialize mac\n\n byte[] digest = mac.doFinal(message);\t\t// Finish the MAC Operation\n return digest;\n }", "public static byte[] generateHashValue(String plainText, int offset) throws UnsupportedEncodingException {\n\t\t\n\t\tString paddedPlainText = padBitsForHashing(plainText); //Padding the bits.\n\t\tString[] arrayOfPaddeMsg = Divider.divide(paddedPlainText);//Dividing the padded message to messages of size 512bit\n\t\tbyte[] M1 = arrayOfPaddeMsg[0].getBytes();\n\t\tRC4 rc4Utility = new RC4(M1, false);\n\t\tbyte[] state = rc4Utility.KeySchedule(M1);\n\t\tbyte[] StateM1 = rc4Utility.prgaStar(state, offset);//Performing PRGA operation.\n\t\tbyte[] compressedOutput = Compressor.compress(StateM1, arrayOfPaddeMsg,0, false,offset,rc4Utility);\n\t//\tSystem.out.println(\" compressedOutput size :: \"+compressedOutput.length);\n\t\tbyte[] afterFirstOutputStep = ProjectUtility.firstOutputStep(compressedOutput);\n\t//\tSystem.out.println(\" afterFirstOutputStep size :: \"+afterFirstOutputStep.length);\n\t\tbyte[] afterSecondOutputStep = ProjectUtility.secondOutputStep(afterFirstOutputStep);\n\t//\tSystem.out.println(\" afterSecondOutputStep size :: \"+afterSecondOutputStep.length);\n\t\treturn afterSecondOutputStep;\n\n\t}", "public static String hashMac(String text, String secretKey) {\n\n try {\n Key sk = new SecretKeySpec(secretKey.getBytes(), HASH_ALGORITHM);\n Mac mac = Mac.getInstance(sk.getAlgorithm());\n mac.init(sk);\n final byte[] hmac = mac.doFinal(text.getBytes());\n return toHexString(hmac);\n } catch (NoSuchAlgorithmException e1) {\n // throw an exception or pick a different encryption method\n Logger.error(\"error building signature, no such algorithm in device \" + HASH_ALGORITHM);\n } catch (InvalidKeyException e) {\n Logger.error(\"error building signature, invalid key \" + HASH_ALGORITHM);\n }\n return null;\n }", "public String getHmacMD5(String privateKey, String input) throws Exception{\n String algorithm = \"HmacSHA256\";\n String Ret=\"\";\n byte[] keyBytes = Base64.decode(privateKey, Base64.NO_WRAP);\n Key key = new SecretKeySpec(keyBytes, 0, keyBytes.length, algorithm);\n Mac mac = Mac.getInstance(algorithm);\n mac.init(key);\n\n\n\n try {\n\n\n byte[] bytes = mac.doFinal(input.getBytes(\"UTF-8\"));\n\n Ret=Base64.encodeToString(bytes,Base64.URL_SAFE|Base64.NO_WRAP).replace('-','+').replace('_', '/');;\n\n }\n catch(Exception e)\n {\n\n }\n return Ret;\n }", "H1 createH1();", "public SignRequestDocument(final String id, final String name, final int size, final String mimeType, final String signFormat, final String messageDigestAlgorithm, final String params) {\r\n\t\tthis(id, name, size, mimeType, signFormat, messageDigestAlgorithm, params, CRYPTO_OPERATION_SIGN);\r\n\t}", "String getUniqueSignature();", "public static String sha1Hex(String message) throws CheckPasswordException {\n \n \ttry {\n \t\t\n \t\tMessageDigest md = MessageDigest.getInstance(\"SHA-1\");\n \t\tbyte[] digest = md.digest(message.getBytes());\n\n BigInteger bi = new BigInteger(1, digest);\n return String.format(\"%0\" + (digest.length << 1) + \"X\", bi);\n \n \t} catch (NoSuchAlgorithmException e) {\n \t\t// This should never happen; all modern Java versions require the platform to support SHA-1\n \t\tthrow new CheckPasswordException(\"Unable to perform SHA-1 hash, algorithm not found\", CheckPasswordErrorCode.BadConfiguration);\n \t}\n \n }", "private void checkHmac() {\n if (RequestUtils.requestAuthedWithHmac()) {\n throw new RuntimeException(\"HMAC auth not supported for POST requests\");\n }\n }", "public byte[] SHA1(String texto) throws OpenSSL_Exception {\n\t\tString[] comando = new String[]{ \"openssl\" , \"dgst\" , \"-sha1\"};\n\t\tProcess terminal = null;\n\t\ttry { terminal = Runtime.getRuntime().exec(comando); } catch (IOException e) { \n\t\t\tthrow new OpenSSL_Exception(\"No se puede ejecutar el comando en el terminal\");\n\t\t}\n\t\t// --- > Mandamos el texto \n\t\tPrintWriter out = new PrintWriter(terminal.getOutputStream());\n\t\tout.print(texto);\n\t\tout.flush();\n\t\tout.close();\n\t\t// --- > Leemos la salida error del comando\n\t\tBufferedReader errors = new BufferedReader(new InputStreamReader(terminal.getErrorStream()));\n\t\tString linea = \"\" , error = \"\" ;\n\t\ttry { while( (linea = errors.readLine()) != null) error += linea + \"\\n\"; } catch (IOException e) {\n\t\t\tthrow new OpenSSL_Exception(\"No se puede leer el error que ha producido el comando\");\n\t\t}\n\t\t// --- > Si hubo salida error lanzamos al excepcion con el error\n\t\tif(!error.equals(\"\"))throw new OpenSSL_Exception(\"Error al ejecutar el comando:\\n\" + error );\n\t\t// --- > Leemos el resultado obtenido\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(terminal.getInputStream()));\n\t\tString res = \"\";\n\t\ttry { while((linea = in.readLine()) != null) res += linea; } catch (IOException e) {\n\t\t\tthrow new OpenSSL_Exception(\"No se puede leer el resultado que ha producido el comando\");\n\t\t}\n\t\treturn res.getBytes();\n\t}", "public abstract WriteResult writeBlob(User user, Blob blob, byte[] oldDigest);", "public String getHmacMD5(String privateKey, String input) throws Exception {\n String algorithm = \"HmacSHA256\";\n String Ret=\"\";\n byte[] keyBytes = Base64.decode(privateKey, Base64.NO_WRAP);\n Key key = new SecretKeySpec(keyBytes, 0, keyBytes.length, algorithm);\n Mac mac = Mac.getInstance(algorithm);\n mac.init(key);\n\n\n\n try {\n\n\n byte[] bytes = mac.doFinal(input.getBytes(\"UTF-8\"));\n\n Ret= Base64.encodeToString(bytes, Base64.URL_SAFE| Base64.NO_WRAP).replace('-','+').replace('_', '/');;\n\n }\n catch(Exception e)\n {\n\n }\n return Ret;\n }", "private static String HashIt(String token) {\n\t\tStringBuffer hexString = new StringBuffer();\n\t\ttry {\n\t\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n\t\t\tbyte[] hash = digest.digest(token.getBytes(StandardCharsets.UTF_8));\n\t\t\t\n\t\t\t// Convert to hex\n\t\t for (int i = 0; i < hash.length; i++) {\n\t\t\t String hex = Integer.toHexString(0xff & hash[i]);\n\t\t\t if(hex.length() == 1) {\n\t\t\t \thexString.append('0');\n\t\t\t }\n\t\t\t hexString.append(hex);\n\t\t }\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t\thexString.setLength(0);\n\t\t}\n\t return hexString.toString();\t\t\n\t}", "@Override\n public Script createOutputScript(MuunAddress address) {\n\n return new ScriptBuilder()\n .op(OP_HASH160)\n .data(address.getHash())\n .op(OP_EQUAL)\n .build();\n }" ]
[ "0.6003117", "0.5930298", "0.58911526", "0.5797564", "0.5754968", "0.57305616", "0.5491401", "0.54908717", "0.5444924", "0.54104745", "0.53886855", "0.53364426", "0.5302448", "0.526071", "0.52255523", "0.51862735", "0.51272887", "0.5106269", "0.5097687", "0.5079069", "0.5053432", "0.50410676", "0.50087106", "0.49377435", "0.48975784", "0.48918006", "0.48156756", "0.4811941", "0.47838688", "0.47667846", "0.47337303", "0.46458775", "0.45960176", "0.45210794", "0.45159516", "0.4452527", "0.44418296", "0.44344315", "0.44198185", "0.4385603", "0.4381063", "0.43795925", "0.43600574", "0.43566516", "0.43464002", "0.4339398", "0.43383226", "0.43151218", "0.43036532", "0.42950362", "0.42723963", "0.42678556", "0.42608893", "0.4253078", "0.42395377", "0.42204463", "0.4199775", "0.4195974", "0.4190516", "0.415983", "0.41532388", "0.41446033", "0.4140736", "0.41404516", "0.41280055", "0.41160542", "0.41028845", "0.40878022", "0.40870613", "0.40850458", "0.40538183", "0.40408215", "0.4034019", "0.40256137", "0.40126526", "0.40116975", "0.40089154", "0.4005737", "0.39979643", "0.3983923", "0.3982462", "0.3977754", "0.39744398", "0.3973048", "0.39649117", "0.39524925", "0.39471656", "0.3946287", "0.3935511", "0.39341116", "0.3932079", "0.393074", "0.39197055", "0.3919651", "0.3914582", "0.39069283", "0.39018852", "0.39001375", "0.38791698", "0.38743806" ]
0.54195803
9
Create a new session key (and possibly iv).
@Override protected SessionKey generateSessionKey() { SessionKey sk = new SessionKey(); SecureRandom random = null; try { random = SecureRandom.getInstance("SHA1PRNG"); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } byte bytes[] = new byte[16]; random.nextBytes(bytes); byte transformation[] = "AES/CBC/PKCS5Padding".getBytes(); sk.setTransformationName(transformation); sk.setKey(bytes); // 128 Bits random.nextBytes(bytes); sk.setIV(bytes); // 128 Bits return sk; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SessionKey (int keyLength) throws NoSuchAlgorithmException {\n KeyGenerator key1 = KeyGenerator.getInstance(\"AES\");\n key1.init(keyLength);\n this.secretKey = key1.generateKey();\n }", "private static Key generateKey() {\n return new SecretKeySpec(keyValue, ALGO);\n }", "String newKey();", "KeyIdPair createKeyIdPair();", "public SessionKey (String keyString) {\n byte[] keyByte = Base64.getDecoder().decode(keyString.getBytes());\n //Decodes a Base64 encoded String into a byte array\n int keyLength = keyByte.length;\n this.secretKey = new SecretKeySpec(keyByte, 0, keyLength, \"AES\");\n //Construct secret key from the given byte array.\n }", "public Session create() {\n // Attempt to generate a random session 5 times then fail\n final int MAX_ATTEMPTS = 5; \n \n // Loop until we have outdone our max attempts\n for(int x = 0; x < MAX_ATTEMPTS; x++) {\n String sessionKey = randomString(SESSION_KEY_SIZE); // SESSION_KEY_SIZE characters\n\n // The session key exists\n if (exists(sessionKey))\n continue;\n\n // Create the new session\n Session session = new Session(sessionKey);\n sessions.put(sessionKey, session, POLICY, EXPIRATION_TIME, EXPIRATION_UNIT); \n return session;\n }\n\n // Failed to generate new session key\n return null;\n }", "@Test\n\tpublic void createNewMyKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tboolean r1 = ks.createNewMyKeyPair(\"newkp\");\n\t\tboolean r2 = ks.createNewMyKeyPair(\"newtwo\");\n\t\tassertTrue(\"Should have added the key\", r1);\n\t\tassertTrue(\"Should have added the second key\", r2);\n\t}", "public void createKeyStore(String master_key) throws AEADBadTagException {\n SharedPreferences.Editor editor = getEncryptedSharedPreferences(master_key).edit();\n editor.putString(MASTER_KEY, master_key);\n editor.apply();\n\n Log.d(TAG, \"Encrypted SharedPreferences created...\");\n }", "InternalSession createSession(String sessionId);", "public String generateKey(long duration) throws Exception;", "public static synchronized Object makeKey (byte[] k)\r\n throws InvalidKeyException {\r\nif (DEBUG) trace(IN, \"makeKey(\"+k+\")\");\r\nif (DEBUG && debuglevel > 7) {\r\nSystem.out.println(\"Intermediate Session Key Values\");\r\nSystem.out.println();\r\nSystem.out.println(\"Raw=\"+toString(k));\r\n}\r\n //\r\n //...\r\n //\r\n Object sessionKey = null;\r\n\r\n frog_InternalKey intkey = new frog_InternalKey();\r\n \t /* Fill internal key with hashed keyMaterial */\r\n intkey.internalKey = frog_procs.hashKey( k );\r\n \t /* Convert internalKey into a valid format for encrypt and decrypt (see B.1.2.e) */\r\n intkey.keyE = frog_procs.makeInternalKey( frog_Algorithm.DIR_ENCRYPT, intkey.internalKey );\r\n intkey.keyD = frog_procs.makeInternalKey( frog_Algorithm.DIR_DECRYPT, intkey.internalKey );\r\n \r\n sessionKey = intkey;\r\n //\r\n // ...\r\n //\r\nif (DEBUG && debuglevel > 7) {\r\nSystem.out.println(\"...any intermediate values\");\r\nSystem.out.println();\r\n}\r\nif (DEBUG) trace(OUT, \"makeKey()\");\r\n return sessionKey;\r\n }", "private static Key generateKey() throws NoSuchAlgorithmException {\r\n\t\tif (key == null) {\r\n\t\t\tgenerator = KeyGenerator.getInstance(\"DES\");\r\n\t\t\tgenerator.init(new SecureRandom());\r\n\t\t\tkey = generator.generateKey();\r\n\t\t}\r\n\t\treturn key;\r\n\t}", "public static KeyPair createKeyPair(){\n KeyPair pair = KeyPair.random();\n System.out.println(pair.getSecretSeed());\n System.out.println(pair.getAccountId());\n return pair;\n\n }", "String renewSessionId(String oldId, String newId);", "OpenSSLKey mo134201a();", "public byte[] createKey(String keyName, byte[] keyValue, int size, String token) throws InternalSkiException {\n byte[] newKey = null;\n byte[] systemKey = getSystemKey();\n byte[] tokenKey = getTokenKey();\n ISki skiDao = getSkiDao();\n\n Token tkn = th.decodeToken(token, tokenKey);\n if (tkn!=null) {\n try {\n byte[] comboKey = SkiKeyGen.getComboKey(tkn.getKey(), systemKey);\n\n if (keyValue!=null) {\n newKey = keyValue;\n }\n if (newKey==null) {\n newKey = SkiKeyGen.generateKey(size);\n }\n\n byte[] encryptedKey = crypter.encrypt(newKey, comboKey);\n String strEncryptedKey = SkiUtils.b64encode(encryptedKey);\n int saved = skiDao.saveKeyPair(keyName, strEncryptedKey);\n if (saved!=1) {\n throw new InternalSkiException(\"Failed to save key pair to database! Check logs...\");\n }\n } catch (SkiException e) {\n log.warning(\"Unable to create new key. Access denied. Check logs for error: \" + e.getMessage());\n log.log(Level.WARNING, e.getMessage(), e);\n newKey = null;\n }\n } else {\n log.warning(\"Unable to decode token during key creation! Access denied.\");\n newKey = null;\n }\n return newKey;\n }", "@PostMapping(\"/create\")\n public String createSymmetricKey() {\n\n AWSKMS kmsClient = new KmsClientBuilder().buildKmsClient();\n \n String creatingMasterKey = \"Creating Master Key\";\n CreateKeyRequest request = new CreateKeyRequest().withDescription(creatingMasterKey);\n CreateKeyResult result = kmsClient.createKey(request);\n\n return \"Object Type: Symmetric Key\\nuid: \"+ uid + \"\\n\";\n }", "public SecretKey generarClaveSecreta() throws NoSuchAlgorithmException {\n KeyGenerator keyGenerator = KeyGenerator.getInstance(\"AES\");\n keyGenerator.init(256);\n SecretKey secretKey = keyGenerator.generateKey();\n return secretKey;\n }", "private void initKey() {\n String del = \":\";\n byte[] key;\n if (MainGame.applicationType == Application.ApplicationType.Android) {\n key = StringUtils.rightPad(Build.SERIAL + del + Build.ID + del, 32, \"~\").getBytes();\n } else if (MainGame.applicationType == Application.ApplicationType.Desktop) {\n key = new byte[]{0x12, 0x2d, 0x2f, 0x6c, 0x1f, 0x7a, 0x4f, 0x10, 0x48, 0x56, 0x17, 0x4b, 0x4f, 0x48, 0x3c, 0x17, 0x04, 0x06, 0x4b, 0x6d, 0x1d, 0x68, 0x4b, 0x52, 0x50, 0x50, 0x1f, 0x06, 0x29, 0x68, 0x5c, 0x65};\n } else {\n key = new byte[]{0x77, 0x61, 0x6c, 0x0b, 0x04, 0x5a, 0x4f, 0x4b, 0x65, 0x48, 0x52, 0x68, 0x1f, 0x1d, 0x3c, 0x4a, 0x5c, 0x06, 0x1f, 0x2f, 0x12, 0x32, 0x50, 0x19, 0x3c, 0x52, 0x04, 0x17, 0x48, 0x4f, 0x6d, 0x4b};\n }\n for (int i = 0; i < key.length; ++i) {\n key[i] = (byte) ((key[i] << 2) ^ magic);\n }\n privateKey = key;\n }", "public Session createSession(String sessionId);", "private static void genKey(){\n\t\tSystem.out.println(\"Name to use for key?\");\n\t\tScanner in = new Scanner(System.in);\n\t\tkeyname = in.next();\n\t\tin.close();\n\t\t\n\t\tCreateKeyPairRequest createKPReq = new CreateKeyPairRequest();\n\t\tcreateKPReq.withKeyName(keyname);\n\t\tCreateKeyPairResult resultPair = null;\n\t\ttry{\n\t\t\tresultPair = ec2.createKeyPair(createKPReq);\n\t\t}catch(AmazonServiceException e){\n\t\t\tSystem.out.println(\"Key already exists!\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tKeyPair keyPair = new KeyPair();\n\t\tkeyPair = resultPair.getKeyPair();\n\t\tString privateKey = keyPair.getKeyMaterial();\n\t\tFileOutputStream out = null;\n\t\t\n\t\t\n\t\ttry{\n\t\t\tFile f = new File(keyname + \".pem\");\n\t\t\tout = new FileOutputStream(f);\n\t\t\tbyte[] privateKeyByte = privateKey.getBytes();\n\t\t\tout.write(privateKeyByte);\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t\t\n\t\t\t\n\t\t}catch (IOException e){\n\t\t\tSystem.out.println(\"IO failed!\");\n\t\t\n\t\t}finally{\n\t\t\tif(out != null){\n\t\t\t\ttry {\n\t\t\t\t\tout.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"IO failed!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tSystem.out.println(\"Key generated: \" + keyname + \".pem\");\n\t}", "String createSessionId(long seedTerm);", "public static Key generateAESKey(final byte[] key) {\n return new AesKey(key);\n }", "protected SecretKey generateRandomAESKey() throws GeneralSecurityException {\n fixPrng();\n // Instantiante KeyGenerator\n KeyGenerator keyGenerator = KeyGenerator.getInstance(AES_INSTANCE);\n // Initialize generator with the desired keylength\n keyGenerator.init(AES_128);\n // Return new key\n return keyGenerator.generateKey();\n }", "public byte[] createKey(String keyName, String token) throws InternalSkiException {\n return createKey(keyName, null, SkiKeyGen.DEFAULT_KEY_SIZE_BITS, token);\n }", "public NodeKey createNodeKey();", "public ECKey() {\n this(secureRandom);\n }", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key addNewKey();", "@Test\n\tpublic void createNewMyKeyEmptyName() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tboolean re = ks.createNewMyKeyPair(\"\");\n\t\tassertFalse(\"Should not have created new my keypair: empty name\", re);\n\t}", "KeyManager createKeyManager();", "public static Key generarKey() throws Exception{\n Key key = new SecretKeySpec(keyvalue, instancia); \n return key;\n }", "@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }", "public KeyPair createKeyPair() {\n try {\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(4096);\n return keyPairGenerator.generateKeyPair();\n } catch (RuntimeException | NoSuchAlgorithmException e) {\n throw new RuntimeException(\"Failed to create public/private key pair\", e);\n }\n }", "public Key addKey() throws ApplicationException {\n\n\t\tKey key = new Key();\n\t\tSecureRandom rnd = new SecureRandom();\n\t\tbyte[] keyPart1 = new byte[Constants.PUBLIC_KEY_PART_LENGTH];\n\t\tbyte[] keyPart2 = new byte[Constants.PUBLIC_KEY_PART_LENGTH];\n\t\tbyte[] keyPart3 = new byte[Constants.PUBLIC_KEY_PART_LENGTH];\n\t\tbyte[] keyPart4 = new byte[Constants.PRIVATE_KEY_PART_LENGTH];\n\t\tbyte[] keyPart5 = new byte[Constants.PRIVATE_KEY_PART_LENGTH];\n\t\tbyte[] keyPart6 = new byte[Constants.PRIVATE_KEY_PART_LENGTH];\n\t\trnd.nextBytes(keyPart1);\n\t\trnd.nextBytes(keyPart2);\n\t\trnd.nextBytes(keyPart3);\n\t\trnd.nextBytes(keyPart4);\n\t\trnd.nextBytes(keyPart5);\n\t\trnd.nextBytes(keyPart6);\n\t\tkey.setPublicKeyPart1(keyPart1);\n\t\tkey.setPublicKeyPart2(keyPart2);\n\t\tkey.setPublicKeyPart3(keyPart3);\n\t\tkey.setPrivateKeyPart1(keyPart4);\n\t\tkey.setPrivateKeyPart2(keyPart5);\n\t\tkey.setPrivateKeyPart3(keyPart6);\n\n\t\tkey = saveKey(key);\n\n\t\tContext.getAuditEventService().saveAuditEvent(AuditEventType.ADD_KEY_EVENT_TYPE, \"Added a new key record\", key);\n\t\t\n\t\treturn key;\n\t}", "private static SecretKeySpec generateKey(final String password) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n final MessageDigest digest = MessageDigest.getInstance(HASH_ALGORITHM);\n byte[] bytes = password.getBytes(\"UTF-8\");\n digest.update(bytes, 0, bytes.length);\n byte[] key = digest.digest();\n\n log(\"SHA-256 key \", key);\n\n SecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\n return secretKeySpec;\n }", "public byte[] createKey(String keyName, int size, String token) throws InternalSkiException {\n return createKey(keyName, null, size, token);\n }", "public void testCreateKeyWithId() {\n Key key = KeyFactory.createKey(kind, id);\n assertNull(key.getName());\n assertEquals(kind, key.getKind());\n assertEquals(id, key.getId());\n }", "@Override\n\t\tpublic Text createKey() {\n\t\t\treturn null;\n\t\t}", "public static RoomAuthName makeKey (int playerId)\n {\n return new RoomAuthName(\"\", playerId);\n }", "private static SecretKey createSymmetricKey()\n\t{\n\t\tSecretKey secretKey = null;\n\n\t\ttry\n\t\t{\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(inputAlgorithmForFileEncryption);\n\t\t\tkeyGen.init(128);\n\t\t\tsecretKey = keyGen.generateKey();\n\t\t} catch (NoSuchAlgorithmException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn secretKey;\n\t}", "public interface IKeyCreator {\n byte[] generateKey(int n);\n\n byte[] getKeyFromFile(String p);\n\n byte[] inputKey(String s);\n}", "public static boolean createKey(String keyName, int reauthenticationTimeoutInSecs,\n boolean invalidateKeyByNewBiometricEnrollment) {\n KeyStore keyStore = getKeyStore();\n if (keyStore == null) {\n Log.e(TAG, \"createKey/cannot access keystore\");\n return false;\n }\n\n try {\n KeyGenerator keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, \"AndroidKeyStore\");\n\n // Set the alias of the entry in Android KeyStore where the key will appear\n // and the constrains (purposes) in the constructor of the Builder\n KeyGenParameterSpec.Builder builder = new KeyGenParameterSpec.Builder(keyName,\n KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT)\n .setBlockModes(KeyProperties.BLOCK_MODE_CBC)\n .setUserAuthenticationRequired(true)\n // Require that the user has unlocked in the last 30 seconds\n .setUserAuthenticationValidityDurationSeconds(reauthenticationTimeoutInSecs)\n .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_PKCS7);\n if (android.os.Build.VERSION.SDK_INT >= 24) {\n builder.setInvalidatedByBiometricEnrollment(invalidateKeyByNewBiometricEnrollment);\n }\n keyGenerator.init(builder.build());\n keyGenerator.generateKey();\n return true;\n } catch (NoSuchAlgorithmException | NoSuchProviderException\n | InvalidAlgorithmParameterException e) {\n Log.e(TAG, \"Failed to create a symmetric key\", e);\n return false;\n }\n }", "public static HydraKey generateKey() throws NoSuchAlgorithmException {\n // Sets the keygenerator to use blowfish key\n KeyGenerator keygen = KeyGenerator.getInstance(ALGORITHM_DEFAULT);\n keygen.init(128); // set a keylength of 128 bits\n SecretKey secret_key = keygen.generateKey();\n HydraKey hk = new HydraKey(secret_key.getEncoded(), ALGORITHM_DEFAULT);\n return hk;\n }", "WithCreate withEncryption(Encryption encryption);", "private void createDerivedKey() throws NoSuchAlgorithmException, InvalidKeySpecException, IOException {\n byte[] salt = null;\n int numIterations;\n derivedKey = null;\n \n // read salt + numIterations from file if available\n File derivParamFile = configuration.getKeyDerivationParametersFile();\n if (derivParamFile.exists()) {\n DataInputStream inputStream = null;\n try {\n inputStream = new DataInputStream(new FileInputStream(derivParamFile));\n salt = new byte[FileEncryptionConstants.SALT_LENGTH];\n inputStream.read(salt);\n numIterations = inputStream.readInt();\n byte[] key = FileEncryptionUtil.getEncryptionKey(password, salt, numIterations);\n derivedKey = new DerivedKey(salt, numIterations, key);\n }\n finally {\n if (inputStream != null)\n inputStream.close();\n }\n }\n \n // if necessary, create a new salt and key and write the derivation parameters to the cache file\n if (derivedKey==null || derivedKey.numIterations!=NUM_ITERATIONS) {\n I2PAppContext appContext = I2PAppContext.getGlobalContext();\n salt = new byte[SALT_LENGTH];\n appContext.random().nextBytes(salt);\n \n DataOutputStream outputStream = null;\n try {\n byte[] key = FileEncryptionUtil.getEncryptionKey(password, salt, NUM_ITERATIONS);\n derivedKey = new DerivedKey(salt, NUM_ITERATIONS, key);\n outputStream = new DataOutputStream(new FileOutputStream(derivParamFile));\n outputStream.write(salt);\n outputStream.writeInt(NUM_ITERATIONS);\n }\n finally {\n if (outputStream != null)\n outputStream.close();\n }\n }\n }", "public void generateEphemeralKey(){\n esk = BIG.randomnum(order, rng); //ephemeral secret key, x\n epk = gen.mul(esk); //ephemeral public key, X = x*P\n }", "@Override\n public String generateKey(int round) {\n return this.key.substring(4 * round, 4 * round + 16);\n }", "private static byte[] generateSymetricKey(int length) {\n\t\tSecureRandom random = new SecureRandom();\n\t\tbyte[] keyBytes = new byte[length];\n\t\trandom.nextBytes(keyBytes);\n\t\tSecretKeySpec key = new SecretKeySpec(keyBytes, \"AES\");\n\t\treturn key.getEncoded();\n\t}", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }", "private static Key generateKey(String secretKeyString) throws Exception {\n // generate secret key from string\n Key key = new SecretKeySpec(secretKeyString.getBytes(), \"AES\");\n return key;\n }", "public void CreateCipher() {\n String key = \"IWantToPassTAP12\"; // 128 bit key\n aesKey = new javax.crypto.spec.SecretKeySpec(key.getBytes(), \"AES\");\n try {\n this.cipher = Cipher.getInstance(\"AES\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static ECKey createFromPassphrase(String secret) {\n byte[] hash = null;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n md.update(secret.getBytes(\"UTF-8\"));\n hash = md.digest();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n ECKey key = new ECKey(new SecureRandom(hash));\n return key;\n }", "UUID sessionId();", "private SymmetricKey createTestSymmetricKey(String primaryKey, String secondaryKey)\n {\n SymmetricKey key = new SymmetricKey();\n Deencapsulation.setField(key, \"primaryKey\", primaryKey);\n Deencapsulation.setField(key, \"secondaryKey\", secondaryKey);\n return key;\n }", "public static PSKey createKey(int contentTypeId)\n {\n return new PSSimpleKey(KEY_CONTENTTYPEID, \"\" + contentTypeId); \n }", "public KeyNamePair() {\r\n this.key = \"\";\r\n this.name = \"\";\r\n }", "public static SessionState newSession(String msg) {\n int newSessionNo = 0;\n synchronized(globalSessionNo) {\n newSessionNo = globalSessionNo++;\n }\n return new SessionState(newSessionNo, NetUtils.getIP(), 1, msg);\n }", "private EncryptionKey() {\n }", "DefaultSession createSession(String id);", "public static Tuple<String, String> generateKey() {\r\n\t\t// Get the KeyGenerator\r\n\t\ttry {\r\n\t\t\tKeyGenerator kgen;\r\n\t\t\tkgen = KeyGenerator.getInstance(\"AES\");\r\n\t\t\tkgen.init(256);\r\n\t\t\t// Generate the secret key specs.\r\n\t\t\tSecretKey skey = kgen.generateKey();\r\n\t\t\tbyte[] raw = skey.getEncoded();\r\n\t\t\tString key = new Base64().encodeAsString(raw);\r\n\r\n\t\t\tSecureRandom randomSecureRandom = SecureRandom\r\n\t\t\t\t\t.getInstance(\"SHA1PRNG\");\r\n\t\t\tCipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\r\n\t\t\tbyte[] iv = new byte[cipher.getBlockSize()];\r\n\t\t\trandomSecureRandom.nextBytes(iv);\r\n\t\t\tString ivStr = new Base64().encodeAsString(iv);\r\n\t\t\treturn new Tuple(key, ivStr);\r\n\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\tLogger.error(\"Error while generating key: %s\",\r\n\t\t\t\t\t\"NoSuchAlgorithmException\");\r\n\t\t} catch (NoSuchPaddingException e) {\r\n\t\t\tLogger.error(\"Error while generating key: %s\",\r\n\t\t\t\t\t\"NoSuchPaddingException\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "String setKey(String newKey);", "Session createSession(Long courseId, Long studentId, Session session);", "FutureSecureMap<KeyType, ValueType> create(String name);", "private SessionTicket createUniqueSessionTicket() {\n String ticket = UUID.randomUUID().toString();\n SessionTicket sessionTicket = new SessionTicket();\n sessionTicket.setTicket(ticket);\n return sessionTicket;\n }", "public void generateKeyPair() {\n\t\ttry {\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"DSA\", \"SUN\");\n\t\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n\t\t\tkeyGen.initialize(1024, random);\n\t\t\tKeyPair pair = keyGen.generateKeyPair();\n\t\t\tprivateKey = pair.getPrivate();\n\t\t\tpublicKey = pair.getPublic();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void generateNewKeyPair(String alias, Context context) throws Exception {\n Calendar start = Calendar.getInstance();\n Calendar end = Calendar.getInstance();\n // expires 1 year from today\n end.add(Calendar.YEAR, 1);\n KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(context)\n .setAlias(alias)\n .setSubject(new X500Principal(\"CN=\" + alias))\n .setSerialNumber(BigInteger.TEN)\n .setStartDate(start.getTime())\n .setEndDate(end.getTime())\n .build();\n // use the Android keystore\n KeyPairGenerator gen = KeyPairGenerator.getInstance(\"RSA\",ANDROID_KEYSTORE);\n gen.initialize(spec);\n // generates the keypair\n gen.generateKeyPair();\n }", "@Override\n public KeyPairResourceModel generateNewKeyPairFor(ApplicationUser user) {\n removeExistingUserKeysFor(user);\n //create new one\n String keyComment = \"SYSTEM GENERATED\";\n KeyPairResourceModel result = sshKeyPairGenerator.generateKeyPair(keyComment);\n // must add to our repo before calling stash SSH service since audit\n // listener will otherwise revoke it.\n SshKeyEntity newRecord = enterpriseKeyRepository.createOrUpdateUserKey(user, result.getPublicKey(), keyComment);\n SshKey newKey = sshKeyService.addForUser(user, result.getPublicKey());\n enterpriseKeyRepository.updateRecordWithKeyId(newRecord, newKey);\n log.info(\"New managed key \" + newKey.getId() +\" of type USER created user {} ({})\", user.getId(), user.getSlug());\n return result;\n }", "private SM_INIT(byte[] publicRsaKey, byte[] blowfishKey, int sessionId) {\n super(0x00);\n this.sessionId = sessionId;\n this.publicRsaKey = publicRsaKey;\n this.blowfishKey = blowfishKey;\n }", "public void testCreateKeyStringWithId() {\n try {\n KeyFactory.createKeyString(kind, id);\n } catch (IllegalStateException e) {\n return;\n }\n fail();\n }", "public KeyEncryptionKeyInfo() {\n }", "static KeyPair generateKeyPair() throws NoSuchAlgorithmException {\n\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(ALGORITHM);\n\n keyGen.initialize(2048);\n\n //Log.e(TAG, \"generateKeyPair: this is public key encoding \" + Arrays.toString(generateKeyPair.getPrivate().getEncoded()));\n\n return keyGen.generateKeyPair();\n }", "void createNode(NodeKey key);", "public void createSession(int uid);", "public void generateKeys() {\r\n try {\r\n SecureRandom random = SecureRandom.getInstance(Constants.SECURE_RANDOM_ALGORITHM);\r\n KeyPairGenerator generator = KeyPairGenerator.getInstance(Constants.ALGORITHM);\r\n generator.initialize(Constants.KEY_BIT_SIZE, random);\r\n \r\n KeyPair keys = generator.genKeyPair();\r\n \r\n persistPrivateKey(keys.getPrivate().getEncoded());\r\n persistPublicKey(keys.getPublic().getEncoded());\r\n logger.log(Level.INFO, \"Done with generating persisting Public and Private Key.\");\r\n \r\n } catch (NoSuchAlgorithmException ex) {\r\n logger.log(Level.SEVERE, \"En error occured while generating the Public and Private Key\");\r\n }\r\n }", "public Session getOrCreate(String sessionKey, boolean forceCreateNew) {\n // Create new session if does not exists or replace\n if (!this.exists(sessionKey) || forceCreateNew) {\n // Create a new session with a new key if its invalid\n if (!validateKey(sessionKey))\n return create();\n\n Session session = new Session(sessionKey);\n sessions.put(sessionKey, session, POLICY, EXPIRATION_TIME, EXPIRATION_UNIT); \n return session;\n }\n\n // Return the session\n return sessions.get(sessionKey);\n }", "protected abstract SESSION newSessionObject() throws EX;", "@Override\n public CreateSessionResponse createSession()\n throws EwalletException {\n return null;\n }", "private static byte[] genKey(String algorithm, int keySize) throws NoSuchAlgorithmException {\n KeyGenerator keyGenerator = KeyGenerator.getInstance(algorithm);\n\n keyGenerator.init(keySize);\n\n SecretKey secretKey = keyGenerator.generateKey();\n\n return secretKey.getEncoded();\n }", "private static Key createInternalLobKey() {\n return Key.createKey(Arrays.asList(INTERNAL_KEY_SPACE,\n ILK_PREFIX_COMPONENT,\n UUID.randomUUID().toString()));\n }", "public PrivateKey makePrivateKey() {\n return new PrivateKey(decryptingBigInt, primesMultiplied);\n }", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "public static SecretKey createSecretKey() throws KeyGenerationException {\n\t\treturn cipherKeyProvider.createKey(KEY_LENGTH, GENERATOR_TYPE);\n\t}", "public short key();", "private SecretKey generateSecretKey() throws NoSuchAlgorithmException {\n final KeyGenerator keygen = KeyGenerator.getInstance(KEYSPEC_ALGORITHM);\n keygen.init(KEY_SIZE, mRandom);\n return keygen.generateKey();\n }", "public Key generateKey2(int l) throws IOException{\n int b = l/32;\r\n int [] unos = new int[b];\r\n for(int i=0;i<b;i++){\r\n unos[i] = 1;\r\n }\r\n byte [] aB = int2byte(unos);\r\n\r\n return new SecretKeySpec(aB, \"AES\");\r\n }", "public static Keys generateKeys() throws GeneralSecurityException {\n KeyGenerator gen = KeyGenerator.getInstance(ENC_ALGORITHM);\n gen.init(KEYLEN);\n SecretKey encKey = gen.generateKey();\n\n /* XXX: It's probably unnecessary to create a different keygen for the\n * MAC, but JCA's API design suggests we should just in case ... */\n gen = KeyGenerator.getInstance(MAC_ALGORITHM);\n gen.init(KEYLEN);\n SecretKey macKey = gen.generateKey();\n\n return new Keys(encKey, macKey);\n }", "public void init(String keyIn) throws KeyAlreadySetException {\n if (key != null) {\n throw new KeyAlreadySetException();\n } else if (keyIn == null) {\n throw new NullPointerException();\n } else {\n try {\n System.out.println(\"Key string: \" + keyIn);\n SecretKeyFactory factory = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA256\");\n //Same salt for every client\n Random r = new Random(128);\n byte[] salt = new byte[32];\n r.nextBytes(salt);\n KeySpec spec = new PBEKeySpec(keyIn.toCharArray(), salt, 65536, 128);\n SecretKey tmp = factory.generateSecret(spec);\n\n key = new SecretKeySpec(tmp.getEncoded(), \"AES\");\n } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {\n e.printStackTrace();\n\n throw new UnsupportedOperationException();\n }\n }\n }", "public void testCreateKeyWithName() {\n Key key = KeyFactory.createKey(kind, name);\n assertEquals(name, key.getName());\n assertEquals(kind, key.getKind());\n assertEquals(0L, key.getId());\n }", "public static ECKey createKeyFromSha256Passphrase(String secret) {\n byte[] hash = null;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n md.update(secret.getBytes(\"UTF-8\"));\n hash = md.digest();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n @SuppressWarnings(\"deprecation\")\n ECKey key = new ECKey(hash, (byte[])null);\n return key;\n }", "private String generateSecretKey(){\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[20];\n\n random.nextBytes(bytes);\n Base32 base32 = new Base32();\n return base32.encodeToString(bytes);\n }", "public NodeKey createNodeKeyWithIdentifier( String identifier );", "public CryptographyKeysCreator() {\n Random random = new Random();\n BigInteger prime1 = BigInteger.probablePrime(256, random);\n BigInteger prime2 = BigInteger.probablePrime(256, random);\n primesMultiplied = prime1.multiply(prime2);\n BigInteger phi = prime1.subtract(BigInteger.ONE).multiply(prime2.subtract(BigInteger.ONE));\n encryptingBigInt = BigInteger.probablePrime(256, random);\n\n while (phi.gcd(encryptingBigInt).compareTo(BigInteger.ONE) > 0 && encryptingBigInt.compareTo(phi) < 0) {\n encryptingBigInt = encryptingBigInt.add(BigInteger.ONE);\n }\n\n decryptingBigInt = encryptingBigInt.modInverse(phi);\n }", "public Session createSession() {\n\t\tSession session = new Session();\n\t\tput(session.getId(), session);\n\t\treturn session;\n\t}", "public RsaJsonWebKey generate(int keyLength) throws JoseException {\n RsaJsonWebKey rsaJsonWebKey = RsaJwkGenerator.generateJwk(keyLength);\n return rsaJsonWebKey;\n }", "@Override\n\tprotected CacheKey createCacheKey(String key) {\n\t\treturn new ConfigCacheKey(key);\n\t}", "public static Key createPrimaryKey(Number idexped, Number idbulto)\n {\n return new Key(new Object[] {idexped, idbulto});\n }", "UUID getSessionId();", "public int generateSessionID(){\r\n SecureRandom randsession = new SecureRandom();\r\n return randsession.nextInt(1234567890);\r\n }", "String allocateId() throws SessionStorageException;", "String getSessionKey(String sessionId) {\n return this.namespace + \"sessions:\" + sessionId;\n }" ]
[ "0.6475034", "0.6374539", "0.6212031", "0.60842556", "0.6050658", "0.60139066", "0.59059507", "0.5897668", "0.5834795", "0.57370234", "0.573296", "0.5709835", "0.5700217", "0.5683779", "0.5670507", "0.56550944", "0.5649169", "0.55927926", "0.55787086", "0.5549191", "0.5545739", "0.551498", "0.549752", "0.54969907", "0.54865986", "0.54698867", "0.5452784", "0.54417825", "0.5430849", "0.5424738", "0.53786236", "0.5345092", "0.5310911", "0.5302121", "0.5300698", "0.52943444", "0.52919596", "0.5280709", "0.5277461", "0.5269294", "0.52564776", "0.5219216", "0.5203004", "0.51938605", "0.51742876", "0.5174051", "0.51718557", "0.5169388", "0.51513284", "0.51483953", "0.5148391", "0.5139426", "0.5138332", "0.5131335", "0.51082784", "0.5083515", "0.50831556", "0.5079425", "0.5071957", "0.5061155", "0.5031162", "0.50287265", "0.50226", "0.5018904", "0.5003601", "0.4997523", "0.4994499", "0.49854466", "0.49781185", "0.49769765", "0.4975584", "0.4964495", "0.49540666", "0.49531585", "0.4951671", "0.4938618", "0.49373764", "0.49268094", "0.49265045", "0.49201736", "0.49170616", "0.49168423", "0.49116412", "0.49073264", "0.49010715", "0.48980245", "0.48958912", "0.48856148", "0.48784918", "0.48594373", "0.48424208", "0.48217", "0.48215842", "0.48112392", "0.4805666", "0.480146", "0.4785409", "0.47811154", "0.47701794", "0.47698376" ]
0.71410024
0
Encrypts a session key.
@Override protected byte[] encryptSessionKey(SessionKey sessionKey, InputStream certificate) { CertificateFactory cf = null; Certificate cert = null; try { cf = CertificateFactory.getInstance("X.509"); } catch (CertificateException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { cert = cf.generateCertificate(certificate); } catch (CertificateException e) { // TODO Auto-generated catch block e.printStackTrace(); } Cipher cipher = null; try { cipher = Cipher.getInstance("RSA"); } catch (NoSuchAlgorithmException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (NoSuchPaddingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { cipher.init(Cipher.ENCRYPT_MODE, cert); } catch (InvalidKeyException e) { // TODO Auto-generated catch block e.printStackTrace(); } byte[] ciphertext = null; try { ciphertext = cipher.doFinal(); } catch (IllegalBlockSizeException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (BadPaddingException e) { // TODO Auto-generated catch block e.printStackTrace(); } return ciphertext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void Encrypt(Object key) {\n\n\t}", "Encryption encryption();", "String encryption(Long key, String encryptionContent);", "private static String getEncryptedKey(String key) {\r\n\t\ttry {\r\n\t\t\treturn SimpleCrypto.encrypt(SimpleCrypto.getDeviceSeed(ctx), key);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new AndroidRuntimeException(\"Could not encrypt preference key\");\r\n\t\t}\r\n\t}", "public static String encryptKey(String key, String token) {\n try {\n IvParameterSpec iv = new IvParameterSpec(IV);\n SecretKeySpec spec = new SecretKeySpec(key.getBytes(UTF_8), \"AES\");\n Cipher cipher = Cipher.getInstance(\"AES/CBC/NoPADDING\");\n cipher.init(Cipher.ENCRYPT_MODE, spec, iv);\n byte[] encrypted = cipher.doFinal(token.getBytes(UTF_8));\n return Hex.encodeHexString(encrypted, false);\n } catch (GeneralSecurityException e) {\n // never happens\n throw new IllegalStateException(\"Exception during AES CBC encryption\", e);\n }\n }", "public java.lang.String getEncryptedKey() {\n\t\treturn encryptedKey;\n\t}", "public String encrypt(final PublicKeyInterface key, final String data)\n {\n return this.encryptionCipher().encrypt(key, data);\n }", "public String encrypt(final PrivateKeyInterface key, final String data)\n {\n return this.encryptionCipher().encrypt(key, data);\n }", "@Override\n\tprotected SessionKey generateSessionKey() {\n\n\t\tSessionKey sk = new SessionKey();\n\t\t\n\t\tSecureRandom random = null;\n\t\ttry {\n\t\t\trandom = SecureRandom.getInstance(\"SHA1PRNG\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tbyte bytes[] = new byte[16];\n\t\trandom.nextBytes(bytes);\n\n\t\tbyte transformation[] = \"AES/CBC/PKCS5Padding\".getBytes();\n\t\tsk.setTransformationName(transformation);\n\t\tsk.setKey(bytes); // 128 Bits\n\t\trandom.nextBytes(bytes);\n\t\tsk.setIV(bytes); // 128 Bits\n\n\t\t\n\t\treturn sk;\n\t}", "public static String encrypt(String s, char key) {\n\t\treturn Utilities.encrypt(s.getBytes(), (byte) key);\n\t}", "public SessionKey (int keyLength) throws NoSuchAlgorithmException {\n KeyGenerator key1 = KeyGenerator.getInstance(\"AES\");\n key1.init(keyLength);\n this.secretKey = key1.generateKey();\n }", "public String tableEncrypt(String plaintext, String key) {\n\t\treturn AESMain2.AESEncrypt(plaintext, key);\n\t}", "public static String encrypt(String s, char key) {\n\t\tbyte[] b=s.getBytes();\n\t\t\n\t\treturn Utilities.encrypt(b, (byte) key);\n\t\t\n\t}", "public String tselEncrypt(String key, String message)\n\t{\n\n\t\tif (key == null || key.equals(\"\")) \n\t\t{\n\t\t\treturn message;\n\t\t}\n\n\t\tif (message == null || message.equals(\"\")) \n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\tCryptoUtils enc = new CryptoUtils(key, Cipher.ENCRYPT_MODE);\n\n\t\tString messageEnc = enc.process(message);\n\n\t\treturn messageEnc;\n\t}", "public static String encrypt(String s, char key) {\n \tbyte[] arr = s.getBytes();\n \treturn Utilities.encrypt(arr, (byte) key);\n }", "public String ebcEncrypt(String plaintext, String key) {\n\t\treturn AESEBC.AESEncrypt(plaintext, key);\n\t}", "public String encrypt() throws LRException\n\t{\n\t\treturn LUEncrypt.encrypt(getFields(),\n\t\t\t((DataHRecordData)getData()).encryptKey.getStringValue());\n\t}", "String getEncryptionKeyId();", "@Override\n public void encrypt() {\n algo.encrypt();\n String cypher = vigenereAlgo(true);\n this.setValue(cypher);\n }", "@Test\r\n public void testEncrypt()\r\n {\r\n System.out.println(\"encrypt\");\r\n String input = \"Hello how are you?\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n String result = instance.encrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "protected void engineInitEncrypt (Key key)\n throws KeyException {\n makeKey(key);\n }", "public String encryptAESKey(String plainAESKey, PublicKey publicKey) throws Exception {\r\n Cipher cipher = Cipher.getInstance(\"RSA\");\r\n cipher.init(Cipher.ENCRYPT_MODE, publicKey);\r\n return Base64.getEncoder().encodeToString(cipher.doFinal(plainAESKey.getBytes()));\r\n }", "public String encodeKey() {\n byte[] keyByte = secretKey.getEncoded();\n return Base64.getEncoder().encodeToString(keyByte);\n }", "public void setEncryptedKey(java.lang.String encryptedKey) {\n\t\tthis.encryptedKey = encryptedKey;\n\t}", "public String encrypt(final String value) {\n\t\treturn encryptor.encrypt(value);\n\t}", "public byte[] encrypt(final PublicKeyInterface key, final byte[] data)\n {\n return this.encryptionCipher().encrypt(key, data);\n }", "public void setKey(final String key);", "public void setKey(final String key);", "@Override\n public EncryptKey encryptKey(String tableName, String columnName) {\n return encryptKeyManager.getEncryptKey(tableName, columnName);\n }", "public SessionKey (String keyString) {\n byte[] keyByte = Base64.getDecoder().decode(keyString.getBytes());\n //Decodes a Base64 encoded String into a byte array\n int keyLength = keyByte.length;\n this.secretKey = new SecretKeySpec(keyByte, 0, keyLength, \"AES\");\n //Construct secret key from the given byte array.\n }", "public static String encrypt(String str)\n {\n StringBuilder sb = new StringBuilder(str);\n\n int lenStr = str.length();\n int lenKey = key.length();\n\n //\n // For each character in our string, encrypt it...\n for ( int i = 0, j = 0; i < lenStr; i++, j++ )\n {\n if ( j >= lenKey ) j = 0; // Wrap 'round to beginning of key string.\n\n //\n // XOR the chars together. Must cast back to char to avoid compile error.\n //\n sb.setCharAt(i, (char)(str.charAt(i) ^ key.charAt(j)));\n }\n\n return sb.toString();\n }", "public static String encrypt(String input, String key){\n\t\treturn encrypt(input, key, shift);\n\t}", "public byte[] encrypt(final PrivateKeyInterface key, final byte[] data)\n {\n return this.encryptionCipher().encrypt(key, data);\n }", "public static Key generateAESKey(final byte[] key) {\n return new AesKey(key);\n }", "@Override\n public InputStream encrypt(InputStream in, EncryptionKey publicKey) throws IOException {\n KeyEncapsulationMechanism.KeyAndCiphertext<SymmetricKey> keyAndCiphertext = kem.encaps(publicKey);\n\n //Serialize the encapsulated key\n byte[] encapsulatedKey = new JSONConverter().serialize(keyAndCiphertext.encapsulatedKey.getRepresentation())\n .getBytes(StandardCharsets.UTF_8);\n\n //Prepare the encapsulated key length as the first four bytes of the ciphertext. That ought to be enough for\n // everybody.\n byte[] keyLenBytes = ByteBuffer.allocate(4).putInt(encapsulatedKey.length).array();\n\n //Return resulting stream that concatenates: keyLenBytes || encapsulatedKey || ciphertextFromSymmetricScheme\n return new SequenceInputStream(new ByteArrayInputStream(keyLenBytes),\n new SequenceInputStream(new ByteArrayInputStream(encapsulatedKey),\n symmetricScheme.encrypt(in, keyAndCiphertext.key)));\n }", "public void setEncryptionKey(LVValue encryptKey) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tmyData.encryptKey=encryptKey;\n\t}", "public K setKey(K key);", "@Test\n public void testAesEncryptForInputKey() throws Exception {\n byte[] key = Cryptos.generateAesKey();\n String input = \"foo message\";\n\n byte[] encryptResult = Cryptos.aesEncrypt(input.getBytes(\"UTF-8\"), key);\n String descryptResult = Cryptos.aesDecrypt(encryptResult, key);\n\n System.out.println(key);\n System.out.println(descryptResult);\n }", "public static String encrypt(byte[] plaintext, byte key) {\n\t\tfor (int i = 0; i < plaintext.length; i++) {\n\t\t\tplaintext[i] = (byte) (plaintext[i] ^ key);\n\t\t}\n\t\treturn Base64.getEncoder().encodeToString(plaintext);\n\t}", "public static String encrypt(byte[] plaintext, byte key) {\n\t\tfor (int i = 0; i < plaintext.length; i++) {\n\t\t\tplaintext[i] = (byte) (plaintext[i] ^ key);\n\t\t}\n\t\treturn Base64.getEncoder().encodeToString(plaintext);\n\t}", "public String encrypt() {\n StringBuilder encryptedText = new StringBuilder();\n //Make sure the key is valid.\n if (key < 0 || key > 25) {\n Log.d(\"TAG\", \"encrypt: Error in Keu=y \");\n return \"Key Must be 0 : 25\";\n }\n if (plaintext.length() <= 0) {\n Log.d(\"TAG\", \"encrypt: Error in Plain\");\n return \"Error in Plaintext\";\n }\n //Eliminates any whitespace and non alpha char's.\n plaintext = plaintext.trim();\n plaintext = plaintext.replaceAll(\"\\\\W\", \"\");\n if (plaintext.contains(\" \")) {\n plaintext = plaintext.replaceAll(\" \", \"\");\n }\n //Makes sure that all the letters are uppercase.\n plaintext = plaintext.toUpperCase();\n Log.i(\"Caesar\", \"encrypt: plainis : \" + plaintext);\n for (int i = 0; i < plaintext.length(); i++) {\n char letter = plaintext.charAt(i);\n if (charMap.containsKey(letter) && charMap.get(letter) != null) {\n int lookUp = (charMap.get(letter) + key) % 26;\n encryptedText.append(encryptionArr[lookUp]);\n }\n }\n Log.d(\"Caesar.java\", \"encrypt: the Data is \" + encryptedText.toString());\n return encryptedText.toString();\n }", "public KeyEncryptionKeyInfo withKeyIdentifier(String keyIdentifier) {\n this.keyIdentifier = keyIdentifier;\n return this;\n }", "public String encrypt(String text) {\n\t\t\n\t\t//If key is shorter than the text, repeat keyword along length of text\n\t\tif(key.length() < text.length()) {\n\t\t\trepeatKey(text);\n\t\t}\n\t\t\n\t\ttext = text.toLowerCase();\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(int i = 0 ; i < text.length(); i++) {\n\t\t\tchar textLetter = text.charAt(i);\n\t\t\tchar keyLetter = key.charAt(i);\n\t\t\t\t\t\t\n\t\t\t//Char to encode's position in alphabet\n\t\t\tint textCharacterIndex = alphabet.indexOf(textLetter);\n\t\t\t\n\t\t\t//Only encrypt letters\n\t\t\tif(Character.isLetter(textLetter)) {\n\t\t\t\t\n\t\t\t\t//If character is in the second half of cipher A-M\n\t\t\t\tif(charMap.get(textLetter) > 12 && charMap.get(textLetter) <= 25) {\n\t\t\t\t\t\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftLeft(baseCipherRHS, keyValue);\t\t\t\t\t\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftRight(baseCipherLHS, keyValue);\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsb.append(text.charAt(i));\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "public void engineInitEncrypt (Key key)\n throws KeyException {\n Key[] keys = splitKey(key);\n\n des1.initEncrypt(keys[0]);\n des2.initDecrypt(keys[1]);\n des3.initEncrypt(keys[2]);\n }", "public static byte [] encrypt(byte [] plainText, SecretKey key){\r\n\t\ttry {\r\n\t\t\tCipher cipher = Cipher.getInstance(symmetricKeyCryptoMode);\r\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, key);\r\n\t\t\tbyte [] initVector = cipher.getIV();\r\n\t\t\tbyte [] outputBuffer = new byte [cipher.getOutputSize(plainText.length)+initVector.length+2];\r\n\t\t\tint cursor = packToByteArray(initVector, outputBuffer, 0);\r\n\t\t\tcipher.doFinal(plainText, 0, plainText.length, outputBuffer,cursor);\r\n\t\t\treturn outputBuffer;\r\n\t\t} catch (Exception e){\r\n\t\t\tthrow new ModelException(\"Error encrypting plainText \"+plainText,e);\r\n\t\t}\r\n\t}", "public static String encrypt(byte[] plaintext, byte key) {\n for (int i = 0; i < plaintext.length; i++) {\n plaintext[i] = (byte) (plaintext[i] ^ key);\n }\n return Base64.getEncoder().encodeToString(plaintext);\n }", "public String getSessionKey() {\n return sessionKey;\n }", "public void testCaesar(){\n int key1 = 23;\n int key2 = 17;\n String encrypted = encrypt(\"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\", 15);\n System.out.println(\"key is 15\" + \"\\n\" + encrypted);\n String encrypted2 = encryptTwoKeys(\"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\", 8, 21);\n System.out.println(\"key are 8 and 21\" + \"\\n\" + encrypted2);\n }", "public XoxoMessage encrypt(String message) {\n String encryptedMessage = this.encryptMessage(message); \n return new XoxoMessage(encryptedMessage, new HugKey(this.kissKey));\n }", "public String encrypt(String message, int key)\n\t{\n\t\tString encryptedMessage = \"\";\n\t\tchar ch;\n \n\t\tfor(int i = 0; i < message.length(); ++i){\n\t\t\tch = message.charAt(i);\n\t\t\t\n\t\t\tif(ch >= 'a' && ch <= 'z'){\n\t ch = (char)(ch + key);\n\t \n\t if(ch > 'z'){\n\t ch = (char)(ch - 'z' + 'a' - 1);\n\t }\n\t \n\t encryptedMessage += ch;\n\t }\n\t else if(ch >= 'A' && ch <= 'Z'){\n\t ch = (char)(ch + key);\n\t \n\t if(ch > 'Z'){\n\t ch = (char)(ch - 'Z' + 'A' - 1);\n\t }\n\t \n\t encryptedMessage += ch;\n\t }\n\t else {\n\t \tencryptedMessage += ch;\n\t }\n\t\t}\n return encryptedMessage;\n\t}", "private byte[] encryptSymmetricKey(PublicKey receiverPublicKey, SecretKey semetricKey) throws Exception {\n\t\ttry {\n\t\t\tmyCipher = Cipher.getInstance(\"RSA\");\n\t\t\tmyCipher.init(Cipher.ENCRYPT_MODE, receiverPublicKey);\n\t\t\treturn myCipher.doFinal(semetricKey.getEncoded());\n\t\t} catch (Exception e) {\n\t\t\twriteToLog(\"Error While trying to encrypt the semetric-key: \" + e.getMessage());\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception();\n\t\t}\n\n\t}", "public synchronized void encryptText() {\n setSalt(ContentCrypto.generateSalt());\n try {\n mText = ContentCrypto.encrypt(mText, getSalt(), Passphrase.INSTANCE.getPassPhrase().toCharArray());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public static String encrypt(String data){\n\t\tif (data.equals(\"\") || data.equals(\"null\"))\n\t\t\treturn data;\n\t\ttry{\n\t\t\tjavax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(CIPHER);\n\t\t\tcipher.init(javax.crypto.Cipher.ENCRYPT_MODE, new SecretKeySpec(ENCRYPTION_KEY.getBytes(Charset.forName(\"UTF-8\")), \"AES\"), new IvParameterSpec(new byte[16]));\n\t\t\tbyte[] encryptedBytes = cipher.doFinal(data.getBytes(Charset.forName(\"UTF-8\")));\n\t\t\treturn ENCRYPTION_PREFIX + new String(Base64.encodeBase64(encryptedBytes), Charset.forName(\"UTF-8\"));\n\t\t}catch (Exception e) {\n\t\t\tSystem.err.println( \"Error in EncryptionUtil.encrypt: \" + e );\n\t\t\treturn data;\n\t\t}\n\t}", "public void setEncryptionKey(Class<?> k) throws Exception\n {\n setEncryptionKey(k.getName());\n }", "public void encrypt(byte[] vanillaInformation){\n SecretKey symmetricKey = getSymmetricEncryption().createSecretKey();\n getSymmetricEncryption().encrypt(symmetricKey, vanillaInformation);\n setEncryptedInformation(getSymmetricEncryption().getEncryptedInformation());\n\n //encrypt symmetric key with user public key\n try {\n Cipher symmetricKeyEncryption = Cipher.getInstance(\"RSA\");\n symmetricKeyEncryption.init(Cipher.ENCRYPT_MODE, getPublicKey());\n setEncryptedSymmetricKey(symmetricKeyEncryption.doFinal(symmetricKey.getEncoded()));\n } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IllegalBlockSizeException | BadPaddingException e) {\n e.printStackTrace();\n }\n }", "public void encryptToPref(String prefKey, String plaintext) throws IOException, GeneralSecurityException {\n\t\tgetEncryptedPrefs().edit().putString(prefKey, plaintext).commit();\n\t}", "String getSessionKey(String sessionId) {\n return this.namespace + \"sessions:\" + sessionId;\n }", "public void setKey(Key key) {\n this.key = key;\n }", "public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;", "void setKey(K key);", "public KeyEncryptionKeyInfo keyEncryptionKeyInfo() {\n return this.keyEncryptionKeyInfo;\n }", "public void createKeyStore(String master_key) throws AEADBadTagException {\n SharedPreferences.Editor editor = getEncryptedSharedPreferences(master_key).edit();\n editor.putString(MASTER_KEY, master_key);\n editor.apply();\n\n Log.d(TAG, \"Encrypted SharedPreferences created...\");\n }", "public static String caesarCypherEncryptor(String str, int key) {\n\n key = key % 26;\n\n char[] array = str.toCharArray();\n\n for (int i = 0; i < array.length; i++) {\n int value = array[i] + key;\n if(value <= 122)\n array[i] = (char) value;\n else\n array[i] = (char) (96 + value - 122);\n }\n\n return new String(array);\n }", "public String encrypt(String plainText);", "public CryptObject reencrypt(Ciphertext ciphertext);", "String encryptString(String toEncrypt) throws NoUserSelectedException;", "OpenSSLKey mo134201a();", "public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }", "String setKey(String newKey);", "void setKey(final String key);", "public void setKey (K k) {\n key = k;\n }", "public static String Encrypt(String inputText, String key) {\n String retVal = \"\";\n try {\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n byte[] keyBytes = new byte[16];\n byte[] b = key.getBytes();\n int len = b.length;\n if (len > keyBytes.length) {\n len = keyBytes.length;\n }\n System.arraycopy(b, 0, keyBytes, 0, len);\n SecretKeySpec keySpec = new SecretKeySpec(keyBytes, \"AES\");\n IvParameterSpec ivSpec = new IvParameterSpec(keyBytes);\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n BASE64Encoder _64e = new BASE64Encoder();\n byte[] encryptedData = cipher.doFinal(inputText.getBytes());\n retVal = _64e.encode(encryptedData);\n\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }", "void setKey(String key);", "@Override\n public String encryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] encMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n encMsg[ind] = (char) ((letter + key) % 65536);\n }\n return new String(encMsg);\n }\n }", "public byte[] encrypt(final String message) throws KeyException {\n if (key == null) {\n throw new KeyException(\"Secret key not set\");\n }\n\n try {\n final Cipher cipher = Cipher.getInstance(\"AES\");\n cipher.init(Cipher.ENCRYPT_MODE, key);\n\n return cipher.doFinal(message.getBytes());\n } catch (NoSuchAlgorithmException |\n NoSuchPaddingException |\n InvalidKeyException |\n BadPaddingException |\n IllegalBlockSizeException e) {\n e.printStackTrace();\n throw new UnsupportedOperationException();\n }\n }", "public void setKey(String s){\n this.key = s;\n this.blockLen = s.length();\n }", "void encrypt(ChannelBuffer buffer, Channel c);", "public void setKey(String key) {\r\n this.key = key;\r\n }", "public void setKey(String key)\r\n {\r\n m_key = key;\r\n }", "public Encryption(String encryptionKey) throws Exception\n {\n resetSalt();\n setEncryptionKey(encryptionKey);\n }", "@Override\n public byte[] encrypt(byte[] plaintext) {\n java.security.spec.ECPoint point = hashIntoTheCurveInternal(plaintext);\n return encrypt(convertECPoint(point));\n }", "public void setKey(String key) {\n\t\tthis.key = key;\n\t}", "@Test\n\tpublic void doEncrypt() {\n\t\tString src = \"18903193260\";\n\t\tString des = \"9oytDznWiJfLkOQspiKRtQ==\";\n\t\tAssert.assertEquals(Encryptor.getEncryptedString(KEY, src), des);\n\n\t\t/* Encrypt some plain texts */\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"18963144219\");\n\t\tlist.add(\"13331673185\");\n\t\tlist.add(\"18914027730\");\n\t\tlist.add(\"13353260117\");\n\t\tlist.add(\"13370052053\");\n\t\tlist.add(\"18192080531\");\n\t\tlist.add(\"18066874640\");\n\t\tlist.add(\"15357963496\");\n\t\tlist.add(\"13337179174\");\n\t\tfor (String str : list) {\n\t\t\tSystem.out.println(Encryptor.getEncryptedString(KEY, str));\n\t\t}\n\t}", "public String encrypt(String plaintext) {\n\t\tCipher rsaCipher, aesCipher;\n\t\ttry {\n\t\t\t// Create AES key\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(\"AES\");\n\t\t\tkeyGen.init(AES_BITS);\n\t\t\tKey aesKey = keyGen.generateKey();\n\n\t\t\t// Create Random IV\n\t\t\tbyte[] iv = SecureRandom.getSeed(16);\n\t\t\tIvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n\t\t\t// Encrypt data using AES\n\t\t\taesCipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\taesCipher.init(Cipher.ENCRYPT_MODE, aesKey, ivSpec);\n\t\t\tbyte[] data = aesCipher.doFinal(plaintext.getBytes());\n\n\t\t\t// Encrypt AES key using RSA public key\n\t\t\trsaCipher = Cipher.getInstance(\"RSA/NONE/PKCS1Padding\");\n\t\t\trsaCipher.init(Cipher.ENCRYPT_MODE, this.pubKey);\n\t\t\tbyte[] encKey = rsaCipher.doFinal(aesKey.getEncoded());\n\n\t\t\t// Create output\n\t\t\tString keyResult = new String(Base64.encodeBytes(encKey, 0));\n\t\t\tString ivResult = new String(Base64.encodeBytes(iv, 0));\n\t\t\tString dataResult = new String(Base64.encodeBytes(data, 0));\n\t\t\tString result = FORMAT_ID + \"|\" + VERSION + \"|\" + this.keyId + \"|\"\n\t\t\t\t\t+ keyResult + \"|\" + ivResult + \"|\" + dataResult;\n\t\t\treturn Base64.encodeBytes(result.getBytes(), Base64.URL_SAFE);\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalBlockSizeException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (BadPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidAlgorithmParameterException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn \"Encryption_Failed\";\n\t}", "public void setKey(String key) {\r\n\t\tthis.key = key;\r\n\t}", "private String encrypt(SecretKey key, String value) {\n\t\ttry {\n\n\t\t\tCipher cipher = Cipher.getInstance(\"AES\");\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, key);\n\n\t\t\tbyte[] encrypted = cipher.doFinal(value.getBytes());\n\t\t\treturn Base64.encodeBase64String(encrypted);\n\t\t} catch (InvalidKeyException | NoSuchAlgorithmException | BadPaddingException | IllegalBlockSizeException\n\t\t\t\t| NoSuchPaddingException ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "public void setKey(String key) {\n\n this.key = key;\n }", "public final void setKey(String key) {\n this.key = key;\n }", "java.lang.String getClientKey();", "public DiskEncryptionInfo withKeyEncryptionKeyInfo(KeyEncryptionKeyInfo keyEncryptionKeyInfo) {\n this.keyEncryptionKeyInfo = keyEncryptionKeyInfo;\n return this;\n }", "public <T> SerializationStream writeKey( T key) {\n return writeObject(key);\n }", "public void setKey(final String key) {\n this.key = key;\n }", "public void setKey(String key) {\n\t\tthis.key = key;\n\t}", "public void setKey(String key) {\n\t\tthis.key = key;\n\t}", "public void setKey(String key) {\n this.key = key;\n }", "public void setKey(String key) {\n this.key = key;\n }", "public void setKey(String key) {\n this.key = key;\n }", "public void setKey(String key) {\n this.key = key;\n }", "byte[] encrypt(String plaintext);", "public void encryptionKeyId(@Nullable Integer encKeyId) {\n this.encKeyId = encKeyId;\n }" ]
[ "0.63224745", "0.6003183", "0.59280306", "0.5798162", "0.5723848", "0.57186764", "0.559605", "0.558947", "0.5571519", "0.5523285", "0.548215", "0.5476028", "0.54612106", "0.54428196", "0.5427214", "0.5421102", "0.53799677", "0.5363771", "0.5341547", "0.5334853", "0.53124475", "0.5301282", "0.52956784", "0.5292103", "0.52560115", "0.52471185", "0.5216347", "0.5216347", "0.5214778", "0.5207805", "0.51381946", "0.5116386", "0.5105702", "0.51046664", "0.51042753", "0.50981927", "0.5068505", "0.50662243", "0.50324535", "0.50324535", "0.50237465", "0.5021041", "0.4994921", "0.4982309", "0.49684882", "0.4968096", "0.4965044", "0.49641764", "0.4958373", "0.49560198", "0.49552134", "0.4953402", "0.4953014", "0.49368984", "0.4917934", "0.49098787", "0.49049962", "0.49036014", "0.49018902", "0.4881015", "0.48686063", "0.48673907", "0.4867385", "0.4858581", "0.48575526", "0.4855755", "0.4854517", "0.48542103", "0.48497653", "0.48458526", "0.48412034", "0.48377296", "0.48276755", "0.4817246", "0.48133856", "0.480681", "0.480585", "0.4803845", "0.4803389", "0.4802769", "0.4797324", "0.4791686", "0.4791537", "0.4789639", "0.4777243", "0.47762337", "0.4771464", "0.47638497", "0.47632587", "0.47628692", "0.476072", "0.47564036", "0.47486332", "0.47486332", "0.47415906", "0.47415906", "0.47415906", "0.47330007", "0.47179276", "0.47145772" ]
0.51780295
30
Generates the encrypted file header.
@Override protected FileHeader generateFileHeader(byte[] encryptedSessionKey) { FileHeader fh = new FileHeader(); fh.setEncryptedSessionKey(encryptedSessionKey); fh.setVersion(1); return fh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeHEADER() throws IOException {\n\t\tmeta.compute_checksum();\n\t\tmeta.write();\n\t\t\n\t\t// We could also generate a non-aldus metafile :\n\t\t// writeClipboardHeader(meta);\n\t\t\n\t\t// Generate the standard header common to all metafiles.\n\t\thead.write();\n\t}", "OutputFile encryptingOutputFile();", "public void writeHeader() throws IOException, FileNotFoundException {\n\n EndianCorrectOutputStream ecs;\n ByteArrayOutputStream baos;\n FileOutputStream fos;\n short s, ss[];\n byte b, bb[], ext_blob[];\n int hsize;\n int i, n;\n int extlist[][];\n\n\n // header is 348 except nii and anz/hdr w/ extensions is 352\n hsize = Nifti1.ANZ_HDR_SIZE;\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n hsize += 4;\n }\n\n try {\n\n baos = new ByteArrayOutputStream(hsize);\n fos = new FileOutputStream(header.getDs_hdrname());\n\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n\n\n ecs.writeIntCorrect(header.getSizeof_hdr());\n\n if (header.getData_type_string().length() >= 10) {\n ecs.writeBytes(header.getData_type_string().substring(0, 10));\n } else {\n ecs.writeBytes(header.getData_type_string().toString());\n for (i = 0; i < (10 - header.getData_type_string().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n if (header.getDb_name().length() >= 18) {\n ecs.writeBytes(header.getDb_name().substring(0, 18));\n } else {\n ecs.writeBytes(header.getDb_name().toString());\n for (i = 0; i < (18 - header.getDb_name().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n ecs.writeIntCorrect(header.getExtents());\n\n ecs.writeShortCorrect(header.getSession_error());\n\n ecs.writeByte((int) header.getRegular().charAt(0));\n\n b = packDimInfo(header.getFreq_dim(), header.getPhase_dim(), header.getSlice_dim());\n ecs.writeByte((int) b);\n\n for (i = 0; i < 8; i++) {\n ecs.writeShortCorrect(header.getDim()[i]);\n }\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getIntent()[i]);\n }\n\n ecs.writeShortCorrect(header.getIntent_code());\n\n ecs.writeShortCorrect(header.getDatatype());\n\n ecs.writeShortCorrect(header.getBitpix());\n\n ecs.writeShortCorrect(header.getSlice_start());\n\n for (i = 0; i < 8; i++) {\n ecs.writeFloatCorrect(header.getPixdim()[i]);\n }\n\n\n ecs.writeFloatCorrect(header.getVox_offset());\n\n ecs.writeFloatCorrect(header.getScl_slope());\n ecs.writeFloatCorrect(header.getScl_inter());\n\n ecs.writeShortCorrect(header.getSlice_end());\n\n ecs.writeByte((int) header.getSlice_code());\n\n ecs.writeByte((int) packUnits(header.getXyz_unit_code(), header.getT_unit_code()));\n\n\n ecs.writeFloatCorrect(header.getCal_max());\n ecs.writeFloatCorrect(header.getCal_min());\n\n ecs.writeFloatCorrect(header.getSlice_duration());\n\n ecs.writeFloatCorrect(header.getToffset());\n\n ecs.writeIntCorrect(header.getGlmax());\n ecs.writeIntCorrect(header.getGlmin());\n\n ecs.write(setStringSize(header.getDescrip(), 80), 0, 80);\n ecs.write(setStringSize(header.getAux_file(), 24), 0, 24);\n\n\n ecs.writeShortCorrect(header.getQform_code());\n ecs.writeShortCorrect(header.getSform_code());\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQuatern()[i]);\n }\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQoffset()[i]);\n }\n\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_x()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_y()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_z()[i]);\n }\n\n\n ecs.write(setStringSize(header.getIntent_name(), 16), 0, 16);\n ecs.write(setStringSize(header.getMagic(), 4), 0, 4);\n\n\n // nii or anz/hdr w/ ext. gets 4 more\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n for (i = 0; i < 4; i++) {\n ecs.writeByte((int) header.getExtension()[i]);\n }\n }\n\n /** write the header blob to disk */\n baos.writeTo(fos);\n\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n\n /** write the extension blobs **/\n try {\n\n ////// extensions\n if (header.getExtension()[0] != 0) {\n\n baos = new ByteArrayOutputStream(Nifti1.EXT_KEY_SIZE);\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n extlist = header.getExtensionsList();\n n = extlist.length;\n for (i = 0; i < n; i++) {\n // write size, code\n ecs.writeIntCorrect(extlist[i][0]);\n ecs.writeIntCorrect(extlist[i][1]);\n baos.writeTo(fos);\n baos.reset();\n\n // write data blob\n ext_blob = (byte[]) header.getExtension_blobs().get(i);\n fos.write(ext_blob, 0, extlist[i][0] - Nifti1.EXT_KEY_SIZE);\n }\n }\n\n fos.close();\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header extensions for file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n }", "private void generateHeader() throws IOException {\r\n\t\tcharset = Charset.forName(encoding);\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\t//first line\r\n\t\tsb.append(\"HTTP/1.1 \");\r\n\t\tsb.append(statusCode);\r\n\t\tsb.append(\" \");\r\n\t\tsb.append(statusText);\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\t//second line\r\n\t\tsb.append(\"Content-type: \");\r\n\t\tsb.append(mimeType);\r\n\t\tif (mimeType.startsWith(\"text/\")) {\r\n\t\t\tsb.append(\" ;charset= \");\r\n\t\t\tsb.append(encoding);\r\n\t\t}\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\t//third line\r\n\t\tif (contentLength > 0) {\r\n\t\t\tsb.append(\"Content-Length: \");\r\n\t\t\tsb.append(contentLength);\r\n\t\t\tsb.append(\"\\r\\n\");\r\n\t\t}\r\n\t\t\r\n\t\t//fourth line\r\n\t\tgetOutputCookies(sb);\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\toutputStream.write(sb.toString().getBytes(Charset.forName(\"ISO_8859_1\")));\r\n\t\t\r\n\t\theaderGenerated = true;\r\n\t}", "private byte[] generateHeader() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(PROTOCOL_TAG);\n\t\tsb.append(' ');\n\t\tsb.append(statusCode);\n\t\tsb.append(' ');\n\t\tsb.append(statusText);\n\t\tsb.append(LINE_SEPARATOR);\n\t\tsb.append(CONTENT_TYPE_TAG);\n\t\tsb.append(' ');\n\t\t\n\t\tif (mimeType != null && mimeType.startsWith(MIME_TYPE_CHARSET_NEEDED)) {\n\t\t\tsb.append(mimeType);\n\t\t\tsb.append(MIME_TYPE_CHARSET_ADDON);\n\t\t\tsb.append(encoding);\n\t\t} else {\n\t\t\tsb.append(mimeType);\n\t\t}\n\t\tsb.append(LINE_SEPARATOR);\n\n\t\tif (contentLength != null) {\n\t\t\tsb.append(CONTENT_LENGTH_ADDON);\n\t\t\tsb.append(contentLength);\n\t\t\tsb.append(LINE_SEPARATOR);\n\t\t}\n\n\t\tfor (var cookie : outputCookies) {\n\t\t\tsb.append(cookieOutput(cookie));\n\t\t\tsb.append(LINE_SEPARATOR);\n\t\t}\n\t\tsb.append(LINE_SEPARATOR);\n\t\treturn sb.toString().getBytes(Charset.forName(DEFAULT_HEADER_CHARSET_NAME));\n\t}", "private void createTableHeaderFile(final Class Class_, final String simpleName) throws IOException{\n final SessionFactory SessionFactory = HibernateUtil.getSingleton().getSessionFactoryLocal();\n final ClassMetadata classMetadata = SessionFactory.getClassMetadata(Class_);\n final String[] propertyNames = classMetadata.getPropertyNames();\n \n //Get the content file\n final String contentFileTableHeader = this.getContentTableHeader(simpleName,propertyNames); \n \n //Create the path\n final String className = simpleName + \"sTableHeader\"; \n final String tableHeaderPath = \"../era_views/src/main/java/com/era/views/tables/headers\";\n final String finalClassPath = tableHeaderPath + \"/\" + className + \".java\";\n \n //If the file exists delete it\n final File File = new File(finalClassPath); \n if(File.exists()){\n File.delete();\n }\n \n //Create the file\n File.createNewFile();\n \n //Write to the file\n try ( //Write the class\n FileWriter writer = new FileWriter(File)) { \n writer.write(contentFileTableHeader);\n }\n }", "private static String header() {\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "public void writeHeader() throws IOException {\n\n header = new byte[ShapeConst.SHAPE_FILE_HEADER_LENGTH];\n\n ByteUtils.writeBEInt(header, 0, ShapeConst.SHAPE_FILE_CODE);\n ByteUtils.writeBEInt(header, 24, 50);\n\n // empty shape file size in 16 bit words\n ByteUtils.writeLEInt(header, 28, ShapeConst.SHAPE_FILE_VERSION);\n ByteUtils.writeLEInt(header, 32, ShapeConst.SHAPE_TYPE_NULL);\n ByteUtils.writeLEDouble(header, 36, 0.0);\n ByteUtils.writeLEDouble(header, 44, 0.0);\n ByteUtils.writeLEDouble(header, 52, 0.0);\n ByteUtils.writeLEDouble(header, 60, 0.0);\n\n rafShp.seek(0);\n rafShp.write(header, 0, ShapeConst.SHAPE_FILE_HEADER_LENGTH);\n\n }", "private static byte[] createHeader() {\n Random r = new Random();\n\n byte[] output = new byte[12];\n\n // Create random message id\n short messageID = (short) r.nextInt(Short.MAX_VALUE + 1);\n\n // Create a buffer we can construct the header in.\n ByteBuffer buf = ByteBuffer.wrap(output);\n\n // Place the message into the buffer.\n buf.putShort(messageID);\n\n // Sets QR, OPCODE, AA, TC, RD, RA, and RCODE\n buf.put((byte)0x01);\n buf.put((byte)0x20);\n\n // QDCOUNT, we're making one request.\n buf.putShort((short) 1);\n\n // Rest are 0\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n\n return output;\n }", "public void appendHeader(File file) {\n\n int bytesLength = (int) file.length();\n byte[] header = createHeader(bytesLength - WAV_HEADER_LENGTH);\n\n try {\n RandomAccessFile ramFile = new RandomAccessFile(file, \"rw\");\n ramFile.seek(0);\n ramFile.write(header);\n ramFile.close();\n } catch (FileNotFoundException e) {\n Log.e(\"Aero\", \"Tried to append header to invalid file: \" + e.getLocalizedMessage());\n return;\n } catch (IOException e) {\n Log.e(\"Aero\", \"IO Error during header append: \" + e.getLocalizedMessage());\n return;\n }\n\n }", "public FileHeader(RandomAccessFile rafShp_) throws IOException {\n\n rafShp = rafShp_; \n\n initHeader(false); \n }", "private static String headerSummary() {\r\n\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\usepackage{rotating}\\n\";\r\n output += \"\\\\usepackage{textcomp}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "private static MessageHeader createHeader(ConnectionHeader connectionHeader, File file) {\n\n\t\tObject[] iov = new Object[4];\n\t\tiov[0] = connectionHeader.getProtocolVersion();\n\t\tiov[1]= connectionHeader.getMessageType();\n\t\tiov[2] = connectionHeader.getDataLen();\n\t\tiov[3] = connectionHeader.getMetaLen();\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\t\tif(file != null) {\n\t\t\tmh.setFilePath(file.getAbsolutePath());\n\t\t}\n\n\t\treturn mh;\n\t}", "Header createHeader();", "public static void encrypt() throws IOException{\n\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(inFilename));\n\t\tBufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(outFilename));\n\n\t\tSecureRandom randomGen = new SecureRandom(); //used for the salt and the padding\n\t\tbyte[] key; //holds the encryption key\n\n\t\t//get the file length\n\t\tlong fileLength = (new File(inFilename)).length();\n\n\t\t//write the file header marker\n\t\tout.write(FILE_HEADER);\n\n\t\t/* STAGE 1 - generate encryption key */\n\t\t//find the number of bytes we have to pad and write it to the file\n\t\tint numPad;\n\t\tif (fileLength % 8 == 0)\n\t\t\tnumPad = 0;\n\t\telse\n\t\t\tnumPad = (int)(8 - (fileLength % 8));\n\t\tout.write(numPad);\n\t\t//generate a 128-byte random salt and write it to the file\n\t\tbyte[] salt = new byte[128];\n\t\trandomGen.nextBytes(salt);\n\t\tout.write(salt);\n\t\t//generate the message for CubeHash: (password + #padded bits + random salt)\n\t\tbyte[] message = new byte[password.length + 1 + salt.length];\n\t\tSystem.arraycopy(password, 0, message, 0, password.length); //add the password\n\t\tmessage[password.length] = (byte)numPad; //add #padded bits\n\t\tSystem.arraycopy(salt, 0, message, password.length + 1, salt.length); //add random salt\n\t\t//finally, generate the encryption key\n\t\tkey = CryptoLib.CubeHash.doCubeHash(message);\n\n\t\t/* STAGE 2 - apply encryption */\n\t\tint currPiece = 0; //keeps track of which piece of the key is being used\n\t\tbyte[] currData = new byte[8]; //holds the piece of data currently being encrypted\n\n\t\t//split the key into 4 pieces of 128 bits each\n\t\tbyte[][] keyPieces = new byte[4][16];\n\t\tfor (int i = 0; i < 4; i++){\n\t\t\tSystem.arraycopy(key, i*16, keyPieces[i], 0, 16);\n\t\t}\n\n\t\t//loop through the file (except the last block), 8 bytes at a time\n\t\tfor (long i = 0; i < fileLength - 8; i += 8){\n\t\t\t//put a chunk of data in currData\n\t\t\tin.read(currData);\n\n\t\t\t//do TEA(key, RC4(key, data)), then write to file\n\t\t\tout.write(CryptoLib.TEA.doTEA(keyPieces[currPiece],\n\t\t\t\t\t\tCryptoLib.RC4.doRC4(keyPieces[currPiece], currData)));\n\n\t\t\t//increment currPiece\n\t\t\tcurrPiece = (currPiece + 1) % 4;\n\t\t}\n\n\t\t//deal with the last block of data:\n\t\t//first, read it..\n\t\tin.read(currData);\n\t\t//..pad it with random data..\n\t\tfor (int i = 7; i >= (8 - numPad); i--){\n\t\t\tcurrData[i] = (byte)randomGen.nextInt();\n\t\t}\n\t\t//..then encrypt it\n\t\tout.write(CryptoLib.TEA.doTEA(keyPieces[currPiece],\n\t\t\t\t\tCryptoLib.RC4.doRC4(keyPieces[currPiece], currData)));\n\n\t\t/* STAGE 3 - done! */\n\t\tin.close();\n\t\tout.close();\n\t\tSystem.out.println(\"\\nEncryption complete.\");\n\t}", "private void outputHeader(){\n System.out.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n pw.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n }", "private void setupHeader(final String filePath) throws IOException{\n\t\tFile headerFile = new File(filePath);\n\t\tString dataString = new String();\n\t\tBufferedReader reader = new BufferedReader(new FileReader(headerFile));\n\t\twhile((dataString = reader.readLine()) != null){\n\t\t\theaderText.append(dataString);\n\t\t\theaderText.append(System.lineSeparator());\n\t\t}\n\t\treader.close();\n\t}", "public String encode() {\n\t\treturn headerName + COLON + SP + expiryDate.encode() + NEWLINE;\n\t}", "public void createHeader() throws DocumentException\n {\n createHeader(100f, Element.ALIGN_LEFT);\n }", "String encode(File message, File key,File crypted);", "String makeHeader() {\n StringBuilder ans = new StringBuilder(\" \"); // README shows two spaces at\n String sep=\"\"; //start with nothing to separate, then switch to | to separate\n for (int i = 0; i < toDisplay.getWidth(); i++) {\n ans.append(sep);\n ans.append(i);\n sep = \"|\";\n }\n ans.append(\"\\n\");\n return ans.toString();\n }", "String prepareFile();", "public void buildClassHeader() {\n\t\tString key;\n\t\tif (isInterface) {\n\t\t\tkey = \"doclet.Interface\";\n\t\t} else if (isEnum) {\n\t\t\tkey = \"doclet.Enum\";\n\t\t} else {\n\t\t\tkey = \"doclet.Class\";\n\t\t}\n\n\t\twriter.writeHeader(configuration.getText(key) + \" \" + classDoc.name());\n\t}", "protected String createRecordHeader(WARCRecordInfo metaRecord)\n throws IllegalArgumentException {\n \tfinal StringBuilder sb =\n \t\tnew StringBuilder(2048/*A SWAG: TODO: Do analysis.*/);\n \tsb.append(WARC_ID).append(CRLF);\n sb.append(HEADER_KEY_TYPE).append(COLON_SPACE).append(metaRecord.getType()).\n append(CRLF);\n // Do not write a subject-uri if not one present.\n if (!StringUtils.isEmpty(metaRecord.getUrl())) {\n sb.append(HEADER_KEY_URI).append(COLON_SPACE).\n append(checkHeaderValue(metaRecord.getUrl())).append(CRLF);\n }\n sb.append(HEADER_KEY_DATE).append(COLON_SPACE).\n append(metaRecord.getCreate14DigitDate()).append(CRLF);\n if (metaRecord.getExtraHeaders() != null) {\n for (final Iterator<Element> i = metaRecord.getExtraHeaders().iterator(); i.hasNext();) {\n sb.append(i.next()).append(CRLF);\n }\n }\n\n sb.append(HEADER_KEY_ID).append(COLON_SPACE).append('<').\n append(metaRecord.getRecordId().toString()).append('>').append(CRLF);\n if (metaRecord.getContentLength() > 0) {\n sb.append(CONTENT_TYPE).append(COLON_SPACE).append(\n checkHeaderLineMimetypeParameter(metaRecord.getMimetype())).append(CRLF);\n }\n sb.append(CONTENT_LENGTH).append(COLON_SPACE).\n append(Long.toString(metaRecord.getContentLength())).append(CRLF);\n \t\n \treturn sb.toString();\n }", "public DetailsFileHeaderTemplate() {\n\t\tsuper(ID_HEADER_LABEL, DESCRIPTION_HEADER_LABEL, OCCURRENCES_HEADER_LABEL);\n\t}", "protected byte[] createHeader(AC35StreamMessage type, int sourceId) {\n byte[] header = super.createHeader(type);\n addFieldToByteArray(header, HEADER_SOURCE_ID, sourceId);\n return header;\n }", "@Override\n\tprotected void createCompHeader() {\n\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\tbuildCompHeader(headerTxt, icoImage);\n\t}", "private void generateHead(Class<?> token, BufferedWriter writer) throws IOException {\n String packageName = token.getPackageName();\n if (packageName != null) {\n writer.write(toUnicode(\"package\" + SPACE + packageName + EOL ));\n }\n\n String declaration = \"public class\" + SPACE + token.getSimpleName() + IMPL_SUFFIX + SPACE\n + (token.isInterface() ? \"implements\" : \"extends\") + SPACE + token.getSimpleName() + SPACE + BEGIN;\n\n writer.write(toUnicode(declaration));\n }", "private void prga(){\n int i = 0;\n int a = 0;\n int b = 0;\n StringBuilder sb = new StringBuilder();\n fileEncrypted.clear();\n\n byte[] code = new byte[filePlain.size()];\n while (i<filePlain.size()){\n a = (a + 1) % 256;\n b = (b + s_box.get(a)) % 256;\n Collections.swap(s_box, a, b);\n\n int key_int = s_box.get((s_box.get(a) + s_box.get(b))% 256);\n byte cypher = (byte) (key_int^filePlain.get(i));\n\n fileEncrypted.add(cypher);\n sb.append((char)cypher);\n code[i] = cypher;\n i++;\n }\n\n System.out.println(\"aaa\");\n// export file\n Helper.exportFile(code, extension, true);\n }", "protected void writeHeading ()\n {\n Util.writePackage (stream, entry, Util.HolderFile);\n Util.writeProlog (stream, stream.name ());\n if (entry.comment () != null)\n entry.comment ().generate (\"\", stream);\n stream.println (\"public final class \" + holderClass + \" implements org.omg.CORBA.portable.Streamable\");\n stream.println ('{');\n }", "private void initHeader(boolean newHeader) throws IOException {\n\n if (newHeader) writeHeader();\n /*\n if (rafShp.read() == -1) { \n //File is empty, write a new one (what else???)\n writeHeader();\n } \n */ \n readHeader();\n }", "private void writeHeader(FileChannel fc, AtomicLong pointer, int version, long flags)\n throws IOException {\n LogFileHeader lfg = new LogFileHeader(version, flags);\n ByteBuffer b = lfg.getBuffer();\n pointer.getAndAdd(b.remaining());\n fc.write(b);\n fc.force(true);\n }", "protected void writeHeader() throws IOException {\n _baos = new ByteArrayOutputStream();\n _dos = new DataOutputStream(_baos);\n _dos.write(PushCacheProtocol.instance().header(), 0, PushCacheProtocol.instance().header().length);\n }", "public SAMFileHeader getFileHeader() {\n return dest.getFileHeader();\n }", "private String generateFilename() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "private void _readHeader() throws PicoException, IOException {\n if (!_open)\n return;\n\n // Save the current position and move to the start of the header.\n long pos = _backing.getFilePointer();\n _backing.seek(PicoStructure.HEAD_START);\n\n // Read the header from the file. We read the fixed length portion\n // here, up through the start of the key.\n byte[] _fixedhdr = new byte[(int) PicoStructure.FIXED_HEADER_LENGTH];\n int length = _backing.read(_fixedhdr);\n\n // Make sure we have enough bytes for the magic string.\n if (length < PicoStructure.MAGIC_LENGTH - PicoStructure.MAGIC_OFFSET) {\n // The magic string was not present. This cannot be a Pico wrapper\n // file.\n throw new PicoException(\"File too short; missing magic string.\");\n }\n\n // Process the fixed portion of the header. After calling this the\n // key is allocated, but not populated.\n _head = PicoHeader.getHeader(_fixedhdr);\n\n // The hash is valid because we just read it from the file and nothing\n // has yet been written. All write methods must invalidate the hash.\n _hashvalid = true;\n\n // Go and read the key, now that we know its length. Note that we read\n // it directly into the array returned by getKey.\n length = _backing.read(_head.getKey());\n\n // Make sure we have the complete key. The only bad case is that the\n // file ends before the key is complete.\n if (length != _head.getKey().length) {\n throw new PicoException(\"File too short; incomplete key.\");\n }\n\n // Move to the original position in the file.\n _backing.seek(pos);\n\n // Ka-presto! The header has been read. Life is good.\n }", "private static Text createHeader() {\n StringBuilder stringBuilder = new StringBuilder();\n //noinspection HardCodedStringLiteral\n stringBuilder.append(\"Offset \");\n for (int i = 0; i < 16; i++) {\n stringBuilder.append(\" 0\");\n stringBuilder.append(Integer.toHexString(i));\n }\n stringBuilder.append(System.lineSeparator()).append(System.lineSeparator());\n Text result = new Text(stringBuilder.toString());\n //noinspection HardCodedStringLiteral\n result.getStyleClass().add(\"normal\");\n return result;\n }", "@Override\n\t\tprotected void writeStreamHeader() throws IOException {\n\t\t}", "public TarHeader(File file, String ppath) {\r\n this.header = new byte[TarLibConstants.TAR_HEADER_SIZE];\r\n initlializeHeaderFields(file, ppath);\r\n writeToBuffer();\r\n }", "private String createNewHeader(List<String> columns)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n for (String column : columns)\r\n {\r\n sb.append(column);\r\n sb.append(SEPARATOR);\r\n }\r\n\r\n return sb.substring(0, sb.length() - 1);\r\n }", "private void writeHeader(Cacheable[] data) throws IOException {\n // the amount of cacheables\n // for example 25 herbs\n out.writeInt(data.length);\n for (Cacheable c : data) {\n final Serializable[] cache = c.cache();\n\n // the inner array amount of each data\n // for example looped 25 times and saves each herb's amount of spawn points\n out.writeInt(cache.length);\n }\n }", "protected void write_output_header() {\t\t\n\t\tSystem.out.println(\" H Lennard-Jones lattice-switch monte carlo code: hcp v fcc:\");\n\t\tSystem.out.println(\" H \");\n\t\t// Write out the standard parts of the LSMC header:\n\t\tsuper.write_output_header();\n\t\t// Write out LJLS-specific section:\n\t\tSystem.out.println(\" H For the Lennard-Jones Lattice-Switch: \");\n\t\tSystem.out.print(\" H lj_eta = 4*beta = +\"+lj_eta+\"\\n\");\n\t\tif( VIRT_NSWC == 1 ) {\n\t\t\tSystem.out.println(\" H VIRTUAL n-switch, structure \"+INIT_PHASE+\", en_shift = \"+EN_SHIFT);\n\t\t}\n\t\t\n\t\t// Optionally output E v. density:\n\t\tif( OUTPUT_E_V_DENSITY ) calc_e_v_dens();\n\n\t}", "public static void writeHeader(DataOutput dos,SpectrumHeader spectrumHeader) throws IOException {\n\n\t\tdos.write(fileSignature);\n\t\tdos.writeInt(spectrumHeader.k);\n\t\tdos.writeLong(spectrumHeader.nkmers);\n\t}", "private static byte[] createHeader(int payloadLen, int psecret, int step, int studentID) {\n\t\tbyte[] header = new byte[ServerValuesHolder.HEADER_LENGTH];\n\t\tbyte[] payloadLen_b = new byte[4];\n\t\tbyte[] psecret_b = new byte[4];\n\t\tbyte[] step_b = new byte[2];\n\t\tbyte[] studentID_b = new byte[2];\n\t\t\n\t\t//convert to byte[]\n\t\tpayloadLen_b=ByteBuffer.allocate(4).putInt(payloadLen).array();\n\t\tpsecret_b=ByteBuffer.allocate(4).putInt(psecret).array();\n\t\tstep_b=ByteBuffer.allocate(4).putInt(step).array();\n\t\tstudentID_b=ByteBuffer.allocate(4).putInt(studentID).array();\n\t\t\n\t\t//copy to header\n\t\tSystem.arraycopy(payloadLen_b, 0, header, 0, 4);\n\t\tSystem.arraycopy(psecret_b, 0, header, 4, 4);\n\t\tSystem.arraycopy(step_b, 2, header, 8, 2);\n\t\tSystem.arraycopy(studentID_b, 2, header, 10, 2);\n\t\t\n\t\treturn header;\n\t}", "public String getPageHeader(int pageNumber) {\n pageNumber++;\n String header = \"%%Page: \" + pageNumber + \" \" + pageNumber + \"\\n\" +\n \"%%BeginPageSetup\\n\" +\n \"/pagelevel save def\\n\";\n// \"90 rotate\\n\";\n header += \"%%EndPageSetup\\n\";\n return header;\n }", "private static void encryptFile(String fileInput, String publicKeyFilename) throws Exception {\n\n\t\t// Load the public key bytes\n\t\tFileInputStream fis = new FileInputStream(publicKeyFilename);\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\n\t\tint theByte = 0;\n\t\twhile ((theByte = fis.read()) != -1) {\n\t\t\tbaos.write(theByte);\n\t\t}\n\t\tfis.close();\n\n\t\tbyte[] keyBytes = baos.toByteArray();\n\t\tbaos.close();\n\n\t\t// Turn the encoded key into a real RSA public key.\n\t\t// Public keys are encoded in X.509.\n\t\tX509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);\n\t\tKeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\t\tPublicKey publicKey = keyFactory.generatePublic(keySpec);\n\n\t\t// Open up an output file for the output of the encryption\n\t\tString fileOutput = fileInput + ENCRYPTED_FILENAME_SUFFIX;\n\t\tDataOutputStream output = new DataOutputStream(new FileOutputStream(fileOutput));\n\n\t\t// Create a cipher using that key to initialize it\n\t\tCipher rsaCipher = Cipher.getInstance(\"RSA/ECB/PKCS1Padding\");\n\t\trsaCipher.init(Cipher.ENCRYPT_MODE, publicKey);\n\n\t\t// Now create a new 256 bit Rijndael key to encrypt the file itself.\n\t\t// This will be the session key.\n\t\tKeyGenerator rijndaelKeyGenerator = KeyGenerator.getInstance(\"Rijndael\");\n\t\trijndaelKeyGenerator.init(256);\n\t\tSystem.out.println(\"Generating session key...\");\n\t\tKey rijndaelKey = rijndaelKeyGenerator.generateKey();\n\t\tSystem.out.println(\"Done generating key.\");\n\n\t\t// Encrypt the Rijndael key with the RSA cipher\n\t\t// and write it to the beginning of the file.\n\t\tbyte[] encodedKeyBytes = rsaCipher.doFinal(rijndaelKey.getEncoded());\n\t\toutput.writeInt(encodedKeyBytes.length);\n\t\toutput.write(encodedKeyBytes);\n\n\t\t// Now we need an Initialization Vector for the symmetric cipher in CBC mode\n\t\tSecureRandom random = new SecureRandom();\n\t\tbyte[] iv = new byte[16];\n\t\trandom.nextBytes(iv);\n\n\t\t// Write the IV out to the file.\n\t\toutput.write(iv);\n\t\tIvParameterSpec spec = new IvParameterSpec(iv);\n\n\t\t// Create the cipher for encrypting the file itself.\n\t\tCipher symmetricCipher = Cipher.getInstance(\"Rijndael/CBC/PKCS5Padding\");\n\t\tsymmetricCipher.init(Cipher.ENCRYPT_MODE, rijndaelKey, spec);\n\n\t\tCipherOutputStream cos = new CipherOutputStream(output, symmetricCipher);\n\n\t\tSystem.out.println(\"Encrypting the file...\");\n\n\t\tFileInputStream input = new FileInputStream(fileInput);\n\n\t\ttheByte = 0;\n\t\twhile ((theByte = input.read()) != -1) {\n\t\t\tcos.write(theByte);\n\t\t}\n\t\tinput.close();\n\t\tcos.close();\n\t\tSystem.out.println(\"File encrypted.\");\n\t\treturn;\n\t}", "public String generateWelcomeFile() {\n SettingsManager settings = initSettings();\n String welcomeFilePattern = \"\"\n + \"<h1 style='font-size: %dpt'>%s</h1>\"\n + \"%n<span style='color: %s; font-size: %dpt'>%s</span>\";\n\n Color subtitleColor = settings.getProperty(TitleConfig.SUBTITLE_COLOR);\n return String.format(welcomeFilePattern, settings.getProperty(TitleConfig.TITLE_SIZE),\n settings.getProperty(TitleConfig.TITLE_TEXT), subtitleColor.hexCode,\n settings.getProperty(TitleConfig.SUBTITLE_SIZE), settings.getProperty(TitleConfig.SUBTITLE_TEXT));\n }", "private void fileWrite(String outDir, String fileName, boolean isExtern)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile hFile = new File(outDir + fileName + \".h\");\n\t\t\tFile cFile = new File(outDir + fileName + \".c\");\n\t\t\t\n\t\t\t// create new file\n\t\t\thFile.createNewFile();\n\t\t\tcFile.createNewFile();\n\t\t\t\n\t\t\t// create file writer\n\t\t\tFileWriter hFileWriter = new FileWriter(hFile);\n\t\t\tFileWriter cFileWriter = new FileWriter(cFile);\n\n\t\t\tString variable = new String(\"const unsigned char \" + fileName + \"[\" + String.format(\"0x%x\", this.dataContent.length) + \"]\");\n\t\t\t\n\t\t\t// write .h file\n\t\t\thFileWriter.write(\"#ifndef _\" + fileName + \"_\\r\\n\");\n\t\t\thFileWriter.write(\"#define _\" + fileName + \"_\\r\\n\");\n\t\t\tif(isExtern)\n\t\t\t{\n\t\t\t\thFileWriter.write(\"\\r\\n\");\n\t\t\t\thFileWriter.write(\"#ifdef __cplusplus\\r\\n\");\n\t\t\t\thFileWriter.write(\"extern \\\"C\\\" {\\r\\n\");\n\t\t\t\thFileWriter.write(\"#endif\\r\\n\");\n\t\t\t\thFileWriter.write(\"\\r\\n\");\n\t\t\t}\n\t\t\t\n\t\t\thFileWriter.write(\"extern \" + variable + \";\\r\\n\");\n\t\t\t\n\t\t\tif(isExtern)\n\t\t\t{\n\t\t\t\thFileWriter.write(\"\\r\\n\");\n\t\t\t\thFileWriter.write(\"#ifdef __cplusplus\\r\\n\");\n\t\t\t\thFileWriter.write(\"}\\r\\n\");\n\t\t\t\thFileWriter.write(\"#endif\\r\\n\");\n\t\t\t\thFileWriter.write(\"\\r\\n\");\n\t\t\t}\n\t\t\thFileWriter.write(\"#endif\\t// _\" + fileName + \"_\\r\\n\");\n\t\t\thFileWriter.flush();\n\n\t\t\t// write .c file\n\t\t\tcFileWriter.write(variable + \" = {\");\n\t\t\tint counter = 0;\n\t\t\tfor(byte value : this.dataContent)\n\t\t\t{\n\t\t\t\tif(--counter < 0)\n\t\t\t\t{\n\t\t\t\t\tcFileWriter.write(\"\\r\\n\\t\");\n\t\t\t\t\tcounter = 15;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcFileWriter.write(String.format(\"0x%02x,\", value));\n\t\t\t}\n\t\t\tcFileWriter.write(\"\\r\\n};\\r\\n\");\n\t\t\tcFileWriter.flush();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed file write : \" + e.getMessage());\n\t\t}\n\t}", "private void emitHeader(OutputStream stream) throws IOException {\n int header = 0x0;\n header |= WORKBUF_PROTOCOL_VERSION;\n stream.write(TfWorkbufProtocol.intToFourBytes(header));\n }", "private void encryptFile() {\r\n\t\tisEncryptComplete = false;\r\n\t\tlogger.encryStart = System.currentTimeMillis();\r\n\t\tif(file == null || !file.exists())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tMDFSEncoder encoder = new MDFSEncoder(file, n1, n2, k1, k2);\r\n\t\t/*\r\n\t\t * n1=4;n2=4;k1=3;k2=4; MDFSEncoder encoder = new MDFSEncoder(file, 4,\r\n\t\t * 4, 3, 2);\r\n\t\t */\r\n\t\tif (!encoder.encode()) {\r\n\t\t\tlistener.onError(\"File Encryption Failed\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.encryStop = System.currentTimeMillis();\r\n\t\tList<FragmentInfo> fragInfos = encoder.getFileFragments();\r\n\t\tkeyShares = encoder.getKeyShares();\r\n\r\n\t\t// Store the file fragments in local SDCard\r\n\t\tFile fragsDir = AndroidIOUtils.getExternalFile(Constants.DIR_ROOT + \"/\"\r\n\t\t\t\t+ MDFSFileInfo.getDirName(file.getName(), file.lastModified()));\r\n\r\n\t\tMDFSDirectory directory = serviceHelper.getDirectory();\r\n\t\t// Create file fragments\r\n\t\tfor (FragmentInfo frag : fragInfos) {\r\n\t\t\tFile tmp = IOUtilities.createNewFile(fragsDir, frag.getFileName()\r\n\t\t\t\t\t+ \"__frag__\" + frag.getFragmentNumber());\r\n\t\t\tif (IOUtilities.writeObjectToFile(frag, tmp)) {\r\n\t\t\t\tdirectory.addFileFragment(file.lastModified(),\r\n\t\t\t\t\t\tfrag.getFragmentNumber());\r\n\t\t\t}\r\n\t\t}\r\n\t\tlistener.statusUpdate(\"Encryption Complete\");\r\n\t\tisEncryptComplete = true;\r\n\t\tdistributeFragments();\r\n\t}", "public void generateGetHeader (\n HttpServletRequest request, HttpServletResponse response)\n throws IOException\n {\n BuildHtmlHeader(new PrintWriter (response.getOutputStream()), getTitle());\n }", "private static String getProteinHeader() {\r\n return \"Protein Family No.\" + SEP\r\n + \"Protein Family Name\" + SEP\r\n + \"Spectral Count\" + SEP\r\n + \"Protein No.\" + SEP\r\n + \"Accession\" + SEP\r\n + \"Description\" + SEP\r\n + \"Species\" + SEP\r\n + \"MW [kDa]\" + SEP;\r\n }", "public static String getHeader() {\n return \"S I R\";\n }", "public void generate(File file) throws IOException;", "private void encryptionAlgorithm() {\n\t\ttry {\n\t\t\t\n\t\t\tFileInputStream fileInputStream2=new FileInputStream(\"D:\\\\program\\\\key.txt\");\n\t\t\tchar key=(char)fileInputStream2.read();\n\t\t\tSystem.out.println(key);\n\t\t\tFileInputStream fileInputStream1=new FileInputStream(\"D:\\\\program\\\\message.txt\");\n\t\t\tint i=0;\n\t\t\t\n\t\t\tStringBuilder message=new StringBuilder();\n\t\t\twhile((i= fileInputStream1.read())!= -1 )\n\t\t\t{\n\t\t\t\tmessage.append((char)i);\n\t\t\t}\n\t\t\tString s=message.toString();\n\t\t\tchar[] letters=new char[s.length()];\n\t\t\tStringBuilder en=new StringBuilder();\n\t\t\tfor(int j = 0;j < letters.length;j++)\n\t\t\t{\n\t\t\t\ten.append((char)(byte)letters[j]+key);\n\t\t\t}\t\t\n\t\t\tFileOutputStream fileoutput=new FileOutputStream(\"D:\\\\program\\\\encryptedfile.txt\");\n\t\t\t\n\t\t\tfileInputStream1.close();\n\t\t\tfileInputStream2.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}", "public String getMessageHeaderAsString(){\n String header;\n switch(messageType){\n case DELETE:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n case PUTCHUNK:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + replicationDegree + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n case ENH_AWOKE:\n header = messageType + \" \" + version + \" \" + senderId + Utils.CRLF + Utils.CRLF;\n break;\n case ENH_DELETED:\n header = messageType + \" \" + fileId + \" \" + senderId + Utils.CRLF + Utils.CRLF;\n break;\n case GETCHUNK:\n if(version.equals(Utils.ENHANCEMENT_RESTORE) || version.equals(Utils.ENHANCEMENT_ALL))\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + sender_access + \" \"+ Utils.CRLF + Utils.CRLF;\n else header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n default:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + Utils.CRLF + Utils.CRLF;\n }\n return header;\n }", "public FileHeader(RandomAccessFile rafShp_, boolean newHeader) throws IOException {\n\n rafShp = rafShp_; \n\n initHeader(newHeader); \n }", "public IMAGE_FILE_HEADER getFileHeader() { return peHeader; }", "protected ByteBuffer writeHeader()\n {\n ByteBuffer buffer = ByteBuffer.allocate(getMessageSize());\n buffer.order(ByteOrder.LITTLE_ENDIAN);\n\n buffer.put(HEADER.getBytes(), 0, 4);\n\n return buffer;\n }", "protected Convention.Key getUseKey()\n {\n return ConventionKeys.HEADER;\n }", "public abstract String header();", "public void writeHeader(int filelength, int shptype, SHPEnvelope mbr) throws IOException {\n\n header = new byte[ShapeConst.SHAPE_FILE_HEADER_LENGTH];\n\n ByteUtils.writeBEInt(header, 0, ShapeConst.SHAPE_FILE_CODE);\n ByteUtils.writeBEInt(header, 24, filelength / 2);\n ByteUtils.writeLEInt(header, 28, ShapeConst.SHAPE_FILE_VERSION);\n ByteUtils.writeLEInt(header, 32, shptype);\n ShapeUtils.writeBox(header, 36, mbr);\n\n rafShp.seek(0);\n rafShp.write(header, 0, ShapeConst.SHAPE_FILE_HEADER_LENGTH);\n }", "@Override\n \tprotected void writeHeader(BufferedWriter out, DataHolder dh) throws IOException {\n \t\tout.write(COMMENT_PREFIX);\n \t\tint imax = dh.size();\n \t\tfor (int i = 0; i < imax; i++) {\n \t\t\tout.write(dh.getName(i) + \"\\t\");\n \t\t}\n \t\tout.write(\"\\n\");\n \t}", "private void createHeaders(WritableSheet sheet)\r\n\t\t\tthrows WriteException {\n\t\taddHeader(sheet, 0, 0, reportProperties.getProperty(\"header1\"));\r\n\t\taddHeader(sheet, 1, 0, reportProperties.getProperty(\"header2\"));\r\n\t\taddHeader(sheet, 2, 0, reportProperties.getProperty(\"header3\"));\r\n\t\taddHeader(sheet, 3, 0, reportProperties.getProperty(\"header4\"));\r\n\t\t\r\n\r\n\t}", "private String generateIndexFileContent(String strImportFileName, String strClaimNumber, int iExposureID, int iClaimantID) {\n\n boolean bExposure = iExposureID >= 0;\n boolean bClaimant = iClaimantID >= 0;\n\n return\n /* Import Name */ strImportFileName +\n /* Space */ ' ' +\n /* $#IY#$ */ INDEX_INFO +\n /* Claim Number */ pad(strClaimNumber, 40) +\n /* CLMS Drawer */ DRAWER +\n /* <unused> (1) */ pad(1) +\n /* Document Type */ (bExposure ? \"EXPS\" : (bClaimant ? \"CLMT\" : \"CLAM\")) +\n /* <unused> (5) */ pad(5) +\n /* Folder Type */ (bExposure ? \"60000\" : (bClaimant ? \"60001\" : \"60002\")) +\n /* Workflow Id */ pad(\"1\", 5) +\n /* <unused> (17) */ pad(17) +\n /* Document Name */ pad(strImportFileName, 30) +\n /* Date */ getFormattedDate() +\n /* <unused> (8) */ pad(8) +\n /* Y */ \"Y\" +\n /* Document Description */ pad(encodeDocumentDescription(iExposureID, iClaimantID, strImportFileName), 50);\n }", "@Override\n protected void writeStreamHeader() throws IOException {\n // metodo honek ez du ezer egiten\n }", "public File generateFile()\r\n {\r\n return generateFile(null);\r\n }", "protected FileHeader getFileHeader(String aPath)\n {\n // Get Head branch Commit Tree and look for file\n GitFile gfile = getTree().getFile(aPath); if(gfile==null) return null;\n \n // Create file for path and commit time\n FileHeader file = new FileHeader(aPath, gfile.isDir());\n file.setModTime(_cmt.getCommitTime());\n return file;\n }", "protected PicoFile(RandomAccessFile backing, byte[] key) throws IOException {\n assert backing != null : \"Backing is null.\";\n assert key != null : \"Key is null.\";\n assert key.length > 0 : \"Key is missing.\";\n _backing = backing;\n _open = true;\n _resetDigest();\n // We are creating a new file, so truncate any existing file and\n // generate a new header.\n _backing.setLength(0L);\n _head = new PicoHeader();\n _head.setKey(key);\n\n // Now the Header size is fixed since we have the key and know the size\n // of the hash\n // we will write later.\n\n // This actually positions us to _head.offset + 0\n position(0L);\n }", "protected FileHeader getFileHeader(String aPath)\n {\n GitIndex.Entry entry = getIndex().getEntry(aPath); if(entry==null) return null;\n FileHeader file = new FileHeader(aPath, entry.isDir());\n file.setModTime(entry.getLastModified()); file.setSize(entry.getLength());\n return file;\n }", "public String getHeaderAsXML() {\n\n final String sep = System.getProperty(\"line.separator\");\n StringBuilder builder = new StringBuilder(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" + sep + \"<meta>\" + sep + \"<fits>\" + sep);\n\n HeaderCard headerCard;\n for (Cursor iter = header.iterator(); iter.hasNext();) {\n headerCard = (HeaderCard) iter.next();\n if (headerCard.getValue() != null) {\n builder.append(\"<\" + headerCard.getKey() + \">\" + headerCard.getValue() + \"</\" + headerCard.getKey() + \">\" + sep);\n }\n }\n\n builder.append(\"</fits>\" + sep + \"</meta>\");\n\n return builder.toString();\n }", "@Override\n\tpublic void setupHeaderKeyFields(EquationStandardTransaction transaction)\n\t{\n\n\t}", "public String generateHeader(String httpMethod, String url, Map<String, String> requestParams) {\n StringBuilder base = new StringBuilder();\n String nonce = getNonce();\n String timestamp = getTimestamp();\n String baseSignatureString = generateSignatureBaseString(httpMethod, url, requestParams, nonce, timestamp);\n String signature = encryptUsingHmacSHA1(baseSignatureString);\n base.append(\"OAuth \");\n append(base, oauth_consumer_key, consumerKey);\n append(base, oauth_token, token);\n append(base, oauth_signature_method, signatureMethod);\n append(base, oauth_timestamp, timestamp);\n append(base, oauth_nonce, nonce);\n append(base, oauth_version, version);\n append(base, oauth_signature, signature);\n base.deleteCharAt(base.length() - 1);\n log.debug(\"header : \" + base.toString());\n return base.toString();\n }", "public void changeHeaderFile(){\n if ( changedAttr.isEmpty() ) return;\n else {\n Set<Object> tmpAttr = changedAttr.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n for (int i = 0; i < attributes.length; i++){\n if ( headerFile.containsKey(attributes[i]) ) {\n headerFile.put(attributes[i], changedAttr.get(attributes[i]));\n // DeidData.imageHandler.findImageByDisplayName(curimage.getImageDisplayName())\n // .getHeader().put(attributes[i], changedAttr.get(attributes[i]));\n curimage.getHeader().put(attributes[i], changedAttr.get(attributes[i]));\n //System.out.println(curimage.getHeader().get(attributes[i]));\n }\n }\n curimage.changeHeader();\n \n }\n }", "public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }", "public VicarBinaryLabel getBinaryHeader() throws IOException;", "private void writePresentFilesKey() {\n writeSpacesCorrespondingToNestedLevel(COMMIT_METADATA_NEST_LEVEL);\n writer.println(\"present:\");\n }", "private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }", "protected FileHeader buildDefaultFileHeader( License license, String projectName, String inceptionYear,\n String copyrightHolder, boolean addSvnKeyWords, String encoding )\n throws IOException\n {\n FileHeader result = new FileHeader();\n\n StringBuilder buffer = new StringBuilder();\n buffer.append( projectName );\n if ( addSvnKeyWords )\n {\n // add svn keyworks\n char ls = FileHeaderTransformer.LINE_SEPARATOR;\n buffer.append( ls );\n\n // breaks the keyword otherwise svn will update them here\n //TC-20100415 : do not generate thoses redundant keywords\n// buffer.append(ls).append(\"$\" + \"Author$\");\n// buffer.append(ls).append(\"$\" + \"LastChangedDate$\");\n// buffer.append(ls).append(\"$\" + \"LastChangedRevision$\");\n buffer.append( ls ).append( \"$\" + \"Id$\" );\n buffer.append( ls ).append( \"$\" + \"HeadURL$\" );\n\n }\n result.setDescription( buffer.toString() );\n if ( getLog().isDebugEnabled() )\n {\n getLog().debug( \"header description : \" + result.getDescription() );\n }\n\n String licenseContent = license.getHeaderContent( encoding );\n result.setLicense( licenseContent );\n\n Integer firstYear = Integer.valueOf( inceptionYear );\n result.setCopyrightFirstYear( firstYear );\n\n Calendar cal = Calendar.getInstance();\n cal.setTime( new Date() );\n Integer lastYear = cal.get( Calendar.YEAR );\n if ( firstYear < lastYear )\n {\n result.setCopyrightLastYear( lastYear );\n }\n result.setCopyrightHolder( copyrightHolder );\n return result;\n }", "public interface Header {\n\n short getId();\n\n String getPhone();\n\n short getNo();\n\n short getLength();\n\n EncryptType getEncryptType();\n}", "static void headerFormat(FileWriter fw) throws IOException { \r\n\t\t//fw.append(\"\\n\");\r\n\t\tfw.append(\"levelId\");\r\n fw.append(',');\r\n fw.append(\"rideName\");\r\n fw.append(',');\r\n fw.append(\"ridestartEndLocation\");\r\n fw.append(',');\r\n fw.append(\"rideData\");\r\n fw.append('\\n');\r\n\t}", "static void homeworkHeader(){\n //homeworkHeader function which when called will produce the homework header\n putChars(30, '=');//displays 10 =\n System.out.println(\"Homework Header\");\n putChars(30, '=');//displays 10 =\n System.out.println(\"Ticket : 86713\");\n System.out.println( \"Course : CMPR 112 \");\n System.out.println( \"Student : Ben Halpern \");\n System.out.println( \"Instructor : Joel Kirscher\");\n System.out.println( \"Environment: Win 10 NetBeans \");\n System.out.println( \"Project Title : Assignment 05 - Java Methods \");\n System.out.println(\"\\n\\n\");\n //end homework header output\n }", "private String createHeadersAsDisposition()\r\n {\r\n StringBuffer buff = new StringBuffer();\r\n boolean first = true;\r\n for (Iterator iterator = getHeaders().entrySet().iterator(); iterator.hasNext();)\r\n {\r\n Map.Entry header = (Map.Entry)iterator.next();\r\n String hName = (String)header.getKey();\r\n if ( !hName.equalsIgnoreCase(AeMimeUtil.CONTENT_TYPE_ATTRIBUTE) )\r\n {\r\n if ( first )\r\n first = false;\r\n else\r\n buff.append(CRLF);\r\n buff.append(hName).append(\": \").append((String)header.getValue()); //$NON-NLS-1$/\r\n }\r\n }\r\n return buff.toString();\r\n }", "@Override\n\tprotected void createCompHeader() {\n\t\tString headerTxt = \"Cohorts Report\";\n\t\tiDartImage icoImage = iDartImage.PAVAS;\n\t\tbuildCompdHeader(headerTxt, icoImage);\n\t}", "protected String buildHeader(String documentType) {\n return (\"<?xml version=\\\"1.0\\\" ?>\" + \n \"\\n<!DOCTYPE \" + \n documentType + \n \" SYSTEM \\\"\" + \n ConocoInformation.MESSAGE_DTD + \n \"\\\">\\n\");\n }", "public static String generateHeader(Cookie cookie) {\r\n int version = cookie.getVersion();\r\n String value = cookie.getValue();\r\n String path = cookie.getPath();\r\n String domain = cookie.getDomain();\r\n String comment = cookie.getComment();\r\n\r\n if (version == 0) {\r\n // Check for the things that require a v1 cookie\r\n if (needsQuotes(value) || comment != null || needsQuotes(path) || needsQuotes(domain)) {\r\n version = 1;\r\n }\r\n }\r\n\r\n // Now build the cookie header\r\n StringBuffer buf = new StringBuffer(); // can't use StringBuilder due to DateFormat\r\n\r\n // Just use the name supplied in the Cookie\r\n buf.append(cookie.getName());\r\n buf.append(\"=\");\r\n\r\n // Value\r\n maybeQuote(buf, value);\r\n\r\n // Add version 1 specific information\r\n if (version == 1) {\r\n // Version=1 ... required\r\n buf.append (\"; Version=1\");\r\n\r\n // Comment=comment\r\n if (comment != null) {\r\n buf.append (\"; Comment=\");\r\n maybeQuote(buf, comment);\r\n }\r\n }\r\n\r\n // Add domain information, if present\r\n if (domain != null) {\r\n buf.append(\"; Domain=\");\r\n maybeQuote(buf, domain);\r\n }\r\n\r\n // Max-Age=secs ... or use old \"Expires\" format\r\n int maxAge = cookie.getMaxAge();\r\n if (maxAge >= 0) {\r\n if (version > 0) {\r\n buf.append (\"; Max-Age=\");\r\n buf.append (maxAge);\r\n }\r\n // IE6, IE7 and possibly other browsers don't understand Max-Age.\r\n // They do understand Expires, even with V1 cookies!\r\n if (version == 0 || ALWAYS_ADD_EXPIRES) {\r\n // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires Netscape format )\r\n buf.append (\"; Expires=\");\r\n // To expire immediately we need to set the time in past\r\n if (maxAge == 0) {\r\n buf.append( ancientDate );\r\n } else {\r\n OLD_COOKIE_FORMAT.get().format(\r\n new Date(System.currentTimeMillis() + maxAge * 1000L),\r\n buf,\r\n new FieldPosition(0));\r\n }\r\n }\r\n }\r\n\r\n // Path=path\r\n if (path!=null) {\r\n buf.append (\"; Path=\");\r\n maybeQuote(buf, path);\r\n }\r\n\r\n // Secure\r\n if (cookie.getSecure()) {\r\n buf.append (\"; Secure\");\r\n }\r\n\r\n // HttpOnly\r\n if (cookie.isHttpOnly()) {\r\n buf.append(\"; HttpOnly\");\r\n }\r\n return buf.toString();\r\n }", "static void encryptCTR(String filename, String key, String counter) {\n try {\n Scanner s = new Scanner(new File(filename + EXT), \"UTF-8\");\n File newFile = new File(filename + \"_CTR\" + EXT);\n newFile.delete();\n newFile.createNewFile();\n PrintWriter w = new PrintWriter(newFile);\n processHeader(s, w);\n BigInteger b = new BigInteger(counter, 16);\n while (s.hasNext()) {\n readBlock(s);\n String n = b.toString(16).toUpperCase();\n if (n.length() < 32) {\n for (int i = n.length(); i < 32; i++) {\n n = \"0\" + n;\n }\n } else if (n.length() > 32) {\n n = n.substring(0, 32);\n }\n cipherBlock = stateToBits(AES.encrypt(n, key));\n block = xor(block, cipherBlock);\n writeBlock(w);\n b.add(new BigInteger(\"1\"));\n }\n w.flush();\n w.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public byte[] generateKey()\n\t{\n\t\tImageKeyGenerate ikg = ImageKeyGenerate.getMD5SHA256();\n\t\tthis.rowKey = MyBytes.toBytes(CommonUtils.byteArrayToHexString(ikg.generate(imageData)));\n\t\treturn this.rowKey;\n\t}", "abstract public void header();", "public String getHeader() {\n\t\tString header = \"id\" + \",\" + \"chrId\" + \",\" + \"strand\" + \",\" + \"TSS\" + \",\" + \"PolyASite\"\n\t\t\t\t\t\t+ \",\" + \"5SSPos\" + \",\" + \"3SSPos\" + \",\" + \"intronLength\" + \",\" + \"terminalExonLength\"\n\t\t\t\t\t\t+ \",\" + \"BPS_3SS_distance\" + \",\" + \"PolyPyGCContent\" + \",\" + \"IntronGCContent\" + \",\" + \"terminalExonGCContent\"\n\t\t\t\t\t\t+ \",\" + \"5SS\" + \",\" + \"3SS\" + \",\" + \"BPS\"\n\t\t\t\t\t\t+ \",\" + \"5SSRank\" + \",\" + \"3SSRank\" + \",\" + \"BPSRank\"\n\t\t\t\t\t\t+ \",\" + \"5SSLevenshteinDistance\" + \",\" + \"3SSLevenshteinDistance\" + \",\" + \"BPSLevenshteinDistance\";\n\t\treturn header; \n\t}", "private void storeHeaderDataToByte() {\n\t\tString byteNumStr = String.format(\"%24s\",\n\t\t\t\tInteger.toBinaryString(encodedByte.length)).replace(' ',\n\t\t\t\t'0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(8, 16));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(16, 24));\n\n\t\t\n\t\tString widthStr = String.format(\"%16s\",\n\t\t\t\tInteger.toBinaryString(width)).replace(' ', '0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(widthStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(widthStr\n\t\t\t\t.substring(8, 16));\n\n\t\t\n\t\tString heightStr = String.format(\"%16s\",\n\t\t\t\tInteger.toBinaryString(height)).replace(' ', '0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(heightStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(heightStr\n\t\t\t\t.substring(8, 16));\n\n\t\tencodedByte[encodingIndex++] = (byte) numOfTableValue;\n\t\tencodedByte[encodingIndex++] = (byte) byteSizeForCode;\n\t\tencodedByte[encodingIndex++] = (byte) extraBits;\n\t}", "private static String getPeptideHeader() {\r\n return \"Spectrum\" + SEP\r\n + \"Peptide Sequence\" + SEP\r\n + \"No. Peptide Spectrum Matches\" + SEP\r\n + \"Protein Accession\" + SEP\r\n + \"Protein Description\" + SEP;\r\n }", "private static MessageHeader createMetaHeader(byte[] meta) {\n\t\tObject[] iov;\n\t\tif(meta != null) {\n\t\t\tiov = new Object[2];\n\t\t\tiov[0] = meta;\n\t\t\tiov[1] = JALP_BREAK_STR;\n\t\t} else {\n\t\t\tiov = new Object[1];\n\t\t\tiov[0] = JALP_BREAK_STR;\n\t\t}\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\n\t\treturn mh;\n\t}", "public void writeKeyData(File f) throws IOException;", "public void createDisplayHeader()\r\n\t{\r\n\t\tboolean isEType;\r\n\t\tint currentK, lowestJValue, highestJValue;\r\n\r\n\t\t// redundant now\r\n\t\tisEType = getIsEType();\r\n\t\tcurrentK = getCurrentK();\r\n\t\tlowestJValue = getLowestJValue();\r\n\t\thighestJValue = getHighestJValue();\r\n\r\n\t\tString symmetry;\r\n\t\tString kOutput;\r\n\r\n\t\tif (isEType) {\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput = currentK + \"\";\r\n\t\t\t\tsymmetry = \"E1\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\t\tsymmetry = \"E2\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\tsymmetry = \"A\";\r\n\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput += \"+\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput += \"-\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString ls = System.lineSeparator();\r\n\t\tmainHeader = \"================================================================\"\r\n\t\t\t\t+ ls + \"Symmetry type:\\t\\t\\t\\t\\t\" + symmetry + ls\r\n\t\t\t\t+ \"The K of the lower energy is:\\t\\t\\t\" + kOutput + ls + \"The input \"\r\n\t\t\t\t+ INPUT_BRANCH_TYPE + \" branch was flipped:\\t\\t\\t\" + inputIsFlipped + ls\r\n\t\t\t\t+ \"The input \" + INPUT_BRANCH_TYPE + \" branch used a J range of:\\t\\t\"\r\n\t\t\t\t+ lowestJValue + \" to \" + highestJValue\r\n\t\t\t\t+ ls + ls + \"Results for these selections are...\" + ls;\r\n\r\n\t\tsetHeaderDisplayState(true);\r\n\t}", "public String buildColumnHeader() {\n if (padder == null) {\n return this.destColumnName;\n }\n return padder.doPadding(this.destColumnName);\n }", "public static void encryptFile(File in, File out, Key pubKey) throws Exception {\n FileInputStream fin;\n FileOutputStream fout;\n int nread = 0; \n byte[] inbuf = new byte[1024];\n fout = new FileOutputStream(out);\n fin = new FileInputStream(in);\n\n SecureRandom random = new SecureRandom();\n // symmetric wrapping\n Key sKey = createKeyForAES(Config.SYM_CRYPTO_STR, random);\n IvParameterSpec sIvSpec = createCtrIvForAES(0, random);\n\n // encrypt symmetric key with RSA/pub key\n Cipher xCipher = Cipher.getInstance(Config.RSA_INSTANCE);\n xCipher.init(Cipher.ENCRYPT_MODE, pubKey, random);\n byte[] keyBlock = xCipher.doFinal(packKeyAndIv(sKey, sIvSpec));\n\n fout.write(keyBlock);\n\n // encrypt data with symmetric key\n Cipher sCipher = Cipher.getInstance(Config.AES_INSTANCE);\n sCipher.init(Cipher.ENCRYPT_MODE, sKey, sIvSpec);\n\n // Now read our file and encrypt it.\n while((nread = fin.read(inbuf)) > 0) {\n fout.write(sCipher.update(inbuf, 0, nread)); // cannot be null, by construction\n }\n // NB doFinal() cannot return null, but can return a zero-length array, which is benign below.\n fout.write(sCipher.doFinal());\n\n fout.flush();\n fin.close();\n fout.close();\n}", "public byte[] createHeader(int bytesLength) {\n\n int totalLength = bytesLength + 4 + 24 + 8;\n byte[] lengthData = intToBytes(totalLength);\n byte[] samplesLength = intToBytes(bytesLength);\n byte[] sampleRateBytes = intToBytes(this.sampleRate);\n byte[] bytesPerSecond = intToBytes(this.sampleRate * 2);\n\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n\n try {\n out.write(new byte[] {'R', 'I', 'F', 'F'});\n out.write(lengthData);\n out.write(new byte[] {'W', 'A', 'V', 'E'});\n\n out.write(new byte[] {'f', 'm', 't', ' '});\n out.write(new byte[] {0x10, 0x00, 0x00, 0x00}); // 16 bit chunks\n out.write(new byte[] {0x01, 0x00, 0x01, 0x00}); // mono\n out.write(sampleRateBytes); // sampling rate\n out.write(bytesPerSecond); // bytes per second\n out.write(new byte[] {0x02, 0x00, 0x10, 0x00}); // 2 bytes per sample\n out.write(new byte[] {'d', 'a', 't', 'a'});\n out.write(samplesLength);\n } catch (IOException e) {\n Log.e(\"Create WAV\", e.getMessage());\n }\n\n return out.toByteArray();\n }", "@Override\n protected void writeStreamHeader() throws IOException {\n reset();\n }", "public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}" ]
[ "0.6530802", "0.64890605", "0.6100692", "0.6004047", "0.59693694", "0.5956075", "0.582526", "0.5613517", "0.5417825", "0.54078287", "0.54057926", "0.5320187", "0.5306847", "0.52945524", "0.5272953", "0.5246835", "0.5208043", "0.5204974", "0.5204286", "0.52002597", "0.51603514", "0.51597196", "0.5158782", "0.5156708", "0.5142946", "0.51340014", "0.51173854", "0.51122516", "0.50886655", "0.50806093", "0.50703835", "0.5058115", "0.5056675", "0.50496316", "0.50434965", "0.50416636", "0.50381315", "0.5031543", "0.5029601", "0.50271285", "0.5026995", "0.50244117", "0.50197023", "0.50181687", "0.50146484", "0.5006985", "0.4999509", "0.4981378", "0.49809042", "0.4979221", "0.49648145", "0.49579594", "0.4957577", "0.4953083", "0.49482298", "0.49362305", "0.49309155", "0.49234685", "0.4919785", "0.4917801", "0.4914573", "0.4909725", "0.49071196", "0.4902447", "0.48954242", "0.48928577", "0.4890389", "0.48644167", "0.48640063", "0.4861479", "0.48575005", "0.4847755", "0.48322827", "0.4824414", "0.4824128", "0.4795159", "0.4791461", "0.47842574", "0.47815278", "0.4776581", "0.47758913", "0.47635055", "0.47593457", "0.47560617", "0.4751895", "0.474361", "0.47357908", "0.4731608", "0.4724907", "0.47215658", "0.4720374", "0.4711325", "0.4710619", "0.47024095", "0.4700757", "0.4698112", "0.4696646", "0.46903494", "0.4680282", "0.46606863" ]
0.7636285
0
/ A test for finding race conditions in initializing InputSplits
@Test public void testSplits() throws Exception { BufferedWriter writer = new BufferedWriter(new FileWriter(IN)); for(int i = 0; i < 10000; i++) { writer.write("str1" + " " + "str2" + " " + "30" + " " + "4000" + "\n"); } writer.close(); Schema schema = new Schema("schema", Fields.parse("a:string, b:string, c:int, d:long")); InputFormat inputFormat = new TupleTextInputFormat(schema, false, false, ' ', TupleTextInputFormat.NO_QUOTE_CHARACTER, TupleTextInputFormat.NO_ESCAPE_CHARACTER, FieldSelector.NONE, TupleTextInputFormat.NO_NULL_STRING); Configuration conf = getConf(); conf.setLong("mapred.min.split.size", 10 * 1024); conf.setLong("dfs.block.size", 10 * 1024); conf.setLong("mapred.max.split.size", 10 * 1024); FileSystem fS = FileSystem.get(conf); Path outPath = new Path(OUT); MapOnlyJobBuilder mapOnly = new MapOnlyJobBuilder(conf); mapOnly.addInput(new Path(IN), inputFormat, new MapOnlyMapper<ITuple, NullWritable, NullWritable, NullWritable>() { protected void map(ITuple key, NullWritable value, Context context) throws IOException, InterruptedException { Assert.assertEquals("str1", key.get("a").toString()); Assert.assertEquals("str2", key.get("b").toString()); Assert.assertEquals((Integer) 30, (Integer) key.get("c")); Assert.assertEquals((Long) 4000l, (Long) key.get("d")); context.getCounter("stats", "nlines").increment(1); }; }); HadoopUtils.deleteIfExists(fS, outPath); mapOnly.setOutput(outPath, new HadoopOutputFormat(NullOutputFormat.class), NullWritable.class, NullWritable.class); Job job = mapOnly.createJob(); try { assertTrue(job.waitForCompletion(true)); } finally { mapOnly.cleanUpInstanceFiles(); } HadoopUtils.deleteIfExists(fS, new Path(IN)); assertEquals(10000, job.getCounters().getGroup("stats").findCounter("nlines").getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException {\n\t}", "public StreamInputSplit() {\n // No-op\n }", "@Override\n\tpublic void initialize(InputSplit arg0, TaskAttemptContext arg1)\n\t\t\tthrows IOException, InterruptedException {\n\n\t}", "public Spliterator<T> trySplit() {\n/* 1309 */ HoldingConsumer<? super T> holdingConsumer = new HoldingConsumer();\n/* 1310 */ long l = this.est;\n/* 1311 */ if (l > 1L && tryAdvance(holdingConsumer)) {\n/* 1312 */ int i = this.batch + 1024;\n/* 1313 */ if (i > l)\n/* 1314 */ i = (int)l; \n/* 1315 */ if (i > 33554432)\n/* 1316 */ i = 33554432; \n/* 1317 */ Object[] arrayOfObject = new Object[i];\n/* 1318 */ byte b = 0; \n/* 1319 */ do { arrayOfObject[b] = holdingConsumer.value; } while (++b < i && tryAdvance(holdingConsumer));\n/* 1320 */ this.batch = b;\n/* 1321 */ if (this.est != Long.MAX_VALUE)\n/* 1322 */ this.est -= b; \n/* 1323 */ return new Spliterators.ArraySpliterator<>(arrayOfObject, 0, b, characteristics());\n/* */ } \n/* 1325 */ return null;\n/* */ }", "public Spliterator.OfInt trySplit() {\n/* 1419 */ HoldingIntConsumer holdingIntConsumer = new HoldingIntConsumer();\n/* 1420 */ long l = this.est;\n/* 1421 */ if (l > 1L && tryAdvance(holdingIntConsumer)) {\n/* 1422 */ int i = this.batch + 1024;\n/* 1423 */ if (i > l)\n/* 1424 */ i = (int)l; \n/* 1425 */ if (i > 33554432)\n/* 1426 */ i = 33554432; \n/* 1427 */ int[] arrayOfInt = new int[i];\n/* 1428 */ byte b = 0; \n/* 1429 */ do { arrayOfInt[b] = holdingIntConsumer.value; } while (++b < i && tryAdvance(holdingIntConsumer));\n/* 1430 */ this.batch = b;\n/* 1431 */ if (this.est != Long.MAX_VALUE)\n/* 1432 */ this.est -= b; \n/* 1433 */ return new Spliterators.IntArraySpliterator(arrayOfInt, 0, b, characteristics());\n/* */ } \n/* 1435 */ return null;\n/* */ }", "public void initializeIOBuffers(){\n for(int i=0; i<outputBuffer.length; i++){\n outputBuffer[i] = new LinkedBlockingQueue();\n inputBuffer[i] = new LinkedBlockingQueue();\n }\n }", "public InputSplit[] getSplits( JobConf job, int numSplits ) throws IOException\n {\n numSplits = numSplits == 0 ? 1 : numSplits;\n \n List<Map<String, String>> configs = getConfigs( job );\n JobConf[] jobConfs = getJobConfs( job, configs );\n InputFormat[] inputFormats = getInputFormats( jobConfs );\n int[] indexedSplits = new int[inputFormats.length];\n \n // if we need only a few, the return one for each\n if( numSplits <= inputFormats.length )\n {\n Arrays.fill( indexedSplits, 1 );\n return collapse( getSplits( inputFormats, jobConfs, indexedSplits ), configs );\n }\n \n // attempt to get splits proportionally sized per input format\n long[] inputSizes = getInputSizes( inputFormats, jobConfs );\n long totalSize = sum( inputSizes );\n \n for( int i = 0; i < inputSizes.length; i++ )\n indexedSplits[ i ] = (int) Math.ceil( numSplits * inputSizes[ i ] / totalSize );\n \n return collapse( getSplits( inputFormats, jobConfs, indexedSplits ), configs );\n }", "@Override\n public Spliterator<T> trySplit() {\n return null;\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\r\n\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n\r\n tokenizer = new StringTokenizer(\"\");\r\n\r\n }", "@BeforeEach\n @SuppressWarnings(\"unchecked\")\n public void init() {\n SENTINEL_VALUE = \"$$$\";\n PIPE_CAPACITY = 40;\n STOP_WORDS = new String[] { \"a\", \"am\", \"an\", \"and\", \"at\", \"on\", \"or\", \"so\", \"the\" };\n STOP_WORDS_MAP = new HashMap<>();\n Arrays.stream(STOP_WORDS).forEach(w -> STOP_WORDS_MAP.put(w.toLowerCase(), true));\n\n\n input = (Pipe<String>) PipeFactory.build(\"java.lang.String\", 100);\n output = (Pipe<String>) PipeFactory.build(\"java.lang.String\", 100);\n signal = new CountDownLatch(1);\n }", "@Override\n public Spliterator<Person> trySplit() {\n return null;\n }", "public Spliterator<T> trySplit() {\n/* 1771 */ Iterator<? extends T> iterator = this.it = this.collection.iterator();\n/* 1772 */ long l = this.est = this.collection.size();\n/* */ \n/* */ \n/* 1775 */ l = this.est;\n/* 1776 */ if (l > 1L && iterator.hasNext()) {\n/* 1777 */ int i = this.batch + 1024;\n/* 1778 */ if (i > l)\n/* 1779 */ i = (int)l; \n/* 1780 */ if (i > 33554432)\n/* 1781 */ i = 33554432; \n/* 1782 */ Object[] arrayOfObject = new Object[i];\n/* 1783 */ byte b = 0; \n/* 1784 */ do { arrayOfObject[b] = iterator.next(); } while (++b < i && iterator.hasNext());\n/* 1785 */ this.batch = b;\n/* 1786 */ if (this.est != Long.MAX_VALUE)\n/* 1787 */ this.est -= b; \n/* 1788 */ return new Spliterators.ArraySpliterator<>(arrayOfObject, 0, b, this.characteristics);\n/* */ } \n/* 1790 */ return null;\n/* */ }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(new InputStreamReader(input));\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "@Override\n public S trySplit(){\n return null;\n }", "public Spliterator.OfLong trySplit() {\n/* 1529 */ HoldingLongConsumer holdingLongConsumer = new HoldingLongConsumer();\n/* 1530 */ long l = this.est;\n/* 1531 */ if (l > 1L && tryAdvance(holdingLongConsumer)) {\n/* 1532 */ int i = this.batch + 1024;\n/* 1533 */ if (i > l)\n/* 1534 */ i = (int)l; \n/* 1535 */ if (i > 33554432)\n/* 1536 */ i = 33554432; \n/* 1537 */ long[] arrayOfLong = new long[i];\n/* 1538 */ byte b = 0; \n/* 1539 */ do { arrayOfLong[b] = holdingLongConsumer.value; } while (++b < i && tryAdvance(holdingLongConsumer));\n/* 1540 */ this.batch = b;\n/* 1541 */ if (this.est != Long.MAX_VALUE)\n/* 1542 */ this.est -= b; \n/* 1543 */ return new Spliterators.LongArraySpliterator(arrayOfLong, 0, b, characteristics());\n/* */ } \n/* 1545 */ return null;\n/* */ }", "@Override\n public void initialize(InputSplit inputSplit, TaskAttemptContext taskAttemptContext) {\n jiraClient = new JiraClient(config);\n SearchResult searchResult = jiraClient.getSearchResult(startAt);\n issueIterator = searchResult.getIssues().iterator();\n issuesCount = searchResult.getTotal();\n }", "private int[] prepareSplit(String sampleFile, String featureDefFile, double percentTrain, boolean normalize, List<RankList> trainingData, List<RankList> testData) {\n/* 1430 */ List<RankList> data = readInput(sampleFile);\n/* */ \n/* */ \n/* 1433 */ int[] features = readFeature(featureDefFile);\n/* */ \n/* */ \n/* 1436 */ if (features == null) {\n/* 1437 */ features = FeatureManager.getFeatureFromSampleVector(data);\n/* */ }\n/* 1439 */ if (normalize) {\n/* 1440 */ normalize(data, features);\n/* */ }\n/* 1442 */ FeatureManager.prepareSplit(data, percentTrain, trainingData, testData);\n/* 1443 */ return features;\n/* */ }", "protected abstract void splitBAMs();", "@Override\n protected void validatePipeInput(TabbedLineReader inputStream) throws IOException {\n int col1idx = inputStream.findField(this.col1Name);\n int col2idx = inputStream.findField(this.col2Name);\n // Create the pair list.\n this.pairs = new GenomePairList();\n // Now read the genome ID pairs.\n log.info(\"Reading genome pairs.\");\n for (var line : inputStream) {\n String g1 = line.get(col1idx);\n String g2 = line.get(col2idx);\n this.pairs.addPair(g1, g2);\n }\n log.info(\"{} genome pairs to process.\", this.pairs.size());\n }", "public ParallelMinimalSeparatorsEnumerator()\n {\n super();\n Q = new ConcurrentQueueSet<>();\n P = ConcurrentHashMap.newKeySet();\n componentsCache = ConcurrentHashMap.newKeySet();\n }", "static boolean checkSplits (double[] splits) { throw new RuntimeException(); }", "public void testReadingConstructor() throws IOException {\n\t\tLocalRawDataBlockList list = new LocalRawDataBlockList();\r\n\r\n\t\tlist.createNewXBATBlock(4, 130, 1);\r\n\t\tlist.createNewXBATBlock(131, 131, -2);\r\n\t\tfor (int j = 0; j < 130; j++) {\r\n\t\t\tlist.createNewBATBlock(j * 128);\r\n\t\t}\r\n\t\tlist.fill(132);\r\n\t\tint[] blocks = { 2, 3 };\r\n\t\tBlockAllocationTableReader table = new BlockAllocationTableReader(\r\n\t\t POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, 130, blocks, 2, 0, list);\r\n\r\n\t\tfor (int i = 0; i < (130 * 128); i++) {\r\n\t\t\tif (i % 256 == 0) {\r\n\t\t\t\tassertTrue(\"verifying block \" + i + \" is unused\", !table.isUsed(i));\r\n\t\t\t} else if (i % 256 == 255) {\r\n\t\t\t\tassertEquals(\"Verify end of chain for block \" + i, POIFSConstants.END_OF_CHAIN,\r\n\t\t\t\t\t\ttable.getNextBlockIndex(i));\r\n\t\t\t} else {\r\n\t\t\t\tassertEquals(\"Verify next index for block \" + i, i + 1, table.getNextBlockIndex(i));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public InputSplit getInputSplit() {\n byte[] serializedSplit = state.getSerializedInputSplit();\n String splitClassName = state.getInputSplitClassName();\n return SerializationUtil.deserializeFromByteArray(\n getConfiguration(), InputSplit.class, splitClassName, serializedSplit, null);\n }", "@Before\n public void init() {\n this.queue.push(\"work1\");\n this.queue.push(\"work2\");\n this.queue.push(\"work3\");\n this.queue.push(\"work4\");\n this.it = queue.iterator();\n }", "public abstract RecordReader<K , V> createRecordReader(InputSplit inputSplit) throws IOException, SfsFileDoesNotExistException;", "@Test\n public void doGetSplits()\n throws Exception\n {\n logger.info(\"doGetSplits: enter\");\n\n List<String> partitionCols = new ArrayList<>();\n String index = \"customer\";\n\n Block partitions = BlockUtils.newBlock(allocator, \"partitionId\", Types.MinorType.INT.getType(), 0);\n\n String continuationToken = null;\n GetSplitsRequest originalReq = new GetSplitsRequest(fakeIdentity(),\n \"queryId\",\n \"elasticsearch\",\n new TableName(\"movies\", index),\n partitions,\n partitionCols,\n new Constraints(new HashMap<>()),\n null);\n\n GetSplitsRequest req = new GetSplitsRequest(originalReq, continuationToken);\n\n logger.info(\"doGetSplits: req[{}]\", req);\n\n // Setup domain and endpoint\n String domain = \"movies\";\n String endpoint = \"https://search-movies-ne3fcqzfipy6jcrew2wca6kyqu.us-east-1.es.amazonaws.com\";\n when(domainMapProvider.getDomainMap(null)).thenReturn(ImmutableMap.of(domain, endpoint));\n\n when(mockClient.getShardIds(nullable(String.class), anyLong())).thenReturn(ImmutableSet\n .of(new Integer(0), new Integer(1), new Integer(2)));\n\n IndicesClient indices = mock(IndicesClient.class);\n GetIndexResponse mockIndexResponse = mock(GetIndexResponse.class);\n when(mockIndexResponse.getIndices()).thenReturn(new String[]{index});\n when(indices.get(nullable(GetIndexRequest.class), eq(RequestOptions.DEFAULT))).thenReturn(mockIndexResponse);\n when(mockClient.indices()).thenReturn(indices);\n\n // Instantiate handler\n handler = new ElasticsearchMetadataHandler(awsGlue, new LocalKeyFactory(), awsSecretsManager, amazonAthena,\n \"spill-bucket\", \"spill-prefix\", domainMapProvider, clientFactory, 10, com.google.common.collect.ImmutableMap.of());\n\n // Call doGetSplits()\n MetadataResponse rawResponse = handler.doGetSplits(allocator, req);\n assertEquals(MetadataRequestType.GET_SPLITS, rawResponse.getRequestType());\n\n GetSplitsResponse response = (GetSplitsResponse) rawResponse;\n continuationToken = response.getContinuationToken();\n\n logger.info(\"doGetSplits: continuationToken[{}] - numSplits[{}]\",\n new Object[] {continuationToken, response.getSplits().size()});\n\n // Response should contain 2 splits.\n assertEquals(\"Response has invalid number of splits\", 3, response.getSplits().size());\n\n Set<String> shardIds = new HashSet<>(2);\n shardIds.add(\"_shards:0\");\n shardIds.add(\"_shards:1\");\n shardIds.add(\"_shards:2\");\n response.getSplits().forEach(split -> {\n assertEquals(endpoint, split.getProperty(domain));\n String shard = split.getProperty(ElasticsearchMetadataHandler.SHARD_KEY);\n assertTrue(\"Split contains invalid shard: \" + shard, shardIds.contains(shard));\n String actualIndex = split.getProperty(ElasticsearchMetadataHandler.INDEX_KEY);\n assertEquals(\"Split contains invalid index:\" + index, index, actualIndex);\n shardIds.remove(shard);\n });\n\n assertTrue(\"Continuation criteria violated\", response.getContinuationToken() == null);\n\n logger.info(\"doGetSplits: exit\");\n }", "@Override\n\t\tprotected void setup(Context context) throws IOException, InterruptedException {\n\t\t\tFileSplit inputSplit = (FileSplit) context.getInputSplit();\n\t\t\tname = inputSplit.getPath().getName();\n\t\t}", "@Test\n @Issue(\"JENKINS-41685\")\n public void testParallelsWithDuplicateEvents() throws Exception {\n //https://gist.github.com/vivek/ccf3a4ef25fbff267c76c962d265041d\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"ParallelInsanity\");\n job.setDefinition(new CpsFlowDefinition(\"\" +\n \"echo 'first stage'\\n\" +\n \"parallel left : {\\n\" +\n \" echo 'run a bit'\\n\" +\n \" echo 'run a bit more'\\n\" +\n \" semaphore 'wait1'\\n\" +\n \"}, right : {\\n\" +\n \" echo 'wozzle'\\n\" +\n \" semaphore 'wait2'\\n\" +\n \"}\\n\" +\n \"echo 'last stage'\\n\" +\n \"echo \\\"last done\\\"\\n\",\n true));\n ForkScanner scan = new ForkScanner();\n ChunkFinder labelFinder = new NoOpChunkFinder();\n WorkflowRun run = job.scheduleBuild2(0).getStartCondition().get();\n SemaphoreStep.waitForStart(\"wait1/1\", run);\n SemaphoreStep.waitForStart(\"wait2/1\", run);\n\n TestVisitor test = new TestVisitor();\n List<FlowNode> heads = run.getExecution().getCurrentHeads();\n scan.setup(heads);\n scan.visitSimpleChunks(test, labelFinder);\n\n SemaphoreStep.success(\"wait1\"+\"/1\", null);\n SemaphoreStep.success(\"wait2\"+\"/1\", null);\n r.waitForCompletion(run);\n\n int atomEventCount = 0;\n int parallelBranchEndCount = 0;\n int parallelStartCount = 0;\n for (TestVisitor.CallEntry ce : test.calls) {\n switch (ce.type) {\n case ATOM_NODE:\n atomEventCount++;\n break;\n case PARALLEL_BRANCH_END:\n parallelBranchEndCount++;\n break;\n case PARALLEL_START:\n parallelStartCount++;\n break;\n default:\n break;\n }\n }\n\n sanityTestIterationAndVisiter(heads);\n Assert.assertEquals(10, atomEventCount);\n Assert.assertEquals(1, parallelStartCount);\n Assert.assertEquals(2, parallelBranchEndCount);\n }", "private void init() {\n\n MyFileReader finalResultReader = null;\n\n finalResultReader = new MyFileReader(FilePath.billboardCombineResultPath);\n\n String line = \"\";\n\n while (true) {\n\n line = finalResultReader.getNextLine();\n if (line == null)\n break;\n\n String[] elements = line.split(\" \");\n if (elements.length == 1)\n continue; // skip those billboard which can not influence any route\n\n String panelID = elements[0].split(\"~\")[0]; // panelID~weeklyImpression\n int weeklyImpression = Integer.parseInt(elements[0].split(\"~\")[1]);\n\n\n List<Integer> routeIDs = new ArrayList<>();\n\n for (int i = 1; i < elements.length; i++) {\n\n int routeID = Integer.parseInt(elements[i]);\n //if (routeID < length) {\n routeIDs.add(routeID);\n //}\n }\n\n panelIDs.add(panelID);\n weeklyImpressions.add(weeklyImpression);\n routeIDsOfBillboards.add(routeIDs);\n\n }\n setUpRouteIDsAndIndexes();\n finalResultReader.close();\n }", "@Test (timeout=180000)\n public void testValidLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(Bytes.toBytes(\"B\"));\n\n meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = location.getRegionInfo();\n\n // do a regular split\n byte[] regionName = location.getRegionInfo().getRegionName();\n admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes(\"BM\"));\n TestEndToEndSplitTransaction.blockUntilRegionSplit(conf, 60000, regionName, true);\n\n // TODO: fixHdfsHoles does not work against splits, since the parent dir lingers on\n // for some time until children references are deleted. HBCK erroneously sees this as\n // overlapping regions\n HBaseFsck hbck = doFsck(\n conf, true, true, false, false, false, true, true, true, false, false, false, null);\n assertErrors(hbck, new ERROR_CODE[] {}); //no LINGERING_SPLIT_PARENT reported\n\n // assert that the split hbase:meta entry is still there.\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertNotNull(result);\n assertNotNull(MetaTableAccessor.getHRegionInfo(result));\n\n assertEquals(ROWKEYS.length, countRows());\n\n // assert that we still have the split regions\n assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split.\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n IOUtils.closeQuietly(meta);\n }\n }", "public InputSplit getInputSplit() {\n return inputSplit;\n }", "abstract E createSplit(RandomAccessFile raf, long length) throws IOException;", "@Override\n public Spliterator<SampleDescriptor> trySplit() {\n Spliterator<SampleDescriptor> retVal;\n // If there is only one sample left we don't split.\n int remaining = this.samples.size() - this.pos;\n if (remaining <= 1)\n retVal = null;\n else {\n // Compute the size for the entire list. This will be our running total of the size of the\n // remaining samples.\n long total = this.length();\n // Set up the new list.\n List<SampleDescriptor> newList = new ArrayList<SampleDescriptor>(remaining - 1);\n long newTotal = 0;\n // Loop until the old list is almost empty or it is smaller or equal to the new list, moving samples\n // from the end of the old list to the beginning of the new list.\n for (int tail = this.samples.size() - 1; tail > this.pos && newTotal < total; tail--) {\n // Move the last element in the old list to the new list.\n SampleDescriptor popped = this.samples.remove(tail);\n newList.add(popped);\n // Adjust the lengths.\n long len = popped.estimatedSize();\n total -= len;\n newTotal += len;\n }\n // Create a spliterator from the new list.\n retVal = new Splitter(newList);\n }\n return retVal;\n }", "private static String[] lineSplit(String input) {\r\n String[] tokens = input.split(delimiter);\r\n return tokens;\r\n }", "private static int Initialize (String[] list)\n {\n\t\tString filename, stateInput;\n \t\tint i = 0, numItems = 0;\n \t \ttry {\n System.out.print(\"Input File : \");\n Scanner stdin = new Scanner(System.in);\n filename = stdin.nextLine();\n stdin = new Scanner(new File(filename));\n\n while ((stdin.hasNext()) && (i < list.length))\n {\n stateInput = stdin.nextLine();\n System.out.println(\"S = \" + stateInput);\n list[i] = stateInput;\n i++;\n }\n numItems = i;\n }\n catch (IOException e) {\n System.out.println(e.getMessage());\n }\n return numItems;\n }", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "void initBeforeParsing() {\r\n }", "public FileInputTools(SharedBuffer buffer, int bufferInputFileLength) throws Exception {\r\n\t\tsuper (buffer);\r\n\t\tthis.reset();\r\n\t\tthis.bufferInputFileLength = bufferInputFileLength;\r\n\t\tthis.initializeStream();\r\n\t}", "private void assignBuffer(List<TupleReaderBinary> buffers, int bufferID) {\n\t\tif (readerBucketID < prevTotalBuckets && readerBucketID < numInputBuffers * currentGroup) {\n\t\t\tTupleReaderBinary readerBinary = new TupleReaderBinary(DatabaseCatalog.getInstance().getTempDirectory()\n\t\t\t\t\t+ \"/\" + instanceHashcode + \"_\" + (passNumber - 1) + \"_\" + readerBucketID);\n\t\t\treaderBinary.keyNames = ordering;\n\t\t\tbuffers.set(bufferID, readerBinary);\n\t\t\treaderBucketID++;\n\t\t} else {\n\t\t\tbuffers.set(bufferID, null);\n\t\t}\n\t}", "@Test\n public void testMultiChannelNoBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n createBuffer(2),\n createBuffer(2),\n createBuffer(0),\n createBuffer(1),\n createBuffer(0),\n createEndOfPartition(0),\n createBuffer(3),\n createBuffer(1),\n createEndOfPartition(3),\n createBuffer(1),\n createEndOfPartition(1),\n createBuffer(2),\n createEndOfPartition(2)\n };\n inputGate = createCheckpointedInputGate(4, sequence);\n\n for (BufferOrEvent boe : sequence) {\n assertEquals(boe, inputGate.pollNext().get());\n }\n\n assertEquals(0L, inputGate.getAlignmentDurationNanos());\n }", "protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}", "@Test\n public void test() {\n bridge.chunk(\"file.txt\", new InputStreamReader(new ByteArrayInputStream(new byte[0]), StandardCharsets.UTF_8));\n List<TokensLine> lines = bridge.chunk(\"file.txt\", new InputStreamReader(new ByteArrayInputStream(new byte[0]), StandardCharsets.UTF_8));\n\n assertThat(lines.size(), is(3));\n\n TokensLine line = lines.get(0);\n // 2 tokens on 1 line\n assertThat(line.getStartUnit(), is(1));\n assertThat(line.getEndUnit(), is(2));\n\n assertThat(line.getStartLine(), is(1));\n assertThat(line.getEndLine(), is(1));\n assertThat(line.getHashCode(), is(\"t1t2\".hashCode()));\n\n line = lines.get(1);\n // 1 token on 2 line\n assertThat(line.getStartUnit(), is(3));\n assertThat(line.getEndUnit(), is(3));\n\n assertThat(line.getStartLine(), is(2));\n assertThat(line.getEndLine(), is(2));\n assertThat(line.getHashCode(), is(\"t3\".hashCode()));\n\n line = lines.get(2);\n // 3 tokens on 4 line\n assertThat(line.getStartUnit(), is(4));\n assertThat(line.getEndUnit(), is(6));\n\n assertThat(line.getStartLine(), is(4));\n assertThat(line.getEndLine(), is(4));\n assertThat(line.getHashCode(), is(\"t1t3t3\".hashCode()));\n }", "@Test\n public void testSplitOnCreatedSegment() throws Exception {\n InternalKnowledgeBase kbase1 = buildKnowledgeBase(\"r1\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) X(1;) X(2;) E(1;) E(2;)\\n\");\n kbase1.addPackages( buildKnowledgePackage(\"r2\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) X(1;) X(2;) E(1;) E(2;)\\n\") );\n kbase1.addPackages( buildKnowledgePackage(\"r3\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) X(1;) X(2;)\\n\") );\n kbase1.addPackages( buildKnowledgePackage(\"r4\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) \\n\") );\n\n InternalWorkingMemory wm = ((InternalWorkingMemory)kbase1.newKieSession());\n List list = new ArrayList();\n wm.setGlobal(\"list\", list);\n\n wm.insert(new X(1));\n wm.insert(new X(2));\n wm.insert(new X(3));\n wm.flushPropagations();\n\n RuleTerminalNode rtn1 = getRtn( \"org.kie.r1\", kbase1 );\n\n PathMemory pm1 = wm.getNodeMemory(rtn1);\n assertThat(pm1.getLinkedSegmentMask()).isEqualTo(2);\n SegmentMemory[] smems = pm1.getSegmentMemories();\n assertThat(smems.length).isEqualTo(4);\n assertThat(smems[0]).isNull();\n assertThat(smems[2]).isNull();\n assertThat(smems[3]).isNull();\n SegmentMemory sm = smems[1];\n assertThat(sm.getPos()).isEqualTo(1);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(2);\n\n\n kbase1.addPackages( buildKnowledgePackage(\"r5\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) X(1;) X(3;)\\n\") );\n wm.fireAllRules();\n\n assertThat(pm1.getLinkedSegmentMask()).isEqualTo(6);\n smems = pm1.getSegmentMemories();\n assertThat(smems.length).isEqualTo(5);\n assertThat(smems[0]).isNull();\n assertThat(smems[3]).isNull();\n assertThat(smems[4]).isNull();\n sm = smems[1];\n assertThat(sm.getPos()).isEqualTo(1);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(2);\n\n sm = smems[2];\n assertThat(sm.getPos()).isEqualTo(2);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(4);\n\n RuleTerminalNode rtn5 = getRtn( \"org.kie.r5\", kbase1 );\n PathMemory pm5 = wm.getNodeMemory(rtn5);\n assertThat(pm5.getLinkedSegmentMask()).isEqualTo(6);\n\n smems = pm5.getSegmentMemories();\n assertThat(smems.length).isEqualTo(3);\n assertThat(smems[0]).isNull();\n sm = smems[1];\n assertThat(sm.getPos()).isEqualTo(1);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(2);\n\n sm = smems[2];\n assertThat(sm.getPos()).isEqualTo(2);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(4);\n }", "void loadNextSplit() throws IOException {\n\t\tcurrentRAF = null;\n\t\t\n\t\tif (! fsIterator.hasNext()) return;\n\n\t\t// Go through the loop for one iteration loop cycle only\n\t\tint cycle = fsIterator.cycle();\n\n\t\twhile (cycle > 0) {\n\t\t\tfsIterator.next();\n\t\t\tloadNextSplitCurrentDir();\n\t\t\tif (hasNext()) \n\t\t\t\tbreak;\n\t\t\tcycle --;\n\t\t}\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n range0.getBegin();\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public ConsList<String> tryToConsumeInput( ConsList<String> unprocessedInput );", "private boolean prepareInput(SequenceI[] seqs, int minlen)\n {\n int nseqs = 0;\n if (minlen < 0)\n {\n throw new Error(\n \"Implementation error: minlen must be zero or more.\");\n }\n for (int i = 0; i < seqs.length; i++)\n {\n if (seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)\n {\n nseqs++;\n }\n }\n boolean valid = nseqs > 1; // need at least two seqs\n vamsas.objects.simple.Sequence[] seqarray = (valid) ? new vamsas.objects.simple.Sequence[nseqs]\n : null;\n for (int i = 0, n = 0; i < seqs.length; i++)\n {\n\n String newname = jalview.analysis.SeqsetUtils.unique_name(i); // same\n // for\n // any\n // subjob\n SeqNames.put(newname,\n jalview.analysis.SeqsetUtils.SeqCharacterHash(seqs[i]));\n if (valid && seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)\n {\n seqarray[n] = new vamsas.objects.simple.Sequence();\n seqarray[n].setId(newname);\n seqarray[n++].setSeq((submitGaps) ? seqs[i].getSequenceAsString()\n : AlignSeq.extractGaps(jalview.util.Comparison.GapChars,\n seqs[i].getSequenceAsString()));\n }\n else\n {\n String empty = null;\n if (seqs[i].getEnd() >= seqs[i].getStart())\n {\n empty = (submitGaps) ? seqs[i].getSequenceAsString() : AlignSeq\n .extractGaps(jalview.util.Comparison.GapChars,\n seqs[i].getSequenceAsString());\n }\n emptySeqs.add(new String[]\n { newname, empty });\n }\n }\n this.seqs = new vamsas.objects.simple.SequenceSet();\n this.seqs.setSeqs(seqarray);\n return valid;\n }", "@Before\n\tpublic void StringProcessorTestInit() {\n\t\ttry {\n\t\t\tstopWordTree.importFile(\"stopWords.txt\");\n\t\t} catch (IOException e1) {\n\t\t\tfail(\"IOException: Check for stopword filename.\");\n\t\t}\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"stopWords.txt\"));\n\t\t\tstopWords = in.useDelimiter(\"\\\\A\").next();\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"FileNoteFoundException: Check filename.\");\n\t\t}\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"testTextFiles/unitTest.txt\"));\n\t\t\ttestString = in.useDelimiter(\"\\\\A\").next();\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"FileNoteFoundException: Check filename.\");\n\t\t}\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\n\t\t\t\t\t\"testTextFiles/removeAlphaNum.txt\"));\n\t\t\tremoveAlphaNumTest = in.useDelimiter(\"\\\\A\").next();\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"FileNoteFoundException: Check filename.\");\n\t\t}\n\t\ttry {\n\t\t\tScanner in = new Scanner(\n\t\t\t\t\tnew File(\"testTextFiles/negationParse.txt\"));\n\t\t\tnegationParseTest = in.useDelimiter(\"\\\\A\").next();\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"FileNoteFoundException: Check filename.\");\n\t\t}\n\t\tbiGrams = testBiGram.split(\", \");\n\t}", "@Test\n public void testStreamParsePubDev3401() throws IOException {\n final int chunkSize = 64 * 1024;\n ParseSetupV3 ps = new ParseSetupV3();\n ps.parse_type = \"CSV\";\n ps.chunk_size = chunkSize;\n // mock Parser\n final List<Integer> pcCalls = new LinkedList<>();\n Parser p = new Parser(new ParseSetup(ps), null) {\n @Override protected ParseWriter parseChunk(int cidx, ParseReader din, ParseWriter dout) {\n pcCalls.add(cidx);\n byte[] data = din.getChunkData(cidx);\n assert cidx <= 3;\n assert ((data != null) && (data.length == chunkSize)) || (cidx == 3);\n return null;\n }\n };\n // mock source InputStream, only used for \"back-channel\" chunk index signalling\n final Queue<Integer> cidxs = new LinkedList<>(Arrays.asList(1, 2, 3, 4));\n InputStream bvs = new InputStream() {\n @Override public int read() throws IOException { throw new UnsupportedOperationException(); }\n @Override public int read(byte[] b, int off, int len) throws IOException {\n assert b == null;\n return cidxs.remove();\n }\n };\n // mock StreamParseWriter\n MockStreamParseWriter w = new MockStreamParseWriter(chunkSize);\n // Vec made of 3 chunks\n Key k = FVecFactory.makeByteVec(\n RandomStringUtils.randomAscii(chunkSize),\n RandomStringUtils.randomAscii(chunkSize),\n RandomStringUtils.randomAscii(chunkSize)\n );\n try {\n ByteVec v = DKV.getGet(k);\n p.streamParseZip(v.openStream(null), w, bvs);\n assertEquals(\"Expected calls to parseChunk()\", Arrays.asList(0, 1, 2, 3), pcCalls);\n assertEquals(\"Expected calls to nextChunk()\", Arrays.asList(0, 1, 2), w._nchks);\n } finally {\n k.remove();\n }\n }", "public SplitFile() {\n\t}", "@Override\n public List<UnboundedAmqpSource> split(int desiredNumSplits, PipelineOptions pipelineOptions) {\n List<UnboundedAmqpSource> sources = new ArrayList<>();\n for (int i = 0; i < Math.max(1, desiredNumSplits); ++i) {\n sources.add(new UnboundedAmqpSource(spec));\n }\n return sources;\n }", "private void splitState( State state, int i, State split, List<State> result)\n {\n if ( split == null)\n {\n State v1 = copy( state);\n v1.stackOps[ i] = nullShift;\n result.add( v1);\n }\n \n State v2 = copy( state);\n v2.stackOps[ i-1] = nullShift;\n result.add( v2);\n }", "private void createPartitions() {\n \tfor (int attrOrd : splitAttrs) {\n \t\tFeatureField featFld = schema.findFieldByOrdinal(attrOrd);\n \t\tif (featFld.isInteger()) {\n \t\t\t//numerical\n \t\t\tList<Integer[]> splitList = new ArrayList<Integer[]>();\n \t\t\tInteger[] splits = null;\n \t\t\tcreateNumPartitions(splits, featFld, splitList);\n \t\t\t\n \t\t\t//collect all splits\n \t\t\tfor (Integer[] thisSplit : splitList) {\n \t\t\t\tsplitHandler.addIntSplits(attrOrd, thisSplit);\n \t\t\t}\n \t\t} else if (featFld.isCategorical()) {\n \t\t\t//categorical\n \t\t\tint numGroups = featFld.getMaxSplit();\n \t\t\tif (numGroups > maxCatAttrSplitGroups) {\n \t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\"more than \" + maxCatAttrSplitGroups + \" split groups not allwed for categorical attr\");\n \t\t\t}\n \t\t\t\n \t\t\t//try all group count from 2 to max\n \t\t\tList<List<List<String>>> finalSplitList = new ArrayList<List<List<String>>>();\n \t\t\tfor (int gr = 2; gr <= numGroups; ++gr) {\n \t\t\t\tLOG.debug(\"num of split sets:\" + gr);\n \t\t\t\tList<List<List<String>>> splitList = new ArrayList<List<List<String>>>();\n \t\t\t\tcreateCatPartitions(splitList, featFld.getCardinality(), 0, gr);\n \t\t\t\tfinalSplitList.addAll(splitList);\n \t\t\t}\n \t\t\t\n \t\t\t//collect all splits\n \t\t\tfor (List<List<String>> splitSets : finalSplitList) {\n \t\t\t\tsplitHandler.addCategoricalSplits(attrOrd, splitSets);\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n }", "public void init() throws IOException{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\t\tline=in.readLine();\n\t\tif(line.trim().length()!=0)\n\t\t\tnum=Integer.parseInt(line.trim());\n\t\tfor(int i=0; i<num; i++){\n\t\t\tHashSet<Integer> datasets = new HashSet<Integer>();\n\t\t\tline=in.readLine();\n\t\t\tif(line.trim().length()!=0){\n\t\t\t\tString[] strs=line.trim().split(\"\\\\s+\");\n\t\t\t\tfor(String s: strs){\n\t\t\t\t\tif(s.trim().length()!=0){\n\t\t\t\t\t\tdatasets.add(new Integer(s.trim()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcenters.add(datasets);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRollbackOnFirstChunkAndRestart() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\n\t\tFoo foo2 = reader.read();\n\t\tassertTrue(!foo2.equals(foo1));\n\n\t\tFoo foo3 = reader.read();\n\t\tassertTrue(!foo2.equals(foo3));\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tassertEquals(foo1, reader.read());\n\t\tassertEquals(foo2, reader.read());\n\t}", "public PravegaSplit(String readerGroupName, int subtaskId) {\n this.readerGroupName = readerGroupName;\n this.subtaskId = subtaskId;\n }", "private void createNumPartitions(Integer[] splits, FeatureField featFld, \n \t\tList<Integer[]> newSplitList) {\n \t\tint min = (int)(featFld.getMin() + 0.01);\n \t\tint max = (int)(featFld.getMax() + 0.01);\n \t\tint binWidth = featFld.getBucketWidth();\n \tif (null == splits) {\n \t\t//first time\n \t\tfor (int split = min + binWidth ; split < max; split += binWidth) {\n \t\t\tInteger[] newSplits = new Integer[1];\n \t\t\tnewSplits[0] = split;\n \t\t\tnewSplitList.add(newSplits);\n \t\t\tcreateNumPartitions(newSplits, featFld,newSplitList);\n \t\t}\n \t} else {\n \t\t//create split based off last split that will contain one additinal split point\n \t\tint len = splits.length;\n \t\tif (len < featFld.getMaxSplit() -1) {\n\t \t\tfor (int split = splits[len -1] + binWidth; split < max; split += binWidth) {\n\t \t\t\tInteger[] newSplits = new Integer[len + 1];\n\t \t\t\tint i = 0;\n\t \t\t\tfor (; i < len; ++i) {\n\t \t\t\t\tnewSplits[i] = splits[i];\n\t \t\t\t}\n\t \t\t\tnewSplits[i] = split;\n\t \t\t\tnewSplitList.add(newSplits);\n\t \t\t\t\n\t \t\t\t//recurse to generate additional splits\n\t \t\t\tcreateNumPartitions(newSplits, featFld,newSplitList);\n\t \t\t}\n \t\t}\n \t}\n }", "protected boolean isSplitable(JobContext context, Path filename) {\n\t\treturn false;\n\t}", "private void initReadBlockingTask(int size){ \n for (int i=0; i < size; i++){\n getReadTasks().offer(newReadBlockingTask(false));\n }\n }", "public TaggedInputSplit(InputSplit inputSplit, Configuration conf, Class<? extends InputFormat> inputFormatClass,\n Class<? extends AIngleMapper> mapperClass, Schema inputSchema) {\n this.inputSplitClass = inputSplit.getClass();\n this.inputSplit = inputSplit;\n this.conf = conf;\n this.inputFormatClass = inputFormatClass;\n this.mapperClass = mapperClass;\n this.schema = inputSchema;\n }", "@Override\n\tpublic RecordReader<NullWritable, Text> createRecordReader(InputSplit split, TaskAttemptContext context)\n\t\t\tthrows IOException {\n\t\tCustomRecordReader reader = new CustomRecordReader();\n\t\t\n\t\ttry {\n\t\t\treader.initialize(split, context);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn reader;\n\t}", "@Override\n protected boolean isSplitable(JobContext context, Path file) {\n return false;\n }", "@Test\n\tpublic void testFetchMappedValuesForConsecutiveInValidData() {\n\t\tString input = \"233015\";\n\t\tList<String> actualOutput = GeneralUtility.fetchMappedValues(input);\n\t\tAssert.assertArrayEquals(Collections.emptyList().toArray(), actualOutput.toArray());\n\t}", "@Before\n public void initValidString() {\n appStateParcel = new AppStateParcel();\n sessionParcel = new SessionParcel();\n evaluationParcel = new EvaluationParcel();\n appStateParcel.setAppMode(AppStateParcel.NORMAL_MODE);\n appStateParcel.setUserType(AppStateParcel.TEACHER);\n appStateParcel.setUserId(\"1\");\n appStateParcel.setToken(TOKEN);\n }", "private void initSharedPre() {\n\t}", "@Override\n\t\tprotected boolean isSplitable(FileSystem fs, Path filename) {\n\t\t\treturn false;\n\t\t}", "@Before\r\n\tpublic void setUp() throws Exception {\n\t\tunitTestInputs = new ArrayList<TestInput>(50);\r\n\t\t\r\n\t\t// Iterate over all input files\r\n\t\tFile directory = new File(\"Inputs\");\r\n\t\tFile[] inputFiles = directory.listFiles();\r\n\t\tif (inputFiles != null)\r\n\t\t{\r\n\t\t\t// Iterate over each input file\r\n\t\t\tfor (File inputFile : inputFiles)\r\n\t\t\t{\r\n\t\t\t\t// Parse file to create test input objects\t\r\n\t\t\t\tString fileName = inputFile.getName();\r\n\t\t\t\tif (fileName.startsWith(\"INPUT\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] fileNameSplit = fileName.split(\"[_.]\");\r\n\t\t\t\t\tlong numberInversions = Long.parseLong(fileNameSplit[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tArrayList<Integer> inputValues = Common.ParseInputFile(inputFile.getPath());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Add test input\r\n\t\t\t\t\tunitTestInputs.add(new TestInput(inputValues, numberInversions));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n protected void initializeReader() {\n this.fileList = new ArrayList<>();\n this.fileListPosition = new AtomicInteger(0);\n this.currentTextAnnotation = new AtomicReference<>();\n }", "public abstract void init (boolean bOnLine) throws Exception;", "protected void doInit()\r\n/* 131: */ {\r\n/* 132:194 */ this.tmpBuf = new byte[32];\r\n/* 133:195 */ engineReset();\r\n/* 134: */ }", "@Override\n\tprotected boolean isSplitable(FileSystem fs, Path filename) {\n\t\treturn true;\n\t}", "public InputArray() \n\t{\n\t\tinputArray = null;\n\t}", "@Override\n\tprotected void setup(Reducer<LongWritable, Text, Text, Text>.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tsuper.setup(context);\n\t\tminPnts=Long.parseLong(context.getConfiguration().get(\"minPnts\"));\n\t\tepsilon=Double.parseDouble(context.getConfiguration().get(\"epsilon\"));\n\t\toutput = new MultipleOutputs<Text,Text>(context);\n\t\tPath[] cacheFilesLocal = DistributedCache.getLocalCacheFiles(context.getConfiguration());\n\t\tfor (Path eachPath : cacheFilesLocal) {\n\t\t\t\n\t\t\tloadPartition(eachPath, context);\n\t\t\t\n\t\t}\n\t}", "private Pair<Word<O>, State<I, S>> readInputFromInitialState(Iterable<? extends I> input,\n boolean recordOutput) {\n return readInput(input, this.initialProcedure.initialState, recordOutput);\n }", "public abstract boolean satisfiesSplit(Instance<?> inst);", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "protected Splitter(Collection<SampleDescriptor> samples) {\n this.samples = new ArrayList<SampleDescriptor>(samples);\n this.setup();\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n Range range0 = Range.of(range_CoordinateSystem0, (-1241L), 848L);\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "boolean hasSplit();", "@Split\n public List<InputMapper> split(@PartitionSize final long bundles) {\n\t\tfinal List<InputMapper> partitions = new ArrayList<>();\n\t final Collection<Member> members = new ArrayList<>();\n\t long current = 0;\n\t for (final Map.Entry<Member, Future<Long>> entries : getSizeByMembers().entrySet()) {\n\t final long memberSize = getFutureValue(entries.getValue());\n\t if (members.isEmpty()) {\n\t members.add(entries.getKey());\n\t current += memberSize;\n\t } else if (current + memberSize > bundles) {\n\t partitions.add(\n\t new InputMapper(configuration, jsonFactory, jsonb, service, toIdentifiers(members)));\n\t // reset current iteration\n\t members.clear();\n\t current = 0;\n\t }\n\t }\n\t if (!members.isEmpty()) {\n\t partitions.add(new InputMapper(configuration, jsonFactory, jsonb, service, toIdentifiers(members)));\n\t }\n\n\t if (partitions.isEmpty()) { // just execute this if no plan (= no distribution)\n\t partitions.add(this);\n\t }\n\t return partitions;\n }", "@Test\r\n\tvoid testsplitStringHandout2() {\n\t\tString input = Main.TEXT_2;\r\n\t\tString expected[] = {\"A\",\"long\",\"time\",\"ago\",\"in\",\"a\",\"galaxy\",\"far,\",\"far\",\"away...\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\t\t\r\n\t\tassertEquals(7, Main.maxWordLength(Main.splitString(input)));\r\n\r\n\t}", "private void moveToNextSplit() {\n closeCurrentSplit();\n\n if (_splits.hasNext()) {\n StashSplit split = _splits.next();\n String key = String.format(\"%s/%s\", _rootPath, split.getKey());\n _currentIterator = new StashSplitIterator(_s3, _bucket, key);\n } else {\n _currentIterator = null;\n }\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n StringReader stringReader0 = new StringReader(\"synchronized\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 97, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(11, javaCharStream0.bufpos);\n assertEquals(\"synchronized\", token0.toString());\n }", "private static void init() {\n /*\n r1 = 1;\n r3 = 0;\n r5 = getNumberOfCPUCores();\n if (r5 != 0) goto L_0x0143;\n L_0x0008:\n r4 = new java.io.FileReader;\t Catch:{ IOException -> 0x008c, all -> 0x00a1 }\n r0 = \"/proc/cpuinfo\";\n r4.<init>(r0);\t Catch:{ IOException -> 0x008c, all -> 0x00a1 }\n r2 = new java.io.BufferedReader;\t Catch:{ IOException -> 0x013c, all -> 0x0135 }\n r2.<init>(r4);\t Catch:{ IOException -> 0x013c, all -> 0x0135 }\n L_0x0014:\n r0 = r2.readLine();\t Catch:{ IOException -> 0x0140 }\n if (r0 == 0) goto L_0x0025;\n L_0x001a:\n r6 = \"processor\";\n r0 = r0.startsWith(r6);\t Catch:{ IOException -> 0x0140 }\n if (r0 == 0) goto L_0x0014;\n L_0x0022:\n r5 = r5 + 1;\n goto L_0x0014;\n L_0x0025:\n if (r2 == 0) goto L_0x002a;\n L_0x0027:\n r2.close();\t Catch:{ IOException -> 0x0104 }\n L_0x002a:\n if (r4 == 0) goto L_0x0143;\n L_0x002c:\n r4.close();\t Catch:{ IOException -> 0x0089 }\n r0 = r5;\n L_0x0030:\n if (r0 != 0) goto L_0x0033;\n L_0x0032:\n r0 = r1;\n L_0x0033:\n r2 = 0;\n r6 = \"\";\n r5 = new java.io.FileReader;\t Catch:{ IOException -> 0x00ae, NumberFormatException -> 0x00c4, all -> 0x00f6 }\n r4 = \"/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq\";\n r5.<init>(r4);\t Catch:{ IOException -> 0x00ae, NumberFormatException -> 0x00c4, all -> 0x00f6 }\n r4 = new java.io.BufferedReader;\t Catch:{ IOException -> 0x012d, NumberFormatException -> 0x0124, all -> 0x011b }\n r4.<init>(r5);\t Catch:{ IOException -> 0x012d, NumberFormatException -> 0x0124, all -> 0x011b }\n r3 = r4.readLine();\t Catch:{ IOException -> 0x0130, NumberFormatException -> 0x0128 }\n if (r3 == 0) goto L_0x004c;\n L_0x0048:\n r2 = java.lang.Integer.parseInt(r3);\t Catch:{ IOException -> 0x0130, NumberFormatException -> 0x012b }\n L_0x004c:\n if (r4 == 0) goto L_0x0051;\n L_0x004e:\n r4.close();\t Catch:{ IOException -> 0x010d }\n L_0x0051:\n if (r5 == 0) goto L_0x0056;\n L_0x0053:\n r5.close();\t Catch:{ IOException -> 0x0110 }\n L_0x0056:\n mInitialized = r1;\n mProcessors = r0;\n mFrequency = r2;\n r0 = \"abc\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"++++++++++\";\n r1 = r1.append(r2);\n r2 = mProcessors;\n r1 = r1.append(r2);\n r2 = \" \";\n r1 = r1.append(r2);\n r2 = mFrequency;\n r1 = r1.append(r2);\n r2 = \"++++++++++\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n android.util.Log.d(r0, r1);\n return;\n L_0x0089:\n r0 = move-exception;\n r0 = r5;\n goto L_0x0030;\n L_0x008c:\n r0 = move-exception;\n r2 = r3;\n r4 = r3;\n L_0x008f:\n r0.printStackTrace();\t Catch:{ all -> 0x0138 }\n if (r2 == 0) goto L_0x0097;\n L_0x0094:\n r2.close();\t Catch:{ IOException -> 0x0107 }\n L_0x0097:\n if (r4 == 0) goto L_0x0143;\n L_0x0099:\n r4.close();\t Catch:{ IOException -> 0x009e }\n r0 = r5;\n goto L_0x0030;\n L_0x009e:\n r0 = move-exception;\n r0 = r5;\n goto L_0x0030;\n L_0x00a1:\n r0 = move-exception;\n r4 = r3;\n L_0x00a3:\n if (r3 == 0) goto L_0x00a8;\n L_0x00a5:\n r3.close();\t Catch:{ IOException -> 0x0109 }\n L_0x00a8:\n if (r4 == 0) goto L_0x00ad;\n L_0x00aa:\n r4.close();\t Catch:{ IOException -> 0x010b }\n L_0x00ad:\n throw r0;\n L_0x00ae:\n r4 = move-exception;\n r4 = r3;\n L_0x00b0:\n r5 = TAG;\t Catch:{ all -> 0x0120 }\n r6 = \"Could not find maximum CPU frequency!\";\n android.util.Log.w(r5, r6);\t Catch:{ all -> 0x0120 }\n if (r3 == 0) goto L_0x00bc;\n L_0x00b9:\n r3.close();\t Catch:{ IOException -> 0x0113 }\n L_0x00bc:\n if (r4 == 0) goto L_0x0056;\n L_0x00be:\n r4.close();\t Catch:{ IOException -> 0x00c2 }\n goto L_0x0056;\n L_0x00c2:\n r3 = move-exception;\n goto L_0x0056;\n L_0x00c4:\n r4 = move-exception;\n r4 = r3;\n r5 = r3;\n r3 = r6;\n L_0x00c8:\n r6 = TAG;\t Catch:{ all -> 0x011e }\n r7 = \"Could not parse maximum CPU frequency!\";\n android.util.Log.w(r6, r7);\t Catch:{ all -> 0x011e }\n r6 = TAG;\t Catch:{ all -> 0x011e }\n r7 = new java.lang.StringBuilder;\t Catch:{ all -> 0x011e }\n r7.<init>();\t Catch:{ all -> 0x011e }\n r8 = \"Failed to parse: \";\n r7 = r7.append(r8);\t Catch:{ all -> 0x011e }\n r3 = r7.append(r3);\t Catch:{ all -> 0x011e }\n r3 = r3.toString();\t Catch:{ all -> 0x011e }\n android.util.Log.w(r6, r3);\t Catch:{ all -> 0x011e }\n if (r4 == 0) goto L_0x00ec;\n L_0x00e9:\n r4.close();\t Catch:{ IOException -> 0x0115 }\n L_0x00ec:\n if (r5 == 0) goto L_0x0056;\n L_0x00ee:\n r5.close();\t Catch:{ IOException -> 0x00f3 }\n goto L_0x0056;\n L_0x00f3:\n r3 = move-exception;\n goto L_0x0056;\n L_0x00f6:\n r0 = move-exception;\n r4 = r3;\n r5 = r3;\n L_0x00f9:\n if (r4 == 0) goto L_0x00fe;\n L_0x00fb:\n r4.close();\t Catch:{ IOException -> 0x0117 }\n L_0x00fe:\n if (r5 == 0) goto L_0x0103;\n L_0x0100:\n r5.close();\t Catch:{ IOException -> 0x0119 }\n L_0x0103:\n throw r0;\n L_0x0104:\n r0 = move-exception;\n goto L_0x002a;\n L_0x0107:\n r0 = move-exception;\n goto L_0x0097;\n L_0x0109:\n r1 = move-exception;\n goto L_0x00a8;\n L_0x010b:\n r1 = move-exception;\n goto L_0x00ad;\n L_0x010d:\n r3 = move-exception;\n goto L_0x0051;\n L_0x0110:\n r3 = move-exception;\n goto L_0x0056;\n L_0x0113:\n r3 = move-exception;\n goto L_0x00bc;\n L_0x0115:\n r3 = move-exception;\n goto L_0x00ec;\n L_0x0117:\n r1 = move-exception;\n goto L_0x00fe;\n L_0x0119:\n r1 = move-exception;\n goto L_0x0103;\n L_0x011b:\n r0 = move-exception;\n r4 = r3;\n goto L_0x00f9;\n L_0x011e:\n r0 = move-exception;\n goto L_0x00f9;\n L_0x0120:\n r0 = move-exception;\n r5 = r4;\n r4 = r3;\n goto L_0x00f9;\n L_0x0124:\n r4 = move-exception;\n r4 = r3;\n r3 = r6;\n goto L_0x00c8;\n L_0x0128:\n r3 = move-exception;\n r3 = r6;\n goto L_0x00c8;\n L_0x012b:\n r6 = move-exception;\n goto L_0x00c8;\n L_0x012d:\n r4 = move-exception;\n r4 = r5;\n goto L_0x00b0;\n L_0x0130:\n r3 = move-exception;\n r3 = r4;\n r4 = r5;\n goto L_0x00b0;\n L_0x0135:\n r0 = move-exception;\n goto L_0x00a3;\n L_0x0138:\n r0 = move-exception;\n r3 = r2;\n goto L_0x00a3;\n L_0x013c:\n r0 = move-exception;\n r2 = r3;\n goto L_0x008f;\n L_0x0140:\n r0 = move-exception;\n goto L_0x008f;\n L_0x0143:\n r0 = r5;\n goto L_0x0030;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: qsbk.app.ye.videotools.utils.SystemUtils.init():void\");\n }", "private IntSplitInfo split() {\n\t\tint midKey = entries.getMidKey();\n\t\tIntInternalNode newNode = new IntInternalNode(k, entries.split());\n\n\t\t// // fix sibling pointers\n\t\t// newNode.nextNode = nextNode;\n\t\t// nextNode = newNode;\n\n\t\treturn new IntSplitInfo(this, midKey, newNode);\n\t}", "void loadNextSplitCurrentDir() throws IOException {\n\t\tCollection<File> files = fsIterator.getFiles();\n\t\n\t\tif (files == null || files.size() == 0)\n\t\t\treturn;\n\t\t\n\t\tIterator<File> it = files.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tFile file = it.next();\n\t\t\tRandomAccessFile raf = openedRAFs.get(file.getAbsolutePath());\n\t\t\tif (raf == null) {\n\t\t\t\ttry {\n\t\t\t\t\traf = new RandomAccessFile(file, \"r\");\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t// TODO: show warning that the file cannot be read\n\t\t\t\t\tit.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tRandomAccessFile old = \n\t\t\t\t\t\topenedRAFs.put(file.getAbsolutePath(), raf);\n\t\t\t\tif (old != null)\n\t\t\t\t\told.close();\n\t\t\t}\n\t\t\t\n\t\t\tlong begin = splitter.splitBegin(raf);\n\t\t\tif (begin == -1) {\n\t\t\t\traf.close();\n\t\t\t\tit.remove();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\traf.seek(begin);\n\t\t\t\n\t\t\tlong end = splitter.splitEnd(raf, blocksize);\n\t\t\t\n\t\t\tif (begin == end) {\n\t\t\t\traf.close();\n\t\t\t\tit.remove();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\traf.seek(end);\n\t\t\t\n\t\t\tcurrentRAF = new RandomAccessFile(file, \"r\");\n\t\t\tcurrentRAF.seek(begin);\n\t\t\tcurrentLength = end - begin;\n\t\t\t\n\t\t\tlogger.debug(String.format(\"Generated Split. %s %d %d\",\n\t\t\t\t\tfile.getAbsolutePath(), begin, end));\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n PushbackInputStream pushbackInputStream0 = new PushbackInputStream(mockFileInputStream0);\n JavaCharStream javaCharStream0 = new JavaCharStream(pushbackInputStream0, 0, 0, 0);\n javaCharStream0.ReInit((InputStream) mockFileInputStream0, 4096, 1, 0);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test\n public void testTransientProcessInstanceWithSubProcessHavingSubProcessWithSplits() throws Exception\n {\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_SUB_SUB_PROCESS, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_PREFERENCE.times(7));\n }", "static boolean checkSplitsArray (double[][] splitsArray) { throw new RuntimeException(); }", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "@Test\n public void testMarkReset() throws IOException {\n List<String> expected = multiLineFileInit(file, Charsets.UTF_8);\n\n int MAX_LEN = 100;\n\n PositionTracker tracker = new DurablePositionTracker(meta, file.getPath());\n ResettableInputStream in = new ResettableFileInputStream(file, tracker);\n\n String result0 = readLine(in, MAX_LEN);\n assertEquals(expected.get(0), result0);\n\n in.reset();\n\n String result0a = readLine(in, MAX_LEN);\n assertEquals(expected.get(0), result0a);\n\n in.mark();\n\n String result1 = readLine(in, MAX_LEN);\n assertEquals(expected.get(1), result1);\n\n in.reset();\n\n String result1a = readLine(in, MAX_LEN);\n assertEquals(expected.get(1), result1a);\n\n in.mark();\n in.close();\n }" ]
[ "0.6548804", "0.64628756", "0.6248292", "0.5783196", "0.56769145", "0.5672365", "0.5649027", "0.5603584", "0.55183375", "0.5506796", "0.5506796", "0.54917663", "0.54723525", "0.54646474", "0.5442337", "0.5437576", "0.5430381", "0.5430381", "0.5430381", "0.5430381", "0.5425582", "0.5418871", "0.53974503", "0.53893757", "0.53753126", "0.5374326", "0.53478837", "0.53207004", "0.52684855", "0.52510804", "0.5221552", "0.52127826", "0.5176767", "0.51748365", "0.51681525", "0.5156407", "0.5146766", "0.5142517", "0.5079226", "0.506949", "0.5064127", "0.505848", "0.5056993", "0.505105", "0.5039871", "0.4999291", "0.49818668", "0.4974384", "0.4963763", "0.49570465", "0.49557865", "0.49410877", "0.49379465", "0.49311304", "0.49285862", "0.49131182", "0.49121392", "0.49091718", "0.49002686", "0.48987558", "0.48945135", "0.48799327", "0.48785487", "0.48658985", "0.48621997", "0.4843505", "0.48427817", "0.48344308", "0.48270643", "0.48106104", "0.48100445", "0.47987908", "0.47981125", "0.47947913", "0.47889015", "0.4780863", "0.47712713", "0.47700495", "0.4765533", "0.47650272", "0.476228", "0.4762217", "0.4760918", "0.4743811", "0.47327313", "0.47087824", "0.4708326", "0.4698653", "0.4693739", "0.46832448", "0.4671695", "0.46716645", "0.46572652", "0.46553722", "0.4648019", "0.46460205", "0.46445206", "0.46435294", "0.46394357", "0.46383607" ]
0.60071564
3
we should pass data
@Override public void onDataChange(@NonNull DataSnapshot snapshot) { ((globalShared)activity.getApplicationContext()).setPassingUserAccount(snapshot.getValue(userAccount.class)); Intent profileViewer = new Intent(activity, activity_profile_view.class); activity.startActivity(profileViewer); Animatoo.animateSlideUp(activity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\n\tpublic void processData() {\n\t\t\n\t}", "public void postData() {\n\n\t}", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "private void parseData() {\n\t\t\r\n\t}", "@Override\n public void getData(int a, int b) {\n\n }", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "void requestData();", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "protected abstract boolean processData(Object data);", "private void verificaData() {\n\t\t\n\t}", "private void fillData()\n {\n\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "private void remplirUtiliseData() {\n\t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "private void setUserData(){\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "private void initData(){\n\n }", "@Override\n\tpublic void onDataPass(ToDoItem toDoItem) {\n\t}", "private void InitData() {\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "private ProcessedDynamicData( ) {\r\n super();\r\n }", "private void initData() {\n\n }", "private void setData() {\n\n }", "public abstract Object getData();", "@Override\n\tprotected void initdata() {\n\n\t}", "protected abstract void retrievedata();", "@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}", "abstract public Object getUserData();", "private void initialData() {\n\n }", "private void initData() {\n\t}", "@ProcessData()\n public Data sayHello(Data<MyData> param) {\n MyData data = param.getContent();\n System.out.println(\"call processor\");\n if (data != null) {\n data.put(\"Response\", \"Hello (\" + data.get(\"user.name\") + \") value = \" + data.getName());\n }\n return param;\n }", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "protected @Override\r\n abstract void initData();", "@Override\r\n\tpublic void initData() {\n\t}", "abstract public void setUserData(Object data);", "protected void loadData()\n {\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "Object getData();", "Object getData();", "private void initData() {\n }", "void setData(T data) {\n\t\tthis.data = data;\n\t}", "public ChangeData()\r\n\t\t{\r\n\t\t}", "public void initData(){\r\n \r\n }", "public void checkData(){\n\n }", "public void setUserData(Object data);", "@Test\n public void dataPassed() {\n assertEquals(10, cameraVisualizationPacket.getSensorSource().getX());\n assertEquals(11, cameraVisualizationPacket.getSensorSource().getY());\n assertEquals(12, cameraVisualizationPacket.getSensorCorner1().getX());\n assertEquals(13, cameraVisualizationPacket.getSensorCorner1().getY());\n assertEquals(14, cameraVisualizationPacket.getSensorCorner2().getX());\n assertEquals(15, cameraVisualizationPacket.getSensorCorner2().getY());\n assertEquals(50, cameraVisualizationPacket.getColor().getRed());\n assertEquals(51, cameraVisualizationPacket.getColor().getGreen());\n assertEquals(57, cameraVisualizationPacket.getColor().getBlue());\n\n }", "@Override\n\tpublic void setData() {\n\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "private void validateData() {\n }", "private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }", "public void updateData() {}", "@Override\n public void feedRawData(byte[] data) {\n mARGSession.feedRawData(data);\n }", "private void returnData(Object ret) {\n if (myHost != null) {\n myHost.returnData(ret);\n }\n }", "private void returnData(Object ret) {\n if (myHost != null) {\n myHost.returnData(ret);\n }\n }", "public abstract void setCustomData(Object data);", "public void setData(T data){\n this.data = data;\n }", "public void setData(Object data) {\r\n this.data = data;\r\n }", "DataHandler getDataHandler();", "@Override\n protected void onDataChanged() {\n }", "public Object getData() \n {\n return data;\n }", "void setData(Object data);", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "protected abstract Object[] getData();", "public void InitData() {\n }", "private Noder(E data) {\n this.data = data;\n }", "void setData (Object data);", "public void setData(Object o){}", "private void data(Messenger replyTo, int encoderId, Bundle data) {\n\n // obtain new message\n Message message = obtainMessage(Geotracer.MESSAGE_TYPE_DATA, encoderId, 0);\n message.setData(data);\n\n // send response\n send(replyTo, message);\n }", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tpublic void fillData() {\n\t}", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "public Object getData();", "public void completeData();", "public void setData(Object data) {\n this.data = data;\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\trequestUserInfo();\n\t}", "void initData(){\n }", "public void startData()\n\t\t\t{\n\t\t\t\tsend(\"<data>\", false);\n\t\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@Override\n public void onDataChanged() {\n\n }", "public DataMessage(final Object data){\n\t\tthis.data=data;\n\t}", "@Override\n\tpublic void readData() {\n\t\t\n\t}" ]
[ "0.6946152", "0.6906057", "0.6697764", "0.6604417", "0.64852667", "0.64521664", "0.6352306", "0.6284909", "0.6278538", "0.6278538", "0.6278538", "0.6278538", "0.6278538", "0.6278538", "0.6222632", "0.6200151", "0.6200151", "0.61786705", "0.6174597", "0.61735916", "0.6149013", "0.6144377", "0.6144377", "0.61406326", "0.61049026", "0.6096973", "0.6085578", "0.6085367", "0.6071356", "0.60672575", "0.6061022", "0.6050749", "0.6042012", "0.60259926", "0.6022581", "0.60221386", "0.6016978", "0.6016958", "0.60150766", "0.6012156", "0.6006579", "0.5993581", "0.59795815", "0.59685427", "0.5949636", "0.5924883", "0.5918113", "0.59177464", "0.59146327", "0.5906865", "0.5904645", "0.5904645", "0.5904645", "0.59026694", "0.5901009", "0.5901009", "0.5900113", "0.5899889", "0.58923894", "0.5874041", "0.58573735", "0.58495855", "0.5844784", "0.58401227", "0.5809853", "0.58006185", "0.5798709", "0.57959855", "0.5787872", "0.57855576", "0.57855576", "0.57821536", "0.5778676", "0.5777107", "0.5770765", "0.5768481", "0.5766126", "0.5765799", "0.5757227", "0.5757227", "0.5746577", "0.57305753", "0.5711252", "0.5710237", "0.5709217", "0.56915426", "0.56786233", "0.56786233", "0.56708544", "0.56707805", "0.56408656", "0.5631208", "0.56296355", "0.56280035", "0.5627352", "0.56180453", "0.5581152", "0.55787545", "0.55741835", "0.55735034", "0.55721945" ]
0.0
-1
we should pass data
@Override public void onClick(View v) { Log.d(TAG, "onResume: reply has been clicked "); ((globalShared) activity.getApplicationContext()).setPassingReply(tempReply); Intent profileViewer = new Intent(activity, activity_reply_reply.class); activity.startActivity(profileViewer); Animatoo.animateSlideUp(activity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\n\tpublic void processData() {\n\t\t\n\t}", "public void postData() {\n\n\t}", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "private void parseData() {\n\t\t\r\n\t}", "@Override\n public void getData(int a, int b) {\n\n }", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "void requestData();", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "protected abstract boolean processData(Object data);", "private void verificaData() {\n\t\t\n\t}", "private void fillData()\n {\n\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "private void remplirUtiliseData() {\n\t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "private void setUserData(){\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "private void initData(){\n\n }", "@Override\n\tpublic void onDataPass(ToDoItem toDoItem) {\n\t}", "private void InitData() {\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "private ProcessedDynamicData( ) {\r\n super();\r\n }", "private void initData() {\n\n }", "private void setData() {\n\n }", "public abstract Object getData();", "@Override\n\tprotected void initdata() {\n\n\t}", "protected abstract void retrievedata();", "@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}", "abstract public Object getUserData();", "private void initialData() {\n\n }", "private void initData() {\n\t}", "@ProcessData()\n public Data sayHello(Data<MyData> param) {\n MyData data = param.getContent();\n System.out.println(\"call processor\");\n if (data != null) {\n data.put(\"Response\", \"Hello (\" + data.get(\"user.name\") + \") value = \" + data.getName());\n }\n return param;\n }", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "protected @Override\r\n abstract void initData();", "@Override\r\n\tpublic void initData() {\n\t}", "abstract public void setUserData(Object data);", "protected void loadData()\n {\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "Object getData();", "Object getData();", "private void initData() {\n }", "void setData(T data) {\n\t\tthis.data = data;\n\t}", "public ChangeData()\r\n\t\t{\r\n\t\t}", "public void initData(){\r\n \r\n }", "public void checkData(){\n\n }", "public void setUserData(Object data);", "@Test\n public void dataPassed() {\n assertEquals(10, cameraVisualizationPacket.getSensorSource().getX());\n assertEquals(11, cameraVisualizationPacket.getSensorSource().getY());\n assertEquals(12, cameraVisualizationPacket.getSensorCorner1().getX());\n assertEquals(13, cameraVisualizationPacket.getSensorCorner1().getY());\n assertEquals(14, cameraVisualizationPacket.getSensorCorner2().getX());\n assertEquals(15, cameraVisualizationPacket.getSensorCorner2().getY());\n assertEquals(50, cameraVisualizationPacket.getColor().getRed());\n assertEquals(51, cameraVisualizationPacket.getColor().getGreen());\n assertEquals(57, cameraVisualizationPacket.getColor().getBlue());\n\n }", "@Override\n\tpublic void setData() {\n\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "private void validateData() {\n }", "private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }", "public void updateData() {}", "@Override\n public void feedRawData(byte[] data) {\n mARGSession.feedRawData(data);\n }", "private void returnData(Object ret) {\n if (myHost != null) {\n myHost.returnData(ret);\n }\n }", "private void returnData(Object ret) {\n if (myHost != null) {\n myHost.returnData(ret);\n }\n }", "public abstract void setCustomData(Object data);", "public void setData(T data){\n this.data = data;\n }", "public void setData(Object data) {\r\n this.data = data;\r\n }", "DataHandler getDataHandler();", "@Override\n protected void onDataChanged() {\n }", "public Object getData() \n {\n return data;\n }", "void setData(Object data);", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "protected abstract Object[] getData();", "public void InitData() {\n }", "private Noder(E data) {\n this.data = data;\n }", "void setData (Object data);", "public void setData(Object o){}", "private void data(Messenger replyTo, int encoderId, Bundle data) {\n\n // obtain new message\n Message message = obtainMessage(Geotracer.MESSAGE_TYPE_DATA, encoderId, 0);\n message.setData(data);\n\n // send response\n send(replyTo, message);\n }", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tpublic void fillData() {\n\t}", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "public Object getData();", "public void completeData();", "public void setData(Object data) {\n this.data = data;\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\trequestUserInfo();\n\t}", "void initData(){\n }", "public void startData()\n\t\t\t{\n\t\t\t\tsend(\"<data>\", false);\n\t\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@Override\n public void onDataChanged() {\n\n }", "public DataMessage(final Object data){\n\t\tthis.data=data;\n\t}", "@Override\n\tpublic void readData() {\n\t\t\n\t}" ]
[ "0.6946152", "0.6906057", "0.6697764", "0.6604417", "0.64852667", "0.64521664", "0.6352306", "0.6284909", "0.6278538", "0.6278538", "0.6278538", "0.6278538", "0.6278538", "0.6278538", "0.6222632", "0.6200151", "0.6200151", "0.61786705", "0.6174597", "0.61735916", "0.6149013", "0.6144377", "0.6144377", "0.61406326", "0.61049026", "0.6096973", "0.6085578", "0.6085367", "0.6071356", "0.60672575", "0.6061022", "0.6050749", "0.6042012", "0.60259926", "0.6022581", "0.60221386", "0.6016978", "0.6016958", "0.60150766", "0.6012156", "0.6006579", "0.5993581", "0.59795815", "0.59685427", "0.5949636", "0.5924883", "0.5918113", "0.59177464", "0.59146327", "0.5906865", "0.5904645", "0.5904645", "0.5904645", "0.59026694", "0.5901009", "0.5901009", "0.5900113", "0.5899889", "0.58923894", "0.5874041", "0.58573735", "0.58495855", "0.5844784", "0.58401227", "0.5809853", "0.58006185", "0.5798709", "0.57959855", "0.5787872", "0.57855576", "0.57855576", "0.57821536", "0.5778676", "0.5777107", "0.5770765", "0.5768481", "0.5766126", "0.5765799", "0.5757227", "0.5757227", "0.5746577", "0.57305753", "0.5711252", "0.5710237", "0.5709217", "0.56915426", "0.56786233", "0.56786233", "0.56708544", "0.56707805", "0.56408656", "0.5631208", "0.56296355", "0.56280035", "0.5627352", "0.56180453", "0.5581152", "0.55787545", "0.55741835", "0.55735034", "0.55721945" ]
0.0
-1
Time: O(B lg B), Space: O(B)
public int leastBricks(List<List<Integer>> wall) { if (wall == null || wall.isEmpty()) { return 0; } int height = wall.size(); int wallWidth = 0; for (int brickWidth : wall.get(0)) { wallWidth += brickWidth; } List<List<Integer>> positions = getPositions(wall); Set<Integer> stopPoints = new TreeSet<>(); for (List<Integer> row : positions) { for (int position : row) { stopPoints.add(position); } } stopPoints.remove(wallWidth); Map<Integer, Set<Integer>> rowsPerPosition = getRowsPerPosition(positions); int min = height; for (int stop : stopPoints) { min = Math.min(min, height - rowsPerPosition.get(stop).size()); } return min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "void merge_hi(int pa, int na, int pb, int nb) {\n getmem(nb);\n int dest = pb + nb - 1;\n int basea = pa;\n System.arraycopy(this.data, pb, this.a, 0, nb);\n \n pb = nb - 1;\n pa += na - 1;\n \n this.data[dest--] = this.data[pa--];\n --na;\n if (na == 0)\n return;\n if (nb == 1) {\n // CopyA;\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n \n try {\n for (;;) {\n int acount = 0; /* # of time A won in a row */\n int bcount = 0; /* # of time B won in a row */\n \n /* Do the straightforward thing until (if ever) one run\n * appears to win consistently.\n */\n for (;;) {\n boolean k = iflt(this.a[pb], this.data[pa]);\n if (k) {\n this.data[dest--] = this.data[pa--];\n ++acount;\n bcount = 0;\n --na;\n if (na == 0)\n return;\n if (acount >= MIN_GALLOP)\n break;\n } else {\n this.data[dest--] = this.a[pb--];\n ++bcount;\n acount = 0;\n --nb;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n if (bcount >= MIN_GALLOP)\n break;\n }\n }\n \n /* One run is winning so consistently that galloping may\n * be a huge win. So try that, and continue galloping until\n * (if ever) neither run appears to be winning consistently\n * anymore.\n */\n do {\n int k = gallop_right(this.a[pb], this.data, basea, na, na-1);\n acount = k = na - k;\n if (k != 0) {\n dest -= k;\n pa -= k;\n System.arraycopy(this.data, pa+1, this.data, dest+1, k);\n na -= k;\n if (na == 0)\n return;\n }\n \n this.data[dest--] = this.a[pb--];\n --nb;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n \n k = gallop_left(this.data[pa], this.a, 0, nb, nb-1);\n bcount = k = nb - k;\n if (k != 0) {\n dest -= k;\n pb -= k;\n System.arraycopy(this.a, pb+1, this.data, dest+1, k);\n nb -= k;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n /* nb==0 is impossible now if the comparison\n * function is consistent, but we can't assume\n * that it is.\n */\n if (nb == 0)\n return;\n }\n this.data[dest--] = this.data[pa--];\n --na;\n if (na == 0)\n return;\n } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);\n }\n } finally {\n if (nb != 0)\n System.arraycopy(this.a, 0, this.data, dest-(nb-1), nb);\n \n //dump_data(\"result\", origpa, cnt);\n }\n }", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "void merge_lo(int pa, int na, int pb, int nb) {\n getmem(na);\n System.arraycopy(this.data, pa, this.a, 0, na);\n int dest = pa;\n pa = 0;\n \n this.data[dest++] = this.data[pb++];\n --nb;\n if (nb == 0)\n return;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n return;\n }\n \n try {\n for (;;) {\n int acount = 0; /* # of time A won in a row */\n int bcount = 0; /* # of time B won in a row */\n \n /* Do the straightforward thing until (if ever) one run\n * appears to win consistently.\n */\n for (;;) {\n boolean k = iflt(this.data[pb], this.a[pa]);\n if (k) {\n this.data[dest++] = this.data[pb++];\n ++bcount;\n acount = 0;\n --nb;\n if (nb == 0)\n return;\n if (bcount >= MIN_GALLOP)\n break;\n } else {\n this.data[dest++] = this.a[pa++];\n ++acount;\n bcount = 0;\n --na;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n if (acount >= MIN_GALLOP)\n break;\n }\n }\n \n /* One run is winning so consistently that galloping may\n * be a huge win. So try that, and continue galloping until\n * (if ever) neither run appears to be winning consistently\n * anymore.\n */\n do {\n int k = gallop_right(this.data[pb], this.a, pa, na, 0);\n acount = k;\n if (k != 0) {\n System.arraycopy(this.a, pa, this.data, dest, k);\n dest += k;\n pa += k;\n na -= k;\n if (na == 1) {\n // CopyB\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n /* na==0 is impossible now if the comparison\n * function is consistent, but we can't assume\n * that it is.\n */\n if (na == 0)\n return;\n }\n \n this.data[dest++] = this.data[pb++];\n --nb;\n if (nb == 0)\n return;\n \n k = gallop_left(this.a[pa], this.data, pb, nb, 0);\n bcount = k;\n if (k != 0) {\n System.arraycopy(this.data, pb, this.data, dest, k);\n dest += k;\n pb += k;\n nb -= k;\n if (nb == 0)\n return;\n }\n this.data[dest++] = this.a[pa++];\n --na;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);\n }\n } finally {\n if (na != 0)\n System.arraycopy(this.a, pa, this.data, dest, na);\n \n //dump_data(\"result\", origpa, cnt);\n }\n }", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public long problem2b(){\r\n LinkedList<String> linkList = new LinkedList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n linkList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start; \r\n }", "public static void bfs(int a, int b) {\n\t\t\r\n\t\tQueue<Node> q = new LinkedList<>();\r\n\t\t\r\n\t\tq.add(new Node(a,b));\r\n\t\t\r\n\t\twhile(!q.isEmpty()) {\r\n\t\t\t\r\n\t\t\tNode n = q.remove();\r\n\t\t\t\r\n\t\t\tint x = n.x;\r\n\t\t\tint y = n.y;\r\n\t\t\t\r\n\t\t\tif(x+1 <= N && map[x+1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x+1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x+1,y));\r\n\t\t\t\t\tvisited[x+1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(x-1 > 0 && map[x-1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x-1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x-1,y));\r\n\t\t\t\t\tvisited[x-1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y-1 > 0 && map[x][y-1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y-1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y-1));\r\n\t\t\t\t\tvisited[x][y-1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y+1 <=N && map[x][y+1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y+1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y+1));\r\n\t\t\t\t\tvisited[x][y+1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public static void main(String[] args){\n int s = 80;\n int n = (int) Math.pow(10, 7);\n Integer[] a = new Integer[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++){\n a[i] = (int) (n*rand.nextDouble());\n }\n double binTime = binSearchT(s, a);\n double linTime = linSearchT(s, a);\n System.out.println(\"binTime: \"+ binTime);\n System.out.println(\"linTime: \"+ linTime);\n\n }", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "private static void task1(int nUMS, BinarySearchTree<Integer> t, GenerateInt generateInt) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Fill in the table...Binary Tree\" );\n\t\t int count=1;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\t \t\t \n\t\t\t\tt.insert(i);\n//\t\t\t\tSystem.out.println(i);\n\t\t\t\tcount = i;\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "private static void findBigramCountsTuring() {\n\n\t\tbigramCountTI= new HashMap<Integer,Double>();\n\t\tdouble value;\n\t\tfor(int i:bucketCountT.keySet()){\n\t\t\tif(i==0)\n\t\t\t\tcontinue;\n\t\t\tvalue= ((i+1)*bucketCountT.getOrDefault(i+1, 0.0))/bucketCountT.get(i);\n\t\t\tbigramCountTI.put(i,value);\n\t\t}\n\t}", "private static void task111(int nUMS, RedBlackBST<Integer, Integer> i, GenerateInt generateInt) {\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Fill in the table...RED BLAST BST TREE\" );\n\t int count=0;\n\t\tfor( int z = 1; z <= nUMS; z++)\n\t\t{\n\t\t\t \t\t \n\t\t\ti.put(z, z);\n\t\t\tcount = z;\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t}", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "public void log(int[] numbers) {\n\t\tSystem.out.println(); // O(1)\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\tSystem.out.println(); // O(1)\n\t\t\n\t\t// O(2n), O(n+n)\n\t\t// We can drop 2* constant, O(n). Both represent linear growth\n\t\t// as we care only about input size\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\t\n\t\t\n\t\t\n\t}", "private static void task0111(int nUMS, RedBlackBST<Integer, Integer> i, GenerateInt generateInt) {\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Fill in the table...RedBlast BST Tree\" );\n\t int count=1;\n\t\tfor( int z = 1; z <= nUMS; z++)\n\t\t{\n\t\t\t \t\t \n\t\t\ti.put(GenerateInt.generateNumber(), GenerateInt.generateNumber());\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\t\t\tcount = z;\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "public boolean linearIn(int[] outer, int[] inner) {\r\n int comp=0; // O(1)\r\n int count=0; // O(1)\r\n if(inner.length==0) // O(1)\r\n return true; // O(1)\r\n for(int i=0; i<outer.length; i++) { // O(n)\r\n if(outer[i]==inner[count]) { // O(1)\r\n comp++; // O(1)\r\n count++; // O(1)\r\n } else if(outer[i]>inner[count]) // O(1)\r\n return false; // O(1)\r\n if (comp==inner.length) // O(1)\r\n return true; // O(1)\r\n }\r\n return false; // O(1)\r\n}", "public static void func(){\n\t\tHashMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tint limit = 1000;\n\t\tboolean psb[] = generatePrime(limit);\n\t\t\n\t\tint ps[] = MathTool.generatePrime(100000);\n\t\tfor (int i = 1; ps[i]<1000; i++) {\n\t\t\t//System.out.println(ps[i]);\n\t\t}\n\t\tint max=0;\n\t\tfor (int i = 0; ps[i] < limit; i++) {\n\t\t\tint n = ps[i];\n\t\t\tint j=i;\n\t\t\twhile(n<limit){\n\t\t\t\tif(!psb[n]){\n\t\t\t\t\tint num =j-i+1;\n\t\t\t\t\tif(map.containsKey(n)){\n\t\t\t\t\t\tif(map.get(new Integer(n)) < num){\n\t\t\t\t\t\t\tmap.put(n, num);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmap.put(n, num);\n\t\t\t\t\t}\n\t\t\t\t\tif(num > max){\n\t\t\t\t\t\tmax=num;\n\t\t\t\t\t\tSystem.out.println(num+\" \"+n+\" \"+i+\" \"+j);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t\tn+=ps[j];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "static void bfs(int[][] G){\n\t\tQueue<Integer> q = new LinkedList<Integer>();\t\t\n\t\tfor (int ver_start = 0; ver_start < N; ver_start ++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\tq.add(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!q.isEmpty()){\n\t\t\t\tint vertex = q.remove();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the queue\n\t\t\t\t\t\tq.add(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"--\");\t\t\t\n\t\t}\n\t}", "private int getIndex2(int val){\n return val/bucket;\n }", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\r\n\t\t/** 1.000\r\n\t\t * bruteforceBE Asc runtime: 1072294\r\n\t\t * bruteforceBE Desc runtime: 17835245\r\n\t\t * improvedBE Asc runtime: 3562199\r\n\t\t * improvedBE Desc runtime: 794515\r\n\t\t * linearBE Asc runtime: 1680780\r\n\t\t * linearBE Desc runtime: 1629310\r\n\t\t *\r\n\t\t * 10.000\r\n\t\t * bruteforceBE Asc runtime: 3850878\r\n\t\t * bruteforceBE Desc runtime: 113789179\r\n\t\t * improvedBE Asc runtime: 11800873\r\n\t\t * improvedBE Desc runtime: 8166293\r\n\t\t * linearBE Asc runtime: 14381578\r\n\t\t * linearBE Desc runtime: 5897656\r\n\t\t *\r\n\t\t * 100.000\r\n\t\t * bruteforceBE Asc runtime: 19376301\r\n\t\t * bruteforceBE Desc runtime: 7801237491\r\n\t\t * improvedBE Asc runtime: 52015969\r\n\t\t * improvedBE Desc runtime: 33891001\r\n\t\t * linearBE Asc runtime: 43042990\r\n\t\t * linearBE Desc runtime: 10088763\r\n\t\t *\r\n\t\t * 200.000\r\n\t\t * bruteforceBE Asc runtime: 27567279\r\n\t\t * bruteforceBE Desc runtime: 30705593272\r\n\t\t * improvedBE Asc runtime: 87086775\r\n\t\t * improvedBE Desc runtime: 51012088\r\n\t\t * linearBE Asc runtime: 61726040\r\n\t\t * linearBE Desc runtime: 56062681\r\n\t\t */\r\n\t\tArrayList<Integer> ArrayUnsortAsc = new ArrayList<>();\r\n\t\tArrayList<Integer> ArrayUnsortDesc = new ArrayList<>();\r\n\t\tint n = 1000;\r\n\r\n\t\tfor(int i = 1; i <= n; i++ ) {\r\n\t\t\tArrayUnsortAsc.add(i);\r\n\t\t}\r\n\t\tfor(int j = n; j >= 1; j-- ) {\r\n\t\t\tArrayUnsortDesc.add(j);\r\n\t\t}\r\n\r\n\t\tlong beginning = 0, end = 0;\r\n\t\tlong runtime;\r\n\t\t//1a test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1b test\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortDesc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1c test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Desc runtime: \" + runtime);\r\n\r\n\t}", "private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "public static void main(String[] args){\n int MIN = Integer.parseInt(args[0]);\n MAX = Integer.parseInt(args[1]);\n cutoffs = new int[args.length - 2];\n cache = new ArrayList<IndexedArrayList<SuperSavvyTrieHelper2>>();\n for (int i = 2; i < args.length; i++){\n cutoffs[i - 2] = Integer.parseInt(args[i]);\n cache.add(new IndexedArrayList<SuperSavvyTrieHelper2>());\n }\n for (int i = 0; i < cutoffs.length / 2; i++){\n int temp = cutoffs[i];\n cutoffs[i] = cutoffs[cutoffs.length - 1 - i];\n cutoffs[cutoffs.length - 1 - i] = temp;\n }\n multiplicitiesUsed = new boolean[MAX + 1];\n basesUsed = new DoublyLinkedArray(MAX + 1);\n SuperSavvyTrieHelper2.setCorrespondance(basesUsed);\n /*\n long count1 = lowerRecursion(MAX, 0);\n long count2 = middleRecursion(MAX, 0);\n long count3 = upperRecursion(MAX, 0);\n long total = count1 + count2 + count3;\n System.out.printf(\"%d + %d + %d = %d\\n\", count1, count2, count3, total);\n */\n hitCounts = new long[cutoffs.length];\n missCounts = new long[cutoffs.length];\n statCollector = new StatCollector(cutoffs);\n\n long startTime = System.nanoTime();\n long[] values = new long[MAX - MIN + 1];\n for (int i = MIN; i <= MAX; i++) {\n values[i - MIN] = upperRecursionWrapper(i);\n }\n //long[] testValues = new long[] {1752443,1911046, 2067456,2249444,2429337, 2647532,2852449,3101167,3350292,3632299,3916575};\n for (int i = 0; i < values.length; i++){\n //if (testValues[i] != values[i]){\n System.out.printf(\"%d: %d\\n\", i + MIN, values[i]);\n //}\n }\n long endTime = System.nanoTime();\n System.out.printf(\"%f,\", (double)(endTime - startTime) / 1000000000.0);\n long totalMissCounts = 0;\n long totalMissWeight1 = 0;\n long totalMissWeight2 = 0;\n long totalMissWeight3 = 0;\n /*\n for (int i = 0; i < cutoffs.length; i++){\n long totalCounts = hitCounts[i] + missCounts[i];\n totalMissCounts += missCounts[i];\n totalMissWeight1 += missCounts[i] * cutoffs[i];\n totalMissWeight2 += (hitCounts[i] / missCounts[i]) * cutoffs[i];\n totalMissWeight3 += (hitCounts[i] - missCounts[i]) * cutoffs[i] * cutoffs[i];\n System.out.printf(\"\\tCache %d: %d/%d/%d (%.5f%%)\", cutoffs[i], hitCounts[i], missCounts[i], totalCounts, (double) hitCounts[i] / totalCounts);\n }\n System.out.printf(\"\\t\\tMissCounts: %d, weighted: %d, ratio: %d, diff^2: %d\\n\", totalMissCounts, totalMissWeight1, totalMissWeight2, totalMissWeight3);\n */\n statCollector.printAll();\n }", "@Test\n public void test2(){\n times = new ArrayList<Long>();\n for(int i = 0; i<threadnums.length; i++){\n BSTInterface tree = new LockFreeBST();\n makeThread2(tree, threadnums[i]);\n\n\n System.out.println( \"When there are \"+threadnums[i] + \"threads, there are \"+tree.getNum() + \" nodes\");\n\n long startTime=System.currentTimeMillis();\n for(int k = 0; k<100; k++)\n tree.search(totalnum/2);\n long endTime=System.currentTimeMillis();\n System.out.println( \"When there are \"+threadnums[i] + \"threads, the search takes \"+ (endTime-startTime) + \" ms\");\n }\n for(int i = 0; i<threadnums.length; i++){\n System.out.println(\"When there are \"+threadnums[i]+\" threads, \"+\"it takes \"+times.get(i)+\" ms\");\n }\n }", "private static long BBT(int n, long[] strg) {\n\t\tif (n == 0 || n == 1)\n\t\t\treturn 1;\n\t\tif (strg[n] != 0)\n\t\t\treturn strg[n];\n\t\tstrg[n] = ((BBT(n - 1, strg) % mod) * (2 * (BBT(n - 2, strg) % mod + BBT(n - 1, strg) % mod) % mod)) % mod;\n\t\treturn strg[n];\n\n\t}", "static void findI1s(final int length, int[] B) {\r\n\t final long max = 1 << length;\r\n\t for (long i = 0; i < max; i++) {\r\n\t long currentNumber = i;\r\n\t final int[] buffer = new int[length];\r\n\t boolean[] I1 = new boolean[length]; // I1 to be passed to next method\r\n\t int bufferPosition = buffer.length;\r\n\t while (bufferPosition > 0) {\r\n\t buffer[--bufferPosition] = (int) (currentNumber & 1);\r\n\t currentNumber >>>= 1;\r\n\t }\r\n\t for(int x = 0; x < buffer.length; x++) {\r\n\t \tif(buffer[x] == 1) {\r\n\t \t\tI1[x] = true;\r\n\t \t}\r\n\t \telse {\r\n\t \t\tI1[x] = false;\r\n\t \t}\r\n\t \tSystem.out.print(buffer[x]);\r\n\t }\r\n\t\t System.out.println();\r\n\t }\r\n\t}", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "public static void main(String[] args) {\n Util_BinTreeNode<Integer> root = new Util_BinTreeNode<>();\n root.add(8);\n root.add(4); root.add(16);\n root.add(2); root.add(6); root.add(11); root.add(20);\n /*\n Caution. Adding the bellow nodes, causes the java.lang.OutOfMemoryError: GC overhead limit exceeded\n root.add(1); root.add(3); root.add(5); root.add(7);\n root.add(10); root.add(12); root.add(19); root.add(21);\n */\n System.out.println(java.time.LocalTime.now());\n ArrayList<LinkedList<Integer>> aofl = allSequences(root);\n System.out.println(java.time.LocalTime.now());\n\n for (LinkedList<Integer> list : aofl) {\n for (Integer i : list) {\n System.out.print(i + \",\");\n }\n System.out.println(\" \");\n }\n }", "@Test\n public void testLargeTree() {\n BPlusTree<Integer, Integer> tree = new BPlusTree<Integer, Integer>();\n ArrayList<Integer> numbers = new ArrayList<Integer>(100000);\n for (int i = 0; i < 100000; i++) {\n numbers.add(i);\n }\n Collections.shuffle(numbers);\n for (int i = 0; i < 100000; i++) {\n tree.insert(numbers.get(i), numbers.get(i));\n }\n testTreeInvariants(tree);\n int depth = treeDepth(tree.root);\n assertTrue(depth < 11);\n }", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "private static void dfsBribe(int n, List<Integer>[] ch, long[] w) {\n if (ch[n].size() == 0){\n In[n] = w[n];\n OutD[n] = Long.MAX_VALUE;\n OutU[n] = 0;\n }\n //recurrance case: non.leaf, do dfs for all subordinates then calculate In, OutUp & OutDown.\n else{\n for (int c:ch[n])\n dfsBribe(c, ch, w); //running once for each child thereby O(N)\n In[n] = w[n];\n for (int c:ch[n]){ //O(N) running time\n In[n] += OutU[c];\n OutU[n] += Math.min(In[c], OutD[c]);\n OutD[n] += Math.min(In[c], OutD[c]);\n }\n OutD[n] += delta(n, ch); //add delta for no in Children\n }\n\n }", "public static void main(String[] args) {\n setStandardInput();\n\n Scanner in = new Scanner(System.in);\n\n int N = in.nextInt(); // Denoting the number of balls.\n in.skip(\"\\n\");\n\n int maxN = 100005; // The maximum number of balls.\n int maxV = 10005; // The maximum value written on a ball.\n\n int[] nums = new int[maxN];\n ArrayList<Integer> sortedBalls = new ArrayList<>();\n\n for (int i = 1; i <= N; i++) {\n nums[i] = in.nextInt();\n sortedBalls.add(nums[i]);\n }\n\n Arrays.sort(sortedBalls.toArray());\n\n int[] balls = IntStream.of(nums).distinct().toArray(); // V\n\n HashMap<Integer, Integer> H = new HashMap<>();\n for (int i = 0; i < balls.length; i++) {\n H.put(balls[i], i);\n }\n\n int[] counter = new int[maxN];\n for (int i = 1; i <= N; i++) {\n counter[H.get(nums[i])]++;\n }\n\n long[] powerOfTwo = new long[maxN]; // Maybe I can change to LONG as solution\n powerOfTwo[0] = 1L;\n for (int i = 1; i <= N; i++) {\n powerOfTwo[i] = (powerOfTwo[i - 1] << 1L) % mod;\n }\n\n // Let ways[v] denotes the number of ways modulus 10^9+7 that balls can\n // be drawn from the set, so that their GCD equals the number v.\n int[] ways = new int[maxV];\n\n for (int i = 0; i < balls.length; i++) {\n// balls\n }\n\n for (int i = 0; i < balls.length; i++) {\n\n for (int v = 1; v <= 10000; v++) {\n\n int gcd = gcd(balls[i], v);\n ways[gcd] = add(ways[gcd], (int)((powerOfTwo[counter[i]] - 1) * ways[v]));\n }\n\n ways[balls[i]] = add(ways[balls[i]], (int)powerOfTwo[counter[i]] - 1);\n }\n\n int Q = in.nextInt(); // Representing the number of GCD queries that will have to be performed.\n in.nextLine();\n\n// in.skip(\"\\n\");\n\n for (int queryNum = 1; queryNum <= Q; queryNum++) {\n\n int X = in.nextInt(); // Denoting the GCD.\n\n System.out.println(ways[X]);\n }\n }", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "@Test\n public void test1(){\n times = new ArrayList<Long>();\n for(int i = 0; i<threadnums.length; i++){\n BSTInterface tree = new LockFreeBST();\n makeThread1(tree, threadnums[i]);\n\n System.out.println( \"When there are \"+threadnums[i] + \" threads, there are \"+tree.getNum() + \" nodes\");\n\n long startTime=System.currentTimeMillis();\n for(int k = 0; k<100; k++)\n tree.search(totalnum/2);\n long endTime=System.currentTimeMillis();\n System.out.println( \"When there are \"+threadnums[i] + \"threads, the search takes \"+ (endTime-startTime) + \" ms\");\n }\n for(int i = 0; i<threadnums.length; i++){\n System.out.println(\"When there are \"+threadnums[i]+\" threads, \"+\"it takes \"+times.get(i)+\" ms\");\n }\n }", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "static long findSum(int N)\n\t{\n\t\tif(N==0) return 0;\n\t\treturn (long)((N+1)>>1)*((N+1)>>1)+findSum((int)N>>1);\n\t\t\n\t}", "@Override public short getComplexity() {\n return 0;\n }", "private static void task01(int nUMS, BinarySearchTree<Integer> t, GenerateInt generateInt) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Fill in the table...Binary Tree\" );\n\t\t int count=1;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\t \t\t \n\t\t\t\tt.insert(GenerateInt.generateNumber());\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\t\t\t\tcount = i;\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "private static void traverse(int i, int j) {\r\n\t\tif(i + j == SIZE + SIZE){\r\n\t\t\tCOUNT++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(i < SIZE){\r\n\t\t\ttraverse(i + 1, j);\r\n\t\t}\r\n\t\tif(j < SIZE){\r\n\t\t\ttraverse(i, j + 1);\r\n\t\t}\r\n\t}", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(1)\r\n nums[i+1]=nums[j+1]; //O(1)\r\n nums[j+1]=temp; // O(1)\r\n while(j+1<nums.length && nums[j+1] != 4) //O(n)\r\n j++; // n+1\r\n }\r\n i++; // n+1\r\n }\r\n return nums; //O(1)\r\n}", "public static void main(String[] args) \n {\n int[] numOfPoints = { 1000, 10000, 7000, 10000, 13000 };\n for(int count = 0; count < numOfPoints.length; count++)\n {\n List<Point> pointsTobeUsed = new ArrayList<Point>();\n int current = numOfPoints[count];\n int inc = 0;\n \n //creating list of points to be used\n for(int x = 0; x <= current; x++)\n {\n \n if(x <= current/2)\n {\n pointsTobeUsed.add(new Point(x,x));\n \n }\n else\n {\n pointsTobeUsed.add(new Point(x, x - (1 + 2*(inc)) ) );\n inc++;\n }\n }\n \n //n logn implementation of Pareto optimal\n long timeStart = System.currentTimeMillis();\n \n // n logn quicksort\n pointsTobeUsed = quickSort(pointsTobeUsed, 0, pointsTobeUsed.size() -1 );\n \n \n \n ParetoOptimal(pointsTobeUsed);\n \n \n long timeEnd = System.currentTimeMillis();\n System.out.println(\"final:\" + \" exper: \" + (timeEnd - timeStart) + \" N: \" + current ); \n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}", "public void testTwoWayDistribution() {\n for(int p = 0; p < 20; p++) {\n int[] landings = new int[2];\n for(long in = 0; in < 100000; in++) {\n long longHash = FPGenerator.std64.fp(p+\"a\"+in);\n// long longHash = rand.nextLong();\n// long longHash = ArchiveUtils.doubleMurmur((p+\":\"+in).getBytes());\n landings[conhash.bucketFor(longHash, 2)]++;\n }\n// System.out.println(landings[0]+\",\"+landings[1]);\n assertTrue(\"excessive changes\",Math.abs(landings[0]-landings[1]) < 2000); \n }\n }", "public void summarizeSpaceEfficient() {\n int maxLevel = Collections.max(CALattice.levelMap.keySet());\n for (int i = maxLevel; i >= 0; i--) {\n summarizeSpaceEfficientHelper(CALattice.levelMap.get(i));\n //freeing memory\n if (i < maxLevel)\n freeMemory(CALattice.levelMap.get(i + 1));\n }\n }", "public int findDuplicate(int[] nums) {\n if(nums == null || nums.length == 0) return 0;\n\n int slow = nums[0];\n int fast = nums[nums[0]];\n\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n}", "public static double binSearchT(int s, Integer[] a){\n Random rand = new Random();\n int searchVar;\n Stopwatch timer = new Stopwatch();\n Arrays.sort(a);\n for (int i = 0; i < s; i++){\n searchVar = (int)(rand.nextDouble()*a.length);\n Arrays.binarySearch(a, searchVar);\n }\n return timer.elapsedTime(); // the method returns the elapsed time\n }", "private void go(int i) {\n\t\tcol[i] = 1;\r\n\t\tint j = f[i];\r\n\t\tint cnt = 0;\r\n\t\tint delAll = 0;\r\n\t\tint[][] cd = new int[1000][3];\r\n\t\tint sa = 0;\r\n\t\tint sb = 0;\r\n\t\tint m1 = Integer.MAX_VALUE;\r\n\t\tint m2 = Integer.MAX_VALUE;\r\n\t\tint m1a = 0;\r\n\t\tint m2a = 0;\r\n\t\tint m1b = 0;\r\n\t\tint m2b = 0;\r\n\t\twhile (j != -1) {\r\n\t\t\tif (col[e[j]] == 0) {\r\n\t\t\t\tgo(e[j]);\r\n\t\t\t\tdelAll += a[e[j]];\r\n\t\t\t\tint dif = b[e[j]] - a[e[j]];\r\n\t\t\t\tif (dif < m1) {\r\n\t\t\t\t\tm2 = m1;\r\n\t\t\t\t\tm2b = m1b;\r\n\t\t\t\t\tm2a = m1a;\r\n\t\t\t\t\tm1 = dif;\r\n\t\t\t\t\tm1a = a[e[j]];\r\n\t\t\t\t\tm1b = b[e[j]];\r\n\t\t\t\t} else if (dif < m2) {\r\n\t\t\t\t\tm2 = dif;\r\n\t\t\t\t\tm2a = a[e[j]];\r\n\t\t\t\t\tm2b = b[e[j]];\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tsa += a[e[j]];\r\n\t\t\t\tsb += a[e[j]];\r\n\t\t\t\tcd[cnt][0] = a[e[j]];\r\n\t\t\t\tcd[cnt][1] = b[e[j]];\r\n\t\t\t\tcd[cnt][2] = b[e[j]] - a[e[j]];\r\n\t\t\t\tcnt++;\r\n\t\t\t}\r\n\t\t\tj = next[j];\r\n\t\t}\r\n\t\tif (cnt == 0) {\r\n\t\t\ta[i] = 1;\r\n\t\t\tb[i] = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tArrays.sort(cd, new Comparator<int[]>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(int[] o1, int[] o2) {\r\n\t\t\t\t// TODO Auto-generated method stub\t\t\t\t\r\n\t\t\t\treturn o1[2] - o2[2];\r\n\t\t\t}\r\n\t\t});\r\n\t\ta[i] = delAll + 1;\r\n\t\t//leave 0 or 2\r\n\t\tint cost1 = 0;\r\n\t\tint cost = 0;\r\n\t\tfor (j = 2; j < cnt; j++)\r\n\t\t\tcost1 += cd[j][0];\r\n\t\tif (cnt >= 2) {\r\n\t\t\tcost += m1b + m2b + sa - m1a - m2a;\r\n\t\t\tcost1 += cd[0][1] + cd[1][1];\r\n\t\t} else {\r\n\t\t\tcost += sa;\r\n\t\t\tcost1 += cd[0][0];\r\n\t\t}\r\n\t\tif (cost1 != cost)\r\n\t\t\tSystem.err.println(\"FUCK\");\r\n\t\tb[i] = cost;\r\n\t}", "public static void main(String[] args) {\n int N = 100, i, j, min;\n System.out.println(\"Value of N: \" + N);\n\n for (i = 1; i <= N; i++)\n {\n for (j = 1; j <= N; j++)\n {\n min = i < j ? i : j;\n System.out.print(N - min + 1);\n }\n System.out.println();\n\n\n\n\n }\n}", "public static void a2v2(int[] A)\n {\n Map<Integer, List<Integer>> hashMap = new HashMap<>();\n\n insert(hashMap, 0, -1);\n\n int sum = 0;\n\n for (int i = 0; i < A.length; i++)\n {\n sum += A[i];\n\n if (hashMap.containsKey(sum))\n {\n List<Integer> list = hashMap.get(sum);\n\n // find all subarrays with the same sum\n for (Integer value: list)\n {\n System.out.println(\"Subarray [\" + (value + 1) + \"…\" +\n i + \"]\");\n }\n }\n\n // insert (sum so far, current index) pair into the hashmap\n insert(hashMap, sum, i);\n }\n }", "public static long solve(long[] data, long k) {\n int n = data.length;\n\n Buffer<Interval> buffer = new Buffer<>(Interval::new, x -> {}, n * 2);\n\n Randomized.shuffle(data);\n Arrays.sort(data);\n\n List<Interval> lastLevel = new ArrayList<>(n);\n List<Interval> curLevel = new ArrayList<>(n);\n lastLevel.add(newInterval(buffer, 0, n - 1));\n int level = Log2.floorLog(data[n - 1]);\n long mask = 0;\n for (; level >= 0; level--) {\n curLevel.clear();\n for (Interval interval : lastLevel) {\n int l = interval.l;\n int r = interval.r;\n int m = r;\n while (m >= l && Bits.get(data[m], level) == 1) {\n m--;\n }\n interval.m = m;\n }\n long total = 0;\n for (Interval interval : lastLevel) {\n total += (long) (interval.m - interval.l + 1) * (interval.relative.m - interval.relative.l + 1);\n total += (long) (interval.r - interval.m) * (interval.relative.r - interval.relative.m);\n }\n if (total < k) {\n k -= total;\n mask = Bits.set(mask, level, true);\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m && interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.r > interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m >= interval.relative.l) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n } else {\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n a.relative = a;\n curLevel.add(a);\n }\n if (interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = a;\n curLevel.add(a);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.l <= interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m < interval.relative.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n }\n\n for (Interval interval : lastLevel) {\n buffer.release(interval);\n }\n\n List<Interval> tmp = curLevel;\n curLevel = lastLevel;\n lastLevel = tmp;\n }\n\n return mask;\n }", "public p207() {\n double target = 1/12345.0;\n double log2 = Math.log(2);\n\n for (int x = 2; x < 2000000; x++){\n double a = Math.floor(Math.log(x) / log2) / (x-1);\n if (a < target){\n System.out.println(x*(x-1L));\n break;\n }\n }\n }", "static int logTime(int[] n, int start, int end, int val) {\n if(n == null || n.length == 0) return -1;\n int mid = (start + end) / 2;\n if(val < n[mid]) logTime(n, 0, mid, val);\n if(val > n[mid]) logTime(n, mid + 1, n.length, val);\n return n[mid];\n }", "private static void task3(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(t.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\tt.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + t.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "public ArrayList<Edge> Prim (String s){\n Node Start = nodeMap.get(s);\n mst = new ArrayList<>();\n HashMap<String, String> inserted = new HashMap<String, String>();\n ArrayList<Edge> failed = new ArrayList<Edge>();\n PriorityQueue<Edge> pq = new PriorityQueue<Edge>();\n ArrayList<Edge> ed = new ArrayList<Edge>(edgeMap.values());\n Edge first = ed.get(0);\n mst.add(first);\n inserted.put(first.w, first.w);\n inserted.put(first.v, first.v);\n\n priorityEdgeInsert(pq, first);\n\n while (inserted.size() <= edges() && pq.size() != 0){ //O(E log(V))\n //runs for E checking the possible V, where the number of V is devided each time, or log(V), giving ELog(V)\n Edge e = pq.poll();\n String w = inserted.get(e.w);\n String v = inserted.get(e.v);\n\n if ((w == null) ^ (v == null)){\n priorityEdgeInsert(pq, e);\n for(Edge f : failed){\n if(f.v == e.v || f.v == e.w || f.w == e.v || f.w == e.w){\n\n }\n else{\n pq.add(f);\n }\n }\n failed.clear();\n mst.add(e);\n inserted.put(e.w, e.w); //only puts one, the null one is hashed to a meaningless spot\n inserted.put(e.v, e.v);\n }\n else if ((w == null) && (v == null) ){\n failed.add(e);\n }\n else if (!(w == null) && !(v == null) ){\n failed.remove(e);\n pq.remove(e);\n }\n else if (e == null){\n System.out.println(\"HOW?\"); //should never happen.\n }\n }\n return mst;\n }", "private int houseRobberWithMaxAmountHousesFromItoJInConstantSpace(int[] a, int i, int j) {\n\t\tif (null == a || i > j)\n\t\t\treturn 0;\n\n\t\tif (j - i == 0)\n\t\t\treturn a[i];\n\n\t\tint incl = a[i];\n\t\tint excl = 0, temp;\n\n\t\tfor (int k = i + 1; k <= j; k++) {\n\t\t\ttemp = incl;\n\t\t\tincl = Math.max(excl + a[k], incl);\n\t\t\texcl = temp;\n\t\t}\n\t\treturn incl;\n\t}", "public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n if (t < 0) return false;\n long sz = (long)t + 1;\n Map<Long, Long> map = new HashMap<>();\n for (int i = 0; i < nums.length; ++i) {\n long bucket = getBucket(nums[i], sz);\n if (map.containsKey(bucket)) return true;\n if (map.containsKey(bucket + 1) && Math.abs(nums[i] - map.get(bucket + 1)) < sz) return true;\n if (map.containsKey(bucket - 1) && Math.abs(nums[i] - map.get(bucket - 1)) < sz) return true;\n map.put(bucket, (long)nums[i]);\n if (i >= k) map.remove(getBucket(nums[i - k], sz));\n }\n return false;\n}", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "private void d() {\n Queue<c> queue;\n Queue<c> queue2 = queue = i;\n synchronized (queue2) {\n long l2 = System.currentTimeMillis();\n Iterator iterator = i.iterator();\n while (iterator.hasNext()) {\n if (l2 - ((c)iterator.next()).a < 60000L) continue;\n iterator.remove();\n }\n if (i.size() >= 15) {\n for (int i2 = 0; i2 < 5; ++i2) {\n i.remove();\n }\n }\n return;\n }\n }", "public static long longFastFib(int n) {\n\t\tlong a = 1;\n\t\tlong b = 0;\n\t\t\n\t\tlong temp = 0;\n\t\tfor(int i=0; i<n-1; i++){\n\t\t\ttemp = a;\n\t\t\ta += b;\n\t\t\tb = temp;\n\t\t\tif(a<0){\n\t\t\t\tSystem.out.println(\"Int overflow\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n return a; \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n }", "private boolean calculateMaximumLengthBitonicSubarray() {\n\n boolean found = false; // does any BSA found\n\n boolean directionChange = false; //does direction numberOfWays increase to decrease\n\n int countOfChange = 0;\n\n int i = 0;\n directionChange = false;\n int start = i;\n i++;\n for (; i < input.length; i++) {\n if (countOfChange != 0 && countOfChange % 2 == 0) {\n if (this.length < (i - 2 - start + 1)) {\n this.i = start;\n this.j = i - 2;\n this.length = this.j - this.i + 1;\n }\n start = i - 2;\n countOfChange = 0;\n }\n\n if (input[i] > input[i - 1]) {\n if (directionChange == true) {\n countOfChange++;\n }\n directionChange = false;\n }\n if (input[i] < input[i - 1]) {\n if (directionChange == false) {\n countOfChange++;\n }\n directionChange = true;\n }\n\n\n }\n\n if (directionChange == true) {\n if (this.length < (i - 1 - start + 1)) {\n this.i = start;\n this.j = i - 1;\n this.length = this.j - this.i + 1;\n }\n }\n return directionChange;\n }", "private void heapify() {\n for (int i=N/2; i>=1; i--)\n sink(i);\n }", "static int gen(int n)\n{ \n int []S = new int [n + 1];\n \n S[0] = 0;\n if(n != 0)\n S[1] = 1;\n \n for (int i = 2; i <= n; i++)\n { \n \n // S(2 * n) = 4 * S(n)\n if (i % 2 == 0)\n S[i] = 4 * S[i / 2];\n \n // S(2 * n + 1) = 4 * S(n) + 1\n else\n S[i] = 4 * S[i/2] + 1;\n }\n \n return S[n];\n}", "int incCapacity()\r\n\t{\r\n\t\tint i,j;\r\n\t\tfor (i=0; i<=state; ++i)\r\n\t\t\tfor (j=0; j<=symbol; ++j)\r\n\t\t\t\tg[i][j][state]=g[state][j][i]=false;\r\n\t\treturn (state++);\r\n\t}", "WeightedUnionFind(int N){\n id = new int[N];\n size = new int[N];\n for (int i = 0; i < N; i++){\n id[i] = i;\n size[i] = 1;\n }\n }", "public int R_M(){\n\t\tBigInteger nminus1=n.subtract(BigInteger.ONE);\n\t\tdo{\n\t\t\tif(nminus1.mod(two.pow(a)).equals(BigInteger.ZERO)){\n\t\t\t\ttable.add(a);\n\t\t\t}\n\t\t\titerator++;\n\t\t\ta++;\n\t\t}while(!(two.pow(a).compareTo(n)>0));\n\t\t\n\t\ta=table.get(table.size()-1);\n\t\tBigInteger m=nminus1.divide(two.pow(a));\n\t\tint wlen=n.bitLength();\n\t\tBigInteger b;\n\t\tBigInteger z;\n\t\tfor(int i=0;i<iterations;i++){\n\t\t\tint straznik=0;\n\t\t\tint straznik1=0;\n\t\t\tdo{\n\t\t\t b=new BigInteger(wlen,new Random());\n\t\t\t}while(!(b.compareTo(BigInteger.ONE)>0) && !(b.compareTo(nminus1)<0));\n\t\t\tz=b.modPow(m, n);\n\t\t\tif(z.equals(BigInteger.ONE) || z.equals(nminus1)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int j=0;j<a-1;j++){\n\t\t\t\t\tz=z.pow(2).mod(n);\n\t\t\t\t\tif(z.equals(nminus1)){\n\t\t\t\t\t\tstraznik++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(z.equals(BigInteger.ONE)){\n\t\t\t\t\t\tstraznik1++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(straznik==1){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(straznik1==1){\n\t\t\t\t\tgetComposite();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tgetComposite();\n\t\t\treturn 0;\n\t\t}\n\t\tgetProbablyPrime();\n\t\treturn 1;\n\t\t}", "private static long fillBinaryTree(BinarySearchTree<Integer> aTree, int[] anIntArray) {\n long start = System.currentTimeMillis();\n for (int integer : anIntArray) {\n aTree.insert(integer);\n }\n long finish = System.currentTimeMillis();\n\n return (finish - start);\n }", "public static void main(String[] args) throws java.lang.Exception {\n\n Scanner scn = new Scanner(System.in);\n\n int t = scn.nextInt();\n\n while (t != 0) {\n int n = scn.nextInt();\n\n int arr[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n\n arr[i] = scn.nextInt();\n\n }\n int pos = scn.nextInt();\n long element = arr[pos-1];\n\n Arrays.sort(arr);\n \n for(int i=0;i<n;i++)\n System.out.print(arr[i]+\" \");\n \n System.out.println();\n System.out.println(bsearch(arr, element) +1 );\n t--;\n }\n\n }", "public int[] findAnyPairIndexesWhileLCMMinimized() {\n if (seq.length < 2) {\n return null;\n }\n int size = 0;\n for (int i = 1; i <= m; i++) {\n size += m / i;\n }\n\n IntegerMultiWayDeque deque = new IntegerMultiWayDeque(m + 1, size);\n for (int i = 1; i <= m; i++) {\n for (int j = i; j <= m; j += i) {\n if (!indexesOfSeq.isEmpty(j)) {\n deque.addLast(i, j / i);\n }\n }\n }\n\n long lcm = INF;\n int v1 = 0;\n int v2 = 0;\n\n for (int i = 1; i <= m; i++) {\n if (!indexesOfSeq.isEmpty(i) && indexesOfSeq.peekFirst(i) != indexesOfSeq.peekLast(i)) {\n lcm = v1 = v2 = i;\n break;\n }\n }\n\n IntegerVersionArray iva = new IntegerVersionArray(m + 1);\n IntegerDequeImpl stack = new IntegerDequeImpl(m);\n for (int i = 1; i <= m; i++) {\n iva.clear();\n stack.clear();\n while (!deque.isEmpty(i)) {\n int last = deque.removeFirst(i);\n factorize(last);\n int total = ie(iva, allFactors.size() - 1, 1, 0);\n if (total > 0) {\n int pop = 0;\n while (total > 0) {\n pop = stack.removeLast();\n if (GCDs.gcd(pop, last) == 1) {\n total--;\n }\n add(iva, pop, -1);\n }\n long l = LCMs.lcm(last, pop) * i;\n if (l < lcm) {\n lcm = l;\n v1 = last * i;\n v2 = pop * i;\n }\n }\n add(iva, last, 1);\n stack.addLast(last);\n }\n }\n\n return new int[]{indexesOfSeq.peekFirst(v1), indexesOfSeq.peekLast(v2)};\n }", "private void mergeAB() {\r\n //merge only for the indexes of this global_count\r\n boolean a_end = false;\r\n boolean b_end = false;\r\n boolean start = false;\r\n int a_count = splitA[global_count - 1];\r\n if(a_count == A.length - 1){\r\n a_count = splitA[global_count - 2] + 1;\r\n }\r\n int b_count = splitB[global_count - 1];\r\n if(b_count == B.length - 1){\r\n if(global_count != splitB.length){\r\n start = true;\r\n b_count = 0;\r\n }\r\n else{\r\n b_count = splitB[global_count - 2] + 1;\r\n }\r\n }\r\n if(b_count == -1){\r\n b_end = true;\r\n b_count = 0;\r\n if(splitB[0] == B.length - 1){\r\n b_count = B.length;\r\n }\r\n }\r\n int c_count = a_count + b_count;\r\n while(!a_end || !b_end){\r\n if(a_end){\r\n C[c_count] = B[b_count];\r\n b_count++;\r\n }\r\n else if(b_end){\r\n C[c_count] = A[a_count];\r\n a_count++;\r\n }\r\n //if a > b\r\n else if(A[a_count] > B[b_count]){\r\n C[c_count] = B[b_count];\r\n b_count++;\r\n c_count++;\r\n }\r\n //if a <= b\r\n else{\r\n C[c_count] = A[a_count];\r\n a_count++;\r\n c_count++;\r\n }\r\n if(!start){\r\n if(a_count == splitA[global_count - 1] + 1){\r\n a_end = true;\r\n }\r\n if(b_count == splitB[global_count - 1] + 1){\r\n b_end = true;\r\n }\r\n }\r\n else{\r\n if(a_count == splitA[global_count - 1] + 1){\r\n a_end = true;\r\n }\r\n if(b_count == splitB.length){\r\n b_end = true;\r\n }\r\n }\r\n }\r\n }", "static int[] solve(int[] A, int N) {\n\n BST bst = new BST();\n\n Set<Integer> levels = new LinkedHashSet<>();\n\n int[] finlevels = new int[A.length];\n\n for(int i = 0 ; i< A.length; i++){\n bst.insert(A[i], levels);\n //finlevels[i] = bst.getLevel(bst.root, A[i]);\n }\n\n return finlevels;\n\n }", "private int getIndex(int val){\n return val%bucket;\n }", "@Test\n public void testPerformance() {\n int opCount = 1000000;\n Random random = new Random();\n\n for(int i = 0; i < opCount; i++) {\n linkedListStack.push(new Student(random.nextInt(Integer.MAX_VALUE), random.nextInt(Integer.MAX_VALUE)));\n }\n while(!linkedListStack.isEmpty()) {\n linkedListStack.pop();\n }\n }", "public static void main(String[] args) throws NoSuchAlgorithmException {\n\t\t\n\t\t\n\t\tBloomFilter bf= new BloomFilter(3000000, 0.0001);\n\t\t\n\t\tSystem.out.println(\"n=\"+bf.n);\n\t\tSystem.out.println(\"p= \"+bf.falseprobability);\n\t\tSystem.out.println(\" m=\"+bf.m);\n\t\tSystem.out.println(\" k=\"+ bf.k);\n\t\t\n\t\t\n\t\n\t\t\n\t\tfor(int i=0;i<3000000;i++){\n\t\t\t//if(i%2==0)\n\t\t\t\tbf.add(\"INCREASES LENGTH OF String TO TEST MAX LIMIT\"+i);\n\t\t}\n\t\t\n\t\tint counter=0;\n\t\tfinal long starttime=System.nanoTime();\n\t\tfor(int j=0;j<3000000;j++)\n\t\t\tif(!bf.contains(\"INCREASES LENGTH OF String TO TEST MAX LIMIT\"+j))\n\t\t\t\tcounter++;\n\t\t\n\t\tfinal long duration=System.nanoTime()-starttime;\n\t\t\n\t\tSystem.out.println(\"duration of checking 3000000 elementis=\"+duration/3000000+\"counter value=\"+counter);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t}", "public static int myOwn(Node A, Node B){\r\n int toReturn = 0;\r\n for (int i = 0; i<puzzleSize; i++){\r\n for (int j = 0; j<puzzleSize; j++){\r\n if (A.state[i][j]==B.state[i][j])\r\n toReturn--;\r\n else\r\n toReturn++;\r\n }\r\n }\r\n return toReturn;\r\n }", "static int linearLogTime(int[] n, int[] m) {\n if(n == null || n.length == 0 || m == null || m.length == 0) return -1;\n int sum = 0;\n for(int i = 0; i < n.length; ++i) {\n sum += logTime(m, 0, m.length, 15);\n }\n return sum;\n }", "private static void task2(int nUMS, BinarySearchTree<Integer> t) {\n\t\tSystem.out.println(\"Binary Search Started...\");\n\t double search_start = 0, search_end = 0;\n\t int totalkeymatched = 0;\n\n\t search_start = System.nanoTime();\n\t \n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n\t \t\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (t.contains(checker)) {\n\t\n//\t System.out.println(\"Key Matches\");\n\t totalkeymatched++;\n\t \t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each search: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t System.out.println(\"TOTAL MATCHES \" + totalkeymatched);\n\t\t\n\t}", "static long countTriplets(List<Long> arr, long r) {\n\n long triplets = 0;\n\n HashMap<Long, LinkedList<Integer>> powIndexesMap = new HashMap<>();\n for (int i = 0; i < arr.size(); i++) {\n Long number = arr.get(i);\n Long pow = Long.valueOf((long) logb(number, r));\n LinkedList<Integer> indexes;\n if (!powIndexesMap.containsKey(pow)) {\n indexes = new LinkedList<>();\n } else {\n indexes = powIndexesMap.get(pow);\n }\n indexes.add(i);\n powIndexesMap.put(pow, indexes);\n }\n\n for (int i = 0; i < arr.size(); i++) {\n Long number = arr.get(i);\n Long pow = Long.valueOf((long) logb(number, r));\n Long pow2 = pow + 1;\n Long pow3 = pow2 + 1;\n\n if (!powIndexesMap.containsKey(pow2) || !powIndexesMap.containsKey(pow3)) {\n continue;\n }\n Integer countPow2 = powIndexesMap.get(pow2).size();\n Integer countPow3 = powIndexesMap.get(pow3).size();\n\n if (countPow2 > 0 && countPow3 > 0) {\n triplets += (countPow2 * countPow3);\n }\n }\n return triplets;\n }", "public long a() {\n long l2;\n long l3;\n if (this.c()) {\n a.i.a a2 = this.l;\n a.i.a a4 = a.i.a.b;\n boolean bl = false;\n if (a2 == a4) {\n bl = true;\n }\n long l4 = bl ? this.m * (long)this.k : (long)Math.scalb((float)this.m, (int)(this.k - 1));\n l2 = this.n;\n l3 = Math.min((long)18000000L, (long)l4);\n do {\n return l3 + l2;\n break;\n } while (true);\n }\n boolean bl = this.d();\n long l5 = 0L;\n if (bl) {\n long l6 = System.currentTimeMillis();\n long l7 = this.n;\n if (l7 == l5) {\n l7 = l6 + this.g;\n }\n long l8 = this.i LCMP this.h;\n boolean bl2 = false;\n if (l8 != false) {\n bl2 = true;\n }\n if (bl2) {\n if (this.n != l5) return l5 + (l7 + this.h);\n l5 = -1L * this.i;\n return l5 + (l7 + this.h);\n }\n if (this.n == l5) return l7 + l5;\n l5 = this.h;\n return l7 + l5;\n }\n l3 = this.n;\n if (l3 == l5) {\n l3 = System.currentTimeMillis();\n }\n l2 = this.g;\n return l3 + l2;\n }", "private void snapshot\n (int[] i, int i0, int i1, long[] V) {\n int I = i.length;\n long[] va = V;\n long[] vb = new long[I];\n long[] ta = new long[I];\n long[] tb = new long[I];\n do {\n collectTags(i, i0, i1, ta);\n collectValues(i, i0, i1, va);\n collectValues(i, i0, i1, vb);\n collectTags(i, i0, i1, tb);\n } while(\n Arrays.compare(ta, i0, i1, tb, i0, i1) != 0 ||\n Arrays.compare(va, i0, i1, vb, i0, i1) != 0\n );\n }", "private int hashFunc2(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n // Research shows that you can use a Prime number Less than the array size to calculate the step value.\n // Prime Number 3 arbitrarily chosen.\n return 3 - hashVal % 3;\n }", "private static void task03(int nUMS, AVLTree<Integer> h) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(h.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\th.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + h.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "BigInteger getCount();", "@Override\n\tpublic List<Node<E>> bfs(DirectedGraph<E> graph) {\n\t\tList<Node<E>> returnList = new ArrayList<>(); // O(1)\n\t\tHashSet<Node<E>> visitedList = new HashSet<>(); // O(1)\n\t\tHashSet<Node<E>> hashSet = new HashSet<>(); // O(1)\n\n\t\t// If the graph does contains heads, iterate from the head.\n\t\tif(graph.headCount() > 0) { // O(1)\n\t\t\tIterator<Node<E>> heads = graph.heads(); // O(1)\n\t\t\twhile(heads.hasNext()) { // O(n)\n\t\t\t\tNode<E> node = heads.next(); // O(1)\n\n\t\t\t\tif(!visitedList.contains(node)) { // O(1)\n\t\t\t\t\tnode.num = visitedList.size(); // O(1)\n\t\t\t\t\tvisitedList.add(node); // O(1)\n\t\t\t\t\thashSet.add(node); // O(1)\n\t\t\t\t\treturnList.add(node); // O(1)\n\t\t\t\t\treturnList = bfsRecursive(hashSet, visitedList, returnList); // O(1)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Else start from the first node in the graph.\n\t\telse {\n\t\t\thashSet.add(graph.getNodeFor(graph.allItems().get(0))); // O(1)\n\t\t\treturnList = bfsRecursive(hashSet, visitedList, returnList); // O(1)\n\t\t}\n\t\treturn returnList;\n\t}", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "public int solution(int[] A) {\n ArrayList<Integer> fibonacci = new ArrayList<>();\n\n fibonacci.add(0); // note: f(0) = 0 (as in the quesion)\n fibonacci.add(1);\n // note: using \"while\" is better than \"for\" (avoid errors)\n\n while (true) {\n int temp1 = fibonacci.get(fibonacci.size() - 1);\n int temp2 = fibonacci.get(fibonacci.size() - 2);\n\n fibonacci.add(temp1 + temp2);\n\n // if already bigger than length, then break;\n if (temp1 + temp2 > A.length) {\n break;\n }\n }\n\n // reverse \"List\": from big to small\n Collections.reverse(fibonacci);\n\n // use \"queue\" with \"point\"\n // point(x,y) = point(\"position\", \"number of steps\")\n ArrayList<Point> queue = new ArrayList<>();\n\n queue.add(new Point(-1, 0)); // position:-1, steps:0\n\n // index: the current index for queue element\n int index = 0;\n while (true) {\n // cannot take element from queue anymore\n if (index == queue.size()) {\n return -1;\n }\n\n // take element from queue\n Point current = queue.get(index);\n\n // from big to small\n for (Integer n : fibonacci) {\n int nextPosition = current.x + n;\n\n // case 1: \"reach the other side\"\n if (nextPosition == A.length) {\n // return the number of steps\n return current.y + 1;\n }\n\n // case 2: \"cannot jump\"\n // note: nextPosition < 0 (overflow, be careful)\n else if ((nextPosition > A.length) || (nextPosition < 0) || (A[nextPosition] == 0)) {\n // note: do nothing\n }\n\n // case 3: \"can jump\" (othe cases)\n else {\n // jump to next position, and step+1\n Point temp = new Point(nextPosition, current.y + 1);\n // add to queue\n queue.add(temp);\n\n A[nextPosition] = 0; // key point: for high performance~!!\n }\n }\n\n index++; // take \"next element\" from queue\n }\n }", "private int probe(K key, int i, int size)\r\n\t{\r\n\t\t// Use quadratic probing of the form: (i^2 + i) / 2\r\n\t\treturn (hash(key) + ((int) (Math.pow(i, 2) + i) >> 2)) % size;\r\n\t}", "private static void task011(int nUMS, AVLTree<Integer> h, GenerateInt generateInt) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Fill in the table...Binary Tree\" );\n\t\t int count=1;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\t \t\t \n\t\t\t\th.insert(GenerateInt.generateNumber());\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\t\t\t\tcount = i;\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tN = sc.nextInt();\r\n\t\tmap = new int[N+1][N+1];\r\n\t\tvisited = new int[N+1][N+1];\r\n\t\t\r\n\t\tfor(int i=0; i<N; i++) {\r\n\t\t\tfor(int j =0; j<N; j++) {\r\n\t\t\t\t\r\n\t\t\t\tmap[i][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\r\n\t\tfor(int i=1; i<N+1; i++) {\r\n\t\t\tfor(int j =1; j<N+1; j++) {\r\n\t\t\t\t\r\n\t\t\t\t\tbfs(i,j);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t}", "private void fastXY(int x, int y){\n ccells.row5bitHash(x,y-2);\n ccells.row5bitHash(x,y-1);\n ccells.row5bitHash(x,y);\n ccells.row5bitHash(x,y+1);\n ccells.row5bitHash(x,y+2);\n // then use some binary math to manipulate this data into hashes for each cell\n // flatten the loop and copy paste yay :)\n // or I could also leave the loop alone and make it loop over array which would be a little more readable\n }", "private static void task01111(int nUMS, SplayTree<Integer> j, GenerateInt generateInt) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Fill in the table...Splay Tree\" );\n\t\t int count=1;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\t \t\t \n\t\t\t\tj.insert(GenerateInt.generateNumber());\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\t\t\t\tcount = i;\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\n\t\t\n\t}" ]
[ "0.66161", "0.6107229", "0.6065795", "0.56877404", "0.56256324", "0.5621128", "0.55983096", "0.55743927", "0.5523847", "0.5509487", "0.5475842", "0.5474793", "0.54627544", "0.5422682", "0.53713554", "0.5343324", "0.53314525", "0.5312595", "0.5310807", "0.52890104", "0.5270457", "0.5265675", "0.52489114", "0.52455854", "0.5244197", "0.5236554", "0.52269876", "0.52124345", "0.5181706", "0.5172462", "0.5156889", "0.5149721", "0.5142405", "0.5135523", "0.51198834", "0.5115711", "0.5108395", "0.5108004", "0.5087078", "0.5076018", "0.5070837", "0.50665826", "0.5055865", "0.5045026", "0.50377786", "0.503268", "0.5027067", "0.50170064", "0.5007368", "0.5004285", "0.49997234", "0.49993333", "0.49973625", "0.49952915", "0.49842197", "0.4972882", "0.49663192", "0.496364", "0.49630743", "0.4958489", "0.4957489", "0.4956383", "0.49510166", "0.494003", "0.49319294", "0.4928038", "0.49269697", "0.49238646", "0.4920703", "0.49198076", "0.49192995", "0.4912136", "0.49050087", "0.4904742", "0.49003014", "0.49000105", "0.4899732", "0.48935705", "0.48894137", "0.48738307", "0.4868902", "0.48687592", "0.48649824", "0.48529464", "0.4849996", "0.48485208", "0.4848214", "0.48434848", "0.48432454", "0.48420146", "0.4835008", "0.48339623", "0.48242524", "0.4823308", "0.4821229", "0.4819034", "0.48183298", "0.48172787", "0.4815529", "0.48124635", "0.48111105" ]
0.0
-1
Time: O(B), Space: O(B)
private List<List<Integer>> getPositions(List<List<Integer>> wall) { List<List<Integer>> positions = new ArrayList<>(); for (List<Integer> row : wall) { List<Integer> positionRow = new ArrayList<>(); int position = 0; for (int x : row) { position += x; positionRow.add(position); } positions.add(positionRow); } return positions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "public long problem2b(){\r\n LinkedList<String> linkList = new LinkedList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n linkList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start; \r\n }", "void merge_hi(int pa, int na, int pb, int nb) {\n getmem(nb);\n int dest = pb + nb - 1;\n int basea = pa;\n System.arraycopy(this.data, pb, this.a, 0, nb);\n \n pb = nb - 1;\n pa += na - 1;\n \n this.data[dest--] = this.data[pa--];\n --na;\n if (na == 0)\n return;\n if (nb == 1) {\n // CopyA;\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n \n try {\n for (;;) {\n int acount = 0; /* # of time A won in a row */\n int bcount = 0; /* # of time B won in a row */\n \n /* Do the straightforward thing until (if ever) one run\n * appears to win consistently.\n */\n for (;;) {\n boolean k = iflt(this.a[pb], this.data[pa]);\n if (k) {\n this.data[dest--] = this.data[pa--];\n ++acount;\n bcount = 0;\n --na;\n if (na == 0)\n return;\n if (acount >= MIN_GALLOP)\n break;\n } else {\n this.data[dest--] = this.a[pb--];\n ++bcount;\n acount = 0;\n --nb;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n if (bcount >= MIN_GALLOP)\n break;\n }\n }\n \n /* One run is winning so consistently that galloping may\n * be a huge win. So try that, and continue galloping until\n * (if ever) neither run appears to be winning consistently\n * anymore.\n */\n do {\n int k = gallop_right(this.a[pb], this.data, basea, na, na-1);\n acount = k = na - k;\n if (k != 0) {\n dest -= k;\n pa -= k;\n System.arraycopy(this.data, pa+1, this.data, dest+1, k);\n na -= k;\n if (na == 0)\n return;\n }\n \n this.data[dest--] = this.a[pb--];\n --nb;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n \n k = gallop_left(this.data[pa], this.a, 0, nb, nb-1);\n bcount = k = nb - k;\n if (k != 0) {\n dest -= k;\n pb -= k;\n System.arraycopy(this.a, pb+1, this.data, dest+1, k);\n nb -= k;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n /* nb==0 is impossible now if the comparison\n * function is consistent, but we can't assume\n * that it is.\n */\n if (nb == 0)\n return;\n }\n this.data[dest--] = this.data[pa--];\n --na;\n if (na == 0)\n return;\n } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);\n }\n } finally {\n if (nb != 0)\n System.arraycopy(this.a, 0, this.data, dest-(nb-1), nb);\n \n //dump_data(\"result\", origpa, cnt);\n }\n }", "public int findDuplicate(int[] nums) {\n if(nums == null || nums.length == 0) return 0;\n\n int slow = nums[0];\n int fast = nums[nums[0]];\n\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n}", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "public boolean linearIn(int[] outer, int[] inner) {\r\n int comp=0; // O(1)\r\n int count=0; // O(1)\r\n if(inner.length==0) // O(1)\r\n return true; // O(1)\r\n for(int i=0; i<outer.length; i++) { // O(n)\r\n if(outer[i]==inner[count]) { // O(1)\r\n comp++; // O(1)\r\n count++; // O(1)\r\n } else if(outer[i]>inner[count]) // O(1)\r\n return false; // O(1)\r\n if (comp==inner.length) // O(1)\r\n return true; // O(1)\r\n }\r\n return false; // O(1)\r\n}", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "void merge_lo(int pa, int na, int pb, int nb) {\n getmem(na);\n System.arraycopy(this.data, pa, this.a, 0, na);\n int dest = pa;\n pa = 0;\n \n this.data[dest++] = this.data[pb++];\n --nb;\n if (nb == 0)\n return;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n return;\n }\n \n try {\n for (;;) {\n int acount = 0; /* # of time A won in a row */\n int bcount = 0; /* # of time B won in a row */\n \n /* Do the straightforward thing until (if ever) one run\n * appears to win consistently.\n */\n for (;;) {\n boolean k = iflt(this.data[pb], this.a[pa]);\n if (k) {\n this.data[dest++] = this.data[pb++];\n ++bcount;\n acount = 0;\n --nb;\n if (nb == 0)\n return;\n if (bcount >= MIN_GALLOP)\n break;\n } else {\n this.data[dest++] = this.a[pa++];\n ++acount;\n bcount = 0;\n --na;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n if (acount >= MIN_GALLOP)\n break;\n }\n }\n \n /* One run is winning so consistently that galloping may\n * be a huge win. So try that, and continue galloping until\n * (if ever) neither run appears to be winning consistently\n * anymore.\n */\n do {\n int k = gallop_right(this.data[pb], this.a, pa, na, 0);\n acount = k;\n if (k != 0) {\n System.arraycopy(this.a, pa, this.data, dest, k);\n dest += k;\n pa += k;\n na -= k;\n if (na == 1) {\n // CopyB\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n /* na==0 is impossible now if the comparison\n * function is consistent, but we can't assume\n * that it is.\n */\n if (na == 0)\n return;\n }\n \n this.data[dest++] = this.data[pb++];\n --nb;\n if (nb == 0)\n return;\n \n k = gallop_left(this.a[pa], this.data, pb, nb, 0);\n bcount = k;\n if (k != 0) {\n System.arraycopy(this.data, pb, this.data, dest, k);\n dest += k;\n pb += k;\n nb -= k;\n if (nb == 0)\n return;\n }\n this.data[dest++] = this.a[pa++];\n --na;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);\n }\n } finally {\n if (na != 0)\n System.arraycopy(this.a, pa, this.data, dest, na);\n \n //dump_data(\"result\", origpa, cnt);\n }\n }", "private void d() {\n Queue<c> queue;\n Queue<c> queue2 = queue = i;\n synchronized (queue2) {\n long l2 = System.currentTimeMillis();\n Iterator iterator = i.iterator();\n while (iterator.hasNext()) {\n if (l2 - ((c)iterator.next()).a < 60000L) continue;\n iterator.remove();\n }\n if (i.size() >= 15) {\n for (int i2 = 0; i2 < 5; ++i2) {\n i.remove();\n }\n }\n return;\n }\n }", "private boolean slowEquals(byte[] a, byte[] b)\n {\n int diff = a.length ^ b.length;\n for(int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }", "@Override public short getComplexity() {\n return 0;\n }", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "private static boolean slowEquals(final byte[] a, final byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++) {\n diff |= a[i] ^ b[i];\n }\n return diff == 0;\n }", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(1)\r\n nums[i+1]=nums[j+1]; //O(1)\r\n nums[j+1]=temp; // O(1)\r\n while(j+1<nums.length && nums[j+1] != 4) //O(n)\r\n j++; // n+1\r\n }\r\n i++; // n+1\r\n }\r\n return nums; //O(1)\r\n}", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public static void main(String[] args){\n int MIN = Integer.parseInt(args[0]);\n MAX = Integer.parseInt(args[1]);\n cutoffs = new int[args.length - 2];\n cache = new ArrayList<IndexedArrayList<SuperSavvyTrieHelper2>>();\n for (int i = 2; i < args.length; i++){\n cutoffs[i - 2] = Integer.parseInt(args[i]);\n cache.add(new IndexedArrayList<SuperSavvyTrieHelper2>());\n }\n for (int i = 0; i < cutoffs.length / 2; i++){\n int temp = cutoffs[i];\n cutoffs[i] = cutoffs[cutoffs.length - 1 - i];\n cutoffs[cutoffs.length - 1 - i] = temp;\n }\n multiplicitiesUsed = new boolean[MAX + 1];\n basesUsed = new DoublyLinkedArray(MAX + 1);\n SuperSavvyTrieHelper2.setCorrespondance(basesUsed);\n /*\n long count1 = lowerRecursion(MAX, 0);\n long count2 = middleRecursion(MAX, 0);\n long count3 = upperRecursion(MAX, 0);\n long total = count1 + count2 + count3;\n System.out.printf(\"%d + %d + %d = %d\\n\", count1, count2, count3, total);\n */\n hitCounts = new long[cutoffs.length];\n missCounts = new long[cutoffs.length];\n statCollector = new StatCollector(cutoffs);\n\n long startTime = System.nanoTime();\n long[] values = new long[MAX - MIN + 1];\n for (int i = MIN; i <= MAX; i++) {\n values[i - MIN] = upperRecursionWrapper(i);\n }\n //long[] testValues = new long[] {1752443,1911046, 2067456,2249444,2429337, 2647532,2852449,3101167,3350292,3632299,3916575};\n for (int i = 0; i < values.length; i++){\n //if (testValues[i] != values[i]){\n System.out.printf(\"%d: %d\\n\", i + MIN, values[i]);\n //}\n }\n long endTime = System.nanoTime();\n System.out.printf(\"%f,\", (double)(endTime - startTime) / 1000000000.0);\n long totalMissCounts = 0;\n long totalMissWeight1 = 0;\n long totalMissWeight2 = 0;\n long totalMissWeight3 = 0;\n /*\n for (int i = 0; i < cutoffs.length; i++){\n long totalCounts = hitCounts[i] + missCounts[i];\n totalMissCounts += missCounts[i];\n totalMissWeight1 += missCounts[i] * cutoffs[i];\n totalMissWeight2 += (hitCounts[i] / missCounts[i]) * cutoffs[i];\n totalMissWeight3 += (hitCounts[i] - missCounts[i]) * cutoffs[i] * cutoffs[i];\n System.out.printf(\"\\tCache %d: %d/%d/%d (%.5f%%)\", cutoffs[i], hitCounts[i], missCounts[i], totalCounts, (double) hitCounts[i] / totalCounts);\n }\n System.out.printf(\"\\t\\tMissCounts: %d, weighted: %d, ratio: %d, diff^2: %d\\n\", totalMissCounts, totalMissWeight1, totalMissWeight2, totalMissWeight3);\n */\n statCollector.printAll();\n }", "static void UseArrayList(ArrayList<Integer> myList2){\r\n\t\tLong start = System.currentTimeMillis();\r\n\t\tfor (int n=0; n<myList2.size();n++)\r\n\t\t{\r\n\t\t\tfor (int m=n+1; m<myList2.size();m++){\r\n\t\t\t\tif( myList2.get(n)== myList2.get(m) ) {System.out.println(\"Duplicate found \"+myList2.get(n));}\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong End = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"Total time taken for executing this code is: \" + (End-start));\r\n\t}", "public static void main(String[] args) {\r\n\t\t/** 1.000\r\n\t\t * bruteforceBE Asc runtime: 1072294\r\n\t\t * bruteforceBE Desc runtime: 17835245\r\n\t\t * improvedBE Asc runtime: 3562199\r\n\t\t * improvedBE Desc runtime: 794515\r\n\t\t * linearBE Asc runtime: 1680780\r\n\t\t * linearBE Desc runtime: 1629310\r\n\t\t *\r\n\t\t * 10.000\r\n\t\t * bruteforceBE Asc runtime: 3850878\r\n\t\t * bruteforceBE Desc runtime: 113789179\r\n\t\t * improvedBE Asc runtime: 11800873\r\n\t\t * improvedBE Desc runtime: 8166293\r\n\t\t * linearBE Asc runtime: 14381578\r\n\t\t * linearBE Desc runtime: 5897656\r\n\t\t *\r\n\t\t * 100.000\r\n\t\t * bruteforceBE Asc runtime: 19376301\r\n\t\t * bruteforceBE Desc runtime: 7801237491\r\n\t\t * improvedBE Asc runtime: 52015969\r\n\t\t * improvedBE Desc runtime: 33891001\r\n\t\t * linearBE Asc runtime: 43042990\r\n\t\t * linearBE Desc runtime: 10088763\r\n\t\t *\r\n\t\t * 200.000\r\n\t\t * bruteforceBE Asc runtime: 27567279\r\n\t\t * bruteforceBE Desc runtime: 30705593272\r\n\t\t * improvedBE Asc runtime: 87086775\r\n\t\t * improvedBE Desc runtime: 51012088\r\n\t\t * linearBE Asc runtime: 61726040\r\n\t\t * linearBE Desc runtime: 56062681\r\n\t\t */\r\n\t\tArrayList<Integer> ArrayUnsortAsc = new ArrayList<>();\r\n\t\tArrayList<Integer> ArrayUnsortDesc = new ArrayList<>();\r\n\t\tint n = 1000;\r\n\r\n\t\tfor(int i = 1; i <= n; i++ ) {\r\n\t\t\tArrayUnsortAsc.add(i);\r\n\t\t}\r\n\t\tfor(int j = n; j >= 1; j-- ) {\r\n\t\t\tArrayUnsortDesc.add(j);\r\n\t\t}\r\n\r\n\t\tlong beginning = 0, end = 0;\r\n\t\tlong runtime;\r\n\t\t//1a test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1b test\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortDesc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1c test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Desc runtime: \" + runtime);\r\n\r\n\t}", "private static boolean slowEquals(byte[] a, byte[] b) {\n\t int diff = a.length ^ b.length;\n\t for(int i = 0; i < a.length && i < b.length; i++)\n\t diff |= a[i] ^ b[i];\n\t return diff == 0;\n\t }", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "private static boolean slowEquals(byte[] a, byte[] b) {\r\n int diff = a.length ^ b.length;\r\n for (int i = 0; i < a.length && i < b.length; i++) {\r\n diff |= a[i] ^ b[i];\r\n }\r\n return diff == 0;\r\n }", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "private static int find(int i)\r\n{\n int ind = i;\r\n while (ind != ptrs[ind]) {\r\n ind = ptrs[ind];\r\n }\r\n // fix the link so that it is one hop only\r\n // note: this doesn't implement the full union-find update\r\n\r\n ptrs[i] = ind;\r\n\r\n return ind;\r\n}", "private int getIndex2(int val){\n return val/bucket;\n }", "protected int find_among_b(Among v[])\n {\n\tint i = 0;\n\tint j = v.length;\n\n\tint c = cursor;\n\tint lb = limit_backward;\n\n\tint common_i = 0;\n\tint common_j = 0;\n\n\tboolean first_key_inspected = false;\n\n\twhile (true) {\n\t int k = i + ((j - i) >> 1);\n\t int diff = 0;\n\t int common = common_i < common_j ? common_i : common_j;\n\t Among w = v[k];\n\t int i2;\n\t for (i2 = w.s.length - 1 - common; i2 >= 0; i2--) {\n\t\tif (c - common == lb) {\n\t\t diff = -1;\n\t\t break;\n\t\t}\n\t\tdiff = current.charAt(c - 1 - common) - w.s[i2];\n\t\tif (diff != 0) break;\n\t\tcommon++;\n\t }\n\t if (diff < 0) {\n\t\tj = k;\n\t\tcommon_j = common;\n\t } else {\n\t\ti = k;\n\t\tcommon_i = common;\n\t }\n\t if (j - i <= 1) {\n\t\tif (i > 0) break;\n\t\tif (j == i) break;\n\t\tif (first_key_inspected) break;\n\t\tfirst_key_inspected = true;\n\t }\n\t}\n\twhile (true) {\n\t Among w = v[i];\n\t if (common_i >= w.s.length) {\n\t\tcursor = c - w.s.length;\n\t\tif (w.method == null) return w.result;\n\n\t\tboolean res;\n\t\ttry {\n\t\t Object resobj = w.method.invoke(this);\n\t\t res = resobj.toString().equals(\"true\");\n\t\t} catch (InvocationTargetException e) {\n\t\t res = false;\n\t\t // FIXME - debug message\n\t\t} catch (IllegalAccessException e) {\n\t\t res = false;\n\t\t // FIXME - debug message\n\t\t}\n\t\tcursor = c - w.s.length;\n\t\tif (res) return w.result;\n\t }\n\t i = w.substring_i;\n\t if (i < 0) return 0;\n\t}\n }", "public int m()\r\n/* 485: */ {\r\n/* 486:497 */ int i = 0;\r\n/* 487:498 */ for (int j = 0; j < this.b.length; j++) {\r\n/* 488:499 */ if ((this.b[j] != null) && ((this.b[j].b() instanceof ajn)))\r\n/* 489: */ {\r\n/* 490:500 */ int k = ((ajn)this.b[j].b()).c;\r\n/* 491:501 */ i += k;\r\n/* 492: */ }\r\n/* 493: */ }\r\n/* 494:504 */ return i;\r\n/* 495: */ }", "@Override\n\tpublic int isFast() {\n\t\treturn 2;\n\t}", "public static void bfs(int a, int b) {\n\t\t\r\n\t\tQueue<Node> q = new LinkedList<>();\r\n\t\t\r\n\t\tq.add(new Node(a,b));\r\n\t\t\r\n\t\twhile(!q.isEmpty()) {\r\n\t\t\t\r\n\t\t\tNode n = q.remove();\r\n\t\t\t\r\n\t\t\tint x = n.x;\r\n\t\t\tint y = n.y;\r\n\t\t\t\r\n\t\t\tif(x+1 <= N && map[x+1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x+1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x+1,y));\r\n\t\t\t\t\tvisited[x+1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(x-1 > 0 && map[x-1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x-1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x-1,y));\r\n\t\t\t\t\tvisited[x-1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y-1 > 0 && map[x][y-1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y-1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y-1));\r\n\t\t\t\t\tvisited[x][y-1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y+1 <=N && map[x][y+1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y+1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y+1));\r\n\t\t\t\t\tvisited[x][y+1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public int a(alq paramalq, int paramInt1, int paramInt2, fn paramfn)\r\n/* 120: */ {\r\n/* 121:137 */ int i = 0;\r\n/* 122: */ amj localamj;\r\n/* 123: */ int k;\r\n/* 124:138 */ for (int j = 0; j < this.a.length; j++)\r\n/* 125: */ {\r\n/* 126:139 */ localamj = this.a[j];\r\n/* 127:140 */ if (localamj != null) {\r\n/* 128:143 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 129:146 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 130:149 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), true)))\r\n/* 131: */ {\r\n/* 132:153 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 133:154 */ i += k;\r\n/* 134:155 */ if (paramInt2 != 0)\r\n/* 135: */ {\r\n/* 136:156 */ this.a[j].b -= k;\r\n/* 137:157 */ if (this.a[j].b == 0) {\r\n/* 138:158 */ this.a[j] = null;\r\n/* 139: */ }\r\n/* 140:160 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 141:161 */ return i;\r\n/* 142: */ }\r\n/* 143: */ }\r\n/* 144: */ }\r\n/* 145: */ }\r\n/* 146: */ }\r\n/* 147: */ }\r\n/* 148: */ }\r\n/* 149:165 */ for (j = 0; j < this.b.length; j++)\r\n/* 150: */ {\r\n/* 151:166 */ localamj = this.b[j];\r\n/* 152:167 */ if (localamj != null) {\r\n/* 153:170 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 154:173 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 155:176 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), false)))\r\n/* 156: */ {\r\n/* 157:180 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 158:181 */ i += k;\r\n/* 159:182 */ if (paramInt2 != 0)\r\n/* 160: */ {\r\n/* 161:183 */ this.b[j].b -= k;\r\n/* 162:184 */ if (this.b[j].b == 0) {\r\n/* 163:185 */ this.b[j] = null;\r\n/* 164: */ }\r\n/* 165:187 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 166:188 */ return i;\r\n/* 167: */ }\r\n/* 168: */ }\r\n/* 169: */ }\r\n/* 170: */ }\r\n/* 171: */ }\r\n/* 172: */ }\r\n/* 173: */ }\r\n/* 174:193 */ if (this.f != null)\r\n/* 175: */ {\r\n/* 176:194 */ if ((paramalq != null) && (this.f.b() != paramalq)) {\r\n/* 177:195 */ return i;\r\n/* 178: */ }\r\n/* 179:197 */ if ((paramInt1 > -1) && (this.f.i() != paramInt1)) {\r\n/* 180:198 */ return i;\r\n/* 181: */ }\r\n/* 182:200 */ if ((paramfn != null) && (!cy.a(paramfn, this.f.o(), false))) {\r\n/* 183:201 */ return i;\r\n/* 184: */ }\r\n/* 185:204 */ j = paramInt2 <= 0 ? this.f.b : Math.min(paramInt2 - i, this.f.b);\r\n/* 186:205 */ i += j;\r\n/* 187:206 */ if (paramInt2 != 0)\r\n/* 188: */ {\r\n/* 189:207 */ this.f.b -= j;\r\n/* 190:208 */ if (this.f.b == 0) {\r\n/* 191:209 */ this.f = null;\r\n/* 192: */ }\r\n/* 193:211 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 194:212 */ return i;\r\n/* 195: */ }\r\n/* 196: */ }\r\n/* 197: */ }\r\n/* 198:217 */ return i;\r\n/* 199: */ }", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public static void main(String[] args) {\n float[] fb=new float[9];\n fb[0]=(int)12;\n fb[1]=(byte)13;\n fb[2]=(short)8;\n fb[3]=12.021f;\n // fb[4]=23443.43d;\n// fb[4]='a';\n// for(int i=0;i<=4;i++) {\n// \t System.out.println(fb[i]);\n// }\n List<Integer> lis1=new ArrayList<>();\n List<Integer> lis2=new ArrayList<>();\n lis1.add(2);\n lis1.add(4);\n lis1.add(16);\n lis1.add(32);\n lis1.add(96);\n lis1.add(123);\n lis1.add(435);\n lis1.add(234);\n lis1.add(100);\n lis1.add(122);\n lis1.add(240);\n lis1.add(350);\n java.util.Iterator<Integer> itr= lis1.iterator();\n //while(itr.hasNext()) {\n // itr.remove();\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(lis1);\n // \n// long startTime = System.currentTimeMillis();\n// getTotalX(lis1,lis2);\n// System.out.println(\"Time taken by 2 * o(n^2) \" + (System.currentTimeMillis() - startTime) + \"ms\"); \n// \n \t\t \n\t}", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "@Test\n public void test2(){\n times = new ArrayList<Long>();\n for(int i = 0; i<threadnums.length; i++){\n BSTInterface tree = new LockFreeBST();\n makeThread2(tree, threadnums[i]);\n\n\n System.out.println( \"When there are \"+threadnums[i] + \"threads, there are \"+tree.getNum() + \" nodes\");\n\n long startTime=System.currentTimeMillis();\n for(int k = 0; k<100; k++)\n tree.search(totalnum/2);\n long endTime=System.currentTimeMillis();\n System.out.println( \"When there are \"+threadnums[i] + \"threads, the search takes \"+ (endTime-startTime) + \" ms\");\n }\n for(int i = 0; i<threadnums.length; i++){\n System.out.println(\"When there are \"+threadnums[i]+\" threads, \"+\"it takes \"+times.get(i)+\" ms\");\n }\n }", "@org.junit.Test\n public void put() throws Exception {\n for (int i = 0; i < 2_000_000; i++) {\n hashTable.put(Integer.toString(i), Integer.toString(i));\n }\n\n for (int i = 0; i < 2_000_000; i++) {\n assertEquals(true, hashTable.contains(Integer.toString(i)));\n }\n}", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "WeightedUnionFind(int N){\n id = new int[N];\n size = new int[N];\n for (int i = 0; i < N; i++){\n id[i] = i;\n size[i] = 1;\n }\n }", "private static void task3(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(t.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\tt.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + t.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "public static int myOwn(Node A, Node B){\r\n int toReturn = 0;\r\n for (int i = 0; i<puzzleSize; i++){\r\n for (int j = 0; j<puzzleSize; j++){\r\n if (A.state[i][j]==B.state[i][j])\r\n toReturn--;\r\n else\r\n toReturn++;\r\n }\r\n }\r\n return toReturn;\r\n }", "public static double binSearchT(int s, Integer[] a){\n Random rand = new Random();\n int searchVar;\n Stopwatch timer = new Stopwatch();\n Arrays.sort(a);\n for (int i = 0; i < s; i++){\n searchVar = (int)(rand.nextDouble()*a.length);\n Arrays.binarySearch(a, searchVar);\n }\n return timer.elapsedTime(); // the method returns the elapsed time\n }", "public static void main(String[] args){\n int s = 80;\n int n = (int) Math.pow(10, 7);\n Integer[] a = new Integer[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++){\n a[i] = (int) (n*rand.nextDouble());\n }\n double binTime = binSearchT(s, a);\n double linTime = linSearchT(s, a);\n System.out.println(\"binTime: \"+ binTime);\n System.out.println(\"linTime: \"+ linTime);\n\n }", "private int d(amj paramamj)\r\n/* 50: */ {\r\n/* 51: 70 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 52: 71 */ if ((this.a[i] != null) && (this.a[i].b() == paramamj.b()) && (this.a[i].d()) && (this.a[i].b < this.a[i].c()) && (this.a[i].b < p_()) && ((!this.a[i].f()) || (this.a[i].i() == paramamj.i())) && (amj.a(this.a[i], paramamj))) {\r\n/* 53: 72 */ return i;\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 75 */ return -1;\r\n/* 57: */ }", "public void n()\r\n/* 515: */ {\r\n/* 516:523 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 517:524 */ if (this.a[i] != null)\r\n/* 518: */ {\r\n/* 519:525 */ this.d.a(this.a[i], true, false);\r\n/* 520:526 */ this.a[i] = null;\r\n/* 521: */ }\r\n/* 522: */ }\r\n/* 523:529 */ for (i = 0; i < this.b.length; i++) {\r\n/* 524:530 */ if (this.b[i] != null)\r\n/* 525: */ {\r\n/* 526:531 */ this.d.a(this.b[i], true, false);\r\n/* 527:532 */ this.b[i] = null;\r\n/* 528: */ }\r\n/* 529: */ }\r\n/* 530: */ }", "public static void a2v2(int[] A)\n {\n Map<Integer, List<Integer>> hashMap = new HashMap<>();\n\n insert(hashMap, 0, -1);\n\n int sum = 0;\n\n for (int i = 0; i < A.length; i++)\n {\n sum += A[i];\n\n if (hashMap.containsKey(sum))\n {\n List<Integer> list = hashMap.get(sum);\n\n // find all subarrays with the same sum\n for (Integer value: list)\n {\n System.out.println(\"Subarray [\" + (value + 1) + \"…\" +\n i + \"]\");\n }\n }\n\n // insert (sum so far, current index) pair into the hashmap\n insert(hashMap, sum, i);\n }\n }", "static void findI1s(final int length, int[] B) {\r\n\t final long max = 1 << length;\r\n\t for (long i = 0; i < max; i++) {\r\n\t long currentNumber = i;\r\n\t final int[] buffer = new int[length];\r\n\t boolean[] I1 = new boolean[length]; // I1 to be passed to next method\r\n\t int bufferPosition = buffer.length;\r\n\t while (bufferPosition > 0) {\r\n\t buffer[--bufferPosition] = (int) (currentNumber & 1);\r\n\t currentNumber >>>= 1;\r\n\t }\r\n\t for(int x = 0; x < buffer.length; x++) {\r\n\t \tif(buffer[x] == 1) {\r\n\t \t\tI1[x] = true;\r\n\t \t}\r\n\t \telse {\r\n\t \t\tI1[x] = false;\r\n\t \t}\r\n\t \tSystem.out.print(buffer[x]);\r\n\t }\r\n\t\t System.out.println();\r\n\t }\r\n\t}", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\t TreeSet<Integer> treeSet = new TreeSet<Integer>();\n\t\t \n\t\t treeSet.add(21);\n\t\t treeSet.add(10);\n\t\t treeSet.add(25);\n\t\t // treeSet.add(null);\n\t\t treeSet.add(25);\n\t\t //treeSet.add(null);\n\t\t long start = System.currentTimeMillis();\n\t\t Iterator<Integer> iterator = treeSet.iterator();\n\t\t while(iterator.hasNext())\n\t\t {\n\t\t\t System.out.println(iterator.next());\n\t\t }\n\t\t long end = System.currentTimeMillis();\n\t\t System.out.println(end - start);\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tlong start=System.currentTimeMillis();\r\n\t\t\t\tHashSetAdd hsd=new HashSetAdd();\r\n\t\t\t\tHashSet<String> hs2=hsd.add();\r\n\t\t\t\tSystem.out.println(\"size2=:\"+hs2.size());\r\n\t\t\t\tIterator<String> iter = hs2.iterator();\r\n\t\t\t\twhile(iter.hasNext()){\r\n\t\t\t\t String result = iter.next();\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\tlong end=System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"time2=: \"+(end-start));\r\n\t\t\t}", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "@Test\n public void test1(){\n times = new ArrayList<Long>();\n for(int i = 0; i<threadnums.length; i++){\n BSTInterface tree = new LockFreeBST();\n makeThread1(tree, threadnums[i]);\n\n System.out.println( \"When there are \"+threadnums[i] + \" threads, there are \"+tree.getNum() + \" nodes\");\n\n long startTime=System.currentTimeMillis();\n for(int k = 0; k<100; k++)\n tree.search(totalnum/2);\n long endTime=System.currentTimeMillis();\n System.out.println( \"When there are \"+threadnums[i] + \"threads, the search takes \"+ (endTime-startTime) + \" ms\");\n }\n for(int i = 0; i<threadnums.length; i++){\n System.out.println(\"When there are \"+threadnums[i]+\" threads, \"+\"it takes \"+times.get(i)+\" ms\");\n }\n }", "private static void task0111(int nUMS, RedBlackBST<Integer, Integer> i, GenerateInt generateInt) {\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Fill in the table...RedBlast BST Tree\" );\n\t int count=1;\n\t\tfor( int z = 1; z <= nUMS; z++)\n\t\t{\n\t\t\t \t\t \n\t\t\ti.put(GenerateInt.generateNumber(), GenerateInt.generateNumber());\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\t\t\tcount = z;\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "protected static int m34121a(int i, long j, List<C22441c> list) {\n C22441c c22441c;\n AppMethodBeat.m2504i(114774);\n Object obj = 1;\n while (i < sJS.size()) {\n try {\n Object obj2;\n c22441c = (C22441c) sJS.get(i);\n if (obj == null || c22441c.endTime <= j) {\n list.add(c22441c);\n obj2 = obj;\n } else {\n C22441c c22441c2 = new C22441c();\n c22441c2.sJY = c22441c.sJY;\n c22441c2.startTime = j;\n c22441c2.endTime = c22441c.endTime;\n list.add(c22441c2);\n obj2 = null;\n }\n i++;\n obj = obj2;\n } catch (Exception e) {\n AppMethodBeat.m2505o(114774);\n return -1;\n }\n }\n if (list.size() == 0) {\n c22441c = new C22441c();\n c22441c.sJY = sJQ;\n c22441c.startTime = j;\n c22441c.endTime = System.currentTimeMillis();\n list.add(c22441c);\n } else {\n c22441c = new C22441c();\n c22441c.sJY = sJQ;\n c22441c.startTime = sJP.startTime;\n c22441c.endTime = System.currentTimeMillis();\n list.add(c22441c);\n }\n int size = sJS.size();\n AppMethodBeat.m2505o(114774);\n return size;\n }", "public boolean a(amj paramamj)\r\n/* 268: */ {\r\n/* 269:293 */ if ((paramamj == null) || (paramamj.b == 0) || (paramamj.b() == null)) {\r\n/* 270:294 */ return false;\r\n/* 271: */ }\r\n/* 272: */ try\r\n/* 273: */ {\r\n/* 274:298 */ if (!paramamj.g())\r\n/* 275: */ {\r\n/* 276: */ do\r\n/* 277: */ {\r\n/* 278:301 */ i = paramamj.b;\r\n/* 279:302 */ paramamj.b = e(paramamj);\r\n/* 280:303 */ } while ((paramamj.b > 0) && (paramamj.b < i));\r\n/* 281:304 */ if ((paramamj.b == i) && (this.d.by.d))\r\n/* 282: */ {\r\n/* 283:306 */ paramamj.b = 0;\r\n/* 284:307 */ return true;\r\n/* 285: */ }\r\n/* 286:309 */ return paramamj.b < i;\r\n/* 287: */ }\r\n/* 288:312 */ int i = j();\r\n/* 289:313 */ if (i >= 0)\r\n/* 290: */ {\r\n/* 291:314 */ this.a[i] = amj.b(paramamj);\r\n/* 292:315 */ this.a[i].c = 5;\r\n/* 293:316 */ paramamj.b = 0;\r\n/* 294:317 */ return true;\r\n/* 295: */ }\r\n/* 296:318 */ if (this.d.by.d)\r\n/* 297: */ {\r\n/* 298:320 */ paramamj.b = 0;\r\n/* 299:321 */ return true;\r\n/* 300: */ }\r\n/* 301:323 */ return false;\r\n/* 302: */ }\r\n/* 303: */ catch (Throwable localThrowable)\r\n/* 304: */ {\r\n/* 305:325 */ b localb = b.a(localThrowable, \"Adding item to inventory\");\r\n/* 306:326 */ j localj = localb.a(\"Item being added\");\r\n/* 307: */ \r\n/* 308:328 */ localj.a(\"Item ID\", Integer.valueOf(alq.b(paramamj.b())));\r\n/* 309:329 */ localj.a(\"Item data\", Integer.valueOf(paramamj.i()));\r\n/* 310:330 */ localj.a(\"Item name\", new ahc(this, paramamj));\r\n/* 311: */ \r\n/* 312: */ \r\n/* 313: */ \r\n/* 314: */ \r\n/* 315: */ \r\n/* 316: */ \r\n/* 317:337 */ throw new u(localb);\r\n/* 318: */ }\r\n/* 319: */ }", "public static void main(String[] args) \n\t{\n\t \n\t\tlong startTimer = System.currentTimeMillis();\n\t\t//mrethod 1\n\t\tint res=Utility.binarySearchWord();\n\t\tif(res==-1)\n\t\t\tSystem.out.println(\"your word not found\");\n\t\t else\n\t\t System.out.println(\"your word found at index:\"+res);\n\t\tlong first=System.currentTimeMillis();\n\t\tSystem.out.println((first-startTimer)/1000+\"seconds\");\n\t \n\t\t//method 2\n\t\tint res1=Utility.binarySearchForInteger();\n\t\tif(res1==-1)\n\t\t\tSystem.out.println(\"your no. not found\");\n\t\t else\n\t\t System.out.println(\"your no.found at index:\"+res1);\n\t\tlong second=System.currentTimeMillis();\n\t\tSystem.out.println((second-first)/1000+\"seconds\");\n\t\t\n\t\t//method 3\n\t\tint res3[]=Utility.bubbleSortForIntegers();\n\t\tfor(int i=0;i<res3.length;i++)\n\t\t\tSystem.out.println(res3[i]);\n\t\tlong third=System.currentTimeMillis();\n\t\tSystem.out.println((third-second)/1000+\"seconds\");\n\t\t\n\t\t//method 4\n\t\tString res4[]=Utility.bubbleSortForStrings();\n\t\tfor(int i=0;i<res4.length;i++)\n\t\t\tSystem.out.println(res4[i]);\n\t\tlong fourth=System.currentTimeMillis();\n\t\tSystem.out.println((fourth-third)/1000+\"seconds\");\n\t\t\n\t\t//method 5\n\t\tint res5[]=Utility.insertionSortForInteger();\n\t\tfor(int i=0;i<res5.length;i++)\n\t\t\tSystem.out.println(res5[i]);\n\t\tlong fifth=System.currentTimeMillis();\n\t\tSystem.out.println((fifth-fourth)/1000+\"seconds\");\n\t\t\n\t\t//method 6\n\t\tString res6[]=Utility.insertionSortForString();\n\t\tfor(int i=0;i<res6.length;i++)\n\t\t\tSystem.out.println(res6[i]);\n\t\tlong sixth=System.currentTimeMillis();\n\t\tSystem.out.println((sixth-fifth)/1000+\"seconds\");\n\t}", "public static void sorting() {\n List<String> wordList = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n wordList.add(UUID.randomUUID().toString());\n\n //Sort and filter the list using compare to sequentially\n long t1s = System.nanoTime();\n List<String> a =wordList.stream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t1d = System.nanoTime() - t1s;\n\n //Sort and filter the list using compare to in parallel\n long t2s = System.nanoTime();\n List<String> b = wordList.parallelStream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t2d = System.nanoTime() - t2s;\n\n System.out.println(\"Filter + Sort Serial time : \" + t1d);\n System.out.println(\"Filter + Sort Parallel time : \" + t2d);\n }", "static int find(int[] arr){\n\t\tif(arr.length==1) return -1;\n\t\tint slow = arr[0] , fast = arr[arr[0]];\n\t\twhile(slow!=fast){\n\t\t\tslow = arr[slow];\n\t\t\tfast = arr[arr[fast]];\n\t\t}\n\t\tslow = 0;\n\t\twhile(slow!=fast){\n\t\t\tslow = arr[slow];\n\t\t\tfast = arr[fast];\n\t\t}\n\t\treturn slow;\n\n\t}", "private void fastXY(int x, int y){\n ccells.row5bitHash(x,y-2);\n ccells.row5bitHash(x,y-1);\n ccells.row5bitHash(x,y);\n ccells.row5bitHash(x,y+1);\n ccells.row5bitHash(x,y+2);\n // then use some binary math to manipulate this data into hashes for each cell\n // flatten the loop and copy paste yay :)\n // or I could also leave the loop alone and make it loop over array which would be a little more readable\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "private static void doStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.stream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "private static void task033(int nUMS, RedBlackBST<Integer, Integer> i) {\n\t\t\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Deletion in the table...\" );\n\t int count=0;\n\t\tfor( int j = 1; j <= nUMS; j++)\n\t\t{\n\t\t\tif(i.isEmpty() == false)\n\t\t\t{\n\t\t\t\n\t\t\ti.delete(j);\n\t\t\t\n\t\t\t}\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tSystem.out.println(\"Is it empty \" + i.isEmpty());\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\n\t\t\n\t}", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "public long findFastestTime()\r\n {\r\n for(int top = 1; top < listOfTimes.size(); top++)\r\n { \r\n long item = listOfTimes.get(top); \r\n int i = top;\r\n\r\n while(i > 0 && item < listOfTimes.get(i - 1))\r\n {\r\n listOfTimes.set(i, listOfTimes.get(i- 1));\r\n i--;\r\n }//end while \r\n\r\n listOfTimes.set(i, item);\r\n }//end for \r\n\r\n return listOfTimes.get(0);\r\n }", "private static void task222(int nUMS, RedBlackBST<Integer, Integer> i) {\n\t\tSystem.out.println(\"RED BLAST BST Started Search...\");\n\t double search_start = 0, search_end = 0;\n\t int totalkeymatched = 0;\n\n\t search_start = System.nanoTime();\n\t \n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n\t \t\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (i.contains(checker)) {\n\t\n//\t System.out.println(\"Key Matches\");\n\t totalkeymatched++;\n\t \t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each search: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t System.out.println(\"TOTAL MATCHES \" + totalkeymatched);\n\n\t}", "public void b() {\n/* 134 */ for (int i = 0; i < this.b; i++)\n/* 135 */ this.c[i] = false; \n/* */ }", "private static void task111(int nUMS, RedBlackBST<Integer, Integer> i, GenerateInt generateInt) {\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Fill in the table...RED BLAST BST TREE\" );\n\t int count=0;\n\t\tfor( int z = 1; z <= nUMS; z++)\n\t\t{\n\t\t\t \t\t \n\t\t\ti.put(z, z);\n\t\t\tcount = z;\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t}", "private static void task333(int nUMS, RedBlackBST<Integer, Integer> i) {\n\t\tdouble search_start = 0, search_end = 0;\n\n\t System.out.println(\"RED BLAST BST DELETION Started...\");\n\t search_start = System.nanoTime();\n\t int count = 0;\n\t \t\n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (i.contains(checker)) {\n\t i.delete(checker);\n//\t System.out.println(\"INT Removed\");\n\t count++;\n\t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each deletion: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t \n\t System.out.println(\"TOTAL REMOVES\" + count);\n\n\t\t\n\t}", "private static void task2(int nUMS, BinarySearchTree<Integer> t) {\n\t\tSystem.out.println(\"Binary Search Started...\");\n\t double search_start = 0, search_end = 0;\n\t int totalkeymatched = 0;\n\n\t search_start = System.nanoTime();\n\t \n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n\t \t\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (t.contains(checker)) {\n\t\n//\t System.out.println(\"Key Matches\");\n\t totalkeymatched++;\n\t \t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each search: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t System.out.println(\"TOTAL MATCHES \" + totalkeymatched);\n\t\t\n\t}", "private int hashFunc1(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n // Java can return negative vals with hashCode() it's biggg so need to check for this\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n return hashVal; // Idea index position we'd like to insert or search in\n }", "private void snapshot\n (int[] i, int i0, int i1, long[] V) {\n int I = i.length;\n long[] va = V;\n long[] vb = new long[I];\n long[] ta = new long[I];\n long[] tb = new long[I];\n do {\n collectTags(i, i0, i1, ta);\n collectValues(i, i0, i1, va);\n collectValues(i, i0, i1, vb);\n collectTags(i, i0, i1, tb);\n } while(\n Arrays.compare(ta, i0, i1, tb, i0, i1) != 0 ||\n Arrays.compare(va, i0, i1, vb, i0, i1) != 0\n );\n }", "private static void task4(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\tdouble search_start = 0, search_end = 0;\n\n\t System.out.println(\"SPLAY DELETION Started...\");\n\t search_start = System.nanoTime();\n\t int count = 0;\n\t \t\n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (t.contains(checker)) {\n\t t.remove(checker);\n//\t System.out.println(\"INT Removed\");\n\t count++;\n\t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each deletion: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t \n\t System.out.println(\"TOTAL REMOVES\" + count);\n\n\t\t\n\t\t\n\t}", "private static long fillBinaryTree(BinarySearchTree<Integer> aTree, int[] anIntArray) {\n long start = System.currentTimeMillis();\n for (int integer : anIntArray) {\n aTree.insert(integer);\n }\n long finish = System.currentTimeMillis();\n\n return (finish - start);\n }", "public static void concurrency() {\n List<String> words = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n words.add(UUID.randomUUID().toString());\n\n //Groups the list into a map of strings by length in serial\n long t2s = System.nanoTime();\n Map<Integer, List<String>> a = words.stream()\n .collect(Collectors.groupingBy(String::length));\n long t2d = System.nanoTime() - t2s;\n\n //Groups the list into a map of strings by length in parallel\n long t1s = System.nanoTime();\n ConcurrentMap<Integer, List<String>> b = words.parallelStream()\n .collect(Collectors.groupingByConcurrent(String::length));\n long t1d = System.nanoTime() - t1s;\n\n System.out.println(\"Collect Serial time : \" + t2d);\n System.out.println(\"Collect Parallel time : \" + t1d);\n }", "private void mergeAB() {\r\n //merge only for the indexes of this global_count\r\n boolean a_end = false;\r\n boolean b_end = false;\r\n boolean start = false;\r\n int a_count = splitA[global_count - 1];\r\n if(a_count == A.length - 1){\r\n a_count = splitA[global_count - 2] + 1;\r\n }\r\n int b_count = splitB[global_count - 1];\r\n if(b_count == B.length - 1){\r\n if(global_count != splitB.length){\r\n start = true;\r\n b_count = 0;\r\n }\r\n else{\r\n b_count = splitB[global_count - 2] + 1;\r\n }\r\n }\r\n if(b_count == -1){\r\n b_end = true;\r\n b_count = 0;\r\n if(splitB[0] == B.length - 1){\r\n b_count = B.length;\r\n }\r\n }\r\n int c_count = a_count + b_count;\r\n while(!a_end || !b_end){\r\n if(a_end){\r\n C[c_count] = B[b_count];\r\n b_count++;\r\n }\r\n else if(b_end){\r\n C[c_count] = A[a_count];\r\n a_count++;\r\n }\r\n //if a > b\r\n else if(A[a_count] > B[b_count]){\r\n C[c_count] = B[b_count];\r\n b_count++;\r\n c_count++;\r\n }\r\n //if a <= b\r\n else{\r\n C[c_count] = A[a_count];\r\n a_count++;\r\n c_count++;\r\n }\r\n if(!start){\r\n if(a_count == splitA[global_count - 1] + 1){\r\n a_end = true;\r\n }\r\n if(b_count == splitB[global_count - 1] + 1){\r\n b_end = true;\r\n }\r\n }\r\n else{\r\n if(a_count == splitA[global_count - 1] + 1){\r\n a_end = true;\r\n }\r\n if(b_count == splitB.length){\r\n b_end = true;\r\n }\r\n }\r\n }\r\n }", "public Node<T> findSlow(T element);", "private static void task03(int nUMS, AVLTree<Integer> h) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(h.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\th.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + h.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "private PerfectMergeSort() {}", "private int find(int[] A, int startA, int lengthA, int[] B, int startB,\r\n int lengthB, int th){ // th is 0 based index\r\n if(lengthA == 0) return B[startB + th]; // please not mistake to return B[th] !\r\n if(lengthB == 0) return A[startA + th];\r\n\r\n int midA = (lengthA - 1) >> 1; // index of 1. mid of odd count array; 2. lower mid of even count array\r\n int midB = (lengthB - 1) >> 1;\r\n\r\n if(A[startA + midA] < B[startB + midB]){ // lower half 'A[]' has more smaller values than 'B[]'\r\n return find(B, startB, lengthB, A, startA, lengthA, th); // ensure greater median is in @param A[]\r\n }\r\n\r\n if(midA + 1 + midB + 1 <= th + 1){ // skip lower half of B[] of length (midB + 1)\r\n return find(A, startA, lengthA,\r\n B, startB + midB + 1, lengthB - (midB + 1),\r\n th - (midB + 1));\r\n }else{ // skip upper half of A[] of length (midA + 1), meanwhile keeping length midA\r\n return find(A, startA, midA,\r\n B, startB, lengthB,\r\n th);\r\n }\r\n }", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "private static void task1(int nUMS, BinarySearchTree<Integer> t, GenerateInt generateInt) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Fill in the table...Binary Tree\" );\n\t\t int count=1;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\t \t\t \n\t\t\t\tt.insert(i);\n//\t\t\t\tSystem.out.println(i);\n\t\t\t\tcount = i;\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "protected /*@ non_null @*/ JMLObjectSet<E> fast_insert(E elem) {\n return new JMLObjectSet<E>( // cons() clones if necessary\n JMLListObjectNode.cons(elem, the_list),\n size+1);\n }", "private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void go(int i) {\n\t\tcol[i] = 1;\r\n\t\tint j = f[i];\r\n\t\tint cnt = 0;\r\n\t\tint delAll = 0;\r\n\t\tint[][] cd = new int[1000][3];\r\n\t\tint sa = 0;\r\n\t\tint sb = 0;\r\n\t\tint m1 = Integer.MAX_VALUE;\r\n\t\tint m2 = Integer.MAX_VALUE;\r\n\t\tint m1a = 0;\r\n\t\tint m2a = 0;\r\n\t\tint m1b = 0;\r\n\t\tint m2b = 0;\r\n\t\twhile (j != -1) {\r\n\t\t\tif (col[e[j]] == 0) {\r\n\t\t\t\tgo(e[j]);\r\n\t\t\t\tdelAll += a[e[j]];\r\n\t\t\t\tint dif = b[e[j]] - a[e[j]];\r\n\t\t\t\tif (dif < m1) {\r\n\t\t\t\t\tm2 = m1;\r\n\t\t\t\t\tm2b = m1b;\r\n\t\t\t\t\tm2a = m1a;\r\n\t\t\t\t\tm1 = dif;\r\n\t\t\t\t\tm1a = a[e[j]];\r\n\t\t\t\t\tm1b = b[e[j]];\r\n\t\t\t\t} else if (dif < m2) {\r\n\t\t\t\t\tm2 = dif;\r\n\t\t\t\t\tm2a = a[e[j]];\r\n\t\t\t\t\tm2b = b[e[j]];\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tsa += a[e[j]];\r\n\t\t\t\tsb += a[e[j]];\r\n\t\t\t\tcd[cnt][0] = a[e[j]];\r\n\t\t\t\tcd[cnt][1] = b[e[j]];\r\n\t\t\t\tcd[cnt][2] = b[e[j]] - a[e[j]];\r\n\t\t\t\tcnt++;\r\n\t\t\t}\r\n\t\t\tj = next[j];\r\n\t\t}\r\n\t\tif (cnt == 0) {\r\n\t\t\ta[i] = 1;\r\n\t\t\tb[i] = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tArrays.sort(cd, new Comparator<int[]>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(int[] o1, int[] o2) {\r\n\t\t\t\t// TODO Auto-generated method stub\t\t\t\t\r\n\t\t\t\treturn o1[2] - o2[2];\r\n\t\t\t}\r\n\t\t});\r\n\t\ta[i] = delAll + 1;\r\n\t\t//leave 0 or 2\r\n\t\tint cost1 = 0;\r\n\t\tint cost = 0;\r\n\t\tfor (j = 2; j < cnt; j++)\r\n\t\t\tcost1 += cd[j][0];\r\n\t\tif (cnt >= 2) {\r\n\t\t\tcost += m1b + m2b + sa - m1a - m2a;\r\n\t\t\tcost1 += cd[0][1] + cd[1][1];\r\n\t\t} else {\r\n\t\t\tcost += sa;\r\n\t\t\tcost1 += cd[0][0];\r\n\t\t}\r\n\t\tif (cost1 != cost)\r\n\t\t\tSystem.err.println(\"FUCK\");\r\n\t\tb[i] = cost;\r\n\t}", "private static int distance(ArrayList<Integer>[] adj, ArrayList<Integer>[] cost, int s, int t) {\n\n Set<Integer> visited = new HashSet<>(); //option 1\n Map<Integer, Integer> distance = new HashMap<>();\n// Queue<Integer> q = new PriorityQueue<>(11, (o1, o2) -> { //option 0\n// Integer d1 = distance.get(o1); //option 0\n// Integer d2 = distance.get(o2); //option 0\n Queue<Map.Entry<Integer, Integer>> q = new PriorityQueue<>(11, (o1, o2) -> { //option 1\n Integer d1 = o1.getValue(); //option 1\n Integer d2 = o2.getValue(); //option 1\n\n if (Objects.equals(d1, d2)) return 0;\n if (d1 == null) return 1;\n if (d2 == null) return -1;\n\n return d1 - d2;\n });\n\n distance.put(s, 0);\n// q.addAll(IntStream.range(0, adj.length).boxed().collect(Collectors.toList())); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(s, 0)); //option 1\n\n while (!q.isEmpty()) {\n// int u = q.remove(); //option 0\n int u = q.remove().getKey(); //option 1\n\n if (u == t) {\n Integer dist = distance.get(u);\n if (dist == null) return -1;\n return dist;\n }\n\n if (visited.contains(u)) continue; //option 1\n visited.add(u); //option 1\n\n List<Integer> adjList = adj[u];\n List<Integer> costList = cost[u];\n for (int i = 0; i < adjList.size(); i++) {\n int v = adjList.get(i);\n int w = costList.get(i);\n Integer dist = distance.get(v);\n Integer newDist = distance.get(u);\n if (newDist != null) newDist += w;\n\n if (newDist != null && (dist == null || dist > newDist)) {\n //relax\n distance.put(v, newDist);\n// q.remove(v); //option 0\n// q.add(v); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(v, distance.get(v))); //option 1\n }\n }\n }\n\n return -1;\n }", "static int countCollinearFast(int[] a1, int[] a2, int[] a3)\n {\n //TODO: implement this method\n \tsort(a3);\n \tint count = 0;\n \tint search;\n \t\n \tfor (int i=0; i<a1.length; i++)\n \t\tfor (int j=0; j<a2.length; j++)\n \t\t{\n \t\t\tsearch = 2*a2[j] - a1[i];\n \t\t\tif (binarySearch(a3, search))\n \t\t\t\tcount++;\n \t\t}\n \t\n \treturn count;\n }", "private int calcDistanceMemoize(int i, int j, char[] one, char[] two, int [][]table) {\n if (i < 0)\n return j+1;\n\tif (j < 0)\n\t return i+1;\n\n if (table[i][j] == -1) \n table[i][j] = calcDistanceRecursive(i, j, one, two, table);\n\t\n return table[i][j];\n }", "@Test\n public void testWithDeadlyParams() {\n HashSet<ComplexOomage> oomages = new HashSet<ComplexOomage>();\n int N = 10000;\n ArrayList<Integer> params;\n\n for (int oom = 0; oom < N; oom += 1) {\n params = new ArrayList<Integer>(N);\n for (int i = 0; i < 10; i += 1) {\n params.add(255);\n }\n oomages.add(new ComplexOomage(params));\n }\n assertTrue(haveNiceHashCodeSpread(oomages));\n }", "@Test\n public void testPerformance() {\n int opCount = 1000000;\n Random random = new Random();\n\n for(int i = 0; i < opCount; i++) {\n linkedListStack.push(new Student(random.nextInt(Integer.MAX_VALUE), random.nextInt(Integer.MAX_VALUE)));\n }\n while(!linkedListStack.isEmpty()) {\n linkedListStack.pop();\n }\n }", "private boolean kcss(int[] i, long[] e, long y) {\n int I = i.length;\n long[] x = new long[I];\n while (true) {\n x[0] = ll(i[0]); // 1\n snapshot(i, 1, I, x); // 2\n if (Arrays.compare(x, e) != 0) { // 3\n sc(i[0], x[0]); // 3a\n return false; // 3a\n }\n if (sc(i[0], y)) return true; // 3b\n } // 3c\n }", "private void baseAlgorithm() {\n\t\tlong start = System.nanoTime();\n\t\tinitCentroids();\n\t\tint counter = 0;\n\t\twhile (counter < 1000\n\t\t\t\t&& (lastCentroids == null || !SeriesComparator.equalClustering(lastCentroids, centroids))) {\n\t\t\tresetClusters();\n\t\t\tassignPoints();\n\t\t\tlastCentroids = new ArrayList<Point2D>(centroids);\n\t\t\tcalculateNewMean();\n\t\t\tbasicIterations++;\n\t\t\tcounter++;\n\t\t}\n\t\tconvertToClustering();\n\t\tbasicRuntime = System.nanoTime() - start;\n\t}", "@Test\n public void testIntersectionZeroSequenceRemovedFromQueue()\n {\n int zeroSequence = 1; // Zero sequence of length 62\n ConciseSet set1 = new ConciseSet(new int[] {zeroSequence}, false);\n\n ConciseSet set2 = new ConciseSet();\n for (int i = 0; i < 1000; i++) {\n set2.add(i);\n }\n verifyIntersection(set1, set2);\n }" ]
[ "0.63132554", "0.60224694", "0.600404", "0.5640502", "0.5489345", "0.54708034", "0.5434405", "0.53485835", "0.5344551", "0.5299375", "0.52989036", "0.52589375", "0.5258173", "0.5256411", "0.52425814", "0.52392995", "0.52245605", "0.5217807", "0.52140546", "0.5212454", "0.51784235", "0.5146362", "0.5117776", "0.5111577", "0.5111512", "0.5110345", "0.5107963", "0.51030153", "0.5098083", "0.5073315", "0.5061372", "0.50268894", "0.5019669", "0.5003575", "0.5002065", "0.4993301", "0.49837798", "0.4975024", "0.4971179", "0.49585968", "0.49529883", "0.49492133", "0.49491915", "0.49388266", "0.49277428", "0.49218422", "0.49173713", "0.49172708", "0.49159062", "0.49152195", "0.49099594", "0.49093506", "0.49085906", "0.49059", "0.4896067", "0.48910674", "0.48803353", "0.4874647", "0.48692447", "0.48639688", "0.4863836", "0.4863436", "0.48530656", "0.48523068", "0.48485652", "0.4847974", "0.48461843", "0.48346207", "0.48311454", "0.48279843", "0.48261514", "0.4823419", "0.48176873", "0.48171255", "0.4816133", "0.48150098", "0.4814083", "0.4810003", "0.48051772", "0.48016283", "0.48013082", "0.4798864", "0.47981596", "0.47969213", "0.47958183", "0.47937095", "0.47916526", "0.47894624", "0.4784675", "0.47817406", "0.47810847", "0.47776043", "0.4770059", "0.4769107", "0.4766291", "0.47657415", "0.4762304", "0.475246", "0.47468492", "0.47467232", "0.47448063" ]
0.0
-1
Time: O(B), Space: O(B)
private Map<Integer, Set<Integer>> getRowsPerPosition(List<List<Integer>> positions) { Map<Integer, Set<Integer>> map = new HashMap<>(); for (int rowIndex = 0; rowIndex < positions.size(); rowIndex++) { List<Integer> row = positions.get(rowIndex); for (int position : row) { if (!map.containsKey(position)) { map.put(position, new HashSet<Integer>()); } map.get(position).add(rowIndex); } } return map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "public long problem2b(){\r\n LinkedList<String> linkList = new LinkedList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n linkList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start; \r\n }", "void merge_hi(int pa, int na, int pb, int nb) {\n getmem(nb);\n int dest = pb + nb - 1;\n int basea = pa;\n System.arraycopy(this.data, pb, this.a, 0, nb);\n \n pb = nb - 1;\n pa += na - 1;\n \n this.data[dest--] = this.data[pa--];\n --na;\n if (na == 0)\n return;\n if (nb == 1) {\n // CopyA;\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n \n try {\n for (;;) {\n int acount = 0; /* # of time A won in a row */\n int bcount = 0; /* # of time B won in a row */\n \n /* Do the straightforward thing until (if ever) one run\n * appears to win consistently.\n */\n for (;;) {\n boolean k = iflt(this.a[pb], this.data[pa]);\n if (k) {\n this.data[dest--] = this.data[pa--];\n ++acount;\n bcount = 0;\n --na;\n if (na == 0)\n return;\n if (acount >= MIN_GALLOP)\n break;\n } else {\n this.data[dest--] = this.a[pb--];\n ++bcount;\n acount = 0;\n --nb;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n if (bcount >= MIN_GALLOP)\n break;\n }\n }\n \n /* One run is winning so consistently that galloping may\n * be a huge win. So try that, and continue galloping until\n * (if ever) neither run appears to be winning consistently\n * anymore.\n */\n do {\n int k = gallop_right(this.a[pb], this.data, basea, na, na-1);\n acount = k = na - k;\n if (k != 0) {\n dest -= k;\n pa -= k;\n System.arraycopy(this.data, pa+1, this.data, dest+1, k);\n na -= k;\n if (na == 0)\n return;\n }\n \n this.data[dest--] = this.a[pb--];\n --nb;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n \n k = gallop_left(this.data[pa], this.a, 0, nb, nb-1);\n bcount = k = nb - k;\n if (k != 0) {\n dest -= k;\n pb -= k;\n System.arraycopy(this.a, pb+1, this.data, dest+1, k);\n nb -= k;\n if (nb == 1) {\n // CopyA\n dest -= na;\n pa -= na;\n System.arraycopy(this.data, pa+1, this.data, dest+1, na);\n this.data[dest] = this.a[pb];\n nb = 0;\n return;\n }\n /* nb==0 is impossible now if the comparison\n * function is consistent, but we can't assume\n * that it is.\n */\n if (nb == 0)\n return;\n }\n this.data[dest--] = this.data[pa--];\n --na;\n if (na == 0)\n return;\n } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);\n }\n } finally {\n if (nb != 0)\n System.arraycopy(this.a, 0, this.data, dest-(nb-1), nb);\n \n //dump_data(\"result\", origpa, cnt);\n }\n }", "public int findDuplicate(int[] nums) {\n if(nums == null || nums.length == 0) return 0;\n\n int slow = nums[0];\n int fast = nums[nums[0]];\n\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n}", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "public boolean linearIn(int[] outer, int[] inner) {\r\n int comp=0; // O(1)\r\n int count=0; // O(1)\r\n if(inner.length==0) // O(1)\r\n return true; // O(1)\r\n for(int i=0; i<outer.length; i++) { // O(n)\r\n if(outer[i]==inner[count]) { // O(1)\r\n comp++; // O(1)\r\n count++; // O(1)\r\n } else if(outer[i]>inner[count]) // O(1)\r\n return false; // O(1)\r\n if (comp==inner.length) // O(1)\r\n return true; // O(1)\r\n }\r\n return false; // O(1)\r\n}", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "void merge_lo(int pa, int na, int pb, int nb) {\n getmem(na);\n System.arraycopy(this.data, pa, this.a, 0, na);\n int dest = pa;\n pa = 0;\n \n this.data[dest++] = this.data[pb++];\n --nb;\n if (nb == 0)\n return;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n return;\n }\n \n try {\n for (;;) {\n int acount = 0; /* # of time A won in a row */\n int bcount = 0; /* # of time B won in a row */\n \n /* Do the straightforward thing until (if ever) one run\n * appears to win consistently.\n */\n for (;;) {\n boolean k = iflt(this.data[pb], this.a[pa]);\n if (k) {\n this.data[dest++] = this.data[pb++];\n ++bcount;\n acount = 0;\n --nb;\n if (nb == 0)\n return;\n if (bcount >= MIN_GALLOP)\n break;\n } else {\n this.data[dest++] = this.a[pa++];\n ++acount;\n bcount = 0;\n --na;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n if (acount >= MIN_GALLOP)\n break;\n }\n }\n \n /* One run is winning so consistently that galloping may\n * be a huge win. So try that, and continue galloping until\n * (if ever) neither run appears to be winning consistently\n * anymore.\n */\n do {\n int k = gallop_right(this.data[pb], this.a, pa, na, 0);\n acount = k;\n if (k != 0) {\n System.arraycopy(this.a, pa, this.data, dest, k);\n dest += k;\n pa += k;\n na -= k;\n if (na == 1) {\n // CopyB\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n /* na==0 is impossible now if the comparison\n * function is consistent, but we can't assume\n * that it is.\n */\n if (na == 0)\n return;\n }\n \n this.data[dest++] = this.data[pb++];\n --nb;\n if (nb == 0)\n return;\n \n k = gallop_left(this.a[pa], this.data, pb, nb, 0);\n bcount = k;\n if (k != 0) {\n System.arraycopy(this.data, pb, this.data, dest, k);\n dest += k;\n pb += k;\n nb -= k;\n if (nb == 0)\n return;\n }\n this.data[dest++] = this.a[pa++];\n --na;\n if (na == 1) {\n // CopyB;\n System.arraycopy(this.data, pb, this.data, dest, nb);\n this.data[dest + nb] = this.a[pa];\n na = 0;\n return;\n }\n } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);\n }\n } finally {\n if (na != 0)\n System.arraycopy(this.a, pa, this.data, dest, na);\n \n //dump_data(\"result\", origpa, cnt);\n }\n }", "private void d() {\n Queue<c> queue;\n Queue<c> queue2 = queue = i;\n synchronized (queue2) {\n long l2 = System.currentTimeMillis();\n Iterator iterator = i.iterator();\n while (iterator.hasNext()) {\n if (l2 - ((c)iterator.next()).a < 60000L) continue;\n iterator.remove();\n }\n if (i.size() >= 15) {\n for (int i2 = 0; i2 < 5; ++i2) {\n i.remove();\n }\n }\n return;\n }\n }", "private boolean slowEquals(byte[] a, byte[] b)\n {\n int diff = a.length ^ b.length;\n for(int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }", "@Override public short getComplexity() {\n return 0;\n }", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "private static boolean slowEquals(final byte[] a, final byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++) {\n diff |= a[i] ^ b[i];\n }\n return diff == 0;\n }", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(1)\r\n nums[i+1]=nums[j+1]; //O(1)\r\n nums[j+1]=temp; // O(1)\r\n while(j+1<nums.length && nums[j+1] != 4) //O(n)\r\n j++; // n+1\r\n }\r\n i++; // n+1\r\n }\r\n return nums; //O(1)\r\n}", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public static void main(String[] args){\n int MIN = Integer.parseInt(args[0]);\n MAX = Integer.parseInt(args[1]);\n cutoffs = new int[args.length - 2];\n cache = new ArrayList<IndexedArrayList<SuperSavvyTrieHelper2>>();\n for (int i = 2; i < args.length; i++){\n cutoffs[i - 2] = Integer.parseInt(args[i]);\n cache.add(new IndexedArrayList<SuperSavvyTrieHelper2>());\n }\n for (int i = 0; i < cutoffs.length / 2; i++){\n int temp = cutoffs[i];\n cutoffs[i] = cutoffs[cutoffs.length - 1 - i];\n cutoffs[cutoffs.length - 1 - i] = temp;\n }\n multiplicitiesUsed = new boolean[MAX + 1];\n basesUsed = new DoublyLinkedArray(MAX + 1);\n SuperSavvyTrieHelper2.setCorrespondance(basesUsed);\n /*\n long count1 = lowerRecursion(MAX, 0);\n long count2 = middleRecursion(MAX, 0);\n long count3 = upperRecursion(MAX, 0);\n long total = count1 + count2 + count3;\n System.out.printf(\"%d + %d + %d = %d\\n\", count1, count2, count3, total);\n */\n hitCounts = new long[cutoffs.length];\n missCounts = new long[cutoffs.length];\n statCollector = new StatCollector(cutoffs);\n\n long startTime = System.nanoTime();\n long[] values = new long[MAX - MIN + 1];\n for (int i = MIN; i <= MAX; i++) {\n values[i - MIN] = upperRecursionWrapper(i);\n }\n //long[] testValues = new long[] {1752443,1911046, 2067456,2249444,2429337, 2647532,2852449,3101167,3350292,3632299,3916575};\n for (int i = 0; i < values.length; i++){\n //if (testValues[i] != values[i]){\n System.out.printf(\"%d: %d\\n\", i + MIN, values[i]);\n //}\n }\n long endTime = System.nanoTime();\n System.out.printf(\"%f,\", (double)(endTime - startTime) / 1000000000.0);\n long totalMissCounts = 0;\n long totalMissWeight1 = 0;\n long totalMissWeight2 = 0;\n long totalMissWeight3 = 0;\n /*\n for (int i = 0; i < cutoffs.length; i++){\n long totalCounts = hitCounts[i] + missCounts[i];\n totalMissCounts += missCounts[i];\n totalMissWeight1 += missCounts[i] * cutoffs[i];\n totalMissWeight2 += (hitCounts[i] / missCounts[i]) * cutoffs[i];\n totalMissWeight3 += (hitCounts[i] - missCounts[i]) * cutoffs[i] * cutoffs[i];\n System.out.printf(\"\\tCache %d: %d/%d/%d (%.5f%%)\", cutoffs[i], hitCounts[i], missCounts[i], totalCounts, (double) hitCounts[i] / totalCounts);\n }\n System.out.printf(\"\\t\\tMissCounts: %d, weighted: %d, ratio: %d, diff^2: %d\\n\", totalMissCounts, totalMissWeight1, totalMissWeight2, totalMissWeight3);\n */\n statCollector.printAll();\n }", "static void UseArrayList(ArrayList<Integer> myList2){\r\n\t\tLong start = System.currentTimeMillis();\r\n\t\tfor (int n=0; n<myList2.size();n++)\r\n\t\t{\r\n\t\t\tfor (int m=n+1; m<myList2.size();m++){\r\n\t\t\t\tif( myList2.get(n)== myList2.get(m) ) {System.out.println(\"Duplicate found \"+myList2.get(n));}\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong End = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"Total time taken for executing this code is: \" + (End-start));\r\n\t}", "public static void main(String[] args) {\r\n\t\t/** 1.000\r\n\t\t * bruteforceBE Asc runtime: 1072294\r\n\t\t * bruteforceBE Desc runtime: 17835245\r\n\t\t * improvedBE Asc runtime: 3562199\r\n\t\t * improvedBE Desc runtime: 794515\r\n\t\t * linearBE Asc runtime: 1680780\r\n\t\t * linearBE Desc runtime: 1629310\r\n\t\t *\r\n\t\t * 10.000\r\n\t\t * bruteforceBE Asc runtime: 3850878\r\n\t\t * bruteforceBE Desc runtime: 113789179\r\n\t\t * improvedBE Asc runtime: 11800873\r\n\t\t * improvedBE Desc runtime: 8166293\r\n\t\t * linearBE Asc runtime: 14381578\r\n\t\t * linearBE Desc runtime: 5897656\r\n\t\t *\r\n\t\t * 100.000\r\n\t\t * bruteforceBE Asc runtime: 19376301\r\n\t\t * bruteforceBE Desc runtime: 7801237491\r\n\t\t * improvedBE Asc runtime: 52015969\r\n\t\t * improvedBE Desc runtime: 33891001\r\n\t\t * linearBE Asc runtime: 43042990\r\n\t\t * linearBE Desc runtime: 10088763\r\n\t\t *\r\n\t\t * 200.000\r\n\t\t * bruteforceBE Asc runtime: 27567279\r\n\t\t * bruteforceBE Desc runtime: 30705593272\r\n\t\t * improvedBE Asc runtime: 87086775\r\n\t\t * improvedBE Desc runtime: 51012088\r\n\t\t * linearBE Asc runtime: 61726040\r\n\t\t * linearBE Desc runtime: 56062681\r\n\t\t */\r\n\t\tArrayList<Integer> ArrayUnsortAsc = new ArrayList<>();\r\n\t\tArrayList<Integer> ArrayUnsortDesc = new ArrayList<>();\r\n\t\tint n = 1000;\r\n\r\n\t\tfor(int i = 1; i <= n; i++ ) {\r\n\t\t\tArrayUnsortAsc.add(i);\r\n\t\t}\r\n\t\tfor(int j = n; j >= 1; j-- ) {\r\n\t\t\tArrayUnsortDesc.add(j);\r\n\t\t}\r\n\r\n\t\tlong beginning = 0, end = 0;\r\n\t\tlong runtime;\r\n\t\t//1a test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1b test\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortDesc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1c test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Desc runtime: \" + runtime);\r\n\r\n\t}", "private static boolean slowEquals(byte[] a, byte[] b) {\n\t int diff = a.length ^ b.length;\n\t for(int i = 0; i < a.length && i < b.length; i++)\n\t diff |= a[i] ^ b[i];\n\t return diff == 0;\n\t }", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "private static boolean slowEquals(byte[] a, byte[] b) {\r\n int diff = a.length ^ b.length;\r\n for (int i = 0; i < a.length && i < b.length; i++) {\r\n diff |= a[i] ^ b[i];\r\n }\r\n return diff == 0;\r\n }", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "private static int find(int i)\r\n{\n int ind = i;\r\n while (ind != ptrs[ind]) {\r\n ind = ptrs[ind];\r\n }\r\n // fix the link so that it is one hop only\r\n // note: this doesn't implement the full union-find update\r\n\r\n ptrs[i] = ind;\r\n\r\n return ind;\r\n}", "private int getIndex2(int val){\n return val/bucket;\n }", "protected int find_among_b(Among v[])\n {\n\tint i = 0;\n\tint j = v.length;\n\n\tint c = cursor;\n\tint lb = limit_backward;\n\n\tint common_i = 0;\n\tint common_j = 0;\n\n\tboolean first_key_inspected = false;\n\n\twhile (true) {\n\t int k = i + ((j - i) >> 1);\n\t int diff = 0;\n\t int common = common_i < common_j ? common_i : common_j;\n\t Among w = v[k];\n\t int i2;\n\t for (i2 = w.s.length - 1 - common; i2 >= 0; i2--) {\n\t\tif (c - common == lb) {\n\t\t diff = -1;\n\t\t break;\n\t\t}\n\t\tdiff = current.charAt(c - 1 - common) - w.s[i2];\n\t\tif (diff != 0) break;\n\t\tcommon++;\n\t }\n\t if (diff < 0) {\n\t\tj = k;\n\t\tcommon_j = common;\n\t } else {\n\t\ti = k;\n\t\tcommon_i = common;\n\t }\n\t if (j - i <= 1) {\n\t\tif (i > 0) break;\n\t\tif (j == i) break;\n\t\tif (first_key_inspected) break;\n\t\tfirst_key_inspected = true;\n\t }\n\t}\n\twhile (true) {\n\t Among w = v[i];\n\t if (common_i >= w.s.length) {\n\t\tcursor = c - w.s.length;\n\t\tif (w.method == null) return w.result;\n\n\t\tboolean res;\n\t\ttry {\n\t\t Object resobj = w.method.invoke(this);\n\t\t res = resobj.toString().equals(\"true\");\n\t\t} catch (InvocationTargetException e) {\n\t\t res = false;\n\t\t // FIXME - debug message\n\t\t} catch (IllegalAccessException e) {\n\t\t res = false;\n\t\t // FIXME - debug message\n\t\t}\n\t\tcursor = c - w.s.length;\n\t\tif (res) return w.result;\n\t }\n\t i = w.substring_i;\n\t if (i < 0) return 0;\n\t}\n }", "public int m()\r\n/* 485: */ {\r\n/* 486:497 */ int i = 0;\r\n/* 487:498 */ for (int j = 0; j < this.b.length; j++) {\r\n/* 488:499 */ if ((this.b[j] != null) && ((this.b[j].b() instanceof ajn)))\r\n/* 489: */ {\r\n/* 490:500 */ int k = ((ajn)this.b[j].b()).c;\r\n/* 491:501 */ i += k;\r\n/* 492: */ }\r\n/* 493: */ }\r\n/* 494:504 */ return i;\r\n/* 495: */ }", "@Override\n\tpublic int isFast() {\n\t\treturn 2;\n\t}", "public static void bfs(int a, int b) {\n\t\t\r\n\t\tQueue<Node> q = new LinkedList<>();\r\n\t\t\r\n\t\tq.add(new Node(a,b));\r\n\t\t\r\n\t\twhile(!q.isEmpty()) {\r\n\t\t\t\r\n\t\t\tNode n = q.remove();\r\n\t\t\t\r\n\t\t\tint x = n.x;\r\n\t\t\tint y = n.y;\r\n\t\t\t\r\n\t\t\tif(x+1 <= N && map[x+1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x+1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x+1,y));\r\n\t\t\t\t\tvisited[x+1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(x-1 > 0 && map[x-1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x-1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x-1,y));\r\n\t\t\t\t\tvisited[x-1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y-1 > 0 && map[x][y-1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y-1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y-1));\r\n\t\t\t\t\tvisited[x][y-1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y+1 <=N && map[x][y+1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y+1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y+1));\r\n\t\t\t\t\tvisited[x][y+1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public int a(alq paramalq, int paramInt1, int paramInt2, fn paramfn)\r\n/* 120: */ {\r\n/* 121:137 */ int i = 0;\r\n/* 122: */ amj localamj;\r\n/* 123: */ int k;\r\n/* 124:138 */ for (int j = 0; j < this.a.length; j++)\r\n/* 125: */ {\r\n/* 126:139 */ localamj = this.a[j];\r\n/* 127:140 */ if (localamj != null) {\r\n/* 128:143 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 129:146 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 130:149 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), true)))\r\n/* 131: */ {\r\n/* 132:153 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 133:154 */ i += k;\r\n/* 134:155 */ if (paramInt2 != 0)\r\n/* 135: */ {\r\n/* 136:156 */ this.a[j].b -= k;\r\n/* 137:157 */ if (this.a[j].b == 0) {\r\n/* 138:158 */ this.a[j] = null;\r\n/* 139: */ }\r\n/* 140:160 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 141:161 */ return i;\r\n/* 142: */ }\r\n/* 143: */ }\r\n/* 144: */ }\r\n/* 145: */ }\r\n/* 146: */ }\r\n/* 147: */ }\r\n/* 148: */ }\r\n/* 149:165 */ for (j = 0; j < this.b.length; j++)\r\n/* 150: */ {\r\n/* 151:166 */ localamj = this.b[j];\r\n/* 152:167 */ if (localamj != null) {\r\n/* 153:170 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 154:173 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 155:176 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), false)))\r\n/* 156: */ {\r\n/* 157:180 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 158:181 */ i += k;\r\n/* 159:182 */ if (paramInt2 != 0)\r\n/* 160: */ {\r\n/* 161:183 */ this.b[j].b -= k;\r\n/* 162:184 */ if (this.b[j].b == 0) {\r\n/* 163:185 */ this.b[j] = null;\r\n/* 164: */ }\r\n/* 165:187 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 166:188 */ return i;\r\n/* 167: */ }\r\n/* 168: */ }\r\n/* 169: */ }\r\n/* 170: */ }\r\n/* 171: */ }\r\n/* 172: */ }\r\n/* 173: */ }\r\n/* 174:193 */ if (this.f != null)\r\n/* 175: */ {\r\n/* 176:194 */ if ((paramalq != null) && (this.f.b() != paramalq)) {\r\n/* 177:195 */ return i;\r\n/* 178: */ }\r\n/* 179:197 */ if ((paramInt1 > -1) && (this.f.i() != paramInt1)) {\r\n/* 180:198 */ return i;\r\n/* 181: */ }\r\n/* 182:200 */ if ((paramfn != null) && (!cy.a(paramfn, this.f.o(), false))) {\r\n/* 183:201 */ return i;\r\n/* 184: */ }\r\n/* 185:204 */ j = paramInt2 <= 0 ? this.f.b : Math.min(paramInt2 - i, this.f.b);\r\n/* 186:205 */ i += j;\r\n/* 187:206 */ if (paramInt2 != 0)\r\n/* 188: */ {\r\n/* 189:207 */ this.f.b -= j;\r\n/* 190:208 */ if (this.f.b == 0) {\r\n/* 191:209 */ this.f = null;\r\n/* 192: */ }\r\n/* 193:211 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 194:212 */ return i;\r\n/* 195: */ }\r\n/* 196: */ }\r\n/* 197: */ }\r\n/* 198:217 */ return i;\r\n/* 199: */ }", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public static void main(String[] args) {\n float[] fb=new float[9];\n fb[0]=(int)12;\n fb[1]=(byte)13;\n fb[2]=(short)8;\n fb[3]=12.021f;\n // fb[4]=23443.43d;\n// fb[4]='a';\n// for(int i=0;i<=4;i++) {\n// \t System.out.println(fb[i]);\n// }\n List<Integer> lis1=new ArrayList<>();\n List<Integer> lis2=new ArrayList<>();\n lis1.add(2);\n lis1.add(4);\n lis1.add(16);\n lis1.add(32);\n lis1.add(96);\n lis1.add(123);\n lis1.add(435);\n lis1.add(234);\n lis1.add(100);\n lis1.add(122);\n lis1.add(240);\n lis1.add(350);\n java.util.Iterator<Integer> itr= lis1.iterator();\n //while(itr.hasNext()) {\n // itr.remove();\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(lis1);\n // \n// long startTime = System.currentTimeMillis();\n// getTotalX(lis1,lis2);\n// System.out.println(\"Time taken by 2 * o(n^2) \" + (System.currentTimeMillis() - startTime) + \"ms\"); \n// \n \t\t \n\t}", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "@Test\n public void test2(){\n times = new ArrayList<Long>();\n for(int i = 0; i<threadnums.length; i++){\n BSTInterface tree = new LockFreeBST();\n makeThread2(tree, threadnums[i]);\n\n\n System.out.println( \"When there are \"+threadnums[i] + \"threads, there are \"+tree.getNum() + \" nodes\");\n\n long startTime=System.currentTimeMillis();\n for(int k = 0; k<100; k++)\n tree.search(totalnum/2);\n long endTime=System.currentTimeMillis();\n System.out.println( \"When there are \"+threadnums[i] + \"threads, the search takes \"+ (endTime-startTime) + \" ms\");\n }\n for(int i = 0; i<threadnums.length; i++){\n System.out.println(\"When there are \"+threadnums[i]+\" threads, \"+\"it takes \"+times.get(i)+\" ms\");\n }\n }", "@org.junit.Test\n public void put() throws Exception {\n for (int i = 0; i < 2_000_000; i++) {\n hashTable.put(Integer.toString(i), Integer.toString(i));\n }\n\n for (int i = 0; i < 2_000_000; i++) {\n assertEquals(true, hashTable.contains(Integer.toString(i)));\n }\n}", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "WeightedUnionFind(int N){\n id = new int[N];\n size = new int[N];\n for (int i = 0; i < N; i++){\n id[i] = i;\n size[i] = 1;\n }\n }", "private static void task3(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(t.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\tt.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + t.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "public static int myOwn(Node A, Node B){\r\n int toReturn = 0;\r\n for (int i = 0; i<puzzleSize; i++){\r\n for (int j = 0; j<puzzleSize; j++){\r\n if (A.state[i][j]==B.state[i][j])\r\n toReturn--;\r\n else\r\n toReturn++;\r\n }\r\n }\r\n return toReturn;\r\n }", "public static double binSearchT(int s, Integer[] a){\n Random rand = new Random();\n int searchVar;\n Stopwatch timer = new Stopwatch();\n Arrays.sort(a);\n for (int i = 0; i < s; i++){\n searchVar = (int)(rand.nextDouble()*a.length);\n Arrays.binarySearch(a, searchVar);\n }\n return timer.elapsedTime(); // the method returns the elapsed time\n }", "public static void main(String[] args){\n int s = 80;\n int n = (int) Math.pow(10, 7);\n Integer[] a = new Integer[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++){\n a[i] = (int) (n*rand.nextDouble());\n }\n double binTime = binSearchT(s, a);\n double linTime = linSearchT(s, a);\n System.out.println(\"binTime: \"+ binTime);\n System.out.println(\"linTime: \"+ linTime);\n\n }", "private int d(amj paramamj)\r\n/* 50: */ {\r\n/* 51: 70 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 52: 71 */ if ((this.a[i] != null) && (this.a[i].b() == paramamj.b()) && (this.a[i].d()) && (this.a[i].b < this.a[i].c()) && (this.a[i].b < p_()) && ((!this.a[i].f()) || (this.a[i].i() == paramamj.i())) && (amj.a(this.a[i], paramamj))) {\r\n/* 53: 72 */ return i;\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 75 */ return -1;\r\n/* 57: */ }", "public void n()\r\n/* 515: */ {\r\n/* 516:523 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 517:524 */ if (this.a[i] != null)\r\n/* 518: */ {\r\n/* 519:525 */ this.d.a(this.a[i], true, false);\r\n/* 520:526 */ this.a[i] = null;\r\n/* 521: */ }\r\n/* 522: */ }\r\n/* 523:529 */ for (i = 0; i < this.b.length; i++) {\r\n/* 524:530 */ if (this.b[i] != null)\r\n/* 525: */ {\r\n/* 526:531 */ this.d.a(this.b[i], true, false);\r\n/* 527:532 */ this.b[i] = null;\r\n/* 528: */ }\r\n/* 529: */ }\r\n/* 530: */ }", "public static void a2v2(int[] A)\n {\n Map<Integer, List<Integer>> hashMap = new HashMap<>();\n\n insert(hashMap, 0, -1);\n\n int sum = 0;\n\n for (int i = 0; i < A.length; i++)\n {\n sum += A[i];\n\n if (hashMap.containsKey(sum))\n {\n List<Integer> list = hashMap.get(sum);\n\n // find all subarrays with the same sum\n for (Integer value: list)\n {\n System.out.println(\"Subarray [\" + (value + 1) + \"…\" +\n i + \"]\");\n }\n }\n\n // insert (sum so far, current index) pair into the hashmap\n insert(hashMap, sum, i);\n }\n }", "static void findI1s(final int length, int[] B) {\r\n\t final long max = 1 << length;\r\n\t for (long i = 0; i < max; i++) {\r\n\t long currentNumber = i;\r\n\t final int[] buffer = new int[length];\r\n\t boolean[] I1 = new boolean[length]; // I1 to be passed to next method\r\n\t int bufferPosition = buffer.length;\r\n\t while (bufferPosition > 0) {\r\n\t buffer[--bufferPosition] = (int) (currentNumber & 1);\r\n\t currentNumber >>>= 1;\r\n\t }\r\n\t for(int x = 0; x < buffer.length; x++) {\r\n\t \tif(buffer[x] == 1) {\r\n\t \t\tI1[x] = true;\r\n\t \t}\r\n\t \telse {\r\n\t \t\tI1[x] = false;\r\n\t \t}\r\n\t \tSystem.out.print(buffer[x]);\r\n\t }\r\n\t\t System.out.println();\r\n\t }\r\n\t}", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\t TreeSet<Integer> treeSet = new TreeSet<Integer>();\n\t\t \n\t\t treeSet.add(21);\n\t\t treeSet.add(10);\n\t\t treeSet.add(25);\n\t\t // treeSet.add(null);\n\t\t treeSet.add(25);\n\t\t //treeSet.add(null);\n\t\t long start = System.currentTimeMillis();\n\t\t Iterator<Integer> iterator = treeSet.iterator();\n\t\t while(iterator.hasNext())\n\t\t {\n\t\t\t System.out.println(iterator.next());\n\t\t }\n\t\t long end = System.currentTimeMillis();\n\t\t System.out.println(end - start);\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tlong start=System.currentTimeMillis();\r\n\t\t\t\tHashSetAdd hsd=new HashSetAdd();\r\n\t\t\t\tHashSet<String> hs2=hsd.add();\r\n\t\t\t\tSystem.out.println(\"size2=:\"+hs2.size());\r\n\t\t\t\tIterator<String> iter = hs2.iterator();\r\n\t\t\t\twhile(iter.hasNext()){\r\n\t\t\t\t String result = iter.next();\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\tlong end=System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"time2=: \"+(end-start));\r\n\t\t\t}", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "@Test\n public void test1(){\n times = new ArrayList<Long>();\n for(int i = 0; i<threadnums.length; i++){\n BSTInterface tree = new LockFreeBST();\n makeThread1(tree, threadnums[i]);\n\n System.out.println( \"When there are \"+threadnums[i] + \" threads, there are \"+tree.getNum() + \" nodes\");\n\n long startTime=System.currentTimeMillis();\n for(int k = 0; k<100; k++)\n tree.search(totalnum/2);\n long endTime=System.currentTimeMillis();\n System.out.println( \"When there are \"+threadnums[i] + \"threads, the search takes \"+ (endTime-startTime) + \" ms\");\n }\n for(int i = 0; i<threadnums.length; i++){\n System.out.println(\"When there are \"+threadnums[i]+\" threads, \"+\"it takes \"+times.get(i)+\" ms\");\n }\n }", "private static void task0111(int nUMS, RedBlackBST<Integer, Integer> i, GenerateInt generateInt) {\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Fill in the table...RedBlast BST Tree\" );\n\t int count=1;\n\t\tfor( int z = 1; z <= nUMS; z++)\n\t\t{\n\t\t\t \t\t \n\t\t\ti.put(GenerateInt.generateNumber(), GenerateInt.generateNumber());\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\t\t\tcount = z;\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "protected static int m34121a(int i, long j, List<C22441c> list) {\n C22441c c22441c;\n AppMethodBeat.m2504i(114774);\n Object obj = 1;\n while (i < sJS.size()) {\n try {\n Object obj2;\n c22441c = (C22441c) sJS.get(i);\n if (obj == null || c22441c.endTime <= j) {\n list.add(c22441c);\n obj2 = obj;\n } else {\n C22441c c22441c2 = new C22441c();\n c22441c2.sJY = c22441c.sJY;\n c22441c2.startTime = j;\n c22441c2.endTime = c22441c.endTime;\n list.add(c22441c2);\n obj2 = null;\n }\n i++;\n obj = obj2;\n } catch (Exception e) {\n AppMethodBeat.m2505o(114774);\n return -1;\n }\n }\n if (list.size() == 0) {\n c22441c = new C22441c();\n c22441c.sJY = sJQ;\n c22441c.startTime = j;\n c22441c.endTime = System.currentTimeMillis();\n list.add(c22441c);\n } else {\n c22441c = new C22441c();\n c22441c.sJY = sJQ;\n c22441c.startTime = sJP.startTime;\n c22441c.endTime = System.currentTimeMillis();\n list.add(c22441c);\n }\n int size = sJS.size();\n AppMethodBeat.m2505o(114774);\n return size;\n }", "public boolean a(amj paramamj)\r\n/* 268: */ {\r\n/* 269:293 */ if ((paramamj == null) || (paramamj.b == 0) || (paramamj.b() == null)) {\r\n/* 270:294 */ return false;\r\n/* 271: */ }\r\n/* 272: */ try\r\n/* 273: */ {\r\n/* 274:298 */ if (!paramamj.g())\r\n/* 275: */ {\r\n/* 276: */ do\r\n/* 277: */ {\r\n/* 278:301 */ i = paramamj.b;\r\n/* 279:302 */ paramamj.b = e(paramamj);\r\n/* 280:303 */ } while ((paramamj.b > 0) && (paramamj.b < i));\r\n/* 281:304 */ if ((paramamj.b == i) && (this.d.by.d))\r\n/* 282: */ {\r\n/* 283:306 */ paramamj.b = 0;\r\n/* 284:307 */ return true;\r\n/* 285: */ }\r\n/* 286:309 */ return paramamj.b < i;\r\n/* 287: */ }\r\n/* 288:312 */ int i = j();\r\n/* 289:313 */ if (i >= 0)\r\n/* 290: */ {\r\n/* 291:314 */ this.a[i] = amj.b(paramamj);\r\n/* 292:315 */ this.a[i].c = 5;\r\n/* 293:316 */ paramamj.b = 0;\r\n/* 294:317 */ return true;\r\n/* 295: */ }\r\n/* 296:318 */ if (this.d.by.d)\r\n/* 297: */ {\r\n/* 298:320 */ paramamj.b = 0;\r\n/* 299:321 */ return true;\r\n/* 300: */ }\r\n/* 301:323 */ return false;\r\n/* 302: */ }\r\n/* 303: */ catch (Throwable localThrowable)\r\n/* 304: */ {\r\n/* 305:325 */ b localb = b.a(localThrowable, \"Adding item to inventory\");\r\n/* 306:326 */ j localj = localb.a(\"Item being added\");\r\n/* 307: */ \r\n/* 308:328 */ localj.a(\"Item ID\", Integer.valueOf(alq.b(paramamj.b())));\r\n/* 309:329 */ localj.a(\"Item data\", Integer.valueOf(paramamj.i()));\r\n/* 310:330 */ localj.a(\"Item name\", new ahc(this, paramamj));\r\n/* 311: */ \r\n/* 312: */ \r\n/* 313: */ \r\n/* 314: */ \r\n/* 315: */ \r\n/* 316: */ \r\n/* 317:337 */ throw new u(localb);\r\n/* 318: */ }\r\n/* 319: */ }", "public static void main(String[] args) \n\t{\n\t \n\t\tlong startTimer = System.currentTimeMillis();\n\t\t//mrethod 1\n\t\tint res=Utility.binarySearchWord();\n\t\tif(res==-1)\n\t\t\tSystem.out.println(\"your word not found\");\n\t\t else\n\t\t System.out.println(\"your word found at index:\"+res);\n\t\tlong first=System.currentTimeMillis();\n\t\tSystem.out.println((first-startTimer)/1000+\"seconds\");\n\t \n\t\t//method 2\n\t\tint res1=Utility.binarySearchForInteger();\n\t\tif(res1==-1)\n\t\t\tSystem.out.println(\"your no. not found\");\n\t\t else\n\t\t System.out.println(\"your no.found at index:\"+res1);\n\t\tlong second=System.currentTimeMillis();\n\t\tSystem.out.println((second-first)/1000+\"seconds\");\n\t\t\n\t\t//method 3\n\t\tint res3[]=Utility.bubbleSortForIntegers();\n\t\tfor(int i=0;i<res3.length;i++)\n\t\t\tSystem.out.println(res3[i]);\n\t\tlong third=System.currentTimeMillis();\n\t\tSystem.out.println((third-second)/1000+\"seconds\");\n\t\t\n\t\t//method 4\n\t\tString res4[]=Utility.bubbleSortForStrings();\n\t\tfor(int i=0;i<res4.length;i++)\n\t\t\tSystem.out.println(res4[i]);\n\t\tlong fourth=System.currentTimeMillis();\n\t\tSystem.out.println((fourth-third)/1000+\"seconds\");\n\t\t\n\t\t//method 5\n\t\tint res5[]=Utility.insertionSortForInteger();\n\t\tfor(int i=0;i<res5.length;i++)\n\t\t\tSystem.out.println(res5[i]);\n\t\tlong fifth=System.currentTimeMillis();\n\t\tSystem.out.println((fifth-fourth)/1000+\"seconds\");\n\t\t\n\t\t//method 6\n\t\tString res6[]=Utility.insertionSortForString();\n\t\tfor(int i=0;i<res6.length;i++)\n\t\t\tSystem.out.println(res6[i]);\n\t\tlong sixth=System.currentTimeMillis();\n\t\tSystem.out.println((sixth-fifth)/1000+\"seconds\");\n\t}", "public static void sorting() {\n List<String> wordList = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n wordList.add(UUID.randomUUID().toString());\n\n //Sort and filter the list using compare to sequentially\n long t1s = System.nanoTime();\n List<String> a =wordList.stream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t1d = System.nanoTime() - t1s;\n\n //Sort and filter the list using compare to in parallel\n long t2s = System.nanoTime();\n List<String> b = wordList.parallelStream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t2d = System.nanoTime() - t2s;\n\n System.out.println(\"Filter + Sort Serial time : \" + t1d);\n System.out.println(\"Filter + Sort Parallel time : \" + t2d);\n }", "static int find(int[] arr){\n\t\tif(arr.length==1) return -1;\n\t\tint slow = arr[0] , fast = arr[arr[0]];\n\t\twhile(slow!=fast){\n\t\t\tslow = arr[slow];\n\t\t\tfast = arr[arr[fast]];\n\t\t}\n\t\tslow = 0;\n\t\twhile(slow!=fast){\n\t\t\tslow = arr[slow];\n\t\t\tfast = arr[fast];\n\t\t}\n\t\treturn slow;\n\n\t}", "private void fastXY(int x, int y){\n ccells.row5bitHash(x,y-2);\n ccells.row5bitHash(x,y-1);\n ccells.row5bitHash(x,y);\n ccells.row5bitHash(x,y+1);\n ccells.row5bitHash(x,y+2);\n // then use some binary math to manipulate this data into hashes for each cell\n // flatten the loop and copy paste yay :)\n // or I could also leave the loop alone and make it loop over array which would be a little more readable\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "private static void doStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.stream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "private static void task033(int nUMS, RedBlackBST<Integer, Integer> i) {\n\t\t\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Deletion in the table...\" );\n\t int count=0;\n\t\tfor( int j = 1; j <= nUMS; j++)\n\t\t{\n\t\t\tif(i.isEmpty() == false)\n\t\t\t{\n\t\t\t\n\t\t\ti.delete(j);\n\t\t\t\n\t\t\t}\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tSystem.out.println(\"Is it empty \" + i.isEmpty());\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\n\t\t\n\t}", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "public long findFastestTime()\r\n {\r\n for(int top = 1; top < listOfTimes.size(); top++)\r\n { \r\n long item = listOfTimes.get(top); \r\n int i = top;\r\n\r\n while(i > 0 && item < listOfTimes.get(i - 1))\r\n {\r\n listOfTimes.set(i, listOfTimes.get(i- 1));\r\n i--;\r\n }//end while \r\n\r\n listOfTimes.set(i, item);\r\n }//end for \r\n\r\n return listOfTimes.get(0);\r\n }", "private static void task222(int nUMS, RedBlackBST<Integer, Integer> i) {\n\t\tSystem.out.println(\"RED BLAST BST Started Search...\");\n\t double search_start = 0, search_end = 0;\n\t int totalkeymatched = 0;\n\n\t search_start = System.nanoTime();\n\t \n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n\t \t\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (i.contains(checker)) {\n\t\n//\t System.out.println(\"Key Matches\");\n\t totalkeymatched++;\n\t \t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each search: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t System.out.println(\"TOTAL MATCHES \" + totalkeymatched);\n\n\t}", "public void b() {\n/* 134 */ for (int i = 0; i < this.b; i++)\n/* 135 */ this.c[i] = false; \n/* */ }", "private static void task111(int nUMS, RedBlackBST<Integer, Integer> i, GenerateInt generateInt) {\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Fill in the table...RED BLAST BST TREE\" );\n\t int count=0;\n\t\tfor( int z = 1; z <= nUMS; z++)\n\t\t{\n\t\t\t \t\t \n\t\t\ti.put(z, z);\n\t\t\tcount = z;\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t}", "private static void task333(int nUMS, RedBlackBST<Integer, Integer> i) {\n\t\tdouble search_start = 0, search_end = 0;\n\n\t System.out.println(\"RED BLAST BST DELETION Started...\");\n\t search_start = System.nanoTime();\n\t int count = 0;\n\t \t\n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (i.contains(checker)) {\n\t i.delete(checker);\n//\t System.out.println(\"INT Removed\");\n\t count++;\n\t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each deletion: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t \n\t System.out.println(\"TOTAL REMOVES\" + count);\n\n\t\t\n\t}", "private static void task2(int nUMS, BinarySearchTree<Integer> t) {\n\t\tSystem.out.println(\"Binary Search Started...\");\n\t double search_start = 0, search_end = 0;\n\t int totalkeymatched = 0;\n\n\t search_start = System.nanoTime();\n\t \n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n\t \t\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (t.contains(checker)) {\n\t\n//\t System.out.println(\"Key Matches\");\n\t totalkeymatched++;\n\t \t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each search: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t System.out.println(\"TOTAL MATCHES \" + totalkeymatched);\n\t\t\n\t}", "private int hashFunc1(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n // Java can return negative vals with hashCode() it's biggg so need to check for this\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n return hashVal; // Idea index position we'd like to insert or search in\n }", "private void snapshot\n (int[] i, int i0, int i1, long[] V) {\n int I = i.length;\n long[] va = V;\n long[] vb = new long[I];\n long[] ta = new long[I];\n long[] tb = new long[I];\n do {\n collectTags(i, i0, i1, ta);\n collectValues(i, i0, i1, va);\n collectValues(i, i0, i1, vb);\n collectTags(i, i0, i1, tb);\n } while(\n Arrays.compare(ta, i0, i1, tb, i0, i1) != 0 ||\n Arrays.compare(va, i0, i1, vb, i0, i1) != 0\n );\n }", "private static void task4(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\tdouble search_start = 0, search_end = 0;\n\n\t System.out.println(\"SPLAY DELETION Started...\");\n\t search_start = System.nanoTime();\n\t int count = 0;\n\t \t\n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (t.contains(checker)) {\n\t t.remove(checker);\n//\t System.out.println(\"INT Removed\");\n\t count++;\n\t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each deletion: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t \n\t System.out.println(\"TOTAL REMOVES\" + count);\n\n\t\t\n\t\t\n\t}", "private static long fillBinaryTree(BinarySearchTree<Integer> aTree, int[] anIntArray) {\n long start = System.currentTimeMillis();\n for (int integer : anIntArray) {\n aTree.insert(integer);\n }\n long finish = System.currentTimeMillis();\n\n return (finish - start);\n }", "public static void concurrency() {\n List<String> words = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n words.add(UUID.randomUUID().toString());\n\n //Groups the list into a map of strings by length in serial\n long t2s = System.nanoTime();\n Map<Integer, List<String>> a = words.stream()\n .collect(Collectors.groupingBy(String::length));\n long t2d = System.nanoTime() - t2s;\n\n //Groups the list into a map of strings by length in parallel\n long t1s = System.nanoTime();\n ConcurrentMap<Integer, List<String>> b = words.parallelStream()\n .collect(Collectors.groupingByConcurrent(String::length));\n long t1d = System.nanoTime() - t1s;\n\n System.out.println(\"Collect Serial time : \" + t2d);\n System.out.println(\"Collect Parallel time : \" + t1d);\n }", "private void mergeAB() {\r\n //merge only for the indexes of this global_count\r\n boolean a_end = false;\r\n boolean b_end = false;\r\n boolean start = false;\r\n int a_count = splitA[global_count - 1];\r\n if(a_count == A.length - 1){\r\n a_count = splitA[global_count - 2] + 1;\r\n }\r\n int b_count = splitB[global_count - 1];\r\n if(b_count == B.length - 1){\r\n if(global_count != splitB.length){\r\n start = true;\r\n b_count = 0;\r\n }\r\n else{\r\n b_count = splitB[global_count - 2] + 1;\r\n }\r\n }\r\n if(b_count == -1){\r\n b_end = true;\r\n b_count = 0;\r\n if(splitB[0] == B.length - 1){\r\n b_count = B.length;\r\n }\r\n }\r\n int c_count = a_count + b_count;\r\n while(!a_end || !b_end){\r\n if(a_end){\r\n C[c_count] = B[b_count];\r\n b_count++;\r\n }\r\n else if(b_end){\r\n C[c_count] = A[a_count];\r\n a_count++;\r\n }\r\n //if a > b\r\n else if(A[a_count] > B[b_count]){\r\n C[c_count] = B[b_count];\r\n b_count++;\r\n c_count++;\r\n }\r\n //if a <= b\r\n else{\r\n C[c_count] = A[a_count];\r\n a_count++;\r\n c_count++;\r\n }\r\n if(!start){\r\n if(a_count == splitA[global_count - 1] + 1){\r\n a_end = true;\r\n }\r\n if(b_count == splitB[global_count - 1] + 1){\r\n b_end = true;\r\n }\r\n }\r\n else{\r\n if(a_count == splitA[global_count - 1] + 1){\r\n a_end = true;\r\n }\r\n if(b_count == splitB.length){\r\n b_end = true;\r\n }\r\n }\r\n }\r\n }", "public Node<T> findSlow(T element);", "private static void task03(int nUMS, AVLTree<Integer> h) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(h.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\th.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + h.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "private PerfectMergeSort() {}", "private int find(int[] A, int startA, int lengthA, int[] B, int startB,\r\n int lengthB, int th){ // th is 0 based index\r\n if(lengthA == 0) return B[startB + th]; // please not mistake to return B[th] !\r\n if(lengthB == 0) return A[startA + th];\r\n\r\n int midA = (lengthA - 1) >> 1; // index of 1. mid of odd count array; 2. lower mid of even count array\r\n int midB = (lengthB - 1) >> 1;\r\n\r\n if(A[startA + midA] < B[startB + midB]){ // lower half 'A[]' has more smaller values than 'B[]'\r\n return find(B, startB, lengthB, A, startA, lengthA, th); // ensure greater median is in @param A[]\r\n }\r\n\r\n if(midA + 1 + midB + 1 <= th + 1){ // skip lower half of B[] of length (midB + 1)\r\n return find(A, startA, lengthA,\r\n B, startB + midB + 1, lengthB - (midB + 1),\r\n th - (midB + 1));\r\n }else{ // skip upper half of A[] of length (midA + 1), meanwhile keeping length midA\r\n return find(A, startA, midA,\r\n B, startB, lengthB,\r\n th);\r\n }\r\n }", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "private static void task1(int nUMS, BinarySearchTree<Integer> t, GenerateInt generateInt) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Fill in the table...Binary Tree\" );\n\t\t int count=1;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\t \t\t \n\t\t\t\tt.insert(i);\n//\t\t\t\tSystem.out.println(i);\n\t\t\t\tcount = i;\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "protected /*@ non_null @*/ JMLObjectSet<E> fast_insert(E elem) {\n return new JMLObjectSet<E>( // cons() clones if necessary\n JMLListObjectNode.cons(elem, the_list),\n size+1);\n }", "private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void go(int i) {\n\t\tcol[i] = 1;\r\n\t\tint j = f[i];\r\n\t\tint cnt = 0;\r\n\t\tint delAll = 0;\r\n\t\tint[][] cd = new int[1000][3];\r\n\t\tint sa = 0;\r\n\t\tint sb = 0;\r\n\t\tint m1 = Integer.MAX_VALUE;\r\n\t\tint m2 = Integer.MAX_VALUE;\r\n\t\tint m1a = 0;\r\n\t\tint m2a = 0;\r\n\t\tint m1b = 0;\r\n\t\tint m2b = 0;\r\n\t\twhile (j != -1) {\r\n\t\t\tif (col[e[j]] == 0) {\r\n\t\t\t\tgo(e[j]);\r\n\t\t\t\tdelAll += a[e[j]];\r\n\t\t\t\tint dif = b[e[j]] - a[e[j]];\r\n\t\t\t\tif (dif < m1) {\r\n\t\t\t\t\tm2 = m1;\r\n\t\t\t\t\tm2b = m1b;\r\n\t\t\t\t\tm2a = m1a;\r\n\t\t\t\t\tm1 = dif;\r\n\t\t\t\t\tm1a = a[e[j]];\r\n\t\t\t\t\tm1b = b[e[j]];\r\n\t\t\t\t} else if (dif < m2) {\r\n\t\t\t\t\tm2 = dif;\r\n\t\t\t\t\tm2a = a[e[j]];\r\n\t\t\t\t\tm2b = b[e[j]];\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tsa += a[e[j]];\r\n\t\t\t\tsb += a[e[j]];\r\n\t\t\t\tcd[cnt][0] = a[e[j]];\r\n\t\t\t\tcd[cnt][1] = b[e[j]];\r\n\t\t\t\tcd[cnt][2] = b[e[j]] - a[e[j]];\r\n\t\t\t\tcnt++;\r\n\t\t\t}\r\n\t\t\tj = next[j];\r\n\t\t}\r\n\t\tif (cnt == 0) {\r\n\t\t\ta[i] = 1;\r\n\t\t\tb[i] = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tArrays.sort(cd, new Comparator<int[]>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(int[] o1, int[] o2) {\r\n\t\t\t\t// TODO Auto-generated method stub\t\t\t\t\r\n\t\t\t\treturn o1[2] - o2[2];\r\n\t\t\t}\r\n\t\t});\r\n\t\ta[i] = delAll + 1;\r\n\t\t//leave 0 or 2\r\n\t\tint cost1 = 0;\r\n\t\tint cost = 0;\r\n\t\tfor (j = 2; j < cnt; j++)\r\n\t\t\tcost1 += cd[j][0];\r\n\t\tif (cnt >= 2) {\r\n\t\t\tcost += m1b + m2b + sa - m1a - m2a;\r\n\t\t\tcost1 += cd[0][1] + cd[1][1];\r\n\t\t} else {\r\n\t\t\tcost += sa;\r\n\t\t\tcost1 += cd[0][0];\r\n\t\t}\r\n\t\tif (cost1 != cost)\r\n\t\t\tSystem.err.println(\"FUCK\");\r\n\t\tb[i] = cost;\r\n\t}", "private static int distance(ArrayList<Integer>[] adj, ArrayList<Integer>[] cost, int s, int t) {\n\n Set<Integer> visited = new HashSet<>(); //option 1\n Map<Integer, Integer> distance = new HashMap<>();\n// Queue<Integer> q = new PriorityQueue<>(11, (o1, o2) -> { //option 0\n// Integer d1 = distance.get(o1); //option 0\n// Integer d2 = distance.get(o2); //option 0\n Queue<Map.Entry<Integer, Integer>> q = new PriorityQueue<>(11, (o1, o2) -> { //option 1\n Integer d1 = o1.getValue(); //option 1\n Integer d2 = o2.getValue(); //option 1\n\n if (Objects.equals(d1, d2)) return 0;\n if (d1 == null) return 1;\n if (d2 == null) return -1;\n\n return d1 - d2;\n });\n\n distance.put(s, 0);\n// q.addAll(IntStream.range(0, adj.length).boxed().collect(Collectors.toList())); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(s, 0)); //option 1\n\n while (!q.isEmpty()) {\n// int u = q.remove(); //option 0\n int u = q.remove().getKey(); //option 1\n\n if (u == t) {\n Integer dist = distance.get(u);\n if (dist == null) return -1;\n return dist;\n }\n\n if (visited.contains(u)) continue; //option 1\n visited.add(u); //option 1\n\n List<Integer> adjList = adj[u];\n List<Integer> costList = cost[u];\n for (int i = 0; i < adjList.size(); i++) {\n int v = adjList.get(i);\n int w = costList.get(i);\n Integer dist = distance.get(v);\n Integer newDist = distance.get(u);\n if (newDist != null) newDist += w;\n\n if (newDist != null && (dist == null || dist > newDist)) {\n //relax\n distance.put(v, newDist);\n// q.remove(v); //option 0\n// q.add(v); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(v, distance.get(v))); //option 1\n }\n }\n }\n\n return -1;\n }", "static int countCollinearFast(int[] a1, int[] a2, int[] a3)\n {\n //TODO: implement this method\n \tsort(a3);\n \tint count = 0;\n \tint search;\n \t\n \tfor (int i=0; i<a1.length; i++)\n \t\tfor (int j=0; j<a2.length; j++)\n \t\t{\n \t\t\tsearch = 2*a2[j] - a1[i];\n \t\t\tif (binarySearch(a3, search))\n \t\t\t\tcount++;\n \t\t}\n \t\n \treturn count;\n }", "private int calcDistanceMemoize(int i, int j, char[] one, char[] two, int [][]table) {\n if (i < 0)\n return j+1;\n\tif (j < 0)\n\t return i+1;\n\n if (table[i][j] == -1) \n table[i][j] = calcDistanceRecursive(i, j, one, two, table);\n\t\n return table[i][j];\n }", "@Test\n public void testWithDeadlyParams() {\n HashSet<ComplexOomage> oomages = new HashSet<ComplexOomage>();\n int N = 10000;\n ArrayList<Integer> params;\n\n for (int oom = 0; oom < N; oom += 1) {\n params = new ArrayList<Integer>(N);\n for (int i = 0; i < 10; i += 1) {\n params.add(255);\n }\n oomages.add(new ComplexOomage(params));\n }\n assertTrue(haveNiceHashCodeSpread(oomages));\n }", "@Test\n public void testPerformance() {\n int opCount = 1000000;\n Random random = new Random();\n\n for(int i = 0; i < opCount; i++) {\n linkedListStack.push(new Student(random.nextInt(Integer.MAX_VALUE), random.nextInt(Integer.MAX_VALUE)));\n }\n while(!linkedListStack.isEmpty()) {\n linkedListStack.pop();\n }\n }", "private boolean kcss(int[] i, long[] e, long y) {\n int I = i.length;\n long[] x = new long[I];\n while (true) {\n x[0] = ll(i[0]); // 1\n snapshot(i, 1, I, x); // 2\n if (Arrays.compare(x, e) != 0) { // 3\n sc(i[0], x[0]); // 3a\n return false; // 3a\n }\n if (sc(i[0], y)) return true; // 3b\n } // 3c\n }", "private void baseAlgorithm() {\n\t\tlong start = System.nanoTime();\n\t\tinitCentroids();\n\t\tint counter = 0;\n\t\twhile (counter < 1000\n\t\t\t\t&& (lastCentroids == null || !SeriesComparator.equalClustering(lastCentroids, centroids))) {\n\t\t\tresetClusters();\n\t\t\tassignPoints();\n\t\t\tlastCentroids = new ArrayList<Point2D>(centroids);\n\t\t\tcalculateNewMean();\n\t\t\tbasicIterations++;\n\t\t\tcounter++;\n\t\t}\n\t\tconvertToClustering();\n\t\tbasicRuntime = System.nanoTime() - start;\n\t}", "@Test\n public void testIntersectionZeroSequenceRemovedFromQueue()\n {\n int zeroSequence = 1; // Zero sequence of length 62\n ConciseSet set1 = new ConciseSet(new int[] {zeroSequence}, false);\n\n ConciseSet set2 = new ConciseSet();\n for (int i = 0; i < 1000; i++) {\n set2.add(i);\n }\n verifyIntersection(set1, set2);\n }" ]
[ "0.63132554", "0.60224694", "0.600404", "0.5640502", "0.5489345", "0.54708034", "0.5434405", "0.53485835", "0.5344551", "0.5299375", "0.52989036", "0.52589375", "0.5258173", "0.5256411", "0.52425814", "0.52392995", "0.52245605", "0.5217807", "0.52140546", "0.5212454", "0.51784235", "0.5146362", "0.5117776", "0.5111577", "0.5111512", "0.5110345", "0.5107963", "0.51030153", "0.5098083", "0.5073315", "0.5061372", "0.50268894", "0.5019669", "0.5003575", "0.5002065", "0.4993301", "0.49837798", "0.4975024", "0.4971179", "0.49585968", "0.49529883", "0.49492133", "0.49491915", "0.49388266", "0.49277428", "0.49218422", "0.49173713", "0.49172708", "0.49159062", "0.49152195", "0.49099594", "0.49093506", "0.49085906", "0.49059", "0.4896067", "0.48910674", "0.48803353", "0.4874647", "0.48692447", "0.48639688", "0.4863836", "0.4863436", "0.48530656", "0.48523068", "0.48485652", "0.4847974", "0.48461843", "0.48346207", "0.48311454", "0.48279843", "0.48261514", "0.4823419", "0.48176873", "0.48171255", "0.4816133", "0.48150098", "0.4814083", "0.4810003", "0.48051772", "0.48016283", "0.48013082", "0.4798864", "0.47981596", "0.47969213", "0.47958183", "0.47937095", "0.47916526", "0.47894624", "0.4784675", "0.47817406", "0.47810847", "0.47776043", "0.4770059", "0.4769107", "0.4766291", "0.47657415", "0.4762304", "0.475246", "0.47468492", "0.47467232", "0.47448063" ]
0.0
-1
A utility function to print the constructed MST stored in parent[]
public static void printMST(GraphAdjacencyMatrix graph, int parent[]) { System.out.println("Edge \tWeight"); for (int i = 1; i < graph.getV(); i++) System.out.println(parent[i] + " - " + i + "\t" + graph.getMatrix()[i][parent[i]]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }", "public void printMST() {\n\t\t\n\t\tString mstPath = \"\";\n\t\t\n\t\t/**Stores the parent child hierarchy*/\n\t\tint distance[] = new int[this.vertices];\n\t\t\n\t\t/**Stores all the vertices with their distances from source vertex*/\n\t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\tmap.put(0, 0);\n\t\t\n\t\tfor(int i = 1; i < vertices; i++){\n\t\t\tmap.put(i, Integer.MAX_VALUE);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < vertices; i++){\n\t\t\t\n\t\t\tInteger minVertex = extractMin(map), minValue = map.get(minVertex);\n\t\t\tdistance[minVertex] = minValue;\n\t\t\t\n\t\t\tmstPath += minVertex + \" --> \";\n\t\t\t\n\t\t\t/**Removing min vertex from map*/\n\t\t\tmap.remove(minVertex);\n\t\t\t\n\t\t\t/**Exploring edges of min vertex*/\n\t\t\tArrayList<GraphEdge> edges = this.adjList[minVertex];\n\t\t\tfor(GraphEdge edge : edges){\n\t\t\t\tif(map.containsKey(edge.destination)){\n\t\t\t\t\tif(map.get(edge.destination) > distance[edge.source] + edge.weight){\n\t\t\t\t\t\tmap.put(edge.destination, distance[edge.source] + edge.weight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(mstPath);\n\t}", "public void printTree() {\n Object[] nodeArray = this.toArray();\n for (int i = 0; i < nodeArray.length; i++) {\n System.out.println(nodeArray[i]);\n }\n }", "public String toString(){\n String str = \"\";\n for(int i = level; i>0; i--){\n str+=\"\\t\";\n }\n str += getClass().toString();\n if(noOfChildren != 0){\n str+=\" containing\\n\";\n for (int i = 0; i<this.noOfChildren; i++)\n str += getChild(i).toString();\n }\n else{\n str+=\"\\n\";\n }\n return str;\n }", "public static String printTree()\r\n {\r\n String result = \"\";\r\n for (String s: tree.toArrayList())\r\n result = result + \" \" + s;\r\n return result;\r\n }", "public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}", "public String toString() {\n\n // **** ****\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"\\n n: \" + this.n);\n sb.append(\"\\nparents: \" + Arrays.toString(this.parents));\n\n // **** ****\n return sb.toString();\n }", "public String toString() {\n\t\tString tester = \"\";\n\t\tfor(String node : nodes.keySet())\n\t\t{\n\t\t\ttester += \" \" + nodes.get(node) + \" \\n\";\n\t\t}\n\t\treturn tester;\n\t}", "public String toString()\r\n/* 112: */ {\r\n/* 113:199 */ String s = \"\";\r\n/* 114:200 */ for (N node : getNodes())\r\n/* 115: */ {\r\n/* 116:201 */ s = s + \"\\n{ \" + node + \" \";\r\n/* 117:202 */ for (N suc : getSuccessors(node)) {\r\n/* 118:203 */ s = s + \"\\n ( \" + getEdge(node, suc) + \" \" + suc + \" )\";\r\n/* 119: */ }\r\n/* 120:205 */ s = s + \"\\n} \";\r\n/* 121: */ }\r\n/* 122:207 */ return s;\r\n/* 123: */ }", "public String toString(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\tTList<T> root = this.getRoot();\n\t\tif (root == this) \n\t\t\tsb.append(\"*\");\n\t\tif (root.visited())\n\t\t\tsb.append(\"-\");\n\t\tsb.append(root.getValue());\n\t\twhile (root.hasNext()) {\n\t\t\tsb.append(\" -> \");\n\t\t\troot = root.getNext();\n\t\t\tif (root == this) \n\t\t\t\tsb.append(\"*\");\n\t\t\tif (root.visited())\n\t\t\t\tsb.append(\"-\");\n\t\t\tsb.append(root.getValue());\n\t\t}\n\t\treturn sb.toString();\n\t}", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "public String toString(){\n //return myString(root);\n printInOrder(root);\n return \"\";\n }", "public String printTree() {\n printSideways();\n return \"\";\n }", "@Override\n public void printTree() {\n System.out.println(\"node with char: \" + this.getChar() + \" and key: \" + this.getKey());\n int i = 0;\n for(IABTNode node : this.sons) {\n if(!node.isNull()) {\n System.out.print(\"Son \" + i + \" :\");\n node.printTree();\n }\n i++;\n }\n }", "@Override\r\n public String toString() {\r\n Queue<List<Node>> queue = new LinkedList<List<Node>>();\r\n queue.add(Arrays.asList(root));\r\n StringBuilder sb = new StringBuilder();\r\n while (!queue.isEmpty()) {\r\n Queue<List<Node>> nextQueue = new LinkedList<List<Node>>();\r\n while (!queue.isEmpty()) {\r\n List<Node> nodes = queue.remove();\r\n sb.append('{');\r\n Iterator<Node> it = nodes.iterator();\r\n while (it.hasNext()) {\r\n Node node = it.next();\r\n sb.append(node.toString());\r\n if (it.hasNext())\r\n sb.append(\", \");\r\n if (node instanceof BPTree.InternalNode)\r\n nextQueue.add(((InternalNode) node).children);\r\n }\r\n sb.append('}');\r\n if (!queue.isEmpty())\r\n sb.append(\", \");\r\n else {\r\n sb.append('\\n');\r\n }\r\n }\r\n queue = nextQueue;\r\n }\r\n return sb.toString();\r\n }", "public String toString() {\r\n\t\treturn print(this.root,0);\r\n\t}", "public void print_root(){\r\n\t\tfor(int id = 0; id < label.length; id++){\r\n\t\t\tSystem.out.printf(\"\"%d \"\", find(id));\r\n\t\t}\r\n\t\tSystem.out.printf(\"\"\\n\"\");\r\n\t}", "public String toString() {\n StringBuffer aBuffer = new StringBuffer(super.toString());\n aBuffer.append(\"[id=\").append(_theId).\n append(\" parent=\").append(_theParent).\n append(\" paths=\").append(_thePaths).\n append(\"]\");\n\n return aBuffer.toString();\n }", "public String toString() {\n return toString(root) + \" \";//call helper method for in-order traversal representation\n }", "public void printTree(){ \n System.out.format(\"The suffix tree for S = %s is: %n\",this.text); \n this.print(0, this.root); \n }", "@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }", "public void printDGraph(){\n System.out.println(this.toString());\n }", "public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n traverseNode(sb, \"\", \"\", root, false);\n return sb.toString();\n }", "@Override\n public String toString() { // display subtree in order traversal\n String output = \"[\";\n LinkedList<Node<T>> q = new LinkedList<>();\n q.add(this);\n while(!q.isEmpty()) {\n Node<T> next = q.removeFirst();\n if(next.leftChild != null) q.add(next.leftChild);\n if(next.rightChild != null) q.add(next.rightChild);\n output += next.data.toString();\n if(!q.isEmpty()) output += \", \";\n }\n return output + \"]\";\n }", "public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }", "void Print() {\r\n\r\n AVLTreeNode node = root;\r\n\r\n printInorder(node);\r\n\r\n }", "public void printTopView() {\r\n\t\tfinal ArrayList<Integer> nodeDataList = new ArrayList<>();\r\n\r\n\t\tgetLeftChildren(rootNode.left, nodeDataList);\r\n\t\tnodeDataList.add(rootNode.data);\r\n\t\tgetRightChildren(rootNode.right, nodeDataList);\r\n\r\n\t\tSystem.out.println(\"Printing Top View\");\r\n\r\n\t\tnodeDataList.forEach(nodeData -> {\r\n\t\t\tSystem.out.print(nodeData + \" \");\r\n\t\t});\r\n\t}", "void printMST();", "void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}", "@Override\n public String toString() {\n StringBuilder string = new StringBuilder();\n Node<E> node = first;\n string.append(\"size=\").append(size).append(\", [\");\n for (int i = 0; i < size; i++) {\n if (i != 0) {\n string.append(\", \");\n }\n string.append(node);\n node = node.next;\n }\n string.append(\"]\");\n return string.toString();\n }", "private void print(StringBuffer buffer, DAG.Node node,\n \t DAG.Node parent, List<DAG.Arc> arcs) {\n \n \t // Add the vertexIndex to the labels if it hasn't already been added.\n \t if (!(this.currentCanonicalLabelMapping.contains(node.vertexIndex))) {\n \t this.currentCanonicalLabelMapping.add(node.vertexIndex);\n \t }\n \n \t // print out any symbol for the edge in the input graph\n \t if (parent != null) {\n \t buffer.append(getEdgeSymbol(node.vertexIndex, parent.vertexIndex));\n \t }\n \n \t // print out the text that represents the node itself\n \t buffer.append(this.startNodeSymbol);\n \t buffer.append(getVertexSymbol(node.vertexIndex));\n \n \t int color = dag.colorFor(node.vertexIndex);\n \t if (color != 0) {\n \t buffer.append(',').append(color);\n \t }\n \t buffer.append(this.endNodeSymbol);\n \n \t // Need to sort the children here, so that they are printed in an order \n \t // according to their invariants.\n \t Collections.sort(node.children);\n \n \t // now print the sorted children, surrounded by branch symbols\n \t boolean addedBranchSymbol = false;\n \t for (DAG.Node child : node.children) {\n \t DAG.Arc arc = dag.new Arc(node.vertexIndex, child.vertexIndex);\n \t if (arcs.contains(arc)) {\n \t continue;\n \t } else {\n \t if (!addedBranchSymbol) {\n \t buffer.append(AbstractSignature.START_BRANCH_SYMBOL);\n \t addedBranchSymbol = true;\n \t }\n \t arcs.add(arc);\n \t print(buffer, child, node, arcs);\n \t }\n \t }\n \t if (addedBranchSymbol) {\n \t buffer.append(AbstractSignature.END_BRANCH_SYMBOL);\n \t }\n \t}", "private void printMST(List<Ride> sTRides, List<Integer> visitedRides, int graph[][], int parent[]){\r\n /* This method prints the solution to the primMST method\r\n It does so by splitting the rides in to their sections of the theme park\r\n and printing the ride name alongside the distance from the previous ride in the route of the theme park and the waiting time at each ride\r\n */\r\n System.out.println(\"Ride Theme Distance From Previous Ride Waiting Time at Ride\\n\");\r\n for(int i =1; i < rideCount; i ++){\r\n System.out.println(String.format(\"%-30s %-35s %-35d %-40d\", sTRides.get(i).getName(), sTRides.get(i).getTheme(), graph[parent[visitedRides.get(i)]][visitedRides.get(i)], sTRides.get(i).getWaitingTime()));\r\n }\r\n totalWaitingTime();\r\n }", "public String toString() { \r\n\t\tString Sresult = \"(\" + lChild.toString() + \" / \" + rChild.toString() + \")\";\r\n\t\treturn Sresult; \r\n\t}", "public String toString() {\n \tString printStatements = \"\";\n \t\n \tfor (Vertex vertex : this) {\n \t\tprintStatements += vertex + \" \";\n \t}\n \treturn printStatements;\n }", "public void printOut() {\n\t\tif(root.left != null) {\n\t\t\tprintOut(root.left);\n\t\t}\n\t\t\n\t\tSystem.out.println(root.element);\n\t\t\n\t\tif(root.right != null) {\n\t\t\tprintOut(root.right);\n\t\t}\n\t}", "@Override\n public String toString() {\n StringBuilder outString = new StringBuilder();\n int currentTreeIndex = this.indexCorrespondingToTheFirstElement;\n if (treeSize > 0) {\n while (currentTreeIndex != -1) {\n Node<T> currentNode = getHelper(currentTreeIndex);\n outString.append(currentNode.data).append(\", \");\n currentTreeIndex = currentNode.nextIndex;\n }\n }\n\n if (outString.length() != 0) {\n outString.deleteCharAt(outString.length() - 1); // \", \"\n outString.deleteCharAt(outString.length() - 1);\n }\n return \"[\" + outString.toString() + \"]\";\n }", "public void printNode(){\r\n // make an appropriately lengthed array of formatting\r\n // to separate rows/space coordinates\r\n String[] separators = new String[puzzleSize + 2];\r\n separators[0] = \"\\n((\";\r\n for (int i=0; i<puzzleSize; i++)\r\n separators[i+1] = \") (\";\r\n separators[puzzleSize+1] = \"))\";\r\n // print the rows\r\n for (int i = 0; i<puzzleSize; i++){\r\n System.out.print(separators[i]);\r\n for (int j = 0; j<puzzleSize; j++){\r\n System.out.print(this.state[i][j]);\r\n if (j<puzzleSize-1)\r\n System.out.print(\" \");\r\n }\r\n }\r\n // print the space's coordinates\r\n int x = (int)this.space.getX();\r\n int y = (int)this.space.getY();\r\n System.out.print(separators[puzzleSize] + x + \" \" + y + separators[puzzleSize+1]);\r\n }", "public String toString() {\n String toReturn = \"\";\n\n Node walker = this.first;\n while(walker != null) {\n toReturn += walker.data + \"\\t\";\n walker = walker.next;\n }\n\n return toReturn;\n }", "public String toString() {\n\t\tStringBuilder temp = new StringBuilder();\n\n\t\tfor (int index = 0; index < verticesNum; index++) {\n\t\t\tif(list[index] == null)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttemp.append(\"node:\");\n\t\t\ttemp.append(index);\n\t\t\ttemp.append(\": \");\n\t\t\ttemp.append(list[index].toString());\n\t\t\ttemp.append(\"\\n\");\n\t\t}\n\n\t\treturn temp.toString();\n\t}", "@Override\n public String toString() { return root.toString(); }", "public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n return tree;\n }", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "void print_path(int[]parent,int[]dist,int s)\n {\n System.out.println(); \n \n //path from s to all other vertices\n \n for(int i=0;i<parent.length;i++)\n {\n System.out.println(\"From \"+s+\" to \"+i);\n System.out.print(\"path: \");\n print_node(parent,i);\n System.out.print(\"END\");\n if(dist[i]==INF)\n System.out.println(\" cost=INF\"); \n else\n System.out.println(\" cost=\"+dist[i]);\n\n }\n \n \n System.out.println();\n \n\n \n }", "@Override\n\tpublic String toString() {\n StringBuffer buf = new StringBuffer();\n\n// for (int i = 0; i < units.size(); i++) {\n// buf.append(\"\\nUnit \" + i + \": \" + units.get(i));\n// }\n\n buf.append(\"Connected components: \" );\n List<List<Node>> components = GraphUtils.connectedComponents(graph);\n\n for (int i = 0; i < components.size(); i++) {\n buf.append(\"\\n\" + i + \": \");\n buf.append(components.get(i));\n }\n\n buf.append(\"\\nGraph = \" );\n buf.append(graph);\n\n return buf.toString();\n }", "@Override\n public String toString() {\n return \"V\"+this.VS_ID+\"\\tNodes: \"+getNodes()[0]+\" & \"+getNodes()[1]+\"\\t\"+\"DC\\t\"+getValue()+\" V\";\n }", "public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}", "private void printPath(int currentVertex, int[] parents) {\n // Base case : Source node has been processed \n if (currentVertex == NO_PARENT) {\n return;\n }\n printPath(parents[currentVertex], parents);\n System.out.print(currentVertex + \" \");\n }", "public String toString()\n {\n return _root.toString( ) ;\n }", "public String toString() {\n return tree.toString();\n }", "public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}", "public void dumpTree(String msg) {\n\t\tSystem.out.println(msg);\n\t\tSystem.out.println(((org.eclipse.etrice.runtime.java.messaging.RTObject)getRoot()).toStringRecursive());\n\t}", "@Override\n\tpublic String toString()\n\t{\n\n\t\tStringBuffer sb = new StringBuffer(\"top->\");\n\t\tif (!isEmpty())\n\t\t{\n for(int i = getSize() - 1; i >= 0; i--)\n {\n if(i == getSize() - 1)\n {\n sb.append(list.get(i));\n }\n else \n {\n sb.append( \"->\" + list.get(i));\n }\n }\n //System.out.println(sb.toString());\n\t\t}\n\t\treturn sb.toString();\n\t}", "public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }", "public @Override String toString() {\n String res= \"[\";\n // invariant: res = \"[s0, s1, .., sk\" where sk is the object before node n\n for (Node n = sentinel.succ; n != sentinel; n= n.succ) {\n if (n != sentinel.succ)\n res= res + \", \";\n res= res + n.data;\n }\n return res + \"]\";\n }", "@Override\n public String toString() {\n // | <M,C,B> |\n // | Depth = d |\n // -----------\n return \"\\n ----------- \\n\" + \"| <\" + this.state[0] + \",\" + this.state[1] + \",\" + this.state[2] + \"> |\\n\"\n + \"| Depth = \" + this.depth + \" |\\n\" + \" ----------- \\n\";\n }", "public void printContents(){\n System.out.println(this);\n System.out.println(\"Occupied by: \" + pieceAtVertex + \"\\n Neighbors:\" + neighbors);\n }", "public String toString() {\n StringBuilder s = new StringBuilder(\"{\");\n\n Node<T> next;\n if (start != null) {\n next = start;\n s.append(next);\n next = next.next;\n while (next != null) {\n s.append(\", \" + next);\n next = next.next;\n }\n }\n s.append(\"}\");\n return s.toString();\n }", "private void printFullTree()\r\n {\r\n System.out.println(fullXmlTree.toString());\r\n }", "@Override\n public final String toString() {\n final StringBuilder nodes = new StringBuilder();\n nodes.append(this.sizeNodes()).append(\" Nodes: {\");\n final StringBuilder edges = new StringBuilder();\n edges.append(this.sizeEdges()).append(\" Edges: {\");\n for (final Node<N> node : this.getNodes()) {\n nodes.append(node.toString()).append(',');\n }\n for (final Edge<N, E> edge : this.getEdges()) {\n edges.append(edge.toString()).append(',');\n }\n final String newLine = System.getProperty(\"line.separator\");\n nodes.append('}').append(newLine).append(edges).append('}').append(newLine);\n return nodes.toString();\n }", "public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void printNode() {\n\t\tint j;\n\t\tSystem.out.print(\"[\");\n\t\tfor (j = 0; j <= lastindex; j++) {\n\n\t\t\tif (j == 0)\n\t\t\t\tSystem.out.print (\" * \");\n\t\t\telse\n\t\t\t\tSystem.out.print(keys[j] + \" * \");\n\n\t\t\tif (j == lastindex)\n\t\t\t\tSystem.out.print (\"]\");\n\t\t}\n\t}", "public String toString() {\n if (subTrees.isEmpty()) return rootToString();\n StringBuilder result = new StringBuilder(rootToString() + \"(\" + subTrees.get(0).toString());\n for (int i = 1; i < subTrees.size(); i++) result.append(\",\").append(subTrees.get(i).toString());\n return result + \")\";\n }", "@Override\n public String toString() {\n if (hasChildren) {\n return \"parent \" + rectangle + \" Points: \" + Arrays.toString(points.toArray());\n } else {\n return \"leaf \" + rectangle + \" Points: \" + Arrays.toString(points.toArray());\n }\n }", "public String toString(){\r\n\t\treturn root.toString();\r\n\t}", "public String toString() {\r\n return _toString(overallRoot);\r\n }", "public void printTree() {\n printTreeHelper(root);\n }", "public String toString() {\r\n String result = \"\";\r\n result += \"My Genealogy contains \" + size() + \" members:\\n\";\r\n\r\n for (int i = 0; i < SIZE; i++) {\r\n // i below is used to check for exponentiation, and create newlines for readability\r\n if (((i+1) & -(i+1)) == (i+1)) {\r\n result += \"\\n\";\r\n }\r\n\r\n result += tree[i] + \" \";\r\n }\r\n\r\n return result;\r\n }", "public void display() {\n ITree.Node root = this.createNode(0);\n TreePrinter.printNode(root);\n }", "public String toString() {\r\n\t\tString cad = \"\";\r\n\t\tfor (int i = 0; i < nodes_.size(); i++) {\r\n\t\t\tcad += nodes_.get(i).getVal() + \" - \";\r\n\t\t}\r\n\t\treturn cad;\r\n\t}", "public void print(){\n if (isLeaf){\n for(int i =0; i<n;i++)\n System.out.print(key[i]+\" \");\n System.out.println();\n }\n else{\n for(int i =0; i<n;i++){\n c[i].print();\n System.out.print(key[i]+\" \");\n }\n c[n].print();\n }\n }", "public void printTreeNodes(){\n logger.trace(\"Name: \"+this.getName());\n for(int i=0;i<this.getChildCount();i++){\n SearchBaseNode node = (SearchBaseNode) this.getChildAt(i);\n node.printTreeNodes();\n }\n }", "private void printPath() {\n // generate and print the shortest path.\n if (this == this.previous) {\n graphPathRef.add(this);\n } else if (this.previous == null) {\n System.out.print(\"\");\n } else {\n graphPathRef.add(this);\n this.previous.printPath();\n }\n }", "@Override public String toString() {\n\t\tWBLeftistHeap<Node<T>> clonedHeap = new WBLeftistHeap<>(heap);\n\t\tString className = getClass().getSimpleName();\n\t\tStringJoiner sj = new StringJoiner(\",\",className+\"(\",\")\");\n\t\twhile(!clonedHeap.isEmpty()) {\n\t\t\tsj.add(clonedHeap.minElem().data.toString());\n\t\t}\n\t\treturn sj.toString();\n\t}", "public void printRoot(){\n for(String temp : root){\n System.out.println(temp);\n }\n }", "public void dumpChildren ()\r\n {\r\n dumpChildren(0);\r\n }", "@Override\n\tpublic String toString() {\n\t\tString result = \"\";\n\t\t\n\t\tfor(int i = 0; i < top; i++) {\n\t\t\tresult = result + stack[i].toString() + \"\\n\";\t//shouldn't it start at max --> 0 since its a stack\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public String toString()\r\n {\n \tString result = \"\";\r\n \tNode n = this.top;\r\n \twhile (n != null)\r\n \t{\r\n \t\tresult = result + \" \" + n.getItem().toString();\r\n \t\tn = n.getNext();\r\n \t}\r\n \treturn result.trim();\r\n }", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tMercatorNode node = head;\n\t\tint depth = 0;\n\t\twhile (node != null) {\n\t\t\tsb.append(depth++ + \" \" + node.toString() + \"\\n\");\n\t\t\tnode = node.getNext();\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "private void printSolution(int startVertex, double[] distances, int[] parents) {\n int nVertices = distances.length;\n System.out.print(\"Vertex\\t Distance\\tPath\");\n\n for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) {\n if (vertexIndex != startVertex) {\n System.out.print(\"\\n\" + startVertex + \" -> \");\n System.out.print(vertexIndex + \" \\t\\t \");\n System.out.print(distances[vertexIndex] + \"\\t\\t\");\n printPath(vertexIndex, parents);\n }\n }\n }", "public void print()\n\t{\n\t\tDNode tem=first;\n\t\tSystem.out.print(tem.distance+\" \");\n\t\twhile(tem.nextDNode!=null)\n\t\t{\n\t\t\ttem=tem.nextDNode;\n\t\t\tSystem.out.print(tem.distance+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "static void printAllInterpretations(int[] arr) {\n\n // Step 1: Create Tree\n Node root = createTree(0, \"\", arr);\n\n // Step 2: Print Leaf nodes\n printleaf(root);\n\n System.out.println(); // Print new line\n }", "public String toString() {\n\t\t//|| (this.equals(new StatementParse(\"sequence\", 0)))\n\t\tif (this.equals(Parser.FAIL)) {\n\t\t\treturn \"\";\n\t\t}\n String result = \"\";\n result += \"(\";\n result += this.name;\n for (Parse child: this.children) {\n \tresult += \" \" + child.toString();\n }\n result += \")\";\n return result;\t\n }", "public String toString() {\n\t\tif (label == null && numChildren <= 0)\n\t\t\treturn \"()\";\n\t\tStringBuffer ret = new StringBuffer(label.toString());\n\t\tif (numChildren > 0) {\n\t\t\tret.append(\"(\"+children[0].toString());\n\t\t\tfor (int i = 1; i < numChildren; i++) {\n\t\t\t\tret.append(\" \"+children[i].toString());\n\t\t\t}\n\t\t\tret.append(\")\");\n\t\t}\n\t\t//\telse\n\t\t//\t ret.append(\":\"+label.hashCode());\n\t\treturn ret.toString();\n\t}", "public String toString()\r\n\t{\r\n\t\treturn root.toString();\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn level+\":\"+title + \":\"+refId+\"::\"+childElems;\n\t}", "@Override\r\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tif(id != null) sb.append(\"#\" + id);\r\n\t\tif(_class != null) sb.append(\".\" + _class);\r\n\t\tif(elemnt != null) sb.append(elemnt);\r\n\t\tfor (Attr attr : attrs) {\r\n\t\t\tsb.append(attr.toString());\r\n\t\t}\r\n\t\tfor (String pseudo : pseudos) {\r\n\t\t\tsb.append(\":\" + pseudo);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//if(child != null) sb.append(child.getExp() + child.toString());\r\n\t\tif(child != null) sb.append(\" \" + child.toString());\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t}", "@Override\n public String toString() {\n if (!leaves.isEmpty()) {\n out.append(\" { rank=same;\").append(System.lineSeparator());\n leaves.forEach(out::append);\n out.append(\" }\").append(System.lineSeparator());\n }\n\n // end of dot-file\n out.append(\"}\");\n return out.toString();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"State: \" + state + \" Action: \" + action + \" Path Cost: \" + pathCost + \"Parent:\\n\" + parent;\r\n\t}", "public String toString() {\n\t\tNode current = top;\n\t\tStringBuilder s = new StringBuilder();\n\t\twhile (current != null) {\n\t\t\ts.append(current.value + \" \");\n\t\t\tcurrent = current.next;\n\t\t}\n\n\t\treturn s.toString();\n\t}", "@Override\r\n\tpublic String toString(){\r\n\t\tString output = \"[ \";\r\n\t\tIterator<Object> it = iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tObject n = it.next();\r\n\t\t\toutput += n + \" \"; \r\n\t\t}\r\n\t\toutput += \"]\";\r\n\t\treturn output;\r\n\t}", "public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}", "public String toString() {\n\t\tString str = \"\";\n\t\tfor (int i = 1 ; i < size - 1; i++ ){\n\t\t\tstr = str + getBlock(i);\n\t\t}\n\t\treturn str;\n\t}", "void printNodes(){\n\t\tfor(int i=0;i<Table.length;i++){\r\n\t\t\tfor(StockNode t=Table[i];t!=null;t=t.next){\r\n\t\t\t\tSystem.out.println(t.stockName+\":\"+t.stockValue+\" \"+t.transactions);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String toString()\n\t{\n\t\tString answer;\n\t\t//if the size not 0, indent 9 spaces to make room for the \"(null)<--\" that backwards will print\n\t\tif (size() != 0)\n\t\t\tanswer = \" \";\n\t\telse\n\t\t\tanswer = \"\";\n\n\t\tDLLNode cursor = head;\n\t\twhile (cursor != null)\n\t\t{\n\t\t\tanswer = answer + cursor.data + \"-->\";\n\t\t\tcursor = cursor.next;\n\t\t}\n\n\t\tanswer = answer + \"(null)\";\n\t\treturn answer;\n\t}", "@Override\n public String print() {\n ArrayList<K> inorderTraverse = inOrdorTraverseBST();\n \n System.out.print(\"In ascending order: \");\n for (int i=0; i<inorderTraverse.size(); i++) {\n System.out.print(inorderTraverse.get(i)+\" \");\n }\n System.out.println(\"\");\n return \"\";\n }", "public String toString(){\r\n\t\tString str = \"|\";\r\n\t\tArrayNode<T> temp = beginMarker.next;\r\n\t\twhile (temp != endMarker){\r\n\t\t\tstr+= temp.toString() + \"|\";\r\n\t\t\ttemp = temp.next;\r\n\t\t}\r\n\t\treturn str;\r\n\t}" ]
[ "0.7891807", "0.7013739", "0.66564167", "0.6546545", "0.6512491", "0.6453969", "0.64472085", "0.6442776", "0.64180464", "0.64133406", "0.64049715", "0.63692474", "0.63692474", "0.63692474", "0.63491535", "0.63481706", "0.6342893", "0.634125", "0.6297111", "0.62408435", "0.624017", "0.62393457", "0.6222061", "0.6215984", "0.6210787", "0.61227554", "0.6107637", "0.6089889", "0.6071288", "0.60542935", "0.6053331", "0.6052019", "0.604928", "0.60492647", "0.6044689", "0.60374224", "0.6030407", "0.6026716", "0.60250086", "0.6024679", "0.6023209", "0.60176575", "0.60066146", "0.59906596", "0.59882814", "0.59770054", "0.5975942", "0.5972328", "0.59688115", "0.596468", "0.59606844", "0.5942826", "0.5941288", "0.5939331", "0.5929029", "0.5924162", "0.59192", "0.59178525", "0.5917664", "0.59169203", "0.591649", "0.5916042", "0.59148926", "0.5914041", "0.59083855", "0.5891165", "0.5879148", "0.58763605", "0.5873795", "0.5862465", "0.5857306", "0.5856105", "0.5854272", "0.5850637", "0.5847414", "0.58454365", "0.5843423", "0.58404875", "0.58352715", "0.58312136", "0.58302426", "0.58266234", "0.5826391", "0.58227885", "0.5818111", "0.5814579", "0.5811457", "0.58103216", "0.58087355", "0.5801431", "0.5801145", "0.5800458", "0.5799484", "0.57930505", "0.57921284", "0.57884616", "0.57881874", "0.57848215", "0.57843304", "0.5784177" ]
0.69796306
2
Test whether the hash function works
@Test public void testHash() { // the hash function does sha256, but I guess I don't care about implementation // test if two things hash to same value logger.trace("Equal strings hash to same value"); String hash1 = Util.hash("foobar"); String hash2 = Util.hash("foobar"); Assert.assertEquals(hash1, hash2); // test if different things hash to different value logger.trace("Unequal strings hash to different value"); hash1 = Util.hash("foobar"); hash2 = Util.hash("barfoo"); Assert.assertNotEquals(hash1, hash2); // test if hash length > 5 (arbitrary) logger.trace("Hash is of sufficient length to avoid collisions"); hash1 = Util.hash("baz"); final int length = hash1.length(); Assert.assertTrue(length > 5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasHash();", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "int getHash();", "@Test\n\t\tpublic void testhashPassword() {\n\t\t\tString actual = Professor.hashPassword(\"thePassword\");\n\t\t\tString expected = Professor.hashPassword(\"thePassword\");\n\t\t\t\n\t\t\tassertEquals(expected, actual);\n\t\t}", "@Test\n public void testSomeMethod() throws Exception {\n String test= Hash.getSaltedHash(\"UND123\");\n \n System.out.println(\"------------------------------------\");\n System.out.println(\"Hash code \\n\");\n System.out.println(test +\"\\n\");\n assertEquals(true,Hash.check(\"UND123\", \"P1Rlnnlc9wJZXmieTCsZwFs0ppnQpOXjLPIuju0BaFE=$WuRG4kAGPpkR2XxRMH4Dz7T39iHttGzCrDIMaEMYvhA=\"));\n }", "int hash(String makeHash, int mod);", "boolean hasDigest();", "@Test\r\n public void testHash() {\r\n Settings expResult = Settings.EXPERT;\r\n int kod = 16 * 30 * 99;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.INTERMEDIATE;\r\n kod = 16 * 16 * 40;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.BEGINNER;\r\n kod = 9 * 9 * 10;\r\n assertEquals(expResult.hashCode(), kod);\r\n }", "public int hashcode();", "@Test\n\tpublic void testLessDifficulty()\n\t{\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(5, 212));\t\n\t}", "public abstract int getHash();", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "public abstract int doHash(T t);", "public int hash(T input);", "private boolean checkHash(byte[] password, String hashValue) {\n\t\tint hashReps = 1000; // stretch the hash this many times\n\t\tString hashAlgorithm = \"MD5\";\n\n\t\tString endValue = new String();\n\t\ttry {\n\t\t\tMessageDigest md = MessageDigest.getInstance(hashAlgorithm);\n\t\t\tbyte[] value = password;\n\t\t\tfor (int i=0; i<hashReps; i++) { \n\t\t\t\tvalue = md.digest(value);\n\t\t\t}\n\t\t\tendValue = DatatypeConverter.printBase64Binary(value);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tComMethods.report(\"Digest calculated is \"+endValue+\".\", simMode);\n\t\tComMethods.report(\"Actual digest associated with username is \"+hashValue+\".\", simMode);\n\n\t\treturn (endValue.equals(hashValue));\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "int _hash(int maximum);", "String getHash();", "String getHash();", "int hashCode();", "int hashCode();", "public boolean check_hash() {\n HashSet<E> realSet = new HashSet(this);\n return realSet.size() == this.size();\n }", "boolean compare(String hash, String input) throws IllegalArgumentException, EncryptionException;", "String getHashAlgorithm();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}", "public void testHashcode() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n int h1 = r1.hashCode();\n int h2 = r2.hashCode();\n }", "@Test\n public void testValidHashMax() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(8,0);\n\tassertEquals(result, true);\n }", "private boolean testHash(int a, int b, int n, int k)\n {\n\n int [] testList = new int[n]; // Each value Automatically intialized to 0\n int hashValue;\n\n // Mark values reached by hash function\n for( int i = 0; i < k*n ; i++)\n {\n hashValue = (a*i + b)%n;\n testList[hashValue]++;\n }\n\n // Test if a uniform distribution is found\n for(int i = 0; i < n; i++)\n if(testList[i] != k)\n return false;\n\n return true;\n }", "boolean blockExists(byte[] hash);", "long hash(Block block, int position);", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "private static int computeHash(int par0)\n {\n par0 ^= par0 >>> 20 ^ par0 >>> 12;\n return par0 ^ par0 >>> 7 ^ par0 >>> 4;\n }", "@Test\n public void testHashCode() {\n LOGGER.info(\"testHashCode\");\n final String value = \"Hello\";\n final int actual = new AtomString(value).hashCode();\n final int expected = 61 * 7 + Objects.hashCode(value);\n assertEquals(expected, actual);\n }", "protected abstract int hashOfObject(Object key);", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tvoid testHashCodes() {\n\r\n\t\tvar dummyExpr = new BooleanValue(false);\r\n\t\tvar dummyStatement = new Statement.Empty();\r\n\t\tvar dummyBlock = new Block(new Statement[]{\r\n\t\t\tdummyStatement\r\n\t\t});\r\n\r\n\t\t// The statements\r\n\t\tnew Statement.ExpressionStatement(dummyExpr, ExpressionStatementKind.NORMAL).hashCode();\r\n\t\tnew Statement.Assignment(new Expression.Symbol(\"foo\"), dummyExpr).hashCode();\r\n\t\tnew Statement.WhileLoop(dummyExpr, dummyBlock).hashCode();\r\n\t\tnew Statement.If(new Expression[]{}, new Block[]{}).hashCode();\r\n\t\tnew Statement.BlockStatement(dummyBlock).hashCode();\r\n\t\tnew Statement.Rule(new Expression[]{\r\n\t\t\tdummyExpr\r\n\t\t}, new Expression[]{}, dummyBlock).hashCode();\r\n\t\tvar functionDef = new Statement.FunctionDefinition(new Expression.Symbol(\"foo\"), new Expression.Symbol[]{}, 0, dummyBlock);\r\n\t\tfunctionDef.hashCode();\r\n\t\tnew Statement.Empty().hashCode();\r\n\r\n\t\t// The expressions.\r\n\t\tnew Expression.Binary(dummyExpr, BinaryOperator.ADD, dummyExpr).hashCode();\r\n\t\tnew Expression.FunctionCall(dummyExpr, new Expression[]{}).hashCode();\r\n\t\tnew Expression.Index(dummyExpr, dummyExpr).hashCode();\r\n\t\tnew Expression.Symbol(\"foo\").hashCode();\r\n\t\tnew Expression.Unary(dummyExpr, UnaryOperator.NEGATE).hashCode();\r\n\t\tnew Expression.Array(new Expression[]{}).hashCode();\r\n\t\tnew Expression.Dictionary(new Expression[]{}, new Expression[]{}).hashCode();\r\n\t\tnew Expression.Lambda(functionDef).hashCode();\r\n\t\tnew Expression.IndexRange(dummyExpr, dummyExpr, dummyExpr).hashCode();\r\n\r\n\t\t// The values.\r\n\t\tnew BooleanValue(false).hashCode();\r\n\t\tnew IntegerValue(0).hashCode();\r\n\t\tnew DoubleValue(0).hashCode();\r\n\t\tnew StringValue(\"foo\").hashCode();\r\n\t\tnew ArrayValue(new ExpressionValue[]{}).hashCode();\r\n\t\tnew DictionaryValue(new HashMap<>()).hashCode();\r\n\t}", "static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>> 7) ^ (h >>> 4);\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "public abstract int hashCode();", "public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Test ist bestanden, wenn es keine false-Ausgaben gibt:\");\r\n\t\tString masterPassword = \"myMasterPassword\";\r\n\t\tString passwordInput1 = \"myPassword123\";\r\n\r\n\t\tString hashValue = new HashString(masterPassword).hashString(passwordInput1);\r\n\t\tSystem.out.println(hashValue);\r\n\r\n\t\tString passwordInput2 = \"myPassword123\";\r\n\r\n\t\tSystem.out.println(hashValue.equals(new HashString(masterPassword).hashString(passwordInput2)));\r\n\r\n\t\tSystem.out.println(!hashValue.equals(new HashString(masterPassword + \"asdf\").hashString(passwordInput2)));\r\n\t\tSystem.out.println(!hashValue.equals(new HashString(masterPassword).hashString(passwordInput2 + \"asdf\")));\r\n\r\n\t}", "public void testHashFunction(){\r\n Token otherToken;\r\n\r\n try{\r\n token = new Token(TokenType.ID, \"abc\", 5);\r\n otherToken = new Token(TokenType.ID, \"abc\", 6);\r\n //assertTrue(token.hashCode() == 28456490);\r\n assertTrue(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.STRING, \"abc\", 5);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n\r\n token = new Token(TokenType.Q_MARK, \"?\", 10);\r\n otherToken = new Token(TokenType.Q_MARK, \"?\", 10);\r\n assertTrue(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.STRING, \"?\", 10);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.PERIOD, \".\", 10);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n \r\n }catch(ParserException e){\r\n };\r\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "int getClientHashLength();", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "boolean comparePasswordHash(String password, String salt, String destinationHash);", "@Test\n public void testCreateSha1() throws Exception {\n MessageDigest sha1 = MessageDigest.getInstance(MASTER_KEY_GENERATION_ALG);\n byte[] sha1Result = sha1.digest(SHA_1_INPUT);\n assertFalse(Arrays.equals(SHA_1_INPUT, sha1Result));\n }", "@Test\n public void testHashcodeReturnsSameValueForIdenticalRecords() {\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(true));\n }", "@Test\n public void testHashingAvPassord() {\n String passordTilHash = \"passord\";\n String salt = null;\n String salt2 = null;\n try{\n salt = HashPassord.getSalt();\n salt2 = HashPassord.getSalt();\n }catch(NoSuchAlgorithmException | NoSuchProviderException | java.security.NoSuchProviderException e){\n e.printStackTrace();\n }\n String sikkertPassord = getSecurePassword(passordTilHash, salt);\n String sikkertPassord2 = getSecurePassword(passordTilHash, salt2);\n String regenerertPassordVerifisering = getSecurePassword(passordTilHash, salt);\n \n System.out.println( sikkertPassord+ \":\" + salt); //skriver 83ee5baeea20b6c21635e4ea67847f66\n System.out.println( sikkertPassord2+ \":\" + salt2);\n System.out.println(regenerertPassordVerifisering + \":\" + salt); //skriver 83ee5baeea20b6c21635e4ea67847f66\n \n assertEquals(sikkertPassord, regenerertPassordVerifisering);\n assertNotSame(salt, salt2);\n assertNotSame(sikkertPassord, sikkertPassord2);\n System.out.println(\"//TEST//: testHashingAvPassord() = funker!\");\n \n }", "public boolean checkHash(String block){\n return Hash.checkHash(Hash.getHashString(block));\n }", "private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }", "@Test\n void testShouldCalculateHashOfPresentContent() throws IOException {\n final String longContent = StringUtils.repeat(\"apachenifi \", 8192);\n\n for (final HashAlgorithm algorithm : HashAlgorithm.values()) {\n final String expectedContentHash = HashService.hashValueStreaming(algorithm, new ByteArrayInputStream(longContent.getBytes()));\n\n // Reset the processor\n runner.clearProperties();\n runner.clearProvenanceEvents();\n runner.clearTransferState();\n\n // Set the algorithm\n runner.setProperty(CryptographicHashContent.HASH_ALGORITHM, algorithm.getName());\n\n // Insert the content in the mock flowfile\n runner.enqueue(longContent.getBytes(StandardCharsets.UTF_8),\n Collections.singletonMap(\"size\", String.valueOf(longContent.length())));\n\n runner.run(1);\n\n runner.assertTransferCount(CryptographicHashContent.REL_FAILURE, 0);\n runner.assertTransferCount(CryptographicHashContent.REL_SUCCESS, 1);\n\n final List<MockFlowFile> successfulFlowfiles = runner.getFlowFilesForRelationship(CryptographicHashContent.REL_SUCCESS);\n\n // Extract the generated attributes from the flowfile\n MockFlowFile flowFile = successfulFlowfiles.get(0);\n String hashAttribute = String.format(\"content_%s\", algorithm.getName());\n flowFile.assertAttributeExists(hashAttribute);\n flowFile.assertAttributeEquals(hashAttribute, expectedContentHash);\n }\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "String hash(String input) throws IllegalArgumentException, EncryptionException;", "private int computeHash(URI location) {\n \t\treturn location.hashCode();\n \t}", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "public boolean wasAdded(Sha256Hash hash) {\n\n byte[] firstHash = new byte[4];\n for (int i = 0; i < 3; i++) {\n System.arraycopy(hash.getBytes(), i * 4, firstHash, 0, 4);\n boolean result = getBit(firstHash);\n if (!result) {\n returnedFalse++;\n return false;\n }\n }\n returnedTrue++;\n return true;\n }", "public int hashCode() {\n/* 76 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }", "public int hash(String w){\n return (Math.abs(w.hashCode()) % hashTable.length);\n }", "@Override\n public void computeHash(Hasher hasher) {\n }", "@Override\n public int hashCode() {\n int result = hashCode;\n if (result == 0) {\n result = 17;\n result = 31 * result + (data == null ? 0 : data.hashCode());\n result = 31 * result + (succeeded ? 1 : 0);\n result = 31 * result + (errors == null ? 0 : errors.hashCode());\n hashCode = result;\n }\n return result;\n }", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "private int hash(T x)\n {\n // calcolo della chiave ridotta - eventualmente negativa\n int h = x.hashCode() % v.length;\n\n // calcolo del valore assoluto\n if (h < 0)\n h = -h;\n \n return h; \n }", "public int hashCode()\n {\n return hash;\n }", "private int hashOf(String key) {\n return key.length();\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "public int hash1 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal += key.charAt(i);\n \n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0 ;\n }\n\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "protected int myhash(T x)\r\n\t{\r\n\t\tint hashVal = x.hashCode( );\r\n\t\thashVal %= tableSize;\r\n\t\tif( hashVal < 0 )\r\n\t\t\thashVal += tableSize;\r\n\t\treturn hashVal;\r\n\t}", "@Test\n\tpublic void testToHashCode() throws HashUtilException {\n\t\tshort sh = 121;\n\t\tbyte b = 14;\n\t\tObject obj1 = new String[] { \"Ra\", \"sh\" };\n\t\tObject obj2 = new int[] { 23, 46, 74 };\n\t\tObject obj3 = new boolean[] { true, false };\n\t\tObject obj4 = new double[] { 12.3, 45.7 };\n\t\tObject obj5 = new byte[] { 51, 60 };\n\t\tObject obj6 = new short[] { 121, 127 };\n\t\tObject obj7 = new long[] { 23, 46, 74 };\n\t\tObject obj8 = new float[] { 20f, 23.567f };\n\t\tObject obj9 = new char[] { 'r', 'e' };\n\n\t\tassertEquals(\n\t\t\t\t((((((((((23l * 45) + 34) * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 'm') * 45 + 1) * 45)\n\t\t\t\t\t\t+ Double.doubleToLongBits(12.3),\n\t\t\t\tnew HashUtility(23, 45).append(34).append(\"Ram\").append(false).append(12.3).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((23l * 45) + 123456789000l) * 45) + Float.floatToIntBits(2.453f)) * 45) + sh) * 45) + b) * 45)\n\t\t\t\t\t\t+ (long) 'r',\n\t\t\t\tnew HashUtility(23, 45).append(123456789000l).append(2.453f).append(sh).append(b).append('r')\n\t\t\t\t\t\t.toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t((((((((((((((((((((23l * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 's') * 45) + (long) 'h')\n\t\t\t\t\t\t* 45 + 23) * 45) + 46) * 45) + 74) * 45) + 0) * 45) + 1) * 45) + Double.doubleToLongBits(12.3))\n\t\t\t\t\t\t* 45) + Double.doubleToLongBits(45.7),\n\t\t\t\tnew HashUtility(23, 45).append(new String[] { \"Ra\", \"sh\" }).append(new int[] { 23, 46, 74 })\n\t\t\t\t\t\t.append(new boolean[] { true, false }).append(new double[] { 12.3, 45.7 }).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 's') * 45) + (long) 'h')\n\t\t\t\t\t\t* 45) + 23) * 45) + 46) * 45) + 74) * 45) + 0) * 45) + 1) * 45) + Double.doubleToLongBits(12.3))\n\t\t\t\t\t\t* 45) + Double.doubleToLongBits(45.7),\n\t\t\t\tnew HashUtility(23, 45).append(obj1).append(obj2).append(obj3).append(obj4).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + 51) * 45) + 60) * 45) + 121) * 45) + 127) * 45) + 23) * 45) + 46) * 45)\n\t\t\t\t\t\t+ 74) * 45) + Float.floatToIntBits(20f)) * 45) + Float.floatToIntBits(23.567f)) * 45)\n\t\t\t\t\t\t+ (long) 'r') * 45) + (long) 'e',\n\t\t\t\tnew HashUtility(23, 45).append(new byte[] { 51, 60 }).append(new short[] { 121, 127 })\n\t\t\t\t\t\t.append(new long[] { 23, 46, 74 }).append(new float[] { 20f, 23.567f })\n\t\t\t\t\t\t.append(new char[] { 'r', 'e' }).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + 51) * 45) + 60) * 45) + 121) * 45) + 127) * 45) + 23) * 45) + 46) * 45)\n\t\t\t\t\t\t+ 74) * 45) + Float.floatToIntBits(20f)) * 45) + (long) Float.floatToIntBits(23.567f)) * 45)\n\t\t\t\t\t\t+ (long) 'r') * 45) + (long) 'e',\n\t\t\t\tnew HashUtility(23, 45).append(obj5).append(obj6).append(obj7).append(obj8).append(obj9).toHashCode());\n\t}", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "public static void main(String[] args) {\n SecureRandom random = new SecureRandom();\n random.nextBytes(hash);\n data = new byte[hash.length + 1];\n System.arraycopy(hash, 0, data, 0, hash.length);\n long c = 0;\n while (true) {\n recalculateData();\n byte[] dataHash = crc32AsByteArray(data);\n if (c % 10000000 == 0) {\n System.out.println(\"Calculated \" + c + \" hashes\");\n System.out.println(\"Data: \" + byteArrayToHex(data));\n System.out.println(\"Original hash: \" + byteArrayToHex(hash) + \" new hash: \" + byteArrayToHex(dataHash));\n\n }\n if (Arrays.equals(hash, dataHash)) {\n System.out.println(\"Found a match!\");\n System.out.println(\"Data: \" + byteArrayToHex(data));\n System.out.println(\"Original hash: \" + byteArrayToHex(hash) + \" new hash: \" + byteArrayToHex(dataHash));\n break;\n }\n c++;\n }\n }", "int computeHashCode(byte val);", "public static boolean validateHash(byte [] expectedHash, byte [] passPhrase){\r\n\t\ttry {\r\n\t\t\tMessageDigest digest = MessageDigest.getInstance(digestAlgorithm);\r\n\t\t\tbyte [] seed = Arrays.copyOfRange(expectedHash, 0, SEED_LENGTH);\r\n\t\t\tdigest.update(seed);\r\n\t\t\tdigest.update(passPhrase);\r\n\t\t\tbyte [] d = digest.digest();\r\n\t\t\tif(d.length+SEED_LENGTH != expectedHash.length) return false;\r\n\t\t\tfor(int i = 0; i < d.length; i++) {\r\n\t\t\t\tif(expectedHash[i+SEED_LENGTH] != d[i]) return false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\t// should not happen\r\n\t\t\tthrow new ModelException(\"Internal Error - Unknown algorithm \"+EncryptionUtility.digestAlgorithm);\r\n\t\t}\r\n\t}", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "private int hash(String str, int h){\n int v=0;\n\n /* FILL IN HERE */\n v = Math.floorMod(MurmurHash.hash32(str, seeds[h]) >>> h, 1 << logNbOfBuckets);\n\n return v;\n }", "@Override\n public int hashCode() {\n if (hash == 0)\n hash = MD5.getHash(owner.getLogin() + description).hashCode();\n return hash;\n }", "public int hashCode() {\n int result = 17;\n result = (37 * result)\n + ((nullCheck == null) ? 0 : nullCheck.hashCode());\n\n return result;\n }", "public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "public int hash(String item);", "public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (role != null ? role.hashCode() : 0);\n return hash;\n }", "int hash(final K key);", "@Test\n public void calculationOfNoRedundantBitsIsCorrect() {\n final int length = 10;\n final int expectedNoRedundantBits = 5;\n\n // When performing calculation of noRedundantBits\n final int noRedundantBits = HammingAlgorithm.calculateNoRedundantBits(length);\n\n // Then check if noRedundantBits is as expected\n assertThat(noRedundantBits).isEqualTo(expectedNoRedundantBits);\n }", "public int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "int hash(T key) throws IOException, NoSuchAlgorithmException {\n\t\tByteArrayOutputStream b = new ByteArrayOutputStream();\n ObjectOutputStream o = new ObjectOutputStream(b);\n o.writeObject(key);\n byte[] data = b.toByteArray();\n \n //hash key using MD5 algorithm\n\t\t//System.out.println(\"Start MD5 Digest\");\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(data);//this updates the digest using the specified byte array\n \tbyte[] hash = md.digest();\n \tByteBuffer wrapped = ByteBuffer.wrap(hash); // big-endian by default\n \tint hashNum = wrapped.getInt(); \n \treturn hashNum;\n \t\n\t}" ]
[ "0.81342435", "0.78222156", "0.72689223", "0.7203043", "0.7113465", "0.7038031", "0.7023083", "0.69711775", "0.6941972", "0.6880813", "0.686216", "0.68514365", "0.68210256", "0.68045783", "0.6789483", "0.67702675", "0.6760595", "0.67431325", "0.67431325", "0.6724391", "0.6724391", "0.6692941", "0.66864055", "0.666923", "0.6663606", "0.666333", "0.6662699", "0.665554", "0.66517556", "0.6617699", "0.659507", "0.6528803", "0.65166974", "0.6513321", "0.65076303", "0.64498764", "0.64498764", "0.64498764", "0.64498764", "0.6429905", "0.6427673", "0.6418066", "0.64094615", "0.6402498", "0.6396084", "0.6395962", "0.6383601", "0.6382071", "0.6378296", "0.6375941", "0.636205", "0.63265187", "0.63222665", "0.6317752", "0.63134015", "0.6309715", "0.63029367", "0.6288368", "0.6281728", "0.62704444", "0.62687504", "0.62657386", "0.6253323", "0.6247288", "0.6242301", "0.62374216", "0.62356967", "0.6229671", "0.6228443", "0.62205505", "0.6214593", "0.62139904", "0.62040615", "0.6202412", "0.6202412", "0.6194612", "0.6194381", "0.61934686", "0.619331", "0.619266", "0.6185437", "0.6172527", "0.6171068", "0.61678386", "0.61544955", "0.6148875", "0.6143993", "0.61337304", "0.6131524", "0.612974", "0.6121337", "0.6118924", "0.6095277", "0.6093004", "0.60925126", "0.6092499", "0.60889643", "0.6081366", "0.6080067", "0.6079031" ]
0.8054987
1
Test whether stringToList function works
@Test public void testStringToList() { // test whether empty string converts to empty list logger.trace("Empty string handled?"); String string = ""; List<String> list = Util.stringToList(string); Assert.assertEquals(list.size(), 0); // test whether single space converts to empty list logger.trace("Single space handled?"); string = " "; list = Util.stringToList(string); Assert.assertEquals(list.size(), 0); // test whether single item surrounded by spaces converts to list of size 1 logger.trace("Item surrounded by spaces handled?"); string = " foo "; list = Util.stringToList(string); Assert.assertEquals(list.size(), 1); // test whether two item string converts to list of size 2 logger.trace("Two item string handled?"); string = " foo bar "; list = Util.stringToList(string); Assert.assertEquals(list.size(), 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testListToString() {\n // test whether empty list converts to some string\n logger.trace(\"Empty list handled?\");\n String string = \"\";\n List<String> list = Util.stringToList(string);\n String string2 = Util.listToString(list);\n Assert.assertTrue(string2.length() > 0);\n\n // test whether single element list converts to the first element\n logger.trace(\"Single element list handled?\");\n string = \"foo\";\n list = Util.stringToList(string);\n string2 = Util.listToString(list);\n Assert.assertTrue(string2.equals(string));\n\n // test whether two element list converts to some string\n logger.trace(\"Two element list handled?\");\n string = \"foo bar\";\n list = Util.stringToList(string);\n string2 = Util.listToString(list);\n final int twoElementLength = string2.length();\n Assert.assertTrue(twoElementLength > 0);\n\n // test whether three element list converts to a string longer than the two element list\n logger.trace(\"Three element list handled?\");\n string = \"foo bar baz\";\n list = Util.stringToList(string);\n string2 = Util.listToString(list);\n final int threeElementLength = string2.length();\n Assert.assertTrue(threeElementLength > twoElementLength);\n }", "String getStringList();", "@Test\n\tpublic void NotExamtestListToString() {\n\t\t\n\t\tassertEquals(\"[a,b,c]\",listToString(list));\n\t\tassertEquals(\"[a,b,c,aaa,a,a,d,a]\",listToString(list2));\n\t\tassertEquals(\"[]\",listToString(empty));\n\t\tassertEquals(\"[hello]\",listToString(onlyOne));\n\n\t}", "StringList createStringList();", "List<String> mo5877c(String str);", "ListString createListString();", "void mo100443a(List<String> list);", "void mo54419a(List<String> list);", "protected List<String> convertToList(final String data) {\n\t\tif (data == null || data.length() == 0) {\n\t\t\treturn new ArrayList<String>();\n\t\t}\n\t\tString[] result = data.split(\",\");\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor (String val : result) {\n\t\t\tlist.add(val.trim());\n\t\t}\n\t\treturn list;\n\t}", "public void processList(List<String> inList);", "@Test\n\tpublic void stringFilterTest(){\n\t\t\n\t\tList<IElement> result = filter.process(elements);\n\t\t\n\t\tAssert.assertNotNull(\"The result of filter is null!\",result);\n\t\tAssert.assertEquals(\"More results than expected, filter execution fail.\",\n\t\t\t\texpectedResultNum.intValue(),result.size());\n\t\t\n\t\t\n\t}", "@Test\n public void testListOfStrings() {\n JsonableTestClassWithList jtc = Jsonable.loadFromFile(\"testFiles/listTest.json\", JsonableTestClassWithList.class);\n assertEquals(4, jtc.stringArray.size());\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"\\\"abc\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"def\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"123\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"456\\\"\"));\n }", "@Test\n void labTask() {\n String s = \"abczefoh\";\n List<String> result = StringSplitter.labTask(s);\n\n String first = result.get(0);\n assertEquals(3, first.length());\n assertEquals('a', first.charAt(0));\n assertFalse(\"abc\".contains(String.valueOf(first.charAt(1))));\n assertEquals('c', first.charAt(2));\n\n String second = result.get(1);\n assertEquals(2, second.length());\n assertEquals('o', second.charAt(0));\n assertFalse(\"oh\".contains(String.valueOf(second.charAt(1))));\n\n String third = result.get(2);\n assertEquals(3, third.length());\n assertEquals('z', third.charAt(0));\n assertFalse(\"zef\".contains(String.valueOf(second.charAt(1))));\n assertEquals('f', third.charAt(2));\n }", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "static public boolean isList (String listString, String startToken, String endToken,\n String delimiter)\n{\n String s = listString.trim ();\n Vector list = new Vector ();\n\n if (s.startsWith (startToken) && s.endsWith (endToken)) \n return true;\n else\n return false;\n\n\n}", "public void testToString() {\r\n assertEquals(\"[]\",\r\n list.toString());\r\n list.add(\"A\");\r\n assertEquals(\"[A]\",\r\n list.toString());\r\n list.add(\"B\");\r\n assertEquals(\"[A, B]\",\r\n list.toString());\r\n }", "@Given(\"^a list that is \\\"([^\\\"]*)\\\"$\")\n\tpublic void a_list_that_is(String list) throws Throwable {\n\t\tlistAsString = new String(list); \n\t \n\t}", "@Test \r\n\tpublic void testConvertForTokenization()\r\n\t{\r\n\t\tArrayList<String> testArrayList = new ArrayList<String>();\r\n\t\ttestArrayList.add(\"This\");\r\n\t\ttestArrayList.add(\"is\");\r\n\t\ttestArrayList.add(\"a\");\r\n\t\ttestArrayList.add(\"test\");\r\n\t\t\r\n\t\tString testSentence = UtilService.convertForTokenization(testArrayList);\r\n\t\t\r\n\t\tassertNotNull(testSentence);\r\n\t\t//note the method adds a space after each word\r\n\t\tassertEquals(\"This is a test \", testSentence.toString());\r\n\t}", "@Test\n void listAsString() {\n }", "@Test\n void listAsString() {\n }", "private static List<String> convertCommaDelimitedStringToList(String delimitedString) {\n\n\t\tList<String> result = new ArrayList<String>();\n\n\t\tif (!StringUtils.isEmpty(delimitedString)) {\n\t\t\tresult = Arrays.asList(StringUtils.delimitedListToStringArray(delimitedString, \",\"));\n\t\t}\n\t\treturn result;\n\n\t}", "java.util.List<java.lang.String>\n getStrValuesList();", "public String[] getStringList();", "protected boolean updateStringListStatement(IASTListHolder<IASTLiteralTextNode> statement,\r\n\t\t\tList<String> list,\r\n\t\t\tListIterator<String> listIterator) { \r\n\t\treturn updateListStatement(statement, list, listIterator, \r\n\t\t\t\tnew PlatformStatementListConverter());\r\n\t}", "ArrayList<String> createList(String finalInput);", "private boolean stringContainsList(String s, ArrayList<String> list){\n\t\tboolean flag = true;\n\t\tfor(String temp : list){\n\t\t\tif(!s.contains(temp)){\n\t\t\t\tflag = false;\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }", "@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}", "@Test\r\n\tpublic void testListArg() {\r\n\t\tAssert.assertEquals(\"test[(`a,`b,`c)]\", new FunctionImpl.FunctionBuilderImpl(\"test\").param(SymbolValue.froms(\"a\", \"b\", \"c\")).build().toQ());\r\n\t}", "private ArrayList parseStringToList(String data){\n ArrayList<String> result = new ArrayList<String>();\n String[] splitResult = data.split(\",\");\n for(String substring : splitResult){\n result.add(substring);\n }\n return result;\n }", "@Test\n\tpublic void testListOperations() {\n\t\tassertFalse(streetAddresses.contains(s1PlusNine));\n\t\tassertTrue(streetAddresses.stream().anyMatch(s -> comparator.compare(s1PlusNine, s) == 0));\n\t}", "public List<String> validate();", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "@Test\r\n\tpublic void testConvertForTokenizationWithEmptyArrayList()\r\n\t{\r\n\t\tArrayList<String> testArrayList = new ArrayList<String>();\r\n\t\t\r\n\t\tString testSentence = UtilService.convertForTokenization(testArrayList);\r\n\t\t\r\n\t\tassertNotNull(testSentence);\r\n\t\tassertEquals(0, testSentence.length());\r\n\t}", "@Test\n\tpublic void createListWithArraysUtil() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\tList<String> copy = Arrays.asList(\"AAPL\", \"MSFT\");\n\n\t\tassertTrue(list.equals(copy));\n\t}", "public static List<String> strings(){\n\n List<String> list = Arrays.asList(\"A\", \"B\", \"C\", \"D\");\n\n return list;\n\n }", "abstract List<String> splitStringToCollection(String inputString, String separator);", "private static List<String> stringToList(String string) {\n\t // Create a tokenize that uses \\t as the delim, and reports\n\t // both the words and the delimeters.\n\t\tStringTokenizer tokenizer = new StringTokenizer(string, \"\\t\", true);\n\t\tList<String> row = new ArrayList<String>();\n\t\tString elem = null;\n\t\tString last = null;\n\t\twhile(tokenizer.hasMoreTokens()) {\n\t\t\tlast = elem;\n\t\t\telem = tokenizer.nextToken();\n\t\t\tif (!elem.equals(\"\\t\")) row.add(elem);\n\t\t\telse if (last.equals(\"\\t\")) row.add(\"\");\n\t\t\t// We need to track the 'last' state so we can treat\n\t\t\t// two tabs in a row as an empty string column.\n\t\t}\n\t\tif (elem.equals(\"\\t\")) row.add(\"\"); // tricky: notice final element\n\t\t\n\t\treturn(row);\n\t}", "public static void clientFunc(){\n List list = new ArrayList(); //rawtype list\n list.add(10);\n list.add(\"jenkins\");\n list.add(new Object());\n\n //unsafe classcast exception at runtime\n //rawtypes are unsafe\n List<String> stringList = list;\n\n ListIterator listIterator = list.listIterator();\n while(listIterator.hasNext()){\n System.out.println(listIterator.next());\n }\n }", "private void modify(List listString){\n\t}", "List<String> mo5876c();", "public void testDumpList() {\n \n String result = tester.dumpList(box); \n \n assertTrue(\"Wrong start\", result.startsWith(\"[item 0, item 1, item 2, item 3, item 4, item 5, \"));\n assertTrue(\"Wrong end\", result.endsWith(\", item 96, item 97, item 98, item 99]\"));\n }", "@Test\r\n\tvoid testToString2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(2);\r\n\t\tString output = test.toString();\r\n\t\tassertNotEquals(\"2 \", output);\r\n\t}", "public void genericStringArray() {\n\t\tArrayList<String> b1 = new ArrayList<String>();\n\t\tb1.add(\"ABC\");\n\t\tb1.add(\"sdfsdfs\");\n\t\tSystem.out.println(\"String generic ArrayList b1: \" + b1);\n\n\t}", "@Test\n public void testSplitOnPattern() {\n List<String> list = Splitter.on(\n Pattern.compile(\"\\\\|\")\n ).trimResults().omitEmptyStrings().splitToList(\"hello | world|||\");\n assertThat(list, notNullValue());\n assertThat(list.size(), equalTo(2));\n assertThat(list.get(0), equalTo(\"hello\"));\n assertThat(list.get(1), equalTo(\"world\"));\n }", "@Test\n\tpublic void createTypedList() {\n\t\tList<String> list = new ArrayList<>();\n\n\t\tlist.add(\"String\");\n\n\t\tassertEquals(list, Collections.singletonList(\"String\"));\n\t}", "private static void addToList(String paramString1, String paramString2, boolean paramBoolean) {\n }", "@Test\n\tpublic void testFetchMappedValuesForInValidData() {\n\t\tString input = \"231\";\n\t\tList<String> expectedOutput = Arrays.asList(\"A,B,C\", \"D,E,F\", \"1\");\n\t\tList<String> actualOutput = GeneralUtility.fetchMappedValues(input);\n\t\tAssert.assertArrayEquals(expectedOutput.toArray(), actualOutput.toArray());\n\t}", "public boolean equal(StringList list2) {\n\t\tIterator it1 = stringList.listIterator();\n\t\tIterator it2 = list2.iterator();\n\t\tif(list2.len() != stringList.size()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\twhile( (it1.hasNext()) ) {\n\t\t\tSystem.out.format(\"Comparing %s%n\", it1.next());\n\t\t\tif( it1.next() != it2.next()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static List<Object> decodeTextListValue(NotesCAPI notesAPI, Pointer ptr, boolean convertStringsLazily) {\n\t\tint listCountAsInt = ptr.getShort(0) & 0xffff;\n\t\t\n\t\tList<Object> listValues = new ArrayList<Object>(listCountAsInt);\n\t\t\n\t\tMemory retTextPointer = new Memory(Pointer.SIZE);\n\t\tShortByReference retTextLength = new ShortByReference();\n\t\t\n\t\tfor (short l=0; l<listCountAsInt; l++) {\n\t\t\tshort result = notesAPI.ListGetText(ptr, false, l, retTextPointer, retTextLength);\n\t\t\tNotesErrorUtils.checkResult(result);\n\t\t\t\n\t\t\t//retTextPointer[0] points to the list entry text\n\t\t\tPointer pointerToTextInMem = retTextPointer.getPointer(0);\n\t\t\tint retTextLengthAsInt = retTextLength.getValue() & 0xffff;\n\t\t\t\n\t\t\tif (retTextLengthAsInt==0) {\n\t\t\t\tlistValues.add(\"\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (convertStringsLazily) {\n\t\t\t\t\tbyte[] stringDataArr = new byte[retTextLengthAsInt];\n\t\t\t\t\tpointerToTextInMem.read(0, stringDataArr, 0, retTextLengthAsInt);\n\n\t\t\t\t\tLMBCSString lmbcsString = new LMBCSString(stringDataArr);\n\t\t\t\t\tlistValues.add(lmbcsString);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString currListEntry = NotesStringUtils.fromLMBCS(pointerToTextInMem, (short) retTextLengthAsInt);\n\t\t\t\t\tlistValues.add(currListEntry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn listValues;\n\t}", "public static void checkToString() {\r\n\t\tSystem.out.println(\"Beginning toString test (should be [-1, 2, 5, 17] and [3, 6, 8, 42])\");\r\n\t\tSortedIntList list = new SortedIntList(5);\r\n\t\tlist.add(5);\r\n\t\tlist.add(-1);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" \" + list.toString());\r\n\t\t\r\n\t\tSortedIntList list2 = new SortedIntList(true);\r\n\t\tlist2.add(6);\r\n\t\tlist2.add(3);\r\n\t\tlist2.add(6);\r\n\t\tlist2.add(42);\r\n\t\tlist2.add(8);\r\n\t\tSystem.out.println(\" \" + list2.toString());\r\n\t\tSystem.out.println();\r\n\t}", "@Test\n\tpublic void test_validate_string_list() throws Exception {\n\t\tArrayList<Data> rawList = new ArrayList<Data>();\n\t\trawList.add(new Data(\"subData\", \"integer\", 12, false, false, false));\n\t\tData list = new Data(\"list\", \"description\", rawList, false, false, false);\n\t\t\n\t\tHashMap<String, Data> rawParent = new HashMap<String, Data>();\n\t\trawParent.put(\"list\", list);\n\t\t\n\t\tData parent = new Data(\"parent\", \"parent\", rawParent, false,false,false);\n\t\t\n\t\tChemistryProjectGlobalValidation c = new ChemistryProjectGlobalValidation();\n\t\t\n\t\t//fail becuase list contains an integer element\n\t\tassertNotEquals(null, c.containsStringList(parent, \"list\"));\n\t\t\n\t\t//fail because key doesnt exist\n\t\tassertNotEquals(null, c.containsStringList(parent, \"non existant \"));\n\t\t\n\t\t//fail because key exists but is not list type\n\t\tassertNotEquals(null, c.containsStringList(list, \"subData\"));\n\t}", "private void testToString() {\n init();\n assertTrue(\"l0.toString()\", l0.toString().equals(\"[]\"));\n assertTrue(\"l1.toString()\", l1.toString().equals(\"[5]\"));\n assertTrue(\"l2.toString()\", l2.toString().equals(\"[4, 5]\"));\n }", "public static List<String> stringsToList(String... strings) {\n return Collections.unmodifiableList(Arrays.asList(strings));\n }", "public List<File> getFiles(List<String> stringlist);", "public abstract List<C41717j> mo70725h(String str);", "@Test\r\n\tvoid testToString() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"\", output);\r\n\t}", "@Test\n public void testWithNonEmptyList() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(Arrays.asList(\"test\"));\n function.run(parameters);\n assertEquals(FALSE, parameters.pop());\n }", "public static List<String> check(String input){\n\t\treturn SQLInputValidation.traps.stream()\n\t\t\t\t\t\t.filter(input::contains)\n\t\t\t\t\t\t.collect(toList());\n\t}", "private String[] convertToList(List<String> lstAddresses) {\r\n\t\tString[] arrayAddresses = new String[lstAddresses.size()];\r\n\t\tint index=0;\r\n\t\tfor(String strAddress: lstAddresses) {\r\n\t\t\tarrayAddresses[index++] = strAddress;\r\n\t\t}\r\n\t\treturn arrayAddresses;\r\n\t}", "@Test public void asListSimple() {\n @SuppressWarnings(\"null\") final @NotNull List<Integer> is = as.list(new int @NotNull [] { 12, 13, 14 });\n azzert.that(is.get(0), is(fluent.ly.box.it(12)));\n azzert.that(is.get(1), is(fluent.ly.box.it(13)));\n azzert.that(is.get(2), is(fluent.ly.box.it(14)));\n azzert.that(is.size(), is(3));\n }", "@Test\n public void testWriteList() {\n System.out.println(\"writeList\");\n /** Positive testing. */\n // List of long values\n List<Long> list = new LinkedList(Arrays.asList(0L, 1L, 2L, 3L));\n String expResult = \"li0ei1ei2ei3ee\";\n String result = Bencoder.writeList(list);\n assertEquals(expResult, result);\n // List of string values\n List<String> strs = new LinkedList<String>(Arrays.asList(\"spam\", \"moo\", \"test\"));\n expResult = \"l4:spam3:moo4:teste\";\n result = Bencoder.writeList(strs);\n assertEquals(expResult, result);\n // Empty list\n list = Collections.emptyList();\n expResult = \"le\";\n result = Bencoder.writeList(list);\n assertEquals(expResult, result);\n // Combine list\n List<Object> objs = new LinkedList();\n objs.add(42L);\n objs.add(\"spam\");\n expResult = \"li42e4:spame\";\n result = Bencoder.writeList(objs);\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testListLiteral() throws ParseException {\n\t\tListLiteral listLiteral = langParser(\"[]\").listLiteral();\n\t\tassertEquals(listLiteral.getElements().size(), 0);\n\t\tlistLiteral = langParser(\"[101,a,'b']\").listLiteral();\n\t\tassertEquals(listLiteral.getElements().size(), 3);\n\t\tassertEquals(listLiteral.getElements().get(0).getClass(), LongLiteral.class);\n\t\tassertEquals(((LongLiteral) listLiteral.getElements().get(0)).longValue(), 101L);\n\t\tassertEquals(listLiteral.getElements().get(1).getClass(), Identifier.class);\n\t\tassertEquals(((Identifier) listLiteral.getElements().get(1)).getName(), \"a\");\n\t\tassertEquals(listLiteral.getElements().get(2).getClass(), StringLiteral.class);\n\t\tassertEquals(((StringLiteral) listLiteral.getElements().get(2)).getValue(), \"b\");\n\t}", "public List<Protein> stringToList(String proteinString) throws Throwable{\n\n\t\t/* ----------Some things that we will need. -------------*/\n\n\t\tList<Protein> proteins = null;\n\t\tProtein p = null;\n\t\tStringTokenizer token = null;\n\t\t\n\t\t/* ****************************************************** */\n\n\t\ttry {\n\t\t\t/* ---------- Instantiate -------------*/\n\n\t\t\tproteins = new ArrayList<Protein>();\n\t\t\ttoken = new StringTokenizer(proteinString, \".\");\n\t\t\t\n\t\t\t/* *********************************** */\n\t\t\t\n\t\t\t/* ---------- While we have more tokens, add them -------------*/\n\n\t\t\twhile (token.hasMoreTokens()){\n\t\t\t\tp = new Protein();\n\t\t\t\tp.setProteinId(Integer.parseInt(token.nextToken()));\n\t\t\t\tp.setProteinSequence(token.nextToken());\n\t\t\t\tproteins.add(p);\n\t\t\t}\n\t\t\t\n\t\t\t/* *********************************************************** */\n\t\t\t\n\t\t}catch (Throwable t){\n\t\t\t/* ---------- Make sure to set the fail param if something goes wrong -------------*/\n\n\t\t\tlog.error(\"Failed to build list.\", t);\n\t\t\tMain.passfail = Main.FAIL;\n\t\t\t\n\t\t\t/* ******************************************************************************** */\n\t\t}\n\n\t\tif(log.isDebugEnabled()){ log.debug(\"List of proteins has been built.\"); }\n\t\t\n\t\t/* ---------- Return the list -------------*/\n\n\t\treturn proteins;\n\t\t\n\t\t/* *************************************** */\n\t}", "@Test (expected = NoSuchElementException.class)\n public void whenSaveStringInSimpleLinkedList() {\n SimpleLinkedList<String> list = new SimpleLinkedList<>();\n list.add(\"1\");\n list.add(\"3\");\n list.add(\"5\");\n assertThat(list.get(0), is(\"1\"));\n assertThat(list.get(1), is(\"3\"));\n assertThat(list.get(2), is(\"5\"));\n Iterator<String> iterator = list.iterator();\n assertTrue(iterator.hasNext());\n assertTrue(iterator.hasNext());\n assertThat(iterator.next(), is(\"1\"));\n assertThat(iterator.next(), is(\"3\"));\n assertThat(iterator.next(), is(\"5\"));\n assertFalse(iterator.hasNext());\n iterator.next();\n }", "@Test\n public void test_range_String_Collection1() {\n populate_s1();\n Collection<String> actual = Selector.range(s1, \"B\", \"C\", new CompareStringAscending());\n Collection<String> expected = new ArrayList<String>();\n expected.add(\"B\");\n expected.add(\"C\");\n Assert.assertEquals(\"Did not find range correctly\", expected, actual);\n }", "public static List<String> parseStringToList(String str) {\n List<String> list = new LinkedList<>();\n if (StringUtils.isEmpty(str)){\n return list;\n }\n String[] tokens = str.trim().split(\"\\\\s*,\\\\s*\");\n if(tokens != null && tokens.length > 0) {\n for (String column : tokens) {\n list.add(column);\n }\n }\n return list;\n }", "protected List<String> getStrings(String key) {\n Object result = properties.get(key);\n if (result == null) {\n return new ArrayList<>();\n } else if (result instanceof String) {\n return Collections.singletonList((String) result);\n } else if (result instanceof List) {\n return (List<String>) result;\n } else if (result instanceof String[]) {\n return Arrays.asList((String[]) result);\n } else if (result instanceof Object[]) {\n return Arrays.stream((Object[]) result)\n .map(o -> (String) o)\n .collect(Collectors.toList());\n } else {\n throw new UnexpectedException(this);\n }\n }", "public boolean isList();", "public boolean isList();", "public List<String> sourceString() {\n // Processing is done here\n return Arrays.asList(\"tomato\", \"carrot\", \"cabbage\");\n }", "@Test\n public void myTest() {\n // FIXME: Delete this function and add your own tests\n ech.put(\"c\");\n assertEquals(ech.contains(\"c\"),true);\n\n ech.put(\"d\");\n assertEquals(ech.contains(\"d\"),true);\n\n ArrayList<String> tmp = new ArrayList();\n tmp.add(\"d\");\n tmp.add(\"c\");\n assertEquals(tmp,ech.asList());\n\n ech.put(\"a\");\n ArrayList<String> tmp0 = new ArrayList();\n tmp0.add(\"d\");\n tmp0.add(\"a\");\n tmp0.add(\"c\");\n assertEquals(tmp0,ech.asList());\n\n ech.put(\"v\");\n ech.put(\"A\");\n ech.put(\"r\");\n ArrayList<String> tmp1 = new ArrayList();\n tmp1.add(\"d\");\n tmp1.add(\"A\");\n tmp1.add(\"a\");\n tmp1.add(\"v\");\n tmp1.add(\"c\");\n tmp1.add(\"r\");\n assertEquals(tmp1,ech.asList());\n\n ech.put(\"I LOVE 61B\");\n ArrayList<String> tmp2 = new ArrayList();\n tmp2.add(\"d\");\n tmp2.add(\"A\");\n tmp2.add(\"a\");\n tmp2.add(\"I LOVE 61B\");\n tmp2.add(\"v\");\n tmp2.add(\"c\");\n tmp2.add(\"r\");\n assertEquals(tmp2,ech.asList());\n assertEquals(true,ech.contains(\"I LOVE 61B\"));\n\n for(int i = 0;i<10000;i++){\n ech.put((Integer.toString(i)));\n }\n assertEquals(true,ech.contains(\"9999\"));\n }", "public List<String> getStringList(String key) {\n Object value = get(key);\n return ((value instanceof List) && !((List)value).isEmpty() &&\n (((List)value).get(0) instanceof String) ? (List<String>)value : emptyStringList);\n }", "@Test\n\tpublic void list_test_01() {\n\t\tString text = \"1. list\";\n\t\tassertEquals(\"<html><ol><li>list</li></ol></html>\", createHTML(text));\n\t}", "private ArrayList<String> splitString(String arguments) {\n String[] strArray = arguments.trim().split(REGEX_WHITESPACES);\n return new ArrayList<String>(Arrays.asList(strArray));\n }", "public static void ArrayListTest()\n\t{\n\t\tArrayList<String> strings = new ArrayList<String>();\n\t\tString[] someStrings = new String[] { \"A\", \"B\", \"C\", \"D\" };\n\t\t\n\t\tstrings.addAll(Arrays.asList(someStrings));\n\t\t\n\t\tfor (String s : strings)\n\t\t{\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t\tSystem.out.print(strings.isEmpty());\n\t\t\n\t\tList<String> sync = Collections.synchronizedList(strings);\n\t}", "@Test\r\n public void testOnDemandImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n\r\n Type t0 = typeParser.parse(\"List\");\r\n assertEquals(t0, java.util.List.class);\r\n }", "public List<String> stringToList(String string) {\n List<String> description = new ArrayList<String>();\n String[] lines = string.split(\"%n\");\n\n for (String line : lines) {\n line = addSpaces(line);\n description.add(line);\n }\n\n return description;\n }", "List<Data> mo5884i(String str);", "void mo29846a(IObjectWrapper iObjectWrapper, zzxz zzxz, String str, String str2, zzamv zzamv, zzady zzady, List<String> list) throws RemoteException;", "List<C1113b> mo5874b(String str);", "List<String> d();", "@Test\n\tpublic void testSortStringsSimple() throws SortException {\n\t\tString[] inputArr = new String[] { \"nicholas\", \"jerry\", \"zackary\", \"arthur\", \"benny\" };\n\t\tList<String> arrayList = sortApplication.sortStringsSimple(inputArr);\n\t\tassertEquals(\"arthur\", arrayList.get(0));\n\t\tassertEquals(\"benny\", arrayList.get(1));\n\t\tassertEquals(\"jerry\", arrayList.get(2));\n\t\tassertEquals(\"nicholas\", arrayList.get(3));\n\t\tassertEquals(\"zackary\", arrayList.get(4));\n\t}", "public ArrayList<String> runQuery_getListOfStrings(String query) throws SQLException{\n\t\tArrayList<String> res = new ArrayList<>();\n\t\tConnection conn = null;\n\t\tStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry\n\t\t{\n\t\t\tconn = setUpConnection();\t\t\n\t\t\tstmt = conn.createStatement();\t\t\n\t\t\trs = stmt.executeQuery(query);\t\n\t\t\twhile(rs.next())\n\t\t\t{\t\t\t\n\t\t\t\tres.add(rs.getString(1));\n\t\t\t}\n\t\t\tconn.commit();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tcloseJDBCResources(conn, stmt, rs);\n\t\t}\n\t\t\t\t\n\t\treturn res;\t\t\n\t}", "public static List<String> sentenceToList(String sentence){\n\t\treturn Arrays.asList(sentence.split(\"\\\\s+\"));\n\t}", "private static void testFind(String s, LinkedList list) {\n\t\tif (list.find(s) != null)\n\t\t\tSystem.out.println(\"found the string :)\");\n\t\telse\n\t\t\tSystem.out.println(\"we did not find the string :(\");\n\t}", "static public String [] parseList (String listString, String startToken, String endToken,\n String delimiter)\n{\n String s = listString.trim ();\n if (s.startsWith (startToken) && s.endsWith (endToken)) {\n s = s.substring (1, s.length()-1); \n return s.split (delimiter);\n }\n else {\n String [] unparseableResult = new String [1];\n unparseableResult [0] = listString;\n return unparseableResult;\n }\n \n /*********************\n StringTokenizer strtok = new StringTokenizer (deparenthesizedString, delimiter);\n int count = strtok.countTokens ();\n for (int i=0; i < count; i++)\n list.add (strtok.nextToken ());\n }\n else\n list.add (listString);\n\n return (String []) list.toArray (new String [0]);\n **********************/\n\n\n}", "@Test\n public void testWithEmptyList() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(new ArrayList<String>());\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "@Test\n public void testGetPropertyAsList() {\n System.out.println(\"getPropertyAsList\");\n Properties props = new Properties();\n String key = \"testProp\";\n props.setProperty(key, \"alpha, beta, gamma\");\n List<String> expResult = Arrays.asList(\"alpha\", \"beta\", \"gamma\");\n List<String> result = EngineConfiguration.getPropertyAsList(props, key);\n assertEquals(expResult, result);\n }", "public static void main(String[] args) {\n\t\n\t\tCollection<String> list = new ArrayList<>();\n\t\tlist.add(\"a\");\n\t\tlist.add(\"a\");\n\t\tlist.add(\"b\");\n\t\tlist.add(\"b\");\n\t\tlist.add(\"c\");\n\t\tSystem.out.println(\"a:\"+listTest(list, \"a\"));\t\n\t\tSystem.out.println(\"b:\"+listTest(list, \"b\"));\t\n\t\tSystem.out.println(\"c:\"+listTest(list, \"c\"));\n\t\tSystem.out.println(\"xxx:\"+listTest(list, \"xxx\"));\n\t\t\n\n\t}", "public List<String> load();", "@Test\r\n\tvoid testCreateList() {\r\n\t\tSortedList list = new SortedList(\"New List\");\r\n\r\n\t\tif (!list.getListName().equals(\"New List\")) {\r\n\t\t\tfail(\"List name does not match input\");\r\n\t\t}\r\n\t\tif (list.getSize() != 0) {\r\n\t\t\tfail(\"List size incorrect\");\r\n\t\t}\r\n\t\tif (list.getHead() != null) {\r\n\t\t\tfail(\"Head was set incorrectly\");\r\n\t\t}\r\n\t}", "public void addRow(ArrayList<String> stringList) {\n }", "private static String list(Iterable iterable, String initialString, String delimiter) {\n Iterator iterator = iterable.iterator();\n if (!iterator.hasNext()) return \"\"; // empty?\n StringBuilder buffer = new StringBuilder(initialString + iterator.next().toString());\n while (iterator.hasNext()) buffer.append(delimiter).append(iterator.next().toString());\n return buffer.toString();\n }", "public void fixmetestPositiveStringArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n Object value;\n final String[] stringArray = {};\n final String[] stringArray1 = { \"abc\" };\n final String[] stringArray2 = { \"abc\", \"de,f\" };\n\n value = LocaleConvertUtils.convert(\"\", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\" \", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\"{}\", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\"{ }\", stringArray.getClass());\n checkStringArray(value, stringArray);\n\n value = LocaleConvertUtils.convert(\"abc\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{abc}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"\\\"abc\\\"\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{\\\"abc\\\"}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"'abc'\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{'abc'}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n\n value = LocaleConvertUtils.convert(\"abc 'de,f'\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{abc, 'de,f'}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"\\\"abc\\\",\\\"de,f\\\"\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{\\\"abc\\\" 'de,f'}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"'abc' 'de,f'\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{'abc', \\\"de,f\\\"}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n\n }", "public static void sortStringsLonger( ArrayList<String> lst )\n {\n PredicateStringPair p = (a, b) -> {\n if (a.length() > b.length()) return true;\n else return false;\n };\n sortStrings(lst, p);\n\n }", "private ArrayList<Double> fromStringToList(String str){\n ArrayList<Double> list = new ArrayList(0);\n int index = 0;\n for (int i = 0 ; i < str.toCharArray().length ; i++){\n if (str.toCharArray()[i] == '$'){\n String task = str.substring(index, i); //will tell when a task ends\n list.add(Double.parseDouble(task));\n index = i+1;\n }\n }\n return list;\n }", "public void testCheckString() {\n Util.checkString(\"test\", \"test\");\n }", "public void testCheckString() {\n Util.checkString(\"test\", \"test\");\n }", "@Test\r\n public void testImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.List\");\r\n try\r\n {\r\n typeParser.addImport(\"java.awt.List\");\r\n fail(\"Expected exception\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n // Expected\r\n }\r\n }" ]
[ "0.76368046", "0.6665588", "0.636456", "0.6214014", "0.61279255", "0.6105478", "0.60831136", "0.6071139", "0.6022357", "0.5996587", "0.597415", "0.5947384", "0.59438324", "0.58931565", "0.5875224", "0.5875119", "0.58543074", "0.5828484", "0.58237565", "0.58237565", "0.5815526", "0.5769408", "0.5763026", "0.5739186", "0.5712108", "0.56672794", "0.5657203", "0.5646325", "0.5636794", "0.5625141", "0.56032145", "0.55920213", "0.5578296", "0.5563205", "0.55560184", "0.553341", "0.55010885", "0.54926145", "0.5483284", "0.54410255", "0.5435322", "0.54299957", "0.5407692", "0.53860426", "0.53687465", "0.53574026", "0.53277326", "0.5325083", "0.5323562", "0.53211766", "0.53084785", "0.5307222", "0.5307156", "0.5289783", "0.52896655", "0.52785665", "0.5269742", "0.52546036", "0.5220834", "0.52165693", "0.5193529", "0.5166528", "0.5165206", "0.51627", "0.5142388", "0.5138561", "0.513815", "0.5135695", "0.5122595", "0.5122595", "0.512129", "0.5112728", "0.51104", "0.5105545", "0.51046026", "0.5075408", "0.50729686", "0.5061333", "0.5046294", "0.5037685", "0.5021584", "0.5010117", "0.5008757", "0.50050676", "0.49929804", "0.49875405", "0.4983382", "0.49807587", "0.4980293", "0.49658564", "0.4958831", "0.49515134", "0.49381584", "0.4925778", "0.49247643", "0.49189535", "0.4917056", "0.49160632", "0.49160632", "0.49154088" ]
0.84306973
0
Test whether getRandomRange works
@Test public void testGetRandomRange() { // XXX what should be tested? // bad values to the range? // min == max? Assert.assertTrue(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testRanges() throws Exception {\n int num = atLeast(1000);\n for (int i = 0; i < num; i++) {\n BytesRef lowerVal = new BytesRef(TestUtil.randomUnicodeString(random()));\n BytesRef upperVal = new BytesRef(TestUtil.randomUnicodeString(random()));\n if (upperVal.compareTo(lowerVal) < 0) {\n assertSame(upperVal, lowerVal, random().nextBoolean(), random().nextBoolean());\n } else {\n assertSame(lowerVal, upperVal, random().nextBoolean(), random().nextBoolean());\n }\n }\n }", "Boolean getRandomize();", "private int _getRandomFromRange(int min, int max) {\n\t \n return min + random_.nextInt(max - min + 1);\n }", "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "public static int customRandom(int range)\n {\n \tint random = (int)(Math.random()*10)%range;\n\t\n\treturn random;\n }", "private int randBetween(int start, int end) {\n\t\treturn start + (int)Math.round(Math.random() * (end - start));\n\t}", "private static int randomBetween(Random r, int min, int max) {\n return r.nextInt(max - min) + min;\n }", "private int randomRange(int min, int max) {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((max - min) + 1) + min;\n\t}", "Chromosome getRandom();", "private static int getRandomNumber(int min, int max) \n { //generates a random number within a range\n return (min + rand.nextInt((max - min) + 1));\n }", "private int getRandomNumberInRange(int min, int max) {\r\n\r\n\t\tRandom r = new Random();\r\n\t\treturn ((r.nextInt(max - min) + 1) + min)*40;\r\n\t}", "private int getRandomNumberInRange(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }", "private static int getRandomNumberInRange(int min, int max) {\n\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }", "public abstract boolean isRandom();", "int getRandom(int max);", "public static int intSample(int range) throws IllegalArgumentException {\n return random_.nextInt(range);\n }", "public int getRandomNumberInInterval() {\n\t\treturn getRandomNumberUsingNextInt(min, max);\n\t}", "@Test\n public void testGetRandomNumberInRange() {\n System.out.println(\"getRandomNumberInRange\");\n int expResult = 0;\n int result = Calculator.getRandomNumberInRange();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "static int getRandomDelta() {\n int d = rand.nextInt(100);\n if (d < 50) {\n return -1;\n } else {\n return 1;\n }\n }", "private int randomGen(int upperBound) {\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(upperBound);\n\t}", "private static int randomNumberBetween(final int start, final int end) {\n\t\treturn start + (int) Math.round(Math.random() * (end - start));\n\t}", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n Range range0 = Range.ofLength(360L);\n assertFalse(range0.isEmpty());\n }", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n Range range0 = Range.ofLength(581L);\n assertFalse(range0.isEmpty());\n }", "public int randBetween(int start, int end) {\n\t\treturn start + (int) Math.round(Math.random() * (end - start));\n\t}", "private int generateWholoeNumInRange( int min, int max ) {\r\n\r\n // Evaluate random number from min to max including min and max\r\n return (int)(Math.random()*(max - min + 1) + min);\r\n\r\n }", "public static int randBetween(int start, int end) {\n return start + (int)Math.round(Math.random() * (end - start));\n }", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "private static int generateRandom(int min, int max) {\n // max - min + 1 will create a number in the range of min and max, including max. If you don´t want to include it, just delete the +1.\n // adding min to it will finally create the number in the range between min and max\n return r.nextInt(max-min+1) + min;\n }", "public static boolean chance() {\r\n Random rand = new Random();\r\n int chance = rand.nextInt(10);\r\n return chance > 5;\r\n }", "private int randomInt(final int start, final int end) {\n return random.nextInt(end - start + 1) + start;\n }", "private int rand(int lower, int upper) {\n return lower + (int)(Math.random() * ((upper - lower) + 1));\n }", "public boolean getRandomBoolean()\r\n {\r\n return Math.random() < 0.5;\r\n }", "private int getRandomWithExclusion(int bound, List<Integer> exclude) {\n int random = Constants.RAND.nextInt(bound - exclude.size());\n for (int ex : exclude) {\n if (random < ex) break;\n random++;\n }\n return random;\n \n }", "abstract public RandomRange getPlunderRange(Unit attacker);", "public int originalgetRandomPositiveInt(int min, int max){\r\n int number = getRandomPositiveInt(); \r\n return (int)number%(max - min + 1)+min;\r\n }", "private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }", "@Test\n\tpublic void testGetRandom() {\n\t\ttestInitializePopulation();\n\t\tassertNotNull(\"no random chromosome\", population.getRandomChromosome());\n\t}", "protected int random(int min, int max) {\n\t\treturn this.rand.nextInt(max-min) + min;\n\t}", "public static int getRandom(int min, int max){\n\t int x = (int)(Math.random()*((max-min)+1))+min;\n\t return x;\n\t}", "Chromosome getRandomAmongFittest(int limit);", "public static double rangedRandom(double a){\n\t\treturn -a + Calc.random(a * 2);\n\t}", "public RangeRandom(final float min, final float max) {\n this.max = max;\n this.min = min;\n this.random = new Random(System.nanoTime());\n }", "protected static int randBetween(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max - (min + 1)) + min;\n\t}", "public int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n}", "public static boolean isPresent() {\n // random genrate\n //double ranValue = Math.floor(Math.random() * 10 ) % 3;\n //int ranValue = 0/1;\n return 1 == new Random().nextInt(1000)%2;\n }", "private static int randInt(final int min, final int max) {\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n return rand.nextInt((max - min) + 1) + min;\n }", "public int randomWithRange(){\n\r\n\t\tint[] diceRolls = new int[4];//roll four 6-sided dices\r\n\t\tint range;\r\n\t\tfor(int i = 0; i<diceRolls.length;i++) {\r\n\t\t\t//add each dice i rolled into an array\r\n\t\t\trange = 6;\r\n\t\t\tdiceRolls[i] = (int)(Math.random() * range) + 1;//assign a number btw 1-6\r\n\t\t}\r\n\t\tint smallest=diceRolls[0];\r\n\t\tfor(int i = 1; i<diceRolls.length; i++) {//will check for the smallest rolled dice\r\n\t\t\tif(diceRolls[i]<smallest) \r\n\t\t\t\tsmallest=diceRolls[i];\t\t\r\n\t\t}\r\n\t\tint sum=0;\r\n\t\tfor(int i = 0; i<diceRolls.length;i++) {//adds up all the sum\r\n\t\t\tsum = sum+diceRolls[i];\r\n\t\t}\r\n\t\treturn sum-smallest;//subtract by the smallest dice from the sum\r\n\t}", "public int getRandom(int bound) {\n return ThreadLocalRandom.current().nextInt(bound);\n }", "public int randomGQ() {\n\t\treturn(getRandomInteger(10,100));\n\t}", "T getRandomAllowedValue();", "private int rand(int lower, int higher) {\n\t\treturn lower + (int) ((higher - lower + 1) * Math.random());\n\t\t\n\t}", "@Test\n\tpublic void myRandomTest() throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\n\t\t\n\t\tstart();\n\t\tint n = gui.myRandom(1, 1);\n\t\tassertTrue(n == 1);\n\n\t\tn = gui.myRandom(2, 2);\n\t\tassertTrue(n == 2);\n\n\t\tn = gui.myRandom(0, 0);\n\t\tassertTrue(n == 0);\n\t\t\n\t\tn = gui.myRandom(4, 4);\n\t\tassertTrue(n == 4);\n\n\t\tn = gui.myRandom(1000, 1001);\n\t\tassertTrue(n == 1000 || n == 1001);\n\t\t\n\t\t}\n\t}", "private int getRandomInteger(int start, int end){\n\t\tif (start > end) {\n\t\t\tthrow new IllegalArgumentException(\"Start cannot exceed End.\");\n\t\t}\n\t\tRandom random = new Random();\n\t\tlong range = (long)end - (long)start + 1;\n\t\tlong fraction = (long)(range * random.nextDouble());\n\t\tint randomNumber = (int)(fraction + start); \n\t\treturn(randomNumber);\n\t}", "public boolean guessAgain(ArrayList<Range> ranges, ArrayList<Range> compRanges)\r\n\t{\r\n\t\tint minR = 12;\r\n\t\tint minRComp = 12;\r\n\r\n\t\tfor(int i = 0; i<ranges.size(); i++)\r\n\t\t{\r\n\t\t\tif(ranges.get(i).getStart() != -1 && ranges.get(i).getRange() <minR)\r\n\t\t\t{\r\n\t\t\t\tminR = ranges.get(i).getRange();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i <compRanges.size(); i++)\r\n\t\t{\r\n\t\t\tif(ranges.get(i).getStart() != -1 && ranges.get(i).getRange() <minR)\r\n\t\t\t{\r\n\t\t\t\tminR = ranges.get(i).getRange();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tif(minR == 0 || minR == 1)\r\n\t\t\treturn true;\r\n\t\t\r\n\t\tif(minRComp<2)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tif(minR == 2)\r\n\t\t{\t\r\n\t\t\tint ranNum = (int)(Math.random()*10);\r\n\t\t\tif(ranNum<6)\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\tif(minR == 3)\r\n\t\t{\r\n\t\t\tint ranNum = (int)(Math.random()*10);\r\n\t\t\tif(ranNum<4)\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\tif(minR == 4)\r\n\t\t{\r\n\t\t\tint ranNum = (int)(Math.random()*10);\r\n\t\t\tif(ranNum<3)\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Range range0 = Range.of((-2147483660L));\n assertFalse(range0.isEmpty());\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public abstract int getRandomDamage();", "public static int getRandomNumber(int min, int max){\r\n Random r = new Random();\r\n return r.nextInt((max - min) +1) + min;\r\n }", "private int randomIntRange(int min, int max) {\r\n Random random = new Random();\r\n if (min < 0 || max < 0) {\r\n return (random.nextInt(Math.abs(max - min)) + Math.abs(min) + 1) * -1;\r\n }\r\n return random.nextInt(max - min) + min + 1;\r\n }", "private int random(int from, int to) {\n return from + (int) (Math.random() * (to - from + 1));\n }", "public int compete() {\r\n\t\tint max = 20;\r\n\t\tint min = 10;\r\n\t\tRandom Rand = new Random();\r\n\t\tint ranNum = Rand.nextInt(max - min) + min;\r\n\t\treturn ranNum;\r\n\t}", "int randomIntInRange(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max + 1 - min) + min;\n\t}", "int RandomGenerator0To29 (){\n\t\t int randomInt2 = 0;\n\t\t Random randomGenerator2 = new Random();\n\t\t for (int idx2 = 1; idx2 <= 10; ++idx2) {\n\t\t\t randomInt2 = randomGenerator2.nextInt(30);\n\t\t }\n\t\t return randomInt2;\n\t }", "@Test\n public void testRandomSeries() {\n\tlong overallStart = System.currentTimeMillis();\n for (long a = Short.MIN_VALUE ; a <= Short.MAX_VALUE; a+= random.nextInt(300) + 113) {\n for (long b = Short.MAX_VALUE; b >= Short.MIN_VALUE; b-= random.nextInt(300) + 113) {\n\t\tlong start = System.currentTimeMillis();\n\t\tint ua = (int)(a + Short.MAX_VALUE + 1),\n\t\t\tub = (int)(b + Short.MAX_VALUE + 1);\n verify(ua, ub, false);\n verify(a, b, true);\n\t\tlong end = System.currentTimeMillis();\n\t\tSystem.out.println(\"a \" + a + \"b \" + b + \": \" + (end - start) + \"ms\");\n }\n }\n\tlong overallEnd = System.currentTimeMillis();\n\tSystem.out.println(\"Test Duration: \" + ((overallEnd - overallStart) / 1000) + \"s\");\n }", "@Test\n public void genRandom() {\n runAndWait(() -> genRandom(10_000, 500, 1), 32, 2000);\n runAndWait(() -> genRandom(10_000, 500, 100), 32, 2000);\n runAndWait(() -> genRandom(250_000, 4000, 50), 4, 5_000);\n }", "private static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "public int randomInRange(int low, int high)\n {\n return ((int) (Math.random() * (high - low + 1)) + low);\n }", "public static int getRandom() \n\t{\n\t\treturn rGenerator.nextInt();\n\t}", "public int nextInt(int range) {\n int i = Math.abs(rand.nextInt());\n return (i % (range));\n }", "private int randomNumber(int high, int low){\n \t\t Random r = new Random();\n \t\t return (r.nextInt(high-low) + low);\n \t }", "public int randomValueFromClosedInterval(int min, int max, MersenneTwisterFast random)\n {\n if (max - min < 0) // we had an overflow\n {\n int l = 0;\n do l = random.nextInt();\n while(l < min || l > max);\n return l;\n }\n else return min + random.nextInt(max - min + 1);\n }", "private int randomAge() {\n \tint low = 18;\n \tint high = 100;\n \tint offset = high - low;\n \tRandom r = new Random();\n \treturn r.nextInt(offset) + low;\n \t\n }", "int getRandom(int limit){\n Random rand = new Random();\n int upperBound = limit;\n return rand.nextInt(upperBound) + 1;\n }", "public double getRandom() {\n return 20*Math.random() - 10;\n }", "private static double randomGenerator(double min, double max) {\n return (double)java.lang.Math.random() * (max - min +1) + min;\n }", "public int getRandomNumber(int bound1, int bound2) {\n int min = Math.min(bound1, bound2);\n int max = Math.max(bound1, bound2);\n //math.random gives random number from 0 to 1\n return (int) (min + (Math.random() * (max - min)));\n }", "public int getNextIntRange(int[] range) {\n\t\tint low = Math.min(range[0], range[1]);\r\n\t\tint high = Math.max(range[0], range[1]);\r\n\t\tint val = (int)((high - low)*this.rand.nextDouble() + (double)low);\r\n\t\treturn val;\r\n\t}", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "private static int random(int min, int max) {\r\n\t\tRandom rand = java.util.concurrent.ThreadLocalRandom.current();\r\n\t\treturn min + (int) (rand.nextDouble()*(max-min));\r\n\t}", "@Test\n\tpublic void testRandInt() {\n\t\tGameState test = new GameState();\n\t\tassertTrue(test.randInt() < 25);\n\t}", "public int getRandomArbitrary(int min, int max) {\n\t\treturn (int) (Math.random() * (max - min) + min);\n\t}", "Randomizer getRandomizer();", "@Override\n public int[] next() {\n min = rand.nextInt(100);\n max = rand.nextInt(100);\n Thread.yield();\n if (min > max) max = min;\n int[] ia = {min, max};\n return ia;\n }", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "private int randomX(int minRandX, int maxRandX) {\n\t\tint randX = MinRandX + (int)(Math.random() * ((MaxRandX - MinRandX) + 1));\n\t\treturn randX;\n\t}", "private Integer randomBilirrubina(){\n\t\t\tint Min = 0, Max = 14;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "public static int randomRangeBound(int minDigits, int maxDigits) {\r\n int digitBoundDiff = maxDigits - minDigits + 1;\r\n int i = rn.nextInt() % digitBoundDiff;\r\n if (i < 0) {\r\n i = -i;\r\n }\r\n return minDigits + i;\r\n }", "public static int randomNext() { return 0; }", "private double getRandomDouble(double min, double max)\r\n\t{\r\n\t\tdouble randNum = Math.random() * (max - min) + min;\r\n\t\treturn randNum;\r\n\t}", "public static int generateRandom(int left,int right)\n\t{\n\t\tRandom random = new Random();\n\t\tint gap = right -left + 1;\n\t\treturn random.nextInt(Integer.MAX_VALUE)%gap + left;\n\t}", "public static int getRandomBalance(){\n return rand.nextInt(1000000);\n }", "public static int getRandomInt(int start, int end) {\n\t\tint randomInt = start + (int)((end - start) * Math.random());\n\t\treturn randomInt;\n\t}", "public static void main(String[] args) {\n\t\tint MAX = 20;\r\n\t\tint MIN = 1;\r\n\t\tScanner number = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Guess a number between 1 and 20 \");\r\n\t\tint input = number.nextInt();\r\n\t\tint random = MIN + (int)(Math.random() * MAX);\r\n\t\tif(input == random)\r\n\t\tSystem.out.println(\"You were correct! The number was :\" + random);\r\n\t\t\r\n\t\telse\r\n\t\t\tSystem.out.println(\"You were incorrect! The number was :\" + random);\r\n\t\t\r\n\t\tif(input >= 21 )\r\n\t\t\tSystem.out.println(\"The range is 1 to 20. Please try again.\");\r\n\t}", "public static int randomNumber100(){\r\n int max = 100;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "private void random() {\n\n\t}", "public static int getRandomNumberInRange(int min, int max) {\n\n if (min > max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }", "public static TradeGood getRandom() {\n TradeGood[] options = new TradeGood[] {WATER, FURS, ORE, FOOD, GAMES, FIREARMS,\n MEDICINE, NARCOTICS, ROBOTS, MACHINES};\n int index = GameState.getState().rng.nextInt(10);\n return options[index];\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n Range range0 = Range.ofLength(127L);\n Object object0 = new Object();\n boolean boolean0 = range0.equals(object0);\n assertFalse(boolean0);\n assertFalse(range0.isEmpty());\n }" ]
[ "0.7323436", "0.7289777", "0.7287665", "0.7050892", "0.6903199", "0.6787398", "0.6683002", "0.6673291", "0.6608344", "0.65442127", "0.65304554", "0.65099174", "0.6445657", "0.64445066", "0.64372426", "0.6427381", "0.63524437", "0.6352018", "0.6316524", "0.63148236", "0.62605834", "0.6246556", "0.62419903", "0.6234118", "0.61835647", "0.61644864", "0.6164154", "0.61510515", "0.6150124", "0.6147161", "0.612587", "0.6124883", "0.6109097", "0.6078118", "0.6068303", "0.60659194", "0.60647535", "0.60615176", "0.60589856", "0.60518485", "0.60423344", "0.6036613", "0.60300267", "0.6027707", "0.60272986", "0.60252684", "0.6023962", "0.6017733", "0.6006321", "0.60039616", "0.59869546", "0.59715325", "0.5963158", "0.59626013", "0.5958179", "0.5940348", "0.59231734", "0.59230304", "0.5918331", "0.5913336", "0.59090567", "0.5897378", "0.588293", "0.58772874", "0.58744305", "0.5867354", "0.58617496", "0.5859017", "0.5858743", "0.5858593", "0.585824", "0.58470964", "0.5845258", "0.584458", "0.5833474", "0.58281934", "0.58257353", "0.58197206", "0.5812955", "0.58123225", "0.5810734", "0.580974", "0.58078766", "0.58069956", "0.5805346", "0.5805337", "0.58049184", "0.58032364", "0.58012384", "0.5791749", "0.5789882", "0.57872486", "0.5783515", "0.5778695", "0.5777798", "0.57714844", "0.57703704", "0.5761656", "0.5746729", "0.57462347" ]
0.7932768
0
Test whether listToString works
@Test public void testListToString() { // test whether empty list converts to some string logger.trace("Empty list handled?"); String string = ""; List<String> list = Util.stringToList(string); String string2 = Util.listToString(list); Assert.assertTrue(string2.length() > 0); // test whether single element list converts to the first element logger.trace("Single element list handled?"); string = "foo"; list = Util.stringToList(string); string2 = Util.listToString(list); Assert.assertTrue(string2.equals(string)); // test whether two element list converts to some string logger.trace("Two element list handled?"); string = "foo bar"; list = Util.stringToList(string); string2 = Util.listToString(list); final int twoElementLength = string2.length(); Assert.assertTrue(twoElementLength > 0); // test whether three element list converts to a string longer than the two element list logger.trace("Three element list handled?"); string = "foo bar baz"; list = Util.stringToList(string); string2 = Util.listToString(list); final int threeElementLength = string2.length(); Assert.assertTrue(threeElementLength > twoElementLength); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testToString() {\r\n assertEquals(\"[]\",\r\n list.toString());\r\n list.add(\"A\");\r\n assertEquals(\"[A]\",\r\n list.toString());\r\n list.add(\"B\");\r\n assertEquals(\"[A, B]\",\r\n list.toString());\r\n }", "@Test\n\tpublic void NotExamtestListToString() {\n\t\t\n\t\tassertEquals(\"[a,b,c]\",listToString(list));\n\t\tassertEquals(\"[a,b,c,aaa,a,a,d,a]\",listToString(list2));\n\t\tassertEquals(\"[]\",listToString(empty));\n\t\tassertEquals(\"[hello]\",listToString(onlyOne));\n\n\t}", "@Test\r\n\tvoid testToString() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"\", output);\r\n\t}", "@Test\r\n\tvoid testToString2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(2);\r\n\t\tString output = test.toString();\r\n\t\tassertNotEquals(\"2 \", output);\r\n\t}", "@Test\n void listAsString() {\n }", "@Test\n void listAsString() {\n }", "public static void checkToString() {\r\n\t\tSystem.out.println(\"Beginning toString test (should be [-1, 2, 5, 17] and [3, 6, 8, 42])\");\r\n\t\tSortedIntList list = new SortedIntList(5);\r\n\t\tlist.add(5);\r\n\t\tlist.add(-1);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" \" + list.toString());\r\n\t\t\r\n\t\tSortedIntList list2 = new SortedIntList(true);\r\n\t\tlist2.add(6);\r\n\t\tlist2.add(3);\r\n\t\tlist2.add(6);\r\n\t\tlist2.add(42);\r\n\t\tlist2.add(8);\r\n\t\tSystem.out.println(\" \" + list2.toString());\r\n\t\tSystem.out.println();\r\n\t}", "private void testToString() {\n init();\n assertTrue(\"l0.toString()\", l0.toString().equals(\"[]\"));\n assertTrue(\"l1.toString()\", l1.toString().equals(\"[5]\"));\n assertTrue(\"l2.toString()\", l2.toString().equals(\"[4, 5]\"));\n }", "public void testDumpList() {\n \n String result = tester.dumpList(box); \n \n assertTrue(\"Wrong start\", result.startsWith(\"[item 0, item 1, item 2, item 3, item 4, item 5, \"));\n assertTrue(\"Wrong end\", result.endsWith(\", item 96, item 97, item 98, item 99]\"));\n }", "@Test\n public void testWriteList() {\n System.out.println(\"writeList\");\n /** Positive testing. */\n // List of long values\n List<Long> list = new LinkedList(Arrays.asList(0L, 1L, 2L, 3L));\n String expResult = \"li0ei1ei2ei3ee\";\n String result = Bencoder.writeList(list);\n assertEquals(expResult, result);\n // List of string values\n List<String> strs = new LinkedList<String>(Arrays.asList(\"spam\", \"moo\", \"test\"));\n expResult = \"l4:spam3:moo4:teste\";\n result = Bencoder.writeList(strs);\n assertEquals(expResult, result);\n // Empty list\n list = Collections.emptyList();\n expResult = \"le\";\n result = Bencoder.writeList(list);\n assertEquals(expResult, result);\n // Combine list\n List<Object> objs = new LinkedList();\n objs.add(42L);\n objs.add(\"spam\");\n expResult = \"li42e4:spame\";\n result = Bencoder.writeList(objs);\n assertEquals(expResult, result);\n }", "public static String listToString(List list)\r\n {\r\n return (list == null) ? null : list.toString();\r\n }", "ListString createListString();", "@Test\n public void testStringToList() {\n // test whether empty string converts to empty list\n logger.trace(\"Empty string handled?\");\n String string = \"\";\n List<String> list = Util.stringToList(string);\n Assert.assertEquals(list.size(), 0);\n\n // test whether single space converts to empty list\n logger.trace(\"Single space handled?\");\n string = \" \";\n list = Util.stringToList(string);\n Assert.assertEquals(list.size(), 0);\n\n // test whether single item surrounded by spaces converts to list of size 1\n logger.trace(\"Item surrounded by spaces handled?\");\n string = \" foo \";\n list = Util.stringToList(string);\n Assert.assertEquals(list.size(), 1);\n\n // test whether two item string converts to list of size 2\n logger.trace(\"Two item string handled?\");\n string = \" foo bar \";\n list = Util.stringToList(string);\n Assert.assertEquals(list.size(), 2);\n }", "@Test\r\n\tvoid testAppend() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.append(7);\r\n\t\ttest.append(10);\r\n\t\ttest.append(9);\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"7 10 9\", output);\r\n\t}", "@Test\r\n\tvoid testAppend2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.append(1);\r\n\t\ttest.append(2);\r\n\t\ttest.append(3);\r\n\t\ttest.append(4);\r\n\t\ttest.append(5);\r\n\t\ttest.append(6);\r\n\t\ttest.append(7);\r\n\t\ttest.append(8);\r\n\t\ttest.append(9);\r\n\t\ttest.append(10);\r\n\t\ttest.append(11);\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"1 2 3 4 5 6 7 8 9 10 11\", output);\r\n\t}", "private String listToString(StringLinkedList list) {\n\t\t\n\t\tString first = list.removeLast();\n\t\tif(first == null) return \"[]\";\n\t\tString output = first + \"]\";\n\t\twhile(true) {\n\t\t\tString current = list.removeLast();\n\t\t\tif(current == null) {\n\t\t\t\treturn \"[\" + output;\n\t\t\t} else {\n\t\t\t\toutput = current + \",\" + output;\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n\tvoid testAdd2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(1);\r\n\t\ttest.add(2);\r\n\t\ttest.add(3);\r\n\t\ttest.add(4);\r\n\t\ttest.add(5);\r\n\t\ttest.add(6);\r\n\t\ttest.add(7);\r\n\t\ttest.add(8);\r\n\t\ttest.add(9);\r\n\t\ttest.add(10);\r\n\t\ttest.add(11);\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"11 10 9 8 7 6 5 4 3 2 1\", output);\r\n\t}", "public abstract ArrayList<String[]> toStrings();", "@Test\r\n\tvoid testAdd() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"9 10 7\", output);\r\n\t}", "@Given(\"^a list that is \\\"([^\\\"]*)\\\"$\")\n\tpublic void a_list_that_is(String list) throws Throwable {\n\t\tlistAsString = new String(list); \n\t \n\t}", "public void testToString() {\n assertEquals(this.empty.toString(), \"[]\");\n assertEquals(this.stack.toString(), \"[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\");\n }", "public String listToString(List<Protein> proteins) throws Throwable{\n\n\t\t/* ---------- Make a string to hold the list -------------*/\n\t\t\n\t\tString proteinString = \"\";\n\t\t\n\t\t/* ****************************************************** */\n\t\t\n\t\ttry{\n\n\t\t\t/* ---------- For each protein, add the id and sequence to the string -------------*/\n\t\t\t\n\t\t\tfor(Protein p: proteins){\n\t\t\t\t\n\t\t\t\tproteinString += p.getProteinId() + \".\" + p.getProteinSequence() + \".\";\n\n\t\t\t}\n\t\t\t\n\t\t\t/* ******************************************************************************* */\n\t\t\t\n\t\t}catch(Throwable t){\n\n\t\t\t/* --------- If anything goes wrong, set the passfail param to FAIL -------------*/\n\t\t\t\n\t\t\tlog.error(\"Failed to build string.\", t);\n\t\t\tMain.passfail = Main.FAIL;\n\t\t\t\n\t\t\t/* ***************************************************************************** */\n\t\t}\n\t\tif(log.isDebugEnabled()){ log.debug(\"String has been built.\"); }\n\t\t\n\t\t/* ---------- Finally return the string -------------*/\n\t\t\n\t\treturn proteinString;\n\t\t\n\t\t/* ************************************************* */\n\t}", "@Test\n public void testListOfStrings() {\n JsonableTestClassWithList jtc = Jsonable.loadFromFile(\"testFiles/listTest.json\", JsonableTestClassWithList.class);\n assertEquals(4, jtc.stringArray.size());\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"\\\"abc\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"def\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"123\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"456\\\"\"));\n }", "public static String list2str(List<? extends Object> l) {\n String rtn = \"{\";\n for (Object o : l) {\n rtn = rtn + o.toString() + \", \";\n }\n rtn = rtn + \"}\";\n return rtn;\n }", "public static String toJSONContainingAnything(List<Object> list) {\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"[\");\n for (Iterator<Object> it = list.iterator(); it.hasNext();) {\n sb.append(\"\\n\");\n Object value = it.next();\n\n appendObject(sb, value);\n if (it.hasNext()) {\n sb.append(\",\\n\");\n }\n }\n sb.append(\"]\\n\");\n return sb.toString();\n }", "@Override\n public String toString() {\n return list.toString().replace(\"[\",\"\").replace(\"]\",\"\");\n }", "@Override\n public String toString() {\n return list.toString();\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(10);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n String expResult = \"ArrayListRecursive{list1=[12], list2=[10]}\";\n String result = instance.toString();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}", "@Test\n public void testListOfJsonables() {\n JsonableTestClassWithList jtc = Jsonable.loadFromFile(\"testFiles/listTest.json\", JsonableTestClassWithList.class);\n assertEquals(3, jtc.JsonableList.size());\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"{\\\"detail\\\":\\\"Detail Name\\\",\\\"data\\\":\\\"Value Name\\\"}\"));\n assertThat(jsonString, Matchers.containsString(\"{\\\"detail\\\":\\\"\\\",\\\"data\\\":\\\"Value Name\\\"}\"));\n assertThat(jsonString, Matchers.containsString(\"{\\\"detail\\\":\\\"Detail Name\\\",\\\"data\\\":\\\"\\\"}\"));\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n List<Exposicao> listaExposicoes = new ArrayList<>();\n listaExposicoes.add(new Exposicao());\n RegistoExposicoes instance = new RegistoExposicoes(listaExposicoes);\n StringBuilder expResult = new StringBuilder();\n expResult.append(\"RegistoExposicoes{\");\n for (Exposicao exposicao : instance.getListaExposicoes()) {\n expResult.append(String.format(\"%s%n\", exposicao));\n }\n expResult.append(\"}\");\n String result = instance.toString();\n assertEquals(expResult.toString(), result);\n }", "String unitsListToString(List<Unit> units);", "protected static boolean writeListType(Output out, Object listType) {\n log.trace(\"writeListType\");\n if (listType instanceof List<?>) {\n writeList(out, (List<?>) listType);\n } else {\n return false;\n }\n return true;\n }", "public String toString() {\n\t\treturn list.toString();\n\t}", "@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n builder.append('[');\n for (Object item : list)\n {\n builder.append(item.toString());\n builder.append(\", \");\n }\n builder.append(']');\n return builder.toString();\n }", "public void printFormatedList()\r\n{\r\n System.out.println(\"[\");\r\n for(int i = 0; i < JustifiedList.size(); i++)\r\n {\r\n System.out.println(\"\\\"\" + JustifiedList.get(i) + \"\\\"\");\r\n }\r\n System.out.println(\"]\");\r\n}", "public /*@ non_null @*/ String toString() {\n String ret = \"[\";\n JMLListEqualsNode<E> thisLst = this;\n boolean firstTime = true;\n while (thisLst != null) {\n if (!firstTime) {\n ret += \", \";\n } else {\n firstTime = false;\n }\n if (thisLst.val == null) {\n ret += \"null\";\n } else {\n ret += thisLst.val.toString();\n }\n thisLst = thisLst.next;\n }\n ret += \"]\";\n return ret;\n }", "protected static void writeList(Output out, List<?> list) {\n if (!list.isEmpty()) {\n int size = list.size();\n // if its a small list, write it as an array\n if (size < 100) {\n out.writeArray(list);\n return;\n }\n // else we should check for lots of null values,\n // if there are over 80% then its probably best to do it as a map\n int nullCount = 0;\n for (int i = 0; i < size; i++) {\n if (list.get(i) == null) {\n nullCount++;\n }\n }\n if (nullCount > (size * 0.8)) {\n out.writeMap(list);\n } else {\n out.writeArray(list);\n }\n } else {\n out.writeArray(new Object[] {});\n }\n }", "public static <T>\n String toString(DoubleLinked<T> list) {\n String result = \"[\";\n String nextString;\n for(Iterator<T> it = list.iterator(); it.hasNext();) {\n result += it.next().toString();\n String append = it.hasNext() ? \", \" : \"]\";\n result += append;\n }\n return result;\n }", "public String outputString(List list) {\r\n StringWriter out = new StringWriter();\r\n try {\r\n output(list, out); // output() flushes\r\n } catch (IOException e) { }\r\n return out.toString();\r\n }", "public static String convertArrayListIntoString (ArrayList inputList){\n\n // convert exercisesList to string\n String resultString = \"(\";\n for (int i = 0; i < inputList.size(); i ++) {\n if (i != inputList.size() - 1) {\n resultString = resultString + inputList.get(i) + \", \";\n } else {\n resultString = resultString + inputList.get(i) + \")\";\n }\n }\n\n return resultString;\n }", "private static void writeJSONString(Iterable<?> list, Appendable out) throws IOException {\n @Var boolean first = true;\n\n out.append('[');\n for (Object value : list) {\n if (first) {\n first = false;\n } else {\n out.append(',');\n }\n\n JSON.writeJSONString(value, out);\n }\n out.append(']');\n }", "public String SerializeColToString(ArrayList<String> list){ \n if(!list.isEmpty()){\n return String.join(\", \", list); \n }\n return null; \n }", "public boolean isList();", "public boolean isList();", "StringList createStringList();", "@Test\r\n public void testToString() {\r\n // TODO \r\n assertTrue(true); \r\n }", "public String listToString(List<String> list) {\n return TextUtils.join(\", \", list);\n }", "@Test\n void testToString() {\n // Create a new item object with the following parameters:\n // Description: \"Test Description\", Due Date: \"2022-05-30\", isComplete: \"Complete\"\n Item actualResult = new Item(\"Test Description\", \"2022-05-30\", \"Complete\");\n // Then assertEquals to see if the actual string equals \"Test Description,2022-05-30,Complete\"\n assertEquals(\"Test Description,2022-05-30,Complete\", actualResult.toString());\n }", "@Test\n\tpublic void createListWithArraysUtil() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\tList<String> copy = Arrays.asList(\"AAPL\", \"MSFT\");\n\n\t\tassertTrue(list.equals(copy));\n\t}", "private String listToString(CommonList fs) throws SAXException {\n if (fs == null) {\n return null; // different from \"\"\n }\n final StringBuilder sb = new StringBuilder();\n fs.anyListToOutput(cds.sharedData, cds, s -> {\n if (sb.length() > 0) {\n sb.append(' ').append(s);\n } else {\n sb.append(s);\n }\n });\n return sb.toString();\n }", "static void printStrList(MyList<String> list) {\n\t\t\n\t\t// PRUEBA IMPLICITA DE iterator() (aunque tambien se prueba en remove() )\n\t\tListIterator<String> iter = list.iterator();\n\t\t\n\t\twhile (iter.hasNext()) {\n\t\t\tSystem.out.print(iter.next() + \", \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Test\n public void testToString() {\n Pair instance = Pair.of(\"left\", \"right\");\n String result = instance.toString();\n assertTrue(result.contains(\"left\"));\n assertTrue(result.contains(\"right\"));\n assertTrue(result.contains(\"Pair\"));\n }", "String getStringList();", "@Test\n\tpublic void list_test_01() {\n\t\tString text = \"1. list\";\n\t\tassertEquals(\"<html><ol><li>list</li></ol></html>\", createHTML(text));\n\t}", "@Override\n\tpublic String toString() {\n\t\tString string = \"\";\n\t\tfor (int i = list.size() - 1; i >= 0; i--) {\n\t\t\tstring += list.get(i) + \" \";\n\t\t}\n\t\treturn string;\n\t}", "@Test public void testPrintList() throws Exception {\n YeyLinkedList classUnderTest = new YeyLinkedList();\n\n // Populate list\n classUnderTest.store(\"Flamingo\");\n classUnderTest.store(\"Swallow\");\n\n // Direct System.out outputs to PrintStream\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n System.setOut(new PrintStream(bo));\n\n // Call function under test\n classUnderTest.printList();\n\n // Flush content off ByteArrayOutputStream\n bo.flush();\n\n // Extract content from ByteArrayOutputStream\n String outputLines = new String(bo.toByteArray());\n\n // Start asserting\n assertTrue(outputLines.contains(\"Flamingo\"));\n assertTrue(outputLines.contains(\"Swallow\"));\n }", "void mo54419a(List<String> list);", "public boolean equal(StringList list2) {\n\t\tIterator it1 = stringList.listIterator();\n\t\tIterator it2 = list2.iterator();\n\t\tif(list2.len() != stringList.size()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\twhile( (it1.hasNext()) ) {\n\t\t\tSystem.out.format(\"Comparing %s%n\", it1.next());\n\t\t\tif( it1.next() != it2.next()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private String convertListToCommaDelimitedString(List<String> list) {\n\n\t\tString result = \"\";\n\t\tif (list != null) {\n\t\t\tresult = StringUtils.arrayToCommaDelimitedString(list.toArray());\n\t\t}\n\t\treturn result;\n\n\t}", "public static String TNodeListToString(List<TNode> l) {\n Iterator<TNode> i = l.iterator();\n if (!i.hasNext())\n // Empty list\n return \"[]\";\n\n StringBuilder result = new StringBuilder();\n\n result.append(\"[\");\n\n while (true) {\n TNode e = i.next();\n result.append(TNodeToString(e));\n if (!i.hasNext())\n return result.append(']').toString();\n\n result.append(\", \");\n }\n }", "@Test\n\tpublic void testToString() {\n\t\tGraph<String> graph = emptyInstance();\n \tgraph.add(\"a\");\n \tgraph.add(\"b\");\n \tgraph.add(\"c\");\n \tgraph.add(\"d\");\n \tgraph.add(\"e\");\n \tassertEquals(\"Vertices: [a, b, c, d, e]\\n\" + \n \t\t\t\"Edges: []\", graph.toString());\n\t}", "public List<T> dumpOut();", "@Test\n public void testListOfListsOfJsonables() {\n JsonableTestClassWithList jtc = Jsonable.loadFromFile(\"testFiles/listTest.json\", JsonableTestClassWithList.class);\n assertEquals(3, jtc.JsonableGrid.size());\n String[] numberStrings = new String[] {\"one\", \"two\", \"three\"};\n for(int i = 0; i < 3; i++) {\n for(int j = 0; j < 3; j++) {\n assertEquals(numberStrings[i], jtc.JsonableGrid.get(i).get(j).data);\n assertEquals(numberStrings[j], jtc.JsonableGrid.get(i).get(j).detail);\n }\n }\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"\\\"JsonableGrid\\\":[[{\\\"detail\\\":\\\"one\\\",\\\"data\\\":\\\"one\\\"},{\\\"detail\\\":\\\"two\\\",\\\"data\\\":\\\"one\\\"},{\\\"detail\\\":\\\"three\\\",\\\"data\\\":\\\"one\\\"}],[{\\\"detail\\\":\\\"one\\\",\\\"data\\\":\\\"two\\\"},{\\\"detail\\\":\\\"two\\\",\\\"data\\\":\\\"two\\\"},{\\\"detail\\\":\\\"three\\\",\\\"data\\\":\\\"two\\\"}],[{\\\"detail\\\":\\\"one\\\",\\\"data\\\":\\\"three\\\"},{\\\"detail\\\":\\\"two\\\",\\\"data\\\":\\\"three\\\"},{\\\"detail\\\":\\\"three\\\",\\\"data\\\":\\\"three\\\"}]]\"));\n }", "public static String serializeListString(List<String> s) {\r\n System.out.println(\"EncodeJSON - method serializeListString\" + s);\r\n return gson.toJson(s);\r\n }", "public String toString()\n {\n String s = \"\";\n for (int i=0; i<list.length; i++)\n s += i + \":\\t\" + list[i] + \"\\n\";\n return s;\n }", "private String[] toStringArray(ArrayList<String> list) {\n String[] tempStrings = new String[list.size()];\n tempStrings = list.toArray(tempStrings);\n\n return tempStrings;\n }", "public static <T> String arrayToString(T[] list) {\n\t\treturn arrayToString(list, o->o.toString());\n\t}", "@Test\n\tpublic void test_toString() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertEquals(\"[Sherlock,BBC]\",t1.toString());\n }", "public String toString() {\n\t\tif (list.size() < 1)\n\t\t\treturn \"There is no element in the Set.\";\n\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (Object item : list) {\n\t\t\tif (sb.length() > 0)\n\t\t\t\tsb.append(\", \").append(\"[\").append(item.toString()).append(\"]\");\n\t\t\telse\n\t\t\t\tsb.append(\"[\").append(item.toString()).append(\"]\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "@Override\r\n public String toString() {\r\n String output = \"[ \";\r\n for (int i = 0; i < count; i++) {\r\n output += list[i] + \", \";\r\n }\r\n if (count > 0) {\r\n output = output.substring(0, output.length() - 2);\r\n } else {\r\n output = output.substring(0, output.length() - 1);\r\n }\r\n output += \" ]\";\r\n return output;\r\n }", "public static String arrayListToString(ArrayList<Integer> arraylist) {\n\t\tString ss = null;\n\t\tbyte [] bb = new byte[arraylist.size()];\n\t\tfor (int i = 0; i < arraylist.size(); i++) {\n\t\t\tbb[i] = (byte) (arraylist.get(i) & 0xff);\n\t\t}\n\t\tss = byteArrayToHexString(bb);\n\t\treturn ss;\n\t}", "public static <T> String listWrapperToStringXML(ListWrapper<T> list) throws JAXBException, IOException {\n try (StringWriter stringWriter = new StringWriter()) {\n if (list != null && CollectionUtils.isNotEmpty(list.getList())) {\n JAXBContext context = JAXBContext.newInstance(list.getClass(), Document.class);\n Marshaller marshaller = context.createMarshaller();\n marshaller.marshal(list, stringWriter);\n\n return stringWriter.toString();\n }\n }\n return null;\n }", "@Test\n void completeItemsAsString() {\n }", "private String securityListToString(List<String> securityList) {\n return securityList.stream().collect(Collectors.joining(SECURITY_SEPARATOR));\n }", "public static String listToJson(List<String> list) {\n Gson gson = new Gson();\n String json = gson.toJson(list);\n return json;\n }", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Test(expected = IllegalArgumentException.class)\n public void testWriteListUnsupportedType() {\n System.out.println(\"writeListUnsupportedType\");\n /** Negative testing. */\n List<Date> dates = new LinkedList(Arrays.asList(new Date(), new Date()));\n Bencoder.writeList(dates);\n }", "private static void displayList(ArrayList list) {\n System.out.println(\"The list contains \" + list.getCurrentSize()\n + \" string(s), as follows:\");\n Object[] listArray = list.toArray();\n for (int index = 0; index < listArray.length; index++) {\n System.out.print(listArray[index] + \" \");\n } // end for\n System.out.println();\n }", "@Test\r\n\tpublic void toStringEmptyArrays() {\r\n\t\ttestObj.toString();\r\n\t\tassertEquals(\"Output string should have no data\", \"Table: 1\\r\\n{\\r\\nTableName: test\\r\\nNativeFields: \\r\\nRelatedTables: \\r\\nRelatedFields: \\r\\n}\\r\\n\", testObj.toString());\r\n\t}", "@Test\r\n\tpublic void toStringValid() {\r\n\t\ttestObj.addNativeField(0);\r\n\t\ttestObj.addNativeField(1);\r\n\t\ttestObj.addRelatedTable(0);\r\n\t\ttestObj.addRelatedTable(1);\r\n\t\ttestObj.makeArrays();\r\n\t\ttestObj.toString();\r\n\t\tassertEquals(\"Output string should have valid data\", \"Table: 1\\r\\n{\\r\\nTableName: test\\r\\nNativeFields: 0|1\\r\\nRelatedTables: 0|1\\r\\nRelatedFields: 0|0\\r\\n}\\r\\n\", testObj.toString());\r\n\t}", "public String toString() {\n/* 46 */ return ModelUtil.toCommaSeparatedList((Object[])getValue());\n/* */ }", "@Test\r\n\tpublic void testGetLstFromDB(){\r\n\t\tList<IP> lst = new ArrayList<IP>();\r\n\t\tlst = ipService.getIPLstFromDB();\r\n\t\tSystem.out.println(\"test method testGetLstFromDB==>ip list:\"+JSON.toJSONString(lst));\r\n\t}", "@Test\n\tpublic void testToString_True() {\n\n\t\tString result = \"\";\n\t\tresult = \"\\n*************Title: \" + book1.getTitle();\n\t\tresult += \"\\n*************Author: \" + book1.getAuthor();\n\t\tresult += \"\\n*************Publication Year: \" + book1.getPublicationDate();\n\t\tresult += \"\\n*************ISBN: \" + book1.getIsbnNumber() + \"\\n \";\n\t\tassertEquals(result, book1.toString());\n\n\t}", "public String toString() {\n//\t\tif (isEmpty()) {\n//\t\t\treturn null;\n//\t\t}\n\t\t//create a string that holds the value of the list\n\t\t//held inside curly braces for my viewing pleasure\n\t\tString s = \"\";\n\t\t//if the list is not empty\n\t\tif (isEmpty()!= true) {\n\t\t\t//create a node and set it to the head\n\t\t\tLinkedListNode<T> curNode = head;\n\t\t\t\t//while the current node isn't null\n\t\t\t\twhile (curNode != null) {\n\t\t\t\t\t//add the data in the node to my string\n\t\t\t\t\ts += curNode.getData();\n\t\t\t\t\t//set current node to be the next node\n\t\t\t\t\tcurNode = curNode.getNext();\n\t\t\t\t}\n\t\t}\n\t\t//return the final string\n\t\treturn s;\n\t}", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }", "void mo100443a(List<String> list);", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "public void testToString() {\n }", "private ArrayList<String> convertToStringArrayList() {\r\n\t\tArrayList<String> strList = new ArrayList<String>();\r\n\t\tStringBuilder strBuilder = new StringBuilder();\r\n\t\tfor (int i = 0; i < gameBoard.getmBoard().length; i++) {\r\n\t\t\tfor (int j = 0; j < gameBoard.getmBoard()[0].length; j++) {\r\n\t\t\t\tstrBuilder.append(gameBoard.getIdValue(gameBoard.genId(i, j)));\r\n\t\t\t}\r\n\t\t\tstrList.add(strBuilder.toString());\r\n\t\t\tstrBuilder.setLength(0);\r\n\t\t}\r\n\r\n\t\tif (gameBoard.isPlayerBlackTurn()) {\r\n\t\t\tstrList.add(\"t\");\r\n\t\t} else {\r\n\t\t\tstrList.add(\"f\");\r\n\t\t}\r\n\r\n\t\tstrList.add(((Integer) gameBoard.getBlackScore()).toString());\r\n\t\tstrList.add(((Integer) gameBoard.getRedScore()).toString());\r\n\t\treturn strList;\r\n\t}", "public static String listToJson(List list, int depth) {\r\n\t\tif (list == null)\r\n\t\t\treturn \"null\";\r\n\r\n\t\tboolean first = true;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tIterator iter = list.iterator();\r\n\r\n\t\tsb.append('[');\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tif (first)\r\n\t\t\t\tfirst = false;\r\n\t\t\telse\r\n\t\t\t\tsb.append(',');\r\n\r\n\t\t\tObject value = iter.next();\r\n\t\t\tif (value == null) {\r\n\t\t\t\tsb.append(\"null\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tsb.append(toJson(value, depth));\r\n\t\t}\r\n\t\tsb.append(']');\r\n\t\treturn sb.toString();\r\n\t}", "boolean getIsList();", "boolean getIsList();" ]
[ "0.8107013", "0.79784757", "0.7612131", "0.74735177", "0.73209536", "0.73209536", "0.7259525", "0.71866417", "0.7107781", "0.68637604", "0.6851361", "0.6814527", "0.6671095", "0.65408546", "0.6535013", "0.65019333", "0.64194894", "0.6381221", "0.6328194", "0.6296322", "0.62640333", "0.62572294", "0.6242686", "0.6231509", "0.6228481", "0.62283725", "0.6212655", "0.62093395", "0.61980784", "0.6168613", "0.6151287", "0.61388904", "0.6135014", "0.61326814", "0.610328", "0.6090596", "0.60768795", "0.6049872", "0.6038787", "0.600976", "0.600715", "0.5979931", "0.5932698", "0.5928669", "0.5928669", "0.5879382", "0.5876116", "0.58479947", "0.5843877", "0.58435464", "0.58302915", "0.5828757", "0.58149385", "0.58108866", "0.5800309", "0.5796199", "0.5778462", "0.57762516", "0.5774784", "0.57735556", "0.5766815", "0.5765681", "0.57645005", "0.57614416", "0.57579726", "0.57474566", "0.57452756", "0.57380104", "0.5729146", "0.57106096", "0.5708078", "0.5704393", "0.56998426", "0.56979644", "0.5696404", "0.5695053", "0.568654", "0.568654", "0.568654", "0.5673789", "0.5664003", "0.5658781", "0.5650433", "0.56329125", "0.5629535", "0.56264186", "0.5605916", "0.56036085", "0.5590242", "0.55884916", "0.55884916", "0.55884916", "0.55884916", "0.55884916", "0.55884916", "0.55856866", "0.557774", "0.5572549", "0.55662924", "0.55662924" ]
0.81704056
0
should only be used by the ressource subsystem
public void SetID(int id) { TextureID = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Ressource createRessource();", "@Override\n public void refreshResources() {\n\n }", "public void softwareResources() {\n\t\t\r\n\t}", "protected abstract T createRessource();", "@Override\r\n public void loadResources() {\n\r\n }", "@Override\n public void onLoadResources() {\n }", "@Override\r\n\tpublic void updateResourceInformation() {\n\t}", "@Override\n\tpublic void updateResourceInformation() {\n\t}", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "private ResourceManager() {}", "public OLWMTSSource(){\n\t\tsuper();\n\t}", "@Override\n\tpublic void resourceChanged(IResourceChangeEvent arg0) {\n\t\t\n\t}", "@SneakyThrows\n protected void addSourceResource() {\n if (databaseType instanceof MySQLDatabaseType) {\n try (Connection connection = DriverManager.getConnection(getComposedContainer().getProxyJdbcUrl(\"\"), \"root\", \"root\")) {\n connection.createStatement().execute(\"USE sharding_db\");\n addSourceResource0(connection);\n }\n } else {\n Properties queryProps = ScalingCaseHelper.getPostgreSQLQueryProperties();\n try (Connection connection = DriverManager.getConnection(JDBC_URL_APPENDER.appendQueryProperties(getComposedContainer().getProxyJdbcUrl(\"sharding_db\"), queryProps), \"root\", \"root\")) {\n addSourceResource0(connection);\n }\n }\n List<Map<String, Object>> resources = queryForListWithLog(\"SHOW DATABASE RESOURCES FROM sharding_db\");\n assertThat(resources.size(), is(2));\n }", "public void hardwareResources() {\n\t\t\r\n\t}", "@Override\n public void addedResource( ResourceEvent event )\n {\n }", "public JhoveResources() {\n\t\tsuper();\n\t}", "void handleNewResource() {\n System.out.println(\"Here at VMLeaseProcessor#handleNewResource\");\n callForBackup();\n resourceManager.createRedundant();\n }", "@Override\n protected boolean isResourceConfigSupported() {\n return true;\n }", "public void addResource(PSResource res) {\n/* 72 */ prepareResourceSet();\n/* 73 */ this.resources.add(res);\n/* */ }", "@Override\n public boolean isAResource() { return true; }", "@Override\n \tpublic Representation getResource() throws Exception {\n \t\tJsonRepresentation result = null;\n \t\t// Rcupre l'identifiant unique de la ressource demande.\n \t\tString interId = (String) this.getRequestAttributes().get(\"interId\");\n \t\tString srcId = (String) this.getRequestAttributes().get(\"sourceId\");\n \t\tSystem.out.println(srcId);\n \t\t// Rcupration des sources de l'intervention\n \t\tList<Source> sources = Interventions.getInstance().getIntervention(interId).getSources();\n \n \t\tSource source = null;\n \t\t\n \t\t// Si on demande un source prcis\n \t\tif (srcId != null) {\n \t\t\t// Recherche du source demand\n \t\t\tfor (int i = 0; i < sources.size(); i++) {\n \t\t\t\tif (sources.get(i).getUniqueID().equals(srcId)) {\n \t\t\t\t\tsource = sources.get(i);\n \t\t\t\t}\n \t\t\t}\n \t\t\t// Si le source n'est pas trouv\n \t\t\tif (source == null) {\n \t\t\t\tresult = null;\n \t\t\t\tgetResponse().setStatus(Status.CLIENT_ERROR_NOT_ACCEPTABLE);\n \t\t\t} else {\n \t\t\t\tresult = new JsonRepresentation(source.toJSON());\n \t\t\t}\n \t\t// Si on veut tous les sources\n \t\t} else if (srcId == null) {\n \t\t\t\n \t\t\tJSONArray jsonAr = new JSONArray(); //Cration d'une liste Json\n \t\t\tfor(int i=0; i< sources.size();i++){\n\t\t\t\tjsonAr.put(sources.get(i).toJSON()); // On ajoute un jsonObject contenant le source dans le jsonArray\n \t\t\t}\n \t\t\t\n \t\t\tresult = new JsonRepresentation(jsonAr); // On cre la reprsentation de la liste\n \t\t}\n \n \t\t// Retourne la reprsentation, le code status indique au client si elle est valide\n \t\treturn result;\n \t}", "private MyResource() {\n System.out.printf(\"[%s] has been created \\n\", MyResource.class.getSimpleName());\n }", "public abstract IResource getResource();", "@Override\n public Response initResConCat() {\n return resourceMicroApi.makeConESDb();\n }", "private ResourceFactory() {\r\n\t}", "protected void setResourceName(String resrcName) {\n\tthis.resrcName = resrcName;\n }", "private Resource() {}", "public static void testResourceFile() {\n\t\tArrayList l = new ArrayList();\n\t\tl.add(\"http://www.google.it\");\n\t\tl.add(\"http://www.microsoft.com\");\n\t\t/*\n\t\tDownloader d = new Downloader(1);\n\t\tlogger\n\t\t\t\t.log(\n\t\t\t\t\t\tLevel.INFO,\n\t\t\t\t\t\"TEST ResourceFile implementation. Url downloaded will be temporary saved to system temp directory.\");\n\n\t\t// Listener\n\t\td.addListener(new DebugListener());\n\n\t\td.setFollowRedirect(true);\n\t\td.setMaxSize(2000);\n\t\td.addURLs(l);\n\t\td.start();\n\t\td.waitDone();\n\n\t\t// Derby DBMS should be shutdown every times application goes down\n\t\tDerbyLinkQueueDB.shutdown();\n\t\t*/\n\t}", "public SourceInterestMapResource() {\n }", "private void loadResource() {\n\t\ttry {\n\t\t\ttarmacTexture = scaleResourceImagePaint(\"/textures/tarmac2.jpg\", 300, 300);\n\t\t\tgrassTexture = scaleResourceImagePaint(\"/textures/grass.jpg\", 300, 300);\n\t\t\tstopwayTexture = scaleResourceImagePaint(\"/textures/stopway.jpg\", 300, 300);\n\t\t} catch (IOException e) {\n\t\t\tsetUsingTextures(false);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public Enumeration<URL> getResources(String name) throws IOException {\n if (\"META-INF/services/org.neo4j.ogm.spi.CypherModificationProvider\".equals(name)) {\n return Collections.enumeration(Arrays.asList(\n super.getResource(\"spi/cypher_modification1\"),\n super.getResource(\"spi/cypher_modification2\")));\n } else {\n return super.getResources(name);\n }\n }", "public void hardwareResources() {\n\t\tSystem.out.println(\"I am the Hardware implemented through Multiple inheritence in Desktop class\");\r\n\r\n\t}", "public void softwareResources() {\n\t\tSystem.out.println(\"I am the software implemented through Multiple inheritence in Desktop class\");\r\n\t\t\r\n\t}", "public void softwareWareResources() {\n\t\tSystem.out.println(\"softwareResources\");\r\n\t}", "@Override\n\tpublic void releaseResouces() {\n\t\tsuper.releaseResouces();\n\t}", "@Override\n @Test(groups = {\"Resource access\"})\n public void testResource00() throws Exception {\n super.testResource00();\n }", "com.yandex.ydb.rate_limiter.Resource getResource();", "public Object makeResource();", "private CanonizeSource() {}", "private void updateResorce() {\n }", "public void hardWareResources() {\n\t\tSystem.out.println(\"HadwareResources\");\r\n\t}", "private void initResources() {\n resources = ResourceBundle.getBundle(\"bundles.ChangeTBRFrameResources\");\n }", "public void setRes(){\r\n \r\n }", "private ResourcePackage() {}", "public interface ApplicationResourceUsage extends ResourceUsage\n{\n}", "public interface IResourceSource\n{\n /**\n * Get resource location based on resource name.\n *\n * @param name Name of resource to be searched\n * @return URL of resource\n */\n public URL getResourceLocation( String name );\n\n /**\n * Get resource locations based on resource name.\n *\n * @param name Name of resources to be searched\n * @return Enumeration of URLs of resources\n */\n public Enumeration getResourceLocations( String name );\n\n /**\n * Get resource path this resource source references. Each entry including the last must be\n * terminated with a semicolon.\n *\n * @return Resource path this resource source references\n */\n public String getResourcePath();\n}", "@Override\r\n\tpublic void setGetResource(ResourceType resource) {\n\t\t\r\n\t}", "@Override\n\tpublic void renderSource() {\n\t\t\n\t}", "@Override\n protected void load(ScanningContext context) {\n ResourceItem item = getRepository().getResourceItem(mType, mResourceName);\n\n // add this file to the list of files generating this resource item.\n item.add(this);\n\n // Ask for an ID refresh since we're adding an item that will generate an ID\n context.requestFullAapt();\n }", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "public abstract ResourceDataSet loadResources() ;", "public void loadResources();", "public Resource getTargetResource() {\n Resource target = (Resource) getResource();\n edu.hkust.clap.monitor.Monitor.loopBegin(626);\nwhile (target instanceof ResourceFrame) { \nedu.hkust.clap.monitor.Monitor.loopInc(626);\n{\n target = ((ResourceFrame) target).getResource();\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(626);\n\n return target;\n }", "public int getResource() throws java.rmi.RemoteException;", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "@Override\r\n\tpublic String getResource(ResourceLocation registryName) {\n\t\treturn null;\r\n\t}", "Resource getResource();", "private void loadResourcesData(){\n //showResourceListView();\n\n String [] resourceData = new String [20];\n\n for(int stringCount = 1; stringCount <= 20; stringCount++) {\n resourceData[stringCount - 1] = \"Title \" + stringCount;\n }\n\n mResourceListAdapter.setResourceData(resourceData);\n }", "DrbdResource getDrbdResource() {\n return (DrbdResource) getResource();\n }", "protected Resource getResource() {\n return resource;\n }", "protected abstract String getResourcePath();", "public S_RESOURCEObj() {\r\n }", "private static ImageResource initImageResource() {\n\t\tImageResource imageResource = new ImageResource(Configuration.SUPERVISOR_LOGGER);\n\t\t\n\t\timageResource.addResource(ImageTypeAWMS.VERTICAL_BAR.name(), imagePath + \"blue_vertical_bar.png\");\n\t\timageResource.addResource(ImageTypeAWMS.HORIZONTAL_BAR.name(), imagePath + \"blue_horizontal_bar.png\");\n\t\timageResource.addResource(ImageTypeAWMS.WELCOME.name(), imagePath + \"welcome.png\");\n\t\t\n\t\t\n\t\treturn imageResource;\n\t}", "protected String getResourceURL(String resourceUri) {\r\n\t\tlogger.info(\"getResourceURL - entry: {}\", resourceUri);\r\n\t\tString resourceURL = getModelURL() + \"/\" + getPath(resourceUri);\r\n\t\tlogger.info(\"getResourceURL - exit: {}\", resourceURL);\r\n\t\treturn resourceURL;\r\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "void setResourceName(String name)\n {\n this.name = name;\n }", "public ResourceSet getResourceSet()\n {\n return resourceSet;\n }", "protected String getResourceName() {\n\t\treturn resourceName;\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void load() {\n }", "@Override\r\npublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\r\n}", "@Override\n\tprotected void initDataSource() {\n\t}", "public CarroResource() {\r\n }", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "@Override\r\n\tpublic boolean addSource(Resource resource) {\n\t\treturn this.excuteDb(\"insert into resource (style_id,title,size,language,banben,text,inputtime,res_add,image_add) values(?,?,?,?,?,?,?,?,?)\",new Object[]{\r\n\t\t\t\tresource.getStyleid(),\r\n\t\t\t\tresource.getTitle(),\r\n\t\t\t\tresource.getSize(),\r\n\t\t\t\tresource.getLanguage(),\r\n\t\t\t\tresource.getBanben(),\r\n\t\t\t\tresource.getText(),\r\n\t\t\t\tresource.getInputtime(),\r\n\t\t\t\tresource.getResadd(),\r\n\t\t\t\tresource.getImageadd()\r\n\t\t} );\r\n\t}", "On_Device_Resource createOn_Device_Resource();", "protected MapResourcePack() {\n this.baseResourcePack = null;\n this.archive = null;\n }", "public String getResPath()\n/* */ {\n/* 138 */ return this.resPath;\n/* */ }", "@Override\n protected void customizeResourceList(ResourceList resourceList) {\n resourceList.add(ResourcePair\n .constructSystemResourcePair(colorBarRscData));\n // Get the d2d legend resource\n resourceList.add(ResourcePair\n .constructSystemResourcePair(legendRscData));\n // Add the d2d select pane resource\n resourceList.add(ResourcePair\n .constructSystemResourcePair(selectedRscData));\n // Add the d2d sample resource\n resourceList.add(ResourcePair\n .constructSystemResourcePair(samplingRscData));\n }", "public interface ResourceManager extends RemoteService{\n\n /**\n * This method returns a list of the resources.\n *\n * @return This list of resources.\n * @throws ResourcesException\n */\n public List<ResourceBase> listTypes() throws ResourceException;\n}", "protected IResource getResource() {\r\n \t\tIEditorInput input = fTextEditor.getEditorInput();\r\n \t\treturn (IResource) ((IAdaptable) input).getAdapter(IResource.class);\r\n \t}", "Device_Resource createDevice_Resource();", "public void expendLimitedResource(String resourceName){\n }", "public String getResourceName();", "@Override\r\n\tpublic void update(Resources resources) {\n\t\t\r\n\t}", "public void setRWResource(RWResource theResource) {\n resource = theResource;\n }", "@Override\n protected boolean isZoneLevelResource() {\n return false;\n }", "String getResourceName();", "public ResourceManager getResourceManager ()\n {\n return _rsrcmgr;\n }", "@Override\n\tpublic void onResourceDelivered(ResourceResponse arg0) {\n\t\t\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "protected void onFirstUse() {}", "public RessourceFer(Case position) {\n super(position);\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }" ]
[ "0.69640946", "0.67081916", "0.66271365", "0.66003424", "0.65247065", "0.6453199", "0.63655335", "0.63215107", "0.62910235", "0.6281115", "0.6237964", "0.6159996", "0.61138976", "0.60779625", "0.60012054", "0.5984623", "0.5945079", "0.59258944", "0.5920257", "0.59149134", "0.5889742", "0.58585", "0.58086765", "0.5792233", "0.5773394", "0.5746224", "0.57427895", "0.57325196", "0.57291454", "0.5722029", "0.5718386", "0.5705973", "0.57042253", "0.57014334", "0.5694464", "0.56931067", "0.5690769", "0.5689593", "0.56869465", "0.567962", "0.5677722", "0.56622404", "0.5653976", "0.56487113", "0.5639584", "0.5631313", "0.5629095", "0.5623067", "0.5618112", "0.5611783", "0.56111", "0.56111", "0.56111", "0.56026757", "0.5597365", "0.5577593", "0.5577185", "0.55760187", "0.5571954", "0.5566025", "0.5561901", "0.5557699", "0.5536752", "0.55352557", "0.55336094", "0.55306417", "0.55264956", "0.55235946", "0.5523208", "0.55177814", "0.55095756", "0.5508648", "0.5507501", "0.55071884", "0.55062485", "0.5499063", "0.54903007", "0.54903007", "0.54849064", "0.54791635", "0.54776156", "0.54743713", "0.5473729", "0.5467333", "0.5465605", "0.5459063", "0.54566145", "0.5451835", "0.5447461", "0.54461265", "0.5444924", "0.5441768", "0.54362243", "0.54354507", "0.5431094", "0.54297113", "0.5426425", "0.54243416", "0.54243416", "0.54243416", "0.54243416" ]
0.0
-1
Just wraps this texture in a material
public CubeMaterial asMaterial() { if(mat != null) return mat; mat = new CubeMaterial(); mat.setTexture(this); return mat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static PhongMaterial makeSpecialMaterial(Image texture) {\n PhongMaterial material = new PhongMaterial();\n material.setDiffuseColor(Color.BLACK);\n material.setSpecularColor(Color.BLACK);\n material.setDiffuseMap(texture);\n material.setSelfIlluminationMap(texture);\n return material;\n }", "@Override\n public void drawMesh(String name, util.Material material, String textureName,\n final Matrix4f transformation) {\n if (meshRenderers.containsKey(name)) {\n GL3 gl = glContext.getGL().getGL3();\n FloatBuffer fb16 = Buffers.newDirectFloatBuffer(16);\n FloatBuffer fb4 = Buffers.newDirectFloatBuffer(4);\n\n if (textures != null && textures.containsKey(textureName)) {\n gl.glEnable(gl.GL_TEXTURE_2D);\n gl.glActiveTexture(gl.GL_TEXTURE0);\n gl.glUniform1i(shaderLocations.getLocation(\"image\"), 0);\n\n Texture texture = textures.get(textureName).getTexture();\n\n texture.setTexParameteri(gl, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\n texture.setTexParameteri(gl, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n texture.setTexParameteri(gl, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);\n texture.setTexParameteri(gl, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);\n\n texture.setMustFlipVertically(true);\n Matrix4f textureTrans = new Matrix4f();\n if (texture.getMustFlipVertically()) { //for flipping the image vertically\n textureTrans = new Matrix4f().translate(0, 1, 0).scale(1, -1, 1);\n }\n gl.glUniformMatrix4fv(shaderLocations.getLocation(\"texturematrix\"), 1, false,\n textureTrans.get(fb16));\n gl.glDisable(gl.GL_TEXTURE_2D);\n texture.bind(gl);\n }\n\n //get the color\n\n //set the color for all vertices to be drawn for this object\n\n int loc = shaderLocations.getLocation(\"material.ambient\");\n if (loc < 0) {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.ambient \\\"\");\n }\n gl.glUniform3fv(loc, 1,\n material.getAmbient().get(fb4));\n\n loc = shaderLocations.getLocation(\"material.diffuse\");\n if (loc < 0) {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.diffuse \\\"\");\n }\n gl.glUniform3fv(loc, 1,\n material.getDiffuse().get(fb4));\n\n loc = shaderLocations.getLocation(\"material.specular\");\n if (loc < 0) {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.specular \\\"\");\n }\n gl.glUniform3fv(loc, 1,\n material.getSpecular().get(fb4));\n\n loc = shaderLocations.getLocation(\"material.shininess\");\n if (loc < 0) {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.shininess \\\"\");\n }\n gl.glUniform1f(loc, material.getShininess());\n\n loc = shaderLocations.getLocation(\"modelview\");\n if (loc < 0) {\n throw new IllegalArgumentException(\"No shader variable for \\\" modelview \\\"\");\n }\n gl.glUniformMatrix4fv(loc, 1, false, transformation.get(fb16));\n\n loc = shaderLocations.getLocation(\"normalmatrix\");\n if (loc < 0) {\n throw new IllegalArgumentException(\"No shader variable for \\\" normalmatrix \\\"\");\n }\n Matrix4f normalmatrix = new Matrix4f(transformation);\n normalmatrix = normalmatrix.invert().transpose();\n gl.glUniformMatrix4fv(shaderLocations.getLocation(\"normalmatrix\"), 1,\n false, normalmatrix.get(fb16));\n\n meshRenderers.get(name).draw(glContext);\n }\n }", "public Material create();", "public void ApplyMaterial(TF3D_Material mat)\n\t{\n\t\tif (mat.typ == F3D.MAT_TYPE_TEXTURE)\n\t\t{\n\n\t\t\tthis.ResetMaterial();\n\t\t\t\n\t\t\tif (mat.bAlphaTest)\n\t\t\t{\n\t\t\t\tglEnable(GL_ALPHA_TEST);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_ALPHA_TEST);\n\t\t\t}\n\n\t\t\tif (mat.bDepthTest)\n\t\t\t{\n\t\t\t\tglEnable(GL_DEPTH_TEST);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_DEPTH_TEST);\n\t\t\t}\n\n\t\t\tif (mat.bFaceCulling)\n\t\t\t{\n\t\t\t\tglEnable(GL_CULL_FACE);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_CULL_FACE);\n\t\t\t}\n\n\t\t\tif (F3D.Config.use_gl_light)\n\t\t\t{\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_AMBIENT, F3D.GetBuffer.Float(mat.colors.ambient));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE, F3D.GetBuffer.Float(mat.colors.diffuse));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_SPECULAR, F3D.GetBuffer.Float(mat.colors.specular));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_EMISSION, F3D.GetBuffer.Float(mat.colors.emissive));\n\t\t\t\tglMaterialf(GL_FRONT, GL_SHININESS, mat.colors.shinisess);\n\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglColor4f(mat.colors.diffuse[0], mat.colors.diffuse[1], mat.colors.diffuse[2], mat.colors.diffuse[3]);\n\t\t\t}\n\n\t\t\tfor (int u = 0; u < F3D.MAX_TMU; u++)\n\t\t\t{\n\t\t\t\tif (mat.texture_unit[u].bEvent)\n\t\t\t\t{\n\t\t\t\t\tF3D.MaterialEvents.Apply(u, mat.texture_unit[u].event_id);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tF3D.MaterialEvents.ResetEvent(u);\n\t\t\t\t}\n\n\t\t\t\tif (mat.texture_unit[u].bTexture)\n\t\t\t\t{\n\t\t\t\t\tF3D.Textures.ActivateLayer(u);\n\t\t\t\t\tF3D.Textures.Bind(mat.texture_unit[u].texture_id);\n\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tF3D.Textures.DeactivateLayer(u);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// SHADER\n\t\tif (mat.typ == F3D.MAT_TYPE_SHADER)\n\t\t{\n\n\t\t\tif (mat.bAlphaTest)\n\t\t\t{\n\t\t\t\tglEnable(GL_ALPHA_TEST);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_ALPHA_TEST);\n\t\t\t}\n\n\t\t\tif (mat.bDepthTest)\n\t\t\t{\n\t\t\t\tglEnable(GL_DEPTH_TEST);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_DEPTH_TEST);\n\t\t\t}\n\n\t\t\tif (mat.bFaceCulling)\n\t\t\t{\n\t\t\t\tglEnable(GL_CULL_FACE);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_CULL_FACE);\n\t\t\t}\n\n\t\t\t\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_AMBIENT, F3D.GetBuffer.Float(mat.colors.ambient));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE, F3D.GetBuffer.Float(mat.colors.diffuse));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_SPECULAR, F3D.GetBuffer.Float(mat.colors.specular));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_EMISSION, F3D.GetBuffer.Float(mat.colors.emissive));\n\t\t\t\tglMaterialf(GL_FRONT, GL_SHININESS, mat.colors.shinisess);\n\n\t\t\t\n\n\t\t\tif (mat.use_shader)\n\t\t\t{\n\t\t\t\tF3D.Shaders.UseProgram(mat.shader_id);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int u = 0; u < F3D.MAX_TMU; u++)\n\t\t\t{\n\t\t\t\tif (mat.texture_unit[u].bEvent)\n\t\t\t\t{\n\t\t\t\t\tF3D.MaterialEvents.Apply(u, mat.texture_unit[u].event_id);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tF3D.MaterialEvents.ResetEvent(u);\n\t\t\t\t}\n\n\t\t\t\tif (mat.texture_unit[u].bTexture)\n\t\t\t\t{\n\t\t\t\t\tF3D.Textures.ActivateLayer(u);\n\t\t\t\t\tF3D.Textures.Bind(mat.texture_unit[u].texture_id);\n\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tF3D.Textures.DeactivateLayer(u);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "public abstract TextureObject getTexture();", "public Material copy()\r\n\t{\r\n\t\tMaterial other = new Material();\r\n\r\n\t\tother.setAmbient(ambient.x, ambient.y, ambient.z);\r\n\t\tother.setDiffuse(diffuse.x, diffuse.y, diffuse.z);\r\n\t\tother.setSpecular(specular.x, specular.y, specular.z);\r\n\r\n\t\tother.setTexture(texture);\r\n\r\n\t\treturn other;\r\n\t}", "SurfaceTexture mo17015a();", "SurfaceTexture mo17006a();", "private Material(float[] diffuse, float[] specular, float shininess) {\n this.diffuse = diffuse;\n this.specular = specular;\n this.shininess = shininess;\n }", "private Material(float[] diffuse, float[] specular, float shininess) {\n this.diffuse = diffuse;\n this.specular = specular;\n this.shininess = shininess;\n }", "@Override\n public void drawMesh(String name, util.Material material, String textureName, final Matrix4f transformation) {\n if (meshRenderers.containsKey(name)) {\n GL3 gl = glContext.getGL().getGL3();\n //get the color\n\n FloatBuffer fb4 = Buffers.newDirectFloatBuffer(4);\n FloatBuffer fb16 = Buffers.newDirectFloatBuffer(16);\n\n int loc = -1;\n\n loc = shaderLocations.getLocation(\"material.ambient\");\n if (loc >= 0) {\n gl.glUniform3fv(loc, 1, material.getAmbient().get(fb4));\n } else {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.ambient \\\"\");\n }\n\n loc = shaderLocations.getLocation(\"material.diffuse\");\n if (loc >= 0) {\n gl.glUniform3fv(loc, 1, material.getDiffuse().get(fb4));\n } else {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.diffuse \\\"\");\n }\n\n if (loc >= 0) {\n loc = shaderLocations.getLocation(\"material.specular\");\n gl.glUniform3fv(loc, 1, material.getSpecular().get(fb4));\n } else {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.specular \\\"\");\n }\n\n loc = shaderLocations.getLocation(\"material.shininess\");\n if (loc >= 0) {\n gl.glUniform1f(loc, material.getShininess());\n } else {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.shininess \\\"\");\n }\n\n loc = shaderLocations.getLocation(\"modelview\");\n if (loc >= 0) {\n gl.glUniformMatrix4fv(loc, 1, false, transformation.get(fb16));\n }\n else {\n throw new IllegalArgumentException(\"No shader variable for \\\" modelview \\\"\");\n }\n\n loc = shaderLocations.getLocation(\"normalmatrix\");\n if (loc>=0) {\n Matrix4f normalmatrix = new Matrix4f(transformation).invert().transpose();\n gl.glUniformMatrix4fv(loc,1,false,normalmatrix.get(fb16));\n }\n else {\n throw new IllegalArgumentException(\"No shader variable for \\\" normalmatrix \\\"\");\n }\n\n\n\n if (textures.containsKey(textureName))\n textures.get(textureName).getTexture().bind(gl);\n else if (textures.containsKey(\"white\"))\n textures.get(\"white\").getTexture().bind(gl);\n\n meshRenderers.get(name).draw(glContext);\n }\n }", "@Override\n\tpublic int getTexture() {\n\t\treturn 0;\n\t}", "public String getTexture(){\n\t\treturn texture;\n\t}", "void glBindTexture(int target, int texture);", "LocalMaterialData getSurfaceBlock();", "@Override\n\tprotected ResourceLocation getEntityTexture(Entity entity) {\n\t\treturn texture;\n\t}", "public Material() {}", "public static Node buildWorld(AssetManager assetManager) {\n TextureKey keyFloor = new TextureKey(\"Models/Scene/wall_diffuse_1.jpg\", false);// pave_color.jpg\n Texture texFloor = assetManager.loadTexture(keyFloor);\n\n TextureKey keyNorm = new TextureKey(\"Models/Scene/wall_normal.jpg\", false);// pave_norm.jpg\n Texture texNormalPlane = assetManager.loadTexture(keyNorm);\n\n Material mat_basic = new Material(assetManager, \"Common/MatDefs/Light/PBRLighting.j3md\");\n mat_basic.setTexture(\"BaseColorMap\", texFloor);\n mat_basic.setTexture(\"NormalMap\", texNormalPlane);\n mat_basic.setFloat(\"Metallic\", 0.1f);\n mat_basic.setFloat(\"Roughness\", 0.00f);\n mat_basic.setFloat(\"Glossiness\", 0.5f);\n\n // Must be false - otherwise uv gets messed up.\n TextureKey keyFloor2 = new TextureKey(\"Models/Scene/deck.jpg\", false);\n Texture texFloor2 = assetManager.loadTexture(keyFloor2);\n TextureKey keyNorm2 = new TextureKey(\"Models/Scene/deck_normal.jpg\", false);\n Texture texNormalPlane2 = assetManager.loadTexture(keyNorm2);\n\n Material mat_basic2 = new Material(assetManager, \"Common/MatDefs/Light/PBRLighting.j3md\");\n mat_basic2.setTexture(\"BaseColorMap\", texFloor2);\n mat_basic2.setFloat(\"Metallic\", 0.1f);\n mat_basic2.setFloat(\"Roughness\", 0.1f);\n mat_basic2.setTexture(\"NormalMap\", texNormalPlane2);\n // Scene\n Node scene = (Node) assetManager.loadModel(\"Models/Scene/testScene.gltf\");\n\n // Tiling\n ((Geometry) scene.getChild(\"Plane\")).getMesh().scaleTextureCoordinates(new Vector2f(4, 4));\n mat_basic.getTextureParam(\"BaseColorMap\").getTextureValue().setWrap(WrapMode.Repeat);\n mat_basic.getTextureParam(\"NormalMap\").getTextureValue().setWrap(WrapMode.Repeat);\n // Tex for scene\n scene.getChild(\"Plane\").setMaterial(mat_basic);\n scene.getChild(\"Cube\").setMaterial(mat_basic2);\n\n Node probeNode = (Node) assetManager.loadModel(\"Models/Scene/market.j3o\");\n LightProbe probe = (LightProbe) probeNode.getLocalLightList().iterator().next();\n scene.addLight(probe);\n\n // We must add a light to make the model visible\n // Light\n DirectionalLight sun = new DirectionalLight();\n sun.setColor(ColorRGBA.White.mult(0.75f));\n sun.setDirection(new Vector3f(-.5f, -.5f, -.5f).normalizeLocal());\n scene.addLight(sun);\n\n return scene;\n }", "@Override\n\t\tprotected ResourceLocation getEntityTexture(EntityLivingBase entity) {\n\t\t\treturn texture;\n\t\t}", "public INTexture2D getTexture()\n {\n return this.texture.clone();\n }", "@Override\n public void loadTexture() {\n\n }", "public String getMaterial() {\n return material;\n }", "public String getMaterial() {\n return material;\n }", "String getMaterial();", "public ModelTexture(int textureID) {\n this.textureID = textureID;\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public String getNormalTexture() {\n return normalTexture;\n }", "public MTImage(PApplet pApplet, PImage texture) {\n super(pApplet, -7, -7, texture.width + 14, texture.height + 14);\n\n image = new MTRectangle(pApplet, texture);\n image.setStrokeColor(new MTColor(255, 255, 255, 255));\n image.setPickable(false);\n this.addChild(image);\n\n //Draw this component and its children above\n //everything previously drawn and avoid z-fighting\n this.setDepthBufferDisabled(true);\n }", "public void updateMaterial() {\n this.material = world.getRecipeManager().getFirstMatch(RecipeTypes.MATERIAL, this, world).orElse(null);\n }", "void createMaterial(Material material) throws CreateException;", "@Override\n\tpublic void setTexture(int texID) {\n\n\t}", "WorldMaterialMap getMaterialMap();", "public ModelTexture(int id) {\r\n\t\tthis.textureID = id;\r\n\t}", "public Material getMaterial() {\n\t\treturn material;\n\t}", "public interface MaterialCreator {\n\n\t/**\n\t * Creates the material and returns it.\n\t * @return the material\n\t */\n\tpublic Material create();\n\n\t/**\n\t * Sets the material parameters which define the actual appearance of the final material.\n\t * \n\t * @param mp the material parameters\n\t */\n\tpublic void setParameters(MaterialParams mp);\n\t\n}", "public ResourceLocation getEntityTexture(T entity) {\n return MINECART_TEXTURES;\n }", "public Texture() {\n }", "public void createTexture(int textureSize) {\n\t\tsuper.createTexture(textureSize);\n\n\t\tBufferedImage img = new BufferedImage(textureSize, textureSize, BufferedImage.TYPE_INT_RGB);\n\t\tBufferedImage splatTexture;\n\t\tBufferedImage splatMap;\n\n\t\tfloat alpha;\n\t\tint scaledX;\n\t\tint scaledY;\n\n\t\tint rgb;\n\t\tint red;\n\t\tint green;\n\t\tint blue;\n\n\t\tint splatSize = splatTextures.size();\n\n\t\timg.getGraphics().drawImage(proceduralTexture.getImage(), 0, 0, null);\n\n\t\tfor (int x = 0; x < textureSize; x++) {\n\t\t\tfor (int y = 0; y < textureSize; y++) {\n\t\t\t\trgb = img.getRGB(x, y);\n\t\t\t\tred = (rgb & 0x00FF0000) >> 16;\n\t\t\t\tgreen = (rgb & 0x0000FF00) >> 8;\n\t\t\t\tblue = (rgb & 0x000000FF);\n\n\t\t\t\tfor (int i = 0; i < splatSize; i++) {\n\t\t\t\t\tsplatMap = splatMaps.get(i);\n\t\t\t\t\tsplatTexture = splatTextures.get(i);\n\n\t\t\t\t\t// Retrieve the amount of the color to use for this texture.\n\t\t\t\t\tscaledX = (int) (x * (splatMap.getWidth() / (float) textureSize));\n\t\t\t\t\tscaledY = (int) (splatMap.getHeight() - ((y * (splatMap.getHeight() / (float) textureSize)) + 1));\n\n\t\t\t\t\talpha = ((splatMap.getRGB(scaledX, scaledY) >> 24) & 0x000000FF) / 255.0f;\n\n\t\t\t\t\t// We may have to tile the texture if the terrain is larger\n\t\t\t\t\t// than the texture.\n\t\t\t\t\tscaledX = x % splatTexture.getWidth();\n\t\t\t\t\tscaledY = y % splatTexture.getHeight();\n\n\t\t\t\t\t// perform alpha composite\n\t\t\t\t\tif (alpha > 0) {\n\t\t\t\t\t\tred = (int) ((red * (1.0f - alpha)) + (((splatTexture.getRGB(scaledX, scaledY) & 0x00FF0000) >> 16) * alpha));\n\t\t\t\t\t\tgreen = (int) ((green * (1.0f - alpha)) + (((splatTexture.getRGB(scaledX, scaledY) & 0x0000FF00) >> 8) * alpha));\n\t\t\t\t\t\tblue = (int) ((blue * (1.0f - alpha)) + (((splatTexture.getRGB(scaledX, scaledY) & 0x000000FF)) * alpha));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set the color for the final texture.\n\t\t\t\trgb = red << 16 | green << 8 | blue;\n\t\t\t\timg.setRGB(x, y, rgb);\n\n\t\t\t\tred = 0;\n\t\t\t\tgreen = 0;\n\t\t\t\tblue = 0;\n\t\t\t}\n\t\t}\n\n\t\t// create the new image from the data.\n\t\tproceduralTexture = new ImageIcon(img);\n\t\tproceduralTexture.setDescription(\"TerrainTexture\");\n\n\t\tlogger.fine(\"Created splat texture successfully.\");\n\t}", "public void setAsMaterial(Material mat) throws IOException {\n assert (mat.getMaterialDef().getAssetName() != null);\n setName(\"MyMaterial\");\n setMatDefName(mat.getMaterialDef().getAssetName());\n createBaseMaterialFile();\n materialParameters.clear();\n Collection<MatParam> params = mat.getParams();\n for (Iterator<MatParam> it = params.iterator(); it.hasNext();) {\n MatParam matParam = it.next();\n materialParameters.put(matParam.getName(), new MaterialProperty(matParam));\n }\n additionalRenderStates.put(\"Wireframe\", new MaterialProperty(\"OnOff\", \"Wireframe\", mat.getAdditionalRenderState().isWireframe() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"DepthWrite\", new MaterialProperty(\"OnOff\", \"DepthWrite\", mat.getAdditionalRenderState().isDepthWrite() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"DepthTest\", new MaterialProperty(\"OnOff\", \"DepthTest\", mat.getAdditionalRenderState().isDepthTest() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"ColorWrite\", new MaterialProperty(\"OnOff\", \"ColorWrite\", mat.getAdditionalRenderState().isColorWrite() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"PointSprite\", new MaterialProperty(\"OnOff\", \"PointSprite\", mat.getAdditionalRenderState().isPointSprite() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"FaceCull\", new MaterialProperty(\"FaceCullMode\", \"FaceCull\", mat.getAdditionalRenderState().getFaceCullMode().name()));\n additionalRenderStates.put(\"Blend\", new MaterialProperty(\"BlendMode\", \"Blend\", mat.getAdditionalRenderState().getBlendMode().name()));\n additionalRenderStates.put(\"AlphaTestFalloff\", new MaterialProperty(\"Float\", \"AlphaTestFalloff\", mat.getAdditionalRenderState().getAlphaFallOff() + \"\"));\n additionalRenderStates.put(\"PolyOffset\", new MaterialProperty(\"Float,Float\", \"PolyOffset\", mat.getAdditionalRenderState().getPolyOffsetUnits() + \" \" + mat.getAdditionalRenderState().getPolyOffsetFactor()));\n checkWithMatDef();\n setAsText(getUpdatedContent());\n }", "@Override\n public String toString() {\n return material;\n }", "@Override\n\tpublic Material getMaterial() {\n\t\treturn this.m_material;\n\t}", "void createSurface(SurfaceTexture surfaceTexture);", "private static RenderMaterial loadMaterialInner(Identifier idIn) {\n\t\tif (RenderMaterial.MATERIAL_STANDARD.equals(idIn)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfinal Identifier id = new Identifier(idIn.getNamespace(), \"materials/\" + idIn.getPath() + \".json\");\n\n\t\tRenderMaterial result = null;\n\t\tfinal ResourceManager rm = MinecraftClient.getInstance().getResourceManager();\n\n\t\ttry (Resource res = rm.getResource(id)) {\n\t\t\tresult = MaterialDeserializer.deserialize(readJsonObject(res));\n\t\t} catch (final Exception e) {\n\t\t\t// TODO: make error suppression configurable\n\t\t\tif (CAUGHT.add(idIn)) {\n\t\t\t\tFrex.LOG.info(\"Unable to load render material \" + idIn.toString() + \" due to exception \" + e.toString());\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\r\n\tprotected ResourceLocation getEntityTexture(EntityAngel entity)\r\n {\r\n return ANGEL_TEXTURE;\r\n }", "protected ResourceLocation getEntityTexture(EntitySentientSpecter entity)\n {\n return texture;\n }", "public java.lang.String getMaterial() {\r\n return material;\r\n }", "public void setMaterial(String material) {\n this.material = material;\n }", "@Override\n\tpublic String getTexture() {\n\t\treturn type.getTextureString();\n\t}", "public PhongMaterial(final Texture diffuseTexture, final Texture specularTexture, final int exponent) {\n\t\tif (diffuseTexture == null || specularTexture == null) {\n\t\t\tthrow new IllegalArgumentException(\"The parameters must not be null.\");\n\t\t}\n\t\tif (exponent < 0 || Double.MAX_EXPONENT < exponent) {\n\t\t\tthrow new IllegalArgumentException(\"The parameter 'exponent' must be a positive int value below 1024.\");\n\t\t}\n\t\tthis.diffuseTexture = diffuseTexture;\n\t\tthis.specularTexture = specularTexture;\n\t\tthis.exponent = exponent;\n\t}", "@Override\n\tpublic String getMaterial() {\n\t\treturn null;\n\t}", "public TextureReference getTexture() {\r\n\t\treturn texture;\r\n\t}", "private void configureMaterials() {\n quadMaterial = new Material(assetManager,\n \"Common/MatDefs/Misc/Unshaded.j3md\");\n quadMaterial.setColor(\"Color\", ColorRGBA.Green.clone());\n RenderState ars = quadMaterial.getAdditionalRenderState();\n ars.setWireframe(true);\n }", "public Image(Renderer renderer, TextureReference texture) {\r\n\t\tsuper();\r\n\t\tthis.renderer = renderer;\r\n\t\tthis.texture = texture;\r\n\t\tthis.textureX = 0;\r\n\t\tthis.textureY = 0;\r\n\t\tthis.textureWidth = texture.getLibraryWidth();\r\n\t\tthis.textureHeight = texture.getLibraryHeight();\r\n\t\tthis.width = texture.getWidth();\r\n\t\tthis.height = texture.getHeight();\r\n\t}", "public static Texture getTexture(String resourceName, BufferedImage resourceimage, int target, int dstPixelFormat, int minFilter, int magFilter) throws IOException {\n/* 92 */ ImageIOImageData data = new ImageIOImageData(); int srcPixelFormat = 0;\n/* */ \n/* */ \n/* 95 */ int textureID = InternalTextureLoader.createTextureID();\n/* 96 */ TextureImpl texture = new TextureImpl(resourceName, target, textureID);\n/* */ \n/* */ \n/* 99 */ Renderer.get().glEnable(3553);\n/* */ \n/* */ \n/* 102 */ Renderer.get().glBindTexture(target, textureID);\n/* */ \n/* 104 */ BufferedImage bufferedImage = resourceimage;\n/* 105 */ texture.setWidth(bufferedImage.getWidth());\n/* 106 */ texture.setHeight(bufferedImage.getHeight());\n/* */ \n/* 108 */ if (bufferedImage.getColorModel().hasAlpha()) {\n/* 109 */ srcPixelFormat = 6408;\n/* */ } else {\n/* 111 */ srcPixelFormat = 6407;\n/* */ } \n/* */ \n/* */ \n/* 115 */ ByteBuffer textureBuffer = data.imageToByteBuffer(bufferedImage, false, false, null);\n/* 116 */ texture.setTextureHeight(data.getTexHeight());\n/* 117 */ texture.setTextureWidth(data.getTexWidth());\n/* 118 */ texture.setAlpha((data.getDepth() == 32));\n/* */ \n/* 120 */ if (target == 3553) {\n/* 121 */ Renderer.get().glTexParameteri(target, 10241, minFilter);\n/* 122 */ Renderer.get().glTexParameteri(target, 10240, magFilter);\n/* */ \n/* 124 */ if (Renderer.get().canTextureMirrorClamp()) {\n/* 125 */ Renderer.get().glTexParameteri(3553, 10242, 34627);\n/* 126 */ Renderer.get().glTexParameteri(3553, 10243, 34627);\n/* */ } else {\n/* 128 */ Renderer.get().glTexParameteri(3553, 10242, 10496);\n/* 129 */ Renderer.get().glTexParameteri(3553, 10243, 10496);\n/* */ } \n/* */ } \n/* */ \n/* 133 */ Renderer.get().glTexImage2D(target, \n/* 134 */ 0, \n/* 135 */ dstPixelFormat, \n/* 136 */ texture.getTextureWidth(), \n/* 137 */ texture.getTextureHeight(), \n/* 138 */ 0, \n/* 139 */ srcPixelFormat, \n/* 140 */ 5121, \n/* 141 */ textureBuffer);\n/* */ \n/* 143 */ return (Texture)texture;\n/* */ }", "public void setParameters(MaterialParams mp);", "public void backBufferIntoTexture()\r\n\t{\r\n\t\tgl.glEnable(GL_TEXTURE_2D);\r\n\t\tgl.glShadeModel(GL_FLAT);\r\n\t\tif (InternalTexture[0] == 0) {\r\n\t\t\tgl.glGenTextures(1,InternalTexture);\r\n\t\t\tSystem.out.print(\"Initializing internal texture \"+InternalTexture[0]+\":[\"+getWidth()+\",\"+getHeight()+\"]\\n\");\r\n\t\t\tgl.glBindTexture(GL_TEXTURE_2D, InternalTexture[0]);\r\n\t\t\tgl.glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, this.getWidth(), this.getHeight(), 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgl.glBindTexture(GL_TEXTURE_2D, InternalTexture[0]);\r\n\t\t\tgl.glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, this.getWidth(), this.getHeight());\r\n\t\t}\r\n\t\tglut.glutReportErrors();\r\n\t}", "@Override\n\tpublic String getTextureFile() \n\t{\n\t\treturn \"/reactioncraft/rcs/Blocks.png\";\n\t}", "@Element \n public String getMaterial() {\n return material;\n }", "Material getMaterial(ItemStack stack);", "public Texture createTexture(int width, int height) throws IOException {\n/* 360 */ return createTexture(width, height, 9728);\n/* */ }", "@Override\n\tpublic String getTextureFile() {\n\t\treturn \"/reactioncraft/rcs/Blocks.png\";\n\t}", "public java.lang.String getMATERIAL() {\r\n return MATERIAL;\r\n }", "void texImage2D(int target, int level, int resourceId, int border);", "private void renderSprite(RenderEntity ent) {\n float radius = ent.radius;\n boolean useAxis = (ent.flags & RenderEntity.FLAG_SPRITE_AXIS) == RenderEntity.FLAG_SPRITE_AXIS;\n if(useAxis) {\n left.set(ent.axis[0]);\n up.set(ent.axis[1]);\n } else {\n left.set(view.ViewAxis[1]);\n up.set(view.ViewAxis[2]);\n }\n left.scale(radius);\n up.scale(-radius);\n\n float s1 = 0, t1 = 0, s2 = 1, t2 = 1;\n \n if(ent.mat != null && ent.mat.getTexture() != null) {\n Vector2f texSize = ent.mat.getTextureSize();\n Vector2f texOffset = ent.mat.getTextureOffset(ent.frame);\n s1 = texOffset.x;\n t1 = texOffset.y;\n s2 = s1 + texSize.x;\n t2 = t1 + texSize.y;\n } \n \n boolean rendernow = !r_batchsprites.isTrue() || currentRenderFlags != RF_POSTDEFERRED;\n if(rendernow) {\n // Setup render state\n if(ent.mat != null && ent.mat.getTexture() != null) {\n // Grab texture offsets from material\n ent.mat.getTexture().Bind();\n if(ent.mat.blendmode == CubeMaterial.BlendMode.ONE) {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);\n } else {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);\n }\n } else {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);\n Ref.ResMan.getWhiteTexture().Bind();\n }\n\n GL11.glDisable(GL11.GL_CULL_FACE);\n GL11.glDepthMask(false); // dont write to depth\n\n AddQuadStampExt(ent.origin, left, up, ent.outcolor,s1,t1,s2,t2);\n\n // clear renderstate\n GL11.glEnable(GL11.GL_CULL_FACE);\n GL11.glDepthMask(true);\n } else {\n // add to polygon batch and render later\n polyBatcher.addSpriteCall(ent);\n ByteBuffer dst = polyBatcher.getMappedBuffer();\n writeQuadStamp(dst, ent.origin, left, up, ent.outcolor,s1,t1,s2,t2);\n }\n }", "private Quad getQuad() {\n final BufferedImage img = getImage();\n if(img == null){\n logger.severe(\"[tweet node] image is null!!!\");\n }\n\n float w = img.getWidth();\n float h = img.getHeight();\n \n height3D = h * fontSizeModifier;\n final Quad ret = new Quad(\"tweet node\", w * fontSizeModifier, height3D);\n\n ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {\n public void update(Object arg0) {\n TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();\n Texture tex = TextureManager.loadTexture(img, MinificationFilter.BilinearNoMipMaps, MagnificationFilter.Bilinear, true);\n \n ts.setTexture(tex);\n ts.setEnabled(true);\n ret.setRenderState(ts);\n\n ret.setRenderQueueMode(Renderer.QUEUE_TRANSPARENT);\n\n BlendState as = DisplaySystem.getDisplaySystem().getRenderer().createBlendState();\n as.setBlendEnabled(true);\n as.setTestEnabled(true);\n as.setTestFunction(TestFunction.GreaterThan);\n as.setEnabled(true);\n ret.setRenderState(as);\n\n ret.setLightCombineMode(LightCombineMode.Off);\n ret.updateRenderState();\n\n ClientContextJME.getWorldManager().addToUpdateList(TweetNode.this);\n }\n }, null);\n\n return ret;\n }", "ExpMaterial createExpMaterial(Container container, Lsid lsid);", "private TextureImpl getTexture(InputStream in, String resourceName, int target, int magFilter, int minFilter, boolean flipped, int[] transparent) throws IOException {\n/* 291 */ LoadableImageData imageData = ImageDataFactory.getImageDataFor(resourceName);\n/* 292 */ ByteBuffer textureBuffer = imageData.loadImage(new BufferedInputStream(in), flipped, transparent);\n/* */ \n/* 294 */ int textureID = createTextureID();\n/* 295 */ TextureImpl texture = new TextureImpl(resourceName, target, textureID);\n/* */ \n/* 297 */ GL.glBindTexture(target, textureID);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 306 */ int width = imageData.getWidth();\n/* 307 */ int height = imageData.getHeight();\n/* 308 */ boolean hasAlpha = (imageData.getDepth() == 32);\n/* */ \n/* 310 */ texture.setTextureWidth(imageData.getTexWidth());\n/* 311 */ texture.setTextureHeight(imageData.getTexHeight());\n/* */ \n/* 313 */ int texWidth = texture.getTextureWidth();\n/* 314 */ int texHeight = texture.getTextureHeight();\n/* */ \n/* 316 */ IntBuffer temp = BufferUtils.createIntBuffer(16);\n/* 317 */ GL.glGetInteger(3379, temp);\n/* 318 */ int max = temp.get(0);\n/* 319 */ if (texWidth > max || texHeight > max) {\n/* 320 */ throw new IOException(\"Attempt to allocate a texture to big for the current hardware\");\n/* */ }\n/* */ \n/* 323 */ int srcPixelFormat = hasAlpha ? 6408 : 6407;\n/* 324 */ int componentCount = hasAlpha ? 4 : 3;\n/* */ \n/* 326 */ texture.setWidth(width);\n/* 327 */ texture.setHeight(height);\n/* 328 */ texture.setAlpha(hasAlpha);\n/* */ \n/* 330 */ if (this.holdTextureData) {\n/* 331 */ texture.setTextureData(srcPixelFormat, componentCount, minFilter, magFilter, textureBuffer);\n/* */ }\n/* */ \n/* 334 */ GL.glTexParameteri(target, 10241, minFilter);\n/* 335 */ GL.glTexParameteri(target, 10240, magFilter);\n/* */ \n/* */ \n/* 338 */ GL.glTexImage2D(target, \n/* 339 */ 0, \n/* 340 */ this.dstPixelFormat, \n/* 341 */ get2Fold(width), \n/* 342 */ get2Fold(height), \n/* 343 */ 0, \n/* 344 */ srcPixelFormat, \n/* 345 */ 5121, \n/* 346 */ textureBuffer);\n/* */ \n/* 348 */ return texture;\n/* */ }", "public void setTexture(String texture) {\n this.texture = texture;\n }", "public void setMaterial(java.lang.String material) {\r\n this.material = material;\r\n }", "protected ResourceLocation getEntityTexture(Entity par1Entity)\n {\n return this.func_110914_a((EntitySpiritWolf)par1Entity);\n }", "public boolean shouldCombineTextures() {\n/* 210 */ return false;\n/* */ }", "void addTextureCoordinate(Vector t);", "Texture getIcon();", "public TextureRegion getTexture() {\n \treturn texture;\n }", "public void createMaterialUniform(String uniformName) {\n createUniform(uniformName + \".color\");\n createUniform(uniformName + \".hasTexture\");\n createUniform(uniformName + \".reflectance\");\n }", "public Texture getTexture() {\n\t\treturn region;\n\t}", "public TextureComponent2D getTexture(int side)\n {\n return texture[side];\n }", "public Tex(GL10 gl, Context context, int resource_id)\n\t{\n\t\t/* singleton instance of Mesh */\n\t\tif(first_time == true)\n\t\t{\n\t\t\tmkMesh();\n\t\t\tfirst_time = false;\n\t\t}\n\n\t\tthis.gl = gl;\n\t\tthis.texture_id = newTexture(context, resource_id);\n\t}", "public void setTexture(PImage image) {\n //m_tImage = image;\n m_texture = image.pixels;\n TEX_WIDTH = image.width;\n TEX_HEIGHT = image.height;\n F_TEX_WIDTH = TEX_WIDTH-1;\n F_TEX_HEIGHT = TEX_HEIGHT-1;\n INTERPOLATE_UV = true;\n \n if (image.format == ARGB) {\n m_drawFlags |= R_TEXTURE32;\n } else if (image.format == RGB) {\n m_drawFlags |= R_TEXTURE24;\n } else if (image.format == ALPHA) {\n m_drawFlags |= R_TEXTURE8;\n }\n }", "@Test\n public void trianglesTransparentSphere() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(new Point3D(0, 0, -1000), new Vector(0, 0, 1), new Vector(0, -1, 0)));\n scene.setDistance(1000);\n scene.setBackground(Color.BLACK);\n scene.setAmbientLight(new AmbientLight(new Color(java.awt.Color.WHITE), 0.15));\n\n scene.addGeometries( //\n new Triangle(Color.BLACK, new Material(0.5, 0.5, 60), //Right triangle\n new Point3D(-150, 150, 115), new Point3D(150, 150, 135), new Point3D(75, -75, 150)), //\n new Triangle(Color.BLACK, new Material(0.5, 0.5, 60), //\n new Point3D(-150, 150, 115), new Point3D(-70, -70, 140), new Point3D(75, -75, 150)), //\n new Sphere(new Color(java.awt.Color.BLUE), new Material(0.2, 0.2, 30, 0, 0.3), // )\n 30, new Point3D(60, -50, 50)),\n new Triangle(Color.BLACK, new Material(0.3, 0.3, 30), new Point3D(-30, 20, 100),\n new Point3D(-15, 30, 95), new Point3D(17, 87, 122)));\n\n scene.addLights(new SpotLight(new Color(700, 400, 400), //\n new Point3D(60, -50, 0), 1, 4E-5, 2E-7, new Vector(0, 0, 1)).setRadius(12));\n\n ImageWriter imageWriter = new ImageWriter(\"soft shadow without transparency + triangle between - 500Ray 12Radius\", 200, 200, 600, 600);\n Render render = new Render(imageWriter, scene).setSuperSampling(500).setMultithreading(3).setDebugPrint();\n\n render.renderImage();\n render.writeToImage();\n }", "public MTImage(PImage texture, PApplet pApplet) {\n this(pApplet, texture);\n }", "public void setMaterial(NBTTagCompound tag) {\n if(tag!=null && tag.hasKey(Names.NBT.material) && tag.hasKey(Names.NBT.materialMeta)) {\n this.materialName = tag.getString(Names.NBT.material);\n this.materialMeta = tag.getInteger(Names.NBT.materialMeta);\n }\n }", "public String getMaterial () {\r\n return getItemStack().getTypeId()+ \":\" + getItemStack().getDurability(); \r\n\t}", "LocalMaterialData withDefaultBlockData();", "public int getId() {\r\n \t\r\n \treturn textureId;\r\n }", "private org.bukkit.material.Sign getSignMaterial() {\r\n if (this.getBlock() == null) return null;\r\n \r\n org.bukkit.material.Sign material = new org.bukkit.material.Sign(this.getBlock().getType());\r\n material.setData(this.getBlock().getData());\r\n return material;\r\n }", "MaterialAsset resolveAsset( MaterialAsset asset );", "@Override\r\n\tpublic Material material() {\n\t\treturn Material.REDSTONE;\r\n\t}", "LocalMaterialData rotate();", "public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }", "public void renderInvBlock(bbb renderblocks, int md)\r\n/* 73: */ {\r\n/* 74: 72 */ this.block.f();\r\n/* 75: */ \r\n/* 76: 74 */ this.context.setDefaults();\r\n/* 77: 75 */ this.context.setPos(-0.5D, -0.5D, -0.5D);\r\n/* 78: 76 */ this.context.useNormal = true;\r\n/* 79: 77 */ this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);\r\n/* 80: */ \r\n/* 81: 79 */ RenderLib.bindTexture(\"/eloraam/machine/machine1.png\");\r\n/* 82: 80 */ baz tessellator = baz.a;\r\n/* 83: */ \r\n/* 84: 82 */ tessellator.b();\r\n/* 85: 83 */ this.context.useNormal = true;\r\n/* 86: */ \r\n/* 87: */ \r\n/* 88: 86 */ this.context.setTex(28, 28, 26, 26, 26, 26);\r\n/* 89: */ \r\n/* 90: 88 */ this.context.renderBox(60, 0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D);\r\n/* 91: 89 */ this.context.renderBox(60, 0.6240000128746033D, 0.9990000128746033D, 0.6240000128746033D, 0.3759999871253967D, 0.001000000047497451D, 0.3759999871253967D);\r\n/* 92: 90 */ renderFlanges(3, 27);\r\n/* 93: */ \r\n/* 94: 92 */ tessellator.a();\r\n/* 95: 93 */ RenderLib.unbindTexture();\r\n/* 96: 94 */ this.context.useNormal = false;\r\n/* 97: */ }", "@Element \n public void setMaterial(String material) {\n this.material = material;\n }", "public void changeBodyTexture(String aTextureName)\n {\n // If you want, you can target a specific part of the robot\n // and only change the texture of this part by using the getChildByName(\"\")\n \t/* Passing through all the children of the robot\n \t * and applying a new texture on them */\n for(int i = 0;i<androidRobot3DObject.numChildren();i++)\n {\n String name = androidRobot3DObject.getChildAt(i).name();\n Log.d(\"min3d\", \"Texture name: \" + name);\n\n if(name.indexOf(\"body\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(aTextureName);\n }\n }\n }", "public void addMaterial(PlayerMaterialSql materialSql) {\n\t}", "protected Texture initializeTexture(DrawContext dc)\n {\n if (this.sourceTexture != null && dc.getTextureCache().get(sourceTexture.getImageSource()) == null)\n {\n // Limit FBO size to the max OGL size or 4k, whichever is smaller\n int maxSize = Math.min(dc.getGLRuntimeCapabilities().getMaxTextureSize(), 4096);\n\n sourceTexture.bind(dc); // bind loads the image and sets the width and height\n if (sourceTexture.getWidth(dc) != 0 && sourceTexture.getHeight(dc) != 0)\n {\n this.width = Math.min(maxSize, sourceTexture.getWidth(dc));\n this.height = Math.min(maxSize, sourceTexture.getHeight(dc));\n }\n }\n\n GL gl = GLContext.getCurrent().getGL();\n\n int[] fbo = new int[1];\n gl.glGenFramebuffersEXT(1, fbo, 0);\n gl.glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, fbo[0]);\n\n TextureData td = new TextureData(GL.GL_RGBA, this.width, this.height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE,\n false, false, true, BufferUtil.newByteBuffer(this.width * this.height * 4), null);\n Texture t = TextureIO.newTexture(td);\n t.bind();\n\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE);\n\n gl.glFramebufferTexture2DEXT(GL.GL_FRAMEBUFFER_EXT, GL.GL_COLOR_ATTACHMENT0_EXT, GL.GL_TEXTURE_2D,\n t.getTextureObject(), 0);\n\n int status = gl.glCheckFramebufferStatusEXT(GL.GL_FRAMEBUFFER_EXT);\n if (status == GL.GL_FRAMEBUFFER_COMPLETE_EXT)\n {\n this.generateTexture(dc, this.width, this.height);\n gl.glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, 0);\n gl.glDeleteFramebuffersEXT(1, fbo, 0);\n }\n else\n {\n throw new IllegalStateException(\"Frame Buffer Oject not created.\");\n }\n\n dc.getTextureCache().put(this, t);\n\n return t;\n }", "public Texture getTexture(ImageData dataSource, int filter) throws IOException {\n/* 387 */ int target = 3553;\n/* */ \n/* */ \n/* 390 */ ByteBuffer textureBuffer = dataSource.getImageBufferData();\n/* */ \n/* */ \n/* 393 */ int textureID = createTextureID();\n/* 394 */ TextureImpl texture = new TextureImpl(\"generated:\" + dataSource, target, textureID);\n/* */ \n/* 396 */ int minFilter = filter;\n/* 397 */ int magFilter = filter;\n/* 398 */ boolean flipped = false;\n/* */ \n/* */ \n/* 401 */ GL.glBindTexture(target, textureID);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 410 */ int width = dataSource.getWidth();\n/* 411 */ int height = dataSource.getHeight();\n/* 412 */ boolean hasAlpha = (dataSource.getDepth() == 32);\n/* */ \n/* 414 */ texture.setTextureWidth(dataSource.getTexWidth());\n/* 415 */ texture.setTextureHeight(dataSource.getTexHeight());\n/* */ \n/* 417 */ int texWidth = texture.getTextureWidth();\n/* 418 */ int texHeight = texture.getTextureHeight();\n/* */ \n/* 420 */ int srcPixelFormat = hasAlpha ? 6408 : 6407;\n/* 421 */ int componentCount = hasAlpha ? 4 : 3;\n/* */ \n/* 423 */ texture.setWidth(width);\n/* 424 */ texture.setHeight(height);\n/* 425 */ texture.setAlpha(hasAlpha);\n/* */ \n/* 427 */ IntBuffer temp = BufferUtils.createIntBuffer(16);\n/* 428 */ GL.glGetInteger(3379, temp);\n/* 429 */ int max = temp.get(0);\n/* 430 */ if (texWidth > max || texHeight > max) {\n/* 431 */ throw new IOException(\"Attempt to allocate a texture to big for the current hardware\");\n/* */ }\n/* */ \n/* 434 */ if (this.holdTextureData) {\n/* 435 */ texture.setTextureData(srcPixelFormat, componentCount, minFilter, magFilter, textureBuffer);\n/* */ }\n/* */ \n/* 438 */ GL.glTexParameteri(target, 10241, minFilter);\n/* 439 */ GL.glTexParameteri(target, 10240, magFilter);\n/* */ \n/* */ \n/* 442 */ GL.glTexImage2D(target, \n/* 443 */ 0, \n/* 444 */ this.dstPixelFormat, \n/* 445 */ get2Fold(width), \n/* 446 */ get2Fold(height), \n/* 447 */ 0, \n/* 448 */ srcPixelFormat, \n/* 449 */ 5121, \n/* 450 */ textureBuffer);\n/* */ \n/* 452 */ return texture;\n/* */ }", "private void initRendering() {\n\t\tmActivity.showDebugMsg(\" initRendering\");\n\t\tGLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f : 1.0f);\n\n\t\tfor (Texture t : mTextures) {\n\t\t\tGLES20.glGenTextures(1, t.mTextureID, 0);\n\t\t\tGLES20.glBindTexture(GLES20.GL_TEXTURE_2D, t.mTextureID[0]);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, t.mWidth, t.mHeight, 0, GLES20.GL_RGBA,\n\t\t\t\t\tGLES20.GL_UNSIGNED_BYTE, t.mData);\n\t\t}\n\n\t\tshaderProgramID = ArUtils.createProgramFromShaderSrc(\n\t\t\t\tShaders.CUBE_MESH_VERTEX_SHADER,\n\t\t\t\tShaders.CUBE_MESH_FRAGMENT_SHADER);\n\n\t\tvertexHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexPosition\");\n\t\ttextureCoordHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexTexCoord\");\n\t\tmvpMatrixHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"modelViewProjectionMatrix\");\n\t\ttexSampler2DHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"texSampler2D\");\n\n\t\tif (!mModelIsLoaded) {\n\t\t\t//object = new Teapot();\n\t\t\tobject = mActivity.get3DObject();\n\t\t\tobjectScaleFloat *= object.getDefScale();\n\t\t\t//minObjectScale *= object.getDefScale();\n\t\t\t//maxObjectScale *= object.getDefScale();\n\n\t\t\tmActivity.showDebugMsg(\"Loading model Teapot\");\n\t\t\t// Hide the Loading Dialog\n\t\t\t//mActivity.loadingDialogHandler.sendEmptyMessage(LoadingDialogHandler.HIDE_DIALOG);\n\t\t}\n\n\t}", "private void materialSetup(GL gl)\n {\n\tfloat white[] = { 1.0f, 1.0f, 1.0f, 1.0f };\n\tfloat black[] = { 0.0f, 0.0f, 0.0f, 1.0f };\n\tfloat dim[] = { 0.1f, 0.1f, 0.1f, 1.0f };\n\t\n\t// Set up material and light\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT, dim, 0);\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE, white, 0);\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, dim, 0);\n\tgl.glMaterialf(GL.GL_FRONT_AND_BACK, GL.GL_SHININESS, 5);\n\n\t// Set light color\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, dim, 0);\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, white, 0);\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, black, 0);\n\n\t// Turn on light and lighting\n\tgl.glEnable(GL.GL_LIGHT0);\n\tgl.glEnable(GL.GL_LIGHTING);\n\n\t// Allow glColor() to affect current diffuse material\n\tgl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE);\n\tgl.glEnable(GL.GL_COLOR_MATERIAL);\n }", "public ModelElephant()\n {\n \tint par1 = 12;\n \tint textureWidth = 256;\n \tint textureHeight = 128;\n \t\n \t// head\n head = new ModelRenderer(this, 0, 0);\n head.setTextureSize(textureWidth, textureHeight);\n head.addBox(-4F, -4F, -6F, 10, 10, 7);\n // remember default rotation point to allow for return after rearing animation\n headRotPointXDefault = -1F;\n headRotPointYDefault = 18 - par1;\n headRotPointZDefault = -10F;\n head.setRotationPoint(headRotPointXDefault, headRotPointYDefault, headRotPointZDefault);\n // add head's children models (ears, trunk, tusks)\n ear1 = new ModelRenderer(this, 34, 8);\n ear1.setTextureSize(textureWidth, textureHeight);\n ear1.addBox(-7F, -4F, -0.5F, 7, 8, 1);\n ear1.setRotationPoint(-3F, -1F, -2F);\n head.addChild(ear1);\n ear2 = new ModelRenderer(this, 34, 8);\n ear2.setTextureSize(textureWidth, textureHeight);\n ear2.addBox(0F, -4F, -0.5F, 7, 8, 1);\n ear2.setRotationPoint(4F, -1F, -2F);\n head.addChild(ear2);\n trunk1 = new ModelRenderer(this, 20, 50);\n trunk1.setTextureSize(textureWidth, textureHeight);\n trunk1.addBox(-2F, 0F, -1.5F, 4, 11, 3);\n trunk1.setRotationPoint(1F, 0F, -6F);\n head.addChild(trunk1);\n // trunk tip is child of trunk\n trunk2 = new ModelRenderer(this, 20, 50);\n trunk2.setTextureSize(textureWidth, textureHeight);\n trunk2.addBox(-2F, 0F, -1.5F, 4, 5, 3);\n trunk2.setRotationPoint(0F, 10F, 0F);\n trunk1.addChild(trunk2);\n // tusks\n tusk1 = new ModelRenderer(this, 34, 1);\n tusk1.setTextureSize(textureWidth, textureHeight);\n tusk1.addBox(-0.5F, -0.5F, 0F, 1, 1, 6);\n tusk1.setRotationPoint(-1.5F, 2F, -6F);\n tusk1.rotateAngleX = degToRad(-160);\n head.addChild(tusk1);\n tusk2 = new ModelRenderer(this, 34, 1);\n tusk2.setTextureSize(textureWidth, textureHeight);\n tusk2.addBox(4.5F, -0.5F, 0F, 1, 1, 6);\n tusk2.setRotationPoint(-1.5F, 2F, -6F);\n tusk2.rotateAngleX = degToRad(-160);\n head.addChild(tusk2);\n body = new ModelRenderer(this, 0, 17);\n body.setTextureSize(textureWidth, textureHeight);\n body.addBox(-8F, -10F, -7F, 16, 21, 12);\n bodyRotPointXDefault = 0F;\n bodyRotPointYDefault = 17 - par1;\n bodyRotPointZDefault = 1F;\n body.setRotationPoint(bodyRotPointXDefault, bodyRotPointYDefault, bodyRotPointZDefault);\n legRearRight = new ModelRenderer(this, 0, 50);\n legRearRight.setTextureSize(textureWidth, textureHeight);\n legRearRight.addBox(-3F, 0F, -2F, 5, 13, 5);\n legRearRight.setRotationPoint(-5F, 11F, 8F);\n legRearLeft = new ModelRenderer(this, 0, 50);\n legRearLeft.setTextureSize(textureWidth, textureHeight);\n legRearLeft.addBox(-1F, 0F, -1F, 5, 13, 5);\n legRearLeft.setRotationPoint(4F, 11F, 7F);\n legFrontRight = new ModelRenderer(this, 0, 50);\n legFrontRight.setTextureSize(textureWidth, textureHeight);\n legFrontRight.addBox(-3F, 0F, -3F, 5, 13, 5);\n legFrontRightRotPointXDefault = -5F;\n legFrontRightRotPointYDefault = 11F;\n legFrontRightRotPointZDefault = -6F;\n legFrontRight.setRotationPoint(legFrontRightRotPointXDefault, legFrontRightRotPointYDefault, legFrontRightRotPointZDefault);\n legFrontLeft = new ModelRenderer(this, 0, 50);\n legFrontLeft.setTextureSize(textureWidth, textureHeight);\n legFrontLeft.addBox(-1F, 0F, -3F, 5, 13, 5);\n legFrontLeftRotPointXDefault = 4F;\n legFrontLeftRotPointYDefault = 11F;\n legFrontLeftRotPointZDefault = -6F;\n legFrontLeft.setRotationPoint(legFrontLeftRotPointXDefault, legFrontLeftRotPointYDefault, legFrontLeftRotPointZDefault);\n\n \t// head for baby entity\n childHead = new ModelRenderer(this, 0, 0);\n childHead.setTextureSize(textureWidth, textureHeight);\n childHead.addBox(-4F, -4F, -6F, 10, 10, 7);\n childHeadRotPointXDefault = 0F;\n childHeadRotPointYDefault = 18 - par1;\n childHeadRotPointZDefault = -9.0F;\n childHead.setRotationPoint(childHeadRotPointXDefault, childHeadRotPointYDefault, childHeadRotPointZDefault);\n // add head's children models (ears, trunk, tusks)\n childEar1 = new ModelRenderer(this, 34, 8);\n childEar1.setTextureSize(textureWidth, textureHeight);\n childEar1.addBox(-7F, -4F, -0.5F, 7, 8, 1);\n childEar1.setRotationPoint(-3F, -1F, -2F);\n childHead.addChild(childEar1);\n childEar2 = new ModelRenderer(this, 34, 8);\n childEar2.setTextureSize(textureWidth, textureHeight);\n childEar2.addBox(0F, -4F, -0.5F, 7, 8, 1);\n childEar2.setRotationPoint(4F, -1F, -2F);\n childHead.addChild(childEar2);\n childTrunk1 = new ModelRenderer(this, 20, 50);\n childTrunk1.setTextureSize(textureWidth, textureHeight);\n childTrunk1.addBox(-2F, 0F, -1.5F, 4, 8, 3);\n childTrunk1.setRotationPoint(1F, 0F, -6F);\n childHead.addChild(childTrunk1);\n\n }", "public Texture(int target, int textureID) {\n\tthis.target = target;\n\tthis.textureID = textureID;\n }" ]
[ "0.662382", "0.6472454", "0.6387719", "0.62882495", "0.6168721", "0.6132725", "0.6092472", "0.6084425", "0.60364956", "0.60364956", "0.60095125", "0.597639", "0.59476936", "0.59233516", "0.5919734", "0.5916443", "0.5901159", "0.5826998", "0.5824183", "0.58181864", "0.58133435", "0.58125263", "0.58125263", "0.57857865", "0.57808095", "0.5778606", "0.57737714", "0.5759373", "0.5751608", "0.57490784", "0.57357407", "0.57126004", "0.5703968", "0.56980115", "0.5696406", "0.5693308", "0.56913716", "0.5689592", "0.56866574", "0.5684615", "0.56740695", "0.56625146", "0.5640661", "0.5610708", "0.5608294", "0.55935687", "0.55921435", "0.55879676", "0.55785227", "0.5576734", "0.55623406", "0.5551455", "0.55470496", "0.5518541", "0.5510996", "0.5509117", "0.54874194", "0.54821885", "0.54669523", "0.5466607", "0.546432", "0.54621994", "0.54612356", "0.545832", "0.54567266", "0.5447716", "0.54270023", "0.5397527", "0.53815675", "0.5377816", "0.5366996", "0.5354425", "0.5350832", "0.5347315", "0.5340623", "0.5334943", "0.5331284", "0.53172714", "0.53084624", "0.5302613", "0.5297669", "0.5297226", "0.52957565", "0.5294757", "0.5292386", "0.5291418", "0.5290553", "0.5289873", "0.52893406", "0.5284188", "0.5283494", "0.5282881", "0.5276781", "0.5272784", "0.5272043", "0.52714115", "0.5271409", "0.5264123", "0.52633476", "0.52618676" ]
0.67862004
0
Created by gaowe on 2017/7/6.
public interface FacebookShareListener { void OnShareSuccess(Sharer.Result result); void onShareCancel(); void OnShareError(FacebookException error); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n protected void getExras() {\n }", "private void m50366E() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void initialize() \n {\n \n }", "private void init() {\n\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void init() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "private void strin() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}" ]
[ "0.6047531", "0.5900707", "0.5688597", "0.5688208", "0.56761163", "0.5669093", "0.5669093", "0.56293994", "0.55871725", "0.5569222", "0.5551367", "0.55493134", "0.5534977", "0.5528703", "0.55044055", "0.55004245", "0.5488785", "0.54805857", "0.5478061", "0.54702055", "0.5467001", "0.5465038", "0.54574794", "0.5451045", "0.5447904", "0.5447904", "0.5447904", "0.5447904", "0.5447904", "0.5447904", "0.54338855", "0.54338855", "0.54338855", "0.54338855", "0.54338855", "0.5431663", "0.54186726", "0.54176074", "0.5414827", "0.5406498", "0.5386529", "0.5383594", "0.53778356", "0.5373831", "0.5363751", "0.5360825", "0.5348353", "0.5348353", "0.5344986", "0.5344986", "0.5344986", "0.5344792", "0.53428763", "0.53398377", "0.53398377", "0.5339385", "0.5338458", "0.53337336", "0.53185487", "0.5308608", "0.53084046", "0.5303736", "0.5303736", "0.5298023", "0.52958584", "0.529236", "0.52910084", "0.52910084", "0.52910084", "0.5285946", "0.5285946", "0.5285946", "0.5285687", "0.52856284", "0.52810144", "0.527478", "0.52713513", "0.52644926", "0.52399117", "0.52330893", "0.5231417", "0.5230317", "0.5230317", "0.5230317", "0.5230317", "0.5230317", "0.5230317", "0.5230317", "0.5226622", "0.5218544", "0.5218544", "0.5218544", "0.51993775", "0.5196879", "0.5185489", "0.51848567", "0.51844305", "0.5176725", "0.51749843", "0.5171592", "0.5171592" ]
0.0
-1
Construct a new TransportTruck instance
TransportTruck() { x = 0; y = 0; nrDoors = 2; enginePower = 1000; currentSpeed = 0; color = Color.red; modelName = "Transport Truck"; storage = new StorageUnit(this, 5); stopEngine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Truck(){\n }", "abstract public Transports createTransports();", "public TruckManager() {\r\n super(Truck.TRUCKS);\r\n }", "public Transportista() {\n }", "public FridgeTruck(){\n\t\tsuper();\n\t\tthis.maxTemp = 10; // degrees Celsius\n\t\tsetCost(maxTemp);\n\t\tthis.maxCapacity = 800;\n\t}", "public Trip() {}", "public static Truck nextTruck(){\n Truck truck = null;\n Random r = new Random();\n switch (r.nextInt(2)){\n case 0: {\n truck = new Pickup(4000 + r.nextInt(2000), 10 + r.nextInt(10),\n 150 + r.nextInt(50), 4 + r.nextInt(4));\n break;\n }\n case 1: {\n truck = new Van(5000 + r.nextInt(2000), 12 + r.nextInt(10),\n 180 + r.nextInt(50), 3 + r.nextInt(2));\n break;\n }\n }\n return truck;\n }", "@Override\n\tprotected Trunk makeNew(final TwilioTrunkingClient client, final Map<String, Object> params) {\n\t\treturn new Trunk(client, params);\n\t}", "public Trip() {\n }", "public static ITransport newInstance (HashMap properties)\n throws TransportException\n {\n String name = null;\n if (properties != null)\n name = (String) properties.get (_TRANSPORT_PROPERTY);\n if (name == null)\n throw new TransportException (\"no transport specified\");\n\n for (int i = 0; i < _transportMethods.length; ++i)\n {\n\tif (_transportMethods[i].name.equals (name))\n\t {\n\t try\n\t {\n\t\tITransport t;\n\t\tt = (ITransport) _transportMethods[i].clazz.newInstance ();\n\t\tt.configure (properties);\n\t\treturn t;\n\t }\n\t catch (TransportException te)\n\t {\n\t\tthrow te;\n\t }\n\t catch (Exception e)\n\t {\n\t\tthrow new TransportException (e);\n\t }\n\t }\n }\n\n throw new TransportException (\"transport \\\"\" + name + \"\\\" not found\");\n }", "public TaxiInformationController() {\n }", "protected Settlement() {\n // empty constructor\n }", "public Transportador()\n {\n super();\n this.transporte = true;\n this.transporte_medico = false;\n this.classificacao = new HashMap<>();\n this.encomendas = new HashMap<>();\n this.raio = 0.0;\n }", "public Truck()\r\n {\r\n super.setVehIs(VEHICLE_IS);\r\n // this.showMenu();\r\n }", "ITransport createTransport(T netconfAccessInfo) throws NetconfException;", "private TbusRoadGraph() {}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "TR createTR();", "public TransportJet(String model, String make, double speed, int range, long price, String type) {\n\t\tsuper(model, make, speed, range, price, type);\n\t}", "public TripManager() {\n }", "public Trade() {\n\t}", "@Override\n\tpublic Trunk create(final Map<String, String> params) throws TwilioRestException {\n\t\tfinal TwilioRestResponse response = getClient().safeRequest(getResourceLocation(), \"POST\", params);\n\t\treturn makeNew(getClient(), response.toMap());\n\t}", "public Trader(String traderName, Planet traderOrigin) {\n name = traderName;\n origin = traderOrigin;\n welcomeText = \"What're ya buy'in?\";\n }", "VehicleClass() {}", "public VueTroncon(Troncon troncon) {\r\n\t\tsuper();\r\n\t\tthis.troncon = troncon;\r\n\t}", "Vehicle createVehicle();", "Vehicle createVehicle();", "public OrdinaryTruck() {\n\t\tsuper();\n\t\tmaxCapacity = 1000;\n\t}", "public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }", "public Vehicle() {}", "@Override\n\tpublic Trunk create(final List<NameValuePair> params) throws TwilioRestException {\n\t\tfinal TwilioRestResponse response = getClient().safeRequest(getResourceLocation(), \"POST\", params);\n\t\treturn makeNew(getClient(), response.toMap());\n\t}", "private Taxi createTaxiInstance(String registration, Integer seatsNumber) {\n Taxi taxi = new Taxi();\n taxi.setRegistration(registration);\n taxi.setSeatsNumber(seatsNumber);\n return taxi;\n }", "public TPMTransportLog( int tpmManufacturer )\r\n {\r\n super();\r\n this.tpmManufacturer = tpmManufacturer;\r\n }", "public Vehicle(){}", "Trip(Time start_time, TTC start_station, String type, String number){\n this.START_TIME = start_time;\n this.START_STATION = start_station;\n this.deducted = 0;\n this.listOfStops = new ArrayList<>();\n this.TYPE = type;\n this.NUMBER = number;\n }", "public Truck(String color, int year, String make, boolean cargo){\n super (color, year, make);\n this.cargo = cargo;\n }", "public TAccountTicketFlow(){}", "public Forecasting() {\n }", "public Trening() {\n }", "public Trip(Vehicle v, boolean round) {\r\n this.vehicle = v;\r\n roundTrip = round;\r\n }", "public Transportadora() {\r\n super();\r\n this.nif = \"\";\r\n this.raio = 0;\r\n this.precoKm = 0;\r\n this.classificacao = new Classificacao();\r\n this.estaLivre = true;\r\n this.velocidadeMed = 0;\r\n this.kmsTotal = 0;\r\n this.capacidade = 0;\r\n }", "public TTau() {}", "Flight() {}", "public ProtoVehicle() {\n super();\n }", "public Vehicle() {\n\n\t}", "public OrdinaryTruck(int itemQuantity)\n {\n this.itemQuantity = itemQuantity;\n }", "public TTransportFactory createTransportFactory(Map<String, String> saslProps)\n throws TTransportException {\n\n TSaslServerTransport.Factory transFactory = createSaslServerTransportFactory(saslProps);\n\n return new TUGIAssumingTransportFactory(transFactory, clientValidationUGI);\n }", "TRule createTRule();", "private UTruck(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Vehicle() {\n }", "public <T extends Vehicle> T getVehicle(Class<T> tClass){\n try {\n return tClass.getConstructor().newInstance();\n } catch (Exception e){\n throw new RuntimeException(\"Cannot create a vehicle of type: \" + tClass, e);\n }\n }", "public Vehicle() {\r\n\t\tthis.numOfDoors = 4;\r\n\t\tthis.price = 1;\r\n\t\tthis.yearMake = 2019;\r\n\t\tthis.make = \"Toyota\";\r\n\t}", "private void handleSendTruck(JSONObject payload) {\n var truckData = payload.getJSONObject(\"truck\");\n var truckId = truckData.getInt(\"id\");\n\n var from = this.parseGeolocation(truckData.getJSONObject(\"geolocation\"));\n var to = this.parseGeolocation(payload.getJSONObject(\"geolocation\"));\n\n // Retrieve an eventual existing truck handler\n var pair = this.trucks.get(truckId);\n var truckHandler = (TruckHandler) null;\n var thread = (Thread) null;\n\n if (pair == null) {\n var capacity = truckData.getInt(\"capacity\");\n\n // If no handler is assigned to the truck\n // the truck is at its station, so we create\n // a station at the current location of the truck\n var truck = new Truck(truckId, capacity, new Station(from));\n\n // Start a thread that will handle the truck\n // during it's whole life\n truckHandler = new TruckHandler(this.client, truck);\n thread = new Thread(truckHandler);\n\n // Add the handler to the truck map\n this.trucks.put(truckId, new Pair<TruckHandler, Thread>(truckHandler, thread));\n } else {\n // If the handler exists, we make the truck\n // start from it's current position\n truckHandler = pair.key;\n thread = pair.value;\n\n from = truckHandler.getTruck().getGeolocation();\n truckHandler.stop();\n\n try {\n thread.join();\n } catch (InterruptedException e) {\n // No one cares\n }\n\n thread = new Thread(truckHandler);\n }\n\n // Define the new destination of the truck\n var sensor = this.sensors.getNearGeolocation(to);\n truckHandler.setDestination(sensor);\n\n thread.start();\n }", "public Transportation(NetworkLayers.LAYER_DIRECTION layerDirection) {\n frame = MinT.getInstance();\n this.networkManager = frame.getNetworkManager();\n this.scheduler = frame.getSystemScheduler();\n \n if (layerDirection == NetworkLayers.LAYER_DIRECTION.RECEIVE) {\n syshandle = new SystemHandler();\n routing = networkManager.getRoutingProtocol();\n sharing = networkManager.getSharing();\n }\n\n if (layerDirection == NetworkLayers.LAYER_DIRECTION.SEND) {\n serialization = new MatcherAndSerialization(layerDirection);\n// if(frame.isBenchMode()){\n// bench_send = new PacketPerform(\"Trans-sender\");\n// frame.addPerformance(MinT.PERFORM_METHOD.Trans_Sender, bench_send);\n// }\n }\n }", "@Test\n public void TruckTest(){\n Size trucksize =new Size(190,450);\n Truck truck = new Truck(\"ABC123\",trucksize);\n Assert.assertEquals(\"Should be ABC123\",\"ABC123\",truck.getLicense_plate());\n Assert.assertEquals(\"should be trucksize\",trucksize,truck.getSize_truck());\n Assert.assertEquals(\"Should be ABC123\",\"ABC123\",truck.licensePlate());\n Assert.assertEquals(\"Should be Truck\",\"Truck\",truck.type());\n Assert.assertEquals(\"Should be 0\",0,truck.vehicleCharacteristic().size());\n Assert.assertEquals(\"Should be Truck\",\"Truck\",truck.getType());\n\n }", "public Train(int id, int speed, int direction, int ticket) {\n this.id = id;\n this.speed = speed;\n this.direction = direction;\n this.ticket = ticket;\n trackStatus[ticket].tryAcquire();\n }", "public AbstractVehicle() {\n // Dispatcher is a singleton\n this.dispatcher = StoreDispatcher.getInstance();\n this.distanceFromEachStore = this.dispatcher.registerVehicle(this);\n this.availableForDelivery = true;\n VIN = UUID.randomUUID();\n }", "public TicketBoothClient()\n {\n Thread myThread = new Thread(this);\n myThread.start();\n }", "public Train createTrain(int number, int capacity, int velocity){\n Train train = new Train();\n train.setNumber(number);\n train.setCapacity(capacity);\n train.setVelocity(velocity);\n return train;\n }", "public TestTicket() {\n\t}", "static public Tour makeTour() {\r\n Tour t = new Tour();\r\n t.index = null;\r\n return t;\r\n }", "public CacheTracabilityFactoryImpl() {\n\t\tsuper();\n\t}", "public TrainAbstract() {\n\t\tthis.id = \"\";\n\t\tthis.departure = new Departure();\n\t\tthis.arrivalTerminus = new ArrivalTerminus();\n\t\tthis.location = new Location(\"\", \"\");\n\t\tthis.stopPoints = new ArrayList<ArrivalStopPoint>();\n\t}", "public Telefone() {\n\t}", "public BuyTour() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Ticket(String destination, int price)\n {\n this.destination = destination;\n this.price = price;\n issueDateTime = new Date();\n \n }", "@Override\n public void setUp() throws Exception {\n transport = new TFramedTransport(new TSocket(\"123.56.206.195\", 1982));\n\n\n\n TProtocol protocol = new TBinaryProtocol(transport);\n client = new SubjectServ.Client(protocol);\n transport.open();\n }", "public TPCCClient(String args[]) {\n super(args);\n \n m_tpccConfig = TPCCConfig.createConfig(this.getCatalog(), m_extraParams);\n if (LOG.isDebugEnabled()) LOG.debug(\"TPC-C Client Configuration:\\n\" + m_tpccConfig);\n \n // makeForRun requires the value cLast from the load generator in\n // order to produce a valid generator for the run. Thus the sort\n // of weird eat-your-own ctor pattern.\n RandomGenerator.NURandC base_loadC = new RandomGenerator.NURandC(0,0,0);\n RandomGenerator.NURandC base_runC = RandomGenerator.NURandC.makeForRun(\n new RandomGenerator.Implementation(0), base_loadC);\n RandomGenerator rng = new RandomGenerator.Implementation(0);\n rng.setC(base_runC);\n \n RandomGenerator.NURandC base_loadC2 = new RandomGenerator.NURandC(0,0,0);\n RandomGenerator.NURandC base_runC2 = RandomGenerator.NURandC.makeForRun(\n new RandomGenerator.Implementation(0), base_loadC2);\n // RandomGenerator rng2 = new RandomGenerator.Implementation(0);\n rng.setC(base_runC2);\n \n HStoreConf hstore_conf = this.getHStoreConf();\n m_scaleParams = ScaleParameters.makeWithScaleFactor(m_tpccConfig.num_warehouses, m_tpccConfig.first_warehouse, hstore_conf.client.scalefactor);\n m_tpccSim = new TPCCSimulation(this, rng, new Clock.RealTime(), m_scaleParams, m_tpccConfig, hstore_conf.client.skewfactor);\n // m_tpccSim2 = new TPCCSimulation(this, rng2, new Clock.RealTime(), m_scaleParams, m_tpccConfig, hstore_conf.client.skewfactor);\n \n // Set up checking\n buildConstraints();\n \n //m_sampler = new VoltSampler(20, \"tpcc-cliet-sampling\");\n }", "public TutorIndustrial() {}", "public VehicleTypeTO()\r\n {\r\n }", "public ClientOfCompanyTrips() {\n companyController = new CompanyController();\n selected = new Company();\n tripBusiness = new TripBusiness();\n trip = new Trip();\n placeBusiness = new PlaceBusiness();\n place= new Place();\n clientBusiness = new ClientBusiness();\n client = new Client();\n }", "public Vehicle()\n {\n name = \"none\";\n cost = 0;\n }", "FuelingStation createFuelingStation();", "public Ticket() {\n\n }", "public TboFlightSearchRequest() {\n}", "public TradeData() {\r\n\r\n\t}", "@Override\n public TTransportWrapper getTransport(HostAndPort endpoint) throws Exception {\n return new TTransportWrapper(connectToServer(new InetSocketAddress(endpoint.getHostText(),\n endpoint.getPort())),\n endpoint);\n }", "public Trips() {\n this(\"trips\", null);\n }", "public static com.trg.fms.api.Trip.Builder newBuilder() {\n return new com.trg.fms.api.Trip.Builder();\n }", "public Carrier() {\n }", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "public Trip createTrip() {\n\n\t\t//Trip trip = new Trip();\n\n\t\tEditText name = (EditText) findViewById(R.id.trip_name);\n\t\tString trip_name = name.getText().toString();\n\t\ttrip.setName(trip_name);\n\n\t\tEditText location = (EditText) findViewById(R.id.location);\n\t\tString trip_location = location.getText().toString();\n\t\ttrip.setLocation(trip_location);\n\n\t\tEditText date = (EditText) findViewById(R.id.date);\n\t\tString trip_date = date.getText().toString();\n\t\ttrip.setTravelDate(trip_date);\n\n\t\tEditText time = (EditText) findViewById(R.id.time);\n\t\tString trip_time = time.getText().toString();\n\t\ttrip.setTravelTime(trip_time);\n\n\t\tEditText meeting_spot = (EditText) findViewById(R.id.meeting_spot);\n\t\tString meet_spot = meeting_spot.getText().toString();\n\t\ttrip.setMeetSpot(meet_spot);\n\n\t\t/*EditText participants = (EditText) findViewById(R.id.participants);\n\t\tString trip_participants = participants.getText().toString();\n\t\tString[] friendsArray;\n\t\tint numOfParticipants = 0;\n\t\tArrayList<Person> friends = new ArrayList<Person>();\n\t\tif(trip_participants.equals(\"\")) {\n\t\t\tfriends = null;\n\t\t} else {\n\t\t\tfriendsArray = trip_participants.split(\",\");\n\t\t\tint arrayLength = friendsArray.length;\n\t\t\tfor(int i=0; i<arrayLength; i++) {\n\t\t\t\tPerson person = new Person(friendsArray[i].trim());\n\t\t\t\tfriends.add(person);\n\t\t\t\tnumOfParticipants++;\n\t\t\t}\n\t\t}*/\n\n\t\t/*Trip trip = new Trip(trip_name, 1001, numOfParticipants, trip_location, trip_time, trip_date,\n\t\t\t\tfriends, meet_spot);*/\n\n\t\ttrip.setPersons(persons);\n\t\treturn trip;\n\t}", "private TweetRiver() { }", "public static Cargo newCargo(TransportableAIObject t, Unit carrier)\n throws FreeColException {\n return newCargo(t, carrier, t.getTransportDestination(), true);\n }", "public Bike createCityBike() {\n Wheels cityWheels = new Wheels(559,50f,10000); //Räder des Stadtrads erstellen\n Gears cityGears = new Gears(3,1,5000); //Gangschaltung des Stadtrads erstellen\n Bike newCityBike = new Bike(cityGears, cityWheels, \"Stahl\", \"CB105\", true, true, 30000); //Stadtrad erstellen\n return newCityBike; //Stadtrad zurückgeben\n}", "public Telefone() {\n\t\t\n\t}", "TT createTT();", "public Transporter(Model owner, String name, int capac, boolean showInTrace) {\n\t\t// construct a Transporter with a minimum load of one\n\t\tthis(owner, name, 1, capac, showInTrace);\n\t}", "public Transportation(String destination, String description) {\r\n\t\tthis.description = description;\r\n\t\tthis.destination = destination;\r\n\t\t\r\n\t}", "private Manager() {\n _transportViews = new ArrayList<TransportView>();\n _transportersClient = new ArrayList<TransporterClient>();\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate TransporterException(){\r\n\t\t\r\n\t}", "public TruckImpl(double lX, double lY, double lZ, double dX, double dY, double dZ,\n double spd, double mxSpd, double mlw) throws InvalidDataException {\n myMovable = MovableImplFactory.createMovable(lX, lY, lZ, dX, dY, dZ, spd, mxSpd);\n myIdentity = IdentifiableImplFactory.createIdentifiable();\n maxLoadWeight = mlw;\n\n }", "public static MotorEncoderFixture<Talon> getTalonPair() {\n return new MotorEncoderFixture<Talon>() {\n @Override\n protected Talon giveMotorController() {\n return new Talon(kTalonChannel);\n }\n\n @Override\n protected DigitalInput giveDigitalInputA() {\n return new DigitalInput(0);\n }\n\n @Override\n protected DigitalInput giveDigitalInputB() {\n return new DigitalInput(1);\n }\n\n @Override\n public int getPDPChannel() {\n return kTalonPDPChannel;\n }\n };\n }", "public static TemperatureTrackingDto getInstance () {\n return new TemperatureTrackingDto ();\n }", "public TransporteTerrestreEntity createTransporte(TransporteTerrestreEntity transporteEntity) throws BusinessLogicException {\n LOGGER.log(Level.INFO, \"Inicia proceso de creación del transporte\");\n super.createTransporte(transporteEntity);\n\n \n persistence.create(transporteEntity);\n LOGGER.log(Level.INFO, \"Termina proceso de creación del transporte\");\n return transporteEntity;\n }", "@Test\n\tpublic void testCreatePassengerCar() throws TrainException {\n\t\tInteger grossWeight = 1;\n\t\tInteger numberOfSeats = 1;\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock passengerCarUnderTest = \n\t\t\tnew asgn2RollingStock.PassengerCar((Integer)grossWeight, (Integer)numberOfSeats);\n\t\t\n\t}", "public TCubico(){}", "public synchronized static Transportador getInstance() {\n if (mInstance == null) {\n mInstance = new Transportador();\n }\n return mInstance;\n }", "public TTransportFactory wrapTransportFactory(TTransportFactory transFactory) {\n return new TUGIAssumingTransportFactory(transFactory, realUgi);\n }", "@GuardedBy(\"lock\")\n public void startNewTransport() {\n SocketAddress socketAddress;\n HttpConnectProxiedSocketAddress httpConnectProxiedSocketAddress;\n Preconditions.checkState(this.reconnectTask == null, \"Should have no reconnectTask scheduled\");\n if (this.addressIndex.isAtBeginning()) {\n this.connectingTimer.reset().start();\n }\n SocketAddress currentAddress = this.addressIndex.getCurrentAddress();\n if (currentAddress instanceof HttpConnectProxiedSocketAddress) {\n httpConnectProxiedSocketAddress = (HttpConnectProxiedSocketAddress) currentAddress;\n socketAddress = httpConnectProxiedSocketAddress.getTargetAddress();\n } else {\n socketAddress = currentAddress;\n httpConnectProxiedSocketAddress = null;\n }\n ClientTransportFactory.ClientTransportOptions httpConnectProxiedSocketAddress2 = new ClientTransportFactory.ClientTransportOptions().setAuthority(this.authority).setEagAttributes(this.addressIndex.getCurrentEagAttributes()).setUserAgent(this.userAgent).setHttpConnectProxiedSocketAddress(httpConnectProxiedSocketAddress);\n TransportLogger transportLogger = new TransportLogger();\n transportLogger.logId = getLogId();\n CallTracingTransport callTracingTransport = new CallTracingTransport(this.transportFactory.newClientTransport(socketAddress, httpConnectProxiedSocketAddress2, transportLogger), this.callsTracer);\n transportLogger.logId = callTracingTransport.getLogId();\n this.channelz.addClientSocket(callTracingTransport);\n this.pendingTransport = callTracingTransport;\n this.transports.add(callTracingTransport);\n Runnable start = callTracingTransport.start(new TransportListener(callTracingTransport, socketAddress));\n if (start != null) {\n this.syncContext.executeLater(start);\n }\n this.channelLogger.log(ChannelLogger.ChannelLogLevel.INFO, \"Started transport {0}\", transportLogger.logId);\n }" ]
[ "0.7169042", "0.6914959", "0.6882888", "0.63294697", "0.6236058", "0.61357623", "0.603414", "0.5990533", "0.5906245", "0.58995456", "0.5865075", "0.5854827", "0.58517885", "0.5805814", "0.58040345", "0.5793995", "0.57682616", "0.5768069", "0.573844", "0.57254016", "0.570643", "0.5694646", "0.56912315", "0.56842184", "0.5680306", "0.56555706", "0.56555706", "0.5605639", "0.55941665", "0.5593797", "0.55711305", "0.5562642", "0.55526197", "0.5548561", "0.55283123", "0.55211866", "0.5516991", "0.55121875", "0.550774", "0.5488092", "0.545516", "0.5453096", "0.5443182", "0.54348737", "0.5428909", "0.5412805", "0.5410899", "0.5410027", "0.5402741", "0.539897", "0.5390711", "0.5376061", "0.53551006", "0.5342142", "0.5334551", "0.5328236", "0.5317996", "0.5315858", "0.531579", "0.531521", "0.53079474", "0.5305651", "0.5299613", "0.5298216", "0.5291246", "0.52874947", "0.5282312", "0.52814865", "0.52735955", "0.52677107", "0.52662927", "0.5259481", "0.5258363", "0.52437556", "0.5242439", "0.521997", "0.52156985", "0.52154493", "0.52030337", "0.52005994", "0.5194114", "0.51934385", "0.51898783", "0.5188694", "0.51880306", "0.51812315", "0.51790357", "0.5176052", "0.5175591", "0.51748806", "0.5174062", "0.5166425", "0.51642126", "0.5162194", "0.515221", "0.51367396", "0.51346", "0.51331747", "0.5128233", "0.5126914" ]
0.71901953
0
Gets the widht of the TransportTruck
@Override public int getWidth() { return 260; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getW() {\n\t\treturn this.width;\n\t}", "private float getRunwayWidth() {\n\t\treturn runwayWidth;\n\t}", "public double getWidth() {\r\n\r\n\t\treturn w;\r\n\r\n\t}", "public int getWidth(){\n Window w = vc.getFullScreenWindow();\n if(w != null){\n return w.getWidth();\n } else {\n return 0;\n }\n }", "public int getW() {\n\t\treturn w;\n\t}", "public int getwDimension()\n {\n return wDimension;\n }", "public int getHauptWidth() {\n\t\treturn hauptWidth;\n\t}", "public int getAdViewWidth() {\n return (tozAdViewWidth);\n }", "public int getDesiredWidth() {\n return mDesiredWidth;\n }", "public int getWidth() {\n\treturn width;\n\t//return myOven.getWidth();\n}", "long getWidth();", "public String getwidth()\n\t{\n\t\treturn width.getText();\n\t}", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "public int getWidth();", "public int getWidth();", "public int getWidth();", "@Override\n\tpublic int getWidth() {\n\t\treturn windowWidth;\n\t}", "public Integer getClientWidth() {\n return clientWidth;\n }", "public int getMyWidth() { RTComponent.RTRenderContext myrc = getRTComponent().rc; if (myrc != null) return myrc.getRCWidth(); else return getRTComponent().getWidth(); }", "public int getWidth() {\n return viewWidth;\n }", "public int getWidth() {\n return mWidth;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\r\n return Display.getWidth();\r\n }", "@Override\n\tpublic int getW() {\n\t\treturn 100;\n\t}", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\r\n\t{\r\n\t\treturn WIDTH;\r\n\t}", "public int getWidth() {\n return (roomWidth);\n }", "public int getWidth() {\n // Replace the following line with your solution.\n return width;\n }", "public int getWidth() {\n return (int) Math.round(width);\n }", "public int getWidth() {\r\n return width;\r\n }", "public final int getWidth() {\r\n return config.width;\r\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth(){\n\t\treturn width;\n\t}", "public int getWidth(){\n return width;\n }", "public int width()\n {\n return Math.max(top, bottom);\n }", "protected double getWindowWidth() {\n\t\treturn m_windowWidth;\n\t}", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n return Width;\r\n }", "public final int getWidth(){\n return width_;\n }", "public int getWidth() {\n return mySize.getWidth();\n }", "public int getWidth() {\n return this.width;\n }", "public int getWidth() {\n return this.width;\n }", "public int getW() {\n\t\treturn this.W;\n\t}", "public int getWidth()\n {\n return this.width;\n }", "public int getWidth() {\n return getTileWidth() * getWidthInTiles();\n }", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "int getWidth() {return width;}", "public int getWidth()\n {\n return width;\n }", "public final int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth()\r\n\t{\r\n\t\treturn mWidth;\r\n\t}", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width_;\n }" ]
[ "0.69050735", "0.6825385", "0.66488063", "0.6629443", "0.65797675", "0.6534079", "0.6503034", "0.64791065", "0.6465546", "0.64608055", "0.64537525", "0.64419", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6438984", "0.6425224", "0.6425224", "0.6425224", "0.64198524", "0.6414006", "0.64130473", "0.6399696", "0.6396935", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6394144", "0.6392547", "0.63776463", "0.6371384", "0.63683087", "0.63683087", "0.63683087", "0.63619035", "0.6356487", "0.6355965", "0.6351578", "0.6343565", "0.63387847", "0.633866", "0.633866", "0.6333798", "0.63292754", "0.63268745", "0.63201463", "0.6317683", "0.6313087", "0.6303997", "0.6292601", "0.6290838", "0.62898284", "0.62898284", "0.62829983", "0.62827235", "0.62824124", "0.62789994", "0.62789994", "0.62781", "0.62781", "0.62755865", "0.6275157", "0.62701166", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62661606", "0.62650496", "0.62630785", "0.6261119" ]
0.0
-1
Gets the height of the TransportTruck
@Override public int getHeight() { return 320; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getHeight() {\n\t\t\treturn height.get();\n\t\t}", "public Integer getHeight()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.height, null);\n }", "public double getHeight () {\n return height;\n }", "public double getHeight() {\n return height;\n }", "public double getHeight() {\n return height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return mHeight;\n }", "public int getHeight() {\n return mHeight;\n }", "public int getHeight() {\n return (int) Math.round(height);\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public Integer getHeight() {\n return this.height;\n }", "public double getHeight() {\r\n return height;\r\n }", "private double getHeight() {\n\t\treturn height;\n\t}", "public int getHeight()\n {\n return this.height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return this.height;\n }", "public float getHourHeight() {\n return config.hourHeight;\n }", "public double getHeight()\r\n {\r\n return height;\r\n }", "public int getHeight() {\n return height_;\n }", "public final int getHeight() {\r\n return height;\r\n }", "public int getHeight()\n {\n return height;\n }", "public int getHeight() {\n\t\treturn this.height;\n\t}", "public int getHeight() {\n\t\treturn getHeight(this);\n\t}", "public int getHeight() {\n return getTileHeight() * getHeightInTiles();\n }", "public float getHeight() {\n return height;\n }", "public float getHeight() {\n return this.height;\n }", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n return height_;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight()\n\t{\n\t\treturn this._height;\n\t}", "public double getHeight() {\n return getElement().getHeight();\n }", "public int getHeight() {\r\n\t\treturn this.height;\r\n\t}", "public final int getHeight(){\n return height_;\n }", "public double getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public String getHeight() {\n return height;\n }", "public String getHeight() {\n return height;\n }", "public double getHeight()\r\n {\r\n return height;\r\n }", "public final float getHeight() {\n return mHeight;\n }", "public int getHeight() {\n return bala.getHeight();\n }", "public double getHeight() {\n\treturn height;\n }", "public final String getHeight() {\n return this.height;\n }", "public int getHeight()\n {\n \treturn height;\n }", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight()\n {\n return height;\n }", "public int getHeight()\r\n\t{\r\n\t\treturn mHeight;\r\n\t}", "public int getHeight() {\r\n\t\t\r\n\t\treturn height;\r\n\t}", "public final int getHeight() {\r\n return config.height;\r\n }", "public int getHeight() {\n\t\t\treturn height;\n\t\t}", "public int getHeight() {\r\n return Height;\r\n }", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight(){\n return this.height;\n }", "final public double getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight() \n\t{\n\t\treturn height;\n\t}", "public int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public int getHeight(){\n return height;\n }", "public Number getHeight() {\n\t\treturn getAttribute(HEIGHT_TAG);\n\t}", "public float getHeight() {\n\t\treturn height;\n\t}", "public int getHeight()\n\t{\n\t\treturn mHeight;\n\t}", "public Floor getHeight() {\r\n return height;\r\n }", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public double getHeightInInches()\n {\n return height;\n }", "public String getheight()\n\t{\n\t\treturn height.getText();\n\t}", "public float getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight(){\n \treturn height;\n }", "public double getHeight() {\n return this.height * 0.393701;\n }", "@Override\n\tpublic int getHeight() {\n\t\treturn this.height;\n\t}", "public int getH() {\n\t\treturn this.height;\n\t}", "public int getHeight() {\n\treturn height;\n}", "public double getHeight ( ) {\n\t\t// TODO: backwards compatibility required\n\t\treturn invokeSafe ( \"getHeight\" );\n\t}" ]
[ "0.7319408", "0.725828", "0.72260976", "0.7214777", "0.7214777", "0.71990377", "0.71990377", "0.71990377", "0.7191862", "0.7191862", "0.71908087", "0.7189497", "0.7189497", "0.7189497", "0.7189497", "0.7189497", "0.7189497", "0.7189497", "0.7189497", "0.7189497", "0.7189497", "0.7189497", "0.71732086", "0.71671915", "0.7157955", "0.71493423", "0.7145917", "0.7144653", "0.7137276", "0.71327573", "0.7122587", "0.7117878", "0.71155745", "0.7108905", "0.7102537", "0.7098917", "0.7098082", "0.7097178", "0.70959663", "0.70959663", "0.70959663", "0.70959663", "0.70959663", "0.70959663", "0.70927536", "0.7092126", "0.7092126", "0.7092126", "0.7087362", "0.708334", "0.70822537", "0.7070733", "0.70640844", "0.7061102", "0.7061102", "0.7061102", "0.7061102", "0.7061102", "0.7061102", "0.7061102", "0.7061102", "0.7061102", "0.7061102", "0.7061102", "0.7049093", "0.7049093", "0.7044254", "0.7042356", "0.70392257", "0.7038975", "0.7033086", "0.70302814", "0.70233107", "0.70233107", "0.7020749", "0.70154536", "0.70152605", "0.7015163", "0.7008223", "0.70068276", "0.700671", "0.700671", "0.7005039", "0.7003866", "0.70023686", "0.7000485", "0.6998938", "0.69981927", "0.6995962", "0.6995821", "0.6987385", "0.6985601", "0.6969681", "0.69665766", "0.69583505", "0.6936521", "0.6928565", "0.6916849", "0.6911729", "0.69079965", "0.6907746" ]
0.0
-1
Gets the depth of the TransportTruck
@Override public int getDepth() { return 680; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getDepth();", "public float getDepth() {\r\n\t\treturn Float.parseFloat(getProperty(\"depth\").toString());\t\r\n\t}", "public static int getDepth() {\n return depth;\n }", "int getDepth();", "float getDepth();", "float getDepth();", "public int getDepth() {\n return depth;\n }", "public int getDepth() {\r\n return depth;\r\n }", "public int getDepth()\n {\n return m_Depth;\n }", "public int getDepth(){\n\t\treturn _depth;\n\t}", "public int getDepth();", "public float getDepth() {\n return depth;\n }", "public int getDepth(){\r\n return this.depth;\r\n }", "public int getDepth(){\n\t\treturn depth;\n\t}", "public int getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public int getDepth() {\n return depth_;\n }", "public int getDepth()\n {\n return depth; \n }", "public String getnDepth() {\n return nDepth;\n }", "public int depth() {\r\n\t\treturn this.depth;\r\n\t}", "int getDepthIndex() {\n return depthIndex;\n }", "int depth();", "int depth();", "public int depth ();", "public int getDepth() {\n return getDepthRecursive(root);\n\n }", "private int setDepth() {\n int getDepth = depth;\n if (depth != -1) {\n getDepth = depth + 1;\n }\n return getDepth;\n }", "private int depth()\r\n\t{\r\n\t\t// If tree is empty then there are 0 levels\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t// Tree is not empty so use recursive depth method starting at Root level 1 to figure out depth\r\n\t\treturn depth(getRoot(), 1);\r\n\t}", "public int getDepth()\n {\n return traversalStack.size();\n }", "public Texture2D getDepthTexture()\n\t{\n\t\treturn mDepthTexture;\n\t}", "public int getNodeDepth() {\n int depth = 0;\n TreeNode tn = this;\n \n while(tn.getFather() != null) {\n tn = tn.getFather();\n depth++;\n }\n \n return depth;\n }", "public JSONObject getDepth() throws Exception;", "public Integer getMaxDepth() {\n return this.maxDepth;\n }", "public Double getValue() {\n return depth;\n }", "int getMax_depth();", "public int depth() {\n return parts.length - (isIndex() ? 0 : 1);\n }", "public int depth() {\n\t\treturn depthHelp(root);\r\n\t}", "public int getDepth() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_SIZE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D0\"));\n return ((ImageComponent3DRetained)this.retained).getDepth();\n }", "@Override\n\tpublic Integer getDepth()\n\t{\n\t\treturn null;\n\t}", "int getTemporaryMaxDepth();", "public int depth(){\n if(root!=null){ // มี node ใน tree\n return height(root);\n }\n else {return -1;}\n }", "@Override\r\n\tpublic double getDepth()\r\n\t{\r\n\r\n\t\tList<Entity> roots = new Stack<Entity>();\r\n\t\troots.addAll(getRoots());\r\n\r\n\t\tif (roots.size() == 0) {\r\n\t\t\tlogger.error(\"There is no root for this lexical semantic resource.\");\r\n\t\t\treturn Double.NaN;\r\n\t\t}\r\n\t\telse if (roots.size() > 1) {\r\n\t\t\tlogger.error(\"There are several roots for this lexical semantic resource.\");\r\n\t\t\treturn Double.NaN;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tEntity root = roots.get(0);\r\n\t\t\t// return getEccentricity(root);\r\n\r\n\t\t\tdouble maxPathLength = 0.0;\r\n\t\t\tdouble[] returnValues = computeShortestPathLengths(root, 0.0,\r\n\t\t\t\t\tmaxPathLength, new HashSet<Entity>());\r\n\t\t\tmaxPathLength = returnValues[1];\r\n\t\t\treturn maxPathLength;\r\n\t\t}\r\n\t}", "public int getMaxDepth() {\n return maxDepth;\n }", "public int getPlaceDepth() {\n return placeDepth;\n }", "int getNewDepth() {\n return mNewDepth;\n }", "int getOldDepth() {\n return mOldDepth;\n }", "@Override\r\n\tpublic int getMaxDepth() {\r\n\t\tint profundidad = 1;// Profundidad inicial, como es la raiz es 1\r\n\t\treturn getMaxDepthRec(raiz, profundidad, profundidad);\r\n\t}", "public byte getBitDepth();", "public String getFrontNeckDepth() {\r\n\t\treturn frontNeckDepth;\r\n\t}", "public int getTreeDepth() {\r\n\t\tmaxDepth = 0;\r\n\t\treturn getTreeDepth(root, 0);\r\n\t}", "public int getDepthFromNode (String node){\n \t if (Flags.semant_debug){\n \t \tSystem.out.println(\"NODE NAME IS :\" + node);\n \t \tSystem.out.println(getDepth);\n\t }\n int depth = getDepth.get(node);\n return depth;\n }", "public Double getWellDepth() {\n\t\treturn wellDepth;\n\t}", "public String getDepthOfField() {\n double depthOfFieldMM = farFocalPoint - nearFocalPoint;\n\n // convert from mm to m\n double depthOfFieldMeters = depthOfFieldMM * 0.001;\n\n // return answer rounded to 2 decimal places\n return formatM(depthOfFieldMeters);\n }", "int depth(BTNode node) {\n int d = 0;\n while (node != root) {\n node = node.parent;\n d++;\n }\n return d;\n }", "public int getMaxDepth() {\r\n\t\treturn maxDepth;\r\n\t}", "public int maxDepth() {\n return maxDepth;\n }", "int getColorDepth();", "public int depth ( BinTree tree){\n\t\tint x = 1; \n\t\twhile( tree.left != null){\n\t\t\ttree= tree.left;\n\t\t\tx++;\n\t\t}\n\t\treturn x;\n\t}", "public int maxDepth() {\n return maxDepth;\n }", "int maxDepth();", "int getRecursionDepth();", "public int getNestLevel () {\n return nestLevel;\n }", "public int depth(){\n\t\tint depth = 0;\n\t\tif(this.isEmpty()){\n\t\t\treturn depth;\n\t\t} else {\n\t\t\tdepth= 1;\n\t\t}\n\t\tQueue queue = new Queue();\n\t\tqueue.enqueue(this);\n\t\t\n\t\twhile(!queue.isEmpty()){\n\t\t\tBinaryTree tree = (BinaryTree) queue.dequeue();\n\t\t\tif(tree.left.getElement()!=null){\n\t\t\t\tqueue.enqueue(tree.left);\n\t\t\t\tdepth++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn depth;\n\t}", "public int getDepth(String categoryName);", "public int depth() { return Math.max(left.depth(), right.depth()) + 1; }", "@Override\r\n public int getDepth() {\r\n final int len = getPath().length();\r\n if (len == 0 || len == 1 && getPath().charAt(0) == SEPARATOR_CHAR) {\r\n return 0;\r\n }\r\n int depth = 1;\r\n for (int pos = 0; pos > -1 && pos < len; depth++) {\r\n pos = getPath().indexOf(SEPARATOR_CHAR, pos + 1);\r\n }\r\n return depth;\r\n }", "public String getDepth(String s) {\n return ((depth != FLOATNULL) ? new Float(depth).toString() : \"\");\n }", "public int getRecursionDepth() {\n return recursionDepth_;\n }", "public int getRecursionDepth() {\n return recursionDepth_;\n }", "boolean hasDepth();", "boolean hasDepth();", "public int getMinDepth() {\n return minDepth;\n }", "public int getColorDepth() {\n\t\treturn colorDepth;\n\t}", "public int getDepth() {\r\n\t\tint depth = 0;\r\n\t\tSearchNode<S, A> ancestor = this;\r\n\t\twhile(ancestor.parent != null) {\r\n\t\t\tdepth++;\r\n\t\t\tancestor = ancestor.parent;\r\n\t\t}\r\n\t\treturn depth;\r\n\t}", "public short getBitDepth() {\n\n\t\treturn getShort(ADACDictionary.PIXEL_BIT_DEPTH);\n\n\t}", "public String getBackNeckDepth() {\r\n\t\treturn backNeckDepth;\r\n\t}", "@Override\n public int getDepth() {\n return getSuperContainer().getDepth();\n }", "private Integer getDepth(BinaryNode node, int depth) {\n\n if (node == null) return depth;\n else return Math.max(getDepth(node.left, depth + 1),getDepth(node.right, depth + 1));\n }", "public int getLevel() {\n\t\treturn 1 + this.iter / this.levelfk;\n\t}", "public int discoverMaximumLayerDepth() {\n\t\tif (this.layers.size() > 0) {\n\t\t\tint layerDepth;\n\t\t\t\n\t\t\tfor (int i = 0; i < this.layers.size(); i++) {\n\t\t\t\tlayerDepth = this.layers.get(i).getDepth();\n\t\t\t\tthis.maximumLayerDepth = layerDepth > this.maximumLayerDepth ? layerDepth : this.maximumLayerDepth;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this.maximumLayerDepth;\n\t}", "public void setDepth(double aDepth);", "protected abstract double lookupDepth(int depthX, int depthY);", "public IfcPositiveLengthMeasure getThresholdDepth()\n\t{\n\t\treturn this.ThresholdDepth;\n\t}", "public int getMaxHierarchyDepth(Das2TypeI type) {\n\tint depth = Das2FeaturesCapabilityI.UNKNOWN;\n if (type instanceof UcscType) {\n\t UcscType utype = (UcscType)type;\n\t TrackType track_type = utype.getTrackType();\n\n\t if (track_type == TrackType.GENEPRED || \n\t\ttrack_type == TrackType.PSL || \n\t\ttrack_type == TrackType.BED12 || \n\t\ttrack_type == TrackType.BED15) {\n\t\tdepth = 2;\n\t }\n\t else if (track_type == TrackType.BED3 ||\n\t\t track_type == TrackType.BED4 ||\n\t\t track_type == TrackType.BED5 ||\n\t\t track_type == TrackType.BED6 ||\n\t\t track_type == TrackType.BED8 ||\n\t\t track_type == TrackType.BED9 ) {\n\t\tdepth = 1;\n\t }\n\t}\n\treturn depth;\n }", "public Integer getTownhallLevel()\n\t{\n\t\treturn townhallLevel;\n\t}", "public void setDepth(int depth) {\r\n this.depth = depth;\r\n }", "int depthNoR(Node root) {\n\t\tNode endOfLevelMarker = new Node(-100);\n\n\t\tQueue<Node> s = new LinkedList<Node>();\n\t\t\n\t\ts.add(root);\n\t\ts.add(endOfLevelMarker);\n\n\t\tint depth = 0;\n\n\n\t\twhile (!s.isEmpty()) {\n\t\t\tNode k = s.poll();\n\n\t\t\tif (k != null) {\n\t\t\t\tif (k.data == -100) {\n\t\t\t\t\tdepth++;\n\t\t\t\t\tif (!s.isEmpty()) { // It was the last node. Without this check we will keep putting and popping marker forever.\n\t\t\t\t\t\ts.add(endOfLevelMarker);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (k.left != null) {\n\t\t\t\t\t\ts.add(k.left);\n\t\t\t\t\t}\n\t\t\t\t\tif (k.right != null) {\n\t\t\t\t\t\ts.add(k.right);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn depth;\n\t}", "public int getTileLevel()\n {\n return tileLevel;\n }", "public int getLevel()\n {\n return m_nLevel;\n }", "public static int getDepth(FeatureNode word)\n\t{\n\t\tif (null == word) return 0;\n\t\tint maxdepth = 0;\n\t\tFeatureNode fn = word.get(\"phr-head\");\n\t\twhile (fn != null)\n\t\t{\n\t\t\tFeatureNode subf = fn.get(\"phr-head\");\n\t\t\tif (subf != null)\n\t\t\t{\n\t\t\t\tint depth = getDepth(fn);\n\t\t\t\tif (maxdepth < depth) maxdepth = depth;\n\t\t\t}\n\t\t\tfn = fn.get(\"phr-next\");\n\t\t}\n\t\treturn maxdepth+1;\n\t}", "public int getChnlWalkway(){\n return this.mFarm.getChnlWalkway();\n }", "public int getTonerLevel() {\n return tonerLevel;\n }", "public double getMaxDepthForRuptureInRegionBounds() {\n if(maxDepth == 0)\n getSiteRegionBounds();\n return maxDepth;\n }", "@Override\r\n\tpublic int getGateDepth() {\r\n\t\treturn gateDepth;\r\n\t}", "public final int getNestingDepth() {\n return m_nestingDepth;\n }", "com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetColorDepth();", "public int getBufferDepth() {\n return (this.bufferDepth);\n }", "private int getDepthRaw(TreeNode root){\n if (root == null) {\n return 0;\n }\n\n int left = getDepthRaw(root.left);\n int right = getDepthRaw(root.right);\n if (left == -1 || right == -1) {\n return -1;\n }else{\n if (Math.abs(left - right) > 1) {\n return -1;\n }else{\n return Math.max(left, right) + 1;\n }\n }\n }" ]
[ "0.7597768", "0.7555179", "0.7502281", "0.7464199", "0.7458896", "0.7458896", "0.7398623", "0.73943824", "0.7391291", "0.7360066", "0.73393536", "0.7328079", "0.7303822", "0.7294611", "0.7285676", "0.72805196", "0.72805196", "0.7272995", "0.7262245", "0.72364503", "0.72274417", "0.7163966", "0.71544546", "0.7123408", "0.68200564", "0.68200564", "0.67843616", "0.67412657", "0.6712966", "0.6709475", "0.6641917", "0.6586986", "0.65624636", "0.65332425", "0.65188414", "0.6511027", "0.64712054", "0.6457271", "0.6448538", "0.6404112", "0.6393268", "0.638814", "0.637299", "0.6371739", "0.6283185", "0.6282908", "0.62702066", "0.62144315", "0.6188308", "0.61706316", "0.6155485", "0.615301", "0.6121929", "0.6121635", "0.61194503", "0.6117722", "0.6096029", "0.60905826", "0.6065719", "0.6064889", "0.60643643", "0.60590196", "0.6047492", "0.6047117", "0.6031186", "0.60196114", "0.59778786", "0.5976881", "0.59766084", "0.5968678", "0.5950033", "0.592489", "0.592489", "0.5916383", "0.5907437", "0.58491975", "0.58452606", "0.5843868", "0.5828185", "0.5823239", "0.5810535", "0.5790961", "0.57807875", "0.5778592", "0.57670015", "0.5755191", "0.57333565", "0.57255304", "0.5722045", "0.57205784", "0.56978464", "0.5696578", "0.5685492", "0.56659114", "0.5663963", "0.56629646", "0.5614188", "0.5606258", "0.5578422", "0.55644584" ]
0.60922235
57
TransportTruck is eligible to move if ramp is closed
@Override public boolean canMove() { return storage.isRampClosed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean shouldStopBeingCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount >= this.combatEngineerTriggerPercentageCancel;\r\n\t}", "public boolean takeControl() {\n\t\tif (Squirrel.us.getDistance() <= 30 && Squirrel.notDetected)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n public boolean isWaitingForTurnPhase() {return true;}", "@Override\n public void robotPeriodic() {\n\n boolean c = mGPM.haveCargo();\n \n // Need signal due to distance for assurance that cargo is obtained/\n if (c) {\n CargoLight.set(Value.kOn);\n } else{\n CargoLight.set(Value.kOff);\n }\n }", "@Override\n public boolean isFinished() {\n \n boolean thereYet = false;\n\n double time = timer.get();\n\n \n if (Math.abs(targetDistance - distanceTraveled) <= 4){\n\n thereYet = true;\n\n // else if(Math.abs(targetDistance - distanceTraveled) <= 24){\n\n //shifter.shiftDown();\n \n //}\n\n \n\n } else if (stopTime <= time - startTime){\n\n thereYet = true;\n }\n SmartDashboard.putNumber(\"Distance Traveled\", distanceTraveled);\n\n return thereYet;\n\n }", "@Override\r\n\tpublic boolean stopCondition(State<CarRpmState, CarControl> state) {\n\t\treturn (state.num>start.num && state.state.getSpeed()<0.5);\r\n\t}", "public boolean transition() {\n current = new State(ts++, hopper); \n if (terminus.isTerminus(current)) {\n return false;\n } else {\n hopper.sendBall(oneMinute);\n return true;\n }\n }", "public boolean takeControl() {\n\t\treturn Project2a.curState == Project2a.RobotState.Forward && Project2a.getCurTime() - 500 > MoveForward.startTime;\n\t}", "@Override\n protected boolean isFinished() {\n return Robot.arm.getArmLimitSwitch();\n }", "@Override\n public void onPourWaterRaised() {\n if (theFSM.getCupPlaced()) {\n pouringState = true;\n }\n }", "private void tickIsInProduction() {\n if (this.timeInState == this.unitInfo.getProductionTime() - 1) {\n this.player.setSuppliesMax(this.player.getSuppliesMax() + this.unitInfo.getSuppliesGain());\n changeState(this.unitInfo.getUnitStateAfterProduction());\n \n if (this.producer != null)\n this.producer.changeState(UnitState.HOLD);\n }\n \n }", "@Override\n protected boolean isFinished() {\n if(direction){\n if(leftTarget <= Robot.driveTrain.getLeftEncoderDistanceInches() || rightTarget <= Robot.driveTrain.getRightEncoderDistanceInches()){\n turnPID.resetPID();\n return true;\n } else{\n return false;\n }\n \n } else{\n if(leftTarget >= Robot.driveTrain.getLeftEncoderDistanceInches() || rightTarget >= Robot.driveTrain.getRightEncoderDistanceInches()){\n turnPID.resetPID();\n return true;\n } else{\n return false;\n }\n }\n \n \n }", "@Override\n public boolean isFinished() {\n return !(System.currentTimeMillis() - currentMs < timeMs) &&\n // Then check to see if the lift is in the correct position and for the minimum number of ticks\n Math.abs(Robot.lift.getPID().getSetpoint() - Robot.lift.getEncoderHeight()) < error\n && ++currentCycles >= minDoneCycles;\n }", "private static boolean runAway(Critter foo){\n\t\tif(foo.moved) {\n\t\t\tfoo.energy = foo.getEnergy() - Params.walk_energy_cost;\n\t\t\tif (foo.getEnergy() <= 0) {\n\t\t\t\tfoo.isAlive=false;\n\t\t\t}\n\t\t\treturn false;\n\t\t} else {\n\t\t\tint dir = getRandomInt(8);\n\t\t\tif(canMove(foo, dir)) {\n\t\t\t\tfoo.walk(dir);\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\tfoo.energy = foo.getEnergy() - Params.walk_energy_cost;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public boolean isPossibleTransit(State s, Action a) {\r\n//\t\tint newWorkloadLevel = s.getWorkload() + a.getChangedWorkload();\r\n\t\tint maxBatteryLevel = getNextBatteryLevel(s, a);\r\n\t\tint maxActionLevel = s.getWorkload();\r\n\r\n\t if((a.getChangedWorkload() <= maxActionLevel) && (a.getBatteryUsed() <= maxBatteryLevel))\r\n\t {\r\n\t\treturn true;\r\n\t }\r\n\t else { \r\n\t \treturn false;\r\n\t }\r\n\t}", "static boolean settleDown() throws GameActionException {\n\t\treturn !rc.isCircleOccupiedExceptByThisRobot(rc.getLocation(), SETTLERADIUS);\n\t}", "public boolean canEndTurn(){\n\t\treturn moved;\n\n\t}", "public void toWaitingTurn() {\n }", "private boolean vehicleIsStuck(final QLaneI fromLaneBuffer, final double now) {\n\t\tfinal double stuckTime = this.context.qsimConfig.getStuckTime() ;\n\t\treturn (now - fromLaneBuffer.getLastMovementTimeOfFirstVehicle()) > stuckTime;\n\t}", "public boolean isSolvable() {\n return finalMove != null;\n }", "@Override\n protected boolean isFinished() {\n SmartDashboard.putNumber(\"TurnCommand Current Heading\", Robot.m_drivetrain.getAngle());\n SmartDashboard.putNumber(\"TurnCommand Target\", Start + TurnGoal);\n if (IsLeft) {\n return Robot.m_drivetrain.getAngle() <= Start + TurnGoal;\n } else {\n return Robot.m_drivetrain.getAngle() >= Start + TurnGoal;\n }\n }", "@Override\n protected void execute() {\n if(!Robot.SCISSOR.getFloorSensor() && speed < 0) {\n Robot.SCISSOR.liftRobotPnumatic(false);\n }\n }", "@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private void reconsiderStop(NodeReference position, NodeReference station, IVehicleContext context) {\n NodeReference prev = context.getChargingStop();\n float ar = context.getEV().getActionRadius() / 1000; //convert m to km.\n //float distanceBef = (float) context.calculateRouteReference(position).resolveDistance(context.getGraphReference());\n context.scheduleChargingStop(station);\n float distanceAft = (float) context.calculateRouteReference(position).resolveDistance(context.getGraphReference());\n if (distanceAft > ar) {\n context.scheduleChargingStop(prev);\n }else{\n eventcontroller.publishEvent(\"agent:dmas:reconsider\", \"vehicle\",context.getEV().getVehicleEntity().getVehicleReference().getId());\n }\n }", "public void timeToCheckWorker() {\n notifyCanMove(this.getCurrentTurn().getCurrentPlayer());\n }", "protected boolean isFinished() {\n \tif (Math.abs(_finalTickTargetLeft - Robot.driveTrain.getEncoderLeft()) <= 0 &&\n \t\t\tMath.abs(_finalTickTargetRight - Robot.driveTrain.getEncoderRight()) <= 0)\n \t{\n \t\treturn true;\n \t}\n return false;\n }", "@Override\n public boolean isFinished() {\n double[] positions = drivetrain.getPositions();\n\n return Math.abs(positions[0] - targetDistance) <= allowedError && Math.abs(positions[1] - targetDistance) <= allowedError;\n }", "@Override\n protected boolean isFinished() {\n return Math.abs(m_currentError) <= constants.tolerance;\n }", "protected boolean isFinished() {\n return ((degrees - Robot.gyro.getAngle() <= Robot.acceptedTurnTolerance)&&(degrees - Robot.gyro.getAngle() >= -Robot.acceptedTurnTolerance))||Robot.interrupt;\n }", "public boolean isAvailable() {\n return this.isAcceptingRider && this.currentTrip == null;\n }", "private void carsReadyToLeave(){\n\t\t\tCar car = getFirstLeavingCar();\r\n\t\t\twhile (car!=null) {\r\n\t\t\t\tif (car.getHasToPay()){\r\n\t\t\t\t\tcar.setIsPaying(true);\r\n\t\t\t\t\tpaymentCarQueue.addCar(car);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcarLeavesSpot(car);\r\n\t\t\t\t}\r\n\t\t\t\tcar = getFirstLeavingCar();\r\n\t\t\t}\r\n\t\t}", "private MovementProgressEnum performEndOfMovement(Entity mover, MoveComponent moveCompo, Room room) {\n\t\tmoveCompo.arrivedOnTile = true;\n\t\t\n\t\tint costOfMovementForTilePos = TileUtil.getCostOfMovementForTilePos(moveCompo.currentMoveDestinationTilePos, mover, room);\n\t\tmoveCompo.setMoveRemaining(moveCompo.getMoveRemaining() - costOfMovementForTilePos);\n\t\t\n\t\tOptional<Entity> chasm = TileUtil.getEntityWithComponentOnTile(moveCompo.currentMoveDestinationTilePos, ChasmComponent.class, room);\n\t\tif (!chasm.isPresent()) {\n\t\t\tmoveCompo.setLastWalkableTile(moveCompo.currentMoveDestinationTilePos);\n\t\t}\n\t\t\n\t\tMappers.gridPositionComponent.get(mover).coord(mover, moveCompo.currentMoveDestinationTilePos, room);\n\t\tfor (Component c : mover.getComponents()) {\n\t\t\tif (c instanceof MovableInterface) {\n\t\t\t\t((MovableInterface) c).endMovement(moveCompo.currentMoveDestinationTilePos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tAlterationReceiverComponent alterationReceiverComponent = Mappers.alterationReceiverComponent.get(mover);\n\t\tif (alterationReceiverComponent != null) {\n\t\t\talterationReceiverComponent.onArriveOnTile(moveCompo.currentMoveDestinationTilePos, mover, room);\n\t\t}\n\t\t\n\t\t\n\t\t// Creep\n\t\tOptional<Entity> creep = TileUtil.getEntityWithComponentOnTile(moveCompo.currentMoveDestinationTilePos, CreepComponent.class,room);\n\t\tif (creep.isPresent()) {\n\t\t\tDestructibleComponent destructibleComponent = Mappers.destructibleComponent.get(creep.get());\n\t\t\tif (destructibleComponent == null || !destructibleComponent.isDestroyed()) {\n\t\t\t\t// There is creep on this tile, play its effect\n\t\t\t\tMappers.creepComponent.get(creep.get()).onWalk(mover, creep.get(), room);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Leave creep\n\t\tif (Mappers.creepEmitterComponent.has(mover)) {\n\t\t\tMappers.creepEmitterComponent.get(mover).emit(mover, moveCompo.currentMoveDestinationTilePos, room);\n\t\t}\n\t\t\n\t\t// Things that only the player can do, such as go through a door\n\t\tPlayerComponent playerCompo = Mappers.playerComponent.get(mover);\n\t\tif (playerCompo != null) {\n\t\t\t// Doors\n\t\t\tEntity doorEntity = TileUtil.getDoorEntityOnTile(moveCompo.currentMoveDestinationTilePos, room);\n\t\t\tif (doorEntity != null) {\n\t\t\t\tDoorComponent doorCompo = Mappers.doorComponent.get(doorEntity);\n\t\t\t\tif (doorCompo != null && doorCompo.isOpened() && doorCompo.getTargetedRoom() != null) {\n\t\t\t\t\tmoveCompo.clearSelectedTileFromPreviousTurn();\n\t\t\t\t\t//Change room !!!\n\t\t\t\t\tfinishRealMovement(mover, room);\n\t\t\t\t\tmoveCompo.clearMovableTiles();\n\t\t\t\t\t\n\t\t\t\t\troom.setNextRoom(doorCompo.getTargetedRoom());\n//\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\n\t\tboolean movementOver = moveCompo.currentMoveDestinationIndex >= moveCompo.getWayPoints().size();\n\t\tmoveCompo.incrementCurrentMoveDestinationIndex();\n\t\tif (movementOver) {\n\t\t\treturn MovementProgressEnum.MOVEMENT_OVER;\n\t\t}\n\n\t\tif (moveCompo.playerMovementCompo && moveCompo.getMoveRemaining() <= 0 && !moveCompo.isFrozen()) {\n\t\t\tmoveCompo.setEndTurnTile(TileUtil.getTileAtGridPos(moveCompo.currentMoveDestinationTilePos, room));\n\t\t\tVector2 selectedTile = Mappers.gridPositionComponent.get(moveCompo.getSelectedTile()).coord();\n\t\t\tmoveCompo.setSelectedTileFromPreviousTurn(TileUtil.getTileAtGridPos(selectedTile, room));\n\t\t\t\n\t\t\tmoveCompo.removeFirstWaypoints(moveCompo.currentMoveDestinationIndex);\n\t\t\t\n\t\t\treturn MovementProgressEnum.TURN_OVER;\n\t\t}\n\t\t\n\t\treturn MovementProgressEnum.IN_PROGRESS;\n\t}", "@Override\n public boolean waitForNextFlight() {\n this.lock.lock();\n try {\n boolean wait = this.passengersStillMissing != 0;\n\n // update hostess state\n this.repository.updateHostessState(HostessState.WAIT_FOR_NEXT_FLIGHT);\n\n if (wait) {\n // wait for pilot\n while (!this.planeReadyForBoarding) {\n this.hostessWaitPlaneReadyToTakeOff.await();\n }\n this.planeReadyForBoarding = false;\n }\n\n return wait;\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n return false;\n }", "boolean canFall();", "private boolean moveVehicleOverNode( final QVehicle veh, QLinkI fromLink, final QLaneI fromLane, final double now ) {\n\t\tId<Link> nextLinkId = veh.getDriver().chooseNextLinkId();\n\t\tLink currentLink = fromLink.getLink() ;\n\t\n\t\tAcceptTurn turn = turnAcceptanceLogic.isAcceptingTurn(currentLink, fromLane, nextLinkId, veh, this.netsimEngine.getNetsimNetwork(), now);\n\t\tif ( turn.equals(AcceptTurn.ABORT) ) {\n\t\t\tmoveVehicleFromInlinkToAbort( veh, fromLane, now, currentLink.getId() ) ;\n\t\t\treturn true ;\n\t\t} else if ( turn.equals(AcceptTurn.WAIT) ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tQLinkI nextQueueLink = this.netsimEngine.getNetsimNetwork().getNetsimLinks().get(nextLinkId);\n\t\tQLaneI nextQueueLane = nextQueueLink.getAcceptingQLane() ;\n\t\tif (nextQueueLane.isAcceptingFromUpstream()) {\n\t\t\tmoveVehicleFromInlinkToOutlink(veh, currentLink.getId(), fromLane, nextLinkId, nextQueueLane);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (vehicleIsStuck(fromLane, now)) {\n\t\t\t/* We just push the vehicle further after stucktime is over, regardless\n\t\t\t * of if there is space on the next link or not.. optionally we let them\n\t\t\t * die here, we have a config setting for that!\n\t\t\t */\n\t\t\t\n\t\t\t// For analysis purposes\n\t\t\tCounters.countStuckEvents.incrementAndGet();\n\n\t\t\t\n\t\t\tif (this.context.qsimConfig.isRemoveStuckVehicles()) {\n\t\t\t\tmoveVehicleFromInlinkToAbort(veh, fromLane, now, currentLink.getId());\n\t\t\t\treturn false ;\n\t\t\t} else {\n\t\t\t\tmoveVehicleFromInlinkToOutlink(veh, currentLink.getId(), fromLane, nextLinkId, nextQueueLane);\n\t\t\t\treturn true;\n\t\t\t\t// (yyyy why is this returning `true'? Since this is a fix to avoid gridlock, this should proceed in small steps. \n\t\t\t\t// kai, feb'12) \n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}", "public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }", "public boolean continueExecuting()\n {\n double var1 = this.theEntity.getDistanceSq((double)this.entityPosX, (double)this.entityPosY, (double)this.entityPosZ);\n return this.breakingTime <= 240 && !this.field_151504_e.func_150015_f(this.theEntity.worldObj, this.entityPosX, this.entityPosY, this.entityPosZ) && var1 < 4.0D;\n }", "public boolean isBurning()\n {\n return this.fuel > 0 && this.canSmelt();\n }", "protected boolean isFinished() {\r\n \tif (manipulator.isHighSwitchPressed() && speed > 0 ||\r\n \t\tmanipulator.isLowSwitchPressed() && speed < 0)\r\n \t\treturn true;\r\n \t\r\n \treturn isTimedOut();\r\n \t\r\n// \tif (targetHeight > startHeight) {\r\n// \t\treturn manipulator.getAverageElevatorHeight() >= targetHeight;\r\n// \t} else {\r\n// \t\treturn manipulator.getAverageElevatorHeight() <= targetHeight;\r\n// \t}\r\n }", "private void carsReadyToLeave(){\n\t Car car = cpview.getFirstLeavingCar();\n\t while (car!=null) {\n\t \tif (car.getHasToPay()){\n\t\t car.setIsPaying(true);\n\t\t paymentCarQueue.addCar(car);\n\t \t}\n\t \telse {\n\t \t\tcarLeavesSpot(car);\n\t \t}\n\t car = cpview.getFirstLeavingCar();\n\t }\n\t }", "@Override\n protected boolean isFinished() {\n return Robot.m_elevator.isDone();\n }", "public boolean isHolding();", "@Override\n\tpublic boolean canDrain(ForgeDirection from, Fluid fluid) {\n\t\treturn false;\n\t}", "private boolean needToTurn() {\n\t\tdouble curDir = sens.getDirection();\n\t\tdouble desDirPlusAmount = desiredDirection + TURNSPEED;\n\t\tdouble desDirMinusAmount = desiredDirection - TURNSPEED;\n\n\t\t// if desired direction is <||> +_ x degrees\n\t\tif (curDir < desDirMinusAmount || curDir > desDirPlusAmount) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean canBurnStun();", "private void penguinStormReaction(){\n if(obstacle.getUserData().getAssetId().equals(OBSTACLE_CLOUD_ASSETS_ID)){\n if(penguin.isFrightStopped()){\n obstacle.setStormRaining(false);\n }else{\n obstacle.setStormRaining(true);\n }\n }\n }", "@Override\n\tpublic void landedOn() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(300);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 300 dollars by landing on Bonus Square\");\n\t\tMonopolyGameController.allowCurrentPlayerToEndTurn();\n\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\tif (!stoppable) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t// return Robot.elevator.getLevel() == Level.Bottom;\n\t\t\treturn (Robot.elevator.getLevel() == Level.Bottom && v < 0.0) || (Robot.elevator.getLevel() == Level.Top && v > 0.0);\n\t\t}\n\t}", "public boolean driveTruck(){\n\t\treturn driveTruck;\n\t}", "protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }", "public boolean hasReachedLEDTarget() {\n\t\tif (closestWhiteLED != null) {\n\t\t\tif (sens.isCloseTo(closestWhiteLED.getTargetX(), closestWhiteLED.getTargetY(), 2)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkTransitionToClimbing() {\n if (mOperatorInterface.climbStart() && Config.getInstance().getBoolean(Key.CLIMBER__ENABLED)) {\n mRobotLogger.log(\"Changing to climbing\");\n\n /** Disables intake if transitioning from intake */\n switch (mState) {\n case INTAKE:\n mIntake.stop();\n mStorage.stop();\n mIntakeState = IntakeState.IDLE;\n break;\n default:\n break;\n }\n\n /** Sets the climbing state to idle if it's not already */\n mState = State.CLIMBING;\n\n mDrive.setClimbingSpeed(true);\n\n if (mClimbingState == ClimbingState.IDLE) {\n mClimbingState = ClimbingState.WAIT;\n }\n return true;\n } else {\n return false;\n }\n }", "@Override\n\tpublic boolean isRented() {\n\t\treturn false;\n\t}", "private void carsReadyToLeave() {\n\t\tCar car = getFirstLeavingCar();\n\t\twhile (car != null) {\n\t\t\tif (car.getHasToPay()) {\n\t\t\t\tcar.setIsPaying(true);\n\t\t\t\tpaymentCarQueue.addCar(car);\n\t\t\t} else {\n\t\t\t\tcarLeavesSpot(car);\n\t\t\t}\n\t\t\tcar = getFirstLeavingCar();\n\t\t}\n\t}", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "private static boolean moveCloserToTarget() {\n Direction f = forward;\n int startingDistance = target.distanceSquaredTo(S.rc.getLocation());\n forward = S.rc.getLocation().directionTo(target);\n forward = forward.rotateLeft();\n for (int i = 0; i < 8; i++) {\n if (target.distanceSquaredTo(S.rc.getLocation().add(forward)) < startingDistance)\n if (moveForwardStrict())\n return true;\n forward = forward.rotateRight();\n }\n forward = f;\n return false;\n }", "protected void onTick() {\n\t\tif(car.drivingInfo.pathToGet.size() == 0 && car.carData.to == null) {\n\t\t\tcar.state = Car.WAIT_PASSENGER_TO_GO_INSIDE;\n\t\t\tSystem.out.println(\"engaged with from drive\" + car.engagedWithAID.toString());\n\t\t\tcar.addBehaviour(new TakePassenger());\n\t\t\tthis.stop();\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\tif(car.carData.to == null) {\n\t\t\tHouseData nextHouseToGo = car.drivingInfo.pathToGet.remove(0);\n\t\t\tcar.carData.to = nextHouseToGo;\n\t\t}\n\t\t\n\t\tint distanceDone = car.carData.distance;\n\t\tint distanceToDo = (int) SmaUtils.computeDistance(car.carData.from.position, car.carData.to.position);\n\t\t\n\t\t// if the distance left is higher than the distance the car can do in one tick, we increment the distance\n\t\tif(distanceDone+Car.CAR_SPEED < distanceToDo) {\n\t\t\tcar.carData.distance += Car.CAR_SPEED;\n\t\t\treturn;\n\t\t} \n\t\t// else, we put the car on the next house\n\t\telse if(distanceDone <= distanceToDo) {\n\t\t\tcar.carData.from = car.carData.to;\n\t\t\tcar.carData.to = null;\n\t\t\tcar.carData.distance = 0;\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n public boolean isFinished() {\n// return false;\n return LightningMath.epsilonEqual(shooter.getFlywheelMotor1Velocity(), shooter.motor1setpoint, Constants.FLYWHEEL_EPSILON) &&\n LightningMath.epsilonEqual(shooter.getFlywheelMotor2Velocity(), shooter.motor2setpoint, Constants.FLYWHEEL_EPSILON) &&\n LightningMath.epsilonEqual(shooter.getFlywheelMotor3Velocity(), shooter.motor3setpoint, Constants.FLYWHEEL_EPSILON);\n }", "public boolean isOverSpeed(){ return vehicleAvarageSpeed > roadMaxSpeed; }", "protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }", "private boolean shouldBecomeCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount <= this.combatEngineerTriggerPercentageEnroll;\r\n\t}", "public void brake() {\n\t\tsetPower(Motor.STOP);\r\n\t}", "private static void decisionWhenAttacking() {\n\t\tif (isNewAttackState()) {\n\t\t\tchangeStateTo(STATE_ATTACK_PENDING);\n\n\t\t\t// We will try to define place for our army where to attack. It\n\t\t\t// probably will be center around a crucial building like Command\n\t\t\t// Center. But what we really need is the point where to go, not the\n\t\t\t// unit. As long as the point is defined we can attack the enemy.\n\n\t\t\t// If we don't have defined point where to attack it means we\n\t\t\t// haven't yet decided where to go. So it's the war's very start.\n\t\t\t// Define this assault point now. It would be reasonable to relate\n\t\t\t// it to a particular unit.\n\t\t\t// if (!isPointWhereToAttackDefined()) {\n\t\t\tStrategyManager.defineInitialAttackTarget();\n\t\t\t// }\n\t\t}\n\n\t\t// Attack is pending, it's quite \"regular\" situation.\n\t\tif (isGlobalAttackInProgress()) {\n\n\t\t\t// Now we surely have defined our point where to attack, but it can\n\t\t\t// be so, that the unit which was the target has been destroyed\n\t\t\t// (e.g. just a second ago), so we're standing in the middle of\n\t\t\t// wasteland.\n\t\t\t// In this case define next target.\n\t\t\t// if (!isSomethingToAttackDefined()) {\n\t\t\tdefineNextTarget();\n\t\t\t// }\n\n\t\t\t// Check again if continue attack or to retreat.\n\t\t\tboolean shouldAttack = decideIfWeAreReadyToAttack();\n\t\t\tif (!shouldAttack) {\n\t\t\t\tretreatsCounter++;\n\t\t\t\tchangeStateTo(STATE_RETREAT);\n\t\t\t}\n\t\t}\n\n\t\t// If we should retreat... fly you fools!\n\t\tif (isRetreatNecessary()) {\n\t\t\tretreat();\n\t\t}\n\t}", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "@Override\n public boolean currentPlayerHavePotentialMoves() {\n return !checkersBoard.getAllPotentialMoves(getCurrentPlayerIndex()).isEmpty();\n }", "@Override\n protected boolean isFinished() {\n return (System.currentTimeMillis() >= thresholdTime || (currentAngle > (totalAngleTurn - 2) && currentAngle < (totalAngleTurn + 2)));\n }", "@Test\n void checkDoMove() {\n abilities.doMove(turn, board.getCellFromCoords(1, 1));\n assertEquals(turn.getWorker().getCell(), board.getCellFromCoords(1, 1));\n Worker forcedWorker = turn.getWorker();\n for (Worker other : turn.getOtherWorkers()) {\n if (other.getCell() == board.getCellFromCoords(2, 2)) {\n forcedWorker = other;\n }\n }\n\n assertEquals(forcedWorker.getCell(), board.getCellFromCoords(2, 2));\n\n // Can't move anymore after having already moved\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(0, 0)));\n }", "public void stick() {\r\n stuck = true;\r\n\t}", "public boolean canMove()\n\t{\n\t\tif(delayMove>compareSpeed())\n\t\t{\n\t\t\tdelayMove=0;\n\t\t\treturn true;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tRobot.intakeSubsystem._getSpeed();\n\n\t\tRobot.driveSubsystem.operatorOverride();\n\t\tScheduler.getInstance().run();\n\n\t\tTargetRegion boilerTarget = Robot.navigator.getBoilerTarget();\n\t\tif (boilerTarget != null) {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", boilerTarget.m_centerTop);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", boilerTarget.m_bounds.m_top);\n\t\t} else {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", -1);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", -1);\n\t\t}\n\t}", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "@Override\n\tpublic boolean takeControl() {\n\t\treturn (Math.abs(Motor.A.getTachoCount() - Settings.motorAAngle) > 5 || (Motor.A.getTachoCount() == 0 && Settings.motorAAngle == -90));\n\t}", "@Override\n\tpublic void canTakeOff() {\n\t\tSystem.out.println(\"I CANNOT TAKE OFF UNLESS YA JUMP ME OVER SOMMAT\");\n\t}", "public boolean moveOn() {\n\t\t\n\t}", "public boolean hasStuck() {\r\n return stuck;\r\n\t}", "@Override\n public void truckNotification(Truck t, Notification message) {\n if (!preprocessingDone) return;\n\n //Wait frame notification - logic branches a bit.\n //if t is holding a load, travel to that location.\n if (message.equals(Notification.WAITING)) {\n if (t.getLoad() != null && t.getLoad().destination.equals(t.getLocation())) {\n t.dropoffLoad();\n\n //Check if there are more parcels to handle. If not, remove from assignment and go home.\n //If so, pick one at random and assign this truck to that.\n if (unassignedParcels.isEmpty()) {\n parcelsAssigned.remove(t);\n t.setTravelPath(dijkstra(t.getLocation(), getBoard().getTruckDepot()));\n } else {\n assignParcelTo(t);\n }\n }\n else if (t.getLoad() != null) {\n t.setTravelPath(dijkstra(t.getLocation(), t.getLoad().destination));\n } else if (parcelsAssigned.containsKey(t) && t.getLocation().isParcelHere(parcelsAssigned.get(t))) {\n t.pickupLoad(parcelsAssigned.get(t));\n } else if (parcelsAssigned.containsKey(t) && getParcels().contains(parcelsAssigned.get(t))) {\n t.setTravelPath(dijkstra(t.getLocation(), parcelsAssigned.get(t).getLocation()));\n } else if (! parcelsAssigned.containsKey(t) || getParcels().isEmpty()) {\n t.setTravelPath(dijkstra(t.getLocation(), getBoard().getTruckDepot()));\n } else if (parcelsAssigned.containsKey(t) && ! getParcels().contains(parcelsAssigned.get(t))) {\n assignParcelTo(t);\n }\n }\n }", "public void buyFarm(){\n bought = !bought;\n }", "protected boolean isFinished() {\n //boolean onTarget = Math.abs(\n //encoderValue - Math.abs(Robot.arm.getArmEncoderValue())) <= RobotMap.ArmConstants.ARM_ENCODER_BUFFER;\n boolean hasBeenZeroed = Robot.arm.hasButtonBeenPressed();\n boolean onTarget = false;\n if(initialPos < setpoint) {\n onTarget = Math.abs(Robot.arm.getArmEncoderValue()) >= setpoint;\n }else if(initialPos >= setpoint) {\n onTarget = Math.abs(Robot.arm.getArmEncoderValue()) <= setpoint;\n }\n return this.isTimedOut() || !hasBeenZeroed || onTarget;\n }", "protected boolean isFinished() {\n \tdouble changeInX = targetX - Robot.sensors.getXCoordinate();\n \tdouble changeInY = targetY - Robot.sensors.getYCoordinate();\n \tdouble distance = Math.sqrt(Math.pow(changeInX, 2) + Math.pow(changeInY, 2));\n return distance < 8 || System.currentTimeMillis() >= stopTime;\n }", "public boolean canEndTurn() {\n\t\tif (hasMoved || hasCaptured) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }", "protected boolean isFinished() {\n return (shooterWheel.shooterWheelSpeedControllerAft.isEnabled() == false && shooterWheel.shooterWheelSpeedControllerFwd.isEnabled() == false);\n }", "@Test\n void invalidWON() {\n win();\n getGame().move(getPlayer(), Direction.NORTH);\n getGame().stop();\n getGame().start();\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }", "protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }", "@Override\r\n protected boolean isFinished() {\r\n \t// we're done when distance pid is done\r\n boolean distFin = mDistController.isFinished() ;\r\n if (distFin) {\r\n Robot.drivetrain.tankDrive(0, 0);\r\n mDistController.stop();\r\n mBearingController.stop();\r\n }\r\n return distFin ; \r\n }", "@Override\n\tpublic void nextTurn()\n\t{\n\t\tif (isInventoryFull())\n\t\t{\n\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\"[THE INVENTORY OF \" + myWorker.getId()\n\t\t\t\t\t\t\t+ \" IS FULL AND IS GONNA UNLOAD]\");\n\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\tBuilding unloadBuilding = null;\n\t\t\tif (getMyPlayer().getStockpiles().size() > 0)\n\t\t\t{\n\t\t\t\tRandom random = new Random(100);\n\t\t\t\tint chosenStockpile = random.nextInt(getMyPlayer()\n\t\t\t\t\t\t.getStockpiles().size());\n\n\t\t\t\tunloadBuilding = getMyPlayer().getStockpiles().get(\n\t\t\t\t\t\tchosenStockpile);\n\t\t\t} else if (getMyPlayer().getMainBuildings().size() > 0)\n\t\t\t{\n\t\t\t\tunloadBuilding = getMyPlayer().getMainBuildings().get(0);\n\t\t\t}\n\n\t\t\tif (doIMoveToBuilding(unloadBuilding))\n\t\t\t{\n\t\t\t\tMoveAction move;\n\t\t\t\tPoint dest = getMoveDestination(unloadBuilding);\n\t\t\t\tif (dest != null)\n\t\t\t\t{\n\t\t\t\t\tmove = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\t\tmove.doAction();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADDED \"\n\t\t\t\t\t\t\t\t+ myWorker.getLoadInInventory()\n\t\t\t\t\t\t\t\t+ \" TO RESOURCES]\");\n\t\t\t\tif (destBuilding instanceof Farm)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getFoodInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof StoneMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getStoneInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof GoldMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getGoldInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof WoodCamp)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getLumberInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\tmyWorker.setOccupationType(OccupationType.IDLE);\n\t\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\t\tmyWorker.setLoadInInventory(0);\n\t\t\t\tmyWorker.setActionController(null);\n\t\t\t}\n\t\t} else if (doIMoveToBuilding(destBuilding))\n\t\t{\n\t\t\tPoint dest = getMoveDestination(destBuilding);\n\t\t\tif (dest == null)\n\t\t\t\tSystem.err\n\t\t\t\t\t\t.println(\"BuildController class:nextTurn(): dest is null! do something!!!!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tMoveAction move = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\tmove.doAction();\n\t\t\t}\n\t\t} else if (!isInventoryFull())\n\t\t{\n\t\t\tdestBuilding.getWorkersInside().add(myWorker);\n\t\t\tint collectResourcePerTurn = 0;\n\t\t\tif (destBuilding instanceof Farm)\n\t\t\t{\n\t\t\t\tmyWorker.setFoodCollectingExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getFood();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getFoodProductionRate()));\n\t\t\t} else if (destBuilding instanceof GoldMine)\n\t\t\t{\n\t\t\t\tmyWorker.setGoldMiningExperience(myWorker\n\t\t\t\t\t\t.getGoldMiningExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getGold();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getGoldMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getGoldProductionRate()));\n\t\t\t} else if (destBuilding instanceof StoneMine)\n\t\t\t{\n\t\t\t\tmyWorker.setStoneMiningExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getStone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getStoneMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getStoneProductionRate()));\n\n\t\t\t} else if (destBuilding instanceof WoodCamp)\n\t\t\t{\n\t\t\t\tmyWorker.setWoodCampExperience(myWorker.getWoodCampExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()]\n\t\t\t\t\t\t\t\t.getLumber();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getWoodCampExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getWoodProductionRate()));\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADD \"\n\t\t\t\t\t\t\t\t+ collectResourcePerTurn\n\t\t\t\t\t\t\t\t+ \" OF RESOURCE THIS TURN]\");\n\t\t\t}\n\n\t\t\tmyWorker.setLoadInInventory(collectResourcePerTurn\n\t\t\t\t\t+ myWorker.getLoadInInventory());\n\t\t}\n\t}", "public void endOfWork() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tPassenger passenger = (Passenger) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.SIM_ENDED);\n\t\tpkt.setId(passenger.getPassengerId());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\n\t\tpassenger.setCurrentState(pkt.getState());\n\t\tclientCom.close();\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn Math.abs(elevator.getWristPosition() - elevator.getWristStages()[elevator.getWristStage()]) < Math.PI/18 && !elevator.isRunning(ElevatorSubsystem.Follower.ELEVATOR);\r\n\t}", "boolean motorsAreBusy();", "public void goTo(final double target){\n final Thread thread = new Thread(new Runnable() {\r\n public void run(){\r\n goToFlag = false;\r\n currentAngle = stringPot.getVoltage(); //change happened here\r\n shootTarget = target;\r\n while(target > currentAngle && target < maxLimit && currentAngle < maxLimit && canRun && elevateFlag){\r\n currentAngle = stringPot.getVoltage();//change happened here\r\n System.out.println(\"raise \" + target);\r\n raise();\r\n if(target < currentAngle){\r\n elevateFlag = false;\r\n break;\r\n }\r\n }\r\n while(target < currentAngle && target > minLimit && currentAngle > minLimit && canRun && elevateFlag){\r\n currentAngle = stringPot.getVoltage();//change happened here\r\n System.out.println(\"lower \" + target);\r\n lower();\r\n if(target > currentAngle){\r\n elevateFlag = false;\r\n break;\r\n }\r\n }\r\n //System.out.println(\"off\");\r\n off();\r\n }\r\n });\r\n thread.start();\r\n }", "@Override\n\tpublic boolean isStoppingConditionReached() {\n\n\t\tlong currentComputingTime = System.currentTimeMillis() - iterationStartingTime;\n\n\t\tif (Configurator.eINSTANCE.isSearchBudgetByTime()) // byTime\n\t\t\treturn super.isStoppingConditionReached() || currentComputingTime > durationThreshold;\n\t\tif (Configurator.eINSTANCE.isSearchBudgetByPrematureConvergence()) // byPrematureConvergence\n\t\t\treturn super.isStoppingConditionReached() || isStagnantState();\n\t\t// computeStagnantState\n\t\tif (Configurator.eINSTANCE.isSearchBudgetByPrematureConvergenceAndTime()) // byBoth\n\t\t\treturn super.isStoppingConditionReached() || isStagnantState() || currentComputingTime > durationThreshold;\n\t\treturn super.isStoppingConditionReached(); // classic\n\n\t}", "public boolean completed(){\n return !activeAttackers() && !attackersLeft();\n }", "protected boolean isFinished() {\n \treturn (Robot.sonar.getDistance() <= distance);\n }", "public boolean isSolvable()\n {\n return moves() >= 0;\n }", "@Test\r\n\tpublic void testDeliveryChuteFull() {\r\n\t\tdcListen.chuteFull(vend.getDeliveryChute());\r\n\t\tassertTrue(vend.getDeliveryChute().isDisabled());\r\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t\tif (state) {\n\t\t\treturn;\n\t\t}\n\t\tsync();\n\t\tfor (QuestPlayer player : participants.getParticipants()) {\n\t\t\tif (player.getPlayer().isOnline())\n\t\t\tif (player.getPlayer().getPlayer().getLocation().getWorld().getName().equals(destination.getWorld().getName()))\n\t\t\tif ((player.getPlayer().getPlayer()).getLocation().distance(destination) <= targetRange) {\n\t\t\t\tstate = true;\n\t\t\t\tupdateQuest();\n\t\t\t\t\n\t\t\t\t//unregister listener, cause we'll never switch to unsatisfied\n\t\t\t\tHandlerList.unregisterAll(this);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tstate = false;\n\t}", "@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }" ]
[ "0.61672103", "0.6103579", "0.5982098", "0.592702", "0.5911595", "0.58448523", "0.5837405", "0.58192325", "0.5799895", "0.57953626", "0.57790077", "0.57262623", "0.5709278", "0.57042444", "0.5700513", "0.56426877", "0.56356776", "0.5631399", "0.5616553", "0.5604761", "0.5601471", "0.5593307", "0.5590515", "0.558695", "0.5585795", "0.5582589", "0.55577624", "0.5553802", "0.5550975", "0.5548506", "0.5542922", "0.55328196", "0.55283374", "0.5521818", "0.5509695", "0.54989713", "0.5495394", "0.5487178", "0.54867", "0.54662466", "0.54587895", "0.54564667", "0.54481477", "0.54412186", "0.54318815", "0.5423969", "0.5423336", "0.5418951", "0.5418864", "0.54180056", "0.54137975", "0.5408088", "0.5401684", "0.54015505", "0.54005986", "0.5400593", "0.53960365", "0.5382538", "0.5378849", "0.53758323", "0.5371615", "0.53681636", "0.53680253", "0.5364976", "0.5358626", "0.53567517", "0.5354705", "0.53546906", "0.5354159", "0.5345531", "0.5344775", "0.53422666", "0.533649", "0.53359365", "0.5323075", "0.532083", "0.531811", "0.53176343", "0.5315665", "0.53154194", "0.53097653", "0.5309234", "0.5304673", "0.52977073", "0.52950484", "0.52939093", "0.5277405", "0.5275005", "0.52740633", "0.5273344", "0.5272872", "0.52726406", "0.5266928", "0.5266354", "0.5260176", "0.5259281", "0.52567714", "0.5253786", "0.5244566", "0.5241933" ]
0.67737174
0
Can drop the ramp if the TransportTruck is on standby
public void dropRamp() { if (currentSpeed == 0) { storage.dropRamp(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void pump_water() {\n\t\t\r\n\t}", "private boolean deactivate() {\r\n // Automatically shutdown thruster if no input was given for a given interval\r\n if(state != State.Inactive) {\r\n state = State.Inactive;\r\n if(!isServer) {\r\n thruster.setParticlesPerSec(0);\r\n }\r\n if(null != engineSound && engineSound.getStatus().equals(AudioSource.Status.Playing)) {\r\n engineSound.stop();\r\n }\r\n return true;\r\n }\r\n return false;\r\n }", "public void raiseRamp() {\n if (currentSpeed == 0) {\n storage.raiseRamp();\n }\n }", "public void degradedMode() {\n\n // if failure of water-level measuring unit got to rescueMode()\n if (waterLevelFailure()) {\n this.outgoing.send(new Message(MessageKind.LEVEL_FAILURE_DETECTION));\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.RESCUE));\n this.mode = State.RESCUE;\n this.prevRescueMode = State.DEGRADED;\n rescueMode();\n return;\n }\n // if water level risks reaching M1 or M2 go to emergencyStopMode()\n if (nearMaxMin()) {\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.EMERGENCY_STOP));\n this.mode = State.EMERGENCY_STOP;\n emergencyStopMode();\n return;\n }\n\n for (int i = 0; i < this.incoming.size(); i++) { // check for fixed messages\n Message msg = this.incoming.read(i);\n if (msg.getKind().equals(MessageKind.PUMP_REPAIRED_n)) {\n int pumpNo = msg.getIntegerParameter();\n this.outgoing.send(new Message(MessageKind.PUMP_REPAIRED_ACKNOWLEDGEMENT_n, pumpNo));\n this.mode = this.prevDegradedMode;\n }\n if (msg.getKind().equals(MessageKind.PUMP_CONTROL_REPAIRED_n)) {\n int pumpNo = msg.getIntegerParameter();\n this.outgoing\n .send(new Message(MessageKind.PUMP_CONTROL_REPAIRED_ACKNOWLEDGEMENT_n, pumpNo));\n this.mode = this.prevDegradedMode;\n\n }\n if (msg.getKind().equals(MessageKind.STEAM_REPAIRED)) {\n this.outgoing.send(new Message(MessageKind.STEAM_REPAIRED_ACKNOWLEDGEMENT));\n this.mode = this.prevDegradedMode;\n }\n }\n\n if (this.mode.equals(State.NORMAL)) {\n this.brokenPumpNo = -1;\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.NORMAL));\n return;\n } else if (this.mode.equals(State.READY)) {\n this.brokenPumpNo = -1;\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.INITIALISATION));\n return;\n } else { // pump water in\n this.waterLevel = this.levelMessage.getDoubleParameter();\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.DEGRADED));\n this.mode = State.DEGRADED;\n int noOfPumps = estimatePumps(this.steamLevel, this.waterLevel);\n turnOnPumps(noOfPumps);\n }\n\n // if transmissionFailure go to emergencyStopMode()\n }", "public void blackout(TimePeriod t) {\n\t\t\n\t}", "public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }", "public synchronized void stop()\r\n/* 78: */ {\r\n/* 79:203 */ if (!this.monitorActive) {\r\n/* 80:204 */ return;\r\n/* 81: */ }\r\n/* 82:206 */ this.monitorActive = false;\r\n/* 83:207 */ resetAccounting(milliSecondFromNano());\r\n/* 84:208 */ if (this.trafficShapingHandler != null) {\r\n/* 85:209 */ this.trafficShapingHandler.doAccounting(this);\r\n/* 86: */ }\r\n/* 87:211 */ if (this.scheduledFuture != null) {\r\n/* 88:212 */ this.scheduledFuture.cancel(true);\r\n/* 89: */ }\r\n/* 90: */ }", "private void tickIsInProduction() {\n if (this.timeInState == this.unitInfo.getProductionTime() - 1) {\n this.player.setSuppliesMax(this.player.getSuppliesMax() + this.unitInfo.getSuppliesGain());\n changeState(this.unitInfo.getUnitStateAfterProduction());\n \n if (this.producer != null)\n this.producer.changeState(UnitState.HOLD);\n }\n \n }", "@Test\n public void timeCollectionDisabled() {\n mDeviceState.setCharging(true);\n runScenario();\n }", "public void brake() {\n\t\tsetPower(Motor.STOP);\r\n\t}", "public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }", "@Override\n public void stop() {\n\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n armMotor.setPower(0);\n // extendingArm.setPower(0);\n\n telemetry.addData(\"Status\", \"Terminated Interative TeleOp Mode\");\n telemetry.update();\n\n\n }", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "void setDeadband(double volts) {\r\n\t\tfor(AnalogInput m_analog : mAnalogs)\r\n\t\t{\r\n\t\t\tint deadband = (int)(volts * 1e9 / m_analog.getLSBWeight() * (1 << m_analog.getOversampleBits()));\r\n\t\t\tm_analog.setAccumulatorDeadband(deadband);\r\n\t\t}\r\n\t}", "public void deactivatePowerup()\r\n\t{\r\n\t\thasPowerup = false;\r\n\t\tcurrentPowerup = null;\r\n\t}", "@Override\n\tpublic void canTakeOff() {\n\t\tSystem.out.println(\"I CANNOT TAKE OFF UNLESS YA JUMP ME OVER SOMMAT\");\n\t}", "@Override\n public void stop() {\n if (FLM != null) FLM.setPower(0);\n if (FRM != null) FRM.setPower(0);\n if (BLM != null) BLM.setPower(0);\n if (BRM != null) BRM.setPower(0);\n if (BigSuck != null) BigSuck.setPower(0);\n if (SmallSuck != null) SmallSuck.setPower(0);\n if (UpLift != null) UpLift.setPower(0);\n if (DragArm != null) DragArm.setPosition(DragArmRestPosition);\n if (LiftGrab != null) LiftGrab.setPosition(LiftGrabRestPosition);\n if (LiftSwivel != null) LiftSwivel.setPosition(LiftSwivelRestPosition);\n }", "@Override\n\tprotected void takeOff(){\n\t\tgvh.log.i(TAG, \"Drone taking off\");\n\t\tsetControlInput(0, 0, 0, 1);\n\t}", "@Override\n public boolean canMove() {\n return storage.isRampClosed();\n }", "public void powerdown() {\n monitor.sendPowerdown();\n }", "public abstract void wgb_onDisable();", "private final void maintain(){\n\t\tif(host.getStrength()>MAINTENANCE_COST){\n\t\t\thost.expend(MAINTENANCE_COST);\n\t\t}\n\t\telse{\n\t\t\tkill();\n\t\t}\n\t}", "@Override\n protected void end() {\n drive.setEnabled(false);\n drive.setLeftPower(0);\n drive.setRightPower(0);\n }", "public void turnStrobeOff(){\n Intent stop_strobe_intent = new Intent(FlareConstants.STOP_STROBE);\n stop_strobe_intent.putExtra(FlareConstants.STOP_STROBE, FlareConstants.STOP_STROBE);\n LocalBroadcastManager.getInstance(this).sendBroadcast(stop_strobe_intent);\n Log.d(TAG, \"Sent stop strobe intent broadcast\");\n }", "private void handleSensorDeactivated() {\n if (securityRepository.getAlarmStatus() == AlarmStatus.PENDING_ALARM) {\n setAlarmStatus(AlarmStatus.NO_ALARM);\n }\n// switch (securityRepository.getAlarmStatus()) {\n// case PENDING_ALARM -> setAlarmStatus(AlarmStatus.NO_ALARM);\n// case ALARM -> setAlarmStatus(AlarmStatus.PENDING_ALARM);\n// }\n }", "private void restoreSleepMode(){\n wl.release();\n }", "public void powerOff() \n\t{\n\t\tif(active)\n\t\t{\n\t\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\t\tsetActivationLever(false);\n\t\t\t}\n\t\t\t\n\t\t\t//lots of code to make the furnace turn off, without loosing contents.\n\t\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\t\tbyte data = furnace.getData().getData();\n\t\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\t\tfurnace.getInventory().clear();\n\t\t\tfactoryPowerSourceLocation.getBlock().setType(Material.FURNACE);\n\t\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\t\tfurnace.setRawData(data);\n\t\t\tfurnace.update();\n\t\t\tfurnace.getInventory().setContents(oldContents);\n\t\t\t\n\t\t\t//put active to false\n\t\t\tactive = false;\n\t\t\t//reset the production timer\n\t\t\tcurrentProductionTimer = 0;\n\t\t}\n\t}", "@Override\r\n public void turnOff() {\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n if (this.engaged()) {\r\n disengageLoads();\r\n }\r\n }", "boolean canFall();", "public void setBoulderLockOff(){\r\n\t\tservoTarget = Constants.BALL_HOLDER_RETRACTED;\r\n\t}", "boolean stop()\n {\n boolean success = true; // Tells whether attempt to stop lift is successful or not\n\n try\n {\n _motor.setPower(0);\n }\n catch(Exception e)\n {\n Log.e(\"Error\" , \"Cannot stop lift, check your mapping\");\n success = false;\n }\n\n return success;\n }", "public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }", "@Override\r\n\tpublic void wipeWindShield() {\n\t\t\r\n\t}", "public static void CheckPressure()\n {\n //Only start the compressor if we neeed air\n if(_isRuning && _compressor.getPressureSwitchValue())\n {\n _compressor.stop();\n _isRuning = false;\n }\n else if (!_isRuning && !_compressor.getPressureSwitchValue())\n {\n _compressor.start();\n _isRuning = true;\n }\n }", "public void downgrade(){\n\n //downgrade a buildings stats \n this.setLevel(this.getLevel() - 1);\n this.setMaxHealth(this.getMaxHealth() - 500);\n this.setHealth(this.getHealth() - 500);\n this.maxCapacity -= 20;\n\n }", "public void setUnstable() {\n this.unstable = true;\n this.unstableTimeline.play();\n if (this.online == true) {\n this.statusLed.setStatus(\"alert\");\n this.statusLed.setFastBlink(true);\n }\n }", "public void setAsDown () \n\t{ \n\t\tn.setFailureState(false);\n\t\tfinal SortedSet<WLightpathRequest> affectedDemands = new TreeSet<> ();\n\t\tgetOutgoingFibers().forEach(f->affectedDemands.addAll(f.getTraversingLpRequestsInAtLeastOneLp()));\n\t\tgetIncomingFibers().forEach(f->affectedDemands.addAll(f.getTraversingLpRequestsInAtLeastOneLp()));\n\t\tfor (WLightpathRequest lpReq : affectedDemands)\n\t\t\tlpReq.internalUpdateOfRoutesCarriedTrafficFromFailureState();\n\t}", "public void liftDown() {\n set(m_defaultLiftSpeedDown);\n }", "private boolean shouldStopBeingCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount >= this.combatEngineerTriggerPercentageCancel;\r\n\t}", "public void off() {\n\t\tSystem.out.println(\"Tuner is off\");\n\t}", "public void stopRinging();", "public void unleash() {\n\t\tlocked = false;\n\t\tfloat percent = framesAccelerated/60.0f;\n\t\tif (percent > 1) percent = 2 - percent;\n\t\tif (percent < 0) percent = 0;\n\t\t\n\t\tif (player.aiControlled()) {\n\t\t\tpercent = AIcontroller.randomStartBoost();\n\t\t}\n\t\t\n\t\tspeed = MAX_SPEED * percent;\n\t}", "public void stopTurning() {\r\n turningPID.disable();\r\n tankDrive(0, 0);\r\n }", "public boolean canBurnStun();", "public void pedalDown() {\n\t\tsynthChannel.controlChange(MusicManager.PEDAL_ID, MusicManager.PEDAL_ON);\n\t}", "public void silverDropPoint()\r\n {\r\n System.out.println(\"silverDropPoint\");\r\n if (isCollectionPlane)\r\n {\r\n savePreviousPosition();\r\n setIsCollectionPlane(false);\r\n }\r\n if (motorJ1.getCurrentPosition() > SILVER_DROP_J1)\r\n {\r\n j1Power = -J1_POWER;\r\n }\r\n else if (motorJ1.getCurrentPosition() < SILVER_DROP_J1)\r\n {\r\n j1Power = J1_POWER;\r\n }\r\n\r\n if (motorJ2.getCurrentPosition() > SILVER_DROP_J2)\r\n {\r\n j2Power = -J2_POWER;\r\n }\r\n else if (motorJ2.getCurrentPosition() < SILVER_DROP_J2)\r\n {\r\n j2Power = J2_POWER;\r\n }\r\n\r\n if (motorJ3.getCurrentPosition() > SILVER_DROP_J3)\r\n {\r\n j3Power = -UP_POWER_J3;\r\n }\r\n else if (motorJ3.getCurrentPosition() < SILVER_DROP_J3)\r\n {\r\n j3Power = UP_POWER_J3;\r\n }\r\n toPosition(j1Power, j2Power, j3Power, SILVER_DROP_J1, SILVER_DROP_J2, SILVER_DROP_J3);\r\n j1Power = 0;\r\n j2Power = 0;\r\n j3Power = 0;\r\n }", "public void liftOff() {\n\t\tL.trace(\"liftOff\");\n\t\tif (canFly()) {\n\t\t\tjump();\n\t\t}\n\t}", "private void halt() {\n robot.leftFront.setPower(0);\n robot.leftBack.setPower(0);\n robot.rightFront.setPower(0);\n robot.rightBack.setPower(0);\n }", "boolean disableMonitoring();", "public boolean unpoison() {\r\n\t\tstrength = STRENGTH;\r\n\t\treturn true;\r\n\t}", "public void checkIfShowerOn(){\n double currentSMA = mySMA.currentAverage();\n Log.d(LOGTAG,\"currentSMA: \"+currentSMA);\n Log.d(LOGTAG,\"isShowerOn: \"+ isShowerOn);\n if (currentSMA>SMA_THRESHOLD && !isShowerOn){\n //Initialize stuff to do once shower is on\n isShowerOn=true;\n startShower();\n } else if (currentSMA<SMA_THRESHOLD && isShowerOn){\n //Shutdown\n isShowerOn=false;\n endShower();\n }\n }", "public boolean isAffectingDropsAndPowerups() {\n \t\treturn level >= Upgrades.SLOW_UPGRADE_NO_AFFECT_DROPS_AND_POWERUPS;\n \t}", "boolean isDegraded();", "public void disable(){\n if(criticalStop) return;\n getModel().setStatus(false);\n }", "@Test\r\n\tpublic void testDeliveryChuteDisable() {\r\n\t\tdcListen.doorOpened(vend.getDeliveryChute());\r\n\t\tassertTrue(vend.getDeliveryChute().isDisabled());\r\n\t}", "private void stop() {\n System.out.println(\"Stopping on \"+ _currentFloor.floorName() +\" floor \" );\n _currentFloor.clearDestinationRequest();\n _passengersOnboard = _passengersOnboard - _currentFloor.queuedPassengers();\n _currentFloor.clearQueuedPassengers();\n System.out.println(this);\n\n }", "public void disable() {\n operating = false;\n }", "public boolean isDrooping() {\n return false;\n }", "@Override\n public void bankrupt() {\n this.mortgaged = false;\n }", "public void action() {\r\n\t\tsuppressed = false;\r\n\t\tMotor.B.stop();\r\n\t\tMotor.C.stop();\r\n\t\tDelay.msDelay(1000);\r\n\t\tMotor.B.setSpeed(180);\r\n\t\tMotor.C.setSpeed(180);\r\n\t\tMotor.B.forward();\r\n\t\tMotor.C.forward();\r\n\t\tif((light.getLightValue()>46 && light.getLightValue()<49) || (light.getLightValue()>27 && light.getLightValue()<31)){\r\n\t\t\tMotor.B.stop();\r\n\t\t\tMotor.C.stop();\r\n\t\t\tDelay.msDelay(500);\r\n\t\t\tMotor.B.forward();\r\n\t\t\tMotor.C.forward();\r\n\t\t\tif(light.getLightValue()>44 && light.getLightValue()<45){//home base\r\n\t\t\t\tMotor.B.stop();\r\n\t\t\t\tMotor.C.stop();\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!suppressed){\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t}", "@Override\n public void stop() {\n setDebrisPusher(DebrisPusherDirection.Down);\n }", "protected int dropOff(int amt) {\n delayElevator();\n return load.addAndGet(-amt);\n }", "public void suspend()\r\n {\r\n chargeStatus = STATUS_NOT_CHARGING;\r\n connectionStatus = STATUS_OFFLINE;\r\n timerStop(); //...Suspends the update timer. \r\n }", "public boolean isDropped();", "@Override\n\tpublic void powerOff() {\n\t\tSystem.out.println(\"samsongTV powerOff\");\n\n\t}", "public void disable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Coast);\n }", "public void setSensorOff() {\n\n }", "@Override\r\n\tpublic boolean stopCondition(State<CarRpmState, CarControl> state) {\n\t\treturn (state.num>start.num && state.state.getSpeed()<0.5);\r\n\t}", "public void releasePressureToShooter() {\n fire1.set(false);\n fire2.set(false);\n }", "public void deactivateWings() {\n\t\tSystem.out.println(\"Wings are deactivated\");\n\t}", "protected boolean setOffTimerReservationSetting(byte[] edt) {return false;}", "public void rescueMode() {\n // if water level risks reaching M1 or M2 go to emergencyStopMode()\n if (nearMaxRescue() || this.waterLevel <= 0) {\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.EMERGENCY_STOP));\n this.mode = State.EMERGENCY_STOP;\n emergencyStopMode();\n }\n\n // checks to see if water level has been repaired.\n if (extractOnlyMatch(MessageKind.LEVEL_REPAIRED, this.incoming) != null) {\n this.outgoing.send(new Message(MessageKind.LEVEL_REPAIRED_ACKNOWLEDGEMENT));\n System.out.println(this.prevRescueMode);\n this.mode = this.prevRescueMode;\n if (this.mode.equals(State.NORMAL)) {\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.NORMAL));\n this.waterLevel = this.levelMessage.getDoubleParameter();\n return;\n }\n\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.DEGRADED));\n this.waterLevel = this.levelMessage.getDoubleParameter();\n return;\n\n }\n\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.RESCUE));\n int noOfPumps = estimatePumps(this.steamMessage.getDoubleParameter(), this.waterLevel);\n this.waterLevel = this.rescueWaterEstimate;\n turnOnPumps(noOfPumps);\n\n // if transmissionFailure go to emergencyStopMode()\n\n }", "public void powerOff() { //power_off\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.OFF));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.OFF) {\n isTurningOff = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n }\n }", "@Override\n\tpublic boolean isSleeping() {\n\t\treturn false;\n\t}", "public void normalMode() {\n this.brokenPumpNo = -1;\n if (howManyBrokenUnits()) {\n this.mode = State.EMERGENCY_STOP;\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.EMERGENCY_STOP));\n emergencyStopMode();\n return;\n }\n if (steamFailure()) { // if steam failure go to degraded mode\n this.mode = State.DEGRADED;\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.DEGRADED));\n this.outgoing.send(new Message(MessageKind.STEAM_FAILURE_DETECTION));\n this.waterLevel = this.levelMessage.getDoubleParameter();\n degradedMode();\n return;\n }\n\n // check for water-level detection failure\n if (waterLevelFailure() || this.levelMessage.getDoubleParameter() == 0) {\n // failure, goes to rescue mode\n this.outgoing.send(new Message(MessageKind.LEVEL_FAILURE_DETECTION));\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.RESCUE));\n this.mode = State.RESCUE;\n this.prevRescueMode = State.NORMAL;\n this.steamLevel = this.steamMessage.getDoubleParameter();\n rescueMode();\n return;\n }\n if (nearMaxMin() || overMax()) { // checks if water is near or over the max\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.EMERGENCY_STOP));\n this.mode = State.EMERGENCY_STOP;\n emergencyStopMode();\n return;\n }\n int no = pumpFailure();\n if (no != -1) { // check for any pump failure\n this.brokenPumpNo = no;\n this.mode = State.DEGRADED;\n this.prevDegradedMode = State.NORMAL;\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.DEGRADED));\n this.outgoing.send(new Message(MessageKind.PUMP_FAILURE_DETECTION_n, no));\n degradedMode();\n return;\n }\n no = pumpControllerFailure();\n if (no != -1) { // check for any controller failure\n this.mode = State.DEGRADED;\n this.prevDegradedMode = State.NORMAL;\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.DEGRADED));\n this.outgoing.send(new Message(MessageKind.PUMP_CONTROL_FAILURE_DETECTION_n, no));\n degradedMode();\n return;\n }\n\n // all error messages checked. Can run normal mode as per usual.\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.NORMAL));\n this.waterLevel = this.levelMessage.getDoubleParameter();\n this.steamLevel = this.steamMessage.getDoubleParameter();\n int noOfPumps = estimatePumps(this.steamMessage.getDoubleParameter(),\n this.levelMessage.getDoubleParameter());\n turnOnPumps(noOfPumps); // pump water in\n\n if (this.levelMessage.getDoubleParameter() < this.configuration.getMinimalNormalLevel()) {\n\n noOfPumps = estimatePumps(this.steamMessage.getDoubleParameter(),\n this.levelMessage.getDoubleParameter());\n turnOnPumps(noOfPumps);\n }\n if (this.levelMessage.getDoubleParameter() > this.configuration.getMaximalNormalLevel()) {\n // if it goes above max normal level\n noOfPumps = estimatePumps(this.steamMessage.getDoubleParameter(),\n this.levelMessage.getDoubleParameter());\n turnOnPumps(noOfPumps);\n }\n\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "public void hold() throws DeviceException {\n \t\ttry {\n \t\t\tcontroller.caput(holdChannel, 1, 2.0);\n \t\t} catch (Throwable e) {\n \t\t\tthrow new DeviceException(\"failed to stop or hole the JOB\", e);\n \t\t}\n \t}", "public void setEngineOff();", "public boolean bust() {\n if (dealerHand.isBust()) {\n dealerHand = new Deck();\n return true;\n } else {\n return false;\n }\n }", "void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }", "boolean isDrooping();", "public void disableMonsters(){\n enabled = false;\n }", "public boolean canSpawnLightningBolt()\n {\n return this.func_150559_j() ? false : this.enableRain;\n }", "@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\t//if (Settings.motorAAngle == -90) Settings.motorAAngle = -95;\n\n\t\tMotor.A.rotateTo(Settings.motorAAngle, true);\n\n\t\twhile (Motor.A.isMoving() && !Motor.A.isStalled() && !suppressed);\t\t\t\n\t\t\n\t\tMotor.A.stop();\n\t}", "@Override\r\n\tpublic void powerOff() {\n\r\n\t\tSystem.out.println(\"ig tv power off\");\r\n\r\n\t}", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "public void setLowGearState() {\n shifter.set(Constants.Drivetrain.LOW_GEAR_STATE);\n }", "void cancelProduction();", "public abstract void onDisable();", "public boolean isBurning()\n {\n return this.fuel > 0 && this.canSmelt();\n }", "public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}", "@Test\n public void testLowVolumeDoesNotTripCircuit() {\n try {\n int sleepWindow = 200;\n int lowVolume = 5;\n\n HystrixCommandProperties.Setter properties = HystrixCommandPropertiesTest.getUnitTestPropertiesSetter().withCircuitBreakerSleepWindowInMilliseconds(sleepWindow).withCircuitBreakerRequestVolumeThreshold(lowVolume);\n HystrixCommandMetrics metrics = getMetrics(properties);\n HystrixCircuitBreaker cb = getCircuitBreaker(key, CommandOwnerForUnitTest.OWNER_TWO, metrics, properties);\n\n // fail\n metrics.markFailure(1000);\n metrics.markFailure(1000);\n metrics.markFailure(1000);\n metrics.markFailure(1000);\n\n // even though it has all failed we won't trip the circuit because the volume is low\n assertTrue(cb.allowRequest());\n assertFalse(cb.isOpen());\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Error occurred: \" + e.getMessage());\n }\n }", "public boolean waterLevelFailure() {\n if (this.levelMessage.getDoubleParameter() < 0) {\n return true;\n } else if (this.levelMessage.getDoubleParameter() >= this.configuration.getCapacity()) {\n return true;\n } else if ((this.mode != State.READY && this.mode != State.WAITING)\n && (this.levelMessage.getDoubleParameter() > (this.waterLevel * 2))) {\n return true;\n } else if ((this.mode != State.READY && this.mode != State.WAITING)\n && (this.levelMessage.getDoubleParameter() < (this.waterLevel - (this.waterLevel / 2)))) {\n return true;\n } else {\n return false;\n }\n }", "public boolean takeControl() {\n\t\tif (Squirrel.us.getDistance() <= 30 && Squirrel.notDetected)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "void disablePWM();", "@Override\n\tpublic boolean canDrain(ForgeDirection from, Fluid fluid) {\n\t\treturn false;\n\t}", "public boolean isBust() {\n\t\tif(handValue() > 21) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void setRemainingAir ( int ticks ) {\n\t\texecute ( handle -> handle.setRemainingAir ( ticks ) );\n\t}", "public void onSensorUnreliable ()\r\n\t{\r\n\t\tif ((System.currentTimeMillis())>5000)\r\n\t\t{\r\n\t\t\tLog.d(TAG,\"You need to calibrate your sensors.\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic void turnOff() {\n\n\t}" ]
[ "0.58896893", "0.5888905", "0.5763726", "0.5724192", "0.57227314", "0.5713922", "0.5655584", "0.56311935", "0.56268764", "0.5599352", "0.5599284", "0.5566489", "0.554581", "0.55351216", "0.55199015", "0.55120885", "0.5497627", "0.5494043", "0.5493339", "0.54899704", "0.5488803", "0.5484965", "0.5484171", "0.5482246", "0.54593134", "0.5454219", "0.5447022", "0.5444607", "0.54369706", "0.5432154", "0.5428008", "0.5421647", "0.5412042", "0.54112256", "0.5397036", "0.5379939", "0.5360236", "0.5357769", "0.53515846", "0.5342616", "0.53376704", "0.53361064", "0.53276604", "0.5324679", "0.5324248", "0.53077763", "0.53017133", "0.5300661", "0.52928406", "0.52922624", "0.5288226", "0.52876884", "0.5286474", "0.52759326", "0.5267246", "0.52651453", "0.526204", "0.52584904", "0.5249645", "0.5248143", "0.5242741", "0.52326465", "0.5228206", "0.5220805", "0.52146995", "0.5214293", "0.5214232", "0.5212747", "0.52091146", "0.52066106", "0.5204983", "0.52032447", "0.5202171", "0.5197847", "0.51958936", "0.5182933", "0.5179603", "0.5178065", "0.5176333", "0.51690865", "0.51654357", "0.516483", "0.51591814", "0.51481026", "0.5142976", "0.514019", "0.5135938", "0.51322776", "0.51312417", "0.5130876", "0.5128337", "0.51196337", "0.51153225", "0.51097757", "0.51089543", "0.51057917", "0.5105178", "0.51031697", "0.5099676", "0.50939703" ]
0.6906237
0
Can raise the ramp if the TransportTruck is on standby
public void raiseRamp() { if (currentSpeed == 0) { storage.raiseRamp(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkIfShowerOn(){\n double currentSMA = mySMA.currentAverage();\n Log.d(LOGTAG,\"currentSMA: \"+currentSMA);\n Log.d(LOGTAG,\"isShowerOn: \"+ isShowerOn);\n if (currentSMA>SMA_THRESHOLD && !isShowerOn){\n //Initialize stuff to do once shower is on\n isShowerOn=true;\n startShower();\n } else if (currentSMA<SMA_THRESHOLD && isShowerOn){\n //Shutdown\n isShowerOn=false;\n endShower();\n }\n }", "private void pump_water() {\n\t\t\r\n\t}", "public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }", "public void power()\r\n {\r\n powerOn = true;\r\n }", "public void setLowGearState() {\n shifter.set(Constants.Drivetrain.LOW_GEAR_STATE);\n }", "private void tickIsInProduction() {\n if (this.timeInState == this.unitInfo.getProductionTime() - 1) {\n this.player.setSuppliesMax(this.player.getSuppliesMax() + this.unitInfo.getSuppliesGain());\n changeState(this.unitInfo.getUnitStateAfterProduction());\n \n if (this.producer != null)\n this.producer.changeState(UnitState.HOLD);\n }\n \n }", "public boolean canRequestPower();", "public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}", "public void raiseBed(int angle) {\n\n if (getCurrentSpeed() == 0)\n truckBed.raiseRamp(angle);\n else\n System.out.println(\"You can't raise the bed when the truck is moving.\");\n }", "public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}", "public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }", "public boolean isForcedAppStandbyForSmallBatteryEnabled() {\n return AppStateTracker.this.injectGetGlobalSettingInt(\"forced_app_standby_for_small_battery_enabled\", 0) == 1;\n }", "public boolean isForcedAppStandbyEnabled() {\n return AppStateTracker.this.injectGetGlobalSettingInt(\"forced_app_standby_enabled\", 1) == 1;\n }", "public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}", "boolean hasTxpower();", "public abstract void PowerOn();", "public boolean takeControl() {\n\t\tif (Squirrel.us.getDistance() <= 30 && Squirrel.notDetected)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "void powerOn();", "boolean hasBackgroundPower();", "@Override\r\n\tpublic boolean powerOnOff() {\n\t\tif (power == true)\r\n\t\t{\r\n\t\t\tpower = false;\r\n\t\t}\r\n\t\telse if(power == false)\r\n\t\t{\r\n\t\t\tpower = true;\r\n\t\t}\r\n\t\treturn power;\r\n\t}", "public void raiseFlatbed(){\n if(getCurrentSpeed() == 0){\n flatbed.raiseFlatbed();\n }\n }", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "public void setStandbySupported(boolean standbySupported) {\r\n this.standbySupported = standbySupported;\r\n }", "public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }", "@Override\n public void robotPeriodic() {\n\n boolean c = mGPM.haveCargo();\n \n // Need signal due to distance for assurance that cargo is obtained/\n if (c) {\n CargoLight.set(Value.kOn);\n } else{\n CargoLight.set(Value.kOff);\n }\n }", "boolean canFall();", "@Test\n public void timeCollectionDisabled() {\n mDeviceState.setCharging(true);\n runScenario();\n }", "public void powerdown() {\n monitor.sendPowerdown();\n }", "void onApPowerStateChange(PowerState state);", "@Override\n\tpublic boolean isSleeping() {\n\t\treturn false;\n\t}", "public void action() {\r\n\t\tsuppressed = false;\r\n\t\tMotor.B.stop();\r\n\t\tMotor.C.stop();\r\n\t\tDelay.msDelay(1000);\r\n\t\tMotor.B.setSpeed(180);\r\n\t\tMotor.C.setSpeed(180);\r\n\t\tMotor.B.forward();\r\n\t\tMotor.C.forward();\r\n\t\tif((light.getLightValue()>46 && light.getLightValue()<49) || (light.getLightValue()>27 && light.getLightValue()<31)){\r\n\t\t\tMotor.B.stop();\r\n\t\t\tMotor.C.stop();\r\n\t\t\tDelay.msDelay(500);\r\n\t\t\tMotor.B.forward();\r\n\t\t\tMotor.C.forward();\r\n\t\t\tif(light.getLightValue()>44 && light.getLightValue()<45){//home base\r\n\t\t\t\tMotor.B.stop();\r\n\t\t\t\tMotor.C.stop();\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!suppressed){\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t}", "public void setHighGearState() {\n shifter.set(Constants.Drivetrain.HIGH_GEAR_STATE);\n }", "public abstract void wgb_onEnable();", "public void suspend()\r\n {\r\n chargeStatus = STATUS_NOT_CHARGING;\r\n connectionStatus = STATUS_OFFLINE;\r\n timerStop(); //...Suspends the update timer. \r\n }", "public void brake() {\n\t\tsetPower(Motor.STOP);\r\n\t}", "protected void setSleeping() {\n isSleeping = true;\n }", "@Test\n public void canUseSpecialPowerTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.setHasMoved(true);\n workerHephaestus.build(nextWorkerCell);\n assertTrue(workerHephaestus.canUseSpecialPower());\n }", "public void powerOn() \n\t{\n\t\t//put active to true\n\t\tactive = true;\n\t\t\n\t\t// Set attached lever\n\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\tsetActivationLever(true);\n\t\t}\n\t\t\n\t\t//lots of code to make the furnace light up, without loosing contents.\n\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tbyte data = furnace.getData().getData();\n\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\tfurnace.getInventory().clear();\n\t\tfactoryPowerSourceLocation.getBlock().setType(Material.BURNING_FURNACE);\n\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tfurnace.setRawData(data);\n\t\tfurnace.update();\n\t\tfurnace.getInventory().setContents(oldContents);\n\t\t//reset the production timer\n\t\tcurrentProductionTimer = 0;\n\t}", "@Override\n public void robotPeriodic() {\n\n enabledCompr = pressBoy.enabled();\n //pressureSwitch = pressBoy.getPressureSwitchValue();\n currentCompr = pressBoy.getCompressorCurrent();\n //SmartDashboard.putBoolean(\"Pneumatics Loop Enable\", closedLoopCont);\n SmartDashboard.putBoolean(\"Compressor Status\", enabledCompr);\n //SmartDashboard.putBoolean(\"Pressure Switch\", pressureSwitch);\n SmartDashboard.putNumber(\"Compressor Current\", currentCompr);\n }", "EDataType getActivePower();", "public void switchOnForConfiguredPeriod() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"of\");\n setCurrentState(true);\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putBoolean(\"Max Intake Extension: \", RobotMap.intakeLifted.get());\n\t\tSmartDashboard.putBoolean(\"Max Lift Extension:\", RobotMap.isAtTop.get());\n\t\tSmartDashboard.putBoolean(\"Min Lift Extension:\", RobotMap.isAtBottom.get());\n\t\tDriveTrain.driveWithJoystick(RobotMap.stick, RobotMap.rd); // Drive\n\t\tTeleOp.RaiseLift(RobotMap.liftTalon, RobotMap.controller); // Raise lift\n\t\tif(RobotMap.controller.getRawAxis(RobotMap.lowerLiftAxis) >= 0.2) {\n\t\tTeleOp.LowerLift(RobotMap.liftTalon, RobotMap.controller);\n\t\t}\n\t\tTeleOp.DropIntake(RobotMap.controller, RobotMap.intakeLifter);\n\t\tTeleOp.spinOut(RobotMap.intakeVictorLeft, RobotMap.controller);\n\t\t//TeleOp.spinnySpinny(RobotMap.intakeVictorLeft, RobotMap.stick);\n\t}", "public void standby() throws SchedulerException {\n this.quartzPlugin.getScheduler().standby();\n }", "public boolean waterLevelFailure() {\n if (this.levelMessage.getDoubleParameter() < 0) {\n return true;\n } else if (this.levelMessage.getDoubleParameter() >= this.configuration.getCapacity()) {\n return true;\n } else if ((this.mode != State.READY && this.mode != State.WAITING)\n && (this.levelMessage.getDoubleParameter() > (this.waterLevel * 2))) {\n return true;\n } else if ((this.mode != State.READY && this.mode != State.WAITING)\n && (this.levelMessage.getDoubleParameter() < (this.waterLevel - (this.waterLevel / 2)))) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isPoweredRail() {\n return this.type == Type.POWERED_RAIL;\n }", "public void setUnstable() {\n this.unstable = true;\n this.unstableTimeline.play();\n if (this.online == true) {\n this.statusLed.setStatus(\"alert\");\n this.statusLed.setFastBlink(true);\n }\n }", "void setMinActiveAltitude(double minActiveAltitude);", "public void turnOnCooler() {\n oilPompController.turnPompsOn();\n breakController.turnOff();\n mainPowerController.turnOn();\n supportPowerController.turnOn();\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n System.out.println(\"Waiting to stand up was interrupted.\");\n }\n supportPowerController.turnOff();\n System.out.println(\"System is running.\");\n }", "@Override\n public void powerOn() {\n if(isOn)System.out.println(\"The Projector is already ON!\");\n else{\n System.out.println(\"The Projector is now ON!\");\n isOn = true;\n }\n }", "private void automaticModeChecks(){\n // turn on lights if underground\n if (this.isUnderground()){ this.selectedTrain.setLights(1);}\n // set heat\n if (this.selectedTrain.getTemp() <= 40.0){this.selectedTrain.setThermostat(60.0);}\n else if (this.selectedTrain.getTemp() >= 80){ this.selectedTrain.setThermostat(50.0);}\n }", "public void degradedMode() {\n\n // if failure of water-level measuring unit got to rescueMode()\n if (waterLevelFailure()) {\n this.outgoing.send(new Message(MessageKind.LEVEL_FAILURE_DETECTION));\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.RESCUE));\n this.mode = State.RESCUE;\n this.prevRescueMode = State.DEGRADED;\n rescueMode();\n return;\n }\n // if water level risks reaching M1 or M2 go to emergencyStopMode()\n if (nearMaxMin()) {\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.EMERGENCY_STOP));\n this.mode = State.EMERGENCY_STOP;\n emergencyStopMode();\n return;\n }\n\n for (int i = 0; i < this.incoming.size(); i++) { // check for fixed messages\n Message msg = this.incoming.read(i);\n if (msg.getKind().equals(MessageKind.PUMP_REPAIRED_n)) {\n int pumpNo = msg.getIntegerParameter();\n this.outgoing.send(new Message(MessageKind.PUMP_REPAIRED_ACKNOWLEDGEMENT_n, pumpNo));\n this.mode = this.prevDegradedMode;\n }\n if (msg.getKind().equals(MessageKind.PUMP_CONTROL_REPAIRED_n)) {\n int pumpNo = msg.getIntegerParameter();\n this.outgoing\n .send(new Message(MessageKind.PUMP_CONTROL_REPAIRED_ACKNOWLEDGEMENT_n, pumpNo));\n this.mode = this.prevDegradedMode;\n\n }\n if (msg.getKind().equals(MessageKind.STEAM_REPAIRED)) {\n this.outgoing.send(new Message(MessageKind.STEAM_REPAIRED_ACKNOWLEDGEMENT));\n this.mode = this.prevDegradedMode;\n }\n }\n\n if (this.mode.equals(State.NORMAL)) {\n this.brokenPumpNo = -1;\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.NORMAL));\n return;\n } else if (this.mode.equals(State.READY)) {\n this.brokenPumpNo = -1;\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.INITIALISATION));\n return;\n } else { // pump water in\n this.waterLevel = this.levelMessage.getDoubleParameter();\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.DEGRADED));\n this.mode = State.DEGRADED;\n int noOfPumps = estimatePumps(this.steamLevel, this.waterLevel);\n turnOnPumps(noOfPumps);\n }\n\n // if transmissionFailure go to emergencyStopMode()\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\t\n\t\t\n\t\t\n//\t\tSmartDashboard.putBoolean(\"Alliance_R\", alliance_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Alliance_L\", alliance_L_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Scale_R\", R_scaleState);\n//\t\tSmartDashboard.putBoolean(\"Scale_L\", L_scaleState);\n//\t\tSmartDashboard.putBoolean(\"oppisite_R\", opposite_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"opposite_L\", opposite_L_SwitchState);\n//\t\t\n//\t\tSmartDashboard.putNumber(\"right Vel\", chassis.rightMagVelocity());\n//\t\tSmartDashboard.putNumber(\"left Vel\", chassis.leftMagVelocity());\n//\t\tSmartDashboard.putNumber(\"right Pos\", chassis.rightMagPosition());\n//\t\tSmartDashboard.putNumber(\"left Pos\", chassis.leftMagPosition());\n\t\tSmartDashboard.putData(\"gyro\", chassis.navx);\n\t\tSmartDashboard.putData(\"Chassis\",chassis);\n\t\tSmartDashboard.putBoolean(\"shift is high\", chassis.shiftIsHigh);\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\t\tSmartDashboard.putNumber(\"Elevator Encoder\", elevator.getElevatorMagPosition());\n\t\t\n//\t\tSmartDashboard.putNumber(\"TurnPID\", chassis.turnSpeed.getSpeed());\n//\t\tSmartDashboard.putData(\"TurnController\", chassis.turnController);\n//\t\tSmartDashboard.putData(\"Turn\",new Turn());\t\t\n//\t\tSmartDashboard.putNumber(\"leftDistPID\", chassis.leftDistanceSpeed.getSpeed());\n//\t\tSmartDashboard.putNumber(\"rightDistPID\", chassis.rightDistanceSpeed.getSpeed());\n//\t\tSmartDashboard.putData(\"right drive controller\", chassis.rightDistanceController);\n//\t\tSmartDashboard.putData(\"left drive controller\", chassis.leftDistanceController);\t\t\t\n//\t\tSmartDashboard.putData(\"test\",new drivefrompoint());\n\t\tSmartDashboard.putData(\"Arm PID\", arm.armPID);\n\t\tSmartDashboard.putData(\"Elevator PID\", elevator.elePID);\n\t\tSmartDashboard.putData(\"Elevator Subsystem\", elevator);\n\t\tSmartDashboard.putData(\"Hold Climb Command\", new LowerElevatorManual(0.1));\n\t\t\n\t\tSmartDashboard.putNumber(\"intake lead current\", Robot.intake.intakeLeader.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"intake follow current\", Robot.intake.intakeFollower.getOutputCurrent());\n\t\t\n\t\tSmartDashboard.putNumber(\"arm current\", arm.arm.getOutputCurrent());\n\t\t//SmartDashboard.putBoolean(\"Upper Elevator Limit Switch\", elevato);\n\t\t\n\t\tScheduler.getInstance().run();\n\t\t\n\t\t\n\t\tif(!elevator.getBottomElevatorLimit()) {\n\t\t\televator.resetElevatorMag();\n\t\t}\n\t\t\n\t}", "public boolean isTired()\r\n \t{\r\n \t\treturn lastSleep >= TIME_SLEEP;\r\n \t}", "@Test\n public void testThreshold() {\n final ThresholdCircuitBreaker circuit = new ThresholdCircuitBreaker(threshold);\n circuit.incrementAndCheckState(9L);\n assertFalse(\"Circuit opened before reaching the threshold\", circuit.incrementAndCheckState(1L));\n }", "public void sleep() {\n \t\thealth = maxHealthModifier;\n \t\ttoxicity = 0;\n \t}", "public boolean isStandbySupported() {\r\n return standbySupported;\r\n }", "@Override\n\tpublic void landedOn() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(300);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 300 dollars by landing on Bonus Square\");\n\t\tMonopolyGameController.allowCurrentPlayerToEndTurn();\n\n\t}", "@Override\r\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"ig tv power on\");\r\n\t}", "public abstract void wgb_onDisable();", "private final void maintain(){\n\t\tif(host.getStrength()>MAINTENANCE_COST){\n\t\t\thost.expend(MAINTENANCE_COST);\n\t\t}\n\t\telse{\n\t\t\tkill();\n\t\t}\n\t}", "public void turnStrobeOn(){\n if (!WatchFlags.gestureSensingOn){\n Log.d(TAG, \"Gesture sensing mode is off, aborting start strobe command\");\n return;\n }\n if (WatchFlags.strobeIsOn == false) {\n startActivity(new Intent(this, wSignalingActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n }\n }", "public void rescueMode() {\n // if water level risks reaching M1 or M2 go to emergencyStopMode()\n if (nearMaxRescue() || this.waterLevel <= 0) {\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.EMERGENCY_STOP));\n this.mode = State.EMERGENCY_STOP;\n emergencyStopMode();\n }\n\n // checks to see if water level has been repaired.\n if (extractOnlyMatch(MessageKind.LEVEL_REPAIRED, this.incoming) != null) {\n this.outgoing.send(new Message(MessageKind.LEVEL_REPAIRED_ACKNOWLEDGEMENT));\n System.out.println(this.prevRescueMode);\n this.mode = this.prevRescueMode;\n if (this.mode.equals(State.NORMAL)) {\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.NORMAL));\n this.waterLevel = this.levelMessage.getDoubleParameter();\n return;\n }\n\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.DEGRADED));\n this.waterLevel = this.levelMessage.getDoubleParameter();\n return;\n\n }\n\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.RESCUE));\n int noOfPumps = estimatePumps(this.steamMessage.getDoubleParameter(), this.waterLevel);\n this.waterLevel = this.rescueWaterEstimate;\n turnOnPumps(noOfPumps);\n\n // if transmissionFailure go to emergencyStopMode()\n\n }", "public void placePowerStation() {\n this.powerStation = true;\n\n }", "@Override\n public boolean isChameleonShieldActive() {\n if (!isShutDown()) {\n for (Mounted m : getMisc()) {\n EquipmentType type = m.getType();\n if (type.hasFlag(MiscType.F_CHAMELEON_SHIELD) && m.curMode().equals(\"On\") && m.isReady()) {\n return true;\n }\n }\n }\n return false;\n }", "public void onSleep() {\n\t\tbehaviour.onSleep();\n\t}", "public void onTriggerChange() {\n findViewById(R.id.temp).post(new Runnable() {\n public void run() {\n ConsumerIrManager mCIR = ScaryUtil.getConsumerIRService(getApplicationContext());\n if (m_Inst.power) {\n TransmissionCode data = ScaryUtil.getIRCode(m_Inst.sequence, m_Inst.temp); // (TransmissionCode)samsung.get(m_Inst.temp);\n ScaryUtil.transmit(getApplicationContext(),data);\n }\n }\n });\n }", "public boolean isPossibleTransit(State s, Action a) {\r\n//\t\tint newWorkloadLevel = s.getWorkload() + a.getChangedWorkload();\r\n\t\tint maxBatteryLevel = getNextBatteryLevel(s, a);\r\n\t\tint maxActionLevel = s.getWorkload();\r\n\r\n\t if((a.getChangedWorkload() <= maxActionLevel) && (a.getBatteryUsed() <= maxBatteryLevel))\r\n\t {\r\n\t\treturn true;\r\n\t }\r\n\t else { \r\n\t \treturn false;\r\n\t }\r\n\t}", "public static void CheckPressure()\n {\n //Only start the compressor if we neeed air\n if(_isRuning && _compressor.getPressureSwitchValue())\n {\n _compressor.stop();\n _isRuning = false;\n }\n else if (!_isRuning && !_compressor.getPressureSwitchValue())\n {\n _compressor.start();\n _isRuning = true;\n }\n }", "public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }", "@Override\n public void periodic() {\n SmartDashboard.putBoolean(\"Top Switch\", topSwitch.get());\n }", "@Override\n\tpublic void Upgrade(Tower m) {\n\t\tm.setUpgraded(true);\n\t\tm.setAttack(m.getAttack() + 1);\n\t\tm.setRange(m.getRange() + 1);\n\t\tm.setAttackSpeed(m.getAttackSpeed() + .1);\n\t}", "@Override\n\tpublic void canTakeOff() {\n\t\tSystem.out.println(\"I CANNOT TAKE OFF UNLESS YA JUMP ME OVER SOMMAT\");\n\t}", "@Override\n public void activate(boolean status) {\n godPower.activate(status);\n }", "@Override\n public void teleopPeriodic() {\n double y = -xbox.getRawAxis(0) * 0.7D * (1.0D + Math.max(0, xbox.getRawAxis(4)) * 1.4285714D);\n double rawSpeed = xbox.getRawAxis(2) - xbox.getRawAxis(3);\n\n if (SAFETY_MODE) {\n y *= 0.75D;\n\n if (xbox.getBumper(Hand.kLeft) && joystick.getRawButton(7)) {\n if (safetyCount > 0) {\n safetyCount--;\n SmartDashboard.putNumber(\"Safety Count\", safetyCount);\n\n if (safetyCount == 0) {\n safetyTripped = false;\n clearAllButtonStates();\n SmartDashboard.putBoolean(\"Safety Tripped\", safetyTripped);\n }\n } else {\n safetyTripped = false;\n }\n } else {\n safetyTripped = true;\n safetyCount = MAX_SAFETY_COUNT;\n SmartDashboard.putNumber(\"Safety Count\", safetyCount);\n SmartDashboard.putBoolean(\"Safety Tripped\", safetyTripped);\n }\n } else {\n safetyTripped = false;\n }\n\n // Climb Speed\n if (xbox.getRawButton(6)) {\n rawSpeed = -0.3D;\n }\n\n // Super slow mode\n if (xbox.getAButton() || SAFETY_MODE) {\n SpeedRamp.Setpoint = rawSpeed * 0.45D;\n } else {\n SpeedRamp.Setpoint = rawSpeed * 0.8D * (1.0D + Math.max(0, xbox.getRawAxis(4)) * 0.25);\n }\n\n SpeedRamp.update();\n\n boolean seesTape = TapeDetectedEntry.getBoolean(false);\n \n if (seesTape && !safetyTripped) {\n final double ADJUST_CONST = 0.13281734;\n //double tapePitch = TapePitchEntry.getNumber(0).doubleValue();\n double tapeYaw = TapeYawEntry.getNumber(0).doubleValue();\n final double TARGET_YAW = 0;//PitchYawAdjuster.GetYawFromPitch(tapePitch);\n\n //SmartDashboard.putNumber(\"tapePitch\", tapePitch);\n //SmartDashboard.putNumber(\"tapeYaw\", tapeYaw);\n \n double diff = tapeYaw - ADJUST_CONST;\n \n String s = \"\";\n\n if (diff > 0) {\n s = \"<-- (\" + diff + \")\";\n } else if (diff < 0) {\n s = \"--> (\" + diff + \")\";\n }\n\n if (/*xbox.getRawButton(5) This is now taken for the safety button*/false) {\n final double MAX_AFFECT = 0.4;\n if (diff > MAX_AFFECT) {\n diff = MAX_AFFECT;\n } else if (diff < -MAX_AFFECT) {\n diff = -MAX_AFFECT;\n }\n\n y -= diff;\n }\n\n SmartDashboard.putString(\"TapeDir\", s);\n } else {\n SmartDashboard.putString(\"TapeDir\", \"X\");\n }\n\n if (xbox.getRawButtonPressed(7)) {\n Lifter.setSelectedSensorPosition(0);\n LiftSetpoint = 0;\n LiftRamp.Setpoint = 0;\n LiftRamp.setOutput(0);\n }\n\n //Scheduler.getInstance().run();\n // Cargo ship is(n't anymore) -13120\n\n // The fine adjustment has nothing to do with hammers.\n // Don't try to use a hammer on the roboRIO. Ever.\n final int FINE_ADJUSTMENT_AMOUNT = -500;\n\n if (!safetyTripped) {\n if (joystick.getPOV() == 0) {\n if (!joyPOV0PressedLast) {\n joyPOV0PressedLast = true;\n if (LiftSetpoint - FINE_ADJUSTMENT_AMOUNT <= 0)\n LiftSetpoint -= FINE_ADJUSTMENT_AMOUNT;\n }\n } else {\n joyPOV0PressedLast = false;\n\n if (joystick.getPOV() == 180) {\n if (!joyPOV180PressedLast) {\n joyPOV180PressedLast = true;\n LiftSetpoint += FINE_ADJUSTMENT_AMOUNT;\n }\n } else {\n joyPOV180PressedLast = false;\n }\n }\n\n Drive.arcadeDrive(SpeedRamp.getOutput(), y);\n\n if (joystick.getRawButtonPressed(11)) {\n LiftSetpoint = HATCH_BOTTOM;\n } else if (joystick.getRawButtonPressed(9)) {\n LiftSetpoint = HATCH_MIDDLE;\n //} else if (joystick.getRawButtonPressed(7)) {\n // This button is now used for safety mode LiftSetpoint = HATCH_TOP;\n // and also for grab-hatch-on-impact mode\n } else if (joystick.getRawButtonPressed(12)) {\n LiftSetpoint = CARGO_BOTTOM;\n } else if (joystick.getRawButtonPressed(10)) {\n LiftSetpoint = CARGO_MIDDLE;\n //} else if (joystick.getRawButtonPressed(8)) {\n //LiftSetpoint = CARGO_TOP;\n } else if (joystick.getRawButtonPressed(1)) {\n LiftSetpoint = CARGO_FLOOR;\n }\n\n double liftY = -joystick.getRawAxis(1);\n final double deadband = 0.15;\n\n if (Math.abs(liftY) > deadband) {\n double change = (liftY < 0 ? liftY + 0.15 : liftY - 0.15) * 200;//(int)liftEntry.getDouble(0);//\n \n if (change > 100) {\n change = 100;\n } else if (change < -100) {\n change = -100;\n }\n\n LiftRamp.setOutput(LiftRamp.getOutput() + change);\n LiftRamp.Setpoint += change;\n LiftSetpoint = (int)LiftRamp.Setpoint;\n }\n\n if (LiftSetpoint < LIMIT_UP) {\n LiftSetpoint = LIMIT_UP;\n }\n } else {\n Drive.arcadeDrive(0, 0);\n }\n \n LiftRamp.Setpoint = LiftSetpoint;\n SmartDashboard.putNumber(\"LiftSetpoint\", LiftRamp.Setpoint);\n //SmartDashboard.putNumber(\"LiftEncoderPos\", Lifter.getSelectedSensorPosition());\n SmartDashboard.putNumber(\"LiftOutput\", LiftRamp.getOutput());\n LiftRamp.update();\n\n Lifter.set(ControlMode.Position, LiftRamp.getOutput());\n //Lifter.set(ControlMode.PercentOutput, -joystick.getRawAxis(1));\n\n if (!safetyTripped) {\n if (joystick.getRawButtonPressed(4)) {\n ArmsClosed = !ArmsClosed;\n } else if (!SAFETY_MODE) {\n // This is the same as the joystick safety button, so it only works outside\n // safety mode, and why would it be needed in safety mode anyway?\n // It should be disabled in safety mode anyway to make sure we don't\n // accidently attack someone's fingers at a Demo.\n\n // Holding joystick button 7 makes the limit switches on the hatch mechanism\n // active, so when the hatch contacts the switches, the mechanism automatically\n // grabs the hatch.\n // HatchSwitch0 does not have to be inverted. It's complicated.\n if (joystick.getRawButton(7) && (HatchSwitch0.get() || !HatchSwitch1.get())) {\n ArmsClosed = false;\n }\n }\n\n if (joystick.getRawButtonPressed(3)) {\n ArmsExtended = !ArmsExtended;\n }\n }\n\n ArmExtender.set(ArmsExtended);\n ArmOpener.set(ArmsClosed);\n\n //Diagnostics.writeDouble(\"DriveX\", x);\n //Diagnostics.writeDouble(\"DriveY\", y);\n\n // X = out, Y = in\n\n final double GRAB_SPEED;\n\n if (SAFETY_MODE) {\n GRAB_SPEED = 0.8D;\n } else {\n GRAB_SPEED = 1D; // TODO at one point we had this 0.8, is that what it's supposed to be?\n }\n \n if (!safetyTripped) {\n ArmGrippers.set(/*xbox.getXButton() || */joystick.getRawButton(6) ? -GRAB_SPEED : /*xbox.getYButton() ||*/ joystick.getRawButton(5) ? GRAB_SPEED : 0);\n } else {\n ArmGrippers.set(0);\n }\n\n\n // === Climbing stuff ===\n\n boolean climbSafety = /*joystick.getRawButton(2) &&*/ !safetyTripped;\n \n // Have to check all of these every update to make sure it was pressed\n // between now and the last update\n boolean retractFront = xbox.getYButton/*Pressed*/();\n boolean retractBack = xbox.getXButton/*Pressed*/();\n boolean climbBoth = xbox.getRawButton/*Pressed*/(8);\n\n final double CLIMB_SPEED = 1;\n final double RETRACT_SPEED = 0.75;\n final double HOLD_SPEED = 0.3;\n // If you multiply the hold by this, you get the climb value.\n // Avoids having to thing + or minus so many times.\n final double HOLD_CLIMB_MULTIPLIER = CLIMB_SPEED / HOLD_SPEED;\n\n // Left is negative, right is positive\n double xOff = Math.round((Accel.getX() - ZeroX) * 10) / 10D;\n // Forward is negative, backwards is positive\n double zOff = Math.round((Accel.getZ() - ZeroZ) * 10) / 10D;\n\n\n SmartDashboard.putNumber(\"X\", xOff);\n SmartDashboard.putNumber(\"Z\", zOff);\n\n\n if (climbSafety || IsHoldingBack || IsHoldingFront) {\n if (climbBoth) {\n IsHoldingBack = true;\n IsHoldingFront = true;\n\n \n double SpeedFR = CLIMB_SPEED;\n double SpeedFL = -CLIMB_SPEED;\n double SpeedBR = -CLIMB_SPEED;\n double SpeedBL = CLIMB_SPEED;\n\n final double SLOW_MULT = 0.3;\n\n if (xOff < 0 || zOff < 0) {\n SpeedBR *= SLOW_MULT;\n }\n\n if (xOff < 0 || zOff > 0) {\n SpeedFR *= SLOW_MULT;\n }\n\n if (xOff > 0 || zOff < 0) {\n SpeedBL *= SLOW_MULT;\n }\n\n if (xOff > 0 || zOff > 0) {\n SpeedFL *= SLOW_MULT;\n }\n \n LegFrontR.set(SpeedFR);\n LegFrontL.set(ControlMode.PercentOutput, SpeedFL);\n LegBackR.set(ControlMode.PercentOutput, SpeedBR);\n LegBackL.set(ControlMode.PercentOutput, SpeedBL);\n\n } else {\n if (retractBack) {\n IsHoldingBack = false;\n LegBackR.set(ControlMode.PercentOutput, RETRACT_SPEED);\n LegBackL.set(ControlMode.PercentOutput, -RETRACT_SPEED);\n } else if (IsHoldingBack) {\n double rightSpeed = -HOLD_SPEED;\n double leftSpeed = HOLD_SPEED;\n int pov = xbox.getPOV();\n\n // Front right leg\n if (pov >= 0 && pov <= 90) {\n\n }\n\n LegBackR.set(ControlMode.PercentOutput, -HOLD_SPEED);\n LegBackL.set(ControlMode.PercentOutput, HOLD_SPEED);\n } else {\n LegBackR.set(ControlMode.PercentOutput, 0);\n LegBackL.set(ControlMode.PercentOutput, 0);\n }\n\n if (retractFront) {\n IsHoldingFront = false;\n LegFrontR.set(-RETRACT_SPEED);\n LegFrontL.set(ControlMode.PercentOutput, RETRACT_SPEED);\n } else if (IsHoldingFront) {\n double rightSpeed = HOLD_SPEED;\n double leftSpeed = -HOLD_SPEED;\n int pov = xbox.getPOV();\n\n // Front right leg\n if (pov >= 0 && pov <= 90) {\n rightSpeed *= HOLD_CLIMB_MULTIPLIER;\n }\n\n LegFrontR.set(rightSpeed);\n LegFrontL.set(ControlMode.PercentOutput, leftSpeed);\n } else {\n LegFrontR.set(0);\n LegFrontL.set(ControlMode.PercentOutput, 0);\n }\n }\n } else {\n LegBackR.set(ControlMode.PercentOutput, 0);\n LegBackL.set(ControlMode.PercentOutput, 0);\n LegFrontR.set(0);\n LegFrontL.set(ControlMode.PercentOutput, 0);\n }\n \n double footSpeed = Math.max(-1.0, Math.min(rawSpeed * 3, 1.0F));\n\n if (IsHoldingBack) {\n // Drive back feet\n BackFootMover.set(footSpeed);\n } else {\n BackFootMover.set(0);\n }\n\n if (IsHoldingFront) {\n // Drive front feet\n FrontFootMover.set(footSpeed);\n } else {\n FrontFootMover.set(0);\n }\n\n // Publish values to dashboard for LEDs\n LedArmsClosed.setBoolean(ArmsClosed);\n }", "private void controlLift()\n {\n if (gamepad1.dpad_up) {\n liftMotor.setPower(-0.5);\n } else if (gamepad1.dpad_down) {\n liftMotor.setPower(0.5);\n } else {++backInc;\n liftMotor.setPower(0);\n }\n }", "private boolean loop() throws Exception{\n\t\treadSensors(100);\r\n\t\tint[] lightBumpReadings = getLightBumps();\r\n\t\tdriveDirect(300, 300);\r\n\t\t//driveDirect(500,350);\r\n\t\t\r\n\t\tif(lightBumpReadings[0]>0){\r\n\t\t\tdriveDirect(175,100);\r\n\t\t\tsleep(300);\r\n\t\t\t\r\n\t\t}\r\n\t\tif(lightBumpReadings[1]>0){\r\n\t\t\tdriveDirect(150,100);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\tif(lightBumpReadings[2]>0){\r\n\t\t\tdriveDirect(125,100);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\tif(lightBumpReadings[3]>0){\r\n\t\t\tdriveDirect(100,125);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\tif(lightBumpReadings[4]>0){\r\n\t\t\tdriveDirect(100,150);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\tif(lightBumpReadings[5]>0){\r\n\t\t\tdriveDirect(100,175);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\t\r\n\t\tif(lightBumpReadings[2]>0 && lightBumpReadings[3]>0){\r\n\t\t\tdriveDirect(0,500);\r\n\t\t\tsleep(750);\r\n\t\t\tif(lightBumpReadings[2]>0 && lightBumpReadings[3]>0){\r\n\t\t\t\tdriveDirect(0,500);\r\n\t\t\t\tsleep(1500);\r\n\t\t\t\tif(lightBumpReadings[2]>0 && lightBumpReadings[3]>0){\r\n\t\t\t\t\tdriveDirect(0,500);\r\n\t\t\t\t\tsleep(750);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdriveDirect(300,300);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdriveDirect(300,300);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n public void canUseSpecialPowerFalseNoBuild() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.setHasMoved(true);\n //no Build\n assertFalse(workerHephaestus.canUseSpecialPower());\n }", "public void landFromLatch() {\n }", "@Override\n public void onPourWaterRaised() {\n if (theFSM.getCupPlaced()) {\n pouringState = true;\n }\n }", "private boolean poleSwitchEngaged(){\n return true; //poleSwitch.get();\n }", "boolean canSnowFallOn();", "public boolean takeControl(){\r\n\t\tif(sound.readValue()>40){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\r\n public void turnOn(){\r\n isOn = true;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_ON);\r\n if (isOn){\r\n engageLoads();\r\n }\r\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\t\n\t\t\n\t\tif (stick.getRawButtonPressed(2)) {\n\t\t\tstickReversed = !stickReversed;\n\t\t}\n\t\t\n\t\t// double means a floating point (decimal) number with a precision of \"hella\"\n\t\tdouble power = -stick.getY(Hand.kLeft); // negated, because microsoft is weird and up is negative\n\t\tdouble steering = stick.getX(Hand.kRight); \n\t\tif (stickReversed) {\n\t\t\tpower = -power;\n\t\t}\n\t\tdrive(power, steering);\n\t\t\n//\t\tif (xbox.getBumper(Hand.kRight)) {\n//\t\t\tleftIntake.set(xbox.getTriggerAxis(Hand.kLeft));\t\n//\t\t\trightIntake.set(-0.9);\n//\t\t} else if (xbox.getBumper(Hand.kLeft)) {\n//\t\t\tleftIntake.set(-1.0);\n//\t\t\trightIntake.set(1.0);\n//\t\t} else {\n//\t\t\tleftIntake.set(0.0);\n//\t\t\trightIntake.set(0.0);\n//\t\t}\n\t\t\n\t\tif (xbox.getBumper(Hand.kLeft)) { // shoot out\n\t\t\tleftIntake.set(-1.0);\n\t\t} else { // intake\n\t\t\tleftIntake.set(xbox.getTriggerAxis(Hand.kLeft));\n\t\t}\n\t\t\n\t\tif(xbox.getBumper(Hand.kRight)) { //shooty i think\n\t\t\trightIntake.set(1.0);\n\t\t} else { //intake\n\t\t\trightIntake.set(-xbox.getTriggerAxis(Hand.kRight));\n\t\t}\n//\t\tarmSetpoint += xbox.getY(Hand.kLeft) * 60;\n//\t\tSystem.out.println(armSetpoint);\n\t\t\n\t\tarmMotor.set(ControlMode.PercentOutput, xbox.getY(Hand.kLeft) * 0.8);\n\t\tSystem.out.println(xbox.getY(Hand.kLeft));\n\t}", "protected void onGetWaterHeaterStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "void setMaxActiveAltitude(double maxActiveAltitude);", "RampUpTimer getRampUpTimer();", "public void handleToggleButtonLowPass() {\n\t\tif (toggleButtonLowPass.isSelected() == true) {\n\t\t\tcontroller.audioManipulatorUseLowPassProcessor(true);\n\t\t\tsliderLowPass.setDisable(false);\n\t\t\ttextFieldLowPass.setDisable(false);\n\t\t\ttoggleButtonLowPass.setText(bundle.getString(\"mixerToggleButtonOn\"));\n\t\t} else {\n\t\t\tcontroller.audioManipulatorUseLowPassProcessor(false);\n\t\t\tsliderLowPass.setDisable(true);\n\t\t\ttextFieldLowPass.setDisable(true);\n\t\t\ttoggleButtonLowPass.setText(bundle.getString(\"mixerToggleButtonOff\"));\n\t\t}\n\n\t}", "@Override\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"samsongTV powerOn\");\n\n\t}", "public boolean isBurning()\n {\n return this.fuel > 0 && this.canSmelt();\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "private boolean canStartWave() {\n\n return uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\n\t\tScheduler.getInstance().run();\n\t\t\n\t\tif(!elevator.getBottomElevatorLimit()) {\n\t\t\televator.resetElevatorMag();\n\t\t}\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\n\t\tif (oi.getRightTrig()) {\n\t\t\tshifter.set(Value.kForward);\n\t\t} else if (oi.getLeftTrig()) {\n\t\t\tshifter.set(Value.kReverse);\n\t\t}\n\t\tSystem.out.println(shifter.get());\n\t\t\t\n\t\tif(oi.getClimber()){\n\t\t\tclimber.set(1.0);\n\t\t\tSystem.out.println(\"climber running\");\n\t\t}else {\n\t\t\tclimber.set(0);\n\t\t\tSystem.out.println(\"climber not running\");\n\t\t}\n\t}", "@Test\n\tpublic void testWarm_DetailedThenTechnologyAverageElseAbort_FallbackNotNeeded() {\n\t\tEmissionModule emissionModule = setUpScenario(EmissionsConfigGroup.DetailedVsAverageLookupBehavior.tryDetailedThenTechnologyAverageElseAbort);\n\n\t\tdouble travelTimeOnLink = 21; //sec. approx freeSpeed of link12 is : (200 m) / (9.72.. m/s) approx 20.57 s\n\t\tMap<Pollutant, Double> warmEmissions = emissionModule.getWarmEmissionAnalysisModule().checkVehicleInfoAndCalculateWarmEmissions(vehicleFull, link, travelTimeOnLink);\n\n\t\tdouble expectedValue = 30.34984742; // = 200m * 151.7492371 g/km\n\t\tAssert.assertEquals( expectedValue, warmEmissions.get(Pollutant.CO2_TOTAL ), MatsimTestUtils.EPSILON );\n\t}", "public void enable(){\n if(criticalStop) return;\n getModel().setStatus(true);\n }", "public boolean canBurnStun();", "@Override\n\tpublic void teleopPeriodic() {\n\t\tRobot.intakeSubsystem._getSpeed();\n\n\t\tRobot.driveSubsystem.operatorOverride();\n\t\tScheduler.getInstance().run();\n\n\t\tTargetRegion boilerTarget = Robot.navigator.getBoilerTarget();\n\t\tif (boilerTarget != null) {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", boilerTarget.m_centerTop);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", boilerTarget.m_bounds.m_top);\n\t\t} else {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", -1);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", -1);\n\t\t}\n\t}", "@Test\r\n\tpublic void testDeliveryChuteFull() {\r\n\t\tdcListen.chuteFull(vend.getDeliveryChute());\r\n\t\tassertTrue(vend.getDeliveryChute().isDisabled());\r\n\t}", "public void timePasses() {\r\n\t\tfor(Meter a: appMeters){\r\n\t\t\t//incremnts electric use each timepPasses as the fridge is always on\r\n\t\t\tif (a.getType().equals(\"Electric\")){\r\n\t\t\t\ta.incrementConsumed();\r\n\t\t}\r\n\t}\r\n\t}" ]
[ "0.6093843", "0.6069786", "0.59719723", "0.59512293", "0.5911891", "0.59096014", "0.58963233", "0.5830414", "0.58221996", "0.5772789", "0.5748853", "0.57467186", "0.57092893", "0.5704097", "0.5694865", "0.567321", "0.5637191", "0.5637114", "0.56216425", "0.5620192", "0.5613141", "0.5600229", "0.556917", "0.5563271", "0.55595905", "0.5552082", "0.5531788", "0.55175567", "0.550977", "0.5504928", "0.5501411", "0.5500648", "0.5498426", "0.5483706", "0.5478568", "0.5477755", "0.54728353", "0.54592395", "0.5454156", "0.5432651", "0.54301625", "0.5427083", "0.5422234", "0.54133594", "0.54089946", "0.5405252", "0.539909", "0.538495", "0.5374735", "0.5369006", "0.53657067", "0.53509927", "0.5345876", "0.53414667", "0.53382415", "0.5337975", "0.53308", "0.53306985", "0.5330686", "0.5318201", "0.53157866", "0.53136784", "0.5311398", "0.5298642", "0.5297883", "0.52934563", "0.529229", "0.52914256", "0.5289616", "0.52771413", "0.52741724", "0.52704823", "0.52653265", "0.52616733", "0.52615964", "0.52597547", "0.5257031", "0.5256265", "0.52528316", "0.524837", "0.5244392", "0.5243809", "0.5243508", "0.52402896", "0.5239724", "0.52394634", "0.52345216", "0.52334136", "0.5231846", "0.52301824", "0.52264607", "0.52250373", "0.5223247", "0.5220013", "0.52197397", "0.5219094", "0.5217117", "0.52165437", "0.5212135", "0.52116615" ]
0.6569529
0
Loads vehicle on to the TransportTruck if ramp is down
public void loadVehicle(Vehicle vehicle) { storage.addVehicle(vehicle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TransportTruck() {\n x = 0;\n y = 0;\n nrDoors = 2;\n enginePower = 1000;\n currentSpeed = 0;\n color = Color.red;\n modelName = \"Transport Truck\";\n\n storage = new StorageUnit(this, 5);\n\n stopEngine();\n }", "@Override\n public void robotPeriodic() {\n\n boolean c = mGPM.haveCargo();\n \n // Need signal due to distance for assurance that cargo is obtained/\n if (c) {\n CargoLight.set(Value.kOn);\n } else{\n CargoLight.set(Value.kOff);\n }\n }", "@Override\n\tpublic void setVehicleLoad(int van, int railway, int airplane) {\n\t\tconstantPO.setVanLoad(van);\n\t\tconstantPO.setRailwayLoad(railway);\n\t\tconstantPO.setAirplaneLoad(airplane);\n\t}", "public boolean driveTruck(){\n\t\treturn driveTruck;\n\t}", "public void setLowGearState() {\n shifter.set(Constants.Drivetrain.LOW_GEAR_STATE);\n }", "protected void onTick() {\n\t\tif(car.drivingInfo.pathToGet.size() == 0 && car.carData.to == null) {\n\t\t\tcar.state = Car.WAIT_PASSENGER_TO_GO_INSIDE;\n\t\t\tSystem.out.println(\"engaged with from drive\" + car.engagedWithAID.toString());\n\t\t\tcar.addBehaviour(new TakePassenger());\n\t\t\tthis.stop();\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\tif(car.carData.to == null) {\n\t\t\tHouseData nextHouseToGo = car.drivingInfo.pathToGet.remove(0);\n\t\t\tcar.carData.to = nextHouseToGo;\n\t\t}\n\t\t\n\t\tint distanceDone = car.carData.distance;\n\t\tint distanceToDo = (int) SmaUtils.computeDistance(car.carData.from.position, car.carData.to.position);\n\t\t\n\t\t// if the distance left is higher than the distance the car can do in one tick, we increment the distance\n\t\tif(distanceDone+Car.CAR_SPEED < distanceToDo) {\n\t\t\tcar.carData.distance += Car.CAR_SPEED;\n\t\t\treturn;\n\t\t} \n\t\t// else, we put the car on the next house\n\t\telse if(distanceDone <= distanceToDo) {\n\t\t\tcar.carData.from = car.carData.to;\n\t\t\tcar.carData.to = null;\n\t\t\tcar.carData.distance = 0;\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n public void truckNotification(Truck t, Notification message) {\n if (!preprocessingDone) return;\n\n //Wait frame notification - logic branches a bit.\n //if t is holding a load, travel to that location.\n if (message.equals(Notification.WAITING)) {\n if (t.getLoad() != null && t.getLoad().destination.equals(t.getLocation())) {\n t.dropoffLoad();\n\n //Check if there are more parcels to handle. If not, remove from assignment and go home.\n //If so, pick one at random and assign this truck to that.\n if (unassignedParcels.isEmpty()) {\n parcelsAssigned.remove(t);\n t.setTravelPath(dijkstra(t.getLocation(), getBoard().getTruckDepot()));\n } else {\n assignParcelTo(t);\n }\n }\n else if (t.getLoad() != null) {\n t.setTravelPath(dijkstra(t.getLocation(), t.getLoad().destination));\n } else if (parcelsAssigned.containsKey(t) && t.getLocation().isParcelHere(parcelsAssigned.get(t))) {\n t.pickupLoad(parcelsAssigned.get(t));\n } else if (parcelsAssigned.containsKey(t) && getParcels().contains(parcelsAssigned.get(t))) {\n t.setTravelPath(dijkstra(t.getLocation(), parcelsAssigned.get(t).getLocation()));\n } else if (! parcelsAssigned.containsKey(t) || getParcels().isEmpty()) {\n t.setTravelPath(dijkstra(t.getLocation(), getBoard().getTruckDepot()));\n } else if (parcelsAssigned.containsKey(t) && ! getParcels().contains(parcelsAssigned.get(t))) {\n assignParcelTo(t);\n }\n }\n }", "private void travelToAirport()\n {\n try\n { sleep ((long) (1 + 30000 * Math.random ()));\n }\n catch (InterruptedException e) {}\n }", "public void changeToLoGear() {\n\t\tspeedShifter.set(DoubleSolenoid.Value.kForward); // forward is low gear,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// port 1\n\t\tSystem.out.println(\"switch\");\n\t}", "private void vehicleSleep(long l) {\n try {\n Thread.sleep(l);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private void loadTripDetail() {\n\t\tloadCars();\n\t\tloadRoutes();\n\t\t// no trip to load\n\t\tif (tripComboBox.getValue() == null || mode == Mode.ADD_MODE) {\n\t\t\tloadStopPoints();\n\t\t\taddTripMode();\n\t\t}\n\t\t// there are trips to load\n\t\telse {\n\t\t\tupdateTripMode();\n\t\t\tloadStopPoints();\n\t\t\tTrip trip = tripComboBox.getValue();\n\t\t\tdirectionComboBox.setValue(trip.getDirection());\n\t\t\t// set date picker\n\t\t\tstartDatePicker.setValue(trip.getBeginDate());\n\t\t\tendDatePicker.setValue(trip.getExpireDate());\n\t\t\tcarComboBox.getSelectionModel().select(getCarByCarId(trip.getCarId()));\n\t\t\trouteComboBox.getSelectionModel().select(getRouteByRouteId(trip.getRouteId()));\n\t\t\tsetRecurrenceCheckBox(trip.getDay());\n\t\t}\n\t}", "@Override\n public boolean isTripAvailable() {\n return true;\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tRobot.intakeSubsystem._getSpeed();\n\n\t\tRobot.driveSubsystem.operatorOverride();\n\t\tScheduler.getInstance().run();\n\n\t\tTargetRegion boilerTarget = Robot.navigator.getBoilerTarget();\n\t\tif (boilerTarget != null) {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", boilerTarget.m_centerTop);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", boilerTarget.m_bounds.m_top);\n\t\t} else {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", -1);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", -1);\n\t\t}\n\t}", "public void startTransit() {\n\t\tthis.currentDriver.setStatus(Status.INTRANSIT);\n\t\tthis.currentDriver.setStatus(Status.FINISHED);\n\t\tthis.passenger.setLocation(currentRide.getDropOff());\n\t\tthis.currentDriver.setLocation(currentRide.getDropOff());\n\t\tthis.finishRide();\n\t}", "public void addTruck(EntyTruck truck) {\n\t\t// Schedule weighing of fully loaded truck\n\t\tif (this.truck != null)\n\t\t\tqueue.enqueue(truck);\n\t\telse {\n\t\t\tthis.truck = truck;\n\t\t\tmodel.enqueueEvent(new EvtEndWeighing(truck, model.getTime()));\n\t\t}\n\t}", "public T caseInductionMotorLoad(InductionMotorLoad object) {\n\t\treturn null;\n\t}", "protected void populateList() {\n\n\t\tif (inTruckMode) {\n\t\t\t// issue #37 fix(block 2 users from punch-in)\n\t\t\t// Doing force sync for Vehicles table\n\t\t\t// if (com.operasoft.snowboard.dbsync.Utils.isOnline(this)) {\n\t\t\t// System.out.println(\"Sw_LoginScreenActivity.populateList():vehicle sync start\");\n\t\t\t// AbstractPeriodicSync vehiclesPeriodicSync = new AnonymousPeriodicSync(\"Vehicle\", new\n\t\t\t// VehiclesDao());\n\t\t\t// vehiclesPeriodicSync.fetchData(this);\n\t\t\t// }\n\n\t\t\tString vehicleId = mSP.getString(Config.VEHICLE_ID_KEY, \"\");\n\t\t\tString lastVehicleId = mSP.getString(Config.LAST_VEHICLE_KEY, \"\");\n\t\t\tvehiclesDao = new VehiclesDao();\n\n\t\t\t// issue #37 fix(block 2 users from punch-in)\n\t\t\t// VehicleListController vehicleListController = new VehicleListController();\n\t\t\t// vehiclesArray = vehicleListController.listVehicles(this);//vehiclesDao.listSorted();\n\t\t\tvehiclesArray = vehiclesDao.listSorted();\n\t\t\tvehiclesNameArray = new ArrayList<String>();\n\t\t\tint selectedIndex = -1;\n\n\t\t\tfor (int i = 0; i < vehiclesArray.size(); i++) {\n\t\t\t\tVehicle vehicles = vehiclesArray.get(i);\n\t\t\t\tvehiclesNameArray.add(vehicles.getName());\n\t\t\t\t// Check if the user is already connected to a vehicle\n\t\t\t\tif (vehicles.getId().equals(vehicleId)) {\n\t\t\t\t\tvehicle = vehicles;\n\t\t\t\t\tselectedIndex = i;\n\t\t\t\t}\n\t\t\t\t// Else check if it is his preferred one\n\t\t\t\tif ((selectedIndex == -1) && (vehicles.getId().equals(lastVehicleId))) {\n\t\t\t\t\tvehicle = vehicles;\n\t\t\t\t\tselectedIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((selectedIndex == -1) && (!vehiclesArray.isEmpty())) {\n\t\t\t\t// The user is not currently connected to any vehicle and has no\n\t\t\t\t// preferred one\n\t\t\t\tvehicle = vehiclesArray.get(0);\n\t\t\t\tselectedIndex = 0;\n\t\t\t}\n\n\t\t\t// Update the session with the vehicle currently selected\n\t\t\tSession.setVehicle(vehicle);\n\n\t\t\ttruckList.setAdapter(new TruckListAdapter(this, vehiclesNameArray, selectedIndex));\n\t\t} else {\n\n\t\t\t// Sites are not supported yet. Enable this code once they become\n\t\t\t// supported\n\t\t\t// SiteDao siteDao = new SiteDao();\n\t\t\t// sitesArray = siteDao.listAllValid();\n\t\t\t// sitesNameArray = new ArrayList<String>();\n\t\t\t//\n\t\t\t// for (Site site : sitesArray)\n\t\t\t// sitesNameArray.add(site.getName());\n\n\t\t\ttruckList.setAdapter(new TruckListAdapter(this, sitesNameArray, 0));\n\t\t}\n\n\t\tsetLoginMarker();\n\t}", "public FridgeTruck(){\n\t\tsuper();\n\t\tthis.maxTemp = 10; // degrees Celsius\n\t\tsetCost(maxTemp);\n\t\tthis.maxCapacity = 800;\n\t}", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "@Override\n void setRoute() throws ItemTooHeavyException {\n deliveryItem = tube.pop();\n if (deliveryItem.weight > itemWeightLimit) throw new ItemTooHeavyException();\n // Set the destination floor\n destination_floor = deliveryItem.getDestFloor();\n }", "void transStatus()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(passenger != null && status.equals(\"soon\"))\r\n\t\t\t{\r\n\t\t\t\tService s_temp = new Service(passenger);\r\n\t\t\t\tdes = passenger.loc;\r\n\t\t\t\tmakeService(loc.i*80+loc.j,des.i*80+des.j);\r\n\t\t\t\tstatus = \"stop\";\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tstatus = \"serve\";\r\n\t\t\t\tdes = passenger.des;\r\n\t\t\t\ts_temp.path.add(loc);\r\n\t\t\t\tmakeService(loc.i*80+loc.j,des.i*80+des.j,s_temp.path);\r\n\t\t\t\tstatus = \"stop\";\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tcredit += 3;\r\n\t\t\t\tser_times += 1;\r\n\t\t\t\tservices.add(s_temp);\r\n\t\t\t\t//refresh:\r\n\t\t\t\tstatus = \"wait\";\r\n\t\t\t\tpassenger = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");\r\n\t\t}\r\n\t}", "public boolean isOverSpeed(){ return vehicleAvarageSpeed > roadMaxSpeed; }", "@Override\n protected void end() {\n Robot.driveTrain.tankDrive(0, 0);\n }", "private void updateVehicles() {\n OffloaderSyncAdapter.syncImmediately(getContext());\n Log.w(LOG_TAG, \"updateVehicles: \");\n }", "@Override\n public void teleopPeriodic() {\n try {\n mDriveController.update();\n mOperatorController.update();\n driverControl();\n \n } catch (Throwable t) {\n CrashTracker.logThrowableCrash(t);\n throw t;\n }\n \n }", "public synchronized void follow(Vehicle vehicle){\n \n distance = distance - (float)((float)vehicle.getCurrentSpeed()*1000f/3600f)/100f;\n \n //System.out.println(\"Distance to drive: \" + distance);\n if (distance <= 0){\n \n Settings.messageLog.AddMessage(\"Reached end of path\");\n //System.out.println(\"weg.size() == \" + weg.size());\n try{\n vehicle.setPosition(weg.get(weg.size()-1));\n }\n catch(Exception e){vehicle.setPosition(new Vector3f(10.3f, 5.5f, 156.2f));}\n vehicle.stopDriving();\n if (destinationPlatform == null && destinationParkingSpot == null){}\n else if (destinationParkingSpot == null){\n //motionpath from waypoint to platform\n //platform sign in\n vehicle.setCurrentPlatform(destinationPlatform);\n \n } //meldt aan voor platform nieuwe route\n else {\n \n //motionpath from waypoint to parkingspot\n if (destinationPlatform == null)\n {\n try\n {\n this.destinationParkingSpot.ParkVehicle(vehicle);\n vehicle.setPosition(this.destinationParkingSpot.getPosition());\n Settings.messageLog.AddMessage(\"Park vehicle\");\n }\n catch(Exception e)\n {\n \n ErrorLog.logMsg(e.getMessage());\n }\n \n }\n \n //hier kraan geparkeerd ... ga unload\n try\n {\n this.destinationParkingSpot.ParkVehicle(vehicle);\n vehicle.setPosition(this.destinationParkingSpot.getPosition());\n }\n catch(InvalidVehicleException ie)\n {\n System.out.println(ie.getMessage());\n \n }\n\n }\n \n }\n }", "public void startRide() {\n\t\tthis.findNearestDriver();\n\t\tint i = 0;\n\t\tthis.currentDriver = this.drivers.get(i);\n\t\twhile(currentDriver.getStatus() != Status.AVAILABLE) {\n\t\t\ti++;\n\t\t\tthis.currentDriver = this.drivers.get(i);\n\t\t}\n\t\tdouble fair = this.getFair(this.currentDriver.getDistanceFromPassenger());\n\t\tif(this.validateFair(fair)) {\n\t\t\tthis.currentDriver.setStatus(Status.ENROUTE);\n\t\t\tthis.currentDriver.setStatus(Status.ARRIVED);\n\t\t\tthis.startTransit();\n\t\t}\n\t}", "public void driveTrainLoop() {\n if (Config.getInstance().getBoolean(Key.ROBOT__HAS_DRIVETRAIN)) {\n // Check User Inputs\n double driveThrottle = mOperatorInterface.getDriveThrottle();\n double driveTurn = mOperatorInterface.getDriveTurn();\n\n boolean WantsAutoAim = mOperatorInterface.getFeederSteer();\n\n // Continue Driving\n if (WantsAutoAim == true) {\n // Harvest Mode - AutoSteer Functionality\n // Used for tracking a ball\n // we may want to limit the speed?\n // RobotTracker.RobotTrackerResult DriveResult =\n // mRobotTracker.GetFeederStationError(Timer.getFPGATimestamp());\n mDriveState = DriveState.AUTO_DRIVE;\n\n VisionPacket vp = mRobotTracker.GetTurretVisionPacket(Timer.getFPGATimestamp());\n // mDrive.autoSteerFeederStation(driveThrottle, vp.Error_Angle);\n } else {\n // Standard Manual Drive\n mDrive.setDrive(driveThrottle, driveTurn, false);\n\n // if we were previously in auto drive.. turn it off\n if (mDriveState == DriveState.AUTO_DRIVE) {\n mDriveState = DriveState.MANUAL;\n }\n }\n }\n }", "protected void initialize() {\n\t\t\n\t\tif (trajectoryToFollow.highGear) {\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}else {\n\t\t\t//Robot.pneumatics.drivetrainShiftDown();\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}\n\n\t\tsetUpTalon(leftTalon);\n\t\tsetUpTalon(rightTalon);\n\n\t\tsetValue = SetValueMotionProfile.Disable;\n\n\t\trightTalon.set(ControlMode.MotionProfileArc, setValue.value);\n\t\tleftTalon.follow(rightTalon, FollowerType.AuxOutput1);\n\n\t\tloadLeftBuffer = new Notifier(\n\t\t\t\tnew BufferLoader(rightTalon, trajectoryToFollow.centerProfile, trajectoryToFollow.flipped,\n\t\t\t\t\t\tRobot.drivetrain.getDistance()));\n\n\t\tloadLeftBuffer.startPeriodic(.005);\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "@Test\n\tpublic void testWarm_DetailedThenTechnologyAverageThenAverageTable_FallbackToTechnology() {\n\t\tEmissionModule emissionModule = setUpScenario(EmissionsConfigGroup.DetailedVsAverageLookupBehavior.tryDetailedThenTechnologyAverageThenAverageTable);\n\n\t\tdouble travelTimeOnLink = 21; //sec. approx freeSpeed of link12 is : (200 m) / (9.72.. m/s) approx 20.57 s\n\t\tMap<Pollutant, Double> warmEmissions = emissionModule.getWarmEmissionAnalysisModule().checkVehicleInfoAndCalculateWarmEmissions(vehicleFallbackToTechnologyAverage, link, travelTimeOnLink);\n\n\t\tdouble expectedValue = 31.53711548; // = 200m * 157.6855774 g/km\n\t\tAssert.assertEquals( expectedValue, warmEmissions.get(Pollutant.CO2_TOTAL ), MatsimTestUtils.EPSILON );\n\t}", "public void setAsDown () \n\t{ \n\t\tn.setFailureState(false);\n\t\tfinal SortedSet<WLightpathRequest> affectedDemands = new TreeSet<> ();\n\t\tgetOutgoingFibers().forEach(f->affectedDemands.addAll(f.getTraversingLpRequestsInAtLeastOneLp()));\n\t\tgetIncomingFibers().forEach(f->affectedDemands.addAll(f.getTraversingLpRequestsInAtLeastOneLp()));\n\t\tfor (WLightpathRequest lpReq : affectedDemands)\n\t\t\tlpReq.internalUpdateOfRoutesCarriedTrafficFromFailureState();\n\t}", "public void setDriveTrain(DriveTrain driveTrain) {\r\n this.driveTrain = driveTrain;\r\n }", "protected void end() {\n\t\tRobot._driveTrain.setAuton(false);\n\t\tRobot._driveTrain.tankDrive(0, 0);\n\t}", "@Test(expected=RuntimeException.class)\n\tpublic void testWarm_DetailedThenTechnologyAverageElseAbort_ShouldAbort() {\n\t\tEmissionModule emissionModule = setUpScenario(EmissionsConfigGroup.DetailedVsAverageLookupBehavior.onlyTryDetailedElseAbort);\n\n\t\tdouble travelTimeOnLink = 21; //sec. approx freeSpeed of link12 is : (200 m) / (9.72.. m/s) approx 20.57 s\n\t\temissionModule.getWarmEmissionAnalysisModule().checkVehicleInfoAndCalculateWarmEmissions(vehicleFallbackToAverageTable, link, travelTimeOnLink);\n\t}", "public void liftDown() {\n set(m_defaultLiftSpeedDown);\n }", "@Override\n\tprotected void end() {\n\t\tturnPID.resetPID();\n\t\tRobot.driveTrain.tankDrive(0, 0);\n\t\ttimer.stop();\n\t}", "@Override\n public void runTask() {\n final String aid = agencyId();\n // Make API call\n final Value payload = NextBusApi.getVehiclesForAgency(Assets.httpClient(), aid, this.lastTime);\n // Extract information for all vehicles and the payload's timestamp\n final List<Value> vehicleInfos = new ArrayList<>(payload.length());\n for (Item i : payload) {\n if (i.head() instanceof Attr) {\n final String label = i.head().key().stringValue(null);\n if (\"vehicle\".equals(label)) {\n vehicleInfos.add(i.head().toValue());\n } else if (\"lastTime\".equals(label)) {\n this.lastTime = i.head().toValue().get(\"time\").longValue();\n }\n }\n }\n // Relay each vehicleInfo to the appropriate VehicleAgent\n int i = 0;\n for (Value vehicleInfo : vehicleInfos) {\n command(\"/vehicle/\" + aid + \"/\" + vehicleInfo.get(\"id\").stringValue(),\n \"addMessage\",\n // lastTime came separately, manually add it to each vehicleInfo\n vehicleInfo.updatedSlot(\"timestamp\", this.lastTime));\n i++;\n }\n System.out.println(nodeUri() + \": relayed info for \" + i + \" vehicles\");\n }", "public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }", "@Test\n\tpublic void testWarm_DetailedThenTechnologyAverageElseAbort_FallbackNotNeeded() {\n\t\tEmissionModule emissionModule = setUpScenario(EmissionsConfigGroup.DetailedVsAverageLookupBehavior.tryDetailedThenTechnologyAverageElseAbort);\n\n\t\tdouble travelTimeOnLink = 21; //sec. approx freeSpeed of link12 is : (200 m) / (9.72.. m/s) approx 20.57 s\n\t\tMap<Pollutant, Double> warmEmissions = emissionModule.getWarmEmissionAnalysisModule().checkVehicleInfoAndCalculateWarmEmissions(vehicleFull, link, travelTimeOnLink);\n\n\t\tdouble expectedValue = 30.34984742; // = 200m * 151.7492371 g/km\n\t\tAssert.assertEquals( expectedValue, warmEmissions.get(Pollutant.CO2_TOTAL ), MatsimTestUtils.EPSILON );\n\t}", "public void setVehicleSpeed(float value) {\n this.vehicleSpeed = value;\n }", "public void raiseRamp() {\n if (currentSpeed == 0) {\n storage.raiseRamp();\n }\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\t\n\t\t\n\t\t\n//\t\tSmartDashboard.putBoolean(\"Alliance_R\", alliance_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Alliance_L\", alliance_L_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Scale_R\", R_scaleState);\n//\t\tSmartDashboard.putBoolean(\"Scale_L\", L_scaleState);\n//\t\tSmartDashboard.putBoolean(\"oppisite_R\", opposite_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"opposite_L\", opposite_L_SwitchState);\n//\t\t\n//\t\tSmartDashboard.putNumber(\"right Vel\", chassis.rightMagVelocity());\n//\t\tSmartDashboard.putNumber(\"left Vel\", chassis.leftMagVelocity());\n//\t\tSmartDashboard.putNumber(\"right Pos\", chassis.rightMagPosition());\n//\t\tSmartDashboard.putNumber(\"left Pos\", chassis.leftMagPosition());\n\t\tSmartDashboard.putData(\"gyro\", chassis.navx);\n\t\tSmartDashboard.putData(\"Chassis\",chassis);\n\t\tSmartDashboard.putBoolean(\"shift is high\", chassis.shiftIsHigh);\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\t\tSmartDashboard.putNumber(\"Elevator Encoder\", elevator.getElevatorMagPosition());\n\t\t\n//\t\tSmartDashboard.putNumber(\"TurnPID\", chassis.turnSpeed.getSpeed());\n//\t\tSmartDashboard.putData(\"TurnController\", chassis.turnController);\n//\t\tSmartDashboard.putData(\"Turn\",new Turn());\t\t\n//\t\tSmartDashboard.putNumber(\"leftDistPID\", chassis.leftDistanceSpeed.getSpeed());\n//\t\tSmartDashboard.putNumber(\"rightDistPID\", chassis.rightDistanceSpeed.getSpeed());\n//\t\tSmartDashboard.putData(\"right drive controller\", chassis.rightDistanceController);\n//\t\tSmartDashboard.putData(\"left drive controller\", chassis.leftDistanceController);\t\t\t\n//\t\tSmartDashboard.putData(\"test\",new drivefrompoint());\n\t\tSmartDashboard.putData(\"Arm PID\", arm.armPID);\n\t\tSmartDashboard.putData(\"Elevator PID\", elevator.elePID);\n\t\tSmartDashboard.putData(\"Elevator Subsystem\", elevator);\n\t\tSmartDashboard.putData(\"Hold Climb Command\", new LowerElevatorManual(0.1));\n\t\t\n\t\tSmartDashboard.putNumber(\"intake lead current\", Robot.intake.intakeLeader.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"intake follow current\", Robot.intake.intakeFollower.getOutputCurrent());\n\t\t\n\t\tSmartDashboard.putNumber(\"arm current\", arm.arm.getOutputCurrent());\n\t\t//SmartDashboard.putBoolean(\"Upper Elevator Limit Switch\", elevato);\n\t\t\n\t\tScheduler.getInstance().run();\n\t\t\n\t\t\n\t\tif(!elevator.getBottomElevatorLimit()) {\n\t\t\televator.resetElevatorMag();\n\t\t}\n\t\t\n\t}", "private void loadingPhase() {\n try { Thread.sleep(10000); } catch(InterruptedException e) { return; }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }", "public void hold() {\n _collectorMotor.set(holdSpeed);\n }", "@Test\n\tpublic void testWarm_DetailedThenTechnologyAverageElseAbort_FallbackToTechnologyAverage() {\n\t\tEmissionModule emissionModule = setUpScenario(EmissionsConfigGroup.DetailedVsAverageLookupBehavior.tryDetailedThenTechnologyAverageElseAbort);\n\n\t\tdouble travelTimeOnLink = 21; //sec. approx freeSpeed of link12 is : (200 m) / (9.72.. m/s) approx 20.57 s\n\t\tMap<Pollutant, Double> warmEmissions = emissionModule.getWarmEmissionAnalysisModule().checkVehicleInfoAndCalculateWarmEmissions(vehicleFallbackToTechnologyAverage, link, travelTimeOnLink);\n\n\t\tdouble expectedValue = 31.53711548; // = 200m * 157.6855774 g/km\n\t\tAssert.assertEquals( expectedValue, warmEmissions.get(Pollutant.CO2_TOTAL ), MatsimTestUtils.EPSILON );\n\t}", "public void decelerate() {\n\t\tif (this.hasOnlyOneCar())\n\t\t{\n\t\t\tif (this.getHead().getSpeed()==Speed.FAST)\n\t\t\t\tthis.getHead().setSpeed(Speed.NORMAL);\n\t\t\telse\n\t\t\t\tthis.getHead().setSpeed(Speed.SLOW);\n\t\t}\n\t}", "private Vehicle generateVehicleForFallbackToTechnologyAverage() {\n\t\tVehicleType vehicleType = VehicleUtils.createVehicleType(Id.create(\"dieselCarFullSpecified\", VehicleType.class));\n\t\tEngineInformation engineInformation = vehicleType.getEngineInformation();\n\t\tVehicleUtils.setHbefaVehicleCategory(engineInformation, \"PASSENGER_CAR\");\n\t\tVehicleUtils.setHbefaTechnology(engineInformation,\"diesel\");\n\t\tVehicleUtils.setHbefaEmissionsConcept(engineInformation, \"PC-D-Euro-3_NotInTable\"); //<--- this value is not in table\n\t\tVehicleUtils.setHbefaSizeClass(engineInformation, \">1,4L\");\n\n\t\treturn VehicleUtils.createVehicle(Id.createVehicleId(\"dieselCarFallbackToTechnology\"), vehicleType);\n\t}", "public void dropRamp() {\n if (currentSpeed == 0) {\n storage.dropRamp();\n }\n }", "public void join(Train train){\n\t\tif (join == train)\n\t\t\t//The train to be joined is the same as the current train\n\t\t\treturn;\n\t\tjoin = train;\n\t\t//If the current train contains only one vehicle, set its speed to NORMAL.\n\t\tif (this.hasOnlyOneCar())\n\t\t\tthis.cars.get(0).setSpeed(Speed.NORMAL);\n\t\tif (join==null)\n\t\t\treturn;\n\t\t//If the train to be joined has only one vehicle, set its speed to NORMAL.\n\t\tif (train.hasOnlyOneCar())\n\t\t\ttrain.cars.get(0).setSpeed(Speed.NORMAL);\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tdt = new DriveTrain();\n\t\t//Initialize drive Talons\n\t\tRobotMap.vspLeft = new WPI_TalonSRX(RobotMap.dtLeft);\n\t\tRobotMap.vspRight = new WPI_TalonSRX(RobotMap.dtRight);\n\t\t//Initialize drive slave Victors\n\t\t//RobotMap.slaveLeft = new WPI_VictorSPX(RobotMap.slaveDriveLeft);\n\t\t//RobotMap.slaveRight = new WPI_VictorSPX(RobotMap.slaveDriveRight);\n\t\t//Set drive slaves to follower mode\n\t\t//RobotMap.slaveLeft.follow(RobotMap.vspLeft);\n\t\t//RobotMap.slaveRight.follow(RobotMap.vspRight);\n\t\t//Initialize drive train\n\t\tRobotMap.rd = new DifferentialDrive(RobotMap.vspLeft, RobotMap.vspRight);\n\t\t//Initialize drive joystick\n\t\tRobotMap.stick = new Joystick(RobotMap.joystickPort);\n\t\t//Disabled drive safety\n\t\tRobotMap.vspLeft.setSafetyEnabled(false);\n\t\tRobotMap.vspRight.setSafetyEnabled(false);\n\t\tRobotMap.rd.setSafetyEnabled(false);\n\t\t//Initialize lift Talon\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(5);\n\t\t//Initialize operator controller\n\t\tRobotMap.controller = new Joystick(RobotMap.controllerPort);\n\t\t//Initialize intake Victors\n\t\tRobotMap.intakeVictorLeft = new WPI_VictorSPX(RobotMap.intakeMaster);\n\t\tRobotMap.intakeVictorRight = new WPI_VictorSPX(RobotMap.intakeSlave);\n\t\t//Set right intake Victor to follow left intake Victor\n\t\tRobotMap.intakeVictorRight.follow(RobotMap.intakeVictorLeft);\n\t\t\n\t\tRobotMap.climberVictorLeft = new WPI_VictorSPX(RobotMap.climberLeftAddress);\n\t\tRobotMap.climberVictorRight = new WPI_VictorSPX(RobotMap.climberRightAddress);\n\t\t\n\t\tRobotMap.climberVictorRight.follow(RobotMap.climberVictorLeft);\n\t\t\n\t\tRobotMap.piston = new DoubleSolenoid(RobotMap.inChannel, RobotMap.outChannel);\n\t\t\n\t\tRobotMap.intakeLifter = new WPI_VictorSPX(2);\n\t\t\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(RobotMap.liftTalonAddress);\n\t\t\n\t\tautoChooser = new SendableChooser();\n\t\tautoChooser.addDefault(\"Drive to baseline\" , new DriveToBaseline());\n\t\tautoChooser.addObject(\"Null auto\", new NullAuto());\n\t\tautoChooser.addObject(\"Switch from right\", new SwitchFromRight());\n\t\tautoChooser.addObject(\"Switch from left\", new SwitchFromLeft());\n\t\tautoChooser.addObject(\"PID from left\", new PIDfromLeft());\n\t\tautoChooser.addObject(\"PID from right\", new PIDfromRight());\n\t\tautoChooser.addObject(\"Scale from right\", new ScaleAutoRight());\n\t\tautoChooser.addObject(\"Scale from left\", new ScaleAutoLeft());\n\t\tautoChooser.addObject(\"PID tester\", new PIDTESTER());\n\t\tautoChooser.addObject(\"Joe use this one\", new leftOnly());\n\t\tSmartDashboard.putData(\"Autonomous mode chooser\", autoChooser);\n\t\t\n\t\t//RobotMap.liftVictor.follow(RobotMap.climberTalon);\n\t\t\n\t\tRobotMap.vspLeft.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\tRobotMap.vspRight.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\t\n\t\tRobotMap.intakeLifted = new DigitalInput(1);\n\t\tRobotMap.isAtTop = new DigitalInput(2);\n\t\tRobotMap.isAtBottom = new DigitalInput(0);\n\t\t\n\t\tRobotMap.vspLeft.configVelocityMeasurementPeriod(VelocityMeasPeriod.Period_100Ms, 1);\n\t\tRobotMap.vspRight.configVelocityMeasurementWindow(64, 1); \n\t\t\n\t\toi = new OI();\n\t}", "@Override\n public void robotPeriodic() {\n putTelemetry();\n }", "@Override\n public void run() {\n\n // Define vehicle label if undefined\n if (this.label == null) {\n this.label = \"Vehicle_\" + this.getId();\n }\n\n // Ask roundabout object for path\n Deque<Vertex<AtomicReference>> path = this.getVehicleRoute(this.source, this.destination);\n Vertex<AtomicReference> last = null;\n\n // Get entry queue\n ConcurrentLinkedQueue<Vehicle> entry = this.roundabout.queueOnEntry(this, this.source);\n\n // Wait for first in queue\n while (entry.peek() != this) this.vehicleSleep(waitOnQueue());\n\n // Traverse Path\n for (Vertex<AtomicReference> v : path) {\n\n // Accelerate between path nodes\n if (this.speed < this.maxSpeed) this.speed = accelerate(this.speed);\n\n // Move to node\n while (!v.getValue().compareAndSet(null, this)) {\n\n // Decelerate to not crash into another vehicle\n while (this.speed > 0) this.speed = decelerate(this.speed);\n\n System.out.println(this.label + \": Waiting for next node \" + v.getKey());\n\n // Wait\n this.vehicleSleep(waitToTravel());\n }\n\n // Accelerate for next in case it has stopped\n while (this.speed <= 0) this.speed = accelerate(this.speed);\n\n System.out.println(this.label + \": Moving to node \" + v.getKey() + \" for \" + travel());\n\n // Moving from node to node\n this.vehicleSleep(travel());\n\n // Remove myself from queue only after locking the first node\n if (path.peekFirst() == v) entry.remove(this);\n\n // Release last node\n while (last != null && !last.getValue().compareAndSet(this, null)) ;\n\n // Assign v as the last node which it travelled to\n last = v;\n }\n\n // Release last node\n while (!last.getValue().compareAndSet(this, null)) ;\n }", "protected void initialize() {\n done = false;\n\n\n prevAutoShiftState = driveTrain.getAutoShift();\n driveTrain.setAutoShift(false);\n driveTrain.setCurrentGear(DriveTrain.DriveGear.High);\n// double p = SmartDashboard.getNumber(\"drive p\", TTA_P);\n// double i = SmartDashboard.getNumber(\"drive i\", TTA_I);\n// double d = SmartDashboard.getNumber(\"drive d\", TTA_D);\n// double rate = SmartDashboard.getNumber(\"rate\", TTA_RATE);\n// double tolerance = TTA_TOLERANCE; // SmartDashboard.getNumber(\"tolerance\", 2);\n// double min = SmartDashboard.getNumber(\"min\", TTA_MIN);\n// double max = SmartDashboard.getNumber(\"max\", TTA_MAX);\n// double iCap = SmartDashboard.getNumber(\"iCap\", TTA_I_CAP);\n// pid = new PID(p, i, d, min, max, rate, tolerance, iCap);\n pid = new PID(TTA_P, TTA_I, TTA_D, TTA_MIN, TTA_MAX, TTA_RATE, TTA_TOLERANCE, TTA_I_CAP);\n\n driveTrain.setSpeedsPercent(0, 0);\n driveTrain.setCurrentControlMode(ControlMode.Velocity);\n }", "@Test\n public void testUnparkVehicle() {\n System.out.println(\"unparkVehicle\");\n \n Vehicle train = new Train(null, 1f, null, null);\n\n ParkingSpot spot = new TrainSpot(new Vector3f(0, 0, 0));\n try {\n spot.ParkVehicle(train);\n spot.UnparkVehicle();\n } catch (InvalidVehicleException e) {\n fail(\"Exception occured\");\n }\n assertEquals(null, spot.getParkedVehicle());\n // TODO review the generated test code and remove the default call to fail.\n }", "@Override\n public void robotPeriodic() {\n // m_driveTrain.run(gulce);\n\n\n\n // workingSerialCom.StringConverter(ros_string, 2);\n // RoboticArm.run( workingSerialCom.StringConverter(ros_string, 2));\n }", "@Override\n\tprotected void takeOff(){\n\t\tgvh.log.i(TAG, \"Drone taking off\");\n\t\tsetControlInput(0, 0, 0, 1);\n\t}", "public void init() {\n delayingTimer = new ElapsedTime();\n\n // Define and Initialize Motors and Servos: //\n tailMover = hwMap.dcMotor.get(\"tail_lift\");\n grabberServo = hwMap.servo.get(\"grabber_servo\");\n openGrabber();\n\n // Set Motor and Servo Directions: //\n tailMover.setDirection(DcMotorSimple.Direction.FORWARD);\n\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n tailMover.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n int prevEncoder = tailMover.getCurrentPosition();\n tailMover.setPower(-0.15);\n mainHW.opMode.sleep (300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n runtime.reset();\n while((Math.abs(prevEncoder - tailMover.getCurrentPosition()) > 10)&& (runtime.seconds()<3.0)){\n prevEncoder = tailMover.getCurrentPosition();\n mainHW.opMode.sleep(300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n }\n tailMover.setPower(0.0);\n // Set Motor and Servo Modes: //\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n tailMover.setTargetPosition(0);\n tailMover.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n closeGrabber();\n }", "@Override\n public void onFailure(Call<VehicleDetailModel> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"Network issue\", Toast.LENGTH_SHORT).show();\n }", "public void unload() {\n releasePressureToReturn();\n releasePressureToShooter();\n latch(false);\n// reloaded = false;\n }", "public void setTrv (jkt.hrms.masters.business.EtrTravelreq trv) {\n\t\tthis.trv = trv;\n\t}", "@Override\n public void teleopPeriodic() {\n double triggerVal = \n (m_driverController.getTriggerAxis(Hand.kRight)\n - m_driverController.getTriggerAxis(Hand.kLeft))\n * RobotMap.DRIVING_SPEED;\n\n double stick = \n (m_driverController.getX(Hand.kLeft))\n * RobotMap.TURNING_RATE;\n \n m_driveTrain.tankDrive(triggerVal + stick, triggerVal - stick);\n\n if(m_driverController.getAButton()){\n m_shooter.arcadeDrive(RobotMap.SHOOTER_SPEED, 0.0);\n }\n \n else{\n m_shooter.arcadeDrive(0.0, 0.0);\n }\n \n }", "@Override\n\tpublic void drive() {\n\t\tif (gasoline > 0) {\n\t\t\tsetAccelerate(true);\n\t\t}\n\t}", "void steady_flight_at_given_speed (double step, double start_pitch) {\n // preamble: make sure inputs are in\n //computeFlowAndRegenPlotAndAdjust();\n\n //strut.aoa = 0.5; // ad hoc\n\n recomp_all_parts();\n\n double load = FoilBoard.this.load;\n\n // now moved into load box and bar \n //rider.weight = load - BOARD_WEIGHT - RIG_WEIGHT - FOIL_WEIGHT;\n\n steady_flight_at_given_speed___ok = false; // so far util done\n\n craft_pitch = start_pitch;\n // double prev_pitch = -20; // we nned it only because pitch value gets rounded somewhere in recomp_all_parts...\n while (craft_pitch < aoa_max && craft_pitch > aoa_min) {\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n double lift = foil_lift();\n if (lift == load // exact hit, done !(almost never happens, though)\n // happens due to rounding\n // || prev_pitch == craft_pitch\n ) \n break;\n if (step > 0 && lift > load) { // done or pivot\n if (step < 0.0025) { \n // done! flight is OK\n steady_flight_at_given_speed___ok = true;\n break;\n }\n step = -step/2; // shrink step & pivot\n } else if (step < 0 && lift < load) { \n step = -step/2; // shrink step & pivot\n } // else keep going with current stepa\n // prev_pitch = craft_pitch;\n craft_pitch += step;\n }\n\n // expect small increse in drag as the result\n vpp.set_mast_aoa_for_given_drag(total_drag()); // (wing.drag+stab.drag);\n recomp_all_parts();\n\n // old linearly increasing logic \n //find_aoa_of_min_drag();\n //if (foil_lift() > load_numeric) {\n // // need to reduce AoA\n // while (craft_pitch > aoa_min) {\n // craft_pitch -= 0.1;\n // System.out.println(\"-- reducing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() <= load_numeric) \n // break; // done\n // } \n //}\n //else if (foil_lift() < load_numeric) {\n // // need to increase AoA\n // while (craft_pitch < aoa_max) {\n // craft_pitch += 0.1;\n // System.out.println(\"-- increasing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() >= load_numeric) \n // break; // done\n // } \n //}\n\n }", "public void drive( Vehicle vehicle ) {\n\t\t\tvehicle.run();\n\t}", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "public void teleopInit() {\n armTask.stop();\n driveTask.stop();\n armTask2.stop();\n getRobotDrive().stop();\n driveState = TELEOP;\n armState = TELEOP;\n\n }", "void deployRobot(){\n\n //Robot going down\n //Can be omitted if for test purposes\n if(!autonomonTesting) {\n while (robot.mechLiftLeft.getCurrentPosition() < robot.MAX_LIFT_POSITION &&\n robot.mechLiftRight.getCurrentPosition() < robot.MAX_LIFT_POSITION && !isStopRequested()) {\n robot.liftMovement(robot.LIFT_SPEED, false);\n }\n telemetry.addData(\"Lift Position\", robot.mechLiftLeft.getCurrentPosition());\n }\n else{\n telemetry.addLine(\"Tesint mode, without lift\");\n }\n robot.liftMovement(0, false);\n telemetry.update();\n\n\n //tensor activation\n if (tfod != null) {\n tfod.activate();\n }\n\n //moving to get in position for TensorFlow scan\n\n //out of the hook\n robot.setDrivetrainPosition(-300, \"translation\", .6);\n\n //away from the lander\n robot.setDrivetrainPosition(800, \"strafing\", .3);\n\n //back to initial\n robot.setDrivetrainPosition(300, \"translation\", .6);\n\n }", "private void handleSendTruck(JSONObject payload) {\n var truckData = payload.getJSONObject(\"truck\");\n var truckId = truckData.getInt(\"id\");\n\n var from = this.parseGeolocation(truckData.getJSONObject(\"geolocation\"));\n var to = this.parseGeolocation(payload.getJSONObject(\"geolocation\"));\n\n // Retrieve an eventual existing truck handler\n var pair = this.trucks.get(truckId);\n var truckHandler = (TruckHandler) null;\n var thread = (Thread) null;\n\n if (pair == null) {\n var capacity = truckData.getInt(\"capacity\");\n\n // If no handler is assigned to the truck\n // the truck is at its station, so we create\n // a station at the current location of the truck\n var truck = new Truck(truckId, capacity, new Station(from));\n\n // Start a thread that will handle the truck\n // during it's whole life\n truckHandler = new TruckHandler(this.client, truck);\n thread = new Thread(truckHandler);\n\n // Add the handler to the truck map\n this.trucks.put(truckId, new Pair<TruckHandler, Thread>(truckHandler, thread));\n } else {\n // If the handler exists, we make the truck\n // start from it's current position\n truckHandler = pair.key;\n thread = pair.value;\n\n from = truckHandler.getTruck().getGeolocation();\n truckHandler.stop();\n\n try {\n thread.join();\n } catch (InterruptedException e) {\n // No one cares\n }\n\n thread = new Thread(truckHandler);\n }\n\n // Define the new destination of the truck\n var sensor = this.sensors.getNearGeolocation(to);\n truckHandler.setDestination(sensor);\n\n thread.start();\n }", "public void eject() {\n _collectorMotor.set(ejectSpeed);\n }", "public void ldrive(double speed){\n left1.set(ControlMode.PercentOutput, speedRamp(speed));\n left2.set(ControlMode.PercentOutput, speedRamp(speed));\n }", "@Override\n public void onReceive() {\n //下班充电状态\n boolean isRobotWorking = RobotManager.getInstance().isRobotWorking();\n int robotStatus = RobotManager.getInstance().getRobotStatus();\n boolean isCancellingCharge = RobotManager.getInstance().getIsCancellingCharge();\n boolean isGoing2Charge = RobotManager.getInstance().getIsGoing2Charge();\n int chargeState = RobotManager.getInstance().getChargeState();\n\n if (robotStatus == 4) {\n if (isRobotWorking) {\n translateAnimator.start();\n return;\n }\n }\n\n if (!isRobotWorking && robotStatus != 4 && !isCancellingCharge) {\n if (chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n }\n }\n\n if (robotStatus != 2 && RobotManager.getInstance().battery.get() != -1 && RobotManager.getInstance().battery.get() <= ConstantValue.batteryThreshold && chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n } else if ((robotStatus == 2) && isRobotWorking && RobotManager.getInstance().battery.get() >= ConstantValue.batteryCeil) {\n //充电完成开始巡游 //上班时间\n LogcatHelper.logd(StatisticsConstant.STARTMOVE, \"\", StatisticsConstant.WORKENDCHARGE);\n RobotManager.getInstance().setRobotStatus(0);\n translateAnimator.start();\n return;\n } else if (robotStatus == 2 && chargeState == 0) {\n RobotManager.getInstance().setRobotStatus(2);\n translateAnimator.cancel();\n choseImage(4);\n return;\n } else if (robotStatus == 3 && chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n }\n }", "@Override\r\n public void turnOff() {\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n if (this.engaged()) {\r\n disengageLoads();\r\n }\r\n }", "public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }", "public void brake() {\n\t\tsetPower(Motor.STOP);\r\n\t}", "public void lowerLift(double timeout) {\n {\n\n robot.liftleft.setTargetPosition(0);\n robot.liftright.setTargetPosition(0);\n // Turn On RUN_TO_POSITION\n robot.liftleft.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftright.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n // reset the timeout time and start motion.\n runtime.reset();\n robot.liftleft.setPower(0.25);\n robot.liftright.setPower(0.25);\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n while (\n (runtime.seconds() < timeout) &&\n (robot.liftleft.isBusy()) && robot.liftright.isBusy())\n // Display it for the driver.\n\n telemetry.addData(\"Path2\", \"lift left position: %7d lift left position: %7d target position: %7d\",\n robot.liftleft.getCurrentPosition(), robot.liftright.getCurrentPosition(),\n 0);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.liftright.setPower(0);\n robot.liftleft.setPower(0);\n\n\n robot.liftleft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftright.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "void easy_ride_from_70kmh_down (double min_lift) { \n double start_speed = 70; // kmh\n double pitch = 0;\n double min_drag = 10000.0;\n double step = -10;\n velocity = start_speed;\n for (int count = 0; count < 10000; count++) {\n trace(\"velocity: \" + velocity + \" step: \" + step);\n steady_flight_at_given_speed(5, 0);\n double total_drag = total_drag();\n double foil_lift = foil_lift();\n if (Math.abs(step) < 0.01) break;\n if ((step < 0 && velocity+step <= 0) ||\n // (step > 0 && velocity >= 70) ||\n foil_lift < load ||\n total_drag > min_drag) { // can't pivot because of local max of drag before taking off.... \n velocity -= step;\n step *= 0.5;\n } else {\n velocity += step;\n min_drag = total_drag;\n }\n }\n make_cruising_info(min_lift, min_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putBoolean(\"Max Intake Extension: \", RobotMap.intakeLifted.get());\n\t\tSmartDashboard.putBoolean(\"Max Lift Extension:\", RobotMap.isAtTop.get());\n\t\tSmartDashboard.putBoolean(\"Min Lift Extension:\", RobotMap.isAtBottom.get());\n\t\tDriveTrain.driveWithJoystick(RobotMap.stick, RobotMap.rd); // Drive\n\t\tTeleOp.RaiseLift(RobotMap.liftTalon, RobotMap.controller); // Raise lift\n\t\tif(RobotMap.controller.getRawAxis(RobotMap.lowerLiftAxis) >= 0.2) {\n\t\tTeleOp.LowerLift(RobotMap.liftTalon, RobotMap.controller);\n\t\t}\n\t\tTeleOp.DropIntake(RobotMap.controller, RobotMap.intakeLifter);\n\t\tTeleOp.spinOut(RobotMap.intakeVictorLeft, RobotMap.controller);\n\t\t//TeleOp.spinnySpinny(RobotMap.intakeVictorLeft, RobotMap.stick);\n\t}", "public Truck()\r\n {\r\n super.setVehIs(VEHICLE_IS);\r\n // this.showMenu();\r\n }", "public Trip(Vehicle v, boolean round) {\r\n this.vehicle = v;\r\n roundTrip = round;\r\n }", "@Override\n public boolean waitForNextFlight() {\n this.lock.lock();\n try {\n boolean wait = this.passengersStillMissing != 0;\n\n // update hostess state\n this.repository.updateHostessState(HostessState.WAIT_FOR_NEXT_FLIGHT);\n\n if (wait) {\n // wait for pilot\n while (!this.planeReadyForBoarding) {\n this.hostessWaitPlaneReadyToTakeOff.await();\n }\n this.planeReadyForBoarding = false;\n }\n\n return wait;\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n return false;\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }", "public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }", "@Override\n public void runOpMode() {\n motorFL = hardwareMap.get(DcMotor.class, \"motorFL\");\n motorBL = hardwareMap.get(DcMotor.class, \"motorBL\");\n motorFR = hardwareMap.get(DcMotor.class, \"motorFR\");\n motorBR = hardwareMap.get(DcMotor.class, \"motorBR\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser.setDirection(DcMotor.Direction.FORWARD);\n landerRiser.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n markerDrop = hardwareMap.get(Servo.class, \"marker\");\n markerDrop.setDirection(Servo.Direction.FORWARD);\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //Landing & unlatching\n landerRiser.setPower(-1);\n telemetry.addData(\"Status\", \"Descending\");\n telemetry.update();\n sleep(5550);\n landerRiser.setPower(0);\n telemetry.addData(\"Status\",\"Unhooking\");\n telemetry.update();\n move(-0.5, 600, true);\n strafe(-0.4,0.6, 3600, true);\n move(0.5,600,true);\n markerDrop.setPosition(0);\n sleep(1000);\n markerDrop.setPosition(0.5);\n sleep(700);\n markerDrop.setPosition(0);\n strafe(0, -0.5,500,true);\n strafe(0.5, -0.25, 8500, true);\n\n }", "public void setAsUp () \n\t{ \n\t\tn.setFailureState(true);\n\t\tfinal SortedSet<WLightpathRequest> affectedDemands = new TreeSet<> ();\n\t\tgetOutgoingFibers().forEach(f->affectedDemands.addAll(f.getTraversingLpRequestsInAtLeastOneLp()));\n\t\tgetIncomingFibers().forEach(f->affectedDemands.addAll(f.getTraversingLpRequestsInAtLeastOneLp()));\n\t\tfor (WLightpathRequest lpReq : affectedDemands)\n\t\t\tlpReq.internalUpdateOfRoutesCarriedTrafficFromFailureState();\n\t}", "private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }", "protected void initialize() {\n \t//Robot.getFlywheel().setRunning(!Robot.getFlywheel().running());\n \t//Robot.getElevator().setRunning(!Robot.getElevator().running());\n \tif (run == false)\n \t{\n \t\tRobot.getFlywheel().setRunning(false);\n \t\t//Robot.getIndexer().setRunning(false);\n \t\tRobot.getFlywheel().setSetpoint(0.0);\n \t\tRobot.getFlywheel().disable();\n \t\t//Robot.getIndexer().disable();\n \t\tSystem.out.println(\"not running\");\n \t}\n \telse\n \t{\n \t\tRobot.getFlywheel().initialize();\n \t\tRobot.getFlywheel().enable();\n \t\tRobot.getFlywheel().setRunning(true);\n \t\tdouble m_motorLevel;\n \t\t//m_rpms = SmartDashboard.getNumber(\"FlywheelVelocity\", 1850);\n \t//m_motorLevel = m_rpms / 6750 * 1.35;//6750 = max rpms\n \tm_motorLevel =( m_rpms + 1000) / 6750 *1.1;//6750 = max rpms\n \tRobot.getFlywheel().setSetpoint(m_rpms);\n \tRobot.getFlywheel().setExpectedMotorLevel(m_motorLevel);\n \tSmartDashboard.putNumber(\"FlywheelVelocity\", m_rpms);\n \tSystem.out.println(m_rpms + \" \" + m_motorLevel + \" setpoint: \" + Robot.getFlywheel().getSetpoint());\n \t}\n }", "void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }", "public void transport(int startFloor, int endFloor, boolean up){\r\n\t\t\r\n\t\tisIntransit = true;\r\n\t\tdirectionUp = up;\r\n\t\topenDoor(startFloor);\r\n\t\tcloseDoor(startFloor);\r\n\t\t\r\n\t\t//Traverse floor and report.\r\n\t\tint trip = endFloor-startFloor; \r\n\t\tint finalCount = trip*1000;\r\n\t\tint j = 0 ;\r\n\t\televatorAt = startFloor ;\r\n\t\tfor(int i=0; i<finalCount; i++){\t\t\t\r\n\t\t\tj++;\r\n\t\t\tif(j==1000){\r\n\t\t\t\tif(up){\r\n\t\t\t\t\televatorAt++;\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\televatorAt--;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Elevator no. \" + id + \" at \"+ elevatorAt);\r\n\t\t\t\tj=0;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\tfloorsTraversed += endFloor - startFloor; \r\n\t\ttrips++;\r\n\t\tif(trips==100){\r\n\t\t\tserviccerequired = true; \r\n\t\t}\r\n\t\t\r\n\t\topenDoor(endFloor);\r\n\t\tcloseDoor(endFloor);\r\n\t\t\r\n\t\tisIntransit = false;\r\n\t}", "public void RobotLoop() {\n if (mOperatorInterface.getVisionToggle()) {\n toggleVision();\n }\n\n mShooter.updateDistance(LastDistance);\n\n turretLoop();\n\n driveTrainLoop();\n\n updateSmartDashboard();\n\n State prevState = mState;\n IntakeState prevIntakeState = mIntakeState;\n ClimbingState prevClimbState = mClimbingState;\n ShootingState prevShootState = mShootingState;\n executeRobotStateMachine();\n if (prevState != mState) {\n mRobotLogger.log(\"Changed state to \" + mState);\n }\n if (prevIntakeState != mIntakeState) {\n mRobotLogger.log(\"Changed state to \" + mIntakeState);\n }\n if (prevClimbState != mClimbingState) {\n mRobotLogger.log(\"Changed state to \" + mClimbingState);\n }\n if (prevShootState != mShootingState) {\n mRobotLogger.log(\"Changed state to \" + mShootingState);\n }\n\n if (mOperatorInterface.getStateReset()) {\n mState = State.INTAKE;\n mIntakeState = IntakeState.IDLE;\n mClimbingState = ClimbingState.IDLE;\n mShootingState = ShootingState.IDLE;\n if (mState == State.SHOOTING) {\n mShootingState = ShootingState.SHOOTING_COMPLETE;\n }\n if (mState == State.INTAKE) {\n mIntakeState = IntakeState.IDLE;\n }\n }\n\n if (mOperatorInterface.isBarf()) {\n if (mIntakeState == IntakeState.STORAGE_EJECT) {\n mIntakeState = IntakeState.IDLE;\n } else {\n mIntakeState = IntakeState.STORAGE_EJECT;\n mBarfTimer.reset();\n mBarfTimer.start();\n }\n }\n\n // TODO: REMOVE THIS IT SHOULDNT BE HERE\n // check if we are shooting\n // TODO: remove this and only allow shooting if you have at least 1 ball\n checkTransitionToShooting();\n\n updateSmartDashboard();\n\n if (mOperatorInterface.getSpinUp()) {\n sIsSpinningUp = !sIsSpinningUp;\n }\n\n // spin up shooter if commanded\n if (sIsSpinningUp) {\n mShooter.start();\n } else if (mState != State.SHOOTING) {\n mShooter.stop();\n }\n\n // Shooter velocity trim\n if (mShooterVelocityTrimDown.update(mOperatorInterface.getShooterVelocityTrimDown())) {\n // mShooter.decreaseVelocity();\n } else if (mShooterVelocityTrimUp.update(mOperatorInterface.getShooterVelocityTrimUp())) {\n // mShooter.increaseVelocity();\n } else if (mOperatorInterface.getResetVelocityTrim()) {\n mShooter.resetVelocity();\n }\n }", "@Test(expected=RuntimeException.class)\n\tpublic void testWarm_DetailedElseAbort_ShouldAbort1() {\n\t\tEmissionModule emissionModule = setUpScenario(EmissionsConfigGroup.DetailedVsAverageLookupBehavior.onlyTryDetailedElseAbort);\n\n\t\tdouble travelTimeOnLink = 21; //sec. approx freeSpeed of link12 is : (200 m) / (9.72.. m/s) approx 20.57 s\n\t\temissionModule.getWarmEmissionAnalysisModule().checkVehicleInfoAndCalculateWarmEmissions(vehicleFallbackToTechnologyAverage, link, travelTimeOnLink);\n\t}", "public void SendVehicletoGarage(Integer vehicle_number) {\n\t\ttry {\n\t\t\tThread.sleep(3000);\n\t\t} catch (InterruptedException ex) {\n\t\t\tThread.currentThread().interrupt();\n\t\t}\n\n\t\t// Send Vehicle back to field\n\t\treturnVehicleForService(vehicle_number);\n\t}", "protected int dropOff(int amt) {\n delayElevator();\n return load.addAndGet(-amt);\n }", "public void run() {\n ParkRequestManager.instance().addParkListener(instance);\n OffRequestManager.instance().addOffRequestListener(instance);\n OnRequestManager.instance().addOnRequestListener(instance);\n display.turnVehicleOff();\n display.displaySpeed(0);\n }", "private void considerUnavailable() {\n host.makeUnavailable(this::tryReconnect);\n\n // if the host is unavailable then we should release the connections\n connections.forEach(this::definitelyDestroyConnection);\n\n // let the load-balancer know that the host is acting poorly\n this.cluster.loadBalancingStrategy().onUnavailable(host);\n\n }", "void driveTracker()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlong time = System.currentTimeMillis();\r\n\t\t\tint last_direction = 0;\r\n\t\t\twhile(System.currentTimeMillis()-time < 20000 && status.equals(\"wait\"))\r\n\t\t\t{\r\n\t\t\t\tint direction = -1;\r\n\t\t\t\tint flow_min = Main.MAX_INT;\r\n\t\t\t\tif((loc.i-1)>=0 && BFS.adj_const[(loc.i-1)*80+loc.j][loc.i*80+loc.j]==1 && Flow.flows[loc.i-1][loc.j][1] < flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tdirection = 0;//up\r\n\t\t\t\t\tflow_min = Flow.flows[loc.i-1][loc.j][1];\r\n\t\t\t\t}\r\n\t\t\t\tif((loc.i+1)<80 && BFS.adj_const[(loc.i+1)*80+loc.j][loc.i*80+loc.j]==1 && Flow.flows[loc.i][loc.j][1] < flow_min)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tdirection = 1;//down\r\n\t\t\t\t\tflow_min = Flow.flows[loc.i][loc.j][1];\r\n\t\t\t\t}\r\n\t\t\t\tif((loc.j-1)>=0 && BFS.adj_const[loc.i*80+loc.j][loc.i*80+loc.j-1]==1 && Flow.flows[loc.i][loc.j-1][0] < flow_min)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tdirection = 2;//left\r\n\t\t\t\t\tflow_min = Flow.flows[loc.i][loc.j-1][0];\r\n\t\t\t\t}\r\n\t\t\t\tif((loc.j+1)<80 && BFS.adj_const[loc.i*80+loc.j][loc.i*80+loc.j+1]==1 && Flow.flows[loc.i][loc.j][0] < flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tdirection = 3;//right\r\n\t\t\t\t\tflow_min = Flow.flows[loc.i][loc.j][0];\r\n\t\t\t\t}\r\n\t\t\t\tLight light = Traffic.findLight(loc.i,loc.j);\r\n\t\t\t\tif(light!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\twhile(!leaveLight(light,last_direction,direction))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmeet_light = true;\r\n\t\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmeet_light = false;\r\n\t\t\t\t}\r\n\t\t\t\tswitch(direction)\r\n\t\t\t\t{\r\n\t\t\t\tcase 0 ://up\r\n\t\t\t\t\tif(BFS.adj_matrix[(loc.i-1)*80+loc.j][loc.i*80+loc.j] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[loc.i-1][loc.j][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tloc.i -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1 ://down\r\n\t\t\t\t\tif(BFS.adj_matrix[(loc.i+1)*80+loc.j][loc.i*80+loc.j] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[loc.i][loc.j][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tloc.i += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 ://left\r\n\t\t\t\t\tif(BFS.adj_matrix[loc.i*80+loc.j][loc.i*80+loc.j-1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[loc.i][loc.j-1][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tloc.j -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 ://right\r\n\t\t\t\t\tif(BFS.adj_matrix[loc.i*80+loc.j][loc.i*80+loc.j+1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[loc.i][loc.j][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tloc.j += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t\tlast_direction = direction;\r\n\t\t\t}\r\n\t\t\tif(status.equals(\"wait\"))\r\n\t\t\t{\r\n\t\t\t\tstatus = \"stop\";\r\n\t\t\t\tThread.sleep(1000);//stop\r\n\t\t\t\tstatus = \"wait\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttransStatus();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");\r\n\t\t}\r\n\t}", "private void go_to_bed() {\n if (state != State.ROAMING) {\n state = State.SLEEPING;\n }\n\n // Clean up our wifi locks, notifications, and worker thread.\n if(wifi_lock != null) {\n wifi_lock.release();\n }\n stopForeground(true);\n stopSelf();\n\n if(worker != null) {\n worker.interrupt();\n worker = null;\n }\n\n // The worker thread might be stuck on I/O with the server. In a minor violation of thread\n // isolation principles, we can force the thread to die faster by just yanking its socket\n // out from under it.\n if(keepalive_sock != null) {\n try {\n keepalive_sock.close();\n } catch (IOException e) {\n System.out.println(\"Socket shutdown error... ignored.\");\n }\n }\n\n // Finally, update the UI if it's awake.\n send_status_update();\n }", "@Override\n public void stop() {\n leftFrontDrive.setPower(0.0);\n rightFrontDrive.setPower(0.0);\n leftRearDrive.setPower(0.0);\n rightRearDrive.setPower(0.0);\n\n // Disable Tracking when we are done;\n targetsUltimateGoal.deactivate();\n\n //closes object detection to save system resouces\n if (tfod != null) {\n tfod.shutdown();\n }\n }", "void loadStation() {\n\n // only do this if the station does not exist\n if (!stationExists) {\n\n station.setStatusCode(35); // open & unknown\n if (!\"\".equals(passkey)) { // ub02\n station.setPasskey(passkey); // ub02\n } // if (!\"\".equals(passkey)) // ub02\n\n if (dbg3) System.out.println(\"<br>loadStation: put station = \" + station);\n if (dbg4) System.out.println(\"<br>loadStation: put station = \" + station);\n try {\n station.put();\n } catch(Exception e) {\n System.err.println(\"loadStation: put station = \" + station);\n System.err.println(\"loadStation: put sql = \" + station.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"loadStation: sql = \" + station.getInsStr());\n\n //stationCount++;\n\n if (!\"\".equals(sfriGrid.getGridNo(\"\"))) {\n try {\n sfriGrid.put();\n } catch(Exception e) {\n System.err.println(\"loadStation: put sfriGrid = \" + sfriGrid);\n System.err.println(\"loadStation: put sql = \" + sfriGrid.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadStation: put sfriGrid = \" + sfriGrid);\n } // if (!\"\".equals(sfriGrid.getGridNo(\"\")))\n\n weatherIsLoaded = false;\n\n } // if (!stationExists)\n\n }", "public void load(BusIfc bus)\n {\n tenderCargo = (TenderCargo) bus.getCargo();\n }" ]
[ "0.5701024", "0.5399102", "0.5382063", "0.52918786", "0.5263452", "0.5219734", "0.5210132", "0.5197311", "0.5191869", "0.515798", "0.51397485", "0.51263535", "0.51202804", "0.51050955", "0.50870085", "0.5085115", "0.5031766", "0.5021695", "0.5014512", "0.4991924", "0.49882796", "0.4983875", "0.498373", "0.49708518", "0.49689177", "0.49667934", "0.49636963", "0.4945464", "0.49291587", "0.49180886", "0.49163628", "0.49160537", "0.49133912", "0.49070168", "0.48911497", "0.48821548", "0.48806605", "0.48787796", "0.4870815", "0.48707423", "0.48699617", "0.48690185", "0.4865996", "0.48624992", "0.48606154", "0.48554286", "0.4844693", "0.484357", "0.48410466", "0.48305655", "0.4830482", "0.48249522", "0.48234808", "0.48177668", "0.4811959", "0.48098588", "0.48060587", "0.4804653", "0.48042536", "0.480348", "0.4802755", "0.48027393", "0.47986156", "0.47911578", "0.47870705", "0.47791934", "0.47691748", "0.47684646", "0.47651088", "0.47598663", "0.47588623", "0.47586823", "0.4756888", "0.47442728", "0.4741797", "0.4741737", "0.47380823", "0.47379082", "0.47370082", "0.4736029", "0.47333902", "0.47319913", "0.47288826", "0.47267532", "0.47267005", "0.47174054", "0.47161978", "0.47121173", "0.4711935", "0.47111574", "0.4710316", "0.47062555", "0.46991503", "0.469849", "0.4687743", "0.46813583", "0.46788323", "0.4677824", "0.46777207", "0.4671992" ]
0.5317467
3
Unloads last vehicle from the TransportTruck
public Vehicle unloadLastVehicle() { return storage.removeVehicleBack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeVehicle() {\n\t\tmVehicles.removeFirst();\n\t}", "public void unload(){ \n load.unloadFirst(); \n }", "public void vacateGarage() {\n\t\tvehicles.clear(); \n\t}", "public boolean removeVehicle(){\r\n veh = null;\r\n return true;\r\n }", "public void remove(Vehicle vehicle) {\n\t\tvehicles.remove(vehicle);\n\n\t}", "public void loadVehicle(Vehicle vehicle) {\n storage.addVehicle(vehicle);\n }", "public void deleteVehicle(final long vehicle) throws SQLException {\n final Statement stmt = connection.createStatement();\n final int num = stmt.executeUpdate(\"DELETE FROM trips WHERE vehicle = \" + vehicle);\n System.out.println(num + \" rows deleted for vehicle = \" + vehicle);\n stmt.close();\n onChange();\n }", "void leave(Vehicle v) {\n\t\t\tcurrentVehicle = null;\n\t\t}", "public void removeVehicles() {\r\n numberOfVehicles = 0;\r\n for (Lane lane : lanes) {\r\n lane.removeVehicles();\r\n }\r\n }", "@Override\r\n public void delete(Vehicle vehicle) {\n }", "void minecraftChunkUnloaded() {\n\t\tthis.lastUnloadingTime = System.currentTimeMillis();\n\t}", "public void removeVehicle () {\n\t\t\n\t\tfor(int i = 0; i <= vehicles.size(); i++) {\n\t\t\t\n\t\t\tif(vehicles.get(i) instanceof Car) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(vehicles.get(i) instanceof Motorcycle) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(vehicles.get(i) instanceof Bus) {\n\t\t\t\tvehicles.remove(i); \n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "void unsaveCurrentStation();", "public void unload() {\n releasePressureToReturn();\n releasePressureToShooter();\n latch(false);\n// reloaded = false;\n }", "public void clearLocusTairObjectId() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }", "public void removeVehicle(Vehicle newVehicle )\n\t{\n\t\tif (garageMap.containsKey(newVehicle.getRegistrationNumber())){\n\t\t\tgarageMap.remove(newVehicle.getRegistrationNumber());\n\t\t}\n\t}", "public void unloaded(){\n\t\tloaded=false;\n\t}", "@Test\n public void testUnparkVehicle() {\n System.out.println(\"unparkVehicle\");\n \n Vehicle train = new Train(null, 1f, null, null);\n\n ParkingSpot spot = new TrainSpot(new Vector3f(0, 0, 0));\n try {\n spot.ParkVehicle(train);\n spot.UnparkVehicle();\n } catch (InvalidVehicleException e) {\n fail(\"Exception occured\");\n }\n assertEquals(null, spot.getParkedVehicle());\n // TODO review the generated test code and remove the default call to fail.\n }", "@Override\n\t\tpublic void onTaskComplete(Vehicle vh) {\n\t\t\tVehicleActivity.this.onTaskCompleteDelete(vh);\n\t\t}", "public void remove() {\n int size = itinerary.size();\n if (size != 1) {\n \n // Removes last Flight in this Itinerary.\n Flight removedFlight = this.itinerary.remove(size - 1);\n \n // Gets the new last Flight in this Itinerary.\n Flight flight = this.itinerary.get(size - 2);\n \n // Updates all the relevant fields in this Itinerary.\n this.price -= removedFlight.getCost();\n this.arrivalDateTime = flight.getArrivalDateTime();\n this.destination = flight.getDestination();\n this.travelTime = arrivalDateTime.timeDiff(departDateTime);\n this.places.remove(size);\n }\n }", "@Override\n public void onArmUnsync(Myo myo, long timestamp) {\n\n }", "public EntyTruck removeTruck(EntyTruck truck) throws InvalidEntityException {\n\t\t// Does the event match the truck actually being weighted?\n\t\tif (truck != this.truck)\n\t\t\tthrow new InvalidEntityException();\n\n\t\t// Schedule loading of truck\n\t\tmodel.enqueueEvent(new EvtStartLoading(truck, model.getTime()));\n\n\t\t// Weigh next truck (if any is queued)\n\t\tEntyTruck nextTruck = queue.dequeue();\n\t\tthis.truck = nextTruck; // null, if queue was empty\n\t\tif (nextTruck != null)\n\t\t\tmodel.enqueueEvent(new EvtEndWeighing(nextTruck, model.getTime()));\n\t\t\n\t\treturn truck;\n\t}", "private void reloadTreatmentData()\n {\n if (_dietTreatment == null) return;\n _dietTreatment.updateContactJournalsCache();\n _dietTreatment.updateDietParametersCache();\n _dietTreatment.updateDietPlansCache();\n _dietTreatment.updatePatientStatesCache();\n _dietTreatment.updateSystemUsersCache();\n \n // load nutritionprotocols\n NutritionProtocolDAO dao = DAOFactory.getInstance().getNutritionProtocolDAO();\n List<NutritionProtocol> nps = dao.findByDietTreatment(_dietTreatment.getModel());\n _nutritionProtocols = new ArrayList<NutritionProtocolBO>();\n for (NutritionProtocol nutritionProtocol : nps) \n {\n _nutritionProtocols.add(new NutritionProtocolBO(nutritionProtocol));\n }\n }", "public void unsetLastRow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(LASTROW$16, 0);\n }\n }", "public void updateDeletions() {\r\n for (Lane l : lanes) {\r\n Vehicle[] vehArray = l.getVehicles().toArray(new Vehicle[0]);\r\n for (Vehicle v : vehArray) {\r\n if (v.getHeadSegment().equals(l.getLastSegment())) {\r\n l.getVehicles().remove(v);\r\n numberOfVehicles--;\r\n if (v instanceof Car) {\r\n SimulationStats.incrementCars();\r\n SimulationStats.addEvent(SimulationStats.createVehicleLeavingEvent(v));\r\n } else if (v instanceof Truck) {\r\n SimulationStats.incrementTrucks();\r\n SimulationStats.addEvent(SimulationStats.createVehicleLeavingEvent(v));\r\n }\r\n }\r\n }\r\n }\r\n }", "public void reload() {\n log.debug(\"Reloading bicycles after update to table\");\n try{\n bicycles.clear();\n bicycles.addAll(bicycleManager.findAllBicycles());\n checkAvail();\n fireTableDataChanged();\n }catch(ServiceFailureException ex){\n log.error(\"SFE reloading bicycles after update\");\n throw new ServiceFailureException(ex);\n }catch(IllegalArgumentException ex){\n log.error(\"IAE reloading bicycles\");\n }\n }", "private final void unparkCar(Car car){\n inTerminalGUI.unparkCar(car);\n }", "void deleteVehicle(String vehicleID);", "public void remove(Load load){\n\t\t}", "public void ejectTicket(){if(this.inProgress()){this.currentTicket=null;}}", "public void removeUnit(){\r\n tacUnit = null;\r\n }", "public void unget() {}", "public void enleverlaDerniereObs() {\n\n\t\tobstaclesList.remove(obstaclesList.size()-1);\n\t}", "public void unparkVehicle(Vehicle v, int departureTime)\r\n\t\t\tthrows VehicleException, SimulationException {\r\n\t\tif (v.isParked() == false) {\r\n\t\t\tthrow new VehicleException(\"Vehicle is not parked!\");\r\n\t\t} else if (v.isQueued()) {\r\n\t\t\tthrow new VehicleException(\"Vehicle is currently in Queue!\");\r\n\t\t} else if (v.getDepartureTime() < 0) {\r\n\t\t\tthrow new VehicleException(\"Invalid deperture time!\");\r\n\t\t} else if (v.isQueued() == false && v.isParked() == false) {\r\n\t\t\tthrow new SimulationException(\"Vehicle doesn't exist.\");\r\n\t\t}\r\n\r\n\t\tif (v instanceof Car) {\r\n\t\t\tif (((Car) v).isSmall()) {\r\n\t\t\t\tif (smallCarsParked.contains(v)) {\r\n\t\t\t\t\tsmallCarsParked.remove(v);\r\n\t\t\t\t\tcarParkStatus += \"|S:P>A|\";\r\n\t\t\t\t} else if (carsParked.contains(v)) {\r\n\t\t\t\t\tcarsParked.remove(v);\r\n\t\t\t\t\tcarParkStatus += \"|S:P>A|\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new SimulationException(\"Cannot find vehicle.\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcarsParked.remove(v);\r\n\t\t\t\tcarParkStatus += \"|C:P>A|\";\r\n\t\t\t}\r\n\t\t} else if (v instanceof MotorCycle) {\r\n\t\t\tif (smallCarsParked.contains(v)) {\r\n\t\t\t\tsmallCarsParked.remove(v);\r\n\t\t\t\tcarParkStatus += \"|M:P>A|\";\r\n\t\t\t} else if (motorCyclesParked.contains(v)) {\r\n\t\t\t\tmotorCyclesParked.remove(v);\r\n\t\t\t\tcarParkStatus += \"|M:P>A|\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void unsetThead()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(THEAD$6, 0);\n }\n }", "@Override\n public Car removeCar() {\n Car car = null;\n if (inDock) {\n car = transporter.removeCar(true, this);\n }\n return car;\n }", "public void endTrip()\r\n {\r\n if (detourTrip == null)\r\n {\r\n // we are in a normal trip\r\n trip = null;\r\n }\r\n else\r\n {\r\n // we are in a detour trip\r\n detourTrip = null;\r\n }\r\n }", "public void VehiclePositionIsFinal() {\n\t\tInteger idVehicle ;\n\t\tdouble lat;\n\t\tdouble lon;\n\t\tVehicle vehicle;\n\ttry {\n\t\tVehicleIntervention vehicleIntervention = VehicleIntervention.getInstance();\n\t\tif( ! vehicleIntervention.listIntervention.isEmpty()) {\n\t\t\t//parcourir toutes les interventions\n\t\t\t for( InterventionDto intervention: vehicleIntervention.listIntervention) {\n\t\t\t\t idVehicle = intervention.getVehicle().getId();\n\t\t\t\t lat = intervention.getFireLat();\n\t\t\t\t lon = intervention.getFireLon();\n\t\t\t\t vehicle = getVehicleById(idVehicle);\nSystem.out.println(\"vehicle:\" +vehicle.getId()+ \" at \"+vehicle.getLat() +\":\"+vehicle.getLon());\n \n\t\t\t\t //si le vehicule arrive a proximite et l'intensite du fire est nulle \n\t\t\t\t if( Math.abs(vehicle.getLat() - lat)<1e-3 \n\t\t\t\t\t\t && Math.abs(vehicle.getLon() - lon)<1e-3\n\t\t\t\t\t\t &&isFireOut(lat,lon) ) {\n\t\t\t\t\t //supprimer le vehicule de la liste\n\t\t\t\t\t vehicleIntervention.listIntervention.remove(intervention);\n\t\t\t\t\t //changer l'etat du vehicule\n\t\t\t\t\t Vehicle getvehicle = vRepository.findById(idVehicle).get();\n\t\t\t\t\t getvehicle.setIntervention(false);\n\t\t\t\t\t vRepository.save(getvehicle);\n\t\t\t\t\t \nSystem.out.println(\"Fire:\" + \" at \"+lat +\":\"+lon+\" is out thanks to vehicle: \"+idVehicle+\" Intervention:\"+getvehicle.isIntervention());\n\t\t\t\t }\n\t\t\t \t}\n\t\t }\n\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public void unload() {\n plugin.getEngine().getWorldProvider().getHeartbeat().unsubscribe(WIND);\n plugin.getRootConfig().unsubscribe(TEMPERATURES);\n }", "@Override\n public void resetTour(){\n tour=null;\n this.setChanged();\n this.notifyObservers();\n }", "private Storage_Area unloadAGV (Storage_Area storage) throws Exception\r\n {\r\n return unloadContainer(0,0, storage);\r\n }", "public void unload(BusIfc bus)\n {\n super.unload(bus);\n SellOrderItemCargo cargo = (SellOrderItemCargo) bus.getCargo();\n\n\n cargo.setRegister(processOrderCargo.getRegister());\n\n cargo.setPLUItemID(processOrderCargo.getCurrentExternalOrderItem().getPOSItemId());\n cargo.setPLUItem(processOrderCargo.getCurrentExternalOrderItem().getPLUItem());\n cargo.setTransaction(processOrderCargo.getTransaction());\n cargo.setStoreStatus(processOrderCargo.getStoreStatus());\n cargo.setOperator(processOrderCargo.getOperator());\n cargo.setCustomerInfo(processOrderCargo.getCustomerInfo());\n cargo.setTenderLimits(processOrderCargo.getTenderLimits());\n cargo.setItemList(processOrderCargo.getCurrentExternalOrderItem().getPLUItems());\n cargo.setSalesAssociate(processOrderCargo.getSalesAssociate());\n cargo.setExternalOrder(processOrderCargo.getExternalOrder());\n cargo.setExternalOrderItem(processOrderCargo.getCurrentExternalOrderItem());\n cargo.setPasswordRequired(processOrderCargo.isPasswordRequired());\n }", "public void unsetWholeTbl()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WHOLETBL$2, 0);\n }\n }", "private void btnUnparkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUnparkActionPerformed\n if(CbCarList.getSelectedItem() == null){\n alertWindow.output(\"There are no cars to unpark.\");\n } else { \n Car thisCar = (Car) CbCarList.getSelectedItem();\n unparkCar(thisCar);\n inTerminalGUI.getParkingLotCarList().remove(CbCarList.getSelectedItem());\n CbCarList.removeItem(CbCarList.getSelectedItem());\n }\n }", "public void updateLocalRepository(String urlSimulator) {\n\t\tVehicle vehicle;\n\n\t\t// faire la requete vers FireSimulator pour avoir tous les vehicules\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tResponseEntity<VehicleDto[]> response = restTemplate.exchange(urlSimulator, HttpMethod.GET, null,\n\t\t\t\tVehicleDto[].class);\n\n\t\t// mettre le repository a jour\n\t\tVehicleDto[] vehiclesDto = response.getBody();\n\t\tfor (VehicleDto vehicleDto : vehiclesDto) {\n\n\t\t\tOptional<Vehicle> hOpt = vRepository.findOneByIdDto(vehicleDto.getId());\n\t\t\tif (hOpt.isPresent()) {\n\t\t\t\tvehicle = hOpt.get();\n\t\t\t} else {\n\t\t\t\tvehicle=null;\n\t\t\t}\n\n\t\t\t// si le vehicle existe deja dans le local repository,\n\t\t\t// mettre a jour ses attributs\n\t\t\tif (vehicle != null) {\n\t\t\t\tvehicle = updateAttributes(vehicle, vehicleDto);\n\t\t\t\tvRepository.save(vehicle);\n\t\t\t}\n\t\t\t// sinon on cree un nouveau vehicle dans le local repository\n\t\t\telse {\n\t\t\t\tvehicle = new Vehicle(vehicleDto);\n\t\t\t\tvehicle.setIdDto(vehicleDto.getId());\n\t\t\t\tvRepository.save(vehicle);\n\t\t\t}\n\n\t\t}\n\t\t\n\n\t}", "public void rifleActualWeapon(){\n if(this.actualWeapon != null)\n {\n this.actualWeapon.getPreviousTargets().clear();\n this.actualWeapon.setLastTargetSquare(null);\n this.actualWeapon.setLastDirection(null);\n }\n\n }", "protected abstract void onUnloadedCustom();", "public void removeCar(View v) {\n\t\tQueryListener carRemoved = new QueryListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onError() {\n\t\t\t\tToast.makeText(CarDetailsActivity.this, R.string.updateError,\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDataChange(double data, boolean saved) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDataChange(boolean data, boolean saved) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDataChange(ObjectPrx data, boolean saved) {\n\t\t\t\tif (saved) {\n\t\t\t\t\tUserTypPrx user = _sessionController.getMyUser();\n\t\t\t\t\tList<CarTypPrx> userCars = user.getUserCars();\n\t\t\t\t\tfor (int n = 0; n < userCars.size(); n++)\n\t\t\t\t\t\tif (userCars.get(n).getPlate().equals(mCar.getPlate()))\n\t\t\t\t\t\t\tuserCars.remove(n);\n\t\t\t\t\tuser.setUserCars(userCars);\n\t\t\t\t\tToast.makeText(CarDetailsActivity.this,\n\t\t\t\t\t\t\tR.string.dataUpdated, Toast.LENGTH_SHORT).show();\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDataChange(QueryModel data, boolean saved) {\n\t\t\t}\n\t\t};\n\t\t_sessionController.removeCarPlateEmail(carRemoved, mCar.getPlate(),\n\t\t\t\t_sessionController.getMyLogin());\n\t}", "public void unInit() {\n this.bdv = null;\n this.brz = null;\n }", "private static void resetVehicle() {\n Vehicle vehicle = MavDemo1.getVehicle();\n VehicleControl engineBody = vehicle.getVehicleControl();\n\n float[] angles = new float[3];\n engineBody.getPhysicsRotation().toAngles(angles);\n Vector3f location = engineBody.getPhysicsLocation();\n\n vehicle.removeFromPhysicsSpace();\n vehicle.warpAllBodies(location, angles[1]);\n if (vehicle.contactTest()) {\n Vector3f newLocation = location.add(0f, 1f, 0f);\n for (int iteration = 0; iteration < 9; ++iteration) {\n vehicle.warpAllBodies(newLocation, angles[1]);\n if (vehicle.contactTest()) {\n break;\n }\n Vector3f offset = generator.nextVector3f();\n offset.multLocal(0.1f * (iteration + 1));\n newLocation.addLocal(offset);\n }\n }\n vehicle.addToPhysicsSpace();\n }", "TransportTruck() {\n x = 0;\n y = 0;\n nrDoors = 2;\n enginePower = 1000;\n currentSpeed = 0;\n color = Color.red;\n modelName = \"Transport Truck\";\n\n storage = new StorageUnit(this, 5);\n\n stopEngine();\n }", "public final void removeUnCompletedDoanload() {\n if (mUpdateInfo != null && mUpdateInfo.downId != -1) {\n if (mUpdateInfo.downId != -1) {\n Cursor c = null;\n try {\n c = mJDownloadManager.queryTask(mUpdateInfo.downId);\n if (c != null && c.moveToFirst()) {\n int status = c.getInt(JDownloadTaskColumnIndex.STATUS);\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"check delete task or not status=\" + status);\n }\n if (status != JDownloadManager.STATUS_SUCCESSFUL) {\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"removeDoanload \" + mUpdateInfo.downId);\n }\n mJDownloadManager.remove(mUpdateInfo.downId);\n }\n }\n } finally {\n if (c != null) {\n c.close();\n }\n }\n }\n }\n }", "public void removeDriver(){\n\t\tunitSpaceAvailable += getFirstDriver().getVehicle().getUnitSize();\n\t\tqueue.remove(0);\n\t}", "protected void end() {\n\t\tRobot._driveTrain.setAuton(false);\n\t\tRobot._driveTrain.tankDrive(0, 0);\n\t}", "private void updateVehicles() {\n OffloaderSyncAdapter.syncImmediately(getContext());\n Log.w(LOG_TAG, \"updateVehicles: \");\n }", "public void unload(BusIfc bus)\n {\n // unload financial cargo\n super.unload(bus);\n\n // retrieve cargo from the child\n SaleCargoIfc cargo = (SaleCargoIfc)bus.getCargo();\n cargo.setAccessFunctionID(saleCargo.getAccessFunctionID());\n cargo.setPasswordRequired(saleCargo.isPasswordRequired());\n cargo.setCustomerInfo(saleCargo.getCustomerInfo());\n cargo.setEmployee(saleCargo.getEmployee());\n cargo.setLineItem(saleCargo.getLineItem());\n cargo.setOperator(saleCargo.getOperator());\n cargo.setPLUItem(saleCargo.getPLUItem());\n cargo.setIndices(saleCargo.getIndices());\n cargo.setSalesAssociate(saleCargo.getEmployee());\n cargo.setTransaction(saleCargo.getTransaction());\n cargo.setCanSkipCustomerPrompt(saleCargo.getCanSkipCustomerPrompt());\n\n SaleReturnTransactionIfc[] originalTxns = saleCargo.getOriginalReturnTransactions();\n if (originalTxns != null)\n {\n for (int i = 0; i < originalTxns.length; i++)\n {\n cargo.addOriginalReturnTransaction(originalTxns[i]);\n }\n }\n\n // Record the timeout status in the cargo, so called services will know\n if(cargo instanceof TimedCargoIfc && saleCargo instanceof TimedCargoIfc)\n {\n ((TimedCargoIfc)cargo).setTimeout(((TimedCargoIfc)saleCargo).isTimeout()); \n }\n }", "public void refresh_and_back_to_tourspane() {\n\t\tSceneController.pop();\n\t\tSceneController.pop_title();\n\t\tFadeOutRight anim1 = new FadeOutRight(HomeController.instance.PANE);\n\t\tanim1.play();\n\t\tanim1.setResetOnFinished(true);\n\t\tanim1.setOnFinished(event1 -> {\n\t\t\tSelectedCity_ToursController LookupForm = new SelectedCity_ToursController();\n\n\t\t\ttry {\n\t\t\t\tLookupForm.start(HomeController.instance.PANE);\n\n\t\t\t\tclient.requestHandler.Catalog.getAllTours(GeneralValues.CITY);\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t});\n\t\t\n\t}", "public void unload(BusIfc bus)\n {\n super.unload(bus);\n SerializedItemCargo cargo = (SerializedItemCargo)bus.getCargo();\n RetailTransactionIfc transaction = saleCargo.getTransaction();\n lineItem = saleCargo.getLineItem();\n cargo.setTransaction(transaction);\n cargo.setCustomer(transaction.getCustomer());\n cargo.setRegister(saleCargo.getRegister());\n\n if (!lineItem.isKitHeader())\n {\n cargo.setLineItems(new SaleReturnLineItemIfc[] {lineItem});\n }\n else\n {\n cargo.setLineItems(\n ((KitHeaderLineItemIfc)lineItem).getKitComponentLineItemArray());\n cargo.setKitHeader(true);\n }\n\n //Adding SearchCriteriaIfc to the SerializedItem Cargo\n String geoCode = null;\n if(saleCargo.getStoreStatus() != null &&\n saleCargo.getStoreStatus().getStore() != null)\n {\n geoCode = saleCargo.getStoreStatus().getStore().getGeoCode();\n }\n cargo.setInquiry(LocaleMap.getLocale(LocaleConstantsIfc.USER_INTERFACE), saleCargo.getPLUItemID(), \"\", \"\", geoCode);\n\n\n }", "public void removeVehicle(int id) {\n\t\tSystem.out.println(\"--- Removing vehicle from garage ---\");\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tif (vehicle.getId() == id) {\n\t\t\t\tint idx = vehicleList.indexOf(vehicle);\n\t\t\t\tvehicleList.remove(idx);\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Vehicle id: \" + vehicle.getId() + \" - \" + vehicle.getMake() + \" removed from garage.\");\n\t\t\t}\n\t\t}\n\t}", "public void clearDetourStreet()\r\n {\r\n detour_streets = null;\r\n }", "public void cancelFlight(){\n \n Flight flightObject = FlightRepository.getFlight(this.number);\n if (flightObject == null){\n System.out.println(\"Please select a valid flight number\");\n }\n flightObject.removePassengerSeat(this.PassengerID);\n }", "public long releaseVehicle(Vehicle vehicle) {\n long costToPark = vehicle.calculateCost(HourlyRate);\n vehicle.departSpaces();\n return costToPark;\n }", "public void unload(BusIfc bus)\n {\n CaptureCustomerInfoCargo cargo = (CaptureCustomerInfoCargo) bus.getCargo();\n cargo.setTenderType(TenderLineItemConstantsIfc.TENDER_TYPE_STORE_CREDIT);\n cargo.setCustomer(tenderCargo.getCustomer());\n HashMap tenderAttributes = tenderCargo.getTenderAttributes();\n cargo.setBalanceDue(tenderCargo.parseAmount((String) tenderAttributes.get(TenderConstants.AMOUNT)));\n cargo.setTransaction((TransactionIfc)tenderCargo.getCurrentTransactionADO().toLegacy());\n }", "void restoreAfter() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapAfter);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapAfter);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceAfter);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsAfter);\r\n\t\t}", "Vehicle getVehicle() {\n\t\t\treturn currentVehicle;\n\t\t}", "@Override\n public void BeforeReConnect() {\n nCurrentDownloadNum = 0;\n nCurrentUpload = 0;\n mapDownload.clear();\n }", "private void deconstruct(){\n \t\tfinal Match match = this;\n \t\tarenaInterface.onFinish();\n \t\tinsideArena.clear();\n \t\tinsideWaitRoom.clear();\n \t\tfor (Team t: teams){\n \t\t\tTeamController.removeTeam(t, match);\n \t\t\tfor (ArenaPlayer p: t.getPlayers()){\n \t\t\t\tstopTracking(p);\n \t\t\t}\n \t\t}\n \t\tnotifyListeners(new MatchFinishedEvent(match));\n \t\tteams.clear();\n \t\tarenaListeners.clear();\n \t}", "public void remove (Tunnel tunnel) {\r\n\t\tlog.info(\"Removing tunnel with id \"+ tunnel.getId());\r\n\t\ttunnelList.remove(tunnel);\r\n\t\tthis.save();\r\n\t}", "void removeFlight(Flight flight);", "@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tv.endLoading();\n\t\t\t}", "protected void end() {\n drivetrain.tankDrive(0, 0);\n }", "public void updateNumberOfVehicles() {\r\n numberOfVehicles = getVehicles().size();\r\n }", "public void Exit() {\n\t\tif(currentCar == null)\n\t\t\treturn;\n\n\t\tcurrentCar.setRoad(roads.get(nextDir));\n\t\tRoad nextRoad = roads.get(nextDir);\n\t\tif(currentCar != null){\n\t\t\tnextRoad.Enter(currentCar);\n\t\t\tcurrentCar = null;\n\t\t}\n\n\t\t//currentCar.curVelocity = 0;\n\t}", "@Override\n\tprotected void end() {\n\t\tturnPID.resetPID();\n\t\tRobot.driveTrain.tankDrive(0, 0);\n\t\ttimer.stop();\n\t}", "public void deleteBarrier() {\n if(stater == 3) return;\n stater = 3;\n }", "public void removeCar(Car usedCar) {\n boolean wasRemoved = cars.remove(usedCar);\n // subtracts usedCar value to adjust totalValue if car removed\n if (wasRemoved) {\n totalValue -= usedCar.getPrice();\n }\n else {\n System.out.println(\"Car was not in lot.\");\n }\n }", "public void removeLastEntry(){\r\n\t\tboards.remove(boards.size() -1 );\r\n\t}", "private void unsetLast() { this._last = false; }", "void lostBall()\n {\n currentBall = null;\n }", "@Override\n public void deleteVehicleById(Integer id){\n VehicleDetails domain = throwIfNotFound(repo.findById(id));\n \n repo.delete(domain);\n \n }", "public void deleteTour(Tour t) {\r\n\t\t int i=Arrays.asList(tours).indexOf(t);\r\n\t\t\r\n\t\t tours[i]=null;\r\n\t\t }", "public void end() {\n\t\tdrivetrain.stopDrive();\n\t}", "protected void finishTile(TileInfo inTile)\n {\n final TileInfo tile;\n synchronized (tilesByFetchRequest) {\n tile = tilesByFetchRequest.get(inTile.request);\n if (tile != null) {\n tilesByFetchRequest.remove(tile.request);\n }\n }\n if (tile == null) {\n if (debugMode)\n Log.d(\"RemoteTileFetcher\",\"Dropping fetch: \" + inTile.fetchInfo.urlReq);\n return;\n }\n\n synchronized (loading) {\n loading.remove(tile);\n }\n synchronized (toLoad) {\n toLoad.remove(tile);\n }\n\n updateActiveStats();\n }", "@Override\n protected void end() {\n Robot.driveTrain.tankDrive(0, 0);\n }", "public void resetToLast() {\r\n\t\taktu = last;\r\n\t}", "protected void end() {\n\t\tRobot.drivetrain.tankDrive(0, 0);\n\t}", "public void unsetZyhtVO()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ZYHTVO$0, 0);\n }\n }", "@Override\n public void onFailure(Call<Car> call, Throwable t) {\n data.setValue(null);\n }", "@Override\n public long updateVehcile(com.woc.dto.Vehicle v) {\n return 0;\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n flightViewModel.reset();\n }", "public void resetLastRoom(){this.aLastRooms.clear();}", "void unsetRoadTerrain();", "public void flightDisappear();", "int delTravelById(Long id_travel) throws TravelNotFoundException;", "protected void manageFormVersionPostUnload(FormDescriptor form) {\r\n\t\tString seqid = form.getFormSeqId();\r\n\r\n\t\tlogger.debug(\"Form: \" + seqid + \"|\" + form.getFormSeqId() + \" unloaded\");\r\n\r\n\t\tif (!formV2Dao.isLatestVersionForForm(seqid) ||\r\n\t\t\t\t!FormDescriptor.LOAD_TYPE_NEW_VERSION.equals(form.getLoadType().trim()))\r\n\t\t\treturn; \r\n\r\n\t\tformV2Dao.updateLatestVersionIndicator(seqid, \"No\", DomainObjectTranslator.FORM_LOADER_DB_USER);\r\n\r\n\t\tfloat prevVersion = form.getPreviousLatestVersion();\r\n\t\tlogger.debug(\"Form: \" + seqid + \"|\" + form.getFormSeqId() + \" unloaded. Previous Lastest version was \" + prevVersion);\r\n\t\tif (prevVersion > 0) {\r\n\t\t\tint r = formV2Dao.updateLatestVersionIndicatorByPublicIdAndVersion(Integer.parseInt(form.getPublicId()), \r\n\t\t\t\t\tprevVersion, \"Yes\", DomainObjectTranslator.FORM_LOADER_DB_USER);\r\n\t\t\tform.addMessage(\"After unload, the latest version for the form with pulbic id [\" + form.getPublicId() +\r\n\t\t\t\t\t\"] is reset to \" + prevVersion);\r\n\t\t\tlogger.debug(\"Previous Lastest version was restored: \" + prevVersion + \". Response: \" + r);\r\n\t\t} else {\r\n\t\t\tform.addMessage(\"No valid previous latest version with form. Unable to restore previous latest \" +\r\n\t\t\t\t\t\"version after unloading a new version form\");\r\n\t\t\tlogger.debug(\"No valid previous latest version with form\");\r\n\t\t}\r\n\r\n\t}", "@java.lang.Override\n public google.maps.fleetengine.v1.VehicleLocation getLastLocation() {\n return lastLocation_ == null ? google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() : lastLocation_;\n }", "public void removeVehicleById(String vehicleId){\n\t\tremoveResource(vehiclesByUri,\tbuildVehicleUriFromId(vehicleId));\n\t}", "public void deleteInstance(){\n //cancels the runnable\n shouldCancelRunnable = true;\n //remove the chest from the map to avoid confusion\n this.location.getBlock().setType(Material.AIR);\n //unregister from all events, we're done!\n HandlerList.unregisterAll(this);\n }", "@Override\n protected void onStopLoading() {\n cancelLoad();\n\n // Note that we leave the observer as is. Loaders in a stopped state\n // should still monitor the data source for changes so that the Loader\n // will know to force a new load if it is ever started again.\n }", "public com.datawhisperers.restfulexample.avromodel.VehicleInfoAvro.Builder clearVehicleType() {\n vehicleType = null;\n fieldSetFlags()[0] = false;\n return this;\n }" ]
[ "0.6608817", "0.5859541", "0.5829434", "0.5772216", "0.56538594", "0.5652143", "0.55916774", "0.55889386", "0.5573", "0.55706424", "0.5545625", "0.55127585", "0.5443617", "0.54292244", "0.5379656", "0.53524077", "0.5341001", "0.53219455", "0.5317272", "0.5304912", "0.52698904", "0.5263571", "0.5225434", "0.5214792", "0.5192096", "0.5157982", "0.5152553", "0.5145687", "0.51351094", "0.51290435", "0.5122532", "0.5108765", "0.5104562", "0.50408685", "0.50254375", "0.50245607", "0.5004166", "0.500376", "0.49813324", "0.49807844", "0.49517947", "0.4950134", "0.49356875", "0.49284846", "0.49232376", "0.49230716", "0.4909909", "0.4906249", "0.48892066", "0.48749667", "0.484586", "0.48448414", "0.4841241", "0.4840748", "0.48119888", "0.48040193", "0.48026922", "0.48018616", "0.47849396", "0.47810256", "0.47718126", "0.4766332", "0.4760093", "0.4757936", "0.47537714", "0.4751487", "0.47513002", "0.47494832", "0.4747272", "0.47327217", "0.4726847", "0.47203517", "0.47168088", "0.47064987", "0.47014126", "0.46970502", "0.46897998", "0.46891683", "0.46888813", "0.46805194", "0.46708187", "0.46661225", "0.4653398", "0.46523377", "0.46513328", "0.46448588", "0.4642641", "0.46371153", "0.46352416", "0.46332034", "0.46260408", "0.462575", "0.46202067", "0.46096557", "0.46067294", "0.46061423", "0.46024534", "0.45993328", "0.4591003", "0.45902237" ]
0.7772114
0
Sets the kind of compression and format of compression information of this sound essence data. This property is optional and if the property is not present then the described audio essence is not compressed. Set to null to indicate that the described audio essence is not compressed.
public void setSoundCompression( AUID compression);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAudioCompressionType() {\n return audioCompressionType;\n }", "public void setAudioCompressionType(String audioCompressionType) {\n this.audioCompressionType = audioCompressionType;\n }", "public DatasetCompression compression() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().compression();\n }", "public void setCompression( boolean compress ) {\n this .compression = compress;\n }", "public void setCompressParams(CompressFormat compressFormat, int quality)\n {\n this.mCompressFormat = compressFormat;\n this.mCompressQuality = quality;\n }", "public Builder setCompressionMode(CompressionType compressionType) {\n this.compressionType = compressionType;\n return this;\n }", "public native void setCompression(int value) throws MagickException;", "public void setCompressionQuality(float quality) {\n if (quality < 0.0F || quality > 1.0F) {\n throw new IllegalArgumentException(\"Quality out-of-bounds!\");\n }\n this.compressionQuality = 256 - (quality * 256);\n }", "public AUID getSoundCompression()\r\n\t\tthrows PropertyNotPresentException;", "public WriterOptions compress(CompressionKind value) {\n compressValue = value;\n return this;\n }", "public void setImageCompression(byte comp) {\n this.compression = comp;\n }", "public Builder setCompressFormat(Bitmap.CompressFormat format) {\n this.compressFormat = format;\n return this;\n }", "public String getVideoCompressionType() {\n return videoCompressionType;\n }", "protected void setEncoding() {\n\t\tthis.defaultContentType = getProperty(CONTENT_TYPE_KEY, DEFAULT_CONTENT_TYPE);\n\n\t\tString encoding = getProperty(RuntimeConstants.OUTPUT_ENCODING, DEFAULT_OUTPUT_ENCODING);\n\n\t\t// For non Latin-1 encodings, ensure that the charset is\n\t\t// included in the Content-Type header.\n\t\tif (!DEFAULT_OUTPUT_ENCODING.equalsIgnoreCase(encoding)) {\n\t\t\tint index = defaultContentType.lastIndexOf(\"charset\");\n\t\t\tif (index < 0) {\n\t\t\t\t// the charset specifier is not yet present in header.\n\t\t\t\t// append character encoding to default content-type\n\t\t\t\tthis.defaultContentType += \"; charset=\" + encoding;\n\t\t\t} else {\n\t\t\t\t// The user may have configuration issues.\n\t\t\t\tlog.info(\"Charset was already specified in the Content-Type property.Output encoding property will be ignored.\");\n\t\t\t}\n\t\t}\n\n\t\tlog.debug(\"Default Content-Type is: {}\", defaultContentType);\n\t}", "public void setContentCompression(String method) {\n this.contentCompression = method;\n }", "public void setInputCompressionType(String inputCompressionType) {\n this.inputCompressionType = inputCompressionType;\n }", "public String getInputCompressionType() {\n return this.inputCompressionType;\n }", "public AzureDataLakeStoreDataset withCompression(DatasetCompression compression) {\n if (this.innerTypeProperties() == null) {\n this.innerTypeProperties = new AzureDataLakeStoreDatasetTypeProperties();\n }\n this.innerTypeProperties().withCompression(compression);\n return this;\n }", "public void setKind(String _kind) { kind = _kind; }", "public void setCompressPut(boolean value) {\r\n this.compressPut = value;\r\n }", "public void setCompress(boolean compress) {\n\t\tthis.compress = compress;\n\t}", "public void setQuality(float quality);", "Builder addEncoding(MediaObject value);", "public void compress() {\r\n fCharBuffer.compress();\r\n fStyleBuffer.compress();\r\n fParagraphBuffer.compress();\r\n }", "@Deprecated\n/* */ public void addCompression() {\n/* 162 */ List<COSName> filters = getFilters();\n/* 163 */ if (filters == null)\n/* */ {\n/* 165 */ if (this.stream.getLength() > 0L) {\n/* */ \n/* 167 */ OutputStream out = null;\n/* */ \n/* */ try {\n/* 170 */ byte[] bytes = IOUtils.toByteArray((InputStream)this.stream.createInputStream());\n/* 171 */ out = this.stream.createOutputStream((COSBase)COSName.FLATE_DECODE);\n/* 172 */ out.write(bytes);\n/* */ }\n/* 174 */ catch (IOException e) {\n/* */ \n/* */ \n/* 177 */ throw new RuntimeException(e);\n/* */ }\n/* */ finally {\n/* */ \n/* 181 */ IOUtils.closeQuietly(out);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 186 */ filters = new ArrayList<COSName>();\n/* 187 */ filters.add(COSName.FLATE_DECODE);\n/* 188 */ setFilters(filters);\n/* */ } \n/* */ }\n/* */ }", "public void setAudioEncoding(String s) {\n audioEncoding = s;\n }", "public void setVideoCompressionType(String videoCompressionType) {\n this.videoCompressionType = videoCompressionType;\n }", "public void testEncodingAndType() throws Exception {\n \t// check default\n \tSampleResult res = new SampleResult();\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"DataType should be blank\",\"\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n \t\n \t// check null changes nothing\n \tres.setEncodingAndType(null);\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"DataType should be blank\",\"\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n\n \t// check no charset\n \tres.setEncodingAndType(\"text/html\");\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"text\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n\n \t// Check unquoted charset\n \tres.setEncodingAndType(\"text/html; charset=aBcd\");\n \tassertEquals(\"aBcd\",res.getDataEncodingWithDefault());\n \tassertEquals(\"aBcd\",res.getDataEncodingNoDefault());\n \tassertEquals(\"aBcd\",res.getDataEncoding());\n \tassertEquals(\"text\",res.getDataType());\n\n \t// Check quoted charset\n \tres.setEncodingAndType(\"text/html; charset=\\\"aBCd\\\"\");\n \tassertEquals(\"aBCd\",res.getDataEncodingWithDefault());\n \tassertEquals(\"aBCd\",res.getDataEncodingNoDefault());\n \tassertEquals(\"aBCd\",res.getDataEncoding());\n \tassertEquals(\"text\",res.getDataType()); \t\n }", "@Override\r\n\tpublic void setAudioFormat(AudioFormat format) {\r\n\r\n\t}", "public String getMediaFormatEncoding() {\r\n\t\treturn this.getMedia() + \" - \" + this.getFormat() + \" - \" + this.getEncoding();\r\n\r\n\t}", "public Bitmap.CompressFormat getFormat() {\n return fullPhoto.getFormat();\n }", "public boolean useCompression()\n {\n return compressor != null;\n }", "public void setCodec(Codec codec);", "public void setFormat(Connector connector, Format format);", "public void setOutputFormat(OutputFormat format);", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public BitmapEncoder() {\n this((Bitmap.CompressFormat) null, 90);\n }", "private void setScriptFormatCorrectly()\n\t{\n\t\tint scriptFormatNeeded = 0;\n\t\tif(isMime(m_databaseFile, GZIP_MAGIC_NUMBERS))\n\t\t{\n\t\t\tm_logger.debug(\"Database is gzipped\");\n\t\t\tscriptFormatNeeded = 3;\n\t\t}\n\t\t\n\t\tboolean propsExists = Files.exists(m_databasePropertiesFile);\n\t\t\n\t\tProperties properties = new Properties();\n\t\ttry {\n\t\t properties.load(new FileInputStream(m_databasePropertiesFile.toFile()));\n\t\t} catch (IOException e) {\n\t\t}\n\t\t\n\t\tproperties.setProperty(\"hsqldb.script_format\", \"\" + scriptFormatNeeded);\n\t\tif(! propsExists) // write other info\n\t\t{\n\t\t\tproperties.setProperty(\"version\",\"2.2.8\");\n\t\t\tproperties.setProperty(\"modified\", \"yes\");\n\t\t}\n\t\t\n\t\t// Write properties file.\n\t\ttry {\n\t\t properties.store(new FileOutputStream(m_databasePropertiesFile.toFile()), null);\n\t\t} catch (IOException e) {\n\t\t}\n\t\t\n\t}", "private void initAudioFormat() {\n\t\tfloat rate = 44100.0f;\n\t\t//float rate = 8000.0f;\n\t\t//int sampleSize = 8;\n\t\tint sampleSize = 16;\n\t\tint channels = 1;\n\t\tboolean bigEndian = true;\n\n\t\taudioFormat = new AudioFormat(rate, sampleSize, channels, bigEndian, bigEndian);\n\t\t// audioFormat = new AudioFormat(encoding, rate, sampleSize, channels, (sampleSize / 8)\n\t\t// * channels, rate, bigEndian);\n\n\t}", "public void setEncoding(String e) {\n\t\tthis.encoding = e;\n\t}", "public boolean getCompress() {\n\t\treturn this.compress;\n\t}", "public Builder setCompressed(boolean value) {\n \n compressed_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void Compress() {\n\t\t\n\t}", "public void setKind(String kind) {\n this.kind = kind;\n }", "public void setKind(String kind) {\n this.kind = kind;\n }", "public void setPackingType(String value) {\n setAttributeInternal(PACKINGTYPE, value);\n }", "private void setCorrectCodec() {\n try {\n getDataNetworkHandler().setCorrectCodec();\n } catch (FtpNoConnectionException e) {\n }\n }", "public void setQuality(Integer quality) {\n this.quality = quality;\n }", "public String getCompressorName()\n {\n return useCompression() ? compressor.getClass().getSimpleName() : \"none\";\n }", "public boolean isCompressionEnabled() {\r\n return compressionEnabled;\r\n }", "private void encodeAbstractFloatDataType(Encoder encoder, DataType type) throws IOException {\n\t\tencoder.openElement(ELEM_TYPE);\n\t\tencodeNameIdAttributes(encoder, type);\n\t\tencoder.writeString(ATTRIB_METATYPE, \"float\");\n\t\tencoder.writeSignedInteger(ATTRIB_SIZE, type.getLength());\n\t\tencoder.closeElement(ELEM_TYPE);\n\t}", "Builder addEncodings(MediaObject value);", "void setChunkType(String aChunkType);", "public Builder setCompressionCodec(String compressionCodec) {\n this.compressionCodec = compressionCodec;\n return this;\n }", "public AudioFormat getFormat() {\n return format;\n }", "public interface CompressionStrategy {\n\n /**\n * The type of compression performed.\n */\n String getType();\n\n /**\n * Uncompresses the data. The array received should not be modified, but it\n * may be returned unchanged.\n * \n * @param data compressed data.\n * @return uncompressed data.\n * @throws IOException if there is an issue during the operation.\n */\n byte[] inflate(byte[] data) throws IOException;\n\n /**\n * Compresses the data. The array received should not be modified, but it\n * may be returned unchanged.\n * \n * @param data uncompressed data.\n * @return compressed data.\n * @throws IOException if there is an issue during the operation.\n */\n byte[] deflate(byte[] data) throws IOException;\n}", "public void writeMetaCue();", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)\n public MediaFormat getEncoderFormat() {\n return super.getEncoderVideoFormat(MIME_TYPE, mWidth, mHeight, mBitRate, FRAME_RATE, IFRAME_INTERVAL);\n }", "Builder addEncoding(MediaObject.Builder value);", "public void setContent (ByteArray data ,boolean doCompress =true ){\r\n\t\t\tif(data != null && data.length > 0) {\r\n\t\t\t\tdata.position = 0;\r\n\t\t\t\tdata.readBytes(_content, 0, data.length());\r\n\t\t\t\t_crc32 = ChecksumUtil.CRC32(_content);\r\n\t\t\t\t_hasAdler32 = false;\r\n\t\t\t} else {\r\n\t\t\t\t_content.length = 0;\r\n\t\t\t\t_content.position = 0;\r\n\t\t\t\tisCompressed = false;\r\n\t\t\t}\r\n\t\t\tif(doCompress) {\r\n\t\t\t\tcompress();\r\n\t\t\t} else {\r\n\t\t\t\t_sizeUncompressed = _sizeCompressed = _content.length;\r\n\t\t\t}\r\n\t\t}", "public boolean IsCompressed() {\n return false;\n }", "public void addDataformatToSendToHTTP(FileType type) {\r\n\t\tList<String> dataformatsToSystem;\r\n\t\tif(this.settings.containsKey(\"dataformatsToHTTP\")) {\r\n\t\t\tdataformatsToSystem = new ArrayList<String>(Arrays.asList(String.valueOf(this.settings.get(\"dataformatsToHTTP\")).split(\",\")));\r\n\t\t\tif(!dataformatsToSystem.contains(type.toString())) {\r\n\t\t\t\tdataformatsToSystem.add(type.toString());\r\n\t\t\t}\r\n\t\t\tthis.settings.setProperty(\"dataformatsToHTTP\", String.join(\",\", dataformatsToSystem));\r\n\t\t} else {\r\n\t\t\tdataformatsToSystem = new ArrayList<>();\r\n\t\t\tdataformatsToSystem.add(type.toString());\r\n\t\t\tthis.settings.setProperty(\"dataformatsToHTTP\", String.join(\",\", dataformatsToSystem));\r\n\t\t}\t\t\r\n\t\tthis.saveChanges();\r\n\t}", "@Override\n public void setContentType(String arg0) {\n\n }", "public void setType(ChunkType type);", "public void setQuality(int value) {\n this.quality = value;\n }", "public String getAudioEncoding() {\n return audioEncoding;\n }", "public static boolean doCompress() {\n return Boolean.parseBoolean(properties.getProperty(\"compress\"));\n }", "public DatasetStorageFormat format() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().format();\n }", "public void setFileEncoding(String s) {\n if (s == null) fileEncoding = \"\";\n else fileEncoding = s;\n }", "public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }", "public Builder compressionEnabled(boolean compressionEnabled) {\n this.compressionEnabled = compressionEnabled;\n return this;\n }", "private void encodeOpaqueDataType(Encoder encoder, DataType type, int size) throws IOException {\n\t\tencoder.openElement(ELEM_TYPE);\n\t\tint sz = type.getLength();\n\t\tboolean isVarLength = false;\n\t\tif (sz <= 0) {\n\t\t\tsz = size;\n\t\t\tisVarLength = true;\n\t\t}\n\t\tencodeNameIdAttributes(encoder, type);\n\t\tif (sz < 16) {\n\t\t\tencoder.writeString(ATTRIB_METATYPE, \"unknown\");\n\t\t}\n\t\telse {\n\t\t\t// Build an \"opaque\" structure with no fields\n\t\t\tencoder.writeString(ATTRIB_METATYPE, \"struct\");\n\t\t}\n\t\tencoder.writeSignedInteger(ATTRIB_SIZE, sz);\n\t\tif (isVarLength) {\n\t\t\tencoder.writeBool(ATTRIB_VARLENGTH, true);\n\t\t}\n\t\tencoder.closeElement(ELEM_TYPE);\n\t}", "public void setMime_type(String value)\r\n {\r\n getSemanticObject().setProperty(data_mime_type, value);\r\n }", "public void testSetEncoding_Null() throws Exception {\n StreamHandler h = new StreamHandler();\n h.setEncoding(null);\n assertNull(h.getEncoding());\n }", "public void setType(short type){\n\t\tthis.type = type;\n\t}", "public void setContentType(Header contentType) {\n/* 114 */ this.contentType = contentType;\n/* */ }", "public void setEncodingAlpha(boolean encodeAlpha);", "public void setContentCoding(DsByteString aCoding) {\n if (aCoding != null && aCoding.equals(\"*\")) {\n m_bWildCard = true;\n }\n m_strCoding = aCoding;\n }", "public String kind() { return kind; }", "public void setContentType(String contentType);", "private void setMetadata(org.chromium.components.paint_preview.common.proto.PaintPreview.MetadataProto value) {\n value.getClass();\n metadata_ = value;\n bitField0_ |= 0x00000002;\n }", "public Builder setSampleRateHertz(int value) {\n\n sampleRateHertz_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }", "public Builder setQualityBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "public Builder setQuality(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "public void setContentEncoding(Header contentEncoding) {\n/* 143 */ this.contentEncoding = contentEncoding;\n/* */ }", "public boolean getCompressed() {\n return compressed_;\n }", "public void set_standard_format () {\n\t\tf_friendly_format = false;\n\n\t\tmainshock_time = 0L;\n\t\tmainshock_mag = 0.0;\n\t\tmainshock_lat = 0.0;\n\t\tmainshock_lon = 0.0;\n\t\tmainshock_depth = 0.0;\n\n\t\treturn;\n\t}", "@Override\n public String toString() {\n String str = \"Unknown file format\";\n //$$fb2002-11-01: fix for 4672864: AudioFileFormat.toString() throws unexpected NullPointerException\n if (getType() != null) {\n str = getType() + \" (.\" + getType().getExtension() + \") file\";\n }\n if (getByteLength() != AudioSystem.NOT_SPECIFIED) {\n str += \", byte length: \" + getByteLength();\n }\n str += \", data format: \" + getFormat();\n if (getFrameLength() != AudioSystem.NOT_SPECIFIED) {\n str += \", frame length: \" + getFrameLength();\n }\n return str;\n }", "default boolean isCompressed() {\n return COMPRESSED.isSet(getFlags());\n }", "public void setContentType(ContentType type, String charset)\n\t{\n\t\tif (charset == null)\n\t\t\tsetContentType(type);\n\t\telse\n\t\t\tsetHeader(CONTENT_TYPE, type.toString() + \"; \" + charset);\n\t}", "public void set_dataType(short value) {\n setUIntBEElement(offsetBits_dataType(), 8, value);\n }", "public void setContentEncoding(String charsetName) {\n setProperty(CONTENT_ENCODING, charsetName);\n }", "public void setContentEncoding(String charsetName) {\n setProperty(CONTENT_ENCODING, charsetName);\n }", "public void setSpecType(Short specType) {\n this.specType = specType;\n }", "public void setCodec(Codec codec) {\n this.codec = codec;\n }", "public void mo3106a(boolean z) {\n this.f2613i = this.f2612h.name();\n int i = this.f2605a;\n if (i != -1) {\n if (i != 1) {\n String str = \"UTF-16\";\n if (i == 2) {\n this.f2607c = ((String) this.f2606b).getBytes(Charset.forName(str));\n return;\n } else if (i == 3) {\n this.f2607c = (byte[]) this.f2606b;\n return;\n } else if (i == 4) {\n this.f2607c = this.f2606b.toString().getBytes(Charset.forName(str));\n return;\n } else if (i != 5) {\n return;\n }\n }\n if (z) {\n Bitmap bitmap = (Bitmap) this.f2606b;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(CompressFormat.PNG, 90, byteArrayOutputStream);\n this.f2607c = byteArrayOutputStream.toByteArray();\n return;\n }\n this.f2608d = (Parcelable) this.f2606b;\n } else if (!z) {\n this.f2608d = (Parcelable) this.f2606b;\n } else {\n throw new IllegalArgumentException(\"Can't serialize Icon created with IconCompat#createFromIcon\");\n }\n }", "public void setContentEncoding(String ceString) {\n/* */ BasicHeader basicHeader;\n/* 155 */ Header h = null;\n/* 156 */ if (ceString != null) {\n/* 157 */ basicHeader = new BasicHeader(\"Content-Encoding\", ceString);\n/* */ }\n/* 159 */ setContentEncoding((Header)basicHeader);\n/* */ }", "private void getSourceFormat() {\n\t\tAudioInputStream ais = null;\n\t\tformat = null;\n\t\ttry {\n\t\t\tais = source.getAudioInputStream();\n\t\t\tformat = ais.getFormat();\n\t\t} catch (AudioSourceException e) {\n\t\t\t// a plugin chain could exist without a functional audio source, so\n\t\t\t// we\n\t\t\t// ctach this exception and set the audio format unknown\n\t\t} finally {\n\t\t\tif (ais != null)\n\t\t\t\ttry {\n\t\t\t\t\tais.close();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// O.K. No chance.\n\t\t\t\t}\n\t\t}\n\t}", "public void setMediaType(java.lang.String mediaType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MEDIATYPE$18);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MEDIATYPE$18);\n }\n target.setStringValue(mediaType);\n }\n }" ]
[ "0.6164145", "0.60683304", "0.558304", "0.5446195", "0.54136765", "0.5362033", "0.53436744", "0.53376055", "0.52023226", "0.5135082", "0.5065239", "0.50600886", "0.50415456", "0.50402963", "0.4959288", "0.4897338", "0.4875385", "0.4864266", "0.48640794", "0.47647348", "0.47452357", "0.47367007", "0.4686334", "0.46806636", "0.46744326", "0.4645768", "0.4617856", "0.46057737", "0.45946395", "0.4540353", "0.45316714", "0.45250827", "0.44734257", "0.4470465", "0.44686672", "0.44546694", "0.44546694", "0.44534573", "0.4447237", "0.44244292", "0.44183344", "0.44154546", "0.44120833", "0.44025463", "0.43930274", "0.43930274", "0.43926287", "0.43624628", "0.43605286", "0.43501404", "0.43256935", "0.4317784", "0.4315917", "0.4291577", "0.4283533", "0.42635903", "0.42552307", "0.4254133", "0.42526513", "0.4240493", "0.4239595", "0.42346412", "0.423399", "0.4221962", "0.42153466", "0.42118266", "0.42111164", "0.42066634", "0.41982555", "0.41866156", "0.41779843", "0.41776523", "0.41752908", "0.41700768", "0.41629907", "0.41618007", "0.41502556", "0.4149148", "0.4143659", "0.41294953", "0.41280356", "0.41264683", "0.41144168", "0.41139564", "0.41104692", "0.41091552", "0.4104849", "0.40953657", "0.40908054", "0.40888205", "0.4086049", "0.40857956", "0.40811458", "0.40811458", "0.40794575", "0.40486297", "0.4038544", "0.4035593", "0.40341735", "0.40238816" ]
0.62120634
0
Returns he kind of compression and format of compression information of this sound essence data. This property is optional.
public AUID getSoundCompression() throws PropertyNotPresentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAudioCompressionType() {\n return audioCompressionType;\n }", "public String getVideoCompressionType() {\n return videoCompressionType;\n }", "public String getInputCompressionType() {\n return this.inputCompressionType;\n }", "public DatasetCompression compression() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().compression();\n }", "public CompressionInfo getCompressionInfo() {\n\t\treturn new CompressionInfo(bytesRead, blocksRead, superblocksRead, compressedBytes,\n\t\t\t\t compressedBlocks, actualBytes, null);\n\t}", "public native int getCompression() throws MagickException;", "public Bitmap.CompressFormat getFormat() {\n return fullPhoto.getFormat();\n }", "public String getMediaFormatEncoding() {\r\n\t\treturn this.getMedia() + \" - \" + this.getFormat() + \" - \" + this.getEncoding();\r\n\r\n\t}", "public String getCompressionInfo() {\r\n String msg = null;\r\n if (!compressionInfoCleared) {\r\n int bytesInSession = bop.getCount() - countAtSessionStart;\r\n if(bytesInSession != bytesWrittenSinceSessionStart) {\r\n msg = \"Compressed data from \" + bytesWrittenSinceSessionStart + \" to \" + bytesInSession + \" bytes\";\r\n }\r\n else if(abandonedGzipLen > 0) {\r\n msg = \"Abandoned GZIP because \" + bytesWrittenAtLastAbandonCheck + \" bytes compressed only to \" + abandonedGzipLen + \" (\" + ((int) Math.round(100 * (double) abandonedGzipLen / bytesWrittenAtLastAbandonCheck)) + \"%). Final Data Length = \" + bytesWrittenSinceSessionStart + \"(=\" + bytesInSession + ')';\r\n }\r\n }\r\n return msg;\r\n }", "public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }", "public boolean getCompress() {\n\t\treturn this.compress;\n\t}", "public String getCompressorName()\n {\n return useCompression() ? compressor.getClass().getSimpleName() : \"none\";\n }", "public void setAudioCompressionType(String audioCompressionType) {\n this.audioCompressionType = audioCompressionType;\n }", "@Override\n public String toString() {\n String str = \"Unknown file format\";\n //$$fb2002-11-01: fix for 4672864: AudioFileFormat.toString() throws unexpected NullPointerException\n if (getType() != null) {\n str = getType() + \" (.\" + getType().getExtension() + \") file\";\n }\n if (getByteLength() != AudioSystem.NOT_SPECIFIED) {\n str += \", byte length: \" + getByteLength();\n }\n str += \", data format: \" + getFormat();\n if (getFrameLength() != AudioSystem.NOT_SPECIFIED) {\n str += \", frame length: \" + getFrameLength();\n }\n return str;\n }", "public void setSoundCompression(\r\n\t\t\tAUID compression);", "public String kind() { return kind; }", "java.lang.String getQuality();", "public String getName()\n {\n return codecInfo.getName();\n }", "public boolean getCompressed() {\n return compressed_;\n }", "public int getCompressionThreshold() {\r\n return compressionThreshold;\r\n }", "default boolean isCompressed() {\n return COMPRESSED.isSet(getFlags());\n }", "String kind();", "String kind();", "public boolean isCompressionEnabled() {\r\n return compressionEnabled;\r\n }", "String getCodec() {\n return codec;\n }", "Object getFormat();", "public boolean IsCompressed() {\n return false;\n }", "com.google.protobuf.ByteString\n getFormatBytes();", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)\n public MediaFormat getEncoderFormat() {\n return super.getEncoderVideoFormat(MIME_TYPE, mWidth, mHeight, mBitRate, FRAME_RATE, IFRAME_INTERVAL);\n }", "public boolean isCompressed() {\n return pub.isCompressed();\n }", "public boolean getCompressed() {\n return compressed_;\n }", "public String getPackingType() {\n return (String)getAttributeInternal(PACKINGTYPE);\n }", "public AudioFormat getFormat() {\n return format;\n }", "com.google.protobuf.ByteString\n getQualityBytes();", "public boolean isCompressed() {\n byte[] data = packet.getData();\n int magic = ((int)(data[1] & 0xff) << 8) | (int)(data[0] & 0xff);\n return magic == GZIPInputStream.GZIP_MAGIC;\n }", "public Codec getCodec();", "String productKind();", "public boolean useCompression()\n {\n return compressor != null;\n }", "private byte[] getExternalAlgorithmParameter() {\n if (encoding == COMPID_JPEG && compression != 0) {\n final byte[] extAlgData = new byte[] {\n (byte)0x9F, // ID\n 0x00, // Length\n 0x10, // ALGTYPE = Compression Algorithm\n 0x00, // Reserved\n COMPID_JPEG, // COMPRID = JPEG\n 0x00, // Reserved\n 0x00, // Reserved\n 0x00, // Reserved\n compression, // MARKER\n 0x00, // Reserved\n 0x00, // Reserved\n 0x00, // Reserved\n };\n extAlgData[1] = (byte)(extAlgData.length - 2);\n return extAlgData;\n }\n return new byte[0];\n }", "@Override\n @XmlElement(name = \"fileDecompressionTechnique\")\n public synchronized InternationalString getFileDecompressionTechnique() {\n return fileDecompressionTechnique;\n }", "FileFormat getFormat();", "public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}", "public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }", "public String getAudioEncoding() {\n return audioEncoding;\n }", "String getContentFormat();", "ICpPackInfo getPackInfo();", "String getChunkType();", "public String getFileTypeDescription() {\n return \"GrADS Binary Gridded Data\";\n }", "public DsByteString getContentCoding() {\n return m_strCoding;\n }", "public interface AudioHeader\n{\n /**\n * @return the audio file type\n */\n public abstract String getEncodingType();\n\n /**\n * @return the ByteRate of the Audio, this is the total average amount of bytes of data sampled per second\n */\n public Integer getByteRate();\n\n\n\n /**\n * @return the BitRate of the Audio, this is the amount of kilobits of data sampled per second\n */\n public String getBitRate();\n\n /**\n * @return bitRate as a number, this is the amount of kilobits of data sampled per second\n */\n public long getBitRateAsNumber();\n\n\n /**\n *\n * @return length of the audio data in bytes, exactly what this means depends on the audio format\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataLength();\n\n\n /**\n *\n * @return the location in the file where the audio samples start\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataStartPosition();\n\n\n /**\n *\n * @return the location in the file where the audio samples end\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataEndPosition();\n\n\n /**\n * @return the Sampling rate, the number of samples taken per second\n */\n public String getSampleRate();\n\n /**\n * @return he Sampling rate, the number of samples taken per second\n */\n public int getSampleRateAsNumber();\n\n /**\n * @return the format\n */\n public String getFormat();\n\n /**\n * @return the number of channels (i.e 1 = Mono, 2 = Stereo)\n */\n public String getChannels();\n\n /**\n * @return if the sampling bitRate is variable or constant\n */\n public boolean isVariableBitRate();\n\n /**\n * @return track length in seconds\n */\n public int getTrackLength();\n\n /**\n *\n * @return track length as float\n */\n public double getPreciseTrackLength();\n\n /**\n * @return the number of bits in each sample\n */\n public int getBitsPerSample();\n\n /**\n *\n * @return if the audio codec is lossless or lossy\n */\n public boolean isLossless();\n\n /**\n *\n * @return the total number of samples, this can usually be used in conjunction with the\n * sample rate to determine the track duration\n */\n public Long getNoOfSamples();\n}", "public String getInformation() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tencodingTable.forEach((c, s) -> {\n\t\t\tsb.append(c);\n\t\t\tsb.append(\" -> \");\n\t\t\tsb.append(s);\n\t\t\tsb.append('\\n');\n\t\t});\n\n\t\treturn sb.toString();\n\t}", "public ICompressor getCompressor()\n {\n return compressor;\n }", "public static String getSupportedformats() {\r\n\t\tString description = \"\";\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tdescription += ff.description +\"\\n\";\r\n\t\t\t}\r\n\t\treturn description;\r\n\t}", "public String getQuality()\n\t{\n\t\treturn quality.getText();\n\t}", "public String getName() {\n return CODEC_NAME;\n }", "public String getAudioCodec() {\n return audioCodec;\n }", "public AudioFormat getFormat() throws AudioSourceException {\n if (format==null){\n AudioInputStream dummyStream=getAudioInputStream();\n try {\n dummyStream.close();\n } catch (IOException e) {\n throw new AudioSourceException(e);\n }\n }\n \n\t\treturn format;\n\t}", "protected String getDataFormat() {\n return this.dataFormat;\n }", "public SurfaceFormat getFormat()\n\t{\n\t\treturn this._format;\n\t}", "public int getSoundType() \n\t{\n\treturn fType;\n\t}", "public boolean isCompressed() {\r\n return gzipOp != null;\r\n }", "public final AdFormat getFormat() {\n\t\treturn impl.getFormat();\n }", "public static PageCompression detectCompressionMethod( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Encoding\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Encoding\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString val = headers[i].getValue().trim();\n\t\t\t\tSystem.out.println( val );\n\t\t\t\tif ( val.equalsIgnoreCase( \"gzip\" ) ) {\n\t\t\t\t\treturn PageCompression.GZIP;\n\t\t\t\t} else if ( val.equalsIgnoreCase( \"deflate\" ) ) {\n\t\t\t\t\treturn PageCompression.DEFLATE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn PageCompression.NOT_COMPRESSED;\n\t}", "public abstract String getImageFormat();", "public String returnKind(){ return kind; }", "private AudioFormat getAudioFormat() {\n float sampleRate = 16000.0F;\n int sampleSizeInBits = 16;\n int channels = 1;\n boolean signed = true;\n boolean bigEndian = false;\n return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian);\n }", "public WavFormatChunk getFormatChunk() {\n\t\treturn lastFormatChunk;\n\t}", "public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }", "@Override\n\tpublic String toString() {\n\t\tString ans =\n\t\t\t\t\" EWAHCompressedBitmap, size in bits = \" + this.sizeinbits\n\t\t\t\t\t\t+ \" size in words = \" + this.actualsizeinwords + \"\\n\";\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tans += localrlw.getRunningLength() + \" 1x11\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans += localrlw.getRunningLength() + \" 0x00\\n\";\n\t\t\t}\n\t\t\tans += localrlw.getNumberOfLiteralWords() + \" dirties\\n\";\n\t\t}\n\t\treturn ans;\n\t}", "public\tint\tgetTypeFormatId()\t{ return StoredFormatIds.BITIMPL_V01_ID; }", "String getContentEncoding();", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "protected ByteOrder getByteOrder() {\n return mTiffStream.getByteOrder();\n }", "public String getHistologicalQuality()\r\n \t{\r\n \t\treturn histologicalQuality;\r\n \t}", "@Override\r\n\tpublic String getShowDescribing() {\n\t\treturn \"所属乡镇:\"+ getSsxz().getName();\r\n\t}", "static private ImageMetaInfo getImageMetaInfo(File file) {\n ImageMetaInfo imageMetaInfo = null;\n ImageParser imageParser = null;\n BufferedImage bufferedImage = null;\n ImageInfo imageInfo = null;\n ImageInfo.CompressionAlgorithm compressionAlgorithm = null;\n String compression = \"\";\n try {\n log(\"read file: \" + file.getName());\n\n String extension = ExtFilter.getExtension(file);\n // unambiguous definition of extension\n if (extension.equals(\"jpg\"))\n extension = \"jpeg\";\n else if (extension.equals(\"tif\"))\n extension = \"tiff\";\n\n imageParser = imageParserMap.get(extension);\n bufferedImage = imageParser.getBufferedImage(file, null);\n //for know compression algorithm name\n imageInfo = imageParser.getImageInfo(file, null);\n compressionAlgorithm = imageInfo.getCompressionAlgorithm();\n compression = compressionAlgorithm.toString();\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ImageReadException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (bufferedImage == null){\n try {\n bufferedImage = ImageIO.read(file);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n try {\n int height = bufferedImage.getHeight();\n int width = bufferedImage.getWidth();\n ColorModel colorModel = bufferedImage.getColorModel();\n int bpi = colorModel.getPixelSize();\n //size in kb\n long size = (long) (file.length() / 1024.0);\n imageMetaInfo = new ImageMetaInfo(file.getName(), size, width, height, bpi, compression);\n } catch (Exception e){\n e.printStackTrace();\n }\n\n\n return imageMetaInfo;\n }", "public String getResponseCharset()\r\n {\r\n Header header = httpMethod.getResponseHeader( \"Content-Type\" );\r\n if( header != null )\r\n {\r\n for( HeaderElement headerElement : header.getElements() )\r\n {\r\n NameValuePair parameter = headerElement.getParameterByName( \"charset\" );\r\n if( parameter != null )\r\n return parameter.getValue();\r\n }\r\n }\r\n \r\n Header contentEncodingHeader = httpMethod.getResponseHeader( \"Content-Encoding\" );\r\n if( contentEncodingHeader != null )\r\n {\r\n try\r\n {\r\n String value = contentEncodingHeader.getValue();\r\n if( CompressionSupport.getAvailableAlgorithm( value ) == null )\r\n {\r\n new String( \"\" ).getBytes( value );\r\n return value;\r\n }\r\n }\r\n catch( Exception e )\r\n {\r\n }\r\n }\r\n \r\n return null;\r\n }", "String getOutputFormat();", "public int get_infos_type() {\n return (int)getUIntBEElement(offsetBits_infos_type(), 16);\n }", "public String getFormatCode() {\n if (format == null) return \"MP4\";\n switch(format) {\n case \"Windows Media\": return \"WMV\";\n case \"Flash Video\": return \"FLV\";\n case \"MPEG-4\": return \"MP4\";\n case \"Matroska\": return \"MKV\";\n case \"AVI\": return \"AVI\";\n default: return \"MP4\";\n }\n }", "public String getComplementary_info() {\n return complementary_info;\n }", "@XmlElement(name = \"distributionFormat\")\n private Collection<Format> getDistributionFormat() {\n return FilterByVersion.CURRENT_METADATA.accept() ? getDistributionFormats() : null;\n }", "public int getFormat()\n {\n return format;\n }", "public int getAudioJittcomp();", "public java.lang.String getQuality() {\n java.lang.Object ref = quality_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n quality_ = s;\n }\n return s;\n }\n }", "public String getKind() {\n return kind;\n }", "public String getFormat() throws Exception {\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@metaFormat\").getText();\n\t}", "public short get_dataType() {\n return (short)getUIntBEElement(offsetBits_dataType(), 8);\n }", "public Header getContentEncoding() {\n/* 89 */ return this.contentEncoding;\n/* */ }", "public String getData_type_desc() {\n return data_type_desc;\n }", "Codec getCurrentCodec();", "public AVT getFormat()\n {\n return m_format_avt;\n }", "String getEncoding();", "public static boolean doCompress() {\n return Boolean.parseBoolean(properties.getProperty(\"compress\"));\n }", "ImageFormat getFormat();", "public java.lang.String getQuality() {\n java.lang.Object ref = quality_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n quality_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public ImageFormatProperties getFormat() {\n return this.format;\n }", "public String getCodingMode() {\n return this.codingMode;\n }" ]
[ "0.74878657", "0.65151143", "0.64583087", "0.6458306", "0.62548137", "0.62114364", "0.6186002", "0.61159605", "0.600882", "0.5869252", "0.5864296", "0.57936466", "0.57392466", "0.57198066", "0.5681003", "0.562996", "0.56210876", "0.5570812", "0.5539752", "0.5522508", "0.55052596", "0.5497651", "0.5497651", "0.5489443", "0.5481373", "0.5457897", "0.5449444", "0.5441807", "0.5430156", "0.5429499", "0.5429249", "0.54015094", "0.53808826", "0.53694826", "0.5369457", "0.5349806", "0.53409225", "0.53322065", "0.53312904", "0.5321948", "0.5309667", "0.52847797", "0.52759314", "0.5258772", "0.52473056", "0.52469194", "0.52467453", "0.5243491", "0.52399206", "0.52385193", "0.52306455", "0.52280676", "0.5226736", "0.5210854", "0.52000564", "0.51988465", "0.51763207", "0.5170585", "0.5167784", "0.5165758", "0.51650023", "0.5163095", "0.5143692", "0.51411086", "0.5137649", "0.5135217", "0.51351434", "0.51325834", "0.5124717", "0.5124454", "0.51211077", "0.5115698", "0.5115698", "0.5115698", "0.5112948", "0.51051754", "0.50967306", "0.50830084", "0.50762814", "0.50760204", "0.50715023", "0.50684285", "0.5062641", "0.50375", "0.5025823", "0.5018596", "0.5017546", "0.50043243", "0.5002812", "0.5002693", "0.49921605", "0.4988218", "0.49855104", "0.49828738", "0.49824136", "0.4980634", "0.49801722", "0.49775362", "0.4974136", "0.4972369" ]
0.6725062
1
Sets the number of audio channels described by this sound descriptor.
public void setChannelCount( @UInt32 int channelCount) throws IllegalArgumentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setAudioChannelCount(int value) {\n\n audioChannelCount_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }", "public void setChannelCount(int value) {\n this.channelCount = value;\n }", "@java.lang.Override\n public int getAudioChannelCount() {\n return audioChannelCount_;\n }", "@Test\n public void setChannels_1() {\n final int CHANNELS = 1;\n AudioConfigManager.setChannels(CHANNELS);\n assertEquals(AudioFormatConfig.channels, CHANNELS);\n }", "@java.lang.Override\n public int getAudioChannelCount() {\n return audioChannelCount_;\n }", "public ParametersBuilder setMaxAudioChannelCount(int maxAudioChannelCount) {\n this.maxAudioChannelCount = maxAudioChannelCount;\n return this;\n }", "public void setChannels(int value, int subsystem) {\n _avTable.set(ATTR_CHANNELS, value, subsystem);\n }", "public int getChannelCount() {\r\n\t\tif (audioFile != null && audioFile.getFormat() != null) {\r\n\t\t\tif (showMono) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\treturn audioFile.getFormat().getChannels();\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "public void SetChannel(int channel);", "public @UInt32 int getChannelCount();", "public synchronized void setBandCount(int count)\n { bandCount = count;\n }", "int getChannelsCount();", "public Builder clearAudioChannelCount() {\n bitField0_ = (bitField0_ & ~0x00000004);\n audioChannelCount_ = 0;\n onChanged();\n return this;\n }", "public void expandChannel(int targetChannelCount) {\n\t\t// even more sanity...\n\t\tif (getChannelCount() != 1) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"FloatSampleBuffer: can only expand channels for mono signals.\");\n\t\t}\n\t\tfor (int ch = 1; ch < targetChannelCount; ch++) {\n\t\t\taddChannel(false);\n\t\t\tcopyChannel(0, ch);\n\t\t}\n\t}", "void setValueMixerSound(int value);", "public int getChannelCount();", "public UTIL_SET_CHANNELS() {\n }", "public int getChannelCount() {\n return channelCount;\n }", "protected void setChannelCountImpl(int newChannelCount) {\n\t\tif (channelCount != newChannelCount) {\n\t\t\tchannelCount = newChannelCount;\n\t\t\t// remove cache\n\t\t\tthis.lastConvertToByteArrayFormat = null;\n\t\t}\n\t}", "private void setMediaCount(int value) {\n \n mediaCount_ = value;\n }", "public void set_count(int value) {\n setUIntBEElement(offsetBits_count(), 16, value);\n }", "public void set_sampleCnt(long value) {\n setUIntBEElement(offsetBits_sampleCnt(), 32, value);\n }", "public void setAudioPort(int port);", "public int getChannelCount() {\n return channel_.size();\n }", "public void set_count(int c);", "public int getSoundChannel() \n\t{\n\treturn fSoundChannel;\n\t}", "public void setAudioDescriptor( AudioDescriptor audioDescriptor );", "int getNumChannels();", "public void setSamples(int samples){ \n this.samples = samples; \n }", "void scaleSampleRate(float scaleFactor) {\n if (debugFlag)\n debugPrintln(\"JSChannel: scaleSampleRate\");\n if (ais == null) {\n if (debugFlag) {\n debugPrint(\"JSChannel: Internal Error scaleSampleRate: \");\n debugPrintln(\"ais is null\");\n }\n return;\n }\n\n AudioFormat audioFormat = ais.getFormat();\n float rate = audioFormat.getSampleRate();\n\n double newRate = rate * scaleFactor;\n if (newRate > 48000.0) // clamp to 48K max\n newRate = 48000.0;\n/****\n// NOTE: This doesn't work...\n/// audioStream.setSampleRate(newRate);\n\n// need to set FloatControl.Type(SAMPLE_RATE) to new value somehow...\n\n if (debugFlag) {\n debugPrintln(\"JSChannel: scaleSampleRate: new rate = \" +\n rate * scaleFactor);\n debugPrintln(\" >>>>>>>>>>>>>>> using scaleFactor = \" +\n scaleFactor);\n }\n****/\n }", "@NonNull\n public Builder channel(@IntRange(from = 0, to = 3) int channel) {\n nBuilderChannel(mNativeBuilder, channel);\n return this;\n }", "public void setCount(int count)\r\n\t{\r\n\t}", "public Builder setFreq(int value) {\n bitField0_ |= 0x00000008;\n freq_ = value;\n onChanged();\n return this;\n }", "public void setCount(final int c) {\n\t\tcount = c;\n\t}", "public Builder setMediaCount(int value) {\n copyOnWrite();\n instance.setMediaCount(value);\n return this;\n }", "public void setChannel(@EntityInstance int i, @IntRange(from = 0, to = 3) int channel) {\n nSetChannel(mNativeObject, i, channel);\n }", "public Builder setChunksCount(int value) {\n bitField0_ |= 0x00000002;\n chunksCount_ = value;\n onChanged();\n return this;\n }", "public int getChannelCount() {\n if (channelBuilder_ == null) {\n return channel_.size();\n } else {\n return channelBuilder_.getCount();\n }\n }", "public Input setCount(int count) {\n definition.putNumber(COUNT, count);\n return this;\n }", "protected void setPulseWidth(int channel, float ms) throws ConnectionLostException, InterruptedException {\n\t\t\t\tint pw = Math.round(ms / 1000 * FREQ * 4096);\n\t\t\t\t// Skip to every 4th address value to turn off the pulse (see datasheet addresses for LED#_OFF_L)\n\t\t\t\tbyte[] request = { (byte) (0x08 + channel * 4), (byte) pw, (byte) (pw >> 8) };\n\t\t\t\ttwi_.writeRead(PCA_ADDRESS, false, request, request.length, null, 0);\n\t\t\t}", "public void setAudioDscp(int dscp);", "@ApiModelProperty(example = \"1\", value = \"The count of affected Channels across all products\")\n public Integer getAffectedChannelCount() {\n return affectedChannelCount;\n }", "void setInterleavedAxisCount(final int count);", "public static void setCount(int aCount) {\n count = aCount;\n }", "public void setLength(){\n this.length = 0;\n for (Music track : this.tracks){\n this.length += track.getLength();\n }\n }", "@Override\r\n\tpublic int getCount()\r\n\t{\n\t\treturn AirtalkeeChannel.getInstance().getChannels().size();\r\n\t}", "@Test\n public void setSampleSizeInBits_16() {\n final int SAMPLE_SIZE_BITS = 16;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public edu.pa.Rat.Builder setFrequency(int value) {\n validate(fields()[1], value);\n this.frequency = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "@Override\r\n\tpublic int getCount() \r\n\t{\n\t\treturn channels.size();\r\n\t}", "int getChannelStatisticsCount();", "private void setBitDepth(short encoding) {\n if (encoding == AudioFormat.ENCODING_PCM_8BIT)\n audioBundle.putInt(AudioSettings.AUDIO_BUNDLE_KEYS[20], 8);\n else if (encoding == AudioFormat.ENCODING_PCM_16BIT)\n audioBundle.putInt(AudioSettings.AUDIO_BUNDLE_KEYS[20], 16);\n else if (encoding == AudioFormat.ENCODING_PCM_FLOAT)\n audioBundle.putInt(AudioSettings.AUDIO_BUNDLE_KEYS[20], 32);\n else {\n // default or error, return \"guaranteed\" default\n audioBundle.putInt(AudioSettings.AUDIO_BUNDLE_KEYS[20], 16);\n }\n }", "public ParametersBuilder setAllowAudioMixedChannelCountAdaptiveness(\n boolean allowAudioMixedChannelCountAdaptiveness) {\n this.allowAudioMixedChannelCountAdaptiveness = allowAudioMixedChannelCountAdaptiveness;\n return this;\n }", "void setDimmer(int channel, int value) {\n\t\tint valueToSet;\n\t\tif (value < 2) {\n\t\t\tvalueToSet = 2;\n\t\t} else {\n\t\t\tvalueToSet = value;\n\t\t}\n\t\tString channelHex = channelAsHex(channel);\n\t\tString valueHex = StringUtils.leftPad(Integer.toHexString(valueToSet),\n\t\t\t\t2, \"0\");\n\t\tsendCommand(\"*C901\" + channelHex + valueHex + \"#\");\n\t}", "protected void setSampleCountImpl(int newSampleCount) {\n\t\tif (sampleCount != newSampleCount) {\n\t\t\tsampleCount = newSampleCount;\n\t\t}\n\t}", "public void setFrequency(java.lang.Integer value) {\n this.frequency = value;\n }", "void setCopies(short copies);", "public void init(int newChannelCount, int newSampleCount,\n\t\t\tfloat newSampleRate) {\n\t\tinit(newChannelCount, newSampleCount, newSampleRate, LAZY_DEFAULT);\n\t}", "public void setCount(int count) {\r\n this.count = count;\r\n }", "public void arrayCount(int arrayCount)\n\t{\n\t\t_arrayCount = arrayCount;\n\t}", "public void setCount(int fileType, int count) {\n\t\tCount[fileType]=count;\n\t\t\n\t}", "public void setCounter(Short __newValue)\n {\n counter = __newValue;\n }", "public void setChannel(Byte channel) {\n this.channel = channel;\n }", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public void setQuantizationBits(\r\n\t\t\t@UInt32 int bitsCount)\r\n\t\tthrows IllegalArgumentException;", "public void setChannelPeriod(int period){\n this.channelPeriod=period;\n }", "void setChannel(EzyChannel channel);", "public void setSampleSize(int n){\n\t\tsetParameters(populationSize, type1Size, n);\n\t}", "public void setAudioPortRange(int minPort, int maxPort);", "public void setFrequency(int f){\n this.frequency = f;\n }", "public Builder setNumOfChunks(int value) {\n \n numOfChunks_ = value;\n onChanged();\n return this;\n }", "public void setCount(int count)\r\n {\r\n this.count = count;\r\n }", "public void setBandwidth(String name,\n\t\t\t int value)\n\tthrows SdpException {\n\tif (name == null)\n\t throw new SdpException(\"The name is null\");\n\telse {\n\t for (int i = 0; i < bandwidthFields.size(); i++) {\n\t\tBandwidthField bandwidthField = (BandwidthField) \n\t\t bandwidthFields.elementAt(i);\n\t\tString type = bandwidthField.getBwtype();\n\t\tif (type != null && \n\t\t type.equals(name)) \n\t\t bandwidthField.setBandwidth(value);\n\t }\n \n\t}\n }", "public void setCount(int count)\n {\n this.count = count;\n }", "public void reset(int newChannels, int newSampleCount, float newSampleRate) {\n\t\tinit(newChannels, newSampleCount, newSampleRate, false);\n\t}", "public void setSampleSize(int value) {\n this.sampleSize = value;\n }", "public abstract SoundPlayer setVolume(int volume);", "public void setCount(final int count)\n {\n this.count = count;\n }", "public void setBandWidth(double b) {\n\t\tbw = b / _mySampleRate;\n\t}", "public void setMode(String channel, String mode);", "public void setNumHybridSubBands(int value, int subsystem) {\n _avTable.set(ATTR_HYBRID_SUBBANDS, value, subsystem);\n }", "public void setCount(Integer count) {\r\n this.count = count;\r\n }", "public void setAudiofileSize(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "public void setMicGainDb(float level);", "public void setDocumentCount(Integer arg0) {\n \n }", "public void setCount(int count){\n\t\tthis.count = count;\n\t}", "public void setCount(int newCount) {\r\n\t\tcount = newCount;\r\n\t}", "@attribute(value = \"\", required = false, defaultValue=\"SWT default\")\r\n\tpublic void setVisibleItemCount(Integer count) {\r\n\t\tcombo.setVisibleItemCount(count);\r\n\t}", "public void changeSampleCount(int newSampleCount, boolean keepOldSamples) {\n\t\tint oldSampleCount = getSampleCount();\n\n\t\t// shortcut: if we just make this buffer smaller, just set new\n\t\t// sampleCount\n\t\tif (oldSampleCount >= newSampleCount) {\n\t\t\tsetSampleCountImpl(newSampleCount);\n\t\t\treturn;\n\t\t}\n\t\t// shortcut for one or 2 channels\n\t\tif (channelCount == 1 || channelCount == 2) {\n\t\t\tfloat[] ch = getChannel(0);\n\t\t\tif (ch.length < newSampleCount) {\n\t\t\t\tfloat[] newCh = new float[newSampleCount];\n\t\t\t\tif (keepOldSamples && oldSampleCount > 0) {\n\t\t\t\t\t// copy old samples\n\t\t\t\t\tSystem.arraycopy(ch, 0, newCh, 0, oldSampleCount);\n\t\t\t\t}\n\t\t\t\tchannels[0] = newCh;\n\t\t\t} else if (keepOldSamples) {\n\t\t\t\t// silence out excess samples (according to the specification)\n\t\t\t\tfor (int i = oldSampleCount; i < newSampleCount; i++) {\n\t\t\t\t\tch[i] = 0.0f;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (channelCount == 2) {\n\t\t\t\tch = getChannel(1);\n\t\t\t\tif (ch.length < newSampleCount) {\n\t\t\t\t\tfloat[] newCh = new float[newSampleCount];\n\t\t\t\t\tif (keepOldSamples && oldSampleCount > 0) {\n\t\t\t\t\t\t// copy old samples\n\t\t\t\t\t\tSystem.arraycopy(ch, 0, newCh, 0, oldSampleCount);\n\t\t\t\t\t}\n\t\t\t\t\tchannels[1] = newCh;\n\t\t\t\t} else if (keepOldSamples) {\n\t\t\t\t\t// silence out excess samples (according to the\n\t\t\t\t\t// specification)\n\t\t\t\t\tfor (int i = oldSampleCount; i < newSampleCount; i++) {\n\t\t\t\t\t\tch[i] = 0.0f;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetSampleCountImpl(newSampleCount);\n\t\t\treturn;\n\t\t}\n\n\t\tObject[] oldChannels = null;\n\t\tif (keepOldSamples) {\n\t\t\toldChannels = getAllChannels();\n\t\t}\n\t\tinit(getChannelCount(), newSampleCount, getSampleRate());\n\t\tif (keepOldSamples) {\n\t\t\t// copy old channels and eventually silence out new samples\n\t\t\tint copyCount = newSampleCount < oldSampleCount ? newSampleCount\n\t\t\t\t\t: oldSampleCount;\n\t\t\tfor (int ch = 0; ch < this.channelCount; ch++) {\n\t\t\t\tfloat[] oldSamples = (float[]) oldChannels[ch];\n\t\t\t\tfloat[] newSamples = (float[]) channels[ch];\n\t\t\t\tif (oldSamples != newSamples) {\n\t\t\t\t\t// if this sample array was not object of lazy delete\n\t\t\t\t\tSystem.arraycopy(oldSamples, 0, newSamples, 0, copyCount);\n\t\t\t\t}\n\t\t\t\tif (oldSampleCount < newSampleCount) {\n\t\t\t\t\t// silence out new samples\n\t\t\t\t\tfor (int i = oldSampleCount; i < newSampleCount; i++) {\n\t\t\t\t\t\tnewSamples[i] = 0.0f;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setChannelRFfreq(int freq){\n this.channelRF=freq;\n }", "private void updateChannelObject() {\n int i = channelSelect.getSelectedIndex();\n Channel c = channelList.get(i);\n \n double a = Double.valueOf(ampBox.getText()) ;\n double d = Double.valueOf(durBox.getText());\n double f = Double.valueOf(freqBox.getText());\n double o = Double.valueOf(owBox.getText());\n \n c.updateSettings(a, d, f, o);\n }", "protected void setNumVars(int numVars)\n {\n \tthis.numVars = numVars;\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setNumberOfArticulationParameters(short pNumberOfArticulationParameters)\n{ numberOfArticulationParameters = pNumberOfArticulationParameters;\n}" ]
[ "0.7647237", "0.69188625", "0.6527847", "0.64442897", "0.64326894", "0.64183795", "0.62332416", "0.6187726", "0.61088276", "0.59951985", "0.5981632", "0.59056914", "0.5904498", "0.5816738", "0.57857066", "0.5677888", "0.56505513", "0.56457645", "0.559746", "0.55154616", "0.5507674", "0.5478477", "0.54618496", "0.5453934", "0.5443139", "0.54411525", "0.54193", "0.54076815", "0.5372379", "0.53548825", "0.53155667", "0.53141123", "0.5290099", "0.52852553", "0.52650803", "0.52543074", "0.52413875", "0.52240056", "0.52205634", "0.5214197", "0.52122355", "0.5159399", "0.5135118", "0.51043296", "0.5101871", "0.5089505", "0.5066232", "0.5061596", "0.5061596", "0.5061596", "0.50372785", "0.50287676", "0.50286955", "0.50110924", "0.5010022", "0.49987966", "0.49814272", "0.49771523", "0.49751082", "0.49747172", "0.49741262", "0.49706936", "0.49655026", "0.4965458", "0.49632362", "0.49604872", "0.49557734", "0.4954482", "0.49496692", "0.49475774", "0.49456447", "0.494255", "0.49302876", "0.49297133", "0.49258426", "0.4920757", "0.49179423", "0.49166107", "0.49015716", "0.49009097", "0.48871627", "0.4882897", "0.4882179", "0.48801205", "0.48755458", "0.48725012", "0.4866351", "0.4860635", "0.48597735", "0.48591658", "0.48575816", "0.4856014", "0.48505583", "0.4840575", "0.48401356", "0.48401356", "0.48401356", "0.48401356", "0.48401356", "0.48323447" ]
0.6064975
9
Returns the number of audio channels described by this sound descriptor.
public @UInt32 int getChannelCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getChannelCount() {\r\n\t\tif (audioFile != null && audioFile.getFormat() != null) {\r\n\t\t\tif (showMono) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\treturn audioFile.getFormat().getChannels();\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "@java.lang.Override\n public int getAudioChannelCount() {\n return audioChannelCount_;\n }", "@java.lang.Override\n public int getAudioChannelCount() {\n return audioChannelCount_;\n }", "int getChannelsCount();", "public int getChannelCount() {\n if (channelBuilder_ == null) {\n return channel_.size();\n } else {\n return channelBuilder_.getCount();\n }\n }", "public int getChannelCount() {\n return channel_.size();\n }", "public int getChannelCount();", "int getChannelStatisticsCount();", "int getNumChannels();", "public int getChannelCount() {\n return channelCount;\n }", "public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}", "public int getSoundChannel() \n\t{\n\treturn fSoundChannel;\n\t}", "public Builder setAudioChannelCount(int value) {\n\n audioChannelCount_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }", "public long getSampleCount() {\r\n\t\tif (audioFile != null) {\r\n\t\t\treturn audioFile.getEffectiveDurationSamples();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getCount()\r\n\t{\n\t\treturn AirtalkeeChannel.getInstance().getChannels().size();\r\n\t}", "public int getAudioSampleSize() {\n\t\treturn mSampleSize;\n\t}", "public static int getNumberOfChannels(String slideRef, String... varargs) {\n\t\t// setting the default value when arguments' value is omitted\n\t\tString sessionID = varargs.length > 0 ? varargs[0] : null;\n\t\t// Number of fluorescent channels for a slide (when slide is brightfield, return\n\t\t// is always 1)\n\t\tMap<String, Object> info = getSlideInfo(slideRef, sessionID);\n\t\treturn ((List<Object>) ((List<Map<String, Object>>) ((List<Map<String, Object>>) info.get(\"TimeFrames\")).get(0)\n\t\t\t\t.get(\"Layers\")).get(0).get(\"Channels\")).size();\n\t}", "public int getChannelsTotal(int subsystem) {\n return _avTable.getInt(ATTR_CHANNELS_TOTAL, subsystem, 0);\n }", "public int getDiscreteLevelCount() {\n\t\tif (this.isNumeric()) {\n\t\t\tthrow new RuntimeException(\"Parameter \" + this.name + \" is numeric!\");\n\t\t} else {\n\t\t\treturn this.discreteLevels.size();\n\t\t}\n\t}", "public int nSamples() {\n return samples.nSamples();\n }", "public final int[] getSampleSize() {\n int sampleSize[] = new int[numBands];\n int sizeInBits = getSampleSize(0);\n\n for (int i = 0; i < numBands; i++)\n sampleSize[i] = sizeInBits;\n\n return sampleSize;\n }", "int getNumSampleDimensions();", "@Override\r\n\tpublic int getCount() \r\n\t{\n\t\treturn channels.size();\r\n\t}", "public int getChannels(int subsystem) {\n return _avTable.getInt(ATTR_CHANNELS, subsystem, 0);\n }", "public int pixelCount()\n {\n int pixelCount = cat.getWidth() * cat.getHeight();\n return pixelCount;\n\n }", "public static int size_sampleCnt() {\n return (32 / 8);\n }", "@ApiModelProperty(example = \"1\", value = \"The count of affected Channels across all products\")\n public Integer getAffectedChannelCount() {\n return affectedChannelCount;\n }", "public int getNumberOfSpectra() {\r\n return nSpectrum;\r\n }", "public int size()\r\n\t{\r\n\t\treturn midiIndividualTracks.size();\r\n\t}", "public long get_sampleCnt() {\n return (long)getUIntBEElement(offsetBits_sampleCnt(), 32);\n }", "public int discCount() {\n\t\tint countBLACK = discBlackCount();\n\t\tint countWHITE = discWhiteCount();\n\n\t\treturn countBLACK + countWHITE;\n\t\t\n\t}", "public long getSampleFrameLength() {\n\t\treturn ais.getFrameLength();\n\t}", "public int getLength() { \r\n return audioLength; \r\n }", "public int get_count() {\n return (int)getUIntBEElement(offsetBits_count(), 16);\n }", "public long dimCount()\n\t{\n\t\treturn (long)multimemory.dims.length;\n\t}", "public final int getSampleSize(int band) {\n return DataBuffer.getDataTypeSize(dataType);\n }", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "int getFramesCount();", "public int sizeOfDataChckArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DATACHCK$14);\n }\n }", "public void setChannelCount(int value) {\n this.channelCount = value;\n }", "public AudioDescriptor getAudioDescriptor();", "public int getWidth()\r\n {\r\n\tif (hue != null && saturation != null && intensity != null)\r\n\t return hue[0].length;\r\n\telse\r\n\t return -1;\r\n }", "public int getNumFrames() {\n if ( dofs == null ) return 0;\n return dofs.length;\n }", "int getScaleCount();", "public int sizeOfCharacteristicArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(CHARACTERISTIC$12);\n }\n }", "int getDimensionsCount();", "@Override\n\tpublic int getNumberOfTracks() {\n\t\treturn 6;\n\t}", "public static int sizeBits_sampleCnt() {\n return 32;\n }", "public static int sizeBits_count() {\n return 16;\n }", "int sizeOfTrafficVolumeArray();", "public int getHandSize()\n {\n return hand.size();\n }", "public int getAudioDscp();", "public int getNumberOfSpectraPerFraction() {\n return numberOfSpectraPerFraction;\n }", "public int count() {\n\t\treturn sizeC;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public static int getColorsCount()\n {\n return colorsCount;\n }", "public static int getNumCardsPerHand()\n {\n return NUM_CARDS_PER_HAND;\n }", "public final int getChannel() {\n return device.getChannel();\n }", "public int numberOfBits() {\n return 8 * this.data.size();\n }", "public int getFigureCount() {\n if (figureBuilder_ == null) {\n return figure_.size();\n } else {\n return figureBuilder_.getCount();\n }\n }", "public int getHandSize(){\n\t\treturn hand.size();\n\t\t\t\t\n\t}", "@Override\n public int getDeviceConfigurationCount() {\n int product = 1;\n\n for (CloudConfigurationDimension dimension : getDimensions()) {\n product *= dimension.getEnabledTypes().size();\n }\n\n return product;\n }", "public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "public int size() {\n return numBits;\n }", "public int getChannelConfig() {\n return 0;\n }", "public int getFileno(ChannelDescriptor descriptor) {\n return getFilenoIntMap(descriptor.getFileno());\n }", "int getMetricDescriptorsCount();", "public double getTotalSignalCount(){\n\t\tdouble total=0;\n\t\tfor(Sample s: signalSamples)\n\t\t\ttotal += s.getHitCount();\n\t\treturn total;\n\t}", "public int bitCount() {\n @SuppressWarnings(\"deprecation\") int bc = bitCount - 1;\n if (bc == -1) { // bitCount not initialized yet\n bc = 0; // offset by one to initialize\n // Count the bits in the magnitude\n for (int i=0; i < mag.length; i++)\n bc += Integer.bitCount(mag[i]);\n if (signum < 0) {\n // Count the trailing zeros in the magnitude\n int magTrailingZeroCount = 0, j;\n for (j=mag.length-1; mag[j] == 0; j--)\n magTrailingZeroCount += 32;\n magTrailingZeroCount += Integer.numberOfTrailingZeros(mag[j]);\n bc += magTrailingZeroCount - 1;\n }\n bitCount = bc + 1;\n }\n return bc;\n }", "int getSubframesCount();", "public String getDescriptor()\r\n {\r\n return soundFileDescriptor;\r\n }", "public static int size_count() {\n return (16 / 8);\n }", "public short getBitDepth() {\n\n\t\treturn getShort(ADACDictionary.PIXEL_BIT_DEPTH);\n\n\t}", "public int getColorCount() {\n \tif (colorBuf == null)\n \t\treturn 0;\n \treturn colorBuf.asFloatBuffer().limit()/4;\n }", "public ArrayList<ArrayList<Short>> getChannelSampleArrayList() {\n\t\treturn channelSampleArrayList;\n\t}", "public int getBytesPerSample();", "public double getBandWidth() {\n\t\treturn bw * _mySampleRate;\n\t}", "public int getMediaCount() {\n return instance.getMediaCount();\n }", "int getNumberFrames();", "com.google.speech.logs.MicrophoneChannelStatistics getChannelStatistics(int index);", "public int size() {\n return CAPABILITY_LENGTH;\n }", "public ParametersBuilder setMaxAudioChannelCount(int maxAudioChannelCount) {\n this.maxAudioChannelCount = maxAudioChannelCount;\n return this;\n }", "public int getLength()\n {\n return this.m_descriptor[1] & 0xFF;\n }", "int getSoundLen(File sndFile) {\n\t\tif (sndFile == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tAudioInputStream audioInputStream;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(sndFile);\n\t\t\tAudioFormat format = audioInputStream.getFormat();\n\t\t\tlong frames = audioInputStream.getFrameLength();\n\t\t\taudioInputStream.close();\n\t\t\treturn (int) (frames / format.getFrameRate());\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Horrible hack blew up, karma\", e);\n\t\t\treturn 0;\n\t\t}\n\t}", "public int getChannelType( ) {\r\n return 1;\r\n }", "private int getFreeChannel() {\n\n\t\tfor (int i = 0; i < channels.length; i++) {\n\n\t\t\tif (channels[i] == null || channels[i].isClosed()) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int freq()\n\t{\n\t\treturn _lsPeriod.get (0).freq();\n\t}", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public Object getNumberOfConnectedComponents() {\r\n\t\tConnectivityInspector<Country, DefaultEdge> inspector=new ConnectivityInspector<Country, DefaultEdge>(graph);\r\n\t\treturn inspector.connectedSets().size();\r\n\t}", "public short getNumberOfGatedIntervals() {\n\t\treturn getShort(ADACDictionary.NUMBER_OF_IMAGE_SETS);\n\t}", "public int getCardCount() {\n\t\treturn this.cardsInhand.size();\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public int size()\n\t{\n\t\treturn numOfSongs;\n\t}", "public int getNumberOfRadialBuffers() {\n\t\treturn ((Integer) radialBufferSpinner.getValue()).intValue();\n\t}", "public double getLength() {\n return count;\n }", "@Override\n public long getFrequencyCount() {\n return count;\n }", "public int getNumSpectrumPeaks() {\r\n return numSpectrumPeaks;\r\n }", "public int getPaletteCount() {\n return AviDemux.str2ulong( bih, 32 );\n }", "public int getNumberOfSpectra() {\n return iPeptideIdentifications.size();\n }" ]
[ "0.80246615", "0.78545094", "0.7842545", "0.73719764", "0.7172752", "0.708269", "0.70692414", "0.7013202", "0.7000543", "0.69418573", "0.6727139", "0.6696664", "0.65851015", "0.6363691", "0.6236435", "0.6232828", "0.6105809", "0.6105621", "0.6103244", "0.60905236", "0.6035399", "0.6024149", "0.6024122", "0.59639364", "0.59594196", "0.5931219", "0.5907548", "0.58643043", "0.5855787", "0.58375776", "0.5814073", "0.578451", "0.57499474", "0.5747975", "0.5728427", "0.57259965", "0.57188106", "0.57075125", "0.57061374", "0.5702391", "0.5696079", "0.5680981", "0.56692266", "0.56625056", "0.5655613", "0.5654674", "0.5623099", "0.5604395", "0.5600542", "0.55990183", "0.5595379", "0.5592723", "0.5586001", "0.5582405", "0.55768704", "0.55704564", "0.55628496", "0.55626863", "0.5560799", "0.5554679", "0.5544579", "0.55360454", "0.55321836", "0.55259246", "0.55210954", "0.55124277", "0.55111593", "0.55084354", "0.55080533", "0.5507138", "0.5499389", "0.549931", "0.54948086", "0.5490006", "0.5486109", "0.54700893", "0.5469352", "0.5467424", "0.5462384", "0.54490983", "0.5448019", "0.54439056", "0.54413235", "0.54404455", "0.5439463", "0.54355663", "0.5433089", "0.5431629", "0.54315895", "0.54143727", "0.54143625", "0.54140735", "0.54128957", "0.5406139", "0.54045355", "0.53951275", "0.5394602", "0.5391935", "0.5387638", "0.5382897" ]
0.7619954
3
Sets the audio sampling rate of audio essence described by this sound descriptor.
public void setAudioSampleRate( Rational audioSamplingRate) throws NullPointerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSampleRate(float rate)\n {\n samplingDelay = (int)(ONE_SECOND/rate);\n }", "public void setAudioSamplingRate(int audioSamplingRate) {\n this.audioSamplingRate = audioSamplingRate;\n }", "public void setSamplingRate(int value) {\n this.samplingRate = value;\n }", "public void setSamplingRate( int samplingRate ) {\r\n this.samplingRate = samplingRate;\r\n }", "public void setSampleRate(int value) {\n this.sampleRate = value;\n }", "public void setSampleRate(int sampleRate) {\r\n\t\tthis.sampleRate = sampleRate;\r\n\t}", "public void setSampleRate(Integer sampleRate) {\n this.sampleRate = sampleRate;\n }", "void scaleSampleRate(float scaleFactor) {\n if (debugFlag)\n debugPrintln(\"JSChannel: scaleSampleRate\");\n if (ais == null) {\n if (debugFlag) {\n debugPrint(\"JSChannel: Internal Error scaleSampleRate: \");\n debugPrintln(\"ais is null\");\n }\n return;\n }\n\n AudioFormat audioFormat = ais.getFormat();\n float rate = audioFormat.getSampleRate();\n\n double newRate = rate * scaleFactor;\n if (newRate > 48000.0) // clamp to 48K max\n newRate = 48000.0;\n/****\n// NOTE: This doesn't work...\n/// audioStream.setSampleRate(newRate);\n\n// need to set FloatControl.Type(SAMPLE_RATE) to new value somehow...\n\n if (debugFlag) {\n debugPrintln(\"JSChannel: scaleSampleRate: new rate = \" +\n rate * scaleFactor);\n debugPrintln(\" >>>>>>>>>>>>>>> using scaleFactor = \" +\n scaleFactor);\n }\n****/\n }", "public void setSpeechRate(int speechRate) {\n mSelf.setSpeechRate(speechRate);\n }", "public void setSampleRate(int sR) {\n switch (sR) {\n case 8000:\n sampleRate.setSelectedIndex(0);\n break;\n case 11025:\n sampleRate.setSelectedIndex(1);\n break;\n case 16000:\n sampleRate.setSelectedIndex(2);\n break;\n case 22050:\n sampleRate.setSelectedIndex(3);\n break;\n default:\n }\n }", "public void setSampleMode( SampleMode sampleMode );", "public void setSampleRate(float sampleRate) {\n\t\tif (sampleRate <= 0) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Invalid samplerate for FloatSampleBuffer.\");\n\t\t}\n\t\tif (this.sampleRate != sampleRate) {\n\t\t\tthis.sampleRate = sampleRate;\n\t\t\t// remove cache\n\t\t\tlastConvertToByteArrayFormat = null;\n\t\t}\n\t}", "public void setAudioDescriptor( AudioDescriptor audioDescriptor );", "public int getSampleRate() {\n return sampleRate;\n }", "public int getAudioSampleRate() {\n\t\treturn mSampleRate;\n\t}", "public Rational getAudioSampleRate();", "public float getSampleRate();", "@Test\n public void setSampleRate_8000() {\n final float SAMPLE_RATE = 8000f;\n AudioConfigManager.setSampleRate(SAMPLE_RATE);\n assertEquals(AudioFormatConfig.sampleRate, SAMPLE_RATE);\n }", "@Test\n public void sampleRateChangeChangesFrameRate() {\n assertEquals(AudioFormatConfig.frameRate, AudioFormatConfig.sampleRate);\n AudioConfigManager.setSampleRate(16000f);\n assertEquals(AudioFormatConfig.frameRate, AudioFormatConfig.sampleRate);\n AudioConfigManager.setSampleRate(44100f);\n assertEquals(AudioFormatConfig.frameRate, AudioFormatConfig.sampleRate);\n }", "@Field(7) \n\tpublic AVBufferSrcParameters sample_rate(int sample_rate) {\n\t\tthis.io.setIntField(this, 7, sample_rate);\n\t\treturn this;\n\t}", "void setValueMixerSound(int value);", "public Integer getSampleRate() {\n return this.sampleRate;\n }", "public int getSamplingRate() {\n return samplingRate;\n }", "void setSamplingIntervalMs(long ms);", "public int getSamplingRate( ) {\r\n return samplingRate;\r\n }", "public void set_sampling_parameter(double pass_freq) {\n\t\tfinal double pi = 3.1415926535897932385;\n\n\t\t// Low-pass: R = 10kOhm, C = 1000pF; w0l = 1/RC = 1/(1e4*1e-9) = 100000\n\t\t// High-pass: R = 1kOhm, C = 10uF; w0h = 1/RC = 1/(1e3*1e-5) = 100\n\t\t// Multiply with 1.048576 to facilitate division by 1 000 000 by right-\n\t\t// shifting 20 times (2 ^ 20 = 1048576).\n\n\t\tw0hp = 105;\n\t\tw0lp = (int /* sound_sample */) (pass_freq * (2.0 * pi * 1.048576));\n\t\tif (w0lp > 104858)\n\t\t\tw0lp = 104858;\n\t}", "public void setSampleSize(int value) {\n this.sampleSize = value;\n }", "public void setAudioDscp(int dscp);", "public void changeSamplerateTo(int samplerate) {\n\t\tm_samplerate = samplerate;\n\t\tif( m_privateNotification != null ) {\n\t\t\tString content = \"changeSamplerate:\"+Integer.toString(samplerate)+\";\";\n\t\t\tm_privateNotification.sendMessage(m_parentName+\"TSCanvasMenu\", m_parentName+\"TSCanvas\", content);\n\t\t\tm_privateNotification.sendMessage(m_parentName+\"TSCanvasMenu\", m_parentName+\"TSAbstractCanvas\", content);\n\t\t}\n\t}", "public void setFrequency(float speed) { \n \tmouseJointDef.frequencyHz = speed; \n }", "public void setSensitivity(double voltsPerDegreePerSecond) {\r\n\t\tm_voltsPerDegreePerSecond = voltsPerDegreePerSecond;\r\n\t}", "public void setRate(int rate) { this.rate = rate; }", "public void setRate(float rate) {\n\t\tthis.rate = rate;\n\t}", "public int getSampleRate() {\n return 0;\n }", "@Override\n\tprotected void sampleRateChanged()\n\t{\n\t\ttimeStepSize = 1/sampleRate();\n\t}", "@Override\n\tprotected void sampleRateChanged()\n\t{\n\t\ttimeStepSize = 1/sampleRate();\n\t}", "public void setSamples(int samples){ \n this.samples = samples; \n }", "public void setSampleSize(int size){\r\n\t\tSampleSize = size;\r\n\t}", "public int getSampleRate() {\r\n\treturn SAMPLES_IN_SECOND;\r\n}", "public void setClientAudioFormat(AudioFormat.Encoding encoding, float sampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate)\n\t{\n\t\t\n\t\tclientAudioFormat = new AudioFormat(encoding, sampleRate, sampleSizeInBits, channels, frameSize, frameRate, false);\n\t\taudioPlayThread.setAudioFormat(clientAudioFormat);\n\t\n\t}", "public Builder setSamplingProbability(double value) {\n \n samplingProbability_ = value;\n onChanged();\n return this;\n }", "public void setRate();", "void setSampleGain(float gain) {\n if (debugFlag)\n debugPrint(\"JSChannel: setSampleGain must be overridden\");\n }", "public int getSampleRate() {\n for (int rate : new int[]{8000, 11025, 16000, 22050, 44100, 48000}) {\n int buffer = AudioRecord.getMinBufferSize(rate, channel_in, format);\n if (buffer > 0)\n return rate;\n }\n return -1;\n }", "public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void setSoundEnabled(final boolean sEnabled) { soundEnabled = sEnabled; }", "public void setMeasFrequencyHz(long value) {\r\n this.measFrequencyHz = value;\r\n }", "public void setLearningRate(double rate);", "void setSignalPeriod(double signalPeriod);", "@Test\n public void setSampleRate_initiateValueShouldNotBeInvalid() {\n Assertions.assertDoesNotThrow(() -> {\n // AudioFormatConfig.sampleRate holds the initiate value at\n // program start.\n AudioConfigManager.setSampleRate(AudioFormatConfig.sampleRate);\n });\n }", "public ParametersBuilder setAllowAudioMixedSampleRateAdaptiveness(\n boolean allowAudioMixedSampleRateAdaptiveness) {\n this.allowAudioMixedSampleRateAdaptiveness = allowAudioMixedSampleRateAdaptiveness;\n return this;\n }", "public void setWavelength(float wavelength) {\n/* 61 */ this.wavelength = wavelength;\n/* */ }", "public void setAudioFormat(AudioFormat audioFormat) {\n this.mAudioFormat = audioFormat;\n }", "public void setRate(Integer rate) {\r\n this.rate = rate;\r\n }", "public void setAudioPort(int port);", "public void setSoundAmbience(final boolean sAmbience) { soundAmbience = sAmbience; }", "public void setSound(Sound sound) {\n\t\ts = sound;\n\t}", "public void emitSample(double d) {\n int val = 0;\n if (d > 1.0) d = 1.0;\n if (d < 0.0) d = 0.0;\n d -= 0.5;\n\n val = (int) (d * 65536);\n if (val > 32767) val = 32767;\n if (val < -32768) val = -32768; \n\n audioBuffer[buffpos] = (byte) (val & 255);\n audioBuffer[buffpos + 1] = (byte) ((val >> 8) & 255);\n buffpos += 2;\n if (buffpos + 1 >= BATCH_SIZE) {\n sdl.write(audioBuffer, 0, buffpos);\n buffpos = 0;\n }\n }", "public void setAmplitude(float amplitude) {\n/* 79 */ this.amplitude = amplitude;\n/* */ }", "public void setSoundPitch(float soundPitch) {\n _soundPitch = soundPitch;\n }", "@Field(7) \n\tpublic int sample_rate() {\n\t\treturn this.io.getIntField(this, 7);\n\t}", "public void set_sampleCnt(long value) {\n setUIntBEElement(offsetBits_sampleCnt(), 32, value);\n }", "public void setFrequency(int f){\n this.frequency = f;\n }", "public void setSound(Boolean sound_on){\n this.sound_on = sound_on;\n }", "@Override\r\n\tpublic void setAudioFormat(AudioFormat format) {\r\n\r\n\t}", "@Override\n public Builder sampling(double sampling) {\n super.sampling(sampling);\n return this;\n }", "public void setRate(double newRate) {\n this.rate = newRate;\n }", "public void setSynth(Synthesizer synth) {\n\t\tthis.synth = synth;\n\t}", "public abstract void setRate();", "void setSound(boolean b){\r\n\t\tgc.setSound(b);\r\n\t}", "public void set(float signal);", "public void setFrameRate(Integer frameRate) {\n this.frameRate = frameRate;\n }", "public void setLearningRate(final double rate) {\n\t\tthis.learningRate = rate;\n\t}", "public void setRate(float wpm) {\n\tif (wpm > 0 && wpm < 1000) {\n\t setDurationStretch(nominalRate / wpm);\n\t}\n }", "public void addSample(double value){\n num_samples += 1;\n signal = signal*damping + value;\n }", "public void setQuality(float quality);", "public synchronized void setAudioFormat(AudioFormat format) {\n currentFormat = format;\n }", "@Override // com.oculus.modules.codegen.PreferencesStoreModule\n public void setHandTrackingOverrideFrequencyImpl(double value) {\n Log.i(TAG, \"SETTING hand_tracking_override_frequency to \" + value);\n this.mPreferencesManager.set(HAND_TRACKING_OVERRIDE_FREQUENCY_PREF_KEY, (int) value);\n }", "public void setClockRate(double clockRate) {\r\n CompUtils.checkLessThanEqZero(clockRate);\r\n this.clockRate = clockRate;\r\n }", "public void setConstantSamples(String sourceEntry);", "public void setSound(String filename) {\n\t\ts = new Sound(filename);\n\t}", "public void setFrameRate(float aValue) { setInterval(Math.round(1000/aValue)); }", "public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }", "void setSampleFiltering(boolean filterFlag, float cutoffFreq) {\n }", "public FXImageSink requestFrameRate(double rate) {\n requestRate = (int) Math.round(rate);\n sink.setCaps(Caps.fromString(buildCapsString()));\n return this;\n }", "public void setMicGainDb(float level);", "void setPWMRate(double rate);", "public void setSensitivity(int s)\n\t{\n\t\tif (s < 0)\n\t\t{\n\t\t\tMinim.error(\"BeatDetect: sensitivity cannot be less than zero. Defaulting to 10.\");\n\t\t\tsensitivity = 10;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsensitivity = s;\n\t\t}\n\t}", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public void setSpeed(int hz) {\n this.interval = 1000000000L / hz;\n if (!stopped.get()) {\n this.stop(); \n this.start();\n }\n }", "public void setSpeed(double multiplier);", "public Builder setRandomSampling(io.envoyproxy.envoy.type.v3.FractionalPercent value) {\n if (randomSamplingBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n randomSampling_ = value;\n onChanged();\n } else {\n randomSamplingBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Builder setSampleRateHertz(int value) {\n\n sampleRateHertz_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }", "@Test\n public void invalidSampleRateDoesNotChangeFrameRate() {\n AudioConfigManager.setSampleRate(16000f);\n assertEquals(AudioFormatConfig.frameRate, AudioFormatConfig.sampleRate);\n // set invalid sample rate\n try {\n AudioConfigManager.setSampleRate(12345f);\n } catch (Exception e) {\n // this will throw but should not change sample rate or frame rate\n }\n assertEquals(AudioFormatConfig.sampleRate, 16000f);\n assertEquals(AudioFormatConfig.frameRate, 16000f);\n }", "@java.lang.Override\n public int getSampleRateHertz() {\n return sampleRateHertz_;\n }", "public void setSuperSampling(boolean flag) {\n\t\tthis.supersampling = flag;\n\t}", "@Override\n public void onAudioSamples(IAudioSamplesEvent event) {\n\n /*\n * -----------------------------------------------------------------------------------\n * !!! LAB EXERCISE !!!\n * -----------------------------------------------------------------------------------\n * 1. Create a 'ShortBuffer' and point it to the incoming audio samples.\n * Hint: Use 'event.getAudioSamples().getByteBuffer().asShortBuffer()'\n *\n * 2. Loop over the buffer values from 0 to 'buffer.limit()' and access each buffer\n * value using 'buffer.get'\n * Hint: 'buffer.get' gets the sample values as a 'short'\n *\n * 3. Multiply each buffer value by the 'multiplier' (which is a double) then place the\n * resultant value back into the buffer using 'buffer.put'\n * Hint: You may need to cast the data to a 'short' value\n */\n\n // ===================================================================================\n // *** YOUR CODE HERE ***\n ShortBuffer buffer = event.getAudioSamples().getByteBuffer().asShortBuffer();\n\n for (int i = 0; i < buffer.limit(); ++i)\n {\n buffer.put((short)(buffer.get(i) * this.multiplier));\n }\n // ===================================================================================\n\n // Finally, pass the adjusted event to the next tool\n super.onAudioSamples(event);\n }", "public void setAAALethalityRate(int value) {\n this.aaaLethalityRate = value;\n }", "private void initAudioFormat() {\n\t\tfloat rate = 44100.0f;\n\t\t//float rate = 8000.0f;\n\t\t//int sampleSize = 8;\n\t\tint sampleSize = 16;\n\t\tint channels = 1;\n\t\tboolean bigEndian = true;\n\n\t\taudioFormat = new AudioFormat(rate, sampleSize, channels, bigEndian, bigEndian);\n\t\t// audioFormat = new AudioFormat(encoding, rate, sampleSize, channels, (sampleSize / 8)\n\t\t// * channels, rate, bigEndian);\n\n\t}", "public void setFPS(double frequency) {\n\t\tif (frequency > MAX_FREQUENCY) {\n\t\t\tfrequency = MAX_FREQUENCY;\n\t\t}\n\t\tif (frequency < MIN_FREQUENCY) {\n\t\t\tfrequency = MIN_FREQUENCY;\n\t\t}\n\t\tthis.frequency = frequency;\n\t}" ]
[ "0.7329726", "0.71364874", "0.71234834", "0.71152115", "0.71073765", "0.6913346", "0.6894639", "0.65691197", "0.62756443", "0.62352556", "0.6170063", "0.61694086", "0.61321884", "0.60824406", "0.60744387", "0.60299647", "0.6017284", "0.59881973", "0.5985753", "0.5981115", "0.59673375", "0.5907701", "0.59046423", "0.58970416", "0.58599454", "0.58247864", "0.5750331", "0.57482153", "0.5707132", "0.56969607", "0.56437474", "0.5638676", "0.5605119", "0.55450404", "0.5542695", "0.5542695", "0.5530117", "0.55185556", "0.5516863", "0.5514998", "0.55076444", "0.54958457", "0.549062", "0.547413", "0.5449582", "0.5443271", "0.54430777", "0.5424752", "0.53685576", "0.53677565", "0.53612024", "0.535125", "0.5348586", "0.53476274", "0.5341354", "0.53347844", "0.5328057", "0.5323993", "0.53237104", "0.5305129", "0.52990794", "0.52800304", "0.5279998", "0.52507037", "0.5231616", "0.5231408", "0.5226468", "0.5202253", "0.519324", "0.5187512", "0.5155509", "0.5153628", "0.5151564", "0.5148039", "0.5147086", "0.5130753", "0.5127438", "0.5113193", "0.5110736", "0.5107124", "0.51060766", "0.51043403", "0.50970984", "0.50905395", "0.508062", "0.5079494", "0.5063057", "0.5058162", "0.5052777", "0.50475156", "0.5032719", "0.50183606", "0.5013261", "0.5007662", "0.5004945", "0.49965316", "0.49935713", "0.49913654", "0.4986471", "0.49827886" ]
0.60432285
15
Returns the audio sampling rate of audio essence described by this sound descriptor.
public Rational getAudioSampleRate();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSamplingRate( ) {\r\n return samplingRate;\r\n }", "@Field(7) \n\tpublic int sample_rate() {\n\t\treturn this.io.getIntField(this, 7);\n\t}", "public int getAudioSampleRate() {\n\t\treturn mSampleRate;\n\t}", "public int getSamplingRate() {\n return samplingRate;\n }", "public int getSampleRate() {\n for (int rate : new int[]{8000, 11025, 16000, 22050, 44100, 48000}) {\n int buffer = AudioRecord.getMinBufferSize(rate, channel_in, format);\n if (buffer > 0)\n return rate;\n }\n return -1;\n }", "public int getSampleRate() {\n return sampleRate;\n }", "public Integer getSampleRate() {\n return this.sampleRate;\n }", "public float getSampleRate();", "public long getSampleCount() {\r\n\t\tif (audioFile != null) {\r\n\t\t\treturn audioFile.getEffectiveDurationSamples();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public int getAudioSampleSize() {\n\t\treturn mSampleSize;\n\t}", "public float getSpeechRate() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n return Float.valueOf(preferences.getString(\"speech_rate\", \"\"));\n }", "public int getSampleRate() {\n return 0;\n }", "public int getSampleRate() {\r\n\treturn SAMPLES_IN_SECOND;\r\n}", "public AudioDescriptor getAudioDescriptor();", "public float getFrequency() {\n Integer sR = (Integer)sampleRate.getSelectedItem();\n int intST = sR.intValue();\n int intFPW = framesPerWavelength.getValue();\n\n return (float)intST/(float)intFPW;\n }", "public int getAudioDscp();", "public Double bytesPerSecond()\n\t{\n\t\treturn getValue(DataRateUnit.BYTES_PER_SEC);\n\t}", "public long getMeasFrequencyHz() {\r\n return measFrequencyHz;\r\n }", "public abstract double samplingFrequency();", "public long getSamplingPeriod();", "public long get_sampleCnt() {\n return (long)getUIntBEElement(offsetBits_sampleCnt(), 32);\n }", "public float getCountRate() {\n return countMonitor.getRate();\n }", "public int getSamplingSeconds() {\n return samplingSeconds;\n }", "@Field(4) \n\tpublic AVRational sample_aspect_ratio() {\n\t\treturn this.io.getNativeObjectField(this, 4);\n\t}", "public static double[] rawFreqCreator(){\n\t\tfinal int EXTERNAL_BUFFER_SIZE = 2097152;\n\t\t//128000\n\n\t\t//Get the location of the sound file\n\t\tFile soundFile = new File(\"MoodyLoop.wav\");\n\n\t\t//Load the Audio Input Stream from the file \n\t\tAudioInputStream audioInputStream = null;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(soundFile);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Get Audio Format information\n\t\tAudioFormat audioFormat = audioInputStream.getFormat();\n\n\t\t//Handle opening the line\n\t\tSourceDataLine\tline = null;\n\t\tDataLine.Info\tinfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n\t\ttry {\n\t\t\tline = (SourceDataLine) AudioSystem.getLine(info);\n\t\t\tline.open(audioFormat);\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Start playing the sound\n\t\t//line.start();\n\n\t\t//Write the sound to an array of bytes\n\t\tint nBytesRead = 0;\n\t\tbyte[]\tabData = new byte[EXTERNAL_BUFFER_SIZE];\n\t\twhile (nBytesRead != -1) {\n\t\t\ttry {\n\t\t \t\tnBytesRead = audioInputStream.read(abData, 0, abData.length);\n\n\t\t\t} catch (IOException e) {\n\t\t \t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (nBytesRead >= 0) {\n\t\t \t\tint nBytesWritten = line.write(abData, 0, nBytesRead);\n\t\t\t}\n\n\t\t}\n\n\t\t//close the line \n\t\tline.drain();\n\t\tline.close();\n\t\t\n\t\t//Calculate the sample rate\n\t\tfloat sample_rate = audioFormat.getSampleRate();\n\t\tSystem.out.println(\"sample rate = \"+sample_rate);\n\n\t\t//Calculate the length in seconds of the sample\n\t\tfloat T = audioInputStream.getFrameLength() / audioFormat.getFrameRate();\n\t\tSystem.out.println(\"T = \"+T+ \" (length of sampled sound in seconds)\");\n\n\t\t//Calculate the number of equidistant points in time\n\t\tint n = (int) (T * sample_rate) / 2;\n\t\tSystem.out.println(\"n = \"+n+\" (number of equidistant points)\");\n\n\t\t//Calculate the time interval at each equidistant point\n\t\tfloat h = (T / n);\n\t\tSystem.out.println(\"h = \"+h+\" (length of each time interval in second)\");\n\t\t\n\t\t//Determine the original Endian encoding format\n\t\tboolean isBigEndian = audioFormat.isBigEndian();\n\n\t\t//this array is the value of the signal at time i*h\n\t\tint x[] = new int[n];\n\n\t\t//convert each pair of byte values from the byte array to an Endian value\n\t\tfor (int i = 0; i < n*2; i+=2) {\n\t\t\tint b1 = abData[i];\n\t\t\tint b2 = abData[i + 1];\n\t\t\tif (b1 < 0) b1 += 0x100;\n\t\t\tif (b2 < 0) b2 += 0x100;\n\t\t\tint value;\n\n\t\t\t//Store the data based on the original Endian encoding format\n\t\t\tif (!isBigEndian) value = (b1 << 8) + b2;\n\t\t\telse value = b1 + (b2 << 8);\n\t\t\tx[i/2] = value;\n\t\t\t\n\t\t}\n\t\t\n\t\t//do the DFT for each value of x sub j and store as f sub j\n\t\tdouble f[] = new double[n/2];\n\t\tfor (int j = 0; j < n/2; j++) {\n\n\t\t\tdouble firstSummation = 0;\n\t\t\tdouble secondSummation = 0;\n\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t \t\tdouble twoPInjk = ((2 * Math.PI) / n) * (j * k);\n\t\t \t\tfirstSummation += x[k] * Math.cos(twoPInjk);\n\t\t \t\tsecondSummation += x[k] * Math.sin(twoPInjk);\n\t\t\t}\n\n\t\t f[j] = Math.abs( Math.sqrt(Math.pow(firstSummation,2) + \n\t\t Math.pow(secondSummation,2)) );\n\n\t\t\tdouble amplitude = 2 * f[j]/n;\n\t\t\tdouble frequency = j * h / T * sample_rate;\n\t\t\tSystem.out.println(\"frequency = \"+frequency+\", amp = \"+amplitude);\n\t\t}\n\t\tSystem.out.println(\"DONE\");\n\t\treturn f;\n\t\t\n\t}", "public float getSoundPitch() {\n return _soundPitch;\n }", "@java.lang.Override\n public int getSampleRateHertz() {\n return sampleRateHertz_;\n }", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "public float getRate() {\n\treturn durationStretch * nominalRate;\n }", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "public SampleMode getSampleMode();", "int getSampleMs();", "public float getFrequency() { \n \treturn mouseJointDef.frequencyHz; \n }", "long getDuration() {\n if (debugFlag)\n debugPrintln(\"JSChannel:getDuration\");\n\n if (ais == null || audioFormat == null ) {\n if (debugFlag)\n debugPrintln(\"JSChannel: Internal Error getDuration\");\n return (long)Sample.DURATION_UNKNOWN;\n }\n // Otherwise we'll assume that we can calculate this duration\n\n // get \"duration\" of audio stream (wave file)\n // TODO: For True STREAMing audio the size is unknown...\n long numFrames = ais.getFrameLength();\n if (debugFlag)\n debugPrintln(\" frame length = \" + numFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n\n float rateInFrames = audioFormat.getFrameRate();\n rateInHz = audioFormat.getSampleRate();\n if (debugFlag)\n debugPrintln(\" rate in Frames = \" + rateInFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n long duration = (long)((float)numFrames/rateInFrames);\n if (debugFlag)\n debugPrintln(\" duration(based on ais) = \" + duration);\n return duration;\n }", "@java.lang.Override\n public int getSampleRateHertz() {\n return sampleRateHertz_;\n }", "public int getReSampleRate() {\n return 0;\n }", "public static int sampleRate(@NonNull String path)\n {\n JSONObject json = fileMetadata(path);\n\n if (json == null)\n {\n return -1;\n }\n\n try\n {\n JSONArray streams = json.optJSONArray(\"streams\");\n JSONObject stream = streams.optJSONObject(0);\n\n return stream.optInt(\"sample_rate\", -1);\n }\n catch (Exception exc)\n {\n exc.printStackTrace();\n return -1;\n }\n }", "public Double bitsPerSecond()\n\t{\n\t\treturn getValue(DataRateUnit.BITS_PER_SEC);\n\t}", "float getFrequency();", "public Float getSpeechDrpr() {\n return speechDrpr;\n }", "@Override\r\n\tpublic float soundLevel() {\n\t\treturn 1f;\r\n\t}", "public double readSoundSetting() {\n try {\n BufferedReader soundReader = new BufferedReader(\n new FileReader(new File(wnwData, \"settings.dat\")));\n String soundSetting = soundReader.readLine();\n Scanner soundScanner = new Scanner(soundSetting);\n return Double.parseDouble(soundScanner.next());\n }\n catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e){\n e.printStackTrace();\n }\n return 0;\n }", "public int getAvgSpec() {\n return totalSpec/totalMatches;\n }", "long getSamplePeriod();", "public int nSamples() {\n return samples.nSamples();\n }", "public int getSampleSize() {\n return sampleSize;\n }", "public int getSampleSize(){\n\t\treturn sampleSize;\n\t}", "public io.envoyproxy.envoy.type.v3.FractionalPercent getRandomSampling() {\n if (randomSamplingBuilder_ == null) {\n return randomSampling_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : randomSampling_;\n } else {\n return randomSamplingBuilder_.getMessage();\n }\n }", "public double getRate() {\r\n\t\treturn (getRate(0)+getRate(1))/2.0;\r\n\t}", "public DataSource getAudioSource();", "public final String getSound( ) {\n\t\treturn sound;\n\t}", "public void setAudioSamplingRate(int audioSamplingRate) {\n this.audioSamplingRate = audioSamplingRate;\n }", "public io.envoyproxy.envoy.type.v3.FractionalPercent getOverallSampling() {\n if (overallSamplingBuilder_ == null) {\n return overallSampling_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : overallSampling_;\n } else {\n return overallSamplingBuilder_.getMessage();\n }\n }", "public float getByteRate() {\n return byteMonitor.getRate();\n }", "public float getSoundVolume() {\n return _soundVolume;\n }", "public int getCombatDensityRate() {\n return combatDensityRate;\n }", "protected float getSoundVolume()\n {\n return 0.4F;\n }", "public int getSoundType() \n\t{\n\treturn fType;\n\t}", "public long getSampleFrameLength() {\n\t\treturn ais.getFrameLength();\n\t}", "private AudioFormat getAudioFormat() {\n float sampleRate = 16000.0F;\n int sampleSizeInBits = 16;\n int channels = 1;\n boolean signed = true;\n boolean bigEndian = false;\n return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian);\n }", "private float calculateSensorFrequency() {\n if (startTime == 0) {\n startTime = System.nanoTime();\n }\n\n long timestamp = System.nanoTime();\n\n // Find the sample period (between updates) and convert from\n // nanoseconds to seconds. Note that the sensor delivery rates can\n // individually vary by a relatively large time frame, so we use an\n // averaging technique with the number of sensor updates to\n // determine the delivery rate.\n float hz = (count++ / ((timestamp - startTime) / 1000000000.0f));\n\n return hz;\n }", "protected double getDataRate() {\n\t\treturn (double) getThroughput() / (double) getElapsedTime();\n\t}", "public Double radiansPerSecond()\n\t{\n\t\treturn getValue(AngularVelocityUnit.RADIANS_PER_SEC);\n\t}", "public int getSoundChannel() \n\t{\n\treturn fSoundChannel;\n\t}", "public int getBytesPerSample();", "int getSoundLen(File sndFile) {\n\t\tif (sndFile == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tAudioInputStream audioInputStream;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(sndFile);\n\t\t\tAudioFormat format = audioInputStream.getFormat();\n\t\t\tlong frames = audioInputStream.getFrameLength();\n\t\t\taudioInputStream.close();\n\t\t\treturn (int) (frames / format.getFrameRate());\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Horrible hack blew up, karma\", e);\n\t\t\treturn 0;\n\t\t}\n\t}", "public int freq()\n\t{\n\t\treturn _lsPeriod.get (0).freq();\n\t}", "protected float getSoundVolume()\n\t{\n\t\treturn 1F;\n\t}", "@Override\n public double getEngineSound() {\n return decoratedEngine.getEngineSound() * .6;\n }", "public io.envoyproxy.envoy.type.v3.FractionalPercent getClientSampling() {\n if (clientSamplingBuilder_ == null) {\n return clientSampling_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : clientSampling_;\n } else {\n return clientSamplingBuilder_.getMessage();\n }\n }", "public int samplesOnePixel() {\r\n\t\tif (getGraphWidth() > 0) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn section.getLength() / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "public final double getSd()\r\n\t{\r\n\t\treturn sd;\r\n\t}", "public float getFramesPerSecond() {\n return 1 / frametime;\n }", "@java.lang.Override\n public io.envoyproxy.envoy.type.v3.FractionalPercent getRandomSampling() {\n return randomSampling_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : randomSampling_;\n }", "public Double terabytesPerSecond()\n\t{\n\t\treturn getValue(DataRateUnit.TERABYTES_PER_SEC);\n\t}", "public float getMicGainDb();", "public int getAudiobitrate() {\n return audiobitrate;\n }", "@java.lang.Override\n public io.envoyproxy.envoy.type.v3.FractionalPercent getOverallSampling() {\n return overallSampling_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : overallSampling_;\n }", "public double getWaveAvg() {\n\t\t\treturn avgWaveDist;\n\t\t}", "public Double getFrequency() {\n return frequency;\n }", "public Sound getSoundDying() {\n return soundDying;\n }", "public int /* sound_sample */output() {\n\t\treturn Vo;\n\t}", "public int getThisDataRate(){\r\n\t\tString option = (String) comboBox.getSelectedItem();\r\n\t\tif (option.equals(\"250kbs\")){\r\n\t\t\tdataRate = 0;\r\n\t\t}else if(option.equals(\"1mbs\")){\r\n\t\t\tdataRate = 1;\r\n\t\t}else{\r\n\t\t\tdataRate = 2;\r\n\t\t}\r\n\t\treturn dataRate;\r\n\t}", "@Override\n\tprotected float getSoundPitch() {\n\t\t// note: unused, managed in playSound()\n\t\treturn 1;\n\t}", "@Override\n\tpublic Float getFrequency() {\n\t\treturn 3.8f;\n\t}", "public double sampleStandardDeviation() {\n/* 288 */ return Math.sqrt(sampleVariance());\n/* */ }", "public int getLength() { \r\n return audioLength; \r\n }", "public float getRate() {\n\t\treturn rate;\n\t}", "public int getNumberOfSpectraPerFraction() {\n return numberOfSpectraPerFraction;\n }", "public double getRate() {\n\t\treturn rate;\n\t}", "public double getBandWidth() {\n\t\treturn bw * _mySampleRate;\n\t}", "public double getSd() {\n return sd;\n }", "protected double samplesOnePixelF() {\r\n\t\tif (getGraphWidth() > 1) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn ((double) section.getLength()) / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1.0;\r\n\t}", "public String getDescriptor()\r\n {\r\n return soundFileDescriptor;\r\n }", "public int levelSpec() {\n int avg = 0;\n for (int i = 0; i < spec.length; i++) {\n avg += (int) spec[i];\n }\n return avg / 8192;\n }", "public double getRawFrequency() {\n return rawFrequency;\n }", "public int getRate() {\n return rate_;\n }", "protected double getHPS() {\n\t\t\treturn this.getHealing() / this.castPeriod;\n\t\t}", "public JSlider getFramesPerWavelengthSlider() {\n return framesPerWavelength;\n }", "public float getPlaybackGainDb();" ]
[ "0.7167871", "0.70838475", "0.70141596", "0.69526184", "0.6855609", "0.68549335", "0.67855066", "0.67706484", "0.655316", "0.6536773", "0.65166736", "0.64416033", "0.6438606", "0.64268726", "0.6422461", "0.60944057", "0.6090739", "0.60732895", "0.6064082", "0.60346", "0.6015438", "0.59724426", "0.59566605", "0.5956514", "0.591902", "0.5910174", "0.5892194", "0.5887663", "0.58647275", "0.5863017", "0.5862769", "0.5860756", "0.5859497", "0.58345187", "0.58203036", "0.5778187", "0.5774749", "0.57697165", "0.5756403", "0.5754375", "0.5752917", "0.5735408", "0.57279754", "0.57197535", "0.56704736", "0.56423074", "0.56147325", "0.5608704", "0.5608639", "0.5595679", "0.5588263", "0.55714893", "0.55670005", "0.5555611", "0.55448484", "0.5536991", "0.5523559", "0.55229545", "0.5518923", "0.55119073", "0.5510739", "0.550758", "0.5506118", "0.55030274", "0.5502472", "0.5501039", "0.54918075", "0.5486323", "0.5481237", "0.5474381", "0.5473479", "0.5463034", "0.54579675", "0.54541546", "0.54496664", "0.544911", "0.5446237", "0.5441382", "0.5434469", "0.5430397", "0.5430357", "0.54279274", "0.54136264", "0.53939396", "0.53929925", "0.539227", "0.539025", "0.53889525", "0.5387208", "0.53858757", "0.5384166", "0.53731716", "0.5372624", "0.53723955", "0.5371617", "0.53711873", "0.5370779", "0.5365209", "0.5361445", "0.53534544" ]
0.7502391
0
Sets the locked flag for the audio essence described this sound descriptor, which indicates whether the number of samples per frame is locked. Set this optional property to null to omit it.
public void setIsLocked( @Bool Boolean locked);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLocked(boolean locked)\n\t{\n\t\tthis.locked = locked;\n\t}", "public void setLocked(boolean value) {\n\t\tisLocked = value;\n\t}", "public final void setLocked(final boolean lockedNew) {\n this.locked = lockedNew;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void lock() {\n\t\tlocked = true;\n\t}", "public void SetIsLock(boolean isLock)\n {\n this._lock = isLock;\n }", "public void setLockEnabled(boolean lockEnabled) {\r\n\t\tthis.lockEnabled = lockEnabled;\r\n\t}", "public boolean soundResourcesLocked();", "void setUserLocked(boolean b);", "@Override\r\n\tpublic void onLock(boolean lock) {\n\t\tthis.lock = lock;\r\n\t}", "void setValueLocked(boolean valueLocked);", "public void setPoolLocked(boolean lockingState){poolLocked=lockingState;}", "public void setShifterLocked(boolean isLocked) {\n isShifterLocked = isLocked;\n }", "public void setLockNum(Long lockNum) {\n this.lockNum = lockNum;\n }", "@Override\n\tpublic boolean isLocked() { return true; }", "public final void setSelectingLocked(boolean selectingLocked) {\n this.selectingLocked = selectingLocked;\n }", "public void setDefaultLocked(boolean systemLocked)\n\t{\n\t\tthis.defaultLocked = systemLocked;\n\t}", "public void setMuteDisabeld(boolean checked) {\n volumeControl.disable(checked);\r\n }", "public void setExportLock(java.lang.Boolean value);", "public void reset(){\n\t\topen[0]=false;\n\t\topen[1]=false;\n\t\topen[2]=false;\n\t\tcount = 0;\n\t\t//System.out.println(\"The lock has been reset.\");\n\t}", "public void setLocked(boolean locked) {\n if (locked) {\n display = imgLockedMouseOver;\n isLocked = true;\n } else {\n display = imgUnlockedMouseOver;\n isLocked = false;\n }\n repaint();\n }", "void lockGranted(LockHandle lockHandle);", "@Test\r\n\tpublic final void testSetLock() {\r\n\t\tlistener.setLock();\r\n\t\tassertFalse(\"Listener should be locked\",listener.isLocked());\r\n\t}", "public void setSoundAmbience(final boolean sAmbience) { soundAmbience = sAmbience; }", "void setShowUnlockOption(boolean b);", "public void lockGame() {\n this.isLocked = true;\n btnLockGame.setEnabled(false);\n }", "protected void setObjectHeld(boolean oHeld) { objHeld = oHeld; }", "public void setUnblockable(boolean blockable);", "public void setTmpLock(boolean tmpLock) {\n \t\tthis.tmpLock = tmpLock;\n \t}", "public void lock() {\n islandLocked = true;\n }", "public boolean isLocked() {\r\n \treturn false;\r\n }", "public void setLockStatus(long lockStatus) {\r\n this.lockStatus = lockStatus;\r\n }", "@Pointcut(value = \"@annotation(lock)\", argNames = \"lock\")\n public void lockPointcut(Lock lock) {\n }", "@Override\n \tpublic void setInputLock(boolean lock) {\n \t\tselector.getSuggestBox().getTextBox().setReadOnly(lock);\n \t}", "public void setIsFileLocked(boolean isFileLocked) {\n this.isFileLocked = isFileLocked;\n }", "@NonNull\n public T setLockOrientation(boolean lockOrientation) {\n mLockOrientation = lockOrientation;\n return (T) this;\n }", "public boolean lock(final boolean readOnly) throws IOException {\n\t\tif (isOpen() && lock == null) {\n\t\t\tlock = fileChannel.lock(0L, Long.MAX_VALUE, readOnly);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic void lock() {\n\t\tSystem.out.println(\"Card in ATM1 is locked !\");\n\t}", "public void setDoorIsLocked(boolean isLocked)\n {\n this.isLocked = isLocked;\n }", "public void lock() {\n\n }", "public void enablePropertyMute()\n {\n iPropertyMute = new PropertyBool(new ParameterBool(\"Mute\"));\n addProperty(iPropertyMute);\n }", "public void setGlobLock(java.lang.String globLock) {\r\n this.globLock = globLock;\r\n }", "public boolean isLocked() { return RMUtils.boolValue(get(\"Locked\")); }", "public void setMute(boolean mute);", "public void setProtection(boolean value);", "@ApiModelProperty(required = true, value = \"1APP8 Managed administrative status\")\n @JsonProperty(\"locked\")\n public Boolean getLocked() {\n return locked;\n }", "public boolean isLocked();", "public boolean isLocked() {\r\n return isLocked;\r\n }", "public void pauseRotationLocked() {\n this.mDeferredRotationPauseCount++;\n }", "public boolean getLocked() {\n\t\treturn isLocked;\n\t}", "public void setAudioDescriptor( AudioDescriptor audioDescriptor );", "public boolean isLocked() {\n return mLocked;\n }", "public boolean isLocked() {\n return mLocked;\n }", "public final void rule__LockJointStatement__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2959:1: ( ( 'lock' ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2960:1: ( 'lock' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2960:1: ( 'lock' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2961:1: 'lock'\n {\n before(grammarAccess.getLockJointStatementAccess().getLockKeyword_0()); \n match(input,31,FOLLOW_31_in_rule__LockJointStatement__Group__0__Impl6192); \n after(grammarAccess.getLockJointStatementAccess().getLockKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public boolean isLocked()\n\t{\n\t\treturn locked;\n\t}", "public void setSoundShot(final boolean sShot) { soundShot = sShot; }", "public final boolean getLocked() {\n return locked;\n }", "public boolean isLocked() {\n return isLocked;\n }", "void setProtection(boolean value);", "public boolean getPropertyMute();", "@Override\n public boolean isLocked(Object o) {\n return false;\n }", "public void setLockKey( Long lockKey ) {\n this.lockKey = lockKey;\n }", "public final long lock() {\n explicitlyLocked = true;\n return byteBase.longLockPointer();\n }", "public void openLock(){\n /*Code to send an unlocking signal to the physical device Gate*/\n }", "public boolean isLockEnabled() {\r\n\t\treturn lockEnabled;\r\n\t}", "protected void lock() {\n semaphore = new Semaphore(0);\n try {\n semaphore.acquire();\n }\n catch(InterruptedException e) {\n System.out.println(\"Trouble for request of semaphore acquirement\");\n e.printStackTrace();\n }\n }", "public boolean isLocked() {\n\t\treturn isLocked;\n\t}", "void unlockWrite(long stamp);", "public void lock() {\r\n super.lock();\r\n }", "public @Bool boolean isLocked()\r\n\t\tthrows PropertyNotPresentException;", "public void setLocked(boolean locked, Connection conn) throws SQLException, NotLoadedException {\n SqlUpdateCommand sqlUpdateCommand = new SqlUpdateCommand(\"Person\", \"\\\"Username\\\" = '\" + userName.getValue() + \"'\");\n sqlUpdateCommand.addBooleanValue(\"Locked_YN\", locked);\n conn.createStatement().execute(sqlUpdateCommand.toString());\n this.locked.setValueOnLoadedObject(locked);\n }", "public DBMaker disableLocking(){\n this.lockingDisabled = true;\n return this;\n }", "public void setExclusive() {\n\t\tthis.exclusive = true;\n\t}", "@Override\n public void setLockOwner(Object lockOwner) {\n }", "public boolean setPropertyMute(boolean aValue);", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public boolean isLock() {\n return isLock;\n }", "public DiscoveryItem setUnlockedByDefault(boolean state) {\n this.unlockedByDefault = state;\n return this;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public void iOpenLockedSourceAndChannel() {\n\t\t// TODO open locked source or Channel.\n\t\tmTvOutput = mTVInputManager.getDefaultOutput();\n\t\tmTv.unblock(mTvOutput.getName());\n\t}", "public void setSoundEnabled(final boolean sEnabled) { soundEnabled = sEnabled; }", "public void setMediaEncryptionMandatory(boolean m);", "public void lockAdd(){\n\t\tthis.canAdd = false;\n\t}", "public void lock() {\n if (!locked) {\n locked = true;\n sortAndTruncate();\n }\n }", "protected final void lock(boolean writeLock) {\n Lock lock = writeLock ? m_lock.writeLock() : m_lock.readLock();\n lock.lock();\n }", "public boolean getSoundAmbience() { return soundAmbience; }", "public void setMuted(boolean b)\n\t{\n\t\tm_isMuted = b;\n\t}", "public @Bool boolean getLocked()\n\t\tthrows PropertyNotPresentException;", "public void setLockId(String lockId) {\n this.lockId = lockId;\n }", "Update withLevel(LockLevel level);", "public void enablePropertyVolumeLimit()\n {\n iPropertyVolumeLimit = new PropertyUint(new ParameterUint(\"VolumeLimit\"));\n addProperty(iPropertyVolumeLimit);\n }", "public final void rule__LockDoFStatement__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:3247:1: ( ( 'lock' ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:3248:1: ( 'lock' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:3248:1: ( 'lock' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:3249:1: 'lock'\n {\n before(grammarAccess.getLockDoFStatementAccess().getLockKeyword_0()); \n match(input,31,FOLLOW_31_in_rule__LockDoFStatement__Group__0__Impl6757); \n after(grammarAccess.getLockDoFStatementAccess().getLockKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "void acquireDatasetExclusiveModificationLock(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;", "public boolean getMute();" ]
[ "0.67260885", "0.609486", "0.58972794", "0.5873111", "0.5873111", "0.5873111", "0.5732485", "0.570612", "0.57004786", "0.56972826", "0.55118114", "0.5464027", "0.5450532", "0.5443178", "0.5418735", "0.53666437", "0.5351603", "0.5311412", "0.5308476", "0.5281011", "0.52426976", "0.51508176", "0.51485676", "0.5136688", "0.5101159", "0.5082785", "0.5070225", "0.5065235", "0.5040347", "0.50358725", "0.5028016", "0.50101525", "0.50067717", "0.50031155", "0.49841356", "0.49818894", "0.49712312", "0.49668366", "0.49564976", "0.49493432", "0.49383876", "0.49361414", "0.4925241", "0.490771", "0.48806956", "0.4879237", "0.4878801", "0.48734978", "0.48666555", "0.4866144", "0.48634297", "0.4863007", "0.48612133", "0.48424307", "0.48424307", "0.48284075", "0.48233646", "0.4814175", "0.48072973", "0.4801915", "0.48018962", "0.4796529", "0.47901303", "0.47883812", "0.47638717", "0.4762549", "0.4761539", "0.4752049", "0.4744793", "0.47424752", "0.4741081", "0.4732145", "0.47276905", "0.47198382", "0.47196954", "0.471692", "0.4714436", "0.4712728", "0.4712728", "0.4712728", "0.47070792", "0.46984804", "0.46933493", "0.46933493", "0.46933493", "0.46915278", "0.46882573", "0.46688184", "0.4667133", "0.46602383", "0.4654128", "0.46502197", "0.4646293", "0.4645837", "0.4645762", "0.4642888", "0.4638131", "0.46377352", "0.46337435", "0.46337047" ]
0.5968228
2
Returns the locked flag for the audio essence described by this sound descriptor, which indicates whether the number of samples per frame is locked. This property is optional.
public @Bool boolean isLocked() throws PropertyNotPresentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean soundResourcesLocked();", "public Integer getLockFlag() {\n return lockFlag;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public boolean isLocked() { return RMUtils.boolValue(get(\"Locked\")); }", "public boolean getLocked() {\n\t\treturn isLocked;\n\t}", "public final boolean getLocked() {\n return locked;\n }", "public boolean isLocked();", "public boolean isLocked() {\n return mLocked;\n }", "public boolean isLocked() {\n return mLocked;\n }", "public boolean GetIsLock()\n {\n return this._lock;\n }", "public boolean isLocked() {\r\n return isLocked;\r\n }", "public boolean isLocked() {\n return isLocked;\n }", "public boolean isLocked()\n\t{\n\t\treturn locked;\n\t}", "public boolean isLock() {\n return isLock;\n }", "public boolean getSoundAmbience() { return soundAmbience; }", "boolean isLocked();", "boolean isLocked();", "public boolean isLockEnabled() {\r\n\t\treturn lockEnabled;\r\n\t}", "public boolean isLocked() {\n\t\treturn isLocked;\n\t}", "public boolean isLocked() {\r\n \treturn false;\r\n }", "public synchronized boolean getEnabled() {\r\n return this.soundOn;\r\n }", "public @Bool boolean getLocked()\n\t\tthrows PropertyNotPresentException;", "public boolean isLocked() {\n\t\tif (locked == true)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isLocked() { return true; }", "public boolean isLocked() {\n return (lockId == null ? false : true);\n }", "public int haveALock() {\n\t\tString status = getField(NMEASentence.STATUS);\n\t\tif (status==null) return NO_INFO_RE_A_LOCK;\n\t\tif ( StringUtil.equalsIgnoreCase(status,\"V\") ) {\n\t\t\treturn DONT_HAVE_A_LOCK;\n\t\t}\n\t\telse if ( StringUtil.equalsIgnoreCase(status,\"A\") ) {\n\t\t\treturn HAVE_A_LOCK;\n\t\t}\n\t\treturn NO_INFO_RE_A_LOCK;\n\t}", "public boolean getDoorIsLocked()\n {\n return isLocked;\n }", "public final long lock() {\n explicitlyLocked = true;\n return byteBase.longLockPointer();\n }", "public boolean getSoundEnabled() { return soundEnabled; }", "public boolean getlock()\r\n\t{\r\n\t\tif(cnt > 10)\r\n\t\t{\r\n\t\t\tcnt = 0;\r\n\t\t\treturn unlocked;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public long getLockStatus() {\r\n return lockStatus;\r\n }", "@ApiModelProperty(required = true, value = \"1APP8 Managed administrative status\")\n @JsonProperty(\"locked\")\n public Boolean getLocked() {\n return locked;\n }", "public Boolean getLocked() throws NotLoadedException {\n return locked.getValue();\n }", "public boolean getSoundShot() { return soundShot; }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isExportLock();", "@XmlElement\n public boolean isIsFileLocked() {\n return this.isFileLocked;\n }", "public LockingMode lockingMode() {\n return lockingMode;\n }", "public boolean isDefaultLocked()\n\t{\n\t\treturn defaultLocked;\n\t}", "public Boolean isHeld() { return held; }", "public boolean getMute();", "protected boolean isLock() {\r\n return Lock.isLock(this.getBlock());\r\n }", "public boolean getSoundDuck() { return soundDuck; }", "public boolean isLockerEnable(){\n return getBooleanValue(KEY_LOCKER_ENABLE);\n }", "public Long getLockNum() {\n return lockNum;\n }", "public boolean getPropertyMute()\n {\n return iPropertyMute.getValue();\n }", "public boolean getSpecialUnlocked() {\n\t\treturn this.specialUnlocked;\n\t}", "public int getLockon() {\r\n return lockon;\r\n }", "@Override\r\n\t\tpublic boolean dmr_getMute() throws RemoteException {\n\t\t\tboolean mute = soundManager.getAudioMuteEnabled();\r\n\t\t\tUtils.printLog(TAG, \"soundManager.getAudioMuteEnabled()\" + mute);\r\n\t\t\treturn mute;\r\n\t\t}", "public boolean isShifterLocked() {\n return isShifterLocked;\n }", "public boolean getPropertyMute();", "public ApplicationLockLevel lockLevel() {\n return this.lockLevel;\n }", "boolean getIsExclusive();", "@ManyToOne\n\t@JoinColumn(name=\"LockStatus\", nullable=false)\n\t@Fetch(FetchMode.SELECT)\n\t@NotFound(action=NotFoundAction.IGNORE)\n\tpublic AccessStatus getLockStatus() {\n\t\treturn this.lockStatus;\n\t}", "@GUARD\r\n\tboolean notLocked() {\r\n\t\treturn !locked;\r\n\t}", "public void setLocked(boolean value) {\n\t\tisLocked = value;\n\t}", "public void setLocked(boolean locked)\n\t{\n\t\tthis.locked = locked;\n\t}", "public int getLockCount() {\n return this.l.getHoldCount();\n }", "public boolean getEnabled() throws IllegalStateException\n {\n return audioEffect.getEnabled();\n }", "private boolean isReadAudioAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public Byte getModFlag() {\n return modFlag;\n }", "public Character getDistPermitProofFlag() {\n return distPermitProofFlag;\n }", "public String isLockedFor() {\n return (lockId == null ? \"\" : lockId);\n }", "boolean isValueLocked();", "public long getPermits() {\n return permits;\n }", "public boolean getProtection();", "public boolean isSoundEnabled() {\n return soundToggle;\n }", "public boolean getEnabled() {\r\n \t\tif (status == AlternativeStatus.ADOPTED) {\r\n \t\t\treturn true;\r\n \t\t} else {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t}", "public Object getLock() {\n return dataLock;\n }", "public boolean isMuted()\n\t{\n\t\treturn m_isMuted;\n\t}", "@Override\n\tpublic boolean isLocked() { The lock file must be manually deleted.\n\t\t//\n\t\treturn lockFile.exists();\n\t}", "public boolean hasSecondsWatched() {\n return fieldSetFlags()[4];\n }", "public boolean isSilent() {\n for(int iSndGrp = 0, i = 0;\n iSndGrp < XaAdpcmDecoder.ADPCM_SOUND_GROUPS_PER_SECTOR;\n iSndGrp++, i += XaAdpcmDecoder.SIZEOF_SOUND_GROUP)\n {\n // just check if all ADPCM values are 0\n for (int j = 16; j < XaAdpcmDecoder.SIZEOF_SOUND_GROUP; j++) {\n if (getCdSector().readUserDataByte(i+j) != 0)\n return false;\n }\n }\n return true;\n }", "public boolean isUnlocked() {\n return !isSolid;\n }", "public Long getLock_latency() {\n return lock_latency;\n }", "public boolean getAcceptsAudio() {\n\n return m_acceptsAudio;\n }", "public Boolean getIsExclusive() {\n return this.IsExclusive;\n }", "boolean getShutterSoundPref();", "public int getSoundState() {\n return preferences.getInt(\"sound_state\",0);\n }", "public boolean isTextLocked()\n {\n return textLocked.isSet(field_1_options);\n }", "@Override\n public boolean isLocked(Object o) {\n return false;\n }", "public boolean isShowWhenLocked() {\n return getIntent().getBooleanExtra(\"StartActivityWhenLocked\", false);\n }", "public abstract boolean isLocked(String oid);", "public Boolean isDataEnabled() {\n return (mask / 4) > 0;\n }", "public boolean isPoolLocked(){return poolLocked;}", "public Lock getLock() {\n return lock;\n }", "public boolean isTmpLock() {\n \t\treturn tmpLock;\n \t}", "public boolean isLocked() {\n boolean locked = super.isLocked();\n if (trackerPanel != null) {\n locked = locked || trackerPanel.getCoords().isLocked();\n }\n return locked;\n }", "public Lock getLock();", "boolean getRecordAudioPref();", "public String getBlocking_lock_duration() {\n return blocking_lock_duration;\n }", "public void setIsLocked(\r\n\t\t\t@Bool Boolean locked);", "public boolean hasPitch() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public boolean hasPlaySeconds() {\n return fieldSetFlags()[3];\n }", "public Map<String, Boolean> getLockedOperations() {\n return this.lockedOperations;\n }", "public String getLockType() {\n return this.lockType;\n }", "public boolean isComposerLockAnalyzerEnabled() {\n return composerLockAnalyzerEnabled;\n }" ]
[ "0.6442286", "0.6280924", "0.6280924", "0.6280924", "0.624422", "0.6216332", "0.6134882", "0.60906786", "0.60496116", "0.60496116", "0.6027179", "0.60212684", "0.5982768", "0.59725726", "0.59586674", "0.5930861", "0.59200317", "0.59200317", "0.591328", "0.58819014", "0.5796655", "0.5781927", "0.5734978", "0.5720178", "0.56220037", "0.5609955", "0.5608972", "0.5589673", "0.5571512", "0.5536099", "0.5497491", "0.54769117", "0.54647887", "0.5463247", "0.5439868", "0.54085594", "0.5383605", "0.53071105", "0.5302922", "0.5290384", "0.5258528", "0.524373", "0.52429754", "0.5237179", "0.5229223", "0.5222692", "0.5209354", "0.5181246", "0.51803124", "0.51756483", "0.51523644", "0.51504344", "0.51192546", "0.5113349", "0.5094586", "0.50673026", "0.5061645", "0.50594366", "0.5056903", "0.5053398", "0.50455624", "0.5035644", "0.5034923", "0.50306505", "0.50280213", "0.50145394", "0.50093997", "0.5004973", "0.49966168", "0.4985633", "0.49804056", "0.497884", "0.4978227", "0.49680054", "0.49583524", "0.49507365", "0.49494565", "0.49476802", "0.49389803", "0.49295703", "0.49179298", "0.49100107", "0.49046138", "0.49035874", "0.48993194", "0.48970315", "0.48931387", "0.48864362", "0.4884117", "0.48772234", "0.48744357", "0.48678398", "0.48677805", "0.48662382", "0.48662382", "0.48662382", "0.48609397", "0.48418683", "0.48295665", "0.48273173" ]
0.56099063
26
Returns the locked flag for the audio essence described by this sound descriptor, which indicates whether the number of samples per frame is locked. This property is optional.
public @Bool boolean getLocked() throws PropertyNotPresentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean soundResourcesLocked();", "public Integer getLockFlag() {\n return lockFlag;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public boolean isLocked() { return RMUtils.boolValue(get(\"Locked\")); }", "public boolean getLocked() {\n\t\treturn isLocked;\n\t}", "public final boolean getLocked() {\n return locked;\n }", "public boolean isLocked();", "public boolean isLocked() {\n return mLocked;\n }", "public boolean isLocked() {\n return mLocked;\n }", "public boolean GetIsLock()\n {\n return this._lock;\n }", "public boolean isLocked() {\r\n return isLocked;\r\n }", "public boolean isLocked() {\n return isLocked;\n }", "public boolean isLocked()\n\t{\n\t\treturn locked;\n\t}", "public boolean isLock() {\n return isLock;\n }", "public boolean getSoundAmbience() { return soundAmbience; }", "boolean isLocked();", "boolean isLocked();", "public boolean isLockEnabled() {\r\n\t\treturn lockEnabled;\r\n\t}", "public boolean isLocked() {\n\t\treturn isLocked;\n\t}", "public boolean isLocked() {\r\n \treturn false;\r\n }", "public synchronized boolean getEnabled() {\r\n return this.soundOn;\r\n }", "public boolean isLocked() {\n\t\tif (locked == true)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isLocked() { return true; }", "public boolean isLocked() {\n return (lockId == null ? false : true);\n }", "public @Bool boolean isLocked()\r\n\t\tthrows PropertyNotPresentException;", "public int haveALock() {\n\t\tString status = getField(NMEASentence.STATUS);\n\t\tif (status==null) return NO_INFO_RE_A_LOCK;\n\t\tif ( StringUtil.equalsIgnoreCase(status,\"V\") ) {\n\t\t\treturn DONT_HAVE_A_LOCK;\n\t\t}\n\t\telse if ( StringUtil.equalsIgnoreCase(status,\"A\") ) {\n\t\t\treturn HAVE_A_LOCK;\n\t\t}\n\t\treturn NO_INFO_RE_A_LOCK;\n\t}", "public boolean getDoorIsLocked()\n {\n return isLocked;\n }", "public final long lock() {\n explicitlyLocked = true;\n return byteBase.longLockPointer();\n }", "public boolean getSoundEnabled() { return soundEnabled; }", "public boolean getlock()\r\n\t{\r\n\t\tif(cnt > 10)\r\n\t\t{\r\n\t\t\tcnt = 0;\r\n\t\t\treturn unlocked;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public long getLockStatus() {\r\n return lockStatus;\r\n }", "@ApiModelProperty(required = true, value = \"1APP8 Managed administrative status\")\n @JsonProperty(\"locked\")\n public Boolean getLocked() {\n return locked;\n }", "public Boolean getLocked() throws NotLoadedException {\n return locked.getValue();\n }", "public boolean getSoundShot() { return soundShot; }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isExportLock();", "@XmlElement\n public boolean isIsFileLocked() {\n return this.isFileLocked;\n }", "public LockingMode lockingMode() {\n return lockingMode;\n }", "public boolean isDefaultLocked()\n\t{\n\t\treturn defaultLocked;\n\t}", "public Boolean isHeld() { return held; }", "public boolean getMute();", "protected boolean isLock() {\r\n return Lock.isLock(this.getBlock());\r\n }", "public boolean getSoundDuck() { return soundDuck; }", "public boolean isLockerEnable(){\n return getBooleanValue(KEY_LOCKER_ENABLE);\n }", "public Long getLockNum() {\n return lockNum;\n }", "public boolean getPropertyMute()\n {\n return iPropertyMute.getValue();\n }", "public boolean getSpecialUnlocked() {\n\t\treturn this.specialUnlocked;\n\t}", "public int getLockon() {\r\n return lockon;\r\n }", "@Override\r\n\t\tpublic boolean dmr_getMute() throws RemoteException {\n\t\t\tboolean mute = soundManager.getAudioMuteEnabled();\r\n\t\t\tUtils.printLog(TAG, \"soundManager.getAudioMuteEnabled()\" + mute);\r\n\t\t\treturn mute;\r\n\t\t}", "public boolean isShifterLocked() {\n return isShifterLocked;\n }", "public boolean getPropertyMute();", "public ApplicationLockLevel lockLevel() {\n return this.lockLevel;\n }", "boolean getIsExclusive();", "@ManyToOne\n\t@JoinColumn(name=\"LockStatus\", nullable=false)\n\t@Fetch(FetchMode.SELECT)\n\t@NotFound(action=NotFoundAction.IGNORE)\n\tpublic AccessStatus getLockStatus() {\n\t\treturn this.lockStatus;\n\t}", "@GUARD\r\n\tboolean notLocked() {\r\n\t\treturn !locked;\r\n\t}", "public void setLocked(boolean value) {\n\t\tisLocked = value;\n\t}", "public void setLocked(boolean locked)\n\t{\n\t\tthis.locked = locked;\n\t}", "public int getLockCount() {\n return this.l.getHoldCount();\n }", "public boolean getEnabled() throws IllegalStateException\n {\n return audioEffect.getEnabled();\n }", "private boolean isReadAudioAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public Byte getModFlag() {\n return modFlag;\n }", "public Character getDistPermitProofFlag() {\n return distPermitProofFlag;\n }", "public String isLockedFor() {\n return (lockId == null ? \"\" : lockId);\n }", "boolean isValueLocked();", "public long getPermits() {\n return permits;\n }", "public boolean getProtection();", "public boolean isSoundEnabled() {\n return soundToggle;\n }", "public boolean getEnabled() {\r\n \t\tif (status == AlternativeStatus.ADOPTED) {\r\n \t\t\treturn true;\r\n \t\t} else {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t}", "public Object getLock() {\n return dataLock;\n }", "public boolean isMuted()\n\t{\n\t\treturn m_isMuted;\n\t}", "@Override\n\tpublic boolean isLocked() { The lock file must be manually deleted.\n\t\t//\n\t\treturn lockFile.exists();\n\t}", "public boolean hasSecondsWatched() {\n return fieldSetFlags()[4];\n }", "public boolean isSilent() {\n for(int iSndGrp = 0, i = 0;\n iSndGrp < XaAdpcmDecoder.ADPCM_SOUND_GROUPS_PER_SECTOR;\n iSndGrp++, i += XaAdpcmDecoder.SIZEOF_SOUND_GROUP)\n {\n // just check if all ADPCM values are 0\n for (int j = 16; j < XaAdpcmDecoder.SIZEOF_SOUND_GROUP; j++) {\n if (getCdSector().readUserDataByte(i+j) != 0)\n return false;\n }\n }\n return true;\n }", "public boolean isUnlocked() {\n return !isSolid;\n }", "public Long getLock_latency() {\n return lock_latency;\n }", "public boolean getAcceptsAudio() {\n\n return m_acceptsAudio;\n }", "public Boolean getIsExclusive() {\n return this.IsExclusive;\n }", "boolean getShutterSoundPref();", "public int getSoundState() {\n return preferences.getInt(\"sound_state\",0);\n }", "public boolean isTextLocked()\n {\n return textLocked.isSet(field_1_options);\n }", "@Override\n public boolean isLocked(Object o) {\n return false;\n }", "public boolean isShowWhenLocked() {\n return getIntent().getBooleanExtra(\"StartActivityWhenLocked\", false);\n }", "public abstract boolean isLocked(String oid);", "public Boolean isDataEnabled() {\n return (mask / 4) > 0;\n }", "public boolean isPoolLocked(){return poolLocked;}", "public Lock getLock() {\n return lock;\n }", "public boolean isTmpLock() {\n \t\treturn tmpLock;\n \t}", "public boolean isLocked() {\n boolean locked = super.isLocked();\n if (trackerPanel != null) {\n locked = locked || trackerPanel.getCoords().isLocked();\n }\n return locked;\n }", "public Lock getLock();", "boolean getRecordAudioPref();", "public String getBlocking_lock_duration() {\n return blocking_lock_duration;\n }", "public void setIsLocked(\r\n\t\t\t@Bool Boolean locked);", "public boolean hasPitch() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public boolean hasPlaySeconds() {\n return fieldSetFlags()[3];\n }", "public Map<String, Boolean> getLockedOperations() {\n return this.lockedOperations;\n }", "public String getLockType() {\n return this.lockType;\n }", "public boolean isComposerLockAnalyzerEnabled() {\n return composerLockAnalyzerEnabled;\n }" ]
[ "0.6442286", "0.6280924", "0.6280924", "0.6280924", "0.624422", "0.6216332", "0.6134882", "0.60906786", "0.60496116", "0.60496116", "0.6027179", "0.60212684", "0.5982768", "0.59725726", "0.59586674", "0.5930861", "0.59200317", "0.59200317", "0.591328", "0.58819014", "0.5796655", "0.5781927", "0.5720178", "0.56220037", "0.5609955", "0.56099063", "0.5608972", "0.5589673", "0.5571512", "0.5536099", "0.5497491", "0.54769117", "0.54647887", "0.5463247", "0.5439868", "0.54085594", "0.5383605", "0.53071105", "0.5302922", "0.5290384", "0.5258528", "0.524373", "0.52429754", "0.5237179", "0.5229223", "0.5222692", "0.5209354", "0.5181246", "0.51803124", "0.51756483", "0.51523644", "0.51504344", "0.51192546", "0.5113349", "0.5094586", "0.50673026", "0.5061645", "0.50594366", "0.5056903", "0.5053398", "0.50455624", "0.5035644", "0.5034923", "0.50306505", "0.50280213", "0.50145394", "0.50093997", "0.5004973", "0.49966168", "0.4985633", "0.49804056", "0.497884", "0.4978227", "0.49680054", "0.49583524", "0.49507365", "0.49494565", "0.49476802", "0.49389803", "0.49295703", "0.49179298", "0.49100107", "0.49046138", "0.49035874", "0.48993194", "0.48970315", "0.48931387", "0.48864362", "0.4884117", "0.48772234", "0.48744357", "0.48678398", "0.48677805", "0.48662382", "0.48662382", "0.48662382", "0.48609397", "0.48418683", "0.48295665", "0.48273173" ]
0.5734978
22
Sets the audio reference level of the audio essence described by this sound descriptor. This property specifies the number of dBm for 0VU. Set this optional property to null to omit it.
public void setAudioReferenceLevel( @Int8 Byte level);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMicGainDb(float level);", "public void setPlaybackGainDb(float level);", "public @Int8 byte getAudioReferenceLevel()\r\n\t\tthrows PropertyNotPresentException;", "void onAudioLevel(float level);", "public void setAudioDescriptor( AudioDescriptor audioDescriptor );", "public SoundlevelMeasurement() {\n this.dBval = 0;\n this.timestamp = null;\n }", "@Override\r\n\tpublic float soundLevel() {\n\t\treturn 1f;\r\n\t}", "public void setHandThrowDamage(short handThrowDamage);", "public void setVolume(int level);", "public abstract void setForceLevel(int level);", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "void setSampleGain(float gain) {\n if (debugFlag)\n debugPrint(\"JSChannel: setSampleGain must be overridden\");\n }", "public void setMaxAmplitudeZero(){ maxAmplitude=0; }", "public void setStrengthBoost(int boost) {\n mStrengthBoost = boost;\n }", "public static final void setBatteryGain(float battery_gain) {\r\n\t\tBATTERY_GAIN = battery_gain;\r\n\t}", "public void setBonusReference(Float bonusReference) {\n this.bonusReference = bonusReference;\n }", "public void setVibrationOn() {\n\n }", "public void playLoseSounds(){\r\n try {\r\n File mFile = new File(Filepath4);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput5 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip5 = AudioSystem.getClip();\r\n clip5.open(audioInput5);\r\n FloatControl gainControl5 = (FloatControl) clip5.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl5.setValue(-8.0f); //reduces the volume by 8 decibels\r\n clip5.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public void setVibrationOff() {\n\n }", "public boolean setPropertyUnityGain(boolean aValue);", "public void setSiegeWeaponDamage(short siegeWeaponDamage);", "public void setVolume(int level) {\n if(level >= 0 && level <= 100) {\n int checkSum = 0x07^0x01^0x00^0x44^level^level; \n String hexLevel = Integer.toHexString(level);\n if(hexLevel.length() == 1)\n hexLevel = \"0\" + hexLevel;\n String hexCheckSum = Integer.toHexString(checkSum);\n if(hexCheckSum.length() == 1)\n hexCheckSum = \"0\" + hexCheckSum;\n sendHexCommand(\"07 01 00 44 \" + hexLevel + \" \" + hexLevel + \" \"+\n hexCheckSum, 20);\n lastVolumeChange = System.currentTimeMillis();\n }\n }", "void setValueMixerSound(int value);", "public void setSoundAmbience(final boolean sAmbience) { soundAmbience = sAmbience; }", "public void setGain(float gain) {\n \t\tthis.gain = gain;\n \t}", "public void setFeedbackLevel(int feedbackLevel) {\r\n\r\n\t\t// Value in the range 0..100\r\n\t\tthis.feedbackLevel = feedbackLevel;\r\n\t}", "public void setSound(Boolean sound_on){\n this.sound_on = sound_on;\n }", "public static void triggerHushMute(Context context) {\n // We can't call AudioService#silenceRingerModeInternal from here, so this is a partial copy of it\n int silenceRingerSetting = Settings.Secure.getIntForUser(context.getContentResolver(),\n Settings.Secure.VOLUME_HUSH_GESTURE, Settings.Secure.VOLUME_HUSH_OFF,\n UserHandle.USER_CURRENT);\n\n int ringerMode;\n int toastText;\n if (silenceRingerSetting == Settings.Secure.VOLUME_HUSH_VIBRATE) {\n ringerMode = AudioManager.RINGER_MODE_VIBRATE;\n toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_vibrate;\n } else {\n // VOLUME_HUSH_MUTE and VOLUME_HUSH_OFF\n ringerMode = AudioManager.RINGER_MODE_SILENT;\n toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_silent;\n }\n AudioManager audioMan = (AudioManager)\n context.getSystemService(Context.AUDIO_SERVICE);\n audioMan.setRingerModeInternal(ringerMode);\n Toast.makeText(context, toastText, Toast.LENGTH_SHORT).show();\n }", "public void setWavelength(float wavelength) {\n/* 61 */ this.wavelength = wavelength;\n/* */ }", "public void setQuality(float quality);", "public void setVolume(float value){\n\t\tgainControl.setValue(value);\n\t}", "public void setLevel(String level);", "public void setLevel(int v)\n {\n m_level = v;\n }", "public void setIllumination(Float illumination) {\n this.illumination = illumination;\n }", "public void setLevel(int newlevel)\n {\n level = newlevel; \n }", "@Override\n public void setLevel(int level) {\n if (level > 1) {\n this.level = level;\n scaleUp();\n percentageScaling();\n }\n }", "public void setSoundEnabled(final boolean sEnabled) { soundEnabled = sEnabled; }", "void setVolume(float volume);", "public void setBowDamage(short bowDamage);", "public void setLevel(Level mLevel) {\n this.level = mLevel;\n level.increaseChamberCount();\n }", "public void setAmplitude(float amplitude) {\n/* 79 */ this.amplitude = amplitude;\n/* */ }", "@SuppressWarnings(\"unchecked\")\n\tpublic void setEffectsVolume(float volume){\n\t\tvolume = volume / 100;\n\t\tif (volume < 0){\n\t\t\tvolume = 0;\n\t\t}\t\n\t\tif (volume > 1){\n\t\t\tvolume = 1;\n\t\t}\n\t\t\n\t\tthis.mLeftVolume = this.mRightVolume = volume;\n\t\t\n\t\t// change the volume of playing sounds\n\t\tIterator<?> iter = this.mSoundIdStreamIdMap.entrySet().iterator();\n\t\twhile (iter.hasNext()){\n\t\t\tMap.Entry<Integer, Integer> entry = (Map.Entry<Integer, Integer>)iter.next();\n\t\t\tthis.mSoundPool.setVolume(entry.getValue(), mLeftVolume, mRightVolume);\n\t\t}\n\t}", "public void setSoundVolume(float soundVolume) {\n _soundVolume = soundVolume;\n }", "public void setLineVolume(int level) {\n if (level >= 0 && level <= 100) {\n int checkSum = 0x07 ^ 0x01 ^ 0x00 ^ 0x44 ^ 0x00 ^ level;\n String hexLevel = Integer.toHexString(level);\n if (hexLevel.length() == 1) {\n hexLevel = \"0\" + hexLevel;\n }\n String hexCheckSum = Integer.toHexString(checkSum);\n if (hexCheckSum.length() == 1) {\n hexCheckSum = \"0\" + hexCheckSum;\n }\n sendHexCommand(\"07 01 00 44 00 \" + hexLevel + \" \"\n + hexCheckSum, 20);\n lastVolumeChange = System.currentTimeMillis();\n }\n }", "private void setAudioProfilModem() {\n int ringerMode = mAudioManager.getRingerModeInternal();\n ContentResolver mResolver = mContext.getContentResolver();\n Vibrator vibrator = (Vibrator) mContext\n .getSystemService(Context.VIBRATOR_SERVICE);\n boolean hasVibrator = vibrator == null ? false : vibrator.hasVibrator();\n if (AudioManager.RINGER_MODE_SILENT == ringerMode) {\n if (hasVibrator) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);\n /* @} */\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_ON);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_ON);\n } else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n /* @} */\n }\n } else if (AudioManager.RINGER_MODE_VIBRATE == ringerMode) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_OUTDOOR);\n /* @} */\n }else if (AudioManager.RINGER_MODE_OUTDOOR == ringerMode) {//add by wanglei for outdoor mode\n Settings.System.putInt(mResolver,Settings.System.SOUND_EFFECTS_ENABLED, 1);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n }else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);\n /* @} */\n if (hasVibrator) {\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_OFF);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_OFF);\n }\n }\n }", "public void setAudioMode(int mode) {\n if (audioManager.getRingerMode() != mode) {\n audioManager.setRingerMode(mode);\n }\n }", "public void updateVolume(){\r\n if(currentLoop0) backgroundMusicLoop0.gainControl.setValue(Window.musicVolume);\r\n else backgroundMusicLoop1.gainControl.setValue(Window.musicVolume);\r\n }", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public void setStrength(int strength) {\n this.calories = strength;\n }", "public void setQuality(int value) {\n this.quality = value;\n }", "public void setPitch(int pitch);", "public void setVolume(int v) {\n\t\tif (On) {\n\t\t\tif (v < 0 || v > 5) {\n\t\t\t\tSystem.out.println(\"New volume not within range!\");\n\t\t\t} else {\n\t\t\t\tVolume = v;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Radio off ==> No adjustment possible\");\n\n\t\t}\n\t}", "protected float getSoundVolume()\n {\n return 0.4F;\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public HmsPickerBuilder setReference(int reference) {\n this.mReference = reference;\n return this;\n }", "public boolean setPropertyUnityGain(boolean aValue)\n {\n return setPropertyBool(iPropertyUnityGain, aValue);\n }", "public void setSensitivity(int s)\n\t{\n\t\tif (s < 0)\n\t\t{\n\t\t\tMinim.error(\"BeatDetect: sensitivity cannot be less than zero. Defaulting to 10.\");\n\t\t\tsensitivity = 10;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsensitivity = s;\n\t\t}\n\t}", "public static void setSound(boolean tempSound) {\n sound = tempSound;\n }", "public void setLevel(int value) {\n this.level = value;\n }", "void setSound(boolean b){\r\n\t\tgc.setSound(b);\r\n\t}", "public void setModelQuality(DriftCheckModelQuality modelQuality) {\n this.modelQuality = modelQuality;\n }", "public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}", "public void setVolume(int volume);", "public void enableSystemSound() {\n if (this.mAppContext != null) {\n Log.m19d(TAG, \"enableSystemSound\");\n try {\n StatusBarProvider.getInstance().disable(this.mAppContext, 0);\n setStreamMute(false);\n if (getRecorderState() != 3 && this.mAudioManager.getRingerMode() == 2) {\n this.mAudioManager.adjustStreamVolume(2, 100, 0);\n Settings.System.putInt(this.mAppContext.getContentResolver(), \"vibrate_when_ringing\", this.mVibrateWhileRingingState);\n }\n } catch (SecurityException e) {\n Log.m32w(TAG, \"enableSystemSound : \" + e);\n }\n }\n }", "public void setAttackLevel(int attackLevel) {\r\n\t\tif (attackLevel < 0) {\r\n\t\t\tcreateFeatureNotSupportedEvent(attackLevel);\r\n\t\t\tthis.attackLevel = 0;\r\n\t\t} else if (attackLevel > MAX_LEVEL) {\r\n\t\t\tcreateFeatureNotSupportedEvent(attackLevel);\r\n\t\t\tthis.attackLevel = MAX_LEVEL;\r\n\t\t} else {\r\n\t\t\tthis.attackLevel = attackLevel;\r\n\t\t}\r\n\t}", "public void setMuteDisabeld(boolean checked) {\n volumeControl.disable(checked);\r\n }", "protected void setLevel(int level)\n {\n this.level = level;\n }", "public void setAudioDscp(int dscp);", "public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}", "public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }", "public float getMicGainDb();", "public void setEnchantmentLevel(int enchantmentLevel) {\n/* 57 */ Validate.isTrue((enchantmentLevel > 0), \"The enchantment level must be greater than 0!\");\n/* */ \n/* 59 */ this.enchantmentLevel = enchantmentLevel;\n/* */ }", "public void setLevel(int level) {\n \t\tthis.level = level;\n \t}", "public void setChannelTxPower(PowerLevel power){\n this.level = power;\n \n }", "public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void setVolume(float volume) {\n\t\t\r\n\t}", "public SoundClip getLevelMusic() {\r\n return levelMusic;\r\n }", "public void enableSound() {\n soundToggle = true;\n }", "public void setVolume(float volume) {\n\t alSourcef(musicSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(reverseSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(flangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(wahSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revWahSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(wahFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revWahFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(distortSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revDistortSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(distortFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revDistortFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(wahDistortSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revWahDistortSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(wahDistortFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revWahDistortFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}", "protected float getSoundVolume()\n\t{\n\t\treturn 1F;\n\t}", "public void m12819f() {\n this.f10117d.mo1750d(this.f10114a, m12803a(C1478b.MUTE));\n }", "public void setSoundShot(final boolean sShot) { soundShot = sShot; }", "public void unsetAntGain() {\n this.antGain = null;\n }", "public void setInfluence(float val) {\n influence = val;\n }", "public void setSoundBehaviour(SoundBehaviour soundBehaviour) {\n\t\tthis.soundBehaviour = soundBehaviour;\n\t}", "public void setMute(boolean mute);", "public void setMlevel(Integer mlevel) {\n this.mlevel = mlevel;\n }", "public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}", "public void setMlLevel(String mlLevel) {\r\n this.mlLevel = mlLevel == null ? null : mlLevel.trim();\r\n }", "private static void m18335b(AudioTrack audioTrack, float volume) {\n audioTrack.setStereoVolume(volume, volume);\n }", "private void setReference(String ref) {\n Set<String> allRefs = getAllReferenceNames();\n if (!allRefs.contains(ref) && allRefs.contains(\"chr\" + ref)) {\n ref = \"chr\" + ref;\n }\n currentReference = ref;\n Genome loadedGenome = GenomeController.getInstance().getGenome();\n setMaxRange(new Range(1, loadedGenome.getLength()));\n setRange(1, Math.min(1000, loadedGenome.getLength()));\n }", "public void setLevel(Long value) {\r\n setAttributeInternal(LEVEL, value);\r\n }", "public void setConfidenceLevel (double confidenceLevel)\n {\n this.confidenceLevel = confidenceLevel;\n \n }", "public static void setSoundEffectsVolume(final double sfxVolume) {\n if (sfxVolume >= 0 && sfxVolume <= 1) {\n SoundEffect.sfxVolume = sfxVolume;\n }\n }", "public void setSpeechThreshold(Integer speechThreshold) {\n this.speechThreshold = speechThreshold;\n }", "public void setLevel(int level){\n\t\tthis.level = level;\n\t}", "public void set_quality(int value) {\n setUIntBEElement(offsetBits_quality(), 16, value);\n }", "public void updateVolume() {\n\t\tMixer.Info[] mixerInfos = AudioSystem.getMixerInfo();\n\n\t\tfor (Mixer.Info mixerInfo : mixerInfos) {\n\t\t\tMixer mixer = AudioSystem.getMixer(mixerInfo);\n\t\t\tLine.Info[] lineInfos = mixer.getTargetLineInfo();\n\n\t\t\tfor (Line.Info lineInfo : lineInfos) {\n\t\t\t\ttry {\n\t\t\t\t\tLine line = mixer.getLine(lineInfo);\n\t\t\t\t\tline.open();\n\t\t\t\t\tif (line.isControlSupported(FloatControl.Type.VOLUME)) {\n\t\t\t\t\t\tFloatControl volumeControl = (FloatControl) line.getControl(FloatControl.Type.VOLUME);\n\t\t\t\t\t\tvolumeControl.setValue((float) volume);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Builder setLevel(int value) {\n bitField0_ |= 0x00000002;\n level_ = value;\n \n return this;\n }" ]
[ "0.67890304", "0.6115946", "0.60902196", "0.59434724", "0.58546704", "0.57902575", "0.5751057", "0.5742149", "0.5736259", "0.5564246", "0.5371465", "0.53415185", "0.5264407", "0.52260476", "0.52219415", "0.5214178", "0.52094555", "0.52077854", "0.5203212", "0.5199302", "0.51969635", "0.5195661", "0.51927125", "0.5143983", "0.5134131", "0.5113973", "0.5064006", "0.50371027", "0.5031781", "0.5025158", "0.5019545", "0.5009301", "0.4975179", "0.4969467", "0.49659806", "0.49623516", "0.49518093", "0.49514446", "0.4948647", "0.49372324", "0.4934856", "0.49337506", "0.49183312", "0.49161306", "0.49054837", "0.48967174", "0.4885276", "0.4877756", "0.48654282", "0.4859278", "0.4858276", "0.48548895", "0.48534822", "0.4846583", "0.4843716", "0.48368257", "0.4834326", "0.48255488", "0.48230773", "0.48160145", "0.48084015", "0.48022202", "0.47917092", "0.47844237", "0.47827798", "0.47783276", "0.4777749", "0.4772994", "0.47698796", "0.47684872", "0.47644514", "0.47591853", "0.47558954", "0.47557506", "0.4755544", "0.4750891", "0.475032", "0.47443736", "0.47417882", "0.47386855", "0.47365054", "0.4736237", "0.473478", "0.47335765", "0.4733492", "0.47272292", "0.47247547", "0.4722346", "0.47194982", "0.47183493", "0.471396", "0.4709837", "0.47094467", "0.47020534", "0.46998802", "0.46984598", "0.4698453", "0.46977198", "0.46951452", "0.4688431" ]
0.76243216
0
Returns the audio reference level of this sound descriptor. This specifies the number of dBm for 0VU. This property is optional.
public @Int8 byte getAudioReferenceLevel() throws PropertyNotPresentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLevel() {\n if ( air != null )\n return air.sampleRSSI(CC1000Radio.this);\n else return ADC.VBG_LEVEL; // return a default value of some sort\n }", "@Override\r\n\tpublic float soundLevel() {\n\t\treturn 1f;\r\n\t}", "public float getMicGainDb();", "public void setAudioReferenceLevel(\r\n\t\t\t@Int8 Byte level);", "@Override\n public int getLevel() {\n int level;\n\n // ASU ranges from 0 to 31 - TS 27.007 Sec 8.5\n // asu = 0 (-113dB or less) is very weak\n // signal, its better to show 0 bars to the user in such cases.\n // asu = 99 is a special case, where the signal strength is unknown.\n int asu = mSignalStrength;\n if (asu <= 2 || asu == 99) level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;\n else if (asu >= GSM_SIGNAL_STRENGTH_GREAT) level = SIGNAL_STRENGTH_GREAT;\n else if (asu >= GSM_SIGNAL_STRENGTH_GOOD) level = SIGNAL_STRENGTH_GOOD;\n else if (asu >= GSM_SIGNAL_STRENGTH_MODERATE) level = SIGNAL_STRENGTH_MODERATE;\n else level = SIGNAL_STRENGTH_POOR;\n if (DBG) log(\"getLevel=\" + level);\n return level;\n }", "public void setMicGainDb(float level);", "void onAudioLevel(float level);", "@Override\n public int getAsuLevel() {\n // ASU ranges from 0 to 31 - TS 27.007 Sec 8.5\n // asu = 0 (-113dB or less) is very weak\n // signal, its better to show 0 bars to the user in such cases.\n // asu = 99 is a special case, where the signal strength is unknown.\n int level = mSignalStrength;\n if (DBG) log(\"getAsuLevel=\" + level);\n return level;\n }", "public AudioDescriptor getAudioDescriptor();", "@Override\n public int getDbm() {\n int dBm;\n\n int level = mSignalStrength;\n int asu = (level == 99 ? Integer.MAX_VALUE : level);\n if (asu != Integer.MAX_VALUE) {\n dBm = -113 + (2 * asu);\n } else {\n dBm = Integer.MAX_VALUE;\n }\n if (DBG) log(\"getDbm=\" + dBm);\n return dBm;\n }", "public static final float getBatteryGain() {\r\n\t\treturn BATTERY_GAIN;\r\n\t}", "public float getPlaybackGainDb();", "public float batteryLevel() {\n return 1;\n }", "public double readLightLevel()\n {\n return (Math.random() * (200000.0 - 0.0)) + 0.0;\n }", "public static byte calculateAudioLevel(\n byte[] samples,\n int offset,\n int length)\n { \n double rms = 0; // root mean square (RMS) amplitude\n\n for (; offset < length; offset += 2)\n {\n double sample = ArrayIOUtils.readShort(samples, offset);\n\n sample /= Short.MAX_VALUE;\n rms += sample * sample;\n }\n\n int sampleCount = length / 2;\n\n rms = (sampleCount == 0) ? 0 : Math.sqrt(rms / sampleCount);\n\n double db;\n\n if (rms > 0)\n {\n db = 20 * Math.log10(rms);\n // XXX The audio level is expressed in -dBov.\n db = -db;\n // Ensure that the calculated audio level is within the range\n // between MIN_AUDIO_LEVEL and MAX_AUDIO_LEVEL.\n if (db > MIN_AUDIO_LEVEL)\n db = MIN_AUDIO_LEVEL;\n else if (db < MAX_AUDIO_LEVEL)\n db = MAX_AUDIO_LEVEL;\n }\n else\n {\n db = MIN_AUDIO_LEVEL;\n }\n\n return (byte) db;\n }", "protected float getSoundVolume()\n {\n return 0.4F;\n }", "public int getAudioDscp();", "public SoundlevelMeasurement() {\n this.dBval = 0;\n this.timestamp = null;\n }", "protected float getSoundVolume()\n\t{\n\t\treturn 1F;\n\t}", "public float getSoundVolume() {\n return _soundVolume;\n }", "float getPreGain();", "public SoundClip getLevelMusic() {\r\n return levelMusic;\r\n }", "int getChargerCurrentRaw();", "public int getSoundType() \n\t{\n\treturn fType;\n\t}", "public long getMeasRcvdPowerdBm() {\r\n return measRcvdPowerdBm;\r\n }", "public float getSoundPitch() {\n return _soundPitch;\n }", "public int getHealthGain();", "public Long getCurrentBatteryLevel() {\n if (this.type == BikeType.ELECTRICAL) {\n return Math.round((this.getCurrentBattery() / this.getMaxBattery() * 100.0));\n } else {\n return 0L;\n }\n }", "float getPostGain();", "public Rational getAudioSampleRate();", "public int getLevel(){\n \t\treturn (strength + intelligence + stamina + Math.abs(charm) + Math.abs(cuteness))/5;\n \t}", "public int getAudioJittcomp();", "@Generated\n @Selector(\"batteryLevel\")\n public native float batteryLevel();", "public static int getBatteryLevel() {\n if (utilitiesDll == null) {\n return -1;\n }\n return utilitiesDll.RecupererBatterie();\n }", "@Override\r\n\tpublic float getEnergyConsumption() {\r\n\t\treturn 2500 - robot.getBatteryLevel();\r\n\t}", "public int getSoundChannel() \n\t{\n\treturn fSoundChannel;\n\t}", "private int getSoundLevelToRestore() {\n int savedSoundLevel = originalVolumes != null ? originalVolumes.getRingVolume() : -1;\n\n //if it was 0 -> was in vibrate no need to restore to user level.\n if (savedSoundLevel > 0 ) {\n if (mIsRestoreVolToUserSetLevelEnabled) {\n return userSetVolumeLevelToRestore;\n }\n } else {\n //если громкость 0 а режим нормальный - что-то не так\n if (originalVolumes != null && originalVolumes.getRingMode() == RingMode.RINGER_MODE_NORMAL) {\n return 1;\n }\n }\n return savedSoundLevel;\n }", "@Override\n\tprotected float getSoundVolume() {\n\t\t// note: unused, managed in playSound()\n\t\treturn 1;\n\t}", "public static int getSoundEffectVolume()\n\t{\n\t\treturn soundEffectVolume;\n\t}", "public int get_quality() {\n return (int)getUIntBEElement(offsetBits_quality(), 16);\n }", "public Double getLoRoCenterMixLevel() {\n return this.loRoCenterMixLevel;\n }", "private String soundConversion() {\n int reading = (record[18] & 255) + ((record[21] & 0x0C) << 6);\n return (reading * 100) / 1024 + \"\";\n }", "public float getWavelength() {\n/* 52 */ return this.wavelength;\n/* */ }", "public int getBatteryLevel() { return batteryLevel; }", "public int getMaxAmplitude() {\r\n\treturn MAX_AMPLITUDE;\r\n}", "public int getVolumeMax() {\n return mBundle.getInt(KEY_VOLUME_MAX);\n }", "float getMainUtteranceTargetLevel();", "public float getQuality();", "public void setPlaybackGainDb(float level);", "public int /* sound_sample */output() {\n\t\treturn Vo;\n\t}", "java.lang.String getQuality();", "public IntegerProperty getControlAmplitude() {\n return this.inputAdjuster.getCurrentAmplitude();\n }", "public int getSoundState() {\n return preferences.getInt(\"sound_state\",0);\n }", "java.lang.String getQualityMax();", "public Integer getSpeechThreshold() {\n return this.speechThreshold;\n }", "public boolean getSoundAmbience() { return soundAmbience; }", "public abstract int getForceLevel();", "@Field(7) \n\tpublic int sample_rate() {\n\t\treturn this.io.getIntField(this, 7);\n\t}", "double getMaxVolume();", "public Double getLoRoSurroundMixLevel() {\n return this.loRoSurroundMixLevel;\n }", "double getLevel();", "double getLevel();", "public short getHandThrowDamage();", "public float getVolumeMultiplier();", "public String getMlLevel() {\r\n return mlLevel;\r\n }", "public int getLight();", "public boolean getSoundEnabled() { return soundEnabled; }", "public Float getIllumination () {\n return illumination;\n }", "public float getAmplitude() {\n/* 70 */ return this.amplitude;\n/* */ }", "public long getPropertyVolumeMax();", "public DriftCheckModelQuality getModelQuality() {\n return this.modelQuality;\n }", "@Override\n public double getCONSUMPTION() {\n if (status && brightValue != 0) {\n this.consumption = (super.DEFAULTCONSUMPTION + 2) + (brightValue / 100);\n } else if (status) {\n this.consumption = super.DEFAULTCONSUMPTION + 2;\n } else if (status != true) {\n this.consumption = super.DEFAULTCONSUMPTION;\n }\n\n return consumption;\n }", "int getOnLevel();", "public double Getlevel()\r\n {\r\n return level;\r\n }", "public long getSampleCount() {\r\n\t\tif (audioFile != null) {\r\n\t\t\treturn audioFile.getEffectiveDurationSamples();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public static final native int getChargingVoltage();", "public boolean getPropertyUnityGain();", "public int getAudioPort();", "@Override\r\n public int getBasicValue() {\n return this.getCombatLevel();\r\n }", "float getFixedHotwordGain();", "public int getAudioMode() {\n AudioManager audio = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n return audio.getMode(); //MODE_NORMAL, MODE_RINGTONE, MODE_IN_CALL, MODE_IN_COMMUNICATION\n }", "public float grabStrength() {\r\n\t\treturn LeapJNI.Hand_grabStrength(this.swigCPtr, this);\r\n\t}", "int getStrength();", "int getStrength();", "public default int getDuration(int casterLevel){ return Reference.Values.TICKS_PER_SECOND; }", "public float getPower() {\n \t\treturn 1/rarity;\n \t}", "public int getVolumeHandling() {\n return mBundle.getInt(KEY_VOLUME_HANDLING);\n }", "public int getBatteryLevel() {\n\t\treturn batteryLevel;\n\t}", "@Override\n public double getEngineSound() {\n return decoratedEngine.getEngineSound() * .6;\n }", "float getPitch();", "float getPitch();", "int getLumOff(){\n return getPercentageValue(\"lumOff\");\n }", "public double confidenceLo() {\n\t\treturn confidenceLow;\n\t}", "public int getVibrationState() {\n return -1;\n }", "int getSoilMoistureLevel(int soilMoistureMM);", "public Integer getMlevel() {\n return mlevel;\n }", "@Override\n\tprotected float getSoundPitch() {\n\t\t// note: unused, managed in playSound()\n\t\treturn 1;\n\t}", "public int getDamage() {\n \t\treturn damage + ((int) 0.5*level);\n \t}", "public SampleMode getSampleMode();", "public IntegerProperty getReactorAmplitude() {\n return this.reactorLine.getCurrentAmplitude();\n }" ]
[ "0.68919367", "0.6698932", "0.6533242", "0.6488696", "0.6280264", "0.6216243", "0.6208074", "0.61638016", "0.6134922", "0.611903", "0.60595864", "0.60174227", "0.6005747", "0.59650534", "0.5951004", "0.59069043", "0.58487165", "0.58430785", "0.58418375", "0.5835717", "0.5835695", "0.5832096", "0.58313954", "0.5829716", "0.58276105", "0.5802551", "0.57989705", "0.57781786", "0.5698373", "0.5692844", "0.5683434", "0.5682085", "0.5657727", "0.56531584", "0.56195134", "0.5616509", "0.5610921", "0.5610571", "0.5608887", "0.5604226", "0.5600457", "0.55980104", "0.5596657", "0.5594413", "0.55795085", "0.55489534", "0.55458057", "0.5542552", "0.5525664", "0.552507", "0.5518281", "0.5511437", "0.5511023", "0.54901576", "0.5483121", "0.5468613", "0.54666334", "0.5464029", "0.54498017", "0.5428539", "0.5426667", "0.5426667", "0.5422205", "0.5421893", "0.54193044", "0.5413264", "0.54047817", "0.5399805", "0.5399073", "0.53972274", "0.5397129", "0.53905666", "0.53860766", "0.5385645", "0.5377788", "0.5375259", "0.5372498", "0.5359099", "0.5356536", "0.5350843", "0.533761", "0.53368425", "0.533483", "0.533483", "0.5333121", "0.53310007", "0.53309816", "0.53285086", "0.5310657", "0.53105414", "0.53105414", "0.5306612", "0.5288333", "0.5288096", "0.52869856", "0.52862537", "0.52836967", "0.5283299", "0.5282972", "0.52829015" ]
0.77935404
0
Sets the dial norm of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITUR Recommendation BS.1196 (1dB per step). Set this optional property to null to omit it.
public void setDialNorm( @Int8 Byte dialNorm);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNormalBuffer(ByteBuffer normBuf) {\n this.normBuf = normBuf;\n }", "public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }", "public @Int8 byte getDialNorm()\r\n\t\tthrows PropertyNotPresentException;", "public void normalize()\n\t{\n\t\tif (this.getDenom() < 0)\n\t\t{\n\t\t\tthis.setDenom(this.getDenom() * (-1));\n\t\t\tthis.setNumer(this.getNumer() * (-1));\n\t\t}\n\t}", "public void normalize(){\n\t_defense = originalDefense;\n\t_strength = originalStrength;\n }", "public void setMagnitude()\n {\n magnitude = (float) Math.sqrt(Math.pow(fx, 2) + Math.pow(fy, 2) + Math.pow(fz, 2));\n }", "@Override\n\tpublic LSystemBuilder setUnitLengthDegreeScaler(double unitLengthDegreeScaler) {\n\t\tthis.unitLengthDegreeScaler = unitLengthDegreeScaler;\n\t\treturn this;\n\t}", "public void setNormal(String normal) {\r\n String old = this.normal;\r\n this.normal = normal;\r\n this.changeSupport.firePropertyChange(\"normal\", old, normal );\r\n }", "public Builder setNormal(boolean value) {\n \n normal_ = value;\n onChanged();\n return this;\n }", "public static void setMinAcceptableNorm(double acceptNorm)\n\t{\n\t\tif((acceptNorm >= 0.001) && (acceptNorm <= 25)) minAcceptableNorm = acceptNorm;\n\t\telse minAcceptableNorm = GConstants.DEF_ACCEPTABLE_NORM;\n\t\t//\t\tSystem.out.println(\"acceptableNorm: \"+minAcceptableNorm);\n\t}", "public Builder clearNormal() {\n \n normal_ = false;\n onChanged();\n return this;\n }", "@Generated\n @Selector(\"setStrength:\")\n public native void setStrength(@NFloat double value);", "void setNormalSpeed () {\n if (stepDelay == normalSpeed)\n return;\n stepDelay = normalSpeed;\n resetLoop();\n }", "public void normalize(){\r\n \tif(!normal){\r\n\t attack/=2;\r\n\t defense*=2;\r\n\t normal=true;\r\n\t}\r\n }", "public void normalize(){\r\n \tif(!normal){\r\n\t attack/=2;\r\n\t defense*=2;\r\n\t normal=true;\r\n\t}\r\n }", "public void setRad(float rad) {\n\t\tif (rad < minRad) rad = minRad;\n\t\tif (rad > maxRad) rad = maxRad;\n\t\tif (rad >= minRad && rad <= maxRad) {\n\t\t\tlog.finest(\"Updating radius to \" + rad);\n\t\t\tthis.rad = rad;\n\t\t\tthis.diam = rad*2;\n\t\t}\n\t}", "@Override\n\tpublic double\n\tnormalize()\n\t{\n\t\tdouble len = length();\n\n\t\tif( len != 0 )\n\t\t{\n\t\t\tdata[0] /= len;\n\t\t\tdata[1] /= len;\n\t\t\tdata[2] /= len;\n\t\t}\n\t\t\n\t\treturn len;\n\t}", "void normalizeSafe()\r\n {\r\n float fLengthSquared = lengthSquared();\r\n if ( 0.0f == fLengthSquared )\r\n {\r\n set(ZERO);\r\n }\r\n else\r\n {\r\n scale(1.0f/(float)Math.sqrt(fLengthSquared));\r\n }\r\n }", "public void setSpeechDrpr(Float speechDrpr) {\n this.speechDrpr = speechDrpr;\n }", "public void setNetNormValue(Double val)\r\n {\r\n \tlong value = Math.round(val * this.getPrecision());\r\n\t\tint intValue = (int)value;\r\n\t\t\r\n\t\tthis.getSlider().setValue(intValue);\r\n }", "public void normalize() {\n // determine the maximum value\n \n Double max = getMaxValue();\n \n if(max!=null) {\n normalize(max);\n }\n }", "public void normalize()\n {\n\tdef += 200*counter;\n\tdmg -= 0.5*counter;\n\tcounter = 0;\n }", "protected void setScaleDenominator(double scaleDenominator) {\n this.scaleDenominator = scaleDenominator;\n }", "public float normalize() {\r\n\t\tfloat length = mDirection.length();\r\n\t\tif (length>0) {\r\n\t\t\tmDirection.normalize();\r\n\t\t}\r\n\t\treturn length;\r\n\t}", "default void setLength(double t) {\r\n scaleDirection(t / getLength());\r\n }", "public double l1_norm()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += Math.abs(c);\r\n\r\n return sum;\r\n }", "public double norm() {\n if (dy == 0.0)\n return Math.abs(dx);\n return Math.hypot(dx, dy);\n }", "public void setAttributes(ShapeAttributes normalAttrs)\n {\n this.normalAttrs = normalAttrs;\n }", "public Builder clearStrength() {\n bitField0_ = (bitField0_ & ~0x00000010);\n strength_ = 0;\n onChanged();\n return this;\n }", "public void setMinMagnitude(double magnitude);", "public Builder clearNormal() {\n if (normalBuilder_ == null) {\n normal_ = null;\n onChanged();\n } else {\n normal_ = null;\n normalBuilder_ = null;\n }\n\n return this;\n }", "public void setMicGainDb(float level);", "public void setRadius(double n)\r\n\t{\r\n\t\tradius = n;\r\n\t}", "public void setScale(double n) {\n\n\t}", "public void normalize() { sets length to 1\n //\n double length = Math.sqrt(x * x + y * y);\n\n if (length != 0.0) {\n float s = 1.0f / (float) length;\n x = x * s;\n y = y * s;\n }\n }", "public Builder clearStrength() {\n \n strength_ = 0;\n onChanged();\n return this;\n }", "public void normalize() {\n\t\tdouble norm = norm();\n\t\tif (DoubleComparison.eq(norm, 0)) {\n\t\t\tthrow new RuntimeException(\"Failed to normalize: length is zero\");\n\t\t}\n\t\tthis.x = this.x / norm;\n\t\tthis.y = this.y / norm;\n\t\tthis.z = this.z / norm;\n\t}", "public void setValue(double val) {\r\n\t\tthis.worth = val;\r\n\t}", "public void setMatrixNorm(double normA) {\n this.normA = normA;\n }", "void setDeviation(double deviation);", "public void setVectorNorm(double normb) {\n this.normb = normb;\n }", "public double getNormFrequency() {\n return normFrequency;\n }", "public String getNormal() {\r\n return normal;\r\n }", "public void normalize() {\r\n\t\tfloat length = (float) this.lenght();\r\n\t\tif (length > 0) {\r\n\t\t\tx /= length;\r\n\t\t\ty /= length;\r\n\t\t\tz /= length;\r\n\t\t}\r\n\t}", "public void setMagnitude(int magnitude)\r\n {\r\n this.magnitude = magnitude; \r\n }", "public void setAnswr(Float answr) {\r\n this.answr = answr;\r\n }", "public void setStrength(final int s) {\n this.strength = s;\n }", "private void computeNormal() {\n normal = getDirection();\r\n\r\n // Rotate by -90 degrees to get normal of line\r\n float oldY = normal.y;\r\n normal.y = -normal.x;\r\n normal.x = oldY;\r\n }", "@ApiModelProperty(value = \"Phone number in E.164 format. Read-only.\")\n public String getNormalized() {\n return normalized;\n }", "public Optional<String> getNormal()\n {\n return m_normal;\n }", "public void setMaxAmplitudeZero(){ maxAmplitude=0; }", "protected static void normalize(double[] wheelSpeeds) {\r\n\t\tdouble maxMagnitude = Math.abs(wheelSpeeds[0]);\r\n\t\tfor (int i = 1; i < kMaxNumberOfMotors; i++) {\r\n\t\t\tdouble temp = Math.abs(wheelSpeeds[i]);\r\n\t\t\tif (maxMagnitude < temp) {\r\n\t\t\t\tmaxMagnitude = temp;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (maxMagnitude > 1.0) {\r\n\t\t\tfor (int i = 0; i < kMaxNumberOfMotors; i++) {\r\n\t\t\t\twheelSpeeds[i] = wheelSpeeds[i] / maxMagnitude;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public FoursquarePathBuilder setLlAcc(double llAcc) {\n String llAccs = String.format(\"%f1\", llAcc);\n addParameter(\"llAcc\", llAccs);\n return this;\n }", "public void setRadio(float radio){\r\n if(radio<0){\r\n this.radio=Math.abs(radio);\r\n }else{\r\n this.radio=radio;\r\n }\r\n \r\n }", "public ByteBuffer getNormalBuffer() {\n return normBuf;\n }", "public DraggableBehavior setSnapTolerance(int snapTolerance)\n\t{\n\t\tthis.options.put(\"snapTolerance\", snapTolerance);\n\t\treturn this;\n\t}", "public ADSR(float maxAmp, float attTime, float decTime, float susLvl, float relTime, float befAmp, float aftAmp)\n\t{\n\t\tsuper();\n\t\taudio = new UGenInput(InputType.AUDIO);\n\t\tmaxAmplitude = maxAmp;\n\t\tattackTime = attTime;\n\t\tdecayTime = decTime;\n\t\tsustainLevel = susLvl;\n\t\treleaseTime = relTime;\n\t\tbeforeAmplitude = befAmp;\n\t\tafterAmplitude = aftAmp;\n\t\tamplitude = beforeAmplitude;\n\t\tisTurnedOn = false;\n\t\tisTurnedOff = false;\n\t\ttimeFromOn = -1.0f;\n\t\ttimeFromOff = -1.0f;\n\t\tunpatchAfterRelease = false;\n\t}", "public void setRadius(double r) { radius.set(clamp(r, RADIUS_MIN, RADIUS_MAX)); }", "public void setLength(double len) throws IllegalArgumentException\n {\n if (len<0) throw new IllegalArgumentException (\"Length cannot be negative\" + len);\n else length = len;\n }", "public void setBSCA_SendTxtScale (String BSCA_SendTxtScale);", "public void setRadian(float rad) {\n radian = rad;\n drawMirrorCenter(drawingPad.getTransformedGraphics(), true);\n }", "public void setRadius( double r ) \r\n { radius = ( r >= 0.0 ? r : 0.0 ); }", "public Builder clearScaler() {\n bitField0_ = (bitField0_ & ~0x00000001);\n scaler_ = 0F;\n onChanged();\n return this;\n }", "public void useUniformDeviates(){\n this.gaussianDeviates = false;\n }", "public Builder clearHealSnPort() {\n \n healSnPort_ = 0;\n onChanged();\n return this;\n }", "void scaleSampleRate(float scaleFactor) {\n if (debugFlag)\n debugPrintln(\"JSChannel: scaleSampleRate\");\n if (ais == null) {\n if (debugFlag) {\n debugPrint(\"JSChannel: Internal Error scaleSampleRate: \");\n debugPrintln(\"ais is null\");\n }\n return;\n }\n\n AudioFormat audioFormat = ais.getFormat();\n float rate = audioFormat.getSampleRate();\n\n double newRate = rate * scaleFactor;\n if (newRate > 48000.0) // clamp to 48K max\n newRate = 48000.0;\n/****\n// NOTE: This doesn't work...\n/// audioStream.setSampleRate(newRate);\n\n// need to set FloatControl.Type(SAMPLE_RATE) to new value somehow...\n\n if (debugFlag) {\n debugPrintln(\"JSChannel: scaleSampleRate: new rate = \" +\n rate * scaleFactor);\n debugPrintln(\" >>>>>>>>>>>>>>> using scaleFactor = \" +\n scaleFactor);\n }\n****/\n }", "public void setDenominator(int dem)\r\n {\r\n this.denominator = dem;\r\n }", "public void setScale(double scale) {\r\n if (scale >= 0.1) {\r\n this.scale = scale;\r\n }\r\n }", "public void setStrengthBoost(int boost) {\n mStrengthBoost = boost;\n }", "public boolean getNormal() {\n return normal_;\n }", "public void setReal(double real) {this.real = real;}", "public void normalize() {}", "public void setDoblyMode (String mode) {\n int i = Integer.parseInt(mode);\n if (i >= 0 && i <= 3) {\n writeSysfs(AUIDO_DSP_AC3_DRC, \"drcmode\" + \" \" + mode);\n } else {\n writeSysfs(AUIDO_DSP_AC3_DRC, \"drcmode\" + \" \" + \"2\");\n }\n }", "float norm();", "public void setResistance(double resistance) {\n\t\tthis.resistance = resistance;\n\t}", "public boolean getNormal() {\n return normal_;\n }", "public void setSd(double sd) {\n this.sd = sd;\n }", "public\t\tvoid\t\tsetNormalizedValue(double value)\n\t\t{\n\t\tif (value > 1.0)\n\t\t\tvalue = 1.0;\n\t\telse if (value < 0.0)\n\t\t\tvalue = 0.0;\n\n\t\tthis.value = value;\n\t\taddNormalizedTick(value);\n\t\tsetValueDisplay(\"\" + (minimumValue + value * (maximumValue - minimumValue)));\n\t\tdispatchAction(Mi_VALUE_CHANGED_ACTION);\n\t\t}", "public Contact() {\n accumulatedNormalImpulse = 0.0;\n accumulatedTangentImpulse = 0.0;\n }", "public void putSilentOn() {\n StartupService.mode.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n }", "public ADSR(float maxAmp, float attTime, float decTime, float susLvl, float relTime)\n\t{\n\t\tthis(maxAmp, attTime, decTime, susLvl, relTime, 0.0f, 0.0f);\n\t}", "public void setLitWeightRatio(double ratio) { this.exec = this.exec.withProperty(\"sm.improve.lwr\", ratio); }", "public void setScale(double s){\n\t\tsetParameters(location, s);\n\t}", "public void setStandardWordLength(double standardWordLength) {\r\n\t\tthis.standardWordLength = standardWordLength;\r\n\t}", "public void setAudioDescriptor( AudioDescriptor audioDescriptor );", "public void setStrength(int strength) {\n this.calories = strength;\n }", "public double norm() {\n\t\thomogenize();\n\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n\t}", "public void setWavelength(float wavelength) {\n/* 61 */ this.wavelength = wavelength;\n/* */ }", "public void setR(Double r);", "@External\r\n\t@ClientFunc\r\n\tpublic MetaVar SetParticleCullRadius(MetaVarNumber radiusVar);", "void setGoalRPM(double goalRPM);", "public void normal(PointType n)\r\n {\r\n\t //System.out.println(\"norm: \"+n.x+\", \"+n.y+\", \"+n.z);\r\n\t\tgl.glNormal3d(n.x, n.y, n.z);\t\t\r\n\t}", "public void setUncertainty(Double uncertainty);", "public void setRad(String rad) {\n\t\tthis.rad = rad;\r\n\t\tfirePropertyChange(ConstantResourceFactory.P_RAD,null,rad);\r\n\t}", "public void setStrength(float strength)\n {\n this.strength = strength;\n }", "public baconhep.TTau.Builder setRawMuonRejection(float value) {\n validate(fields()[11], value);\n this.rawMuonRejection = value;\n fieldSetFlags()[11] = true;\n return this; \n }", "public void setDecayRate(double newDecayRate ){\n\n decayRate= newDecayRate;\n}", "public Builder setNormal(godot.wire.Wire.Vector3 value) {\n if (normalBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n normal_ = value;\n onChanged();\n } else {\n normalBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setBaseLength(double baseLength) {\n this.baseLength = baseLength;\n }", "public Builder setRealValue(double value) {\n typeCase_ = 4;\n type_ = value;\n onChanged();\n return this;\n }" ]
[ "0.5874862", "0.5355171", "0.5313533", "0.50709504", "0.50531685", "0.494658", "0.4940346", "0.48866355", "0.48232752", "0.48119986", "0.4811139", "0.4695688", "0.46952003", "0.46922022", "0.46922022", "0.46265888", "0.4597341", "0.45844352", "0.454807", "0.45359775", "0.44971555", "0.44634882", "0.44592124", "0.4456113", "0.44521832", "0.44383284", "0.44138688", "0.4403309", "0.4389723", "0.43682343", "0.4363334", "0.43593845", "0.435405", "0.43473586", "0.43428966", "0.43297192", "0.43268517", "0.43267712", "0.4312948", "0.43061304", "0.43057173", "0.4305709", "0.43043375", "0.42975253", "0.4296343", "0.42919606", "0.4289834", "0.4287005", "0.42793152", "0.42736712", "0.42722437", "0.42706636", "0.42674392", "0.4263512", "0.42613953", "0.42521462", "0.42473823", "0.4230486", "0.4225537", "0.4214669", "0.42143297", "0.42111522", "0.4205348", "0.41941267", "0.41913545", "0.4187174", "0.41815764", "0.4181492", "0.4170856", "0.4169291", "0.41605347", "0.41541895", "0.41537043", "0.41458458", "0.41448644", "0.41425776", "0.41389087", "0.41384852", "0.41368762", "0.41357315", "0.41344112", "0.41339353", "0.41305193", "0.41287902", "0.41225904", "0.41191065", "0.4112648", "0.41093186", "0.41087773", "0.41042772", "0.41030082", "0.41024497", "0.4102287", "0.41015723", "0.41014922", "0.40965405", "0.4081799", "0.40697163", "0.40649402", "0.40634444" ]
0.7234714
0
Returns the dial norm property of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITUR Recommendation BS.1196 (1dB per step). This property is optional.
public @Int8 byte getDialNorm() throws PropertyNotPresentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDialNorm(\r\n\t\t\t@Int8 Byte dialNorm);", "public Rational getAudioSampleRate();", "public Float getSpeechDrpr() {\n return speechDrpr;\n }", "public double getNormFrequency() {\n return normFrequency;\n }", "double getLuong();", "public NM getAdministeredDrugStrengthVolume() { \r\n\t\tNM retVal = this.getTypedField(23, 0);\r\n\t\treturn retVal;\r\n }", "public Rational getRawDuration ()\r\n {\r\n Rational rawDuration = null;\r\n\r\n if (!getNotes().isEmpty()) {\r\n // All note heads are assumed to be the same within one chord\r\n Note note = (Note) getNotes().get(0);\r\n\r\n if (!note.getShape().isMeasureRest()) {\r\n // Duration (with flags/beams applied for non-rests)\r\n rawDuration = note.getNoteDuration();\r\n\r\n // Apply augmentation (applies to rests as well)\r\n if (dotsNumber == 1) {\r\n rawDuration = rawDuration.times(new Rational(3, 2));\r\n } else if (dotsNumber == 2) {\r\n rawDuration = rawDuration.times(new Rational(7, 4));\r\n }\r\n }\r\n }\r\n\r\n return rawDuration;\r\n }", "public float getRate() {\n\treturn durationStretch * nominalRate;\n }", "public String getNormal() {\r\n return normal;\r\n }", "public float getMicGainDb();", "public float normalize() {\r\n\t\tfloat length = mDirection.length();\r\n\t\tif (length>0) {\r\n\t\t\tmDirection.normalize();\r\n\t\t}\r\n\t\treturn length;\r\n\t}", "public IntegerProperty getReactorAmplitude() {\n return this.reactorLine.getCurrentAmplitude();\n }", "public Optional<String> getNormal()\n {\n return m_normal;\n }", "public NM getAdministeredStrength() { \r\n\t\tNM retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }", "public java.lang.String getShortDialProp()\n\t{\n\t\treturn shortDialProp;\n\t}", "public float grabStrength() {\r\n\t\treturn LeapJNI.Hand_grabStrength(this.swigCPtr, this);\r\n\t}", "public @Int8 byte getAudioReferenceLevel()\r\n\t\tthrows PropertyNotPresentException;", "public float getWavelength() {\n/* 52 */ return this.wavelength;\n/* */ }", "public Double getLoRoCenterMixLevel() {\n return this.loRoCenterMixLevel;\n }", "public float getMagnitude() {\r\n\t\treturn Float.parseFloat(getProperty(\"magnitude\").toString());\r\n\t}", "private String LightConversion() {\n\n int exponent = ((raw[19] & 0xC0) >> 6) + ((raw[20] & 0x03) << 2);\n int mantissa = ((raw[20] & 0xFC) >> 2) + ((raw[21] & 0x03) << 6);\n double value = (Math.pow(2.0, exponent)) * mantissa * 0.025;\n\n return Double.valueOf(threeDForm.format(value)) + \"\";\n\n }", "public float getMagnitude() {\n\t\treturn Float.parseFloat(getProperty(\"magnitude\").toString());\n\t}", "public AudioDescriptor getAudioDescriptor();", "@SimpleProperty(description = \"The diameter of the wheels used for driving.\",\n category = PropertyCategory.BEHAVIOR, userVisible = false)\n public float WheelDiameter() {\n return (float) wheelDiameter;\n }", "public double norm() {\n if (dy == 0.0)\n return Math.abs(dx);\n return Math.hypot(dx, dy);\n }", "Double getNominalDiameter();", "public Float getIllumination () {\n return illumination;\n }", "public BigDecimal getLossSd() {\r\n return lossSd;\r\n }", "public Vector3f getAttenuation() {\r\n\t\treturn this.attenuation;\r\n \t}", "public boolean getNormal() {\n return normal_;\n }", "int getStrength(Unit unit);", "double getCalibratedLevelAngle();", "public double getStrength() {\n return\n (left.isDiscrete() ? 1 : left.getStrength())\n * (right.isDiscrete() ? 1 : right.getStrength());\n }", "public double readLightLevel()\n {\n return (Math.random() * (200000.0 - 0.0)) + 0.0;\n }", "public int getLength() { \r\n return audioLength; \r\n }", "@Field(4) \n\tpublic AVRational sample_aspect_ratio() {\n\t\treturn this.io.getNativeObjectField(this, 4);\n\t}", "public String getStereoDownmix() {\n return this.stereoDownmix;\n }", "public BigDecimal getManageLyRate() {\n return manageLyRate;\n }", "int getStrength();", "int getStrength();", "public int getStrength() {\n return strength_;\n }", "public int getStrength() {\n return strength_;\n }", "@Override\n public int getDbm() {\n int dBm;\n\n int level = mSignalStrength;\n int asu = (level == 99 ? Integer.MAX_VALUE : level);\n if (asu != Integer.MAX_VALUE) {\n dBm = -113 + (2 * asu);\n } else {\n dBm = Integer.MAX_VALUE;\n }\n if (DBG) log(\"getDbm=\" + dBm);\n return dBm;\n }", "public boolean getNormal() {\n return normal_;\n }", "public double getResistance() {\n\t\treturn this.resistance;\n\t}", "public Double getLoRoSurroundMixLevel() {\n return this.loRoSurroundMixLevel;\n }", "@Override\n public double getCONSUMPTION() {\n if (status && brightValue != 0) {\n this.consumption = (super.DEFAULTCONSUMPTION + 2) + (brightValue / 100);\n } else if (status) {\n this.consumption = super.DEFAULTCONSUMPTION + 2;\n } else if (status != true) {\n this.consumption = super.DEFAULTCONSUMPTION;\n }\n\n return consumption;\n }", "@Override\r\n\tpublic float soundLevel() {\n\t\treturn 1f;\r\n\t}", "public double getAltDiff() {\n\t\treturn altDiff;\n\t}", "public long getMeasRcvdPowerdBm() {\r\n return measRcvdPowerdBm;\r\n }", "public IntegerProperty getControlAmplitude() {\n return this.inputAdjuster.getCurrentAmplitude();\n }", "long getDuration() {\n if (debugFlag)\n debugPrintln(\"JSChannel:getDuration\");\n\n if (ais == null || audioFormat == null ) {\n if (debugFlag)\n debugPrintln(\"JSChannel: Internal Error getDuration\");\n return (long)Sample.DURATION_UNKNOWN;\n }\n // Otherwise we'll assume that we can calculate this duration\n\n // get \"duration\" of audio stream (wave file)\n // TODO: For True STREAMing audio the size is unknown...\n long numFrames = ais.getFrameLength();\n if (debugFlag)\n debugPrintln(\" frame length = \" + numFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n\n float rateInFrames = audioFormat.getFrameRate();\n rateInHz = audioFormat.getSampleRate();\n if (debugFlag)\n debugPrintln(\" rate in Frames = \" + rateInFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n long duration = (long)((float)numFrames/rateInFrames);\n if (debugFlag)\n debugPrintln(\" duration(based on ais) = \" + duration);\n return duration;\n }", "public int getStrength() {\n return strength_;\n }", "public int getStrength() {\n return strength_;\n }", "protected float getDownScaleFactor() {\n return BlurDialogEngine.DEFAULT_BLUR_DOWN_SCALE_FACTOR;\n }", "public Rational getDuration ()\r\n {\r\n if (this.isWholeDuration()) {\r\n return null;\r\n } else {\r\n Rational raw = getRawDuration();\r\n\r\n if (tupletFactor == null) {\r\n return raw;\r\n } else {\r\n return raw.times(tupletFactor);\r\n }\r\n }\r\n }", "public int getStrength() {\n return this.strength;\n }", "public float getMagnitude()\n {\n return magnitude;\n }", "public int getMagnitude()\r\n {\r\n return magnitude;\r\n }", "public double module() {\n return getMagnitude();\n }", "NetVolumeMeasureType getNetVolumeMeasure();", "int getLumMod(){\n return getPercentageValue(\"lumMod\");\n }", "public int getStrength() {\n \t\treturn strength;\n \t}", "public BigDecimal getLBR_DIFAL_RateICMSInterPart();", "public int getStrength() {\r\n\t\treturn strength;\r\n\t}", "DoubleProperty getPowerUsage();", "public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }", "public int getStrength() { return strength; }", "@Override\n\tpublic double\n\tnormalize()\n\t{\n\t\tdouble len = length();\n\n\t\tif( len != 0 )\n\t\t{\n\t\t\tdata[0] /= len;\n\t\t\tdata[1] /= len;\n\t\t\tdata[2] /= len;\n\t\t}\n\t\t\n\t\treturn len;\n\t}", "public SimpleDoubleProperty getTotalAbsencePercentageProperty() {\n return totalAbsencePercentageProperty;\n }", "public int getAudioSampleRate() {\n\t\treturn mSampleRate;\n\t}", "@Override\n\tpublic double getLength() {\n \tdouble muscleLength = myAmplitude * Math.sin(myPie);\n\t\tmyPie += myFrequency;\n\t\treturn muscleLength;\n }", "@Override\n public int getLevel() {\n int level;\n\n // ASU ranges from 0 to 31 - TS 27.007 Sec 8.5\n // asu = 0 (-113dB or less) is very weak\n // signal, its better to show 0 bars to the user in such cases.\n // asu = 99 is a special case, where the signal strength is unknown.\n int asu = mSignalStrength;\n if (asu <= 2 || asu == 99) level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;\n else if (asu >= GSM_SIGNAL_STRENGTH_GREAT) level = SIGNAL_STRENGTH_GREAT;\n else if (asu >= GSM_SIGNAL_STRENGTH_GOOD) level = SIGNAL_STRENGTH_GOOD;\n else if (asu >= GSM_SIGNAL_STRENGTH_MODERATE) level = SIGNAL_STRENGTH_MODERATE;\n else level = SIGNAL_STRENGTH_POOR;\n if (DBG) log(\"getLevel=\" + level);\n return level;\n }", "public final int getPulse() {\n\t\treturn this.getProc().getServer().getConsole().getPulse();\n\t}", "public String getDenotation(){\n return this.denotation;\n }", "public Double getLtRtCenterMixLevel() {\n return this.ltRtCenterMixLevel;\n }", "public double l1_norm()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += Math.abs(c);\r\n\r\n return sum;\r\n }", "public float getDistance(){\n\t\t\treturn s1.start.supportFinal.dot(normal);\n\t\t}", "public int getReSampleRate() {\n return 0;\n }", "public int getLevel() {\n if ( air != null )\n return air.sampleRSSI(CC1000Radio.this);\n else return ADC.VBG_LEVEL; // return a default value of some sort\n }", "public Double getLtRtSurroundMixLevel() {\n return this.ltRtSurroundMixLevel;\n }", "public Length getUnit() {\n return unit;\n }", "public long getDenominator();", "public ByteBuffer getNormalBuffer() {\n return normBuf;\n }", "public int getStrength() {\n\t\treturn strength;\n\t}", "public int getStrength() {\n\t\treturn this.currentStrength;\n\t}", "public static final float getBatteryGain() {\r\n\t\treturn BATTERY_GAIN;\r\n\t}", "public float pinchStrength() {\r\n\t\treturn LeapJNI.Hand_pinchStrength(this.swigCPtr, this);\r\n\t}", "float getMagnitude();", "public String getWaveformDescription() {\n\t\treturn waveformDescription;\n\t}", "public double length()\n {\n return this.getR();\n }", "public Integer getHoldscale() {\r\n return holdscale;\r\n }", "int getLum(){\n return getPercentageValue(\"lum\");\n }", "public double getLightAbsorptionCoefficient(){\n return gamma;\n }", "public float getPower() {\n \t\treturn 1/rarity;\n \t}", "public double getLageurDuMonde(){\n\t\treturn largeurDuMonde;\n\t}", "@Override\n public int getAsuLevel() {\n // ASU ranges from 0 to 31 - TS 27.007 Sec 8.5\n // asu = 0 (-113dB or less) is very weak\n // signal, its better to show 0 bars to the user in such cases.\n // asu = 99 is a special case, where the signal strength is unknown.\n int level = mSignalStrength;\n if (DBG) log(\"getAsuLevel=\" + level);\n return level;\n }", "public double getAdjustmentRatio() {\n return adjustmentRatio;\n }", "@Basic @Immutable\n\tpublic int getStrength() {\n\t\treturn this.strength;\n\t}", "private double getRawAngle() {\n return (m_pot.getVoltage() / Constants.AIO_MAX_VOLTAGE) * Constants.Hood.POT_SCALE;\n }" ]
[ "0.6228818", "0.55166966", "0.5481642", "0.5475496", "0.5467568", "0.5437962", "0.5421046", "0.54167074", "0.53733766", "0.52930415", "0.52915484", "0.527052", "0.5263404", "0.5238825", "0.52328044", "0.52246356", "0.52219564", "0.519544", "0.51769507", "0.5176183", "0.5171288", "0.5156664", "0.5139093", "0.5135299", "0.5119295", "0.51170987", "0.5107518", "0.51059204", "0.51057667", "0.50870395", "0.5080821", "0.5079395", "0.50776154", "0.507699", "0.50647056", "0.50626487", "0.50580055", "0.50569725", "0.50550693", "0.50550693", "0.50491977", "0.50491977", "0.5047101", "0.5046656", "0.5037613", "0.5034707", "0.5034463", "0.5024181", "0.5014068", "0.50119245", "0.4986798", "0.49790725", "0.49770722", "0.49770722", "0.49650803", "0.49639487", "0.49605408", "0.49589744", "0.49464136", "0.49378753", "0.4935786", "0.49294916", "0.49254403", "0.49242198", "0.49241498", "0.49221298", "0.4920042", "0.49184498", "0.49183", "0.4918285", "0.49168122", "0.49149132", "0.49107483", "0.49062446", "0.4898726", "0.4893022", "0.48801458", "0.48775947", "0.4874465", "0.48682916", "0.48681945", "0.48673737", "0.48669615", "0.48637918", "0.4857407", "0.4856292", "0.48547012", "0.4854001", "0.48535195", "0.48519245", "0.48512423", "0.4850892", "0.4850012", "0.4848715", "0.4844722", "0.48446387", "0.4843707", "0.4835842", "0.48308507", "0.48295456" ]
0.6777534
0
Sets the number of quantization bits used for the audio essence described by this sound descriptor.
public void setQuantizationBits( @UInt32 int bitsCount) throws IllegalArgumentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public @UInt32 int getQuantizationBits();", "public void setNumberOfArticulationParameters(short pNumberOfArticulationParameters)\n{ numberOfArticulationParameters = pNumberOfArticulationParameters;\n}", "public void setQuantity(int quant){\n\t\t// store into the instance variable quantity the value of the parameter quant\n\t\tquantity = quant;\n\t}", "private void setBitDepth(short encoding) {\n if (encoding == AudioFormat.ENCODING_PCM_8BIT)\n audioBundle.putInt(AudioSettings.AUDIO_BUNDLE_KEYS[20], 8);\n else if (encoding == AudioFormat.ENCODING_PCM_16BIT)\n audioBundle.putInt(AudioSettings.AUDIO_BUNDLE_KEYS[20], 16);\n else if (encoding == AudioFormat.ENCODING_PCM_FLOAT)\n audioBundle.putInt(AudioSettings.AUDIO_BUNDLE_KEYS[20], 32);\n else {\n // default or error, return \"guaranteed\" default\n audioBundle.putInt(AudioSettings.AUDIO_BUNDLE_KEYS[20], 16);\n }\n }", "public void set_quality(int value) {\n setUIntBEElement(offsetBits_quality(), 16, value);\n }", "public synchronized void setBandCount(int count)\n { bandCount = count;\n }", "public void set_sampleCnt(long value) {\n setUIntBEElement(offsetBits_sampleCnt(), 32, value);\n }", "@Test\n public void setSampleSizeInBits_8() {\n final int SAMPLE_SIZE_BITS = 8;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n }", "@Test\n public void setSampleSizeInBits_16() {\n final int SAMPLE_SIZE_BITS = 16;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n }", "public void setQuantite(int quantite) {\r\n this.quantite = quantite;\r\n }", "void setFluidContents(int volume);", "void setSpikesPerChunk(VariableAmount count);", "public void set(int symbol, int freq);", "@Test\n public void setSampleSizeInBits_7() {\n Assertions.assertThrows(IllegalArgumentException.class, () -> {\n final int SAMPLE_SIZE_BITS = 7;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n });\n }", "public void setHandThrowDamage(short handThrowDamage);", "@Override\n public void setSuitNum(int total, int normal, int taobao, int imgs) {\n }", "public void setSampleSize(int n){\n\t\tsetParameters(populationSize, type1Size, n);\n\t}", "public void setQuality(float quality);", "public void setLength(){\n this.length = 0;\n for (Music track : this.tracks){\n this.length += track.getLength();\n }\n }", "public void setAverageBits(int bits) {\n }", "public void setAudioDescriptor( AudioDescriptor audioDescriptor );", "public void setSizeInBits(final int size) {\n\t\tthis.sizeinbits = size;\n\t}", "public void setQuantum(int v) {\n this.quantum = v;\n }", "public void setQuality(int value) {\n this.quality = value;\n }", "public void set_count(int value) {\n setUIntBEElement(offsetBits_count(), 16, value);\n }", "public void set_size(int s);", "void setCategoryBits (long bits);", "public void setFrequency(int f){\n this.frequency = f;\n }", "public void setAudiofileSize(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "public abstract void setMaxExponentSize(byte maxExponentSize);", "public Builder setFreq(int value) {\n bitField0_ |= 0x00000008;\n freq_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic void setSequenceSize(int x) {\n\t\tsizeNum = x;\r\n\t\tupdate();\r\n\t}", "public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}", "public void setQuality(int value)\n\t{\n\t\tconfigManager.setQuality(value);\n\t\tupdatePreviewSize();\n\t}", "public Builder setAudioChannelCount(int value) {\n\n audioChannelCount_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }", "public void setQ(int q) {\n/* 590 */ getCOSObject().setInt(COSName.Q, q);\n/* */ }", "public void setMagnitude(int magnitude)\r\n {\r\n this.magnitude = magnitude; \r\n }", "@Test\n public void setSampleSizeInBits_24() {\n final int SAMPLE_SIZE_BITS = 24;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n }", "public void setWavelength(float wavelength) {\n/* 61 */ this.wavelength = wavelength;\n/* */ }", "@Override\n public void setAEBufferSize(int size) {\n if (size < 1000 || size > 1000000) {\n log.warning(\"ignoring unreasonable aeBufferSize of \" + size + \", choose a more reasonable size between 1000 and 1000000\");\n return;\n }\n this.aeBufferSize = size;\n prefs.putInt(\"CypressFX2.aeBufferSize\", aeBufferSize);\n }", "void setValueQuantity(org.hl7.fhir.Quantity valueQuantity);", "default void setSpikesPerChunk(int count) {\n setSpikesPerChunk(VariableAmount.fixed(count));\n }", "void setPaperSize(short size);", "public void setSamples(int samples){ \n this.samples = samples; \n }", "public void setQuantity(int quantity) {\r\n if (quantity >= 0) {\r\n this.quantity = quantity;\r\n }\r\n else {\r\n System.out.print(\"Sorry no negative quantities -- setting to 1\");\r\n this.quantity = 1;\r\n }\r\n }", "public void setSampleSize(int value) {\n this.sampleSize = value;\n }", "public void addSpec(int s) {\n totalSpec += s;\n }", "public void setQuality(Integer quality) {\n this.quality = quality;\n }", "public void set_length(short value) {\n setUIntElement(offsetBits_length(), 8, value);\n }", "public void setSiegeWeaponDamage(short siegeWeaponDamage);", "public void setSampleSize(int size){\r\n\t\tSampleSize = size;\r\n\t}", "public void set_count(int c);", "public Builder setQualityBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "public void setQuantidade(int quantos);", "private void setMediaCount(int value) {\n \n mediaCount_ = value;\n }", "void setCopies(short copies);", "public void setSupports(long supports);", "@Test\n public void setSampleSizeInBits_1() {\n Assertions.assertThrows(IllegalArgumentException.class, () -> {\n final int SAMPLE_SIZE_BITS = 1;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n });\n }", "@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }", "private void setQuantityOfShares(String rawText){\n\t\tint num = Integer.parseInt(rawText);\n\t\tif(num < 0){\n\t\t\tthrow new IllegalArgumentException(\"Quantity can't be less than 0: \" + num);\n\t\t}\n\t\tsynchronized(this){\n\t\t\tthis.quantityOfShares = num;\n\t\t}\n\t}", "public void setAudioJittcomp(int milliseconds);", "void setNumberOfInstallments(java.math.BigInteger numberOfInstallments);", "public static int sizeBits_quality() {\n return 16;\n }", "@Generated\n public Qty_originali() {\n }", "public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setAudioDscp(int dscp);", "void setNumberOfArtillery(int artillery);", "private void setSize(int s){\n\t\tsize = s;\n\t}", "public Builder setFrequencyBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n frequency_ = value;\n onChanged();\n return this;\n }", "public void setCount(java.math.BigInteger count)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COUNT$8);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(COUNT$8);\n }\n target.setBigIntegerValue(count);\n }\n }", "public void setEncoderCountsPerUnit(double input) {\n encoderCountsPerUnit = input;\n }", "protected void setSampleCountImpl(int newSampleCount) {\n\t\tif (sampleCount != newSampleCount) {\n\t\t\tsampleCount = newSampleCount;\n\t\t}\n\t}", "public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "public MediaDeviceDescription setBitsPerComponent(int bitsPerComponent) {\n this.bitsPerComponent = bitsPerComponent;\n return this;\n }", "public int\n setBitRate(int bitRate);", "@Test\n public void setSampleSizeInBits_minus1() {\n Assertions.assertThrows(IllegalArgumentException.class, () -> {\n final int SAMPLE_SIZE_BITS = -1;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n });\n }", "void setValueMixerSound(int value);", "public void setQuantity(int quantity) {\r\n this.quantity = quantity;\r\n }", "public void setBowDamage(short bowDamage);", "public void setReserved3(short value)\n {\n field_1_options = reserved3.setShortValue(field_1_options, value);\n }", "public void mo38281a(short s) {\n this.f27039b = s;\n }", "public void setProductQuantity (Product key, int quant) {\n\t\tm_prodList.remove(key);\n\t\tm_prodList.put(key,new Integer(quant));\n\n\t}", "public void setSizeE(long s){\n\t\tthis.sizeE = s;\n\t}", "public void setQuantification(Quantification quantification) {\n\t\tthis.quantification = quantification;\n\t}", "public SeqItemset(int n){\n\t\tm_elems = new short[n];\n\t\t//m_itemset = new SeqItem[n];\n\t\tm_frequency = 0;\n\t\tm_size = (short) m_elems.length;\n\t}", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "public void setSpecification(Integer specification) {\r\n this.specification = specification;\r\n }", "public void setCount(int count)\r\n\t{\r\n\t}", "public void setQuantity(org.hl7.fhir.Integer quantity)\n {\n generatedSetterHelperImpl(quantity, QUANTITY$10, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public abstract void setCntFtc(int cntFtc);", "@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }", "void setNumberOfCavalry(int cavalery);", "private void setquestion() {\n qinit();\n question_count++;\n\n if (modeflag == 3) {\n modetag = (int) (Math.random() * 3);\n } else {\n modetag = modeflag;\n }\n\n WordingIO trueword = new WordingIO(vocabulary);\n\n if (modetag == 0) {\n\n MCmode(trueword);\n }\n\n if (modetag == 1) {\n BFmode(trueword);\n }\n\n if (modetag == 2) {\n TLmode(trueword);\n }\n\n if (time_limit != 0) {\n timingtoanswer(time_limit, jLabel2, answer_temp, jLabel5, jLabel6, jButton1);\n }\n }", "public void setAudiofileSize( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "public void setQuantity(int quantity) {\r\n\t\tthis.quantity = quantity;\r\n\t}", "public void setX(int x) {\r\n this.x = (short) x;\r\n }", "public void setQuantity(int quantity)\n\t{\n\t\tthis.quantity = quantity;\n\t}" ]
[ "0.61839515", "0.6006817", "0.6002003", "0.58990186", "0.5821734", "0.572576", "0.5687871", "0.5684631", "0.56441134", "0.55722344", "0.5560176", "0.5510849", "0.55081403", "0.5410833", "0.5388492", "0.53808254", "0.53715354", "0.53703", "0.5364725", "0.5356219", "0.5340458", "0.53022385", "0.52799165", "0.52667785", "0.52313083", "0.5228951", "0.51854557", "0.51810825", "0.51603884", "0.515452", "0.51396966", "0.5128089", "0.5126921", "0.51081264", "0.51066214", "0.51045847", "0.510353", "0.5101722", "0.50996643", "0.50979203", "0.509696", "0.50716347", "0.5071377", "0.5062795", "0.5056843", "0.5025795", "0.5025046", "0.5018384", "0.5010703", "0.5005788", "0.50047624", "0.5003736", "0.50034463", "0.50034225", "0.500298", "0.5000076", "0.49904445", "0.49822485", "0.49791047", "0.4978815", "0.49772316", "0.4976373", "0.49763003", "0.49759975", "0.49733904", "0.497137", "0.49710056", "0.49710056", "0.49676895", "0.49673015", "0.49608716", "0.49585676", "0.49541798", "0.49310958", "0.49234566", "0.49223104", "0.49203995", "0.4916025", "0.49096915", "0.49087757", "0.49044564", "0.49025124", "0.48916152", "0.48913696", "0.4890434", "0.4888864", "0.48873222", "0.48755783", "0.4873327", "0.48705825", "0.48692024", "0.48597875", "0.4847278", "0.48450366", "0.48426843", "0.483996", "0.4827705", "0.48242724", "0.48230606", "0.4809004" ]
0.6718886
0
Returns the number of quantization bits used for the audio essence described by this sound descriptor.
public @UInt32 int getQuantizationBits();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int cardinality() {\n\t\tint counter = 0;\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tcounter += wordinbits * localrlw.getRunningLength();\n\t\t\t}\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tcounter += Long.bitCount(i.buffer()[i.dirtyWords() + j]);\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "public static int size_sampleCnt() {\n return (32 / 8);\n }", "public long get_sampleCnt() {\n return (long)getUIntBEElement(offsetBits_sampleCnt(), 32);\n }", "public int get_quality() {\n return (int)getUIntBEElement(offsetBits_quality(), 16);\n }", "public static int sizeBits_quality() {\n return 16;\n }", "public static int size_quality() {\n return (16 / 8);\n }", "public final int getNumCodedBytes(){\n // NOTE: testing these algorithms for correctness is quite\n // difficult. One way is to modify the rate allocator so that not all\n // bit-planes are output if the distortion estimate for last passes is\n // the same as for the previous ones.\n\n switch (ltype) {\n case LENGTH_LAZY_GOOD:\n // This one is a bit better than LENGTH_LAZY.\n int bitsInN3Bytes; // The minimum amount of bits that can be stored\n // in the 3 bytes following the current byte\n // buffer 'b'.\n if (b >= 0xFE) {\n // The byte after b can have a bit stuffed so ther could be\n // one less bit available\n bitsInN3Bytes = 22; // 7 + 8 + 7\n }\n else {\n // We are sure that next byte after current byte buffer has no\n // bit stuffing\n bitsInN3Bytes = 23; // 8 + 7 + 8\n }\n if ((11-cT+16) <= bitsInN3Bytes) {\n return nrOfWrittenBytes+(delFF ? 1 : 0)+1+3;\n }\n else {\n return nrOfWrittenBytes+(delFF ? 1 : 0)+1+4;\n }\n case LENGTH_LAZY:\n // This is the very basic one that appears in the VM text\n if ((27-cT) <= 22) {\n return nrOfWrittenBytes+(delFF ? 1 : 0)+1+3;\n }\n else {\n return nrOfWrittenBytes+(delFF ? 1 : 0)+1+4;\n }\n case LENGTH_NEAR_OPT:\n // This is the best length calculation implemented in this class.\n // It is almost always optimal. In order to calculate the length\n // it is necessary to know which bytes will follow in the MQ\n // bit stream, so we need to wait until termination to perform it.\n // Save the state to perform the calculation later, in\n // finishLengthCalculation()\n saveState();\n // Return current number of output bytes to use it later in\n // finishLengthCalculation()\n return nrOfWrittenBytes;\n default:\n throw new Error(\"Illegal length calculation type code\");\n }\n }", "public static int sizeBits_sampleCnt() {\n return 32;\n }", "public int getSize()\n\t{\n\t\treturn bits.size();\n\t}", "public int getHandSize()\n {\n return hand.size();\n }", "public int getHandSize(){\n\t\treturn hand.size();\n\t\t\t\t\n\t}", "public int getAudioSampleSize() {\n\t\treturn mSampleSize;\n\t}", "public int numberOfBits() {\n return 8 * this.data.size();\n }", "public long getSampleCount() {\r\n\t\tif (audioFile != null) {\r\n\t\t\treturn audioFile.getEffectiveDurationSamples();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public static int totalSizeBits_entries_id() {\n return 176;\n }", "public static int sizeBits_count() {\n return 16;\n }", "public static int size_count() {\n return (16 / 8);\n }", "public int getNumBitsSet()\n \t{\n \t\tint count = 0;\n \n \t\tfor (int index = getLength() - 1; index >= 0; index--)\n \t\t{\n \t\t\tif (isSet(index))\n \t\t\t{\n \t\t\t\tcount++;\n \t\t\t}\n \t\t}\n \n \t\treturn count;\n \t}", "public int bitCount() {\n @SuppressWarnings(\"deprecation\") int bc = bitCount - 1;\n if (bc == -1) { // bitCount not initialized yet\n bc = 0; // offset by one to initialize\n // Count the bits in the magnitude\n for (int i=0; i < mag.length; i++)\n bc += Integer.bitCount(mag[i]);\n if (signum < 0) {\n // Count the trailing zeros in the magnitude\n int magTrailingZeroCount = 0, j;\n for (j=mag.length-1; mag[j] == 0; j--)\n magTrailingZeroCount += 32;\n magTrailingZeroCount += Integer.numberOfTrailingZeros(mag[j]);\n bc += magTrailingZeroCount - 1;\n }\n bitCount = bc + 1;\n }\n return bc;\n }", "public static int totalSizeBits_infos_noise() {\n return 48;\n }", "public int get_count() {\n return (int)getUIntBEElement(offsetBits_count(), 16);\n }", "public int size() {\n return numBits;\n }", "public int sizeInBits() {\n\t\treturn this.sizeinbits;\n\t}", "public int mo1067a() {\n return this.f3256d.size();\n }", "public int getAnalysisBits();", "int getBloomFilterSizeInBytesCount();", "public int getLengthInBytes()\n \t{\n \t\treturn FormatableBitSet.numBytesFromBits(lengthAsBits);\n \t}", "public final int mo248a() {\n if (this.f11586a != null) {\n return this.f11586a.size();\n }\n return 0;\n }", "public final int mo250b() {\n if (this.f11587b != null) {\n return this.f11587b.size();\n }\n return 0;\n }", "public int mo7190a() {\n return this.f4621a.size();\n }", "public int getSpectrumCount(boolean onlyIdentified) throws InvalidFormatException;", "public static int sizeBits_estLength() {\n return 8;\n }", "public static int totalSize_infos_noise() {\n return (48 / 8);\n }", "public long getNumCodeUnits();", "public static int sizeBits_counter() {\n return 32;\n }", "public int getBinCapicityFilled() {\n int binCapicity = 0;\n for( Packet p: packets) {\n binCapicity += p.getPacketHeight();\n }\n return binCapicity;\n\n }", "default int getCompositeBitLength() {\n return getHighBitLength() + getLowBitLength();\n }", "@Ensures(\"result >= 0\")\n public static int calcNumHighQualitySoftClips( final GATKSAMRecord read, final byte qualThreshold ) {\n if ( read == null ) throw new IllegalArgumentException(\"Read cannot be null\");\n if ( qualThreshold < 0 ) throw new IllegalArgumentException(\"Expected qualThreshold to be a positive byte but saw \" + qualThreshold);\n\n if ( read.getCigar() == null ) // the read is unmapped\n return 0;\n\n final byte[] qual = read.getBaseQualities( EventType.BASE_SUBSTITUTION );\n\n int numHQSoftClips = 0;\n int alignPos = 0;\n for ( final CigarElement ce : read.getCigar().getCigarElements() ) {\n final int elementLength = ce.getLength();\n\n switch( ce.getOperator() ) {\n case S:\n for( int jjj = 0; jjj < elementLength; jjj++ ) {\n if( qual[alignPos++] > qualThreshold ) { numHQSoftClips++; }\n }\n break;\n case M: case I: case EQ: case X:\n alignPos += elementLength;\n break;\n case H: case P: case D: case N:\n break;\n default:\n throw new IllegalStateException(\"Unsupported cigar operator: \" + ce.getOperator());\n }\n }\n\n return numHQSoftClips;\n }", "public int getAudioJittcomp();", "BigInteger getCount();", "public double defaultEvaulateAsMiniBits() {\n double result = 0;\n for (int i = 0; i < this.m_GenotypeLength; i++) {\n if (this.m_Genotype.get(i)) result++;\n }\n return result;\n }", "public int officialSize()\n {\n return this.originalSizeOfDeck;\n }", "public static int sizeBits_reading() {\n return 16;\n }", "public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public static int sizeBits_sum_e() {\n return 32;\n }", "int getHighBitLength();", "@java.lang.Override\n public int getAudioChannelCount() {\n return audioChannelCount_;\n }", "@java.lang.Override\n public int getAudioChannelCount() {\n return audioChannelCount_;\n }", "public static int sizeBits_length() {\n return 8;\n }", "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "public int discCount() {\n\t\tint countBLACK = discBlackCount();\n\t\tint countWHITE = discWhiteCount();\n\n\t\treturn countBLACK + countWHITE;\n\t\t\n\t}", "public int getWordsQuantity(){\n\t\treturn counter;\n\t}", "public abstract int getBitSize();", "public int levelSpec() {\n int avg = 0;\n for (int i = 0; i < spec.length; i++) {\n avg += (int) spec[i];\n }\n return avg / 8192;\n }", "public int nSamples() {\n return samples.nSamples();\n }", "public int GetSizeOfComputerHand(){\n return handComputer.size();\n }", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "public static int sizeBits_infos_seq_num() {\n return 16;\n }", "public int mo45907b() {\n return this.f43067b.length;\n }", "public java.math.BigInteger getCount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COUNT$8);\n if (target == null)\n {\n return null;\n }\n return target.getBigIntegerValue();\n }\n }", "public int getResourceCardHandSize() {\n\t\t return resourceCardHand.getResourceCardHandSize();\n\t }", "public final int mo66557hg() {\n int size;\n synchronized (this.aen) {\n mo66559hj();\n size = this.aeo.size();\n }\n return size;\n }", "public short getBitDepth() {\n\n\t\treturn getShort(ADACDictionary.PIXEL_BIT_DEPTH);\n\n\t}", "public static int totalSizeBits_infos_metadata() {\n return 16;\n }", "public int GetSizeOfHumanHand(){\n System.out.println(\"SIZE \" + handHuman.size() );\n return handHuman.size();\n }", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public int getLength() { \r\n return audioLength; \r\n }", "public int mo45907b() {\n return this.f43066b.length;\n }", "public static int size_reading() {\n return (16 / 8);\n }", "public int mo45907b() {\n return this.f43065b.length;\n }", "public static int sizeBits_infos_valid_noise_samples() {\n return 8;\n }", "public int bitLength() {\n \tif (bitLength == -1) {\n \t if (signum == 0) {\n \t \tbitLength = 0;\n \t } else {\n \t\t// Calculate the bit length of the magnitude\n \t\tint magBitLength = ((magnitude.length-1) << 5) + bitLen(magnitude[0]);\n\n \t\tif (signum < 0) {\n \t\t // Check if magnitude is a power of two\n \t\t boolean pow2 = (bitCnt(magnitude[0]) == 1);\n \t\t for(int i=1; i<magnitude.length && pow2; i++)\n \t\t\tpow2 = (magnitude[i]==0);\n\n \t\t bitLength = (pow2 ? magBitLength-1 : magBitLength);\n \t\t} else {\n \t\t bitLength = magBitLength;\n \t\t}\n \t }\n \t}\n \treturn bitLength;\n }", "long getQuantite();", "public int mo45907b() {\n return this.f43062b.length;\n }", "public int mo45907b() {\n return this.f43068b.length;\n }", "protected String getBitLength()\n {\n return bitLength;\n }", "public int calculateSize( int numSamples )\n {\n return numSamples * 2;\n }", "public int mo45907b() {\n return this.f43070b.length;\n }", "public int mo1993d() {\n return this.f1963b.size();\n }", "public static int sizeBits_dataType() {\n return 8;\n }", "public final int getSampleSize(int band) {\n return DataBuffer.getDataTypeSize(dataType);\n }", "public int mo45907b() {\n return this.f43064b.length;\n }", "public int bitsOfFilter() {\n return config().getM();\n }", "public static int size_infos_valid_noise_samples() {\n return (8 / 8);\n }", "public int getPaletteCount() {\n return AviDemux.str2ulong( bih, 32 );\n }", "public int getPlayerHandSize(String pid) {\r\n return getPlayerHand(pid).size();\r\n }", "public int mo45907b() {\n return this.f43069b.length;\n }", "public short get_length() {\n return (short)getUIntElement(offsetBits_length(), 8);\n }", "public int getEntryCount() {\n return wordFrequency.size();\n }", "public int getLength() {\n \t\treturn lengthAsBits;\n \t}", "public int size() {\n return this.wellsets.size();\n }", "public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try {\n for (Iterator<String> i = constants.iterator(); i.hasNext();) {\n size += (i.next().getBytes(\"UTF-8\").length + 1); // Unicode, null-terminated\n }\n } catch (UnsupportedEncodingException e) {\n // UTF-8 should be available..\n }\n return size;\n }", "public int m21458g() {\n return this.f18796b == null ? 0 : this.f18796b.size();\n }", "public static int sizeBits_amtype() {\n return 8;\n }", "public int mo75900a() {\n return this.f51596a.size();\n }", "public static int totalSizeBits_data() {\n return 480;\n }", "public int getSize() {\n\n\treturn getSectors().size() * getUnitSize(); // 254 byte sectors\n }", "public int getBytesPerSample();", "public int size() {\n return CAPABILITY_LENGTH;\n }", "public static int size_dataType() {\n return (8 / 8);\n }" ]
[ "0.64622456", "0.6288634", "0.6282337", "0.6258851", "0.62468874", "0.622592", "0.6188523", "0.6174264", "0.61504567", "0.6140779", "0.6078747", "0.6067984", "0.60371035", "0.60116357", "0.60067296", "0.6000486", "0.5995442", "0.5985503", "0.5982611", "0.595481", "0.5931109", "0.5912928", "0.58885556", "0.5878931", "0.5867972", "0.5857644", "0.5850709", "0.5822465", "0.5815483", "0.58140117", "0.58086973", "0.5798834", "0.57968485", "0.5787126", "0.57767695", "0.576785", "0.57534474", "0.5753339", "0.5752934", "0.5747386", "0.57451123", "0.57424843", "0.5740095", "0.5738551", "0.5711612", "0.57095355", "0.57012254", "0.5694327", "0.5687298", "0.5681326", "0.5673343", "0.5672068", "0.56628484", "0.5652483", "0.565115", "0.5640117", "0.5635268", "0.5633367", "0.5630852", "0.5624576", "0.5621693", "0.5620862", "0.5619342", "0.5617203", "0.56110114", "0.5604118", "0.5603932", "0.5596467", "0.5592805", "0.55927694", "0.5592753", "0.5589194", "0.5588115", "0.5577922", "0.55768436", "0.5575818", "0.5574097", "0.5567579", "0.5563323", "0.55624545", "0.55563444", "0.5555662", "0.5555288", "0.55434644", "0.5542402", "0.5539658", "0.55393356", "0.5538401", "0.5535547", "0.55225575", "0.55191", "0.5518925", "0.55154705", "0.5500287", "0.5497783", "0.5485875", "0.54852414", "0.5485191", "0.5477118", "0.5472037" ]
0.72778994
0
Create a cloned copy of this sound descriptor.
public SoundDescriptor clone();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DescriptiveFramework clone();", "public Object clone(){\r\n\t\tSampleData obj = new SampleData(letter,getWidth(),getHeight());\r\n\t\tfor ( int y=0;y<getHeight();y++ )\r\n\t\t\tfor ( int x=0;x<getWidth();x++ )\r\n\t\t\t\tobj.setData(x,y,getData(x,y));\r\n\t\treturn obj;\r\n\t}", "public Card makeCopy(){\n return new Card(vimage);\n }", "public Chord duplicate ()\r\n {\r\n // Beams are not copied\r\n Chord clone = new Chord(getMeasure(), slot);\r\n clone.stem = stem;\r\n stem.addTranslation(clone);\r\n\r\n // Notes (we make a deep copy of each note)\r\n List<TreeNode> notesCopy = new ArrayList<>();\r\n notesCopy.addAll(getNotes());\r\n\r\n for (TreeNode node : notesCopy) {\r\n Note note = (Note) node;\r\n new Note(clone, note);\r\n }\r\n\r\n clone.tupletFactor = tupletFactor;\r\n\r\n clone.dotsNumber = dotsNumber;\r\n clone.flagsNumber = flagsNumber; // Not sure TODO\r\n\r\n // Insure correct ordering of chords within their container\r\n ///Collections.sort(getParent().getChildren(), chordComparator);\r\n\r\n return clone;\r\n }", "public AudioMetadata copyOf()\n\t{\n\t\tAudioMetadata copy = new AudioMetadata( mSource, mSourceRecordable );\n\t\t\n\t\tcopy.mPriority = mPriority;\n\t\tcopy.mSelected = mSelected;\n\t\tcopy.mRecordable = mRecordable;\n\t\tcopy.mMetadata.addAll( mMetadata );\n\t\tcopy.mUpdated = mUpdated;\n\t\tcopy.mIdentifier = new String( mIdentifier );\n\t\t\n\t\tmUpdated = false;\n\t\t\n\t\treturn copy;\n\t}", "public ModuleDescriptorAdapter copy() {\n ModuleDescriptorAdapter copy = new ModuleDescriptorAdapter(getId(), getDescriptor(), getComponentId());\n copyTo(copy);\n copy.metaDataOnly = metaDataOnly;\n return copy;\n }", "public IntKeyframeSet clone() {\n ArrayList arrayList = this.e;\n int size = this.e.size();\n IntKeyframe[] intKeyframeArr = new IntKeyframe[size];\n for (int i2 = 0; i2 < size; i2++) {\n intKeyframeArr[i2] = (IntKeyframe) ((Keyframe) arrayList.get(i2)).clone();\n }\n return new IntKeyframeSet(intKeyframeArr);\n }", "public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}", "public Object clone(){\n\t\tSongRecord cloned = new SongRecord();\n\t\tif (this.title == null){\n\t\t\tcloned.title = null;\n\t\t}\n\t\telse {\n\t\t\tcloned.title = new String(this.getTitle());\n\t\t}\n\t\tif (this.artist == null){\n\t\t\tcloned.artist = null;\n\t\t}\n\t\telse {\n\t\t\tcloned.artist = new String(this.getArtist());\n\t\t}\n\t\tcloned.min = this.getMin();\n\t\tcloned.sec = this.getSec();\n\t\treturn cloned;\n\t}", "Prototype makeCopy();", "public Card copy(){\n return new Card(Suits, Value);\n }", "public P copy(){\n AssetLoader l = GDefence.getInstance().assetLoader;\n P p = new P(chance.get(), duration.get(), bonusDmg.get(), g);\n p.gemBoost[0] = new BoostInteger(p.bonusDmg, g.bonusDmgUp, l.getWord(\"bashGrade3\"),\n true, BoostInteger.IntegerGradeFieldType.NONE);\n p.gemBoost[1] = new BoostFloat(p.duration, g.durationUp, l.getWord(\"bashGrade2\"),\n true, BoostFloat.FloatGradeFieldType.TIME);\n p.gemBoost[2] = new BoostFloat(p.chance, g.chanceUp, l.getWord(\"bashGrade1\"),\n true, BoostFloat.FloatGradeFieldType.PERCENT);\n p.s = new S(chance.get(), duration.get(), bonusDmg.get());\n return p;\n }", "public d clone() {\n ArrayList arrayList = this.e;\n int size = this.e.size();\n c[] cVarArr = new c[size];\n for (int i = 0; i < size; i++) {\n cVarArr[i] = ((c) arrayList.get(i)).clone();\n }\n return new d(cVarArr);\n }", "public ParticleRenderData copy()\n\t{\n\t\tRenderData copy = super.copy();\n\t\tParticleRenderData pcopy = new ParticleRenderData(new Vector3f(), new Euler(), new Vector3f());\n\t\tpcopy.transform = copy.transform;\n\t\tpcopy.postStage = this.postStage;\n\t\tpcopy.currStage = this.currStage;\n\t\tpcopy.particleColor = this.particleColor;\n\t\treturn pcopy;\n\t}", "private void selfClone() {\n stroke = stroke.clone();\n }", "public ChannelDescriptor dup() {\n synchronized (refCounter) {\n refCounter.incrementAndGet();\n \n int newFileno = getNewFileno();\n \n if (DEBUG) getLogger(\"ChannelDescriptor\").info(\"Reopen fileno \" + newFileno + \", refs now: \" + refCounter.get());\n \n return new ChannelDescriptor(channel, newFileno, originalModes, fileDescriptor, refCounter, canBeSeekable);\n }\n }", "public Object clone(){ \r\n\t\tBaseballCard cloned = new BaseballCard();\r\n\t\tcloned.name = this.getName();\r\n\t\tcloned.manufacturer=this.getManufacturer();\r\n\t\tcloned.year = this.getYear();\r\n\t\tcloned.price = this.getPrice();\r\n\t\tcloned.size[0]= this.getSizeX();\r\n\t\tcloned.size[1]= this.getSizeY();\r\n\t\treturn cloned;\r\n\t}", "public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }", "public Function clone();", "@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }", "public Clone() {}", "@Override\r\n\tpublic Dog Clone() throws CloneNotSupportedException {\r\n\t\treturn new Poodle(this.getName(), this.getWeight(), this.getColor(), this.getGender(), this.getInfo()); \r\n\t}", "public Chapter clone(){\r\n return new Chapter(title, body);\r\n }", "public MovableObject lightClone()\n\t\t{\n\t\t\tfinal MovableObject clone = new MovableObject();\n\t\t\tclone.assCount = this.assCount;\n\t\t\tclone.associatable = this.associatable;\n\t\t\tclone.bound = this.bound;\n\t\t\tclone.coords = new int[this.coords.length];\n\t\t\tfor(int i=0; i < this.coords.length; i++)\n\t\t\t\tclone.coords[i] = this.coords[i];\n\t\t\tclone.highlighted = this.highlighted;\n\t\t\tclone.hotSpotLabel = this.hotSpotLabel;\n\t\t\tclone.keyCode = this.keyCode;\n\t\t\tclone.label = this.label;\n\t\t\tclone.maxAssociations = this.maxAssociations;\n\t\t\tif(shape.equals(\"rect\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Rectangle(coords[0]-3,coords[1]-3,coords[2]+6,coords[3]+6);\n\t\t\t}\n\t\t\tif(shape.equals(\"circle\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[2]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"ellipse\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[3]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tfinal int xArr[] = new int[coords.length/2];\n\t\t\t\tfinal int yArr[] = new int[coords.length/2];\n\t\t\t\tint xCount = 0;\n\t\t\t\tint yCount = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i%2) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\txArr[xCount] = coords[i];\n\t\t\t\t\t\txCount++;\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\tyArr[yCount] = coords[i];\n\t\t\t\t\t\tyCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//TODO calculate the centre of mass\n\n\t\t\t\tclone.obj = new Polygon(xArr,yArr,xArr.length);\n\t\t\t}\n\t\t\tclone.pos = new Point(this.pos.x,this.pos.y);\n\t\t\tclone.shape = this.shape;\n\t\t\tclone.startPos = this.startPos;\n\t\t\tclone.value = this.value;\n\n\t\t\treturn clone;\n\t\t}", "public Image clone() {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, width, height);\r\n\t}", "protected Shingle copy() {\n return new Shingle(this);\n }", "@Override\n\tpublic DataType clone(DataTypeManager dtm) {\n\t\tStructureDataType struct =\n\t\t\tnew StructureDataType(getCategoryPath(), getName(), getLength(), getUniversalID(),\n\t\t\t\tgetSourceArchive(), getLastChangeTime(), getLastChangeTimeInSourceArchive(), dtm);\n\t\tstruct.setDescription(getDescription());\n\t\tstruct.replaceWith(this);\n\t\treturn struct;\n\t}", "@Override\n\tpublic PhyphoxBuffer clone() {\n\t\treturn new PhyphoxBuffer(this, 0);\n\t}", "public Record copy() {\n\t\treturn new Record(video, numOwned, numOut, numRentals);\n\t}", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "Object clone();", "Object clone();", "public Weapon copy() {\r\n\t\treturn new Weapon(this.getName(), this.getDescription(), this.getType(), this.getSize(), this.getPrice(), this.getMultChanged());\r\n\t}", "public Whisper dup (Whisper self)\n {\n if (self == null)\n return null;\n\n Whisper copy = new Whisper ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.content = self.content.duplicate ();\n return copy;\n }", "public Weapon clone() {\n\t\treturn new Weapon(this);\n\t}", "public AudioStream(AudioStream clone) {\n this.ID = clone.ID;\n this.to = clone.to;\n this.count = clone.count+1;\n }", "@Override\n protected Alpha clone() {\n try {\n Alpha alpha = (Alpha) super.clone();\n alpha.mListeners = new ArrayList<Listener>();\n return alpha;\n } catch (CloneNotSupportedException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n\tpublic Object clone()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn new Molecule(((Molecule) super.clone()).getSequence());\n\t\t}\n\t\tcatch (CloneNotSupportedException e)\n\t\t{\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t}", "public ShortNBT copy() {\n return this;\n }", "public abstract Pessoa clone();", "@Override\n\tpublic TemplateEffect copy() {\n\t\treturn new TemplateEffect(labelTemplate, valueTemplate, type, priority);\n\t}", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public native Sprite clone();", "public RealBuffer copyOf()\n {\n float[] copy = Arrays.copyOf(mSamples, mSamples.length);\n\n return new RealBuffer(copy);\n }", "public Object clone() {\n return this.copy();\n }", "public final PaintObject clone() {\n \t\n \ttry {\n\t\t\treturn (PaintObject) super.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }", "public DessertVO clone() {\r\n return (DessertVO) super.clone();\r\n }", "@Override\n\tpublic Spielfeld clone() {\n\t\tint[] mulden = new int[this.getMulden().length];\n\t\t\n\t\tfor(int i = 0; i < this.getMulden().length; i++) {\n\t\t\tmulden[i] = this.getMulden()[i];\n\t\t}\n\t\t\n\t\treturn new Spielfeld(mulden);\n\t}", "public PidCoefficients clone()\n {\n return new PidCoefficients(kP, kI, kD, kF);\n }", "public abstract Piece clone();", "public abstract Piece clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Game copy();", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "@Override\n public ChessPiece clone() {\n ChessPiece copy = new Bishop(this.owner);\n this.owner.removeChessPiece(copy);\n copy.canCastle = this.canCastle;\n copy.icon = this.icon;\n\n return copy;\n }", "public IVenda clone ();", "public Field copy()\n {\n return new Field(name, type, vis);\n }", "@Override\r\n\tpublic AI_Domain clone() {\r\n\t\treturn new Board2048model(this);\r\n\t}", "public ImageData duplicate() {\r\n\t\treturn new ImageData(imageProcessor.duplicate(), label);\r\n\t}", "public Object clone()\n\t{\n\t\tObject myClone = new Object();\n\t\tmyClone = myName + myNumberWins;\n\t\treturn myClone;\n\t}", "@Override\n public Object clone() {\n return super.clone();\n }", "public SceneLabelObjectState copy(){\n\n\t\t//get a copy of the generic data from the supertype\n\t\tSceneDivObjectState genericCopy = super.copy(); \n\n\t\t//then generate a copy of this specific data using it (which is easier then specifying all the fields\n\t\t//Separately like we used too)\n\t\tSceneLabelObjectState newObject = new SceneLabelObjectState(\n\t\t\t\tgenericCopy,\n\t\t\t\tObjectsCurrentText,\t\t\n\t\t\t\tCSSname,\n\t\t\t\tcursorVisible,\n\t\t\t\tTypedText,\n\t\t\t\tCustom_Key_Beep,\n\t\t\t\tCustom_Space_Beep);\n\n\t\treturn newObject;\n\n\n\t}", "private Inventory clone_inv(Inventory inv_original, String title) {\n // Copy name, size and other stuff\n Inventory inv = createInventory(this, inv_original.getSize(), title);\n inv.setContents(inv_original.getContents());\n\n return inv;\n }", "@Override\n\tpublic Object clone() throws CloneNotSupportedException{\n\t\tShape cloned = this;\n\t\tcloned.setPosition(this.getPosition());\n\t\tcloned.setProperties(this.getProperties());\n\t\tcloned.setColor(this.getColor());\n\t\tcloned.setFillColor(this.getFillColor());\n\t\treturn cloned;\n\t}", "public Object clone() throws CloneNotSupportedException\n\t{\n Playlist clone = new Playlist();\n for(int i = 0; i < numOfSongs; i++)\n {\n try\n {\n clone.addSong((SongRecord)this.getSong(i+1).clone(), i+1);\n } catch (IllegalArgumentException | FullPlaylistException | EmptyPlaylistException e)\n {\n e.printStackTrace();\n }\n }\n return clone;\n\t}", "public LibraryElement cloneElement();", "@Override\r\n\tpublic ComputerPart clone() {\n\t\treturn null;\r\n\t}", "public Object clone() {\n\t\treturn(new FileSystem(_device, _mount, _type));\n\t}", "@Override\n\tpublic Univent copy() {\n\t\treturn new AddExpToHeroesEvent(amount);\n\t}", "@Override\n public ChatReceivePacket copy() {\n return new ChatReceivePacket(this);\n }", "public a clone() {\n try {\n a aVar = (a) super.clone();\n aVar.f22064a = null;\n return aVar;\n } catch (CloneNotSupportedException unused) {\n return null;\n }\n }", "RandomnessSource copy();", "public void copy() {\n\n\t}", "public abstract Object clone() ;", "@Override\n\tpublic Soldier copy() {\n\t\tSoldier newS = new Soldier(this.getControllingPlayerID(), this.getLocation(), this.getHpMax(), this.getHpCurrent(),\n\t\t\t\t\t\t\t\t\tthis.getOrientation(), this.getFieldOfViewRange(), this.getFieldOfViewAngle(), this.getAttackRange(),\n\t\t\t\t\t\t\t\t\tthis.getAttackDamage(), this.getSpecialAttackCooldown(), this.getSpawnCost(), this.getScoreWorth());\n\t\tnewS.setID(this.getID());\n\t\tnewS.updateFieldOfView(this.getFieldOfView());\n\t\treturn newS;\n\t}", "@Override\npublic Creature clone() {\n\treturn null;\n}", "Component deepClone();", "public Animal deepCopy() {\n return new Eagle(this);\n }", "public RMShape clone()\n{\n // Do normal version, clear parent, LayoutInfoX, clone RSS\n RMShape clone = (RMShape)super.clone();\n clone._parent = null; clone._layoutInfoX = null;\n clone._rss = RMUtils.clone(_rss);\n \n // Clone stroke, fill, effect\n clone._stroke = null; clone._fill = null; clone._effect = null;\n if(getStroke()!=null) clone.setStroke(getStroke().clone());\n if(getFill()!=null) clone.setFill(getFill().clone());\n if(getEffect()!=null) clone.setEffect(getEffect().clone());\n \n // Copy attributes map\n clone._attrMap = _attrMap.clone();\n \n // If shape has timeline, clone it\n if(getTimeline()!=null)\n clone.setTimeline(getTimeline().clone(clone));\n \n // Clone bindings and add to clone (with hack to make sure clone has it's own, non-shared, attr map)\n for(int i=0, iMax=getBindingCount(); i<iMax; i++) {\n if(i==0) clone.put(\"RibsBindings\", null);\n clone.addBinding(getBinding(i).clone());\n }\n \n // Clone event adapter\n if(getEventAdapter(false)!=null) {\n clone.put(\"EventAdapter\", null);\n clone.getEventAdapter(true).setEnabledEvents(getEventAdapter(true).getEnabledEvents());\n }\n \n // Return clone\n return clone;\n}", "public CMObject copyOf();", "@Override\n\tpublic DataType copy(DataTypeManager dtm) {\n\t\tStructureDataType struct =\n\t\t\tnew StructureDataType(getCategoryPath(), getName(), getLength(), dtm);\n\t\tstruct.setDescription(getDescription());\n\t\tstruct.replaceWith(this);\n\t\treturn struct;\n\t}", "@Override\n\tpublic ProbabilityDistribution<T> clone() {\n\t\tProbabilityDistribution<T> clone = new ProbabilityDistribution<T>(\n\t\t\t\trandom_);\n\t\tclone.itemProbs_ = new MutableKeyMap<T, Double>(itemProbs_);\n\t\treturn clone;\n\t}", "@Override\n public Drop clone() {\n try {\n return (Drop) super.clone();\n } catch (CloneNotSupportedException ex) {\n // Never.\n return null;\n }\n }", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public dice clone()\r\n\t{\r\n\t\ttry {\r\n\t\t\treturn (dice) super.clone();\r\n\t\t} catch (CloneNotSupportedException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t}", "public SquareIF clone();", "public abstract SoftwareLight copy();", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "@Override\n public MetaContainer clone() {\n return clone(false);\n }", "@Override\n public JokerVehicle clone(){\n return new JokerVehicle();\n }", "public abstract Object clone();", "@Override\n public ISentence clone() {\n WordNode newSentence = new WordNode(this.word, restOfSentence.clone());\n return newSentence;\n }", "RecordInfo clone();", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "@Override\r\n\tpublic MotionStrategy Clone() {\n\t\tMotionStrategy move = new RandomAndInvisible(mLifetime);\r\n\t\treturn move;\r\n\t}", "public abstract Player freshCopy();", "@Override\n\tpublic Object deepCopy() {\n\t\tfinal UIAnimationMutable clone = new UIAnimationMutable(getName(), events.size(), controllers.size());\n\t\tfor (int i = 0, len = controllers.size(); i < len; ++i) {\n\t\t\tclone.controllers.add((UIController) controllers.get(i).deepCopy());\n\t\t}\n\t\tfor (int i = 0, len = events.size(); i < len; ++i) {\n\t\t\tfinal UIAttribute p = events.get(i);\n\t\t\tclone.events.add((UIAttribute) p.deepCopy());\n\t\t}\n\t\tclone.nextEventsAdditionShouldOverride = nextEventsAdditionShouldOverride;\n\t\tif (driver != null) {\n\t\t\tclone.driver = (UIAttribute) driver.deepCopy();\n\t\t}\n\t\treturn clone;\n\t}" ]
[ "0.6855725", "0.67901236", "0.6531024", "0.65228814", "0.6513318", "0.6314575", "0.6226319", "0.62081575", "0.6140267", "0.6126684", "0.6101561", "0.60494107", "0.60166514", "0.6014254", "0.60134554", "0.59988624", "0.5996099", "0.59257036", "0.59237325", "0.59131444", "0.591123", "0.59037894", "0.58864224", "0.58827573", "0.58666414", "0.5865461", "0.5861397", "0.58516735", "0.5839949", "0.5828635", "0.5824624", "0.5824624", "0.5822472", "0.5807348", "0.5791899", "0.5790628", "0.57894814", "0.57865226", "0.57857597", "0.5775494", "0.57666725", "0.5758257", "0.57346475", "0.5730864", "0.5727007", "0.5715899", "0.5703815", "0.5701121", "0.56925184", "0.5684913", "0.5684913", "0.5681627", "0.5681627", "0.5681627", "0.5681627", "0.5681115", "0.565773", "0.5645521", "0.5600827", "0.55874574", "0.5584237", "0.5577918", "0.55583525", "0.5557188", "0.55541956", "0.55463094", "0.5545307", "0.55452496", "0.55450356", "0.5544143", "0.55381495", "0.5530487", "0.552819", "0.55207515", "0.5512221", "0.55096763", "0.5508279", "0.5503379", "0.54983395", "0.54958797", "0.5491265", "0.54891735", "0.5479206", "0.5476744", "0.5475679", "0.5468962", "0.54674417", "0.5467318", "0.54672074", "0.5465708", "0.5465206", "0.5459525", "0.54500324", "0.54437184", "0.54401", "0.5437297", "0.54369885", "0.54314923", "0.5430043", "0.5429867" ]
0.87966263
0
O(n + e) + backtrackPath()
public ArrayList<String> shortestPath(String u, String v) { ArrayList<String> path = new ArrayList<>(); HashMap<String, Boolean> flag = new HashMap<>(); HashMap<String, String> prev = new HashMap<>(); Queue<GraphVertex> queue = new LinkedList<>(); HashMap<String, Boolean> visited = new HashMap<>(); GraphVertex src = graphVertexHashMap.get(u); flag.put(src.getVertexName(), true); queue.add(src); visited.put(src.getVertexName(), true); while(!queue.isEmpty()){ GraphVertex node = queue.poll(); HashMap<String, GraphVertex> edges = node.getOutDegrees(); Iterator it = edges.entrySet().iterator(); while(it.hasNext()){ Map.Entry pair = (Map.Entry)it.next(); if(flag.get(pair.getKey()) == null || flag.get(pair.getKey()) == false){ String vertex = (String)pair.getKey(); flag.put(vertex, true); prev.put(vertex, node.getVertexName()); queue.add(edges.get(pair.getKey())); } } } path = backTrackPath(prev, u, v); return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }", "private void computePath(){\n LinkedStack<T> reversePath = new LinkedStack<T>();\n // adding end vertex to reversePath\n T current = end; // first node is the end one\n while (!current.equals(start)){\n reversePath.push(current); // adding current to path\n current = closestPredecessor[vertexIndex(current)]; // changing to closest predecessor to current\n }\n reversePath.push(current); // adding the start vertex\n \n while (!reversePath.isEmpty()){\n path.enqueue(reversePath.pop());\n }\n }", "private static void backtrackHelper(TreeNode current, int targetSum, List<TreeNode> path, List<List<Integer>> allPaths){\n if(current.left == null && current.right == null){\n if(targetSum == current.val){\n List<Integer> tempResultList = new ArrayList<>();\n // for(TreeNode node: path){\n // tempResultList.add(node.val);\n // }\n tempResultList.addAll(path.stream().mapToInt(o -> o.val).boxed().collect(Collectors.toList()));\n tempResultList.add(current.val);\n\n allPaths.add(tempResultList); // avoid reference puzzle\n }\n return;\n }\n\n // loop-recursion (Here only 2 choices, so we donot need loop)\n if(current.left != null){\n path.add(current);\n backtrackHelper(current.left, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n\n if(current.right != null){\n path.add(current);\n backtrackHelper(current.right, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n }", "private static int path(int n) {\n if (n == 0 || n == 1 || n == 2) {\n return n;\n }\n return path(n-1) + path(n-2);\n }", "@Override\r\n public Set<List<String>> findAllPaths(int sourceId, int targetId, int reachability) {\r\n //all paths found\r\n Set<List<String>> allPaths = new HashSet<List<String>>();\r\n //collects path in one iteration\r\n Set<List<String>> newPathsCollector = new HashSet<List<String>>();\r\n //same as the solution but with inverted edges\r\n Set<List<String>> tmpPathsToTarget = new HashSet<List<String>>();\r\n //final solution\r\n Set<List<String>> pathsToTarget = new HashSet<List<String>>();\r\n \r\n String[] statementTokens = null; \r\n Set<Integer> allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n List<String> statementsFound = new ArrayList<String>();\r\n \r\n for (int i = 0; i < reachability; i++) {\r\n if (i == 0) { \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(sourceId);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n //allProcessedNodes.add(inNodeId); \r\n //Incoming nodes are reversed\r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n allPaths.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(sourceId);\r\n \r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n statementsFound.add(outEdge);\r\n allPaths.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n } else {\r\n newPathsCollector = new HashSet<List<String>>();\r\n\r\n for (List<String> statements: allPaths) {\r\n allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n int lastNodeInPath = 0;\r\n \r\n for (String predicate: statements) {\r\n if (predicate.contains(\">-\")) {\r\n statementTokens = predicate.split(\">-\");\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[0]).reverse().toString()));\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString()));\r\n lastNodeInPath = Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString());\r\n } else {\r\n statementTokens = predicate.split(\"->\"); \r\n allProcessedNodes.add(Integer.parseInt(statementTokens[0]));\r\n allProcessedNodes.add(Integer.parseInt(statementTokens[2]));\r\n lastNodeInPath = Integer.parseInt(statementTokens[2]);\r\n }\r\n }\r\n \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(lastNodeInPath);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n if (allProcessedNodes.contains(inNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n newPathsCollector.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(lastNodeInPath);\r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n if (allProcessedNodes.contains(outNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(outEdge);\r\n newPathsCollector.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n }\r\n allPaths.addAll(newPathsCollector);\r\n }\r\n \r\n //System.out.println(\"*****End of iteration \" + i);\r\n //System.out.println(\"#SIZE OF allPaths: \" + allPaths.size());\r\n int numItems = 0;\r\n for (List<String> currList: allPaths) {\r\n numItems = numItems + currList.size();\r\n }\r\n //System.out.println(\"#NUMBER OF ELEMS OF ALL LISTS: \" + numItems);\r\n //System.out.println(\"#SIZE OF tmpPathsToTarget : \" + tmpPathsToTarget.size());\r\n }\r\n \r\n //We need to reverse back all the predicates\r\n for (List<String> statements: tmpPathsToTarget) { \r\n List<String> fixedStatements = new ArrayList<String>(); \r\n for (int i = 0; i < statements.size(); i++) { \r\n String statement = statements.get(i); \r\n if (statement.contains(\">-\")) {\r\n fixedStatements.add(new StringBuilder(statement).reverse().toString());\r\n } else {\r\n fixedStatements.add(statement);\r\n } \r\n }\r\n pathsToTarget.add(fixedStatements);\r\n }\r\n return pathsToTarget;\r\n }", "private List<Node> backTrackFrom(Node start, Node end, Stack<Node> path, Map<Node,Integer> distance) {\n\t\tfinal List<Node> shortestPath = new ArrayList<Node>();\n\t\tNode n;\n\t\tNode current = start;\n\t\tshortestPath.add(start);\n\t\twhile (!path.isEmpty()) {\n\t\t\tn = path.pop();\n\t\t\t// checks the distance and adds the corresponding neighbor node\n\t\t\tif (current.getNeighbors().contains(n) && distance.get(n) + 1 == distance.get(current)) {\n\t\t\t\tshortestPath.add(n);\n\t\t\t\tcurrent = n;\n\t\t\t\t// stop adding to shortestPath once s is found\n\t\t\t\tif (n.equals(end))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tCollections.reverse(shortestPath);\n\t\treturn shortestPath;\n\t}", "private String backtrackPath(int[][] backtrack, int startRow) {\r\n\t\t// start the path with the state given by startRow\r\n\t\tString path = states[startRow].toString();\r\n\t\t// initialize curRow to the starting row\r\n\t\tint curRow = startRow;\r\n\t\t// loop over all columns backwards through the matrix\r\n\t\tfor (int i = backtrack[0].length - 1; i >= 0; --i) {\r\n\t\t\t// update the current row by backtracking\r\n\t\t\tcurRow = backtrack[curRow][i];\r\n\t\t\t// add this new state to the front of the string\r\n\t\t\tpath = states[curRow].toString() + path;\r\n\t\t}\r\n\t\t\r\n\t\treturn path;\r\n\t}", "private void findDetectivePath() {\n Cell current, next;\n detectivePath = new ArrayDeque<>();\n clearVisitedMarks();\n current = detective;\n current.visited = true;\n\n while (true) {\n next = nextNotVisitedCell(current);\n if (next == killer) {\n detectivePath.addLast(current);\n detectivePath.addLast(next);\n break;\n } else if (next != null) {\n detectivePath.addLast(current);\n current = next;\n current.visited = true;\n } else {\n current = detectivePath.pollLast();\n }\n }\n detectivePath.pollFirst();\n }", "@Override\n\tpublic void preBacktrack() {\n\t\t\n\t}", "private void findPath2(List<Coordinate> path) {\n List<Integer> cost = new ArrayList<>(); // store the total cost of each path\n // store all possible sequences of way points\n ArrayList<List<Coordinate>> allSorts = new ArrayList<>();\n int[] index = new int[waypointCells.size()];\n for (int i = 0; i < index.length; i++) {// generate the index reference list\n index[i] = i;\n }\n permutation(index, 0, index.length - 1);\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n for (int[] ints1 : allOrderSorts) {\n List<Coordinate> temp = getOneSort(ints1, waypointCells);\n temp.add(0, o1);\n temp.add(d1);\n int tempCost = 0;\n for (int i = 0; i < temp.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = temp.get(i);\n graph.dijkstra(start);\n Coordinate end = temp.get(i + 1);\n graph.printPath(end);\n tempCost = tempCost + graph.getPathCost(end);\n if (graph.getPathCost(end) == Integer.MAX_VALUE) {\n tempCost = Integer.MAX_VALUE;\n break;\n }\n }\n cost.add(tempCost);\n allSorts.add(temp);\n }\n }\n }\n System.out.println(\"All sorts now have <\" + allSorts.size() + \"> items.\");\n List<Coordinate> best = allSorts.get(getMinIndex(cost));\n generatePath(best, path);\n setSuccess(path);\n }", "private void backTrack(String start, AdjVertex end, Vertex parent){\r\n\t\tif(parent.name.compareToIgnoreCase(start) == 0){ \r\n\t\t\t//if we have found our way back to the start, then we print the result\r\n\t\t\tif(pathStack.isEmpty()){\r\n\t\t\t\tSystem.out.println(start + \" -- \" + end.name);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.print(start + \" -- \" + end.name);\r\n\t\t\t\twhile(!pathStack.isEmpty()){\r\n\t\t\t\t\tSystem.out.print(\" -- \" + pathStack.pop());\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we still have to find our way back to the first person,\r\n\t\t//we push the end name into the stack, \r\n\t\telse{ \r\n\t\t\tpathStack.push(end.name);\r\n\t\t\tconnector(start, parent.name);\r\n\t\t}\r\n\t}", "private void findPath(int current){\r\n // remove current from OPEN\r\n int index = insideArray(_openSet,current);\r\n if(index == -1){\r\n System.out.println(\"findPath method returns -1.\");\r\n }\r\n _openSet.remove(index);\r\n\r\n // add current to CLOSED\r\n _closedSet.add(current);\r\n\r\n // if current is the target node\r\n if(current == _endIndex){\r\n return;\r\n }\r\n\r\n int neighborNum = _map.get_grid(current).get_neighborNum();\r\n int[] neighbors = _map.get_grid(current).get_neighbors();\r\n\r\n //for each neighbor of the current node\r\n for(int i=0;i<neighborNum;i++){\r\n Grid neighborGrid = _map.get_grid(neighbors[i]);\r\n // if neighbor is not traversable or neighbor is in CLOSED\r\n // SKIP THIS NEIGHBOR\r\n if(!neighborGrid.get_type().equals(\"|\") && insideArray(_closedSet,neighbors[i]) == -1){\r\n int currentNeighborF = neighborGrid.get_Fnum();\r\n int neighborF = findF(neighbors[i]);\r\n if(neighborF < currentNeighborF || insideArray(_closedSet,neighbors[i]) == -1){\r\n neighborGrid.set_Fnum(neighborF);\r\n neighborGrid.set_parent(current);\r\n if(insideArray(_closedSet,neighbors[i]) == -1){\r\n _openSet.add(neighbors[i]);\r\n }\r\n }\r\n }\r\n }\r\n int currentIndex = smallestF();\r\n // RECURSIVE CALL\r\n findPath(_map.get_grid(_openSet.get(currentIndex)).get_index());\r\n }", "private void tracePath(Node lastVisitedNode)\r\n {\r\n Node pathPtr = lastVisitedNode;\r\n while (pathPtr != Start)\r\n {\r\n pathPtr.isVisited = true;\r\n pathPtr = pathPtr.parent;\r\n }\r\n }", "@Override\n\tpublic boolean findPath(PathfindingNode start, PathfindingNode end, ArrayList<PathfindingNode> path) \n\t{\n\t\tpath.clear();\n\t\t\n\t\t_visited.clear();\n\t\t_toVisit.clear();\n\t\t_parents.clear();\n\t\t_costsFromStart.clear();\n\t\t_totalCosts.clear();\n\n\t\t_costsFromStart.put(start, 0);\n\t\t_toVisit.add(start);\n\t\t_parents.put(start, null);\n\t\t\n\t\twhile (!_toVisit.isEmpty() && !_toVisit.contains(end))\n\t\t{\n\t\t\tPathfindingNode m = _toVisit.remove();\n\t\t\t\n\t\t\tint mCost = _costsFromStart.get(m);\n\t\t\t\n\t\t\tfor (int i = 0; i < m.getNeighbors().size(); ++i)\n\t\t\t{\n\t\t\t\tPathfindingNodeEdge n = m.getNeighbors().get(i);\n\t\t\t\tif (n.getNeighbor() != null && !_visited.contains(n.getNeighbor()))\n\t\t\t\t{\n\t\t\t\t\tint costFromSource = mCost + n.getCost();\n\t\t\t\t\tint totalCost = costFromSource + _estimator.estimate(n.getNeighbor(), end);\n\t\t\t\t\tif (!_toVisit.contains(n.getNeighbor()) || totalCost < _totalCosts.get(n.getNeighbor()))\n\t\t\t\t\t{\n\t\t\t\t\t\t_parents.put(n.getNeighbor(), m);\n\t\t\t\t\t\t_costsFromStart.put(n.getNeighbor(), costFromSource);\n\t\t\t\t\t\t_totalCosts.put(n.getNeighbor(), totalCost);\n\t\t\t\t\t\tif (_toVisit.contains(n.getNeighbor()))\n\t\t\t\t\t\t\t_toVisit.remove(n.getNeighbor());\n\t\t\t\t\t\t_toVisit.add(n.getNeighbor());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t_visited.add(m);\n\t\t}\n\t\t\n\t\tif (_toVisit.contains(end))\n\t\t{\n\t\t\t_reversePath.clear();\n\t\t\t\n\t\t\tPathfindingNode current = end;\n\t\t\twhile (current != null)\n\t\t\t{\n\t\t\t\t_reversePath.push(current);\n\t\t\t\tcurrent = _parents.get(current);\n\t\t\t}\n\t\t\t\n\t\t\twhile (!_reversePath.isEmpty())\n\t\t\t\tpath.add(_reversePath.pop());\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpath.add(start);\n\t\t\treturn false;\n\t\t}\n\t}", "public static Set<ARGState> getOnePathToARGStateForSimpleProperty(ARGState source, ARGState destination) {\n Set<Integer> seenElements = new HashSet<Integer>();\n ARGState currentARGState = source;\n seenElements.add(source.getStateId());\n List<ARGState> path = new ArrayList<ARGState>();\n path.add(currentARGState);\n // Set<ARGState> result = new HashSet<ARGState>();\n while (currentARGState.getStateId() != destination.getStateId()) {\n boolean end = true;\n if (!currentARGState.getChildren().isEmpty()) {\n Iterator<ARGState> children = currentARGState.getChildren().iterator();\n ARGState childrenElement ;\n do {\n childrenElement = children.next();\n if (!seenElements.contains(childrenElement.getStateId())) {\n path.add(childrenElement);\n currentARGState=childrenElement;\n seenElements.add(childrenElement.getStateId());\n end = false;\n break;\n }\n } while(children.hasNext());\n if(end){\n path.remove(path.size()-1);\n if(path.size()!=0){\n currentARGState=path.get(path.size()-1);\n seenElements.add(currentARGState.getStateId());\n }\n else\n break;\n }\n\n }\n else{\n path.remove(path.size()-1);\n if(path.size()!=0){\n currentARGState=path.get(path.size()-1);\n seenElements.add(currentARGState.getStateId());\n }\n else\n break;\n }\n }\n if(currentARGState.getStateId() != destination.getStateId())\n return null;\n if(!destination.getChildren().contains(source))\n return null;\n System.out.println(\"path.size=\"+path.size());\n Iterator<ARGState> it=path.iterator();\n for(int i=0;i<path.size()-1;i++){\n ARGState pre=path.get(i);\n ARGState suc=path.get(i+1);\n CFAEdge edge=pre.getEdgeToChild(suc);\n if(edge.getRawStatement().equals(\"BLANKEDGE\")){\n pre.getChildren().remove(suc);\n suc.getParents().remove(pre);\n AbstractStates.extractLocation(pre).getLeavingEdge().remove(edge);\n AbstractStates.extractLocation(suc).getEnteringEdges().remove(edge);\n }\n }\n return new HashSet<ARGState>(path);\n }", "void BackTrackBestPath(double[] delta_T_1,\n int[][] best,\n int[] best_path) {\n FindBestInLevel(delta_T_1, ((best_path)[T_-1]));\n for (int i = T_-2;i >= 0;i--) {\n (best_path)[i] = best[i+1][(best_path)[i+1]];\n }\n}", "private boolean findPath(Node b, Node e) throws GraphException{\n\t\t\n\t\t//mark start node and push it on stack\n\t\tb.setMark(true);\n\t\tthis.S.push(b);\n\t\t\t\t\n\t\t// base case, start is the end and we did not exceed the number of bus changes limit\n\t\tif (this.changeCount <= this.changes && b == e){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// variables to hold old values in case we need to change back\n\t\tint holdOldValue = this.changeCount;\n\t\tString holdLine = this.testLine;\n\t\t\n\t\t//iterator over the edges incident on the start node\n\t\tIterator<Edge> iter = this.graph.incidentEdges(b);\n\t\t\n\t\t// loop through incident edges\n\t\twhile(iter.hasNext()){\n\t\t\tEdge line = iter.next();\n\t\t\tString s = line.getBusLine();\n\t\t\t// increase the bus changes count if we change busLines\n\t\t\tif (!s.equals(this.testLine)){\n\t\t\t\tthis.changeCount++;\n\t\t\t}\n\t\t\t// set the bus line to the current one we are on\n\t\t\tthis.testLine = s;\n\t\t\t\n\t\t\t// take the node that is connected to start node via the edge\n\t\t\tNode u;\n\t\t\tif(line.secondEndpoint().equals(b)){\n\t\t\t\tu = line.firstEndpoint();\n\t\t\t}else{\n\t\t\t\tu = line.secondEndpoint();\n\t\t\t}\n\t\t\t// make sure node is not marked and perform a recursive call on it if\n\t\t\t// also make sure that the number of changes allowed has not already been exceeded\n\t\t\tif (u.getMark() != true && this.changeCount <= this.changes){\n\t\t\t\tif (findPath(u, e) == true){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// undo changes to bus change count and current bus line if we move backwards\n\t\t\tif (holdOldValue < this.changeCount){\n\t\t\t\tthis.changeCount--;\n\t\t\t\tthis.testLine = holdLine;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// unset the start node so that other recursive calls can use it and pop it off the stack\n\t\tb.setMark(false);\n\t\tthis.S.pop();\n\t\t\n\t\treturn false;\n\t}", "private List<Path> expandExecution(Path input) {\n\t\tList<Path> childInputs = new ArrayList<>(); //store the paths generated from given path\n\t\t\n\t\t//search from the top node which have not been searched before\n\t\tfor(int j = input.bound; j < input.path.size() - 1; j++){\n\t\t\tdouble[] probabilityArray = cfg.getTransition_matrix().getRow(input.path.get(j));\n\t\t\tfor(int i = 0; i < probabilityArray.length; i++){\n\t\t\t\t//the node been visited before only have two situation:1.has been searched,2.the path contains it in the workList \n\t\t\t\tif(probabilityArray[i] > 0 && i != input.path.get(j + 1) && unvisited.contains(i)){\n\t\t\t\t\tList<Integer> tempPath = new ArrayList<>();\n\t\t\t\t\tfor(int index = 0; index < j + 1; index++)\n\t\t\t\t\t\ttempPath.add(input.path.get(index));\n\t\t\t\t\ttempPath.add(i);\n\t\t\t\t\t\n\t\t\t\t\tPath newInput = new Path(tempPath, j + 1);\n\t\t\t\t\tchildInputs.add(newInput);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn childInputs;\n\t}", "private void backtrack(int index, StringBuilder path) {\n if (path.length() == phoneDigits.length()) {\n combinations.add(path.toString());\n return; // Backtrack\n }\n\n // Get the letters that the current digit maps to, and loop through them\n String possibleLetters = letters.get(phoneDigits.charAt(index));\n\n for (char letter : possibleLetters.toCharArray()) {\n // Add the letter to our current path\n path.append(letter);\n // Move on to the next digit\n backtrack(index + 1, path);\n // Backtrack by removing the letter before moving onto the next\n path.deleteCharAt(path.length() - 1);\n }\n }", "private List<GeographicPoint> backTrack(HashMap<GeographicPoint, List<GeographicPoint>> prev, GeographicPoint goal) {\n\t\tList<GeographicPoint> ans = new ArrayList<GeographicPoint>();\n\t\tList<GeographicPoint> temp = prev.get(goal);\n\t\tif (temp.size() != 0) {\n\t\t\tans.add(goal);\n\t\t\twhile (temp.size() != 0) {\n//\t\t\t\tSystem.out.print(\"Neighbours: \");\n\t\t\t\t// lastNeighbour will be the neighbour node we visited right before moving to the current node\n\t\t\t\tGeographicPoint lastNeighbour = temp.get(temp.size() - 1);\n\t\t\t\tans.add(lastNeighbour);\n\t\t\t\ttemp = prev.get(lastNeighbour);\n\t\t\t}\n\t\t\tCollections.reverse(ans);\n\t\t}\n\t\tif (ans.isEmpty())\n\t\t\treturn null;\n\t\treturn ans;\n\t}", "public Stack<Node> retrieve_fastest_path() {\r\n return findPath(initial_node, end_node);\r\n }", "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }", "@Override\r\n public List<T> breadthFirstPath(T start, T end) {\r\n\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n LinkedList<Vertex<T>> vertexList = new LinkedList<>();\r\n //Set<Vertex<T>> visited = new HashSet<>();\r\n ArrayList<Vertex<T>> visited = new ArrayList<>();\r\n\r\n LinkedList<Vertex<T>> pred = new LinkedList<>();\r\n int currIndex = 0;\r\n\r\n pred.add(null);\r\n\r\n vertexList.add(startV);\r\n visited.add(startV);\r\n\r\n LinkedList<T> path = new LinkedList<>();\r\n\r\n if (breadthFirstSearch(start, end) == false) {\r\n path = new LinkedList<>();\r\n return path;\r\n } else {\r\n while (vertexList.size() > 0) {\r\n Vertex<T> next = vertexList.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if (next == endV) {\r\n path.add(endV.getValue());\r\n break;\r\n }\r\n for (Vertex<T> neighbor : next.getNeighbors()) {\r\n if (!visited.contains(neighbor)) {\r\n pred.add(next);\r\n visited.add(neighbor);\r\n vertexList.add(neighbor);\r\n }\r\n }\r\n currIndex++;\r\n //path.add(next.getValue());\r\n\r\n }\r\n while (currIndex != 0) {\r\n Vertex<T> parent = pred.get(currIndex);\r\n path.add(parent.getValue());\r\n currIndex = visited.indexOf(parent);\r\n }\r\n }\r\n Collections.reverse(path);\r\n return path;\r\n }", "public void computeShortestPath() throws IllegalStateException;", "public String[] findPath(String[] dictionary, String startWord, String endWord) {\n // Use A queue to save all the words to check and use BFS\n LinkedList<String> queue = new LinkedList<>();\n queue.addFirst(startWord);\n // Use an ArrayList to save the words visited\n ArrayList<String> visited = new ArrayList<>();\n // Use an ArrayList to save the parents of the words (in visited)\n ArrayList<Integer> parent = new ArrayList<>();\n parent.add(-1);\n int index = 0;\n String current;\n boolean founded = false;\n while (!queue.isEmpty()){\n current = queue.removeFirst(); //Remove the first word\n int currentI = visited.size(); // Get index for saving parent\n visited.add(current);\n //Check all available words and save to the arrayList\n for (int i = 0; i < current.length(); i++) {\n //Replace from the first letter\n for (char j = 'A'; j <= 'Z'; j++) {\n char[] neww = current.toCharArray();\n neww[i] = j;\n String newWord = String.valueOf(neww);\n //Check if the new word is a valid word\n if (checkDict(newWord,dictionary)){\n //Check if visited or in queue\n if (visited.contains(newWord)||queue.contains(newWord)) continue;\n //Add into queue\n queue.addLast(newWord);\n //Record parents\n parent.add(currentI);\n //Check if equals to end\n if (newWord.compareTo(endWord)==0) {\n founded = true;\n break;\n }\n }\n }\n if (founded) break;\n }\n if (founded) break;\n }\n if (founded){\n LinkedList<Integer> stack = new LinkedList<>();\n stack.addFirst(parent.get(parent.size()-1));\n while (parent.get(stack.getFirst())!=-1){\n stack.addFirst(parent.get(stack.getFirst()));\n }\n int size = stack.size();\n String result[] = new String[size+1];\n result[0] = startWord;\n stack.removeFirst();\n for (int i = 1; i <size; i++) {\n result[i] = visited.get(stack.removeFirst());\n }\n result[size] = endWord;\n return result;\n }\n return new String[0];\n }", "public ArrayList<Integer> path(int startVertex, int stopVertex) {\n// you supply the body of this method\n int start = startVertex;\n int stop = stopVertex;\n int previous;\n ArrayList<Integer> list = new ArrayList<>();\n HashMap<Integer, Integer> route = new HashMap<>();\n Stack<Integer> visited = new Stack<>();\n Stack<Integer> reverse = new Stack<>();\n int parent;\n if(!pathExists(startVertex,stopVertex)){\n return new ArrayList<Integer>();\n }\n else if(startVertex == stopVertex){\n list.add(startVertex);\n return list;\n }\n else{\n while(!neighbors(start).contains(stopVertex)){\n List neighbor = neighbors(start);\n for (Object a: neighbor) {\n if(!pathExists((int)a,stopVertex)){\n continue;\n }\n if(visited.contains(a)){\n continue;\n }\n else {\n route.put((int) a, start);\n visited.push(start);\n start = (int) a;\n break;\n }\n }\n }\n route.put(stopVertex,start);\n list.add(stopVertex);\n previous = route.get(stopVertex);\n list.add(previous);\n while(previous!=startVertex){\n int temp = route.get(previous);\n list.add(temp);\n previous = temp;\n }\n for(int i=0; i<list.size(); i++){\n reverse.push(list.get(i));\n }\n int i=0;\n while(!reverse.empty()){\n int temp = reverse.pop();\n list.set(i,temp);\n i++;\n }\n//list.add(startVertex);\n return list;\n }\n }", "private List<Edge<T>> getPath(T target) {\n List<Edge<T>> path = new LinkedList<>();\n T step = target;\n // check if a path exists\n if (predecessors.get(step) == null) {\n return path;\n }\n while (predecessors.get(step) != null) {\n T endVertex = step;\n step = predecessors.get(step);\n T startVertex = step;\n path.add(getEdge(startVertex, endVertex));\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }", "@Override\n\tpublic void pathFinderVisited(int x, int y) {\n\t}", "public static Path getOnePathTo(ARGState pLastElement) {\n Path path = new Path();\n Set<ARGState> seenElements = new HashSet<ARGState>();\n\n // each element of the path consists of the abstract state and the outgoing\n // edge to its successor\n\n ARGState currentARGState = pLastElement;\n // add the error node and its -first- outgoing edge\n // that edge is not important so we pick the first even\n // if there are more outgoing edges\n\n CFANode loc = extractLocation(currentARGState);\n CFAEdge lastEdge = null;\n if (loc.getNumLeavingEdges() > 0) {\n lastEdge = loc.getLeavingEdge(0);\n }\n /*\n\n */\n path.addFirst(Pair.of(currentARGState, lastEdge));\n seenElements.add(currentARGState);\n\n while (!currentARGState.getParents().isEmpty()) {\n Iterator<ARGState> parents = currentARGState.getParents().iterator();\n\n ARGState parentElement = parents.next();\n //System.out.println(currentARGState.getStateId()+\":\"+parentElement);\n while (!seenElements.add(parentElement) && parents.hasNext()) {\n // while seenElements already contained parentElement, try next parent\n parentElement = parents.next();\n // System.out.println(currentARGState.getStateId()+\":\"+parentElement);\n }\n\n CFAEdge edge = parentElement.getEdgeToChild(currentARGState);\n path.addFirst(Pair.of(parentElement, edge));\n //输出当前路径\n //System.out.println(currentARGState.getStateId()+\",\"+currentARGState.getValuesOfKeyVariables());\n //System.out.println(edge);\n currentARGState = parentElement;\n\n //测试用\n /*if(!(edge instanceof CAssumeEdge) &&edge.getRawStatement().contains(\"a3\")){\n System.out.println(currentARGState.getStateId()+\":\"+currentARGState.getValuesOfKeyVariables());\n }*/\n\n }\n // System.out.println(\"跳出getOnePathTo\");\n return path;\n }", "public List<Node> findPath(Node start);", "public SoNode \ngetCurPathTail() \n{\n//#ifdef DEBUG\n if (currentpath.getTail() != (SoFullPath.cast(getCurPath())).getTail()){\n SoDebugError.post(\"SoAction::getCurPathTail\\n\", \n \"Inconsistent path tail. Did you change the scene graph\\n\"+\n \"During traversal?\\n\");\n }\n//#endif /*DEBUG*/\n return(currentpath.getTail());\n}", "public static void main(String[] args) {\n\t\tUniquePath up=new UniquePath();\r\n\t\tup.BackTracking(1, 1, 3, 3);\r\n\t\tSystem.out.print(up.res);\r\n\r\n\t}", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }", "public void retrace(){\n\t\t//look at the sPath stack\n\t\tPoint temp = sPath.peek();\n\t\t// find neighbor with lowest score\n\t\tPoint lNeighbor = backtrack(temp);\n\t\t// coordinates of lNeighbor\n\t\tint x = (int) lNeighbor.getX();\n\t\tint y = (int) lNeighbor.getY();\n\t\t// score of neighbor\n\t\tint score = topology[x][y];\n\t\t// if there is no more neighbor then lNeighbor = temp\n\t\t// then we reach the Start then\n\t\twhile(score!=0){\n\t\t\t// push that neighbor on the stack\n\t\t\tsPath.push(lNeighbor);\n\t\t\t// update temp and lNeighbor\n\t\t\ttemp = sPath.peek();\n\t\t\tlNeighbor = backtrack(temp);\n\t\t\t// coordinates of lNeighbor\n\t\t\tx = (int) lNeighbor.getX();\n\t\t\ty = (int) lNeighbor.getY();\n\t\t\t// score of neighbor\n\t\t\tscore = topology[x][y];\n\t\t}\n\t\t// we have to do that until we see the start with score 0\n\t\t// the last lNeighbor is the S with score = 0, push it to the stack\n\t\tsPath.push(lNeighbor);\n\t\twhile(!sPath.isEmpty()){\n\t\t\tPoint track = sPath.pop();\n\t\t\tSystem.out.println(\"(\"+(int)track.getX()+\",\"+(int)track.getY()+\")\");\n\t\t}\n\t}", "private static int path1(int n) {\n int[] path = new int[n+1];\n path[0] = 0;\n path[1] = 1;\n path[2] = 2;\n for (int i=3;i<=n;i++) {\n path[i] = path[i-1] + path[i-2];\n }\n return path[n];\n }", "private static ArrayList<String> getPath(SearchTreeNode last) {\n\t\tArrayList<String> result = new ArrayList<>();\n\t\tfor (SearchTreeNode current = last; current.parent != null; current = current.parent) {\n\t\t\tresult.add(current.action);\n\t\t}\n\t\tCollections.reverse(result);\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n Node root = new Node(10);\n root.right = new Node(-3);\n root.right.right = new Node(11);\n\n Node l1 = root.left = new Node(5);\n l1.right = new Node(2);\n l1.right.right = new Node(1);\n\n l1.left = new Node(3);\n l1.left.right = new Node(-2);\n l1.left.left = new Node(3);\n\n int k = 7;\n List<Node> path = new ArrayList<>();\n findPath(root, 7, path); //O(n^2) in worst, O(nlogn) if tree is balanced.\n\n }", "private Iterable<V> reconstructPath(V last, V from, HashMap<V, V> previous){\n LinkedList<V> ret = new LinkedList<>();\n ret.addFirst(last);\n while (!last.equals(from)){\n V prev = previous.get(last);\n ret.addFirst(prev);\n last = prev;\n }\n return ret;\n }", "private void getPathsForSameNodeAndMaxNumberOfSteps(Node target, int maxNrHoops, String prefix) {\n LinkedList<Edge> edges = target.getEdges();\n\n for (Edge e : edges) {\n String newPrefix = prefix + e.getDestination().getName();\n if(!e.getDestination().getName().equalsIgnoreCase(startNode.getName()) && prefix.length()<maxNrHoops){\n getPathsForSameNodeAndMaxNumberOfSteps(e.getDestination(),maxNrHoops,newPrefix);\n } else if(e.getDestination().getName().equalsIgnoreCase(startNode.getName())){\n temp=getPathWeight(newPrefix);\n paths.put(newPrefix, temp);\n if(newPrefix.length()<maxNrHoops) {\n getPathsForSameNodeAndMaxNumberOfSteps(e.getDestination(),maxNrHoops,newPrefix);\n }\n }\n }\n\n }", "@Override\n public void backtrack() {\n if (!stack.isEmpty()) {\n int index = (Integer) stack.pop();\n\n if (index > arr.length) {//popping the insert function unneeded push\n insert((Integer) stack.pop());\n stack.pop();\n }\n if (index < arr.length) {//popping the delete function unneeded push\n delete(index);\n stack.pop();\n stack.pop();\n }\n System.out.println(\"backtracking performed\");\n }\n }", "private int findAllPathsUtil(int s, int t, boolean[] isVisited, List<Integer> localPathList,int numOfPath,LinkedList<Integer>[] parent )\n {\n\n if (t==s) {\n numOfPath++;\n return numOfPath;\n }\n isVisited[t] = true;\n\n for (Integer i : parent[t]) {\n if (!isVisited[i]) {\n localPathList.add(i);\n numOfPath =findAllPathsUtil(s,i , isVisited, localPathList,numOfPath,parent);\n localPathList.remove(i);\n }\n }\n isVisited[t] = false;\n return numOfPath;\n }", "public void findPaths(LinkedList<Node> path,Node caller){\n pathsToBaseStation.add(path);\n LinkedList<Node> nextPath = new LinkedList<>(path);\n nextPath.addFirst(this);\n for(Node node: neighbors){\n if(!path.contains(node)){\n node.findPaths(nextPath,this);\n }\n }\n }", "@Override\n\t//loc1 is the start location,loc2 is the destination\n\tpublic ArrayList<MapCoordinate> bfsSearch(MapCoordinate loc1, MapCoordinate loc2, Map m) {\n\t\tSystem.out.println(\"come into bfsSearch\");\n\t\tif(m.isAgentHasAxe() && m.isAgentHasKey()){\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add to visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){ //this is important else if(cTemp!='~'), not barely else,\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' &&s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasAxe()){ //only have axe\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasKey()){ //only have key\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation());\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head,in this fashion, return the right order of route\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY()); \n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY()); //state that move west\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1); //state move north\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1); //state move south\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * \n\t\t **/\t\t\n\t\telse{ //have no key and axe\n\t\t\tSystem.out.println(\"come into the last elas clause\");\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\tVisited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\t//int i=0;\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\t//i++;\n\t\t\t\t//System.out.println(\"come into while: \"+i);\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited, let program won't stuck in \n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tSystem.out.println(\"return computed route\");\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\tfor(MapCoordinate mc:route){\n\t\t\t\t\t\t//System.out.println(\"print returned route in bfssearch\");\n\t\t\t\t\t\tSystem.out.print(\"mc:\"+mc.getX()+\" \"+mc.getY()+\"->\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\t//System.out.println(\"1 if\");\n\t\t\t\t\tif(s.getPrevState()!=null &&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if\");\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 if\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 if\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 else\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.add(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tSystem.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*'&&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "private void backtracking(int index, int len, List<Integer> chain, Map<Integer, List<Integer>> edges) {\n if (!edges.containsKey(index)) {\n return;\n }\n for (int next : edges.get(index)) {\n chain.add(sorted[next]);\n if (len + 1 > max) {\n max = len + 1;\n longest = new ArrayList<Integer>(chain);\n } \n backtracking(next, len + 1, chain, edges);\n chain.remove(chain.size() - 1);\n }\n }", "public static int p413ComputeShortestPathNumber(Vertex start, Vertex end){\n\t Queue<Vertex> queue=new LinkedList<Vertex>();\n\t Map<Vertex, Status> statusMap=new HashMap<Vertex, Status>();\n\t Map<Vertex, Integer> levelMap=new HashMap<Vertex, Integer>();\n\t List<List<Vertex>> allLevelList=new LinkedList<List<Vertex>>();\n\t \n\t queue.offer(start);\n\t statusMap.put(start, Status.Queued);\n\t levelMap.put(start, 0);\n\t \n\t Vertex vertex;\n\t int lastLevel=-1;\n\t List<Vertex> levelList = null;\n\t\twhile ((vertex = queue.poll()) != null) {\n\t\t\tint currentLevel = levelMap.get(vertex);\n\n\t\t\tif (currentLevel != lastLevel) {\n\t\t\t\tlastLevel = currentLevel;\n\t\t\t\tlevelList = new LinkedList<Vertex>();\n\n\t\t\t\tallLevelList.add(levelList);\n\t\t\t}\n\n\t\t\tlevelList.add(vertex);\n\n\t\t\tif (vertex.equals(end)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tSet<Vertex> adjacentVertexes = vertex.getAdjacentVertexes();\n\t\t\tfor (Iterator iterator = adjacentVertexes.iterator(); iterator.hasNext();) {\n\t\t\t\tVertex adjacent = (Vertex) iterator.next();\n\n\t\t\t\tif (statusMap.get(adjacent) == null) {\n\t\t\t\t\tqueue.offer(adjacent);\n\t\t\t\t\tstatusMap.put(adjacent, Status.Queued);\n\t\t\t\t\tlevelMap.put(adjacent, currentLevel + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t \n\t int max=Integer.MIN_VALUE;\n\t List<Vertex> targetList=new LinkedList<Vertex>();\n\t targetList.add(end);\n\t for(int index=lastLevel-1;index>0;index--){\n\t\t List<Vertex> lastLevelList = allLevelList.get(index);\n\t\t List<Vertex> tmpList=new LinkedList<Vertex>();\n\n\t\t int count=0;\n\t\t for (Iterator iterator = lastLevelList.iterator(); iterator.hasNext();) {\n\t\t\t\tVertex lastLevelVertex = (Vertex) iterator.next();\n\t\t\t\tfor (Iterator iterator2 = targetList.iterator(); iterator2.hasNext();) {\n\t\t\t\t\tVertex vertex2 = (Vertex) iterator2.next();\n\t\t\t\t\tif(lastLevelVertex.getAdjacentVertexes().contains(vertex2)){\n\t\t\t\t\t count++;\n\t\t\t\t\t tmpList.add(lastLevelVertex);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t targetList=tmpList;\n\t\t \n\t\t if(count>max){\n\t\t \tmax=count;\n\t\t }\n\t }\n\t \n\t return max;\n\t}", "public Pair<Integer, Boolean> findPath(BabelSynset bs1, BabelSynset bs2) throws Exception {\n\t\tif(bs1.equals(bs2) && !bs1.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(0, false);\n\t\tif(bs1.equals(bs2) && bs1.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(0, true);\n\t\t\n\t\tA_parentsHigh = new ArrayList<String>();\n\t\t\n\t\tPair<Integer, Boolean> default_result = new Pair<Integer, Boolean>(0, true);\n\t\t\n\t\tint A_path = 0;\n\t\tString A_parent = bs1.getId().toString();\n\t\tB_recoverAncestors(bs2, 25);\n\t\t\n\t\tSystem.out.println(B_Ancestors+\"\\n\\n\");\n\t\t\n\t\tif(A_parent == null) return new Pair<Integer, Boolean>(B_Ancestors.size(), true);\n\t\tif(A_parent.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(B_Ancestors.size()+1, true);\n\t\tfor(int i=0; i<50; i++) {\n\t\t\tSystem.out.println(A_parent);\n\t\t\tint B_path = 0;\n\t\t\tfor(String id : B_Ancestors) {\n\t\t\t\tif(A_parent.equals(id)) {\n\t\t\t\t\tSystem.out.println(\"Path di A: \" + A_path + \"\\nPath di B: \" + B_path);\n\t\t\t\t\tif(id.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(A_path+B_path, true);\n\t\t\t\t\telse return new Pair<Integer, Boolean>(A_path+B_path, false);\n\t\t\t\t}\n\t\t\t\tB_path++;\n\t\t\t}\n\t\t\tif(A_parent.equals(\"bn:00031027n\")) break;\n\t\t\tA_parent = recoverParent(bn.getSynset(new BabelSynsetID(A_parent)));\n\t\t\tA_path++;\n\t\t}\n\t\treturn default_result;\n\t}", "void flipPath(int lastNode) {\n int myLastNode = lastNode;\n while (myLastNode != EMPTY_LABEL) {\n int parent = this.tLabels[myLastNode];\n\n // Add (parent, lastNode) to matching. We don't need to\n // explicitly remove any edges from the matching because:\n // * We know at this point that there is no i such that\n // sMatches[i] = lastNode.\n // * Although there might be some j such that tMatches[j] =\n // parent, that j must be sLabels[parent], and will change\n // tMatches[j] in the next time through this loop.\n this.sMatches[parent] = lastNode;\n this.tMatches[myLastNode] = parent;\n\n myLastNode = this.sLabels[parent];\n }\n }", "public String viterbiPath(char[] outcome) {\r\n\t\t// initialize the probability matrix (1 cell for each node)\r\n\t\tdouble[][] probs = new double[states.length][outcome.length];\r\n\t\t// initialize the backtrack matrix (1 less column because the first column doesn't have a backtrack\r\n\t\tint[][] backtrack = new int[states.length][outcome.length - 1];\r\n\t\t\r\n\t\t// loop over all rows in the first column\r\n\t\tfor (int row = 0; row < states.length; ++row)\r\n\t\t\t// initialize probability assuming equal chance for all initial states\r\n\t\t\tprobs[row][0] = Math.log((1.0 / states.length) * emissProb(row, outcome[0]));\r\n\t\t\r\n\t\t// loop over all other columns, and all nodes in that column\r\n\t\tfor (int col = 1; col < outcome.length; ++col) for (int row = 0; row < states.length; ++row) {\r\n\t\t\t// set this node to a very small number\r\n\t\t\tprobs[row][col] = -Double.MAX_VALUE;\r\n\t\t\t\r\n\t\t\t// loop over all nodes in the preceding column\r\n\t\t\tfor (int back = 0; back < states.length; ++back) {\r\n\t\t\t\t// calculate probability if path from this node is used\r\n\t\t\t\tdouble tryProb = probs[back][col - 1] + Math.log(edgeProb(back, row, outcome[col]));\r\n\t\t\t\t// if it beats the current probability\r\n\t\t\t\tif (tryProb > probs[row][col]) {\r\n\t\t\t\t\t// set it as the probability, and the node's row as a backtrack\r\n\t\t\t\t\tprobs[row][col] = tryProb;\r\n\t\t\t\t\tbacktrack[row][col - 1] = back;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// assume that the maximum node in the last column is in row 0\r\n\t\tint maxRow = 0;\r\n\t\t// loop over all other rows in the last column\r\n\t\tfor (int row = 1; row < states.length; ++row)\r\n\t\t\t// if this node has a better probability, set its row as the maximum\r\n\t\t\tif (probs[row][outcome.length - 1] > probs[maxRow][outcome.length - 1]) maxRow = row;\r\n\t\t\r\n\t\t// return the backtracked path starting at the max node in the last column\r\n\t\treturn backtrackPath(backtrack, maxRow);\r\n\t}", "private Queue<T> backtrace(T node, Map<T, T> parentMap) {\n LinkedList<T> path = new LinkedList<>();\n path.add(node);\n\n int previousX, previousY, currentX, currentY;\n int dx, dy;\n int steps;\n T temp;\n while (parentMap.containsKey(node)) {\n previousX = parentMap.get(node).x;\n previousY = parentMap.get(node).y;\n currentX = node.x;\n currentY = node.y;\n steps = Integer.max(Math.abs(previousX - currentX), Math.abs(previousY - currentY));\n dx = Integer.compare(previousX, currentX);\n dy = Integer.compare(previousY, currentY);\n\n temp = node;\n for (int i = 0; i < steps; i++) {\n temp = graph.getNode(temp.x + dx, temp.y + dy);\n path.addFirst(temp);\n }\n\n node = parentMap.get(node);\n }\n return path;\n }", "private List<List<Edge>> walker(String sourceNode, String destNode, List<Edge> currentPath, List<List<Edge>> paths) {\n if (currentPath == null) {\n currentPath = new ArrayList<>();\n }\n if (paths == null) {\n paths = new ArrayList<>();\n }\n\n if (sourceNode.equals(destNode)) {\n return paths;\n }\n\n\n// List<Edge> edges = findByNodeA(sourceNode);\n List<Edge> edges = allEdges.stream().filter(edge -> edge.nodeA.equals(sourceNode)).collect(Collectors.toList());\n\n\n for (Edge edge : edges) {\n if (!currentPath.contains(edge)&&!containsBidirectionalRef(currentPath,edge)) {\n List<Edge> forkPath = (List<Edge>) ((ArrayList<Edge>) currentPath).clone();\n\n forkPath.add(edge);\n\n if (edge.getNodeB().equals(destNode)) {\n paths.add(forkPath);\n } else {\n walker(edge.getNodeB(), destNode,forkPath,paths);\n }\n }\n }\n\n return paths;\n }", "private Square[] returnPath(Vertex v, GameBoard b) {\n // because we're starting at the end point,\n // we need build the path in 'reverse'\n Stack<Square> path = new Stack<Square>();\n\n // while we're not at the start point\n while ( v.dist != 0 ) {\n path.push(vertexToSquare(v,b));\n v = v.path;\n }\n\n // place the locations in the proper order\n Square[] road = new Square[path.size()];\n for ( int i = 0; i < path.size(); i++ )\n road[i] = path.pop();\n\n return road;\n }", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "protected LinkedList<IVertex<String>> getPath(IVertex<String> target) {\n\n LinkedList<IVertex<String>> path = new LinkedList<IVertex<String>>();\n\n IVertex<String> step = target;\n\n // check if a path exists\n if (predecessors.get(step) == null) {\n return null;\n }\n path.add(step);\n while (predecessors.get(step) != null) {\n step = predecessors.get(step);\n path.add(step);\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }", "public void findCheapestPath(int begin, int end) throws Exception\n\t{\n\t\tresult.clear();\n\t\tresult.add(begin);\n\t\tfindPath(begin, end);\n\t\tresult.add(end);\n\t}", "HashMap<GamePiece, GamePiece> bfs(GamePiece from) {\n ArrayDeque<GamePiece> worklist = new ArrayDeque<GamePiece>();\n ArrayList<GamePiece> seen = new ArrayList<GamePiece>();\n HashMap<GamePiece, GamePiece> graph = new HashMap<GamePiece, GamePiece>();\n worklist.addFirst(from);\n graph.put(from, from);\n while (worklist.size() > 0) {\n GamePiece next = worklist.removeFirst();\n if (seen.contains(next)) {\n // if seen has the next element, don't do anything with it\n }\n else {\n for (String s : this.directions) {\n if (next.hasNeighbor(s) && next.connected(s)) {\n worklist.addFirst(next.neighbors.get(s));\n graph.put(next.neighbors.get(s), next);\n }\n }\n seen.add(next);\n }\n }\n return graph;\n }", "private Stack<MapLocation> returnPath(MapLocation goal, MapLocation start) {\n\t\tStack<MapLocation> path = new Stack<MapLocation>();\n\n\t\tMapLocation iter = goal;\n\t\twhile (iter.cameFrom != null) {\n\t\t\tpath.add(iter.cameFrom);\n\t\t\titer = iter.cameFrom;\n\t\t}\n\t\t// to remove start\n\n\t\tif (path.isEmpty()) {\n\t\t\treturn path;\n\t\t}\n\n\t\tpath.pop();\n\n\t\treturn path;\n\t}", "static int paths_usingRecursion(int[][] matrix) {\n\t\treturn paths(matrix, 0, 0);\n\t}", "public boolean hasPathTo(int v) {\n return visited[v];\n }", "protected Solution<T> backTrace(State<T> s){\r\n\t\tSolution<T> sol = new Solution<T>(); // Initiate Solution\r\n\t\tState<T> itr = s; // Initiate Iterator as the given state (needs to be the goal state)\r\n\t\tsol.addState(itr);\r\n\t\twhile(itr != null) {\r\n\t\t\titr = itr.getCameFrom();\r\n\t\t\tsol.addState(itr); // add to the solution where it came from\r\n\t\t}\r\n\t\treturn sol;\r\n\t}", "public List<Vertex> newPath() {\r\n\t\tList<Vertex> Pathchange = new ArrayList<Vertex>();\r\n\t\tList<Vertex> tempPath = new ArrayList<Vertex>();\r\n\t\tint BestEval = Integer.MAX_VALUE;\r\n\t\tVertex changeVertexV1 = new Vertex();\r\n\t\tVertex changeVertexV2 = new Vertex();\r\n\r\n\t\tfor (int position = 0; position < this.LastPath.size() - 1; position++) {\r\n\t\t\tfor (int changement = position+1; changement < this.LastPath.size(); changement++) {\r\n\r\n\t\t\t\ttempPath.clear();\r\n\t\t\t\ttempPath = new ArrayList<Vertex>(this.LastPath);\r\n\t\t\t\tif (!(this.TabuListV1.contains(tempPath.get(position)) || this.TabuListV1.contains(tempPath.get(changement)) || this.TabuListV2.contains(tempPath.get(position)) || this.TabuListV2.contains(tempPath.get(changement)))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tCollections.swap(tempPath, position, changement);\r\n\t\t\t\t\tif (this.fit(tempPath) < BestEval) {\r\n\t\t\t\t\t\tPathchange.clear();\r\n\t\t\t\t\t\tPathchange = new ArrayList<Vertex>(tempPath);\r\n\t\t\t\t\t\tchangeVertexV1 = tempPath.get(position);\r\n\t\t\t\t\t\tchangeVertexV2 = tempPath.get(changement);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.tabuElementType == 0) {\r\n\t\t\tthis.TabuListV1.add(0, changeVertexV1);\r\n\t\t}else if(this.tabuElementType == 1) {\r\n\t\t\tthis.TabuListV2.add(0, changeVertexV2);\r\n\t\t}else {\r\n\t\t\tthis.TabuListV1.add(0, changeVertexV1);\r\n\t\t\tthis.TabuListV2.add(0, changeVertexV2);\r\n\t\t}\r\n\t\t\r\n\t\tif (this.TabuListV1.size() > this.TabuListSize) {\r\n\t\t\tthis.TabuListV1.remove(this.TabuListV1.size() - 1);\r\n\t\t}\r\n\t\tif (this.TabuListV2.size() > this.TabuListSize) {\r\n\t\t\tthis.TabuListV2.remove(this.TabuListV2.size() - 1);\r\n\t\t}\r\n\r\n\t\treturn Pathchange;\r\n\t}", "ArrayList<PathFindingNode> neighbours(PathFindingNode node);", "public LinkedList<Move> search1() {\r\n\r\n while (!paths.isEmpty()) {\r\n\r\n if (logger.isDebugEnabled())\r\n logger.debug(printPathCosts());\r\n\r\n LinkedList<Move> path = paths.first();\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"First path is \" + path);\r\n\r\n if (!paths.remove(path)) {\r\n throw new RuntimeException(\"Failed to remove path\");\r\n }\r\n\r\n Node currentNode = path.getLast().destination;\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Last site on path is \" + currentNode);\r\n\r\n if (closed.contains(currentNode)) {\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Site \" + currentNode + \" was closed.\");\r\n continue;\r\n }\r\n if (currentNode.isAtTarget(target)) {\r\n return path;\r\n }\r\n\r\n closed.add(currentNode);\r\n\r\n Move lastMove = path.getLast();\r\n if ( !(lastMove instanceof InitialMove) ) {\r\n currentNode = transformCurrentNode(lastMove);\r\n }\r\n\r\n Set<Move> successors = successors(currentNode);\r\n for (Move y : successors) {\r\n LinkedList<Move> successor = new LinkedList<Move>(path);\r\n y.pathCost = successor.getLast().pathCost + y.edgeCost;\r\n successor.add(y);\r\n paths.add(successor);\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Added successor \" + y);\r\n nodeExpansionCounter ++;\r\n }\r\n }\r\n\r\n return null;\r\n }", "public void RecordDeadlockPath() {\r\n myNode currentNode; //The current node we're considering\r\n int pos; //position in path array\r\n int i;\r\n \r\n //Set up array to return\r\n tree.pathToDeadlock = new int[depth - 1];\r\n pos = depth - 2; // Start filling in at the end of the array\r\n \r\n currentNode = this;\r\n \r\n //For each ancestor node until root\r\n while(currentNode != tree.root) {\r\n // Work out which transition we followed to get to to currentNode\r\n loop: for(i = 0; i < tree.transitionCount; i++) {\r\n if (currentNode.parent.transArray[i]\r\n && currentNode.parent.children[i] == currentNode ) {\r\n // That's the one!\r\n break loop;\r\n }\r\n }\r\n \r\n tree.pathToDeadlock[pos] = i;\r\n pos--;\r\n //Update current node to look at an earlier ancestor\r\n currentNode = currentNode.parent;\r\n }\r\n \r\n //print(\"Path to deadlock is: \", tree.pathToDeadlock);//debug\r\n }", "public static void getOnePathTo(ARGState pLastElement, Set<Integer> utilFlag) {\n Set<Integer> seenElements = new HashSet<Integer>();\n\n // each element of the path consists of the abstract state and the outgoing\n // edge to its successor\n\n ARGState currentARGState = pLastElement;\n // add the error node and its -first- outgoing edge\n // that edge is not important so we pick the first even\n // if there are more outgoing edges\n\n CFANode loc = extractLocation(currentARGState);\n CFAEdge lastEdge = null;\n if (loc.getNumLeavingEdges() > 0) {\n lastEdge = loc.getLeavingEdge(0);\n }\n /*\n\n */\n //path.addFirst(Pair.of(currentARGState, lastEdge));\n seenElements.add(currentARGState.getStateId());\n utilFlag.addAll(currentARGState.getFlag());\n while (!currentARGState.getParents().isEmpty()) {\n Iterator<ARGState> parents = currentARGState.getParents().iterator();\n\n ARGState parentElement = parents.next();\n //System.out.println(currentARGState.getStateId()+\":\"+parentElement);\n while (!seenElements.add(parentElement.getStateId()) && parents.hasNext()) {\n // while seenElements already contained parentElement, try next parent\n parentElement = parents.next();\n // System.out.println(currentARGState.getStateId()+\":\"+parentElement);\n }\n\n CFAEdge edge = parentElement.getEdgeToChild(currentARGState);\n //path.addFirst(Pair.of(parentElement, edge));\n utilFlag.addAll(parentElement.getFlag());\n currentARGState = parentElement;\n }\n // System.out.println(\"跳出getOnePathTo\");\n }", "private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}", "private void getPathsWithExactNumberOfSteps(Node start, Node target, int exactNrHoops, String prefix) {\n\n LinkedList<Edge> edges = start.getEdges();\n\n for (Edge e : edges) {\n String newPrefix = prefix + e.getDestination().getName();\n\n if(!e.getDestination().getName().equalsIgnoreCase(endNode.getName()) && newPrefix.length()<=exactNrHoops) {\n getPathsWithExactNumberOfSteps(e.getDestination(), target, exactNrHoops, newPrefix);\n }\n else if(e.getDestination().getName().equalsIgnoreCase(endNode.getName())){\n if(newPrefix.length()-1==exactNrHoops) {\n temp = getPathWeight(newPrefix);\n paths.put(newPrefix, temp);\n }\n getPathsWithExactNumberOfSteps(e.getDestination(), target, exactNrHoops, newPrefix);\n }\n\n }\n }", "private void computePathsForNode(Station curr, Route route, Trip trip, List<Station> visited)\n {\n if (visited.contains(curr)) return; // cycle detected\n\n visited.add(curr); // add current station to visited list\n\n if (route != null) // this is not the source node\n {\n if (trip == null)\n {\n trip = new Trip();\n trip.addHop(route);\n this.tripList.add(trip);\n }\n else\n {\n if (trip.getHopCount() > 0)\n {\n // Intermediate paths within a larger traversal path.\n // Add all the routes from the original traversal and add the current route at the end.\n // This generates all the sub-paths in a traversal.\n Trip newTrip = new Trip();\n for (Route hop : trip.getHops())\n newTrip.addHop(hop);\n\n tripList.add(newTrip);\n }\n\n // original traversal path\n trip.addHop(route);\n }\n }\n\n // if any outbound routes exist, proceed with the next set of nodes in a depth-first manner\n List<Route> outbound = this.graph.getOutboundRoutes(curr);\n if (outbound != null)\n {\n while (!outbound.isEmpty())\n {\n Route outRoute = outbound.remove(0);\n computePathsForNode(outRoute.destination, outRoute, trip, new ArrayList<Station>(visited));\n }\n }\n if (trip != null)\n {\n trip.removeLastHop(); // remove the hop from the trip list\n }\n\n }", "public ArrayList<SearchNode> search(Problem p) {\n\tfrontier = new NodeQueue();\t// The frontier is a queue of expanded SearchNodes not processed yet\n\texplored = new HashSet<SearchNode>();\t/// The explored set is a set of nodes that have been processed \n\tGridPos startState = (GridPos) p.getInitialState();\t// The start state is given\n\tfrontier.addNodeToFront(new SearchNode(startState));\t// Initialize the frontier with the start state \n\n\t\n\tpath = new ArrayList<SearchNode>();\t// Path will be empty until we find the goal\n\t\t\n\n\n\twhile(!frontier.isEmpty()){\n\n\t SearchNode s = frontier.removeFirst(); \n\t GridPos g = s.getState(); \n\n\t if ( p.isGoalState(g) ) {\n\t\tpath = s.getPathFromRoot();\t\n\t\tbreak; \n\t }\n\t \n\t explored.add(s); \t \n\t ArrayList<GridPos> childStates = p.getReachableStatesFrom(g);\n\n\t while(!childStates.isEmpty()){\n\n\t\tSearchNode child = new SearchNode(childStates.get(0), s); \n\n\t\tif(!explored.contains(child) && !frontier.contains(child)){\n\n\t\t if ( p.isGoalState(child.getState()) ) {\n\t\t\n\t\t\tpath = child.getPathFromRoot();\t\n\t\t\treturn path; \n\t\t }\n\n\t\t if(insertFront) \n\t\t\tfrontier.addNodeToFront(child); \t\t \t\t\n\t\t else\t\n\t\t\tfrontier.addNodeToBack(child); \t \n\n\n\n\t\t}\n\n\t\tchildStates.remove(0);\n\t }\t \n\t}\n\n\n\treturn path;\n\n }", "public boolean check(Node n, int path) {\r\n\r\n\t\t// Basic case check.\r\n\t\tif (EndPoint.get(path).equals(n))\r\n\t\t\treturn true;\r\n\r\n\t\t// Basic case check\r\n\t\tboolean okForPath = false;\r\n\t\tfor (Integer neiborIndex : nowMap.get(n.index)) {\r\n\t\t\tNode neibor = allNodes.get(neiborIndex);\r\n\r\n\t\t\tif (neibor.path == 0 || EndPoint.get(path).equals(neibor))\r\n\t\t\t\tokForPath = true;\r\n\t\t}\r\n\r\n\t\t\r\n\t\t// Dead end check\r\n\r\n\t\tfor (Integer neiborIndex : nowMap.get(n.index)) {\r\n\t\t\tif (allNodes.get(neiborIndex).path == 0) {\r\n\t\t\t\tint num = 0;\r\n\t\t\t\r\n\t\t\t\t\t// BEGIN check for dead ends\r\n\r\n\t\t\t\t\t// except the node we are testing, all the other neighbor nodes from other paths\r\n\t\t\t\t\t// of the neighbor node of the node we are testing are occupied and then a dead\r\n\t\t\t\t\t// end is created.\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(Integer neighborOfNeighborIndex:nowMap.get(neiborIndex)) {\r\n\t\t\t\t\t\tif(neighborOfNeighborIndex!=n.index) {\r\n\t\t\t\t\t\t\tif(allNodes.get(neighborOfNeighborIndex).path==0)\r\n\t\t\t\t\t\t\t\tnum++;\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tfor(Integer pathIndex:StartPoint.keySet()) {\r\n\t\t\t\t\t\t\t\t\tif(!paths.get(pathIndex).peek().equals(EndPoint.get(pathIndex))){\r\n\t\t\t\t\t\t\t\t\t\tif(neighborOfNeighborIndex==paths.get(pathIndex).peek().index || neighborOfNeighborIndex==EndPoint.get(pathIndex).index)\r\n\t\t\t\t\t\t\t\t\t\t\tnum++;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tnum++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(num<=1)\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t// END check for dead ends\r\n\t\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\tLinkedList<Integer> topPathsIndex=new LinkedList<Integer>();\r\n\t\t\r\n\t\tfor(Integer p:paths.keySet())\r\n\t\t\ttopPathsIndex.add(paths.get(p).peek().index);\r\n\t\tboolean deadEnd=true;\r\n\t\tfor(Integer nodeIndex:allNodes.keySet()) {\r\n\t\t\tNode theNode=allNodes.get(nodeIndex);\r\n\t\t\tif(theNode.path==0) {\r\n\t\t\t\tfor(Integer itsNeighborIndex:nowMap.get(nodeIndex)) {\r\n\t\t\t\t\tif(allNodes.get(itsNeighborIndex).path==0) {\r\n\t\t\t\t\t\tdeadEnd=false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(deadEnd) {\r\n\t\t\t\t\tfor(Integer itsNeighborIndex:nowMap.get(nodeIndex)) {\r\n\t\t\t\t\t\tif(topPathsIndex.contains(itsNeighborIndex)) {\r\n\t\t\t\t\t\t\tint p0=allNodes.get(itsNeighborIndex).path;\r\n\t\t\t\t\t\t\tint itsEndIndex=EndPoint.get(p0).index;\r\n\t\t\t\t\t\t\tif(nowMap.get(nodeIndex).contains(itsEndIndex))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tdeadEnd=false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tfor(Integer itsNeighborIndex:nowMap.get(nodeIndex)) {\r\n\t\t\t\t\tif(allNodes.get(itsNeighborIndex).path==0 ||allNodes.get(itsNeighborIndex).path==theNode.path) {\r\n\t\t\t\t\t\tdeadEnd=false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif(deadEnd)\r\n\t\t\treturn !deadEnd;\r\n\t\t\r\n\t\tHashMap<Integer,Integer> rmap=new HashMap<Integer,Integer>();\r\n\t\tint rcount=state_build_regions(rmap);\r\n\t\tif(state_regions_stranded(rcount,rmap,paths.size()+1,1)>0)\r\n\t\t\treturn false;\r\n\r\n\t\treturn okForPath;\r\n\t}", "public List<MapPoint> buildPath(MapPoint point) { // Palauttaa polun alusta loppuun listana.\n List<MapPoint> finalPath = new ArrayList<>();\n MapPoint tempPoint = point;\n while (true) {\n finalPath.add(0, tempPoint);\n \n if (!tempPoint.hasPrevious()) {\n break;\n }\n tempPoint = tempPoint.getPrevious();\n }\n return finalPath; \n }", "private void findPath1(List<Coordinate> path) {\n\n // records the start coordinate in a specific sequence.\n ArrayList<Coordinate> starts = new ArrayList<>();\n // records the end coordinate in a specific sequence.\n ArrayList<Coordinate> ends = new ArrayList<>();\n // records the total cost of the path in a specific sequence.\n ArrayList<Integer> cost = new ArrayList<>();\n\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(o1);\n graph.printPath(d1);\n starts.add(o1);\n ends.add(d1);\n cost.add(graph.getPathCost(d1));\n }\n }\n int index = getMinIndex(cost);\n\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(starts.get(index));\n graph.printPath(ends.get(index));\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n setSuccess(path);\n }", "private List<Pair<Integer, Integer>> getBestPath(Pair<Integer, Integer> curLocation, Pair<Integer, Integer> dest) {\n\t\tList<Pair<Integer, Integer>> path = new LinkedList<Pair<Integer, Integer>>();\n\t\t\n\t\t\n\t\tNode current = new Node(curLocation.getX(), curLocation.getY(), getHitProbability(curLocation.getX(), curLocation.getY()));\n\t\tNode target = new Node(dest.getX(), dest.getY(), getHitProbability(dest.getX(), dest.getY()));\n\t\tList<Node> openSet = new ArrayList<>();\n List<Node> closedSet = new ArrayList<>();\n \n \n while (true) {\n openSet.remove(current);\n List<Node> adjacent = getAdjacentNodes(current, closedSet, target);\n\n // Find the adjacent node with the lowest heuristic cost.\n for (Node neighbor : adjacent) {\n \tboolean inOpenset = false;\n \tList<Node> openSetCopy = new ArrayList<>(openSet);\n \tfor (Node node : openSetCopy) {\n \t\tif (neighbor.equals(node)) {\n \t\t\tinOpenset = true;\n \t\t\tif (neighbor.getAccumulatedCost() < node.getAccumulatedCost()) {\n \t\t\t\topenSet.remove(node);\n \t\t\t\topenSet.add(neighbor);\n \t\t\t}\n \t\t}\n \t}\n \t\n \tif (!inOpenset) {\n \t\topenSet.add(neighbor);\n \t}\n }\n\n // Exit search if done.\n if (openSet.isEmpty()) {\n System.out.printf(\"Target (%d, %d) is unreachable from position (%d, %d).\\n\",\n target.getX(), target.getY(), curLocation.getX(), curLocation.getY());\n return null;\n } else if (/*isAdjacent(current, target)*/ current.equals(target)) {\n break;\n }\n\n // This node has been explored now.\n closedSet.add(current);\n\n // Find the next open node with the lowest cost.\n Node next = openSet.get(0);\n for (Node node : openSet) {\n if (node.getCost(target) < next.getCost(target)) {\n next = node;\n }\n }\n// System.out.println(\"Moving to node: \" + current);\n current = next;\n }\n \n // Rebuild the path using the node parents\n path.add(new Pair<Integer, Integer>(curLocation.getX(), curLocation.getY()));\n while(current.getParent() != null) {\n \tcurrent = current.getParent();\n \tpath.add(0, new Pair<Integer, Integer>(current.getX(), current.getY()));\n }\n \n if (path.size() > 1) {\n \tpath.remove(0);\n }\n \n\t\treturn path;\n\t}", "public Stack<Node> findPath(Node initial_node, Node end_node) {\r\n\r\n // TODO: check for hardcoded value 3\r\n int size = 3;\r\n boolean is_start_node = true;\r\n\r\n PriorityList priority_list = new PriorityList();\r\n LinkedList linked_list = new LinkedList();\r\n\r\n // Initialise start node\r\n initial_node.total_path_cost = 0;\r\n initial_node.cost_estimated_to_goal_node = initial_node.pathCost(end_node);\r\n initial_node.parent_node_in_path = null;\r\n priority_list.add(initial_node);\r\n\r\n // Begin exploration of grid map\r\n while (!priority_list.isEmpty()) {\r\n\r\n // Get node from head of list\r\n Node node = (Node) priority_list.removeFirst();\r\n\r\n // Determine if node is Start node\r\n if (node == initial_node)\r\n is_start_node = true;\r\n else\r\n is_start_node = false;\r\n\r\n ((Node) node).setFacing();\r\n\r\n // Determine if node is goal node\r\n if (node == end_node) {\r\n return constructPath(end_node);\r\n }\r\n\r\n // Get list of node neighbours\r\n List neighbors_list = node.getNeighbors();\r\n\r\n // Iterate through list of node neighbours\r\n for (int i = 0; i < neighbors_list.size(); i++) {\r\n\r\n // Extract neighbour node information\r\n Node node_neighbour = (Node) neighbors_list.get(i);\r\n boolean isOpen = priority_list.contains(node_neighbour);\r\n boolean isClosed = linked_list.contains(node_neighbour);\r\n boolean isObs = (node_neighbour).isObs();\r\n int clearance = node_neighbour.getClearance();\r\n float total_path_cost = node.getCost(node_neighbour, end_node, is_start_node) + 1;\r\n\r\n // Check 1. if node neighbours have not been explored OR 2. if shorter path to\r\n // neighbour node exists\r\n if ((!isOpen && !isClosed) || total_path_cost < node_neighbour.total_path_cost) {\r\n node_neighbour.parent_node_in_path = node;\r\n node_neighbour.total_path_cost = total_path_cost;\r\n node_neighbour.cost_estimated_to_goal_node = node_neighbour.pathCost(end_node);\r\n\r\n // Add neighbour node to priority_list if 1. node not in\r\n // priority_list/linked_list AND 2.\r\n // robot can reach\r\n if (!isOpen && !isObs && size == clearance) {\r\n priority_list.add(node_neighbour);\r\n }\r\n }\r\n }\r\n linked_list.add(node);\r\n }\r\n\r\n // priority_list empty; no path found\r\n\r\n return new Stack<Node>();\r\n }", "private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}", "public interface GraphSearchAlgorythm<T> {\n List<GraphEdge<T>> getPath(GraphVerticesStore<T> Vertices, T from, T to);\n}", "public void getAllPaths(Graph<Integer> graph) {\n\t\tTopologicalSort obj = new TopologicalSort();\r\n\t\tStack<Vertex<Integer>> result = obj.sort(graph);\r\n\t\t\r\n\t\t// source (one or multiple) must lie at the top\r\n\t\twhile(!result.isEmpty()) {\r\n\t\t\tVertex<Integer> currentVertex = result.pop();\r\n\t\t\t\r\n\t\t\tif(visited.contains(currentVertex.getId())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstack = new Stack<Vertex<Integer>>();\r\n\t\t\tSystem.out.println(\"Paths: \");\r\n\t\t\tvisited = new ArrayList<Long>();\r\n\t\t\tdfs(currentVertex);\r\n\t\t\t//System.out.println(stack);\r\n\t\t\t//GraphUtil.print(stack);\t\t\t\r\n\t\t}\r\n\r\n\t}", "public ArrayList<Action> findShortestPath(int startX, int startY, int endX, int endY, int numKeys, boolean toUnknown){\n\t\t\tHashSet<SearchNode> visited = new HashSet<SearchNode>();\n\t\t\tHashSet<SearchNode> work = new HashSet<SearchNode>();\n\t\t\t\n\t\t\tSearchNode start = new SearchNode();\n\t\t\tstart.posX = startX;\n\t\t\tstart.posY = startY;\n\t\t\tstart.gScore = 0;\n\t\t\tif (toUnknown)\n\t\t\t\tstart.fScore = 0;\n\t\t\telse\n\t\t\t\tstart.fScore = Math.abs(startX - endX) + Math.abs(startY - endY);\n\t\t\tstart.keysLeft = numKeys;\n\t\t\tstart.cameFrom = null;\n\t\t\twork.add(start);\n\t\t\t\n\t\t\twhile(work.size() > 0){\n\t\t\t\tSearchNode current = findFirstNode(work);\n\t\t\t\tif (!toUnknown && current.posX == endX && current.posY == endY){\n\t\t\t\t\t//We've found the end node, reconstruct the path\n\t\t\t\t\treturn recoverPath(current);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (toUnknown && getElement(current.posX, current.posY) == BoxContainer.Unkown){\n\t\t\t\t\treturn recoverPath(current);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twork.remove(current);\n\t\t\t\tvisited.add(current);\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < 4; i++){\n\t\t\t\t\tint newX, newY;\n\t\t\t\t\tAction direction;\n\t\t\t\t\tif (i == 0){\n\t\t\t\t\t\tnewX = current.posX + 1;\n\t\t\t\t\t\tnewY = current.posY;\n\t\t\t\t\t\tdirection = Action.East;\n\t\t\t\t\t}\n\t\t\t\t\telse if (i == 1){\n\t\t\t\t\t\tnewX = current.posX;\n\t\t\t\t\t\tnewY = current.posY + 1;\n\t\t\t\t\t\tdirection = Action.North;\n\t\t\t\t\t}\n\t\t\t\t\telse if (i == 2){\n\t\t\t\t\t\tnewX = current.posX - 1;\n\t\t\t\t\t\tnewY = current.posY;\n\t\t\t\t\t\tdirection = Action.West;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnewX = current.posX;\n\t\t\t\t\t\tnewY = current.posY - 1;\n\t\t\t\t\t\tdirection = Action.South;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Check to make sure we can move into this node\n\t\t\t\t\tBoxContainer newBox = getElement(newX, newY);\n\t\t\t\t\tif (newBox == BoxContainer.Blocked || (!toUnknown && newBox == BoxContainer.Unkown))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif (newBox == BoxContainer.Door && current.keysLeft == 0){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint new_gScore = current.gScore + 1;\n\t\t\t\t\tif (newBox == BoxContainer.Door || newBox == BoxContainer.Key)\n\t\t\t\t\t\tnew_gScore++;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//try to find the node if we've already searched it, otherwise create it\n\t\t\t\t\tSearchNode newNode = findNodeWithCoords(visited, newX, newY);\n\t\t\t\t\tif (newNode == null){\n\t\t\t\t\t\tnewNode = findNodeWithCoords(work, newX, newY);\n\t\t\t\t\t\tif (newNode == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewNode = new SearchNode();\n\t\t\t\t\t\t\tnewNode.posX = newX;\n\t\t\t\t\t\t\tnewNode.posY = newY;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (visited.contains(newNode) && new_gScore >= newNode.gScore)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif (!work.contains(newNode) || new_gScore < newNode.gScore){\n\t\t\t\t\t\tnewNode.cameFrom = current;\n\t\t\t\t\t\tnewNode.direction = direction;\n\t\t\t\t\t\tnewNode.gScore = new_gScore;\n\t\t\t\t\t\tif (toUnknown)\n\t\t\t\t\t\t\tnewNode.fScore = newNode.gScore;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnewNode.fScore = newNode.gScore + Math.abs(newNode.posX - endX) + Math.abs(newNode.posY - endY);\n\t\t\t\t\t\tnewNode.keysLeft = current.keysLeft;\n\t\t\t\t\t\tif (newBox == BoxContainer.Door)\n\t\t\t\t\t\t\tnewNode.keysLeft--;\n\t\t\t\t\t\tif (newBox == BoxContainer.Key)\n\t\t\t\t\t\t\tnewNode.keysLeft++;\n\t\t\t\t\t\tif (!work.contains(newNode))\n\t\t\t\t\t\t\twork.add(newNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "public Iterator<Node> findPath() throws GraphException{\n\t\t\n\t\t// create a start and end node\n\t\tNode begin = this.graph.getNode(this.start);\n\t\tNode finish = this.graph.getNode(this.end);\n\t\t// check to make sure a path exits between these nodes\n\t\tboolean test = findPath(begin, finish);\n\t\tif(test){\n\t\t\t// reset the variables of the map that were changed by invoking the findPath helper method\n\t\t\tthis.testLine = \"Luka<3<3\";\n\t\t\tthis.changeCount = -1;\n\t\t\t//return the iterator over the Stack of the Map that was modified by the findPath helper method\n\t\t\treturn this.S.iterator();\n\t\t}\n\t\t// return null if a path does not exist\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n TreeNode n0 = new TreeNode(0); \n TreeNode n1 = new TreeNode(1); \n TreeNode n2 = new TreeNode(2); \n TreeNode n3 = new TreeNode(3); \n TreeNode n4 = new TreeNode(4); \n TreeNode n5 = new TreeNode(5); \n TreeNode n6 = new TreeNode(6); \n \n n0.left = n1; n0.right = n2; \n n1.left = n3; n1.right = n4; \n n2.left = n5; n2.right = n6; \n \n List<TreeNode> res = new Test().findPath(n0, n5); \n System.out.println(res); \n }", "public List<Vertex> runTabuSearch() {\r\n\t\tBestPath = convertPath(ClothestPath.findCycle(this.vertexGraph, this.edgeGraph, this.isOriented));\r\n\t\tLastPath = new ArrayList<Vertex>(BestPath);\r\n\t\tint BestEval = fit(BestPath);\r\n\t\thistoBestPath.add(new ArrayList<Vertex>(BestPath));\r\n\r\n\t\tint iteration_actuel = 0;\r\n\t\twhile (iteration_actuel < this.numberIteration) {\r\n\t\t\tLastPath = newPath();\r\n\t\t\t\r\n\t\t\tif(LastPath.isEmpty()) {\r\n\t\t\t\titerationReal = iteration_actuel;\r\n\t\t\t\treturn BestPath;\r\n\t\t\t}\r\n\r\n\t\t\tif (fit(LastPath) < BestEval) {\r\n\t\t\t\tBestPath = new ArrayList<Vertex>(LastPath);\r\n\t\t\t\tBestEval = fit(LastPath);\r\n\t\t\t\thistoBestPath.add(new ArrayList<Vertex>(BestPath));\r\n\t\t\t}\r\n\r\n\t\t\titeration_actuel++;\r\n\t\t}\r\n\r\n\t\titerationReal = iteration_actuel;\r\n\t\treturn BestPath;\r\n\t}", "private int\ngetNodeIndex(final SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int i;\n\n // Search from bottom up for node in path, since details are\n // usually examined near the bottom\n for (i = ( SoFullPath.cast ( path)).getLength() - 1; i >= 0; i--)\n if (path.getNode(i) == node)\n return i;\n\n//#ifdef DEBUG\n SoDebugError.post(\"SoPickedPoint::getNodeIndex\",\n \"Node \"+node+\" is not found in path\");\n//#endif /* DEBUG */\n\n return -1;\n}", "public static String findPath(Maze maze) {\n \tint m = maze.getNumRows();\n \tint n = maze.getNumCols();\n\n \t//define a visited matrix\n \tboolean[][] visited = new boolean[m][n];\n \tsetvisited(false, visited);\n\n \t//define a direction matrix\n \tint[][] dir_mtr = new int[m][n];\n \tinit_dir(-1,dir_mtr);\n\n\n\n \t//define a stack\n \tStack<MazeLocation> s;\n \ts = new StackRefBased<MazeLocation>();\n\n \tMazeLocation entry = maze.getEntry();\n \tMazeLocation exit = maze.getExit();\n \t// System.out.println(entry.toString());\n \ts.push(entry);\n\n\t\tMazeLocation temp; \n\t\tString result = \"\"; \t\n\n\t\ttry{\n\t\t\tint x,y;\n\n\n\t\t\twhile(!s.isEmpty()){\n\n \t\ttemp = s.peek();\n \t\tx = temp.getRow();\n \t\ty = temp.getCol();\n \t\tdir_mtr[x][y]+=1;\n\n \t\tif(temp.toString().equals(exit.toString())){\n \t\t\tSystem.out.println(\"find the path\");\n \t\t\tbreak;\n\n \t\t}\n\n \t\tif(dir_mtr[x][y]==0){ \n \t\t\t//checking the up direction\n \t\t\tif(x-1>=0 && !maze.isWall(x-1,y) && !visited[x-1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x-1,y,maze.isWall(x-1,y));\n \t\t\t\tvisited[x-1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==1){\n \t\t\t//checking the left direction\n \t\t\tif(y-1>=0 && !maze.isWall(x,y-1) && !visited[x][y-1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y-1,maze.isWall(x,y-1));\n \t\t\t\tvisited[x][y-1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==2){\n \t\t\t//checking the down direction\n \t\t\tif(x+1<m && !maze.isWall(x+1,y) && !visited[x+1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x+1,y,maze.isWall(x+1,y));\n \t\t\t\tvisited[x+1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else if(dir_mtr[x][y]==3){\n \t\t\t//checking the right direction\n \t\t\tif(y+1<n && !maze.isWall(x,y+1) && !visited[x][y+1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y+1,maze.isWall(x,y+1));\n \t\t\t\tvisited[x][y+1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else{\n \t\t\tvisited[x][y] = false;\n \t\t\ts.pop();\n \t\t}\n\n\n\n \t\t\n \t}\n\n \t//reverse the stack\n \tStack<MazeLocation> reverse;\n \treverse = new StackRefBased<MazeLocation>();\n \twhile(!s.isEmpty()){\n\t\t\t reverse.push(s.pop()); \t//push the node to the reverse stack\n\t\t\t }\n\n\n \t//if the stack is not empty, then we find the path\n\t\tif(!reverse.isEmpty()){\n\t\t\tresult = reverse.toString();\n\n\t\t}\n\n \t\n \n\n\t\t}\n\t\tcatch (StackEmptyException see) {\n \n }\n\n\n \treturn result;\n\n\n }", "private Stack path(Graph graph, GraphNode start, GraphNode end) throws GraphException {\n\t\tGraph g = graph;\n\t\tGraphNode b = start;\n\t\tGraphNode e = end;\n\t\tGraphNode temp;\n\t\tStack p;\n\n\t\t// mark the beginning point and push it to the stack.\n\t\tb.setMark(true);\n\t\tedgeStack.push(b);\n\n\t\t// check if the starting and end point are equal.\n\t\tif (b == e) {\n\t\t\treturn edgeStack;\n\t\t}\n\t\t// iterates until it reaches the end point\n\t\telse {\n\t\t\t// initializes edges to the edges incident on node b\n\t\t\tIterator<GraphEdge> edges = graph.incidentEdges(b);\n\n\t\t\t// iterates until it reaches the end of nodes\n\t\t\twhile (edges.hasNext()) {\n\t\t\t\ttemp = edges.next().secondEndpoint();\n\n\t\t\t\t// checks if the second point of the edge has been discovered\n\t\t\t\tif (temp.getMark() == false ) {\n\t\t\t\t\tp = path(g, temp, e);\n\n\t\t\t\t\t// if the path ends return null\n\t\t\t\t\tif (p != null) {\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tedgeStack.pop();\n\t\t}\n\t\treturn null;\n\t}", "private void computeAllPaths()\n {\n for (Station src : this.graph.stations)\n {\n List<Station> visited = new ArrayList<Station>();\n computePathsForNode(src, null, null, visited);\n }\n Print.printTripList(this.tripList);\n }", "void backtrackTree(StringBuilder sequence1, StringBuilder sequence2, int position) {\n int n = table[0].length;\n if (position == 0) {\n results.add(new StringBuilder[]{new StringBuilder(sequence1), new StringBuilder(sequence2)});\n }\n else {\n List<Integer> listOfParents = parents.get(position);\n for (Integer parent: listOfParents) {\n if (parent == northWest(position)) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append(seq2.charAt(seq2position(position)));\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent / n == position / n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append('_');\n newSeq2.append(seq2.charAt(seq2position(position)));\n position--;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent % n == position % n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append('_');\n position = position - n;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n }\n }\n }", "private LinkedList<Node> aStarPath() throws PathNotFoundException {\n\n // Set of nodes already evaluated\n List<Node> closedSet = new ArrayList<Node>();\n\n // Set of nodes visited, but not evaluated\n List<Node> openSet = new ArrayList<Node>();\n openSet.add(start);\n\n\n // Map of node with shortest path leading to it\n Map<Node, Node> cameFrom = new HashMap<>();\n\n // Map of cost of navigating from start to node\n Map<Node, Double> costFromStart = new HashMap<>();\n costFromStart.put(start, 0.0);\n\n // Map of cost of navigating path from start to end through node\n Map<Node, Double> costThrough = new HashMap<>();\n costThrough.put(start, heuristic(start, end));\n\n while (!openSet.isEmpty()){\n\n Node current = lowestCostThrough(openSet, costThrough);\n\n if(current.equals(end)){\n return reconstructPath(cameFrom, current);\n }\n\n openSet.remove(current);\n closedSet.add(current);\n\n for(Node neighbor: current.getNodes()) {\n if (closedSet.contains(neighbor)) {\n continue;\n }\n\n double tentativeCost = costFromStart.get(current) + distanceBetween(current, neighbor);\n\n if (!openSet.contains(neighbor)) { // found new neighbor\n openSet.add(neighbor);\n } else if (tentativeCost >= costFromStart.get(neighbor)) { // not a better path\n continue;\n }\n\n cameFrom.put(neighbor, current);\n costFromStart.put(neighbor, tentativeCost);\n costThrough.put(neighbor, tentativeCost + heuristic(neighbor, end));\n\n }\n }\n // no path\n throw pathNotFound;\n }", "private void path(Node s, Node d, HashSet<Node> visited, List<Node> currentPath, List<List<Node>> paths) {\n\t\tvisited.add(s);\n\t\tcurrentPath.add(s);\n\t\t\n\t\tif(s.value == d.value) {\n\t\t\tpaths.add(currentPath);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t* A list of nodes accessible from the current node, both parents and children\n\t\t* */\n\t\tList<Node> proximity = new ArrayList<>();\n\t\t\n\t\tif(s.children != null)\n\t\t\tfor(Node child : s.children) {\n\t\t\t\tif(!visited.contains(child))\n\t\t\t\t\tproximity.add(child);\n\t\t\t}\n\t\t\n\t\tif(s.parents != null)\n\t\t\tfor(Node parent : s.parents) {\n\t\t\t\tif(!visited.contains(parent)) \n\t\t\t\t\tproximity.add(parent);\n\t\t\t}\n\n /*\n * Explore each possible path\n * */\n\t\tfor(Node neighbour : proximity) {\n\t\t\tArrayList<Node> newPath = new ArrayList<>(currentPath);\n\t\t\tpath(neighbour, d, visited, newPath, paths);\n\t\t}\n\t}", "public HashMap<Integer, Integer> findAugumentPath() {\n if (debug == 1) printFree();\n HashMap<Integer, Integer> Path = new HashMap<>();\n if (V1.isEmpty() || V2.isEmpty()) {\n if (debug == 1) System.out.println(\"V1||V2 is empty\");\n return Path;\n }\n\n GM.clearAllEdge();\n for (int i = 0; i < x.length; i++) {\n for (int j : x[i].getDomain()) {\n GM.addEdge(i, Map.get(j));\n }\n }\n GM.adjList[X].clear();\n for (int i : V1) {\n GM.addEdge(X, i);\n }\n for (int i = 0; i < x.length; i++) {\n if (MaxMatch[i] != 0) GM.addEdge(MaxMatch[i], i);\n }\n if (debug == 1) System.out.println(GM);\n\n // DFS từ X. Gặp 1 đỉnh thuộc V2 thì break\n boolean[] visited = new boolean[nbOfVertex + 10];\n int[] prev = new int[nbOfVertex + 10];\n prev[X] = -1;\n int last = -1;\n\n Stack<Integer> S = new Stack<>();\n S.push(X);\n while (!S.isEmpty() && last == -1) {\n int top = S.pop();\n //System.out.println(\"Popped \" + top);\n if (!visited[top]) {\n visited[top] = true;\n for (int next : GM.adjList[top])\n if (!visited[next]) {\n prev[next] = top;\n if (V2.contains(next)) {\n last = next;\n //System.out.println(\"Here \" + next);\n break;\n }\n S.push(next);\n //System.out.println(\"Pushed \" + next);\n }\n }\n }\n if (last == -1) {\n //System.out.println(\"Cant find any augument path\\n\");\n } else {\n //System.out.println(\"Constructing augument path\");\n //int step = 0;\n while (last != -1) {\n int from = prev[last];\n if (from == X) break;\n Path.put(from, last);\n ////System.out.println(Math.min(from, last) + \" --> \" + Math.max(from, last));\n last = from;\n //step++;\n //if(step>10) break;\n }\n if (debug == 1) System.out.println(\"Construct augument path completed \" + Path.size());\n if (debug == 1) printCurrentAugumentPath(Path);\n }\n //System.out.println(Path.size());\n return Path;\n }", "public ArrayList<Vertex> findPath() {\n \n //if we've already been through findPath, then just return it\n if (solutionCalculated) {\n return solution;\n }\n \n //instantiate path\n solution = new ArrayList<Vertex>();\n \n //create boolean array of visited nodes (default: false)\n boolean[] visited = new boolean[arrayOfVertices.length];\n \n //(for testing)\n NavigateMaze.drawMaze(getVertices());\n \n //call dfs\n dfs(visited, arrayOfVertices[0], \n arrayOfVertices[arrayOfVertices.length - 1]);\n \n //update solutionCalculated to true\n solutionCalculated = true;\n \n //return solution\n return solution;\n \n }", "public static Set<ARGState> getAllStatesOnPathsTo(ARGState pLastElement) {\n\n Set<ARGState> result = new HashSet<ARGState>();\n Deque<ARGState> waitList = new ArrayDeque<ARGState>();\n\n result.add(pLastElement);\n waitList.add(pLastElement);\n\n while (!waitList.isEmpty()) {\n ARGState currentElement = waitList.poll();\n for (ARGState parent : currentElement.getParents()) {\n if (result.add(parent)) {\n waitList.push(parent);\n }\n }\n }\n\n return result;\n }", "public interface OnResultPath {\n // Reports which nodes have been added to the frontier or removed from the frontier\n void reportProgress(List<Node> update);\n\n // Called when a path finding algorithm is finished running, should return null if no path is found\n void pathFound(Node node);\n}", "public java.util.ArrayList<TreeNode<E>> path(E e) {\n java.util.ArrayList<TreeNode<E>> list\n = new java.util.ArrayList<TreeNode<E>>();\n TreeNode<E> current = root; // Start from the root\n while (current != null) {\n list.add(current); // Add the node to the list\n if (e.compareTo(current.element) < 0) {\n current = current.left;\n } else if (e.compareTo(current.element) > 0) {\n current = current.right;\n } else {\n break;\n }\n }\n return list; // Return an array of nodes\n }", "public List<Long> getPath(Long start, Long finish){\n \n \n List<Long> res = new ArrayList<>();\n // auxiliary list\n List<DeixtraObj> serving = new ArrayList<>();\n// nearest vertexes map \n Map<Long,DeixtraObj> optimMap = new HashMap<>();\n// thread save reading \n synchronized (vertexes){ \n // preparation\n for (Map.Entry<Long, Vertex> entry : vertexes.entrySet()) {\n Vertex userVertex = entry.getValue();\n // If it`s start vertex weight = 0 and the nereast vertex is itself \n if(userVertex.getID().equals(start)){\n serving.add(new DeixtraObj(start, 0.0, start));\n }else{\n // For other vertex weight = infinity and the nereast vertex is unknown \n serving.add(new DeixtraObj(userVertex.getID(), Double.MAX_VALUE, null));\n }\n\n } \n // why auxiliary is not empty \n while(serving.size()>0 ){\n // sort auxiliary by weight \n Collections.sort(serving);\n\n \n // remove shortes fom auxiliary and put in to answer \n DeixtraObj minObj = serving.remove(0);\n optimMap.put(minObj.getID(), minObj);\n\n Vertex minVertex = vertexes.get(minObj.getID());\n\n // get all edges from nearest \n for (Map.Entry<Long, Edge> entry : minVertex.allEdges().entrySet()) {\n Long dest = entry.getKey();\n Double wieght = entry.getValue().getWeight();\n // by all remain vertexes \n for(DeixtraObj dx : serving){\n if(dx.getID().equals(dest)){\n // if in checking vertex weight more then nearest vertex weight plus path to cheking \n // then change in checking weight and nearest\n if( (minObj.getWeight()+wieght) < dx.getWeight()){\n dx.setNearest(minVertex.getID());\n dx.setWeight((minObj.getWeight()+wieght));\n }\n }\n }\n }\n\n }\n }\n \n // create output list\n res.add(finish);\n Long point = finish;\n while(!point.equals(start)){\n \n point = ((DeixtraObj)optimMap.get(point)).getNearest();\n res.add(point);\n }\n \n Collections.reverse(res);\n \n \n return res;\n \n }", "@SuppressWarnings({\"rawtypes\", \"unchecked\", \"SuspiciousMethodCalls\"})\n private List getDepthFirstTraversal_iterative_usingStack_BigO_VPlusE() throws Exception {\n Map<Object, Boolean> visited = new LinkedHashMap<>();\n Stack watchStack = new Stack();\n\n V root = data.keySet().stream().findFirst().orElseThrow(() -> new Exception(\"Graph is Empty\"));\n watchStack.push(root);\n visited.put(root, true);\n\n while(!watchStack.isEmpty()) {\n Object currentVertex = watchStack.top();\n\n BinarySearchTree<E> edgeTree = data.getOrDefault(currentVertex, new BinarySearchTree<>());\n List<E> edges = edgeTree.getTreeByInOrder_depthFirst();\n\n //Remove an item from the stack when there are no edges or all the edges are visited for that vertex\n if(edgeTree.isEmpty() || visited.keySet().containsAll(edges)) {\n watchStack.pop();\n } else {\n for(E edge : edges) {\n if(!visited.containsKey(edge)) {\n watchStack.push(edge);\n visited.put(edge, true);\n break;\n }\n }\n }\n }\n return new ArrayList<>(visited.keySet());\n }", "private SchedulePaths calculateAllPaths(final SchedulePaths schedulePaths, final Set<Edge> path,\n final Operation operation) {\n\n final Set<Edge> parentEdges;\n if (operation instanceof EndVertex) {\n parentEdges = ((EndVertex) operation).getEndParentEdges();\n } else {\n parentEdges = operation.getParentEdges();\n }\n\n LOG.trace(\"Checking operation J: {}, M: {}\", operation.getJob(), operation.getMachine());\n LOG.trace(\"Number of parent edges: {}\", parentEdges.size());\n\n //Runs while not root operation\n if (!parentEdges.isEmpty()) {\n\n //Gets maximum edge size\n Integer maxEdge = 0;\n for (final Edge edge : parentEdges) {\n\n if (path.contains(edge)) {\n LOG.trace(\"Detected loop\");\n LOG.trace(\"Loop parent: {}\\n From path: {}\", edge.toString(), path.toString());\n schedulePaths.setIsFeasible(false);\n schedulePaths.setNodeCausingCycle(edge);\n\n return schedulePaths;\n }\n\n LOG.trace(\"Parent of operation: J:{} M:{}\", edge.getOperationFrom().getJob(), edge.getOperationFrom()\n .getMachine());\n if (edge.getMaxDistanceToMe() > maxEdge) {\n maxEdge = edge.getMaxDistanceToMe();\n }\n }\n\n LOG.trace(\"Maximum edge is {}\", maxEdge);\n\n Set<Edge> pathCopy = null;\n boolean firstEdge = true;\n for (final Edge edge : parentEdges) {\n\n if (Objects.equals(edge.getMaxDistanceToMe(), maxEdge)) {\n\n LOG.trace(\"Edge: {} maxd: {}\", edge, edge.getMaxDistanceToMe());\n\n if (firstEdge) {\n\n pathCopy = new LinkedHashSet<>(path);\n\n path.add(edge);\n LOG.trace(\"Adding edge: {}\", edge);\n firstEdge = false;\n calculateAllPaths(schedulePaths, path, edge.getOperationFrom());\n } else {\n\n final Set<Edge> newPath = new LinkedHashSet<>(pathCopy);\n LOG.trace(\"Creating new path, copying: {}\", pathCopy);\n\n newPath.add(edge);\n LOG.trace(\"New Path copy, adding edge: {}\", edge);\n calculateAllPaths(schedulePaths, newPath, edge.getOperationFrom());\n }\n }\n }\n } else {\n\n LOG.trace(\"Added new path to path set.\");\n schedulePaths.addPath(path);\n }\n\n return schedulePaths;\n }", "public List<Edge> breadthFirstTraverse(String v) {\n int start = indexOf(v);\n if (start == -1) return new LinkedList<>();\n\n List<Edge> path = new LinkedList<>();\n Queue<Integer> queue = new Queue<>();\n boolean[] visited = new boolean[vertexes.length];\n\n queue.enQueue(start);\n while(!queue.isEmpty()) {\n start = queue.deQueue();\n visited[start] = true;\n\n for (int i: this.heads[start]) {\n if (!visited[i]) { // not visited yet\n visited[i] = true;\n path.add(new Edge(start, i));\n\n queue.enQueue(i); // add to the queue for the next loop\n }\n }\n }\n\n return path;\n }", "private List<Edge<String>> getPath(Vertex<String> end,\n Vertex<String> start) {\n if (graph.label(end) != null) {\n List<Edge<String>> path = new ArrayList<>();\n\n Vertex<String> cur = end;\n Edge<String> road;\n while (cur != start) {\n road = (Edge<String>) graph.label(cur); // unchecked cast ok\n path.add(road);\n cur = graph.from(road);\n }\n return path;\n }\n return null;\n }", "public static ConnectionMap backtrack(final ConnectionMap map, int index) {\r\n\t\t// Returns null if first variable has no possible values\r\n\t\tif (map.domains.get(0).size()==0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// If the possible values for the index are null step back\r\n\t\tif (map.domains.get(index).size()==0) {\r\n\t\t\t//System.out.println(\"BACKTRACK!\");\r\n\t\t\tArrayList<Integer> newRow = new ArrayList<Integer>();\r\n\t\t\tfor (int k = 0; k < map.numColors; k++) {\r\n\t\t\t\tnewRow.add(k);\r\n\t\t\t}\r\n\t\t\tmap.domains.set(index, newRow);\r\n\t\t\tmap.domains.get(index-1).remove(0);\r\n\t\t\tBacktrackSearch.backtrack(map, index-1);\r\n\t\t}\r\n\t\t// Loops through the possible values for the index\r\n\t\tfor (int j=index; j>=0; j--) {\r\n\t\t\tif(map.connections[index][j]==1 && map.domains.get(index).size()>0) {\r\n\t\t\t\tArrayList<Integer> neighbor = map.domains.get(j);\r\n\t\t\t\tif (neighbor.size() != 0) {\r\n\t\t\t\t\tmap.domains.get(index).remove(neighbor.get(0));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If the possible values for the index are null step back\r\n\t\t\tif (map.domains.get(index).size()==0) {\r\n\t\t\t\t//System.out.println(\"BACKTRACK!\");\r\n\t\t\t\tArrayList<Integer> newRow = new ArrayList<Integer>();\r\n\t\t\t\tfor (int k = 0; k < map.numColors; k++) {\r\n\t\t\t\t\tnewRow.add(k);\r\n\t\t\t\t}\r\n\t\t\t\tmap.domains.set(index, newRow);\r\n\t\t\t\tmap.domains.get(index-1).remove(0);\r\n\t\t\t\tBacktrackSearch.backtrack(map, index-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// If the index is not the last index step forward\r\n\t\tif (index < map.domains.size()-1) {\r\n\t\t\tBacktrackSearch.backtrack(map, index+1);\r\n\t\t}\r\n\t\t// Returns null if first variable has no possible values\r\n\t\tif (map.domains.get(0).size()==0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Removes end of colors\r\n\t\tfor(int i = 0; i < map.domains.size(); i++) {\r\n\t\t\tfor(int j = 1; j < map.domains.get(i).size(); j++) {\r\n\t\t\t\tmap.domains.get(i).remove(j);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Returns map\r\n\t\treturn map;\t\r\n\t}", "private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}", "private static void iddfs(State curr, int depth) {\n for(int i = 0; i <= depth; i++) {\r\n\r\n if(curr.isGoalState()) \r\n System.out.println(i+\":\"+curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(i+\":\"+curr.getOrderedPair());//initial\r\n\r\n curr.close.add(curr);\r\n State currState = curr;\r\n while(!currState.isGoalState()) {\r\n if(currState.depth < i)\r\n curr.buildStack(currState.getSuccessors(currState));\r\n System.out.print(i+\":\");\r\n curr.printHelp(currState, 5);\r\n if(!curr.open.isEmpty()) {\r\n currState = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n if(currState.isGoalState()) {\r\n System.out.println(i+\":\"+currState.getOrderedPair() + \" Goal\");\r\n curr.printPath(currState);\r\n return;\r\n }\r\n curr.open.clear(); curr.close.clear();\r\n }\r\n }", "protected Stack<Node> constructPath(Node node) {\r\n Stack path = new Stack();\r\n\r\n while (node.parent_node_in_path != null) {\r\n path.push(node);\r\n node = node.parent_node_in_path;\r\n cost++;\r\n }\r\n\r\n return path;\r\n }" ]
[ "0.6337691", "0.6303008", "0.6248317", "0.61900675", "0.6102456", "0.60562104", "0.60041887", "0.59904873", "0.5971711", "0.59657764", "0.5938456", "0.59190875", "0.5907288", "0.5895066", "0.58878934", "0.5863186", "0.58440727", "0.5822726", "0.58129174", "0.57723117", "0.57687724", "0.57653886", "0.5763675", "0.5756966", "0.5749291", "0.57402104", "0.57206196", "0.5703654", "0.5671505", "0.5668865", "0.56542575", "0.56261075", "0.5612281", "0.56084645", "0.55952847", "0.55938154", "0.5582198", "0.5581455", "0.5580459", "0.5569991", "0.55687124", "0.5562743", "0.5557522", "0.55471253", "0.55445135", "0.554067", "0.552199", "0.5511992", "0.5510592", "0.5507086", "0.5492709", "0.54843056", "0.54680514", "0.54663587", "0.5464437", "0.54631126", "0.5462211", "0.5454469", "0.5446689", "0.5444445", "0.54437107", "0.5438026", "0.54336655", "0.54293436", "0.5425218", "0.54219425", "0.54198754", "0.541808", "0.54173726", "0.54152095", "0.54088956", "0.5402635", "0.53900635", "0.5372163", "0.5363501", "0.53584737", "0.5355108", "0.5352134", "0.5337175", "0.53356916", "0.5331935", "0.5330564", "0.5325647", "0.53231555", "0.53221935", "0.5318601", "0.53157747", "0.5314936", "0.53139573", "0.5313104", "0.53112906", "0.5306311", "0.5304221", "0.5291537", "0.52867115", "0.5284959", "0.5284027", "0.52832574", "0.528221", "0.5280125", "0.527686" ]
0.0
-1
Gets min distance from a node to all other nodes, and stores it in nodeDistances Key = node, value = min distance Also stores amount of nodes at each distance in distances Key = distance, value = amount of nodes O(n + e) = O(nodes + edges) it's a BFS
private void getMinDistances(String u, HashMap<Integer, Integer> distances, HashMap<String, Integer> nodeDistances){ if(!graphVertexHashMap.containsKey(u)) return; Queue<String> queue = new LinkedList<>(); HashMap<String, Boolean> visited = new HashMap<>(); queue.add(u); visited.put(u, true); int dist = 0; distances.put(dist, 1); nodeDistances.put(u, 0); while(!queue.isEmpty()){ String node = queue.poll(); dist += 1; boolean found = false; for(String edge : graphVertexHashMap.get(node).getOutDegrees().keySet()){ if(!visited.containsKey(edge)){ found = true; visited.put(edge, true); queue.add(edge); if(distances.get(dist) == null){ distances.put(dist, 1); } else{ distances.put(dist, distances.get(dist) + 1); } if(nodeDistances.containsKey(edge)){ if(dist < nodeDistances.get(edge)){ nodeDistances.put(edge, dist); } }else{ nodeDistances.put(edge, dist); } } } if(!found) dist -=1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node<Integer> minDistance(Map<Node<Integer>, Double> distances, Map<Node<Integer>, Double> unvisitedNodes) {\n Double min = Double.POSITIVE_INFINITY;\n\n Node<Integer> minNode = null;\n for (Map.Entry<Node<Integer>, Double> entry : distances.entrySet()) {\n Double d = entry.getValue();\n if (Double.compare(d, min) < 0 && unvisitedNodes.containsKey(entry.getKey())) {\n min = d;\n minNode = entry.getKey();\n }\n }\n return minNode;\n }", "private int bfs(int startNode, Map<Integer, List<Integer>> adjacencyList, int[] distanceToNode) {\n int furthestNode = 1;\n int furthestDistance = Integer.MIN_VALUE;\n\n Queue<Integer> queue = new LinkedList<>();\n Arrays.fill(distanceToNode, -1);\n\n // Put start node in queue\n queue.add(startNode);\n // Set distance of the first node to 0 (0 edge to itself)\n distanceToNode[startNode - 1] = 0;\n\n // While queue is not empty\n while (!queue.isEmpty()) {\n // Pop node\n int curNode = queue.remove();\n\n // Iterate through node's neighbours\n for (int neighbour : adjacencyList.get(curNode)) {\n // If neighbour is not visited (distance not -1)\n if (distanceToNode[neighbour - 1] == -1) {\n // Calculate distance by taking curNode distance and add 1\n // Update distance in array as a way of marking it as visited\n distanceToNode[neighbour - 1] = distanceToNode[curNode - 1] + 1;\n\n // Add to queue to process next\n queue.add(neighbour);\n\n // If the distance is bigger than current furthest one, update\n if (distanceToNode[neighbour - 1] > furthestDistance)\n furthestNode = neighbour;\n }\n }\n }\n return furthestNode;\n }", "public int minCost(int[][] distance) {\n Map<Index, Integer> minCostDP = new HashMap<>();\n Map<Index, Integer> parent = new HashMap<>();\n\n List<Set<Integer>> allSets;\n\n for (Set<Integer> set : allSets) {\n for (int currentVertex = 1; currentVertex < distance.length; currentVertex++) {\n if (set.contains(currentVertex)) continue;\n Index index = Index.createIndex(currentVertex,set);\n int minCost = Integer.MAX_VALUE;\n int minPrevVertex = 0;\n\n Set<Integer> copySet = new HashSet<>();\n for (int prevVertex : set) {\n int cost = distance[prevVertex][currentVertex] + getCost(copySet, prevVertex, minCostDP);\n }\n }\n }\n }", "private static void disjkstraAlgorithm(Node sourceNode, GraphBuilder graph){\n PriorityQueue<Node> smallestDisQueue = new PriorityQueue<>(graph.nodeArr.size(), new Comparator<Node>() {\n @Override\n public int compare(Node first, Node sec) {\n if(first.distance == Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return 0;\n }\n else if(first.distance == Integer.MAX_VALUE && sec.distance != Integer.MAX_VALUE){\n return 1;\n } else if(first.distance != Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return -1;\n }\n else\n return (int) (first.distance - sec.distance);\n }\n });\n\n smallestDisQueue.add(sourceNode); //add the node to the queue\n\n // until all vertices are know get the vertex with smallest distance\n\n while(!smallestDisQueue.isEmpty()) {\n\n Node currNode = smallestDisQueue.poll();\n// System.out.println(\"Curr: \");\n// System.out.println(currNode);\n if(currNode.known)\n continue; //do nothing if the currNode is known\n\n currNode.known = true; // otherwise, set it to be known\n\n for(Edge connectedEdge : currNode.connectingEdges){\n Node nextNode = connectedEdge.head;\n if(!nextNode.known){ // Visit all neighbors that are unknown\n\n long weight = connectedEdge.weight;\n if(currNode.distance == Integer.MAX_VALUE){\n continue;\n }\n else if(nextNode.distance == Integer.MAX_VALUE && currNode.distance == Integer.MAX_VALUE) {\n continue;\n }\n\n else if(nextNode.distance> weight + currNode.distance){//Update their distance and path variable\n smallestDisQueue.remove(nextNode); //remove it from the queue\n nextNode.distance = weight + currNode.distance;\n\n smallestDisQueue.add(nextNode); //add it again to the queue\n nextNode.pathFromSouce = currNode;\n\n// System.out.println(\"Next: \");\n// System.out.println(nextNode);\n }\n }\n }\n// System.out.println(\"/////////////\");\n }\n }", "public Map<Node<T>, Cost> dijkstra(T start) throws NodeNotFoundException {\n Node<T> origin = findNode(start);\n Map<Node<T>, Cost> costs = new HashMap<>();\n List<Node<T>> alreadyVisited = new ArrayList<>();\n\n // Step 1 : Initialization\n // Set every cost to infinity, except for the starting summit which is set to 0\n for(Node<T> node : getNodes()) {\n if(origin.equals(node)) { costs.put(node, new Cost(0.0)); }\n else { costs.put(node, new Cost()); }\n }\n\n while(ArrayMethods.similarity(getNodes(), alreadyVisited) != order()) {\n // Step 2 : Taking the node with the smallest cost\n Node<T> reference = Cost.findMin(costs, alreadyVisited);\n\n // Step 3 : Updating the table with the costs from that node\n for(WeightedLink link : findLinks(reference.getData())) {\n Node<T> other = (Node<T>) link.getOther(reference);\n Cost oldCost = costs.get(other);\n double old = oldCost.getCost();\n double cost = link.getWeight() + costs.get(reference).getCost();\n\n costs.put(other, (cost < old) ? new Cost(cost, reference) : oldCost);\n }\n\n // Step 4 : Repeat with the smallest costing summit that wasn't visited already\n alreadyVisited.add(reference);\n }\n\n return costs;\n }", "public void recordNodeDistances(Node start, Node end)\n {\n HashSet<Node> inStack = new HashSet<Node>();\n LinkedList<Node> nodeStack = new LinkedList<Node>();\n\n nodeStack.push(start);\n\n Node curNode;\n\n while(!nodeStack.isEmpty())\n {\n //shortest distance from end to start = shortest distance of neighbor to start\n curNode = nodeStack.peekFirst();\n Collection<? extends Node> neighbors = curNode.getNeighbors();\n\n if(curNode == end) //if we've reached the end\n {\n nodeDists.put(curNode, 0); //the distance to the end is 0 (obviously)\n\n inStack.remove(curNode); //remove from our store of nodes that are in the stack\n nodeStack.removeFirst();\n }\n else\n {\n boolean readyForEval = true; //is node ready to have the min distance calculated?\n\n for (Node n : neighbors)\n {\n if (!nodeDists.containsKey(n) && !inStack.contains(n))\n {\n nodeStack.addFirst(n); //in order to calculate the min distance to target any neighbors not in\n inStack.add(n); //the stack must have already been calculated. Neighbors still in the stack\n //are to be considered closer to the source and, thus, \"behind\" curNode\n readyForEval = false;\n }\n }\n\n if (readyForEval)\n {\n int minDist = getMinDist(curNode); //get the minimum distance from this node to the target\n\n nodeDists.put(curNode, minDist); //if unreachable, distance is maxValue\n nodeStack.removeFirst();\n inStack.remove(curNode);\n }\n }\n }\n }", "public void Djkstra(int source) {\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\tdist[i] = Integer.MAX_VALUE; // added infinity to all ,\n\t\t}\n\t\t\n\t\tdist[source] = 0;\n\n\t\t// add source vertex to priority queue\n\t\tq.add(new Node(source, 0));\n\n\n\t\t// while my all vertices are not selected as a min among smallest one time\n\t\t// refracted in visited\n\t\twhile (visited.size() != vertices) {\n\n\t\t\t// pick from priority queue the smallest/min distance\n\t\t\tint i = q.remove().node;\n\n\t\t\t// once node is removed from queue add to set\n\t\t\tvisited.add(i);\n\n\t\t\t// relax adjacent vertex of this node;\n\t\t\t// And add the new node to queue bcoz distance has got updated so add new node as i dont have any method to update \n\t\t\t// already present node and its distance\n\t\t\t\n\n\t\t\tfor (Node v : graph[i]) {\n\t\t\t\tif (!visited.contains(v.node)) {\n\t\t\t\t\tif (dist[i] + v.cost < dist[v.node]) {\n\t\t\t\t\t\tdist[v.node] = dist[i] + v.cost;\n\t\t\t\t\t\tq.add(new Node(v.node, dist[v.node]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public List<GeographicPoint> dijkstra(GeographicPoint start, \n\t\t\t\t\t\t\t\t\t\t GeographicPoint goal, Consumer<GeographicPoint> nodeSearched)\n\t{\n\t\t// TODO: Implement this method in WEEK 4\n\n\t\t// Hook for visualization. See writeup.\n\t\t//nodeSearched.accept(next.getLocation());\n\t\t\n\t\t//initialize distance of each MapNode from start to infinity\n\t\t\n\t\tSet<GeographicPoint> visited = new HashSet<GeographicPoint>();\n\t\tPriorityQueue<MapNode> queue = new PriorityQueue<MapNode>();\n\t\tHashMap<GeographicPoint, List<GeographicPoint>> path = new HashMap<GeographicPoint, List<GeographicPoint>>();\n\t\tint count = 0;\n\t\t\n\t\tif (!map.containsKey(start) || !map.containsKey(goal))\n\t\t\treturn null;\n\t\t\n\t\tfor (GeographicPoint temp : map.keySet())\n\t\t\tpath.put(temp, new ArrayList<GeographicPoint>());\n\t\t\n\t\tMapNode startNode = map.get(start);\n\t\tstartNode.setTimeToStart(0.0);\n\t\tstartNode.setDistanceToStart(0.0);\n\t\tqueue.add(startNode);\n\t\t\n\t\twhile (!queue.isEmpty()) {\n\t\t\tMapNode currNode = queue.poll();\n\t\t\tnodeSearched.accept(currNode.getLocation());\n\t\t\t\n\t\t\tif (!visited.contains(currNode.getLocation())) {\n\t\t\t\tvisited.add(currNode.getLocation());\n\t\t\t\tcount++;\n\t\t\t\t\n\t\t\t\tif (currNode.getLocation().equals(goal))\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tHashMap<MapEdge, GeographicPoint> neighbours = currNode.getNeighbours();\n\t\t\t\tfor (MapEdge edge : neighbours.keySet()) {\n\t\t\t\t\t\n\t\t\t\t\tif (!visited.contains(edge.getEnd())) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tMapNode addNode = map.get(neighbours.get(edge));\n\t\t\t\t\t\tdouble tempTime = currNode.getTimeToStart() + ((edge.getDistance())/(edge.getSpeedLimit()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tempTime < addNode.getTimeToStart()) {\n\t\t\t\t\t\t\taddNode.setTimeToStart(tempTime);\n\t\t\t\t\t\t\tqueue.add(addNode);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tList<GeographicPoint> temp = path.get(neighbours.get(edge));\n\t\t\t\t\t\t\ttemp.add(currNode.getLocation());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Dijkstra: \" + count);\n\t\treturn backTrack(path,goal);\n\t}", "@Override\r\n\tpublic void getMinimumSpanningTree(GraphStructure graph) {\r\n\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\tdistanceArray[0]=0;\r\n\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\tList<Edge> list;\r\n\t\twhile(spanningTreeSet.size()!=numberOfVertices) {\r\n\t\t\tfor (int vertex=0; vertex<numberOfVertices;vertex++) {\r\n\t\t\t\tif(! spanningTreeSet.contains(vertex)) {\r\n\t\t\t\t\tspanningTreeSet.add(vertex);\r\n\t\t\t\t\tlist = adjacencyList[vertex];\r\n\t\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[vertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"\\nvertex\\tdistance from source\");\r\n\t\tfor (int i=0;i<numberOfVertices;i++) {\r\n\t\t\tSystem.out.println(i+\"\\t\"+distanceArray[i]);\r\n\t\t}\r\n\t}", "@Override\n public Double calculateShortestPathFromSource(String from, String to) {\n Node source = graph.getNodeByName(from);\n Node destination = graph.getNodeByName(to);\n source.setDistance(0d);\n Set<Node> settledNodes = new HashSet<>();\n PriorityQueue<Node> unsettledNodes = new PriorityQueue<>(Comparator.comparing(Node::getDistance));\n unsettledNodes.add(source);\n while (unsettledNodes.size() != 0) {\n Node currentNode = unsettledNodes.poll();\n for (Map.Entry<Node, Double> adjacencyPair : currentNode.getAdjacentNodes().entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Double distance = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n calculateMinimumDistance(adjacentNode, distance, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return destination.getDistance() == Double.MAX_VALUE ? -9999d : destination.getDistance();\n }", "public int getMinDist(Node n)\n {\n int minNeighborDist = Integer.MAX_VALUE - 1;\n\n Collection<? extends Node> neighbors = n.getNeighbors();\n\n for (Node x : neighbors)\n {\n if (nodeDists.containsKey(x) && nodeDists.get(x) < minNeighborDist)\n {\n minNeighborDist = nodeDists.get(x);\n }\n }\n\n return minNeighborDist+1;\n }", "public List<Node> computeDijkstraShortestPath(Node source, Node destination) {\n\n source.minDistance = 0.;\n PriorityQueue<Node> nodeQueue = new PriorityQueue<Node>();\n nodeQueue.add(source);\n\n int destinationGroup = destination._groupID;\n\n while (!nodeQueue.isEmpty()) {\n Node v = nodeQueue.poll();\n\n Log.i(\"bbb\", \"In dijsk node name \"+ v._waypointName);\n //Stop searching when reach the destination node\n\n\n if(destinationGroup!=0){\n\n if(v._groupID==destinationGroup){\n destination = navigationGraph.get(navigationGraph.size()-1).nodesInSubgraph.get(v._waypointID);\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n break;\n }\n\n }\n\n if (v._waypointID.equals(destination._waypointID))\n break;\n\n\n // Visit each edge that is adjacent to v\n for (Edge e : v._edges) {\n Node a = e.target;\n Log.i(\"bbb\", \"node a \"+a._waypointName);\n double weight = e.weight;\n double distanceThroughU = v.minDistance + weight;\n if (distanceThroughU < a.minDistance) {\n nodeQueue.remove(a);\n a.minDistance = distanceThroughU;\n a.previous = v;\n Log.i(\"bbb\", \"set previous\");\n nodeQueue.add(a);\n }\n }\n }\n\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n return getShortestPathToDestination(destination);\n }", "private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }", "public static Graph dijkstra(Graph graph, Node source) {\n source.distance = 0;\n Set<Node> settledNodes = new HashSet<>();\n Set<Node> unsettledNodes = new HashSet<>();\n unsettledNodes.add(source);\n \n while (unsettledNodes.size() != 0) {\n Node currentNode = Graph.getLowestDistanceNode(unsettledNodes);\n unsettledNodes.remove(currentNode);\n for (Map.Entry<Node, Integer> adjacencyPair: \n currentNode.adjacentNodes.entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Integer edgeWeight = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n Graph.calculateMinimumDistance(adjacentNode, edgeWeight, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return graph;\n }", "private static void computePaths(Vertex source) {\n source.minDistance = 0;\n // retrieves with log(n) time\n PriorityQueue<Vertex> vertexPriorityQueue = new PriorityQueue<>();\n\n //BFS traversal\n vertexPriorityQueue.add(source);\n\n // O((v + e) * log(v))\n while (!vertexPriorityQueue.isEmpty()) {\n // this poll always returns the shortest distance vertex at log(v) time\n Vertex vertex = vertexPriorityQueue.poll();\n\n //visit each edge exiting vertex (adjacencies)\n for (Edge edgeInVertex : vertex.adjacencies) {\n // calculate new distance between edgeInVertex and target\n Vertex targetVertex = edgeInVertex.target;\n double edgeWeightForThisVertex = edgeInVertex.weight;\n double distanceThruVertex = vertex.minDistance + edgeWeightForThisVertex;\n if (distanceThruVertex < targetVertex.minDistance) {\n // modify the targetVertex with new calculated minDistance and previous vertex\n // by removing the old vertex and add new vertex with updates\n vertexPriorityQueue.remove(targetVertex);\n targetVertex.minDistance = distanceThruVertex;\n // update previous with the shortest distance vertex\n targetVertex.previous = vertex;\n vertexPriorityQueue.add(targetVertex);// adding takes log(v) time because needs to heapify\n }\n }\n }\n }", "private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is this doing here???\n if (neighbors.isEmpty()){\n \n }\n \n // looping through to find distances from start to neighbors\n for (T neighbor : neighbors){ \n int neighborIndex = vertexIndex(neighbor); \n int d = distances[currentIndex] + getEdgeWeight(current, neighbor);\n \n if (d < distances[neighborIndex]){ // if this distance is less than previous distance\n distances[neighborIndex] = d;\n closestPredecessor[neighborIndex] = current; // now closest predecessor is current\n }\n }\n \n if (current.equals(end)){\n atEnd = true;\n }\n else{\n // finding unvisited node that is closest to start node\n T min = getMinUnvisited();\n if (min != null){\n unvisited.remove(min); // remove minimum neighbor from unvisited\n visited.add(min); // add minimum neighbor to visited\n current = min;\n }\n }\n }\n computePath();\n totalDistance = distances[vertexIndex(end)];\n }", "@Override\n public List<node_data> shortestPath(int src, int dest) {\n reset();\n for (node_data node : G.getV()) {\n node.setWeight(Double.POSITIVE_INFINITY);\n }\n\n DWGraph_DS.Node currentNode = (DWGraph_DS.Node) G.getNode(src);\n currentNode.setWeight(0);\n PriorityQueue<node_data> unvisitedNodes = new PriorityQueue(G.nodeSize(), weightComperator);\n unvisitedNodes.addAll(G.getV());\n HashMap<Integer, node_data> parent = new HashMap<>();\n parent.put(src, null);\n\n while (currentNode.getWeight() != Double.POSITIVE_INFINITY) {\n if (G.getNode(dest).getTag() == 1) {\n break;\n }\n for (edge_data edge : G.getE(currentNode.getKey())) {\n DWGraph_DS.Node neighbor = (DWGraph_DS.Node) G.getNode(edge.getDest());\n double tmpWeight = currentNode.getWeight() + edge.getWeight();\n if (tmpWeight < neighbor.getWeight()) {\n neighbor.setWeight(tmpWeight);\n unvisitedNodes.remove(neighbor);\n unvisitedNodes.add(neighbor);\n parent.put(neighbor.getKey(), currentNode);\n }\n }\n currentNode.setTag(1);\n if(currentNode.getKey()==dest) break;\n unvisitedNodes.remove(currentNode);\n currentNode = (DWGraph_DS.Node) unvisitedNodes.poll();\n }\n /*\n Rebuild the path list\n */\n if (!parent.keySet().contains(dest)) return null;\n List<node_data> pathList = new ArrayList<>();\n currentNode = (DWGraph_DS.Node) G.getNode(dest);\n while (parent.get(currentNode.getKey()) != null) {\n pathList.add(currentNode);\n currentNode = (DWGraph_DS.Node) parent.get(currentNode.getKey());\n }\n Collections.reverse(pathList);\n return pathList;\n }", "void dijkstra(int strtval){\n PriorityQueue<Integer> pq = new PriorityQueue<>(new Comparator<Integer>(){\n @Override\n public int compare(Integer i1, Integer i2){\n Node n1 = dlist.get(i1);\n Node n2 = dlist.get(i2);\n return n1.getDist() > n2.getDist()?1 : n1.getDist() < n2.getDist()? -1:0;\n }\n });\n\n Node stnode = dlist.get(strtval);\n stnode.setval(strtval);\n stnode.setDist(0);\n seen.add(strtval);\n pq.add(strtval);\n while(!pq.isEmpty()){\n strtval = pq.poll();\n LinkedList<Node> alist = grp.getOrDefault(strtval, null);\n if(alist != null){\n for(Node node : alist){\n //see distance and then decide if needs to be added to qu is not seen.\n int nval = node.getval();\n int nweg = node.getDist();\n int ddist = dlist.get(nval).getDist();\n int odist = dlist.get(strtval).getDist();\n if(ddist > odist+nweg){\n dlist.get(nval).setval(strtval);\n dlist.get(nval).setDist(odist+nweg);\n }\n //if alerady seen do not cal the distance again.\n if(!seen.contains(nval)){\n seen.add(nval);\n pq.add(nval);\n }\n }\n }\n }\n //print here:\n for(int key: dlist.keySet()){\n System.out.println(key+\" dist:\"+dlist.get(key).getDist()+\" prev:\"+dlist.get(key).getval());\n }\n }", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tint[] prev = new int[dwg.nodeSize()];\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\tprev[src%dwg.nodeSize()] = -1;\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t\tprev[u.getKey()%dwg.nodeSize()] = v.getKey();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tList<node_data> ans = new ArrayList<node_data>();\n\t\tint run = dest;\n\t\twhile(run != src) {\n\t\t\tans.add(0,dwg.getNode(run));\n\t\t\trun = prev[run%dwg.nodeSize()];\n\t\t}\n\t\tans.add(0, dwg.getNode(src));\n\n\t\treturn ans;\n\t}", "private void findMinimalDistances(City sourceCity) {\n\t\tList<City> adjacentCities = getNeighbors(sourceCity);\r\n\r\n\t\tfor (City target : adjacentCities) {\r\n\t\t\t// Compare the newly calculated tentative transportation cost to the current\r\n\t\t\t// assigned value and assign the smaller one.\r\n\t\t\tif (getShortestDistance(target) > getShortestDistance(sourceCity) + getDistance(sourceCity, target)) {\r\n\t\t\t\tdistance.put(target, getShortestDistance(sourceCity) + getDistance(sourceCity, target));\r\n\t\t\t\t// saves info on what was the city you came from\r\n\t\t\t\tpredecessors.put(target, sourceCity);\r\n\t\t\t\t// add neighbors as unsettled\r\n\t\t\t\tunSettledCities.add(target);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public int findMinDistanceToFarthestNode(int vertices, int[][] edges) {\n Map<Integer, List<Integer>> adjacencyList = buildAdjacencyList(edges);\n\n // Create array to hold distance from specific node to other node\n int[] distanceToNode = new int[vertices];\n\n // First BFS from random node to find furthest node from it\n int firstFurthestNode = bfs(1, adjacencyList, distanceToNode);\n\n // Second BFS from the furthest node above to find the furthest node from it\n int secondFurthestNode = bfs(firstFurthestNode, adjacencyList, distanceToNode);\n\n // Find max distance (diameter) from the array above, populated after second bfs\n int graphDiameter = findGraphDiameter(distanceToNode);\n\n // Find max distance to furthest node\n if (graphDiameter % 2 == 0)\n return graphDiameter / 2;\n else\n return graphDiameter / 2 + 1;\n }", "private void calculateShortestRoute(String strSourceTerminal){\n\t\tshortestTravelTime = new HashMap<>();\n\n //stores parent of every terminal in shortest travel time\n parent = new HashMap<>();\n \n //heap + map data structure\n MinimumHeap<BaggageTerminal> minHeap = new MinimumHeap<>();\n\n //initialize all terminal with infinite distance from source terminal\n for(BaggageTerminal baggageTerminal : graph.getTerminals()){\n minHeap.add(Integer.MAX_VALUE, baggageTerminal);\n }\n \n BaggageTerminal sourceTerminal = graph.getTerminal(strSourceTerminal);\n \n //set distance of source terminal to itself 0\n minHeap.decrease(sourceTerminal, 0);\n\n //put it in map\n shortestTravelTime.put(sourceTerminal, 0);\n\n //source terminal parent is null\n parent.put(sourceTerminal, null);\n\n //iterate till heap is not empty\n while(!minHeap.empty()){\n //get the min value from heap node which has vertex and distance of that vertex from source vertex.\n MinimumHeap<BaggageTerminal>.Node heapNode = minHeap.extractMinNode();\n BaggageTerminal currentTerminal = heapNode.key;\n\n //update shortest distance of current vertex from source vertex\n shortestTravelTime.put(currentTerminal, heapNode.weight);\n\n //iterate through all connections of current terminal\n for(Connection connection : currentTerminal.getConnections()){\n\n //get the adjacent terminal\n BaggageTerminal adjacent = getConnectingTerminal(currentTerminal, connection);\n\n //if heap does not contain adjacent vertex means adjacent vertex already has shortest distance from source vertex\n if(!minHeap.containsData(adjacent)){\n continue;\n }\n\n //add distance of current vertex to edge weight to get distance of adjacent vertex from source vertex\n //when it goes through current vertex\n int newDistance = shortestTravelTime.get(currentTerminal) + connection.getWeight();\n\n //see if this above calculated distance is less than current distance stored for adjacent vertex from source vertex\n if(minHeap.getWeight(adjacent) > newDistance) {\n minHeap.decrease(adjacent, newDistance);\n parent.put(adjacent, currentTerminal);\n }\n }\n }\n return;\n }", "private List<Integer> findMinNodes() {\n\t\tint minLabel = Integer.MAX_VALUE;\n\t\tList<Integer> result = new ArrayList<Integer>();\n\n\t\tfor (int node = 0; node < vertices.length; node++) {\n\t\t\tint nodeLabel = connectivity[node][node];\n\t\t\tif (nodeLabel < minLabel) {\n\t\t\t\tresult.clear();\n\t\t\t\tresult.add(node);\n\t\t\t\tminLabel = nodeLabel;\n\t\t\t} else if (nodeLabel == minLabel) {\n\t\t\t\tresult.add(node);\n\t\t\t} else\n\t\t\t\tcontinue;\n\t\t}\n\t\treturn result;\n\t}", "private String findMin(Map<String, Node> nodeList)\n\t{\n\t\tint min = Integer.MAX_VALUE;\n\t\tString sommet = null;\n\t\t\n\t\tfor (String nodeName : nodeList.keySet()) {\n\t\t\tint distance = nodeList.get(nodeName).getDistanceFromOrigin();\n\n\t\t\tif(min > distance) {\n\t\t\t\tmin = distance;\n\t\t\t\tsommet = nodeName;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sommet;\n\t}", "private HashMap<String, Integer> getShortestPathBetweenDifferentNodes(Node start, Node end) {\n HashMap<Node, Node> parentChildMap = new HashMap<>();\n parentChildMap.put(start, null);\n\n // Shortest path between nodes\n HashMap<Node, Integer> shortestPathMap = new HashMap<>();\n\n for (Node node : getNodes()) {\n if (node == start)\n shortestPathMap.put(start, 0);\n else shortestPathMap.put(node, Integer.MAX_VALUE);\n }\n\n for (Edge edge : start.getEdges()) {\n shortestPathMap.put(edge.getDestination(), edge.getWeight());\n parentChildMap.put(edge.getDestination(), start);\n }\n\n while (true) {\n Node currentNode = closestUnvisitedNeighbour(shortestPathMap);\n\n if (currentNode == null) {\n return null;\n }\n\n // Save path to nearest unvisited node\n if (currentNode == end) {\n Node child = end;\n String path = end.getName();\n while (true) {\n Node parent = parentChildMap.get(child);\n if (parent == null) {\n break;\n }\n\n // Create path using previous(parent) and current(child) node\n path = parent.getName() + \"\" + path;\n child = parent;\n }\n HashMap<String,Integer> hm= new HashMap<>();\n hm.put(path, shortestPathMap.get(end));\n return hm;\n }\n currentNode.visit();\n\n // Go trough edges and find nearest\n for (Edge edge : currentNode.getEdges()) {\n if (edge.getDestination().isVisited())\n continue;\n\n if (shortestPathMap.get(currentNode) + edge.getWeight() < shortestPathMap.get(edge.getDestination())) {\n shortestPathMap.put(edge.getDestination(), shortestPathMap.get(currentNode) + edge.getWeight());\n parentChildMap.put(edge.getDestination(), currentNode);\n }\n }\n }\n }", "private Node closestUnvisitedNeighbour(HashMap <Node, Integer > shortestPathMap){\n int shortestDistance = Integer.MAX_VALUE;\n Node closestReachableNode = null;\n for (Node node : getNodes()) {\n if (node.isVisited())\n continue;\n\n int currentDistance = shortestPathMap.get(node);\n if (currentDistance == Integer.MAX_VALUE)\n continue;\n\n if (currentDistance < shortestDistance) {\n shortestDistance = currentDistance;\n closestReachableNode = node;\n }\n }\n return closestReachableNode;\n }", "private static int minTime(Map<Integer, Map<Integer, Integer>> graph, int s, int d) {\n //System.out.println(\"minTime: \" + s + \",\" + d);\n int min = Integer.MAX_VALUE;\n int[] minAr = new int[3];\n boolean found = false;\n LinkedList<Integer> queue = new LinkedList<>();\n HashSet<Integer> visited = new HashSet<>(graph.size());\n\n queue.add(s);\n visited.add(s);\n\n while (queue != null && queue.peek() != null) {\n int i = queue.poll();\n Map<Integer, Integer> map = graph.get(i);\n if(map!=null){\n for (Integer key : map.keySet()) {\n if (!visited.contains(key)) {\n queue.add(key);\n visited.add(key);\n\n if (min > map.get(key)) {\n min = map.get(key);\n minAr[0] = i;\n minAr[1] = key;\n minAr[2] = min;\n\n //System.out.println( \"minAr inside: \" + minAr[0] + \"-\"+ minAr[1] + \"-\" +minAr[2]);\n }\n\n if (key == d) {\n found = true;\n queue = null;\n break;\n\n }\n }\n }\n }\n }\n if (found) {\n //System.out.println(\"minAr: \" + minAr[0] + \"-\" + minAr[1] + \"-\" + minAr[2]);\n Map<Integer, Integer> map1 = graph.get(minAr[0]);\n map1.remove(minAr[1]);\n graph.put(minAr[0], map1);\n Map<Integer, Integer> map2 = graph.get(minAr[1]);\n map2.remove(minAr[0]);\n graph.put(minAr[1], map2);\n System.out.println(\"min : \" + min);\n\n min = (min == Integer.MAX_VALUE) ? 0 : min;\n } else {\n System.out.println(\"no connection\");\n min = 0;\n }\n return min;\n }", "public static Node getLowestDistanceNode(Set<Node> unsettledNodes) {\n Node lowestDistanceNode = null;\n int lowestDistance = Integer.MAX_VALUE;\n for (Node node: unsettledNodes) {\n int nodeDistance = node.distance;\n if (nodeDistance < lowestDistance) {\n lowestDistance = nodeDistance;\n lowestDistanceNode = node;\n }\n }\n return lowestDistanceNode;\n }", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tList<node_data> ans = new ArrayList<>();\n\t\tthis.shortestPathDist(src, dest);\n\t\tif(this.GA.getNode(src).getWeight() == Integer.MAX_VALUE || this.GA.getNode(dest).getWeight() == Integer.MAX_VALUE){\n\t\t\tSystem.out.print(\"There is not a path between the nodes.\");\n\t\t\treturn null;\n\t\t}\n\t\tgraph copied = this.copy();\n\t\ttransPose(copied);\n\t\tnode_data first = copied.getNode(dest);\n\t\tans.add(first);\n\t\twhile (first.getKey() != src) {\n\t\t\tCollection<edge_data> temp = copied.getE(first.getKey());\n\t\t\tdouble check= first.getWeight();\n\t\t\tif(temp!=null) {\n\t\t\t\tfor (edge_data edge : temp) {\n\t\t\t\t\tif (copied.getNode(edge.getDest()).getWeight() + edge.getWeight() == check) {\n\t\t\t\t\t\tfirst = copied.getNode(edge.getDest());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tans.add(first);\n\t\t}\n\t\tList<node_data> ans2 = new ArrayList<>();\n\t\tfor (int i = ans.size()-1;i>=0;i--){\n\t\t\tans2.add(ans.get(i));\n\t\t}\n\t\treturn ans2;\n\t}", "public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for (int goalNode = 0; goalNode < wordGraph.V(); goalNode++) {\n Iterable<Integer> shortestPath = bfs.pathTo(goalNode);\n int pathLength = -1;\n if (shortestPath != null) {\n for (int edge : shortestPath) {\n pathLength++;\n }\n }\n if (pathLength != -1) {\n }\n System.out.println(pathLength);\n }\n }\n }", "public static int minCostOfRoad(int n, ArrayList<ArrayList<Integer>> edges){\n Collections.sort(edges, new Comparator<ArrayList<Integer>>() { \n @Override\n public int compare(ArrayList<Integer> o1, ArrayList<Integer> o2) {\n return o1.get(2).compareTo(o2.get(2));\n } \n });\n //create a parent array and fill it with the self value\n int []parent = new int[n + 1];\n for(int i = 0;i <= n;i++){\n parent[i] = i;\n }\n\n ArrayList<ArrayList<Integer>> mst = new ArrayList<>();\n int minCost = 0;\n int i = 0;\n int countEdges = 0;\n //Pick the smallest edge. Check if it forms a cycle with the spanning tree formed so far. \n //If cycle is not formed, include this edge. Else, discard it.\n while(countEdges != n - 1){\n ArrayList<Integer>edge = edges.get(i);\n int source = edge.get(0);\n int dest = edge.get(1);\n int weight = edge.get(2);\n int sourceParent = findParent(source, parent);\n int destParent = findParent(dest, parent);\n if(sourceParent != destParent){\n mst.add(edge);\n countEdges++;\n minCost += weight;\n parent[sourceParent] = destParent;\n }\n i++;\n }\n return minCost;\n }", "public static int dijkstra(AdjList<String> adjList, String startNode, String endNode, LinkedList<String> pathList) {\n //Valid AdjList\n if (adjList == null || adjList.size() == 0 || adjList.hasNegativeEdges())\n return Integer.MAX_VALUE;\n\n //Checks if start and end nodes exist in adjList\n if (!adjList.contains(startNode) || !adjList.contains(endNode))\n return Integer.MAX_VALUE;\n\n //Checks if graph is suitable for BFS\n if (!adjList.isWeighted())\n return BFS(adjList, startNode, endNode, pathList);\n\n //Sets all node objects in adjList to defaults\n adjList.cleanNodeFields();\n\n //Fibonacci heap for storing current shortest path\n FibHeap<Integer, String> q = new FibHeap<>();\n\n //Set source node value to 0\n q.insert(adjList.getNode(startNode), 0);\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, String>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, String> neighbor, u;//Current Node with shortest path / top of min-queue\n int edgeWeight;\n while (q.size() != 0) {\n u = q.extractMin();\n u.closed = true;\n\n //endNode found\n if (Objects.equals(u.value, endNode)) {\n //Build path of vertexes\n Node<Integer, String> current = adjList.getNode(endNode);\n pathList.add(current.value);\n while ((current = current.prev) != null)\n pathList.addFirst(current.value);\n return u.d;\n }\n\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, String>, Integer> neighborKeyValuePair : neighbors) {//Loops through every neighbor\n neighbor = neighborKeyValuePair.getKey();\n edgeWeight = neighborKeyValuePair.getValue();\n //Relaxation step\n //Checks if distance to neighbor node is less than the min distance already found\n if (!neighbor.visited || neighbor.d > u.d + edgeWeight) {\n //Assign shorter path found to neighbor in out array\n neighbor.d = u.d + edgeWeight;\n\n //Assigns previous shortest node to neighbor\n neighbor.prev = u;\n\n //Inserts or decrease key\n if (!neighbor.visited) {\n q.insert(neighbor, u.d + edgeWeight);\n neighbor.visited = true;\n } else {\n q.decreaseKey(neighbor, u.d + edgeWeight);\n }\n }\n }\n }\n return Integer.MAX_VALUE;\n }", "private int bfs(String source, String destination, Map<String, List<String>> graph) {\n\n class Node {\n String word;\n int distance = 0;\n\n public Node(String word, int distance) {\n this.word = word;\n this.distance = distance;\n }\n }\n\n final Queue<Node> queue = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n queue.offer(new Node(source, 0)); //distance of source to source is 0\n visited.add(source);\n\n while (!queue.isEmpty()) {\n\n final Node node = queue.poll();\n final int distance = node.distance;\n\n //if we reached the destination node\n if (node.word.equals(destination)) {\n return distance + 1;\n }\n\n //try all word which is 1 weight away\n for (String neighbour : graph.getOrDefault(node.word, new ArrayList<>())) {\n if (!visited.contains(neighbour)) {\n visited.add(neighbour);\n queue.offer(new Node(neighbour, distance + 1));\n }\n }\n\n\n }\n return 0;\n }", "private void calculateShortestDistances (GraphStructure graph,int startVertex,int destinationVertex) {\r\n\t\t//traverseRecursively(graph, startVertex);\r\n\t\tif(pathList.contains(destinationVertex)) {\r\n\t\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\t\tdistanceArray[startVertex]=0;\r\n\t\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\t\tList<Edge> list;\r\n\t\t\tlist = graph.getAdjacencyList()[startVertex];\r\n\t\t\tif(startVertex==destinationVertex) {\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\tif(! isVisited[value.getVertex()]) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[startVertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\r\n\t\t\t\t\t\t\tshortestPathList.add(value.getVertex());\r\n\t\t\t\t\t\t\tcalculateShortestDistances(graph,value.getVertex(), distanceValueOfDestinationVertex);\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*for(Integer value : spanningTreeSet) {\r\n\t\t\t\tSystem.out.print(value+\" \");\r\n\t\t\t}*/\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No route is present between given vertices !\");\r\n\t\t}\r\n\t}", "@Override\n public List dijkstrasShortestPath(T start, T end) {\n Vertex<T> origin = new Vertex<>(start);\n Vertex<T> destination = new Vertex<>(end);\n List<Vertex<T>> path;\n\n settledNodes = new HashSet<>();\n unSettledNodes = new HashSet<>();\n distancesBetweenNodes = new HashMap<>();\n predecessors = new HashMap<>();\n\n distancesBetweenNodes.put(origin,0);\n unSettledNodes.add(origin);\n\n while(unSettledNodes.size() > 0){\n Vertex<T> minimumWeightedVertex = getMinimum(unSettledNodes);\n settledNodes.add(minimumWeightedVertex);\n unSettledNodes.remove(minimumWeightedVertex);\n findMinimumDistance(minimumWeightedVertex);\n }\n path = getPath(destination);\n return path;\n\n }", "public int minDistance(int distance[], Boolean span_tree[]) {\n\t\tint min_value=Integer.MAX_VALUE,min_node=-1;\n\t\tfor(int i=0;i<vertexs;i++) {\n\t\t\tif(span_tree[i]==false && distance[i]<=min_value) {\n\t\t\t\tmin_value=distance[i];\n\t\t\t\tmin_node=i;\n\t\t\t}\n\t\t}\n\t\treturn min_node;\n\t}", "private static void findShortestPath(ArrayList<WeightedEdge> edges, int start, int dest, int nNodes) {\n int costs[] = new int[nNodes];\n int parents[] = new int[nNodes];\n boolean doneWithNode[] = new boolean[nNodes];\n\n // cost[i] has the cost of getting to node number i or is UNKNOWN if no cost figure out yet.\n // parent[i] contains the parent (or the way) we got to node i.\n // done[i] is true if we've already worked on all the children of node i.\n\n // Initialize the arrays.\n for (int i = 0; i<nNodes; i++) {\n costs[i] = UNKNOWN;\n parents[i] = UNKNOWN;\n doneWithNode[i] = false;\n }\n\n int node = start; // This is the node we are working on. Let's start with start node.\n costs[node] = 0; // The cost of getting to the start node is 0!\n\n // While not done processing all the nodes...\n\n // Loop through all the edges (edges array list).\n // Skip those edges whose source is doesn't match the node we're working on.\n\n // For edge (that has source of current node) figure out potential to\n // get it. (How much does it cost to get to node we're on? Add to\n // that the cost of the edge. That's the new price to set to dest of edge.\n\n // Is that a new low cost for that dest edge node?\n // Or is the dest edge node cost currently UNKNOWN? That means we have no cost.\n // If so, store the cost. Store the parent.\n\n // Once done with all the edges, mark the current node as\n // done being processed.\n doneWithNode[node] = true;\n\n // Get next node to work on.\n node = getLowestCostUnprocessedNode(costs, doneWithNode);\n\n // Done with while loop\n\n for (int i=0; i<parents.length; i++) {\n System.out.println(\"Node: \" + i + \" Cost: \" + costs[i] + \" Backtrace Parent: \" + parents[i]);\n }\n\n backtrace(dest, parents);\n }", "private int[] shrtst_Path_Dijkstra_Algo(int[][] matrx, int sNode, int[] forward_tab_dist, int[] list_Prevoius_Nodes) \n\t{\n\t\tArrayList<Integer> visitedNodes_M = new ArrayList<>(); //3. set of visited vertices is initially empty\n\t\tArrayList<Integer> unvisitedNodes_Q = new ArrayList<>(); //4. the queue initially contains all vertices\n\t\t\n\t\t//1. Distance to source vertex = 0\n\t\tforward_tab_dist[sNode] = 0;\n\n\t\t//2. Initialize: Set all other distances to infinity\n\t\tint k=0;\n\t\twhile(k < matrx.length)\n\t\t{\n\t\t\tunvisitedNodes_Q.add(k);\n\t\t\tif(k != sNode)\n\t\t\t{\n\t\t\t\tforward_tab_dist[k] = INFINITE_DIST;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t\t\n\t\t//list of previous nodes, to traverse back\n\t\tlist_Prevoius_Nodes[sNode] = sNode;\n\t\t\n\t\t//5. While queue is not empty\n\t\twhile(!unvisitedNodes_Q.isEmpty())\n\t\t{\n\t\t\tint minDist = INFINITE_DIST;\n\t\t\tint u_minDistNode = -1;\n\t\t\t\n\t\t\t//6. select the element of Q with min distance\n\t\t\tint l = 0;\n\t\t\twhile(l < unvisitedNodes_Q.size())\n\t\t\t{\n\t\t\t\tint n = unvisitedNodes_Q.get(l);\n\t\t\t\tif(!(forward_tab_dist[n] <= minDist))\n\t\t\t\t{\n\t\t\t\t\tl++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tu_minDistNode = n;\n\t\t\t\t\tminDist = forward_tab_dist[n];\n\t\t\t\t}\n\t\t\t\tl++;\n\t\t\t}\n\t\t\t//No minimum distance node found then return\n\t\t\tif(u_minDistNode == -1)\n\t\t\t{\tbreak;\t}\n\t\t\t\n\t\t\t//7. add u to list of visited vertices\n\t\t\tvisitedNodes_M.add(u_minDistNode);\n\t\t\t\n\t\t\tint index = unvisitedNodes_Q.indexOf(u_minDistNode);\t//remove this node from unvisited nodes\n\t\t\tunvisitedNodes_Q.remove(index);\n\t\t\t\n\t\t\t//8.0 algo - consider neighbor as direct distance nodes except source\n\t\t\tfor(int v=0; v<matrx.length; v++)\n\t\t\t{\n\t\t\t\t//matrix[minDistNode_u][v] > 0 ensures it is not source node\n\t\t\t\t//unvisitedNodes_Q.contains(v) only check for unvisited nodes\n\t\t\t\t\n\t\t\t\tif(unvisitedNodes_Q.contains(v) && matrx[u_minDistNode][v] > 0)\n\t\t\t\t{\n\t\t\t\t\tint val = forward_tab_dist[u_minDistNode] + matrx[u_minDistNode][v];\n\t\t\t\t\tif(val < forward_tab_dist[v])\n\t\t\t\t\t{\n\t\t\t\t\t\t//stores shortest distance\n\t\t\t\t\t\tforward_tab_dist[v] = val;\n\t\t\t\t\t\t//stores last node for back traversal to find path\n\t\t\t\t\t\tlist_Prevoius_Nodes[v] = u_minDistNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn forward_tab_dist;\n\t}", "public double getMinimumDistance() { return minDistance; }", "public static void calculateMinimumDistance(Node evaluationNode, Integer edgeWeigh, Node sourceNode) {\n Integer sourceDistance = sourceNode.distance;\n if (sourceDistance + edgeWeigh < evaluationNode.distance) {\n evaluationNode.distance = sourceDistance + edgeWeigh;\n LinkedList<Node> shortestPath = new LinkedList<>(sourceNode.shortestPath);\n shortestPath.add(sourceNode);\n evaluationNode.shortestPath = shortestPath;\n }\n }", "public int doDijkstras(String startVertex, String endVertex, ArrayList<String> shortestPath)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSet<String> visited = new HashSet<String>();\r\n\t\t\r\n\t\tPriorityQueue<Vertex> minDist = new PriorityQueue<Vertex>();\r\n\t\t\r\n\t\tVertex firstV = new Vertex(startVertex,startVertex,0);\r\n\t\tminDist.add(firstV);\r\n\t\t\r\n\t\tfor(String V : this.adjacencyMap.get(startVertex).keySet())\r\n\t\t{\r\n\t\t\tminDist.add(new Vertex(V,startVertex,this.getCost(startVertex, V)));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//map of vertexName --> VertexObject\r\n\t\tHashMap<String, Vertex> mapV = new HashMap<String,Vertex>();\r\n\t\tmapV.put(startVertex, firstV);\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Init keys-->costs\r\n\t\t */\r\n\t\tfor(String key : this.getVertices())\r\n\t\t{\r\n\t\t\tif(key.equals(startVertex))\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,0));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,Integer.MAX_VALUE));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t/*\r\n\t\t * Init List for shortest path\r\n\t\t */\r\n\t\tLinkedList<String> list = new LinkedList<String>();\r\n\t\tlist.add(startVertex);\r\n\r\n\t\tHashMap<String,List<String>> path = new HashMap<String,List<String>>();\r\n\t\tpath.put(startVertex, list);\r\n\t\t\r\n\t\twhile(!minDist.isEmpty())\r\n\t\t{\r\n\t\t\tVertex node = minDist.poll();\r\n\t\t\tString V = node.current;\r\n\t\t\tint minimum = node.cost;\r\n\t\t\tSystem.out.println(minDist.toString());\r\n\t\t\t\r\n\t\t\t\tvisited.add(V);\r\n\t\t\t\t\r\n\t\t\t\tTreeSet<String> adj = new TreeSet<String>(this.adjacencyMap.get(V).keySet());\r\n\t\t\t\t\r\n\t\t\t\tfor(String successor : adj)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!visited.contains(successor) && !V.equals(successor))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint newCost = this.getCost(V, successor)+minimum;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(newCost < mapV.get(successor).cost)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tminDist.remove(mapV.get(successor));\r\n\t\t\t\t\t\t\t\tminDist.add(new Vertex(successor,V,newCost));\r\n\t\t\t\t\t\t\t\tmapV.put(successor, new Vertex(successor,V,newCost));\r\n\r\n\t\t\t\t\t\t\t\tLinkedList<String> newList = new LinkedList<String>(path.get(V));\r\n\t\t\t\t\t\t\t\tnewList.add(successor);\r\n\t\t\t\t\t\t\t\tpath.put(successor, newList);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tint smallestPath = mapV.get(endVertex).cost == Integer.MAX_VALUE ? -1 : mapV.get(endVertex).cost;\r\n\t\t\r\n\t\tif(smallestPath == -1)\r\n\t\t{\r\n\t\t\tshortestPath.add(\"None\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(String node : path.get(endVertex))\r\n\t\t\t{\r\n\t\t\t\tshortestPath.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn smallestPath;\r\n\t}", "private double dijkstraSingleTarget(Map<Integer, List<Node>> graph, int vertices, int source, int target) {\n Queue<Node> minHeap = new PriorityQueue<>(\n Comparator.comparingDouble(a -> a.weight)\n );\n\n double[] dist = new double[vertices + 1]; //shortest distance for each vertex\n Arrays.fill(dist, 0.0);\n\n boolean visited[] = new boolean[vertices + 1];\n\n // Distance for starting node is 0\n dist[source] = -1;\n minHeap.add((new Node(-1,source)));\n\n while (!minHeap.isEmpty()) {\n Node topPair = minHeap.remove();\n int currNode = topPair.vertex;\n double currDistance = topPair.weight;\n\n if (!graph.containsKey(currNode)) {\n continue;\n }\n\n if (visited[currNode]) continue;\n visited[currNode] = true;\n\n\n for (Node edge : graph.get(currNode)) {\n double weight = edge.weight;\n int neighborNode = edge.vertex;\n double nextDist = currDistance * weight;\n\n if (!visited[neighborNode] && nextDist < dist[neighborNode]) {\n dist[neighborNode] = nextDist;\n minHeap.add((new Node(nextDist, neighborNode)));\n\n }\n\n }\n\n\n }\n\n return -dist[target];\n }", "@Override\n public List<node_info> shortestPath(int src, int dest) {\n int counter=0;//counter for index of listPath\n List<node_info> listPath=new ArrayList<node_info>();//The reverse list that is returned\n List<node_info> listResult=new ArrayList<node_info>();//the returned list\n if(!DijkstraHelp(src,dest)) return null;//if there is no path from src to dest\n if(src==dest) {\n listPath.add(this.ga.getNode(src));\n return listPath;\n }\n //the other case:\n node_info d=this.ga.getNode(dest);\n listPath.add(counter,d);//insert the dest in order to go from destination to source\n //counter++;\n weighted_graph gCopy=copy();\n Iterator<node_info> it=gCopy.getV().iterator();//run on the whole graph\n while(it.hasNext()){\n if(listPath.get(counter).getKey()==src) break;//if we finished\n if(gCopy.getV(listPath.get(counter).getKey()).contains(it.next())) {//remove the nodes that we were already checked if\n //they need to be insert to listPath\n continue;\n }\n Iterator<node_info> currentIt=gCopy.getV(listPath.get(counter).getKey()).iterator();//iterator on the ni-list of the\n //last node were insert to the listPath\n if(currentIt!=null) {\n node_info min=null;\n while (currentIt.hasNext()){\n node_info currentLoop=currentIt.next();\n if(currentLoop.getTag()+gCopy.getEdge(listPath.get(counter).getKey(),currentLoop.getKey())==\n listPath.get(counter).getTag()){//check if this is the node that appropriate to the shortest path\n min=currentLoop;\n }\n }\n listPath.add(min);//insert to listPath\n counter++;\n }\n }\n for(int i=listPath.size()-1;i>=0;i--){\n listResult.add(listPath.size()-i-1,listPath.get(i));//reverse the list\n }\n return listResult;\n }", "@Override\n public ArrayList<GraphEdge> getRoute(GraphNode a, GraphNode b) {\n \tHashMap<GraphNode, Double> distances = new HashMap<GraphNode, Double>();\n \tHashMap<GraphNode, GraphEdge> predecessor = new HashMap<GraphNode, GraphEdge>();\n \tHashSet<GraphNode> visited = new HashSet<GraphNode>();\n \t\n \tArrayList<GraphEdge> result = new ArrayList<GraphEdge>();\n\t\n \t//Initialize distances, predecessor, and visited\n \tfor(GraphNode g : drivableNodes) {\n \t distances.put(g, Double.MAX_VALUE);\n \t predecessor.put(g, null);\n \t}\n \t\n \tint remaining = drivableNodes.size();\n \t\n \t//Put starting node\n \tdistances.put(a, 0.0);\n \t//predecessor.put(a, null);\n \t\n \t//Main loop\n \twhile(remaining > 0) {\n \t GraphNode closest = null;\n \t double minDist = Double.MAX_VALUE;\n\n \t for(GraphNode n : distances.keySet()) {\n \t\tdouble dist = distances.get(n);\n \t\tif(!visited.contains(n) &&\n \t\t\tdist != Double.MAX_VALUE &&\n \t\t\t(minDist == Double.MAX_VALUE || dist < minDist)) {\n \t\t closest = n;\n \t\t minDist = dist;\n \t\t}\n \t }\n \t \n \t if(closest == null)\n \t\treturn null;\n \t \n \t if(closest.equals(b))\n \t\tbreak;\n \t \n \t visited.add(closest);\n \t \n \t for(GraphEdge edge : closest.getEdges()) {\n \t\tGraphNode adjacent = edge.getOtherNode(closest);\n \t\tif(adjacent != null && !visited.contains(adjacent)) {\n \t\t //Map distance value for the other Node\n \t\t double otherDist = distances.get(adjacent);\n \t\t //Weight of edge from closest node to adjacent node\n \t\t double weight = edge.getWeight();\n \t\t String way = edge.getWay();\n \t\t \n \t\t if(otherDist == Double.MAX_VALUE ||\n \t\t\t weight + minDist < otherDist) {\n \t\t\tdistances.put(adjacent, weight + minDist);\n \t\t\t\n \t\t\t//Make new edge in correct order\n \t\t\tGraphEdge corrected = new GraphEdge(closest, adjacent, weight, way);\n \t\t\t\n \t\t\tpredecessor.put(adjacent, corrected);\n \t\t }\n \t\t}\n \t }\n\n \t remaining--;\n \t}\n \t\n \t//Backtrack to build route\n \tif(distances.get(b) == Double.MAX_VALUE) {\n \t return null;\n \t} else {\n \t //buildPath(predecessor, a, b, result);\n \t //Non recursive version\n \t Stack<GraphEdge> stack = new Stack<GraphEdge>(); \n \t while(!b.equals(a)) {\n \t\tGraphEdge edge = predecessor.get(b);\n \t\t\n \t\t//Make sure vertices are in correct order\n \t\tGraphNode start = edge.getOtherNode(b);\n \t\t//double weight = edge.getWeight();\n \t\t//GraphEdge corrected = new GraphEdge(start, b, weight);\n \t\t\n \t\tstack.push(edge);\n \t\tb = start;\n \t }\n \t \n \t while(!stack.isEmpty()) {\n \t\tGraphEdge edge = stack.pop();\n \t\tresult.add(edge);\n \t }\n \t}\n \t\n\treturn result;\n }", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "public void dijkstra(List<List<Node> > adj, int src){ \n this.adj = adj; \n \n for (int i = 0; i < V; i++) \n dist[i] = Integer.MAX_VALUE; \n \n // Add source node to the priority queue \n pq.add(new Node(src, 0)); \n \n // Distance to the source is 0 \n dist[src] = 0; \n while (settled.size() != V) { \n \n // remove the minimum distance node from the priority queue \n int u = pq.remove().node; \n \n // adding the node whose distance is finalized \n settled.add(u); \n \n e_Neighbours(u); \n } \n }", "private static int findMinDistance(int[] distance, boolean[] visitedVertex) {\r\n int minDistance = Integer.MAX_VALUE;\r\n int minDistanceVertex = -1;\r\n for (int i = 0; i < distance.length; i++) {\r\n if (!visitedVertex[i] && distance[i] < minDistance) {\r\n minDistance = distance[i];\r\n minDistanceVertex = i;\r\n }\r\n }\r\n return minDistanceVertex;\r\n }", "private double dijkstrasAlgo(String source, String dest) {\r\n\r\n\t\tclearAll(); // running time: |V|\r\n\t\tint count = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) // running time: |V|\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tcount++;\r\n\r\n\t\tVertex[] queue = new Vertex[count]; // running time: Constant\r\n\t\tVertex start = vertexMap.get(source); // running time: Constant\r\n\t\tstart.dist = 0; // running time: Constant\r\n\t\tstart.prev = null; // running time: Constant\r\n\r\n\t\tint index = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) { // running time: |V|\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tqueue[index] = v;\r\n\t\t\t\tv.setHandle(index);\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbuildMinHeap(queue, count); // running time: |V|\r\n\r\n\t\twhile (count != 0) { // running time: |V|\r\n\t\t\tVertex min = extractMin(queue, count); // running time: log |V|\r\n\t\t\tcount--; // running time: Constant\r\n\r\n\t\t\tfor (Iterator i = min.adjacent.iterator(); i.hasNext();) { // running time: |E|\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus()) {\r\n\t\t\t\t\tVertex adjVertex = vertexMap.get(edge.getDestination());\r\n\t\t\t\t\tif (adjVertex.dist > (min.dist + edge.getCost()) && adjVertex.isStatus()) {\r\n\t\t\t\t\t\tadjVertex.dist = (min.dist + edge.getCost());\r\n\t\t\t\t\t\tadjVertex.prev = min;\r\n\t\t\t\t\t\tint pos = adjVertex.getHandle();\r\n\t\t\t\t\t\tHeapdecreaseKey(queue, pos, adjVertex); // running time: log |V|\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn vertexMap.get(dest).dist; // running time: Constant\r\n\t}", "@Override\n\tpublic double shortestPathDist(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn Double.parseDouble(dwg.getNode(dest).getInfo());\n\t}", "public HashMap<Nodo, Integer> dijkstra() {\r\n\r\n\t\tPriorityQueue<NodoDijkstra> aVisitar = new PriorityQueue<NodoDijkstra>();\r\n\t\tHashMap<Nodo, Integer> distancias = new HashMap<Nodo, Integer>();\r\n\t\tHashMap<Nodo, Integer> retorno = new HashMap<Nodo, Integer>();\r\n\t\tHashSet<Nodo> visitados = new HashSet<Nodo>();\r\n\r\n\t\tNodoDijkstra nodoOrigen = new NodoDijkstra(this, 0);\r\n\t\tnodoOrigen.setCamino(new Camino(this));\r\n\t\taVisitar.add(nodoOrigen);\r\n\t\tdistancias.put(this, new Integer(0));\r\n\t\tretorno.put(this, new Integer(0));\r\n\r\n\t\twhile (!aVisitar.isEmpty()) {\r\n\t\t\tNodoDijkstra dNodo = aVisitar.poll();\r\n\t\t\tNodo actual = dNodo.getNodo();\r\n\t\t\tCamino camino = dNodo.getCamino();\r\n\r\n\t\t\tif (visitados.contains(actual))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvisitados.add(actual);\r\n\r\n\t\t\tfor (CanalOptico canal : actual.canales) {\r\n\t\t\t\tNodo vecino = canal.getOtroExtremo(actual);\r\n\t\t\t\tint costo = canal.getCosto();\r\n\r\n\t\t\t\t/* Restriccion del Dijkstra */\r\n\t\t\t\tif (visitados.contains(vecino))\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tif (canal.estaBloqueado())\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tif (vecino.estaBloqueado())\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tif (distancias.containsKey(vecino)) {\r\n\t\t\t\t\tint dActual = distancias.get(vecino);\r\n\r\n\t\t\t\t\tif (dActual <= dNodo.getDistancia() + costo)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taVisitar.remove(vecino);\r\n\t\t\t\t\t\tdistancias.remove(vecino);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tNodoDijkstra nuevoNodo = new NodoDijkstra(vecino,\r\n\t\t\t\t\t\tdNodo.getDistancia() + costo);\r\n\t\t\t\tCamino caminoNuevo = new Camino(camino);\r\n\t\t\t\tcaminoNuevo.addSalto(new Salto(camino.getSaltos().size() + 1,\r\n\t\t\t\t\t\tcanal));\r\n\t\t\t\tnuevoNodo.setCamino(caminoNuevo);\r\n\t\t\t\taVisitar.add(nuevoNodo);\r\n\t\t\t\tdistancias.put(nuevoNodo.getNodo(), nuevoNodo.getDistancia());\r\n\t\t\t\tretorno.put(nuevoNodo.getNodo(), nuevoNodo.getDistancia());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "private int getDistanceBetweenNodes(Node s, Node t) {\n\t\tif (s.equals(t)) return 0;\n\t\tArrayList<Node> visitedNodes = new ArrayList<Node>();\n\t\tArrayDeque<Node> nodesToVisit = new ArrayDeque<Node>();\n\t\tdistanceFromS.put(s, 0);\n\t\tnodesToVisit.add(s);\n\t\twhile (!nodesToVisit.isEmpty()) {\n\t\t\tNode currentNode = nodesToVisit.poll();\n\t\t\tvisitedNodes.add(currentNode);\n\t\t\tfor (Node n: currentNode.getNeighbors()) {\n\t\t\t\tif (!visitedNodes.contains(n) && !nodesToVisit.contains(n)) {\n\t\t\t\t\tnodesToVisit.add(n);\n\t\t\t\t\tdistanceFromS.put(n, (distanceFromS.get(currentNode) + 1));\n\t\t\t\t\tif (distanceFromS.containsKey(t)) break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (distanceFromS.containsKey(t)) break;\n\t\t}\n\t\tif (distanceFromS.containsKey(t)) {\n\t\t\treturn distanceFromS.get(t);\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "private void dijkstra(final NavigableSet<Node> queue) {\n Node firstNode, neighbor;\n while (!queue.isEmpty()) {\n // vertex with shortest distance (first iteration will return source)\n firstNode = queue.pollFirst();\n assert firstNode != null;\n if (!explored.contains(firstNode.coordinate)) {\n explored.add(firstNode.coordinate);\n }\n if (firstNode.dist == Integer.MAX_VALUE)\n // we can ignore u (and any other remaining vertices) since they are unreachable\n break;\n //look at distances to each neighbour\n for (Map.Entry<Node, Integer> temp : firstNode.neighbours.entrySet()) {\n neighbor = temp.getKey(); //the neighbour in this iteration\n if (!explored.contains(neighbor.coordinate)) {\n explored.add(neighbor.coordinate);\n }\n final int alternateDist = firstNode.dist + temp.getValue();\n if (alternateDist < neighbor.dist) { // shorter path to neighbour found\n queue.remove(neighbor);\n neighbor.dist = alternateDist;\n neighbor.previous = firstNode;\n queue.add(neighbor);\n }\n }\n }\n }", "public static ArrayList<edges<String, Double>> Dijkstra(String CHAR1, String CHAR2, graph<String,Float> g) {\n\t\tPriorityQueue<ArrayList<edges<String, Double>>> active = \n\t\t\tnew PriorityQueue<ArrayList<edges<String, Double>>>(10,new Comparator<ArrayList<edges<String, Double>>>() {\n\t\t\t\tpublic int compare(ArrayList<edges<String, Double>> path1, ArrayList<edges<String, Double>> path2) {\n\t\t\t\t\tedges<String, Double> dest1 = path1.get(path1.size() - 1);\n\t\t\t\t\tedges<String, Double> dest2 = path2.get(path2.size() - 1);\n\t\t\t\t\tif (!(dest1.getLabel().equals(dest2.getLabel())))\n\t\t\t\t\t\treturn dest1.getLabel().compareTo(dest2.getLabel());\n\t\t\t\t\treturn path1.size() - path2.size();\n\t\t\t\t}\n\t\t\t});\n\t\t\tSet<String> known = new HashSet<String>();\n\t\t\tArrayList<edges<String, Double>> begin = new ArrayList<edges<String, Double>>();\n\t\t\tbegin.add(new edges<String, Double>(CHAR1, 0.0));\n\t\t\tactive.add(begin);\t\t\n\t\t\twhile (!active.isEmpty()) {\n\t\t\t\tArrayList<edges<String, Double>> minPath = active.poll();\n\t\t\t\tedges<String, Double> endOfMinPath = minPath.get(minPath.size() - 1);\n\t\t\t\tString minDest = endOfMinPath.getDest();\n\t\t\t\tdouble minCost = endOfMinPath.getLabel();\n\t\t\t\tif (minDest.equals(CHAR2)) {\n\t\t\t\t\treturn minPath;\n\t\t\t\t}\n\t\t\t\tif (known.contains(minDest))\n\t\t\t\t\tcontinue;\n\t\t\t\tSet<edges<String,Float>> children = g.childrenOf(minDest);\n\t\t\t\tfor (edges<String, Float> e : children) {\n\t\t\t\t\tif (!known.contains(e.getDest())) {\n\t\t\t\t\t\tdouble newCost = minCost + e.getLabel();\n\t\t\t\t\t\tArrayList<edges<String, Double>> newPath = new ArrayList<edges<String, Double>>(minPath); \n\t\t\t\t\t\tnewPath.add(new edges<String, Double>(e.getDest(), newCost));\n\t\t\t\t\t\tactive.add(newPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tknown.add(minDest);\n\t\t\t}\n\t\t\treturn null;\n\t}", "public static Vector<int []> BFS(int[] startPosition,int[] unexploreNode, mapNode[][] nodes){\n\t\t\r\n\t\tVector<int []> shortestPath;\r\n\t\t\r\n\t\t//initial all nodes' status to UN-visited\r\n\t\tfor(int i = 0; i < nodes.length; i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j < nodes[i].length;j++)\r\n\t\t\t{\r\n\t\t\t\tnodes[i][j].setTotDistance(999999999);//set the initial distance to INF\r\n\t\t\t\tnodes[i][j].gridPosition[0] = i;//save current node x position\r\n\t\t\t\tnodes[i][j].gridPosition[1] = j;//save current node y position\r\n\t\t\t\tnodes[i][j].setNodeVistied(false);//set all nodes are not visited yet\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//create start node and add it into the execution queue\r\n\t\tmapNode tempNode = new mapNode();\r\n\t\ttempNode = nodes[startPosition[0]][startPosition[1]];\r\n\t\tVector<mapNode> tempQueue = new Vector<mapNode>();\r\n\t\ttempQueue.add(tempNode);\r\n\t\t//main loop: check all nodes on the map\r\n\t\twhile(tempQueue.size() != 0)\r\n\t\t{\r\n\t\t\t//create four nearby nodes\r\n\t\t\tmapNode tempTopNode = new mapNode();\r\n\t\t\tmapNode tempBottomNode = new mapNode();\r\n\t\t\tmapNode tempLeftNode = new mapNode();\r\n\t\t\tmapNode tempRightNode = new mapNode();\r\n\t\t\t\t\r\n\t\t\t//update Top node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).topNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = nodes[tempQueue.get(0).topNode.gridPosition[0]][tempQueue.get(0).topNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Bottom node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).bottomNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = nodes[tempQueue.get(0).bottomNode.gridPosition[0]][tempQueue.get(0).bottomNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Left node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).leftNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = nodes[tempQueue.get(0).leftNode.gridPosition[0]][tempQueue.get(0).leftNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Right node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).rightNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = nodes[tempQueue.get(0).rightNode.gridPosition[0]][tempQueue.get(0).rightNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = null;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//start re-calculate distance of each node\r\n\t\t\t//check the top node and update new distance\r\n\t\t\tif(tempTopNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempTopNode.getNodeVisited() == false && tempTopNode.getOwnElevation() != 999999999 && tempTopNode.getStatus() != Status.EXPLORED )\r\n\t\t\t\t{\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempTopNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\ttempTopNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\tnodes[tempTopNode.gridPosition[0]][tempTopNode.gridPosition[1]] = tempTopNode;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(tempTopNode.gridPosition[0] == unexploreNode[0] && tempTopNode.gridPosition[1] == unexploreNode[1]){\r\n\t\t\t\t\t//print out the end node\r\n\t\t\t\t\t//print out the total distance between two points\r\n\t\t\t\t\t//print out the total number node of path\r\n\t\t\t\t\t//System.out.println(\"End Point: \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[0]+1)+\" \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[1]+1));\r\n\t\t\t\t\t//System.out.println(\"Total Distance: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotDistance());\r\n\t\t\t\t\t//System.out.println(\"Total number of nodes: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotPath().size());\r\n\t\t\t\t\tshortestPath = nodes[unexploreNode[0]][unexploreNode[1]].getTotPath();\r\n\t\t\t\t\tshortestPath.add(unexploreNode);\r\n\t\t\t\t\treturn shortestPath;\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nodes[tempTopNode.gridPosition[0]][tempTopNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempTopNode.gridPosition[0], tempTopNode.gridPosition[1]) == false && tempTopNode.getOwnElevation() != 999999999)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempTopNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//check the bottom node and update new distance\r\n\t\t\tif(tempBottomNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempBottomNode.getNodeVisited() == false && tempBottomNode.getOwnElevation() != 999999999 && tempBottomNode.getStatus() != Status.EXPLORED)\r\n\t\t\t\t{\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempBottomNode.setTotPath(tempPath);\r\n\t\t\t\t\ttempBottomNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).bottomNode.gridPosition[0]][tempQueue.get(0).bottomNode.gridPosition[1]] = tempBottomNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(tempBottomNode.gridPosition[0] == unexploreNode[0] && tempBottomNode.gridPosition[1] == unexploreNode[1]){\r\n\t\t\t\t\t//System.out.println(\"End Point: \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[0]+1)+\" \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[1]+1));\r\n\t\t\t\t\t//System.out.println(\"Total Distance: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotDistance());\r\n\t\t\t\t\t//System.out.println(\"Total number of nodes: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotPath().size());\r\n\t\t\t\t\tshortestPath = nodes[unexploreNode[0]][unexploreNode[1]].getTotPath();\r\n\t\t\t\t\tshortestPath.add(unexploreNode);\r\n\t\t\t\t\treturn shortestPath;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nodes[tempBottomNode.gridPosition[0]][tempBottomNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempBottomNode.gridPosition[0], tempBottomNode.gridPosition[1]) == false && tempBottomNode.getOwnElevation() != 999999999)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempBottomNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//check the left node and update new distance\r\n\t\t\tif(tempLeftNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempLeftNode.getNodeVisited() == false && tempLeftNode.getOwnElevation() != 999999999 && tempLeftNode.getStatus() != Status.EXPLORED)\r\n\t\t\t\t{\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempLeftNode.setTotPath(tempPath);\r\n\t\t\t\t\ttempLeftNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).leftNode.gridPosition[0]][tempQueue.get(0).leftNode.gridPosition[1]] = tempLeftNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(tempLeftNode.gridPosition[0] == unexploreNode[0] && tempLeftNode.gridPosition[1] == unexploreNode[1]){\r\n\t\t\t\t\t//System.out.println(\"End Point: \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[0]+1)+\" \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[1]+1));\r\n\t\t\t\t\t//System.out.println(\"Total Distance: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotDistance());\r\n\t\t\t\t\t//System.out.println(\"Total number of nodes: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotPath().size());\r\n\t\t\t\t\tshortestPath = nodes[unexploreNode[0]][unexploreNode[1]].getTotPath();\r\n\t\t\t\t\tshortestPath.add(unexploreNode);\r\n\t\t\t\t\treturn shortestPath;\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nodes[tempLeftNode.gridPosition[0]][tempLeftNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempLeftNode.gridPosition[0], tempLeftNode.gridPosition[1]) == false && tempLeftNode.getOwnElevation() != 999999999)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempLeftNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//check the right node and update new distance\r\n\t\t\tif(tempRightNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempRightNode.getNodeVisited() == false && tempRightNode.getOwnElevation() != 999999999 && tempRightNode.getStatus() != Status.EXPLORED)\r\n\t\t\t\t{\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check to see if new node existed in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempRightNode.setTotPath(tempPath);\r\n\t\t\t\t\ttempRightNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).rightNode.gridPosition[0]][tempQueue.get(0).rightNode.gridPosition[1]] = tempRightNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(tempRightNode.gridPosition[0] == unexploreNode[0] && tempRightNode.gridPosition[1] == unexploreNode[1]){\r\n\t\t\t\t\t//System.out.println(\"End Point: \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[0]+1)+\" \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[1]+1));\r\n\t\t\t\t\t//System.out.println(\"Total Distance: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotDistance());\r\n\t\t\t\t\t//System.out.println(\"Total number of nodes: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotPath().size());\r\n\t\t\t\t\tshortestPath = nodes[unexploreNode[0]][unexploreNode[1]].getTotPath();\r\n\t\t\t\t\tshortestPath.add(unexploreNode);\r\n\t\t\t\t\treturn shortestPath;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nodes[tempRightNode.gridPosition[0]][tempRightNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempRightNode.gridPosition[0], tempRightNode.gridPosition[1]) == false && tempRightNode.getOwnElevation() != 999999999)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempRightNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//set current node to visited node and\r\n\t\t\t//remove current node from execution queue\r\n\t\t\ttempQueue.get(0).setNodeVistied(true);\r\n\t\t\tnodes[tempQueue.get(0).gridPosition[0]][tempQueue.get(0).gridPosition[1]].setNodeVistied(true);\r\n\t\t\ttempQueue.remove(0);\t\r\n\t\t}\r\n\t\t//print out the end node\r\n\t\t//print out the total distance between two points\r\n\t\t//print out the total number node of path\r\n\t\tSystem.out.println(\"End 5 Point: \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[0]+1)+\" \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[1]+1));\r\n\t\tSystem.out.println(\"Total Distance: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotDistance());\r\n\t\tSystem.out.println(\"Total number of nodes: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotPath().size());\r\n\t\tshortestPath = nodes[unexploreNode[0]][unexploreNode[1]].getTotPath();\r\n\t\tshortestPath.add(unexploreNode);\r\n\t\treturn shortestPath;\t\t\r\n\t}", "public GraphNode getMinDistanceNode(GraphNode pNode, double pWeight){\n GraphNode result = null;\n double max_double = Double.MAX_VALUE;\n \n ArrayList<ArcGraph> conections = pNode.getConections();\n \n for (int i = 0; i < conections.size(); i++){\n if (conections.get(i).getWeight() + pWeight < max_double ){\n max_double = conections.get(i).getWeight(); //updates the min weight\n result = conections.get(i).getDestiny(); //returns the destiny Node\n }\n }\n System.out.println(String.valueOf(result.getLatitude())+\" \"+String.valueOf(result.getLongitude())+\" \"+String.valueOf(result.getRating())+\" \"\n +result.getThumbnail()+\" \"+result.getType());\n return result;\n \n }", "private static int getCheapestEdgeToExploredNodes(int nextMinValNode, \n\t\t\tHashMap<Integer,HashMap<Integer,Double>> sourceGTree, \n\t\t\tLinkedList<Integer> nodesInMstree) {\n int newNode=0;\n double cheapestWeight = Double.POSITIVE_INFINITY;\n\n\t/* looping over unexplored nodes from nextMinValNode */\n for (Map.Entry<Integer, Double> edge : sourceGTree.get(nextMinValNode).entrySet()) {\n\n /* not yet in mst */\n if (!nodesInMstree.contains(edge.getKey())) continue;\n\n /* this edge is not better */\n if ( edge.getValue() >= cheapestWeight ) continue;\n\n\t /* this is better , so save it */\n newNode = edge.getKey();\n cheapestWeight = edge.getValue();\n }\n\n return newNode;\n }", "void dijkstra(int[][] graph){\r\n int dist[] = new int[rideCount];\r\n Boolean sptSet[] = new Boolean[rideCount];\r\n\r\n for(int i = 0; i< rideCount; i++){\r\n dist[i] = Integer.MAX_VALUE;\r\n sptSet[i] = false;\r\n }\r\n\r\n dist[0] = 0;\r\n\r\n for(int count = 0; count< rideCount -1; count++){\r\n int u = minWeight(dist, sptSet);\r\n sptSet[u] = true;\r\n for(int v = 0; v< rideCount; v++){\r\n if (!sptSet[v] && graph[u][v] != 0 && dist[u] + graph[u][v] < dist[v]){\r\n dist[v] = dist[u] + graph[u][v];\r\n }\r\n }\r\n }\r\n printSolution(dist);\r\n }", "ShortestPath(UndirectedWeightedGraph graph, String startNodeId, String endNodeId) throws NotFoundNodeException {\r\n\t\t\r\n\t\tif (!graph.containsNode(startNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, startNodeId);\r\n\t\t}\t\t\r\n\t\tif (!graph.containsNode(endNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, endNodeId);\r\n\t\t}\t\r\n\r\n\t\tsrc = startNodeId;\r\n\t\tdst = endNodeId;\r\n\t\t\r\n\t\tif (endNodeId.equals(startNodeId)) {\r\n\t\t\tlength = 0;\r\n\t\t\tnumOfPath = 1;\r\n\t\t\tArrayList<String> path = new ArrayList<String>();\r\n\t\t\tpath.add(startNodeId);\r\n\t\t\tpathList.add(path);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// create a HashMap of updated distance from the starting node to every node\r\n\t\t\t// initially it is 0, inf, inf, inf, ...\r\n\t\t\tHashMap<String, Double> distance = new HashMap<String, Double>();\t\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif (nodeId.equals(startNodeId)) {\r\n\t\t\t\t\t// the starting node will always have 0 distance from itself\r\n\t\t\t\t\tdistance.put(nodeId, 0.0);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// the others have initial distance is infinity\r\n\t\t\t\t\tdistance.put(nodeId, Double.MAX_VALUE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// a HashMap of preceding node of each node\r\n\t\t\tHashMap<String, HashSet<String>> precedence = new HashMap<String, HashSet<String>>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif ( nodeId.equals(startNodeId) ) {\r\n\t\t\t\t\tprecedence.put(nodeId, null);\t// the start node will have no preceding node\r\n\t\t\t\t}\r\n\t\t\t\telse { \r\n\t\t\t\t\tprecedence.put(nodeId, new HashSet<String>());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\tSet<String> unvisitedNode = new HashSet<String>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tunvisitedNode.add(nodeId);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble minUnvisitedLength;\r\n\t\t\tString minUnvisitedNode;\r\n\t\t\t// run loop while not all node is visited\r\n\t\t\twhile ( unvisitedNode.size() != 0 ) {\r\n\t\t\t\t// find the unvisited node with minimum current distance in distance list\r\n\t\t\t\tminUnvisitedLength = Double.MAX_VALUE;\r\n\t\t\t\tminUnvisitedNode = \"\";\r\n\t\t\t\tfor (String nodeId : unvisitedNode) {\r\n\t\t\t\t\tif (distance.get(nodeId) < minUnvisitedLength) {\r\n\t\t\t\t\t\tminUnvisitedNode = nodeId;\r\n\t\t\t\t\t\tminUnvisitedLength = distance.get(nodeId); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// if there are no node that can be visited from the unvisitedNode, break the loop \r\n\t\t\t\tif (minUnvisitedLength == Double.MAX_VALUE) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// remove the node from unvisitedNode\r\n\t\t\t\tunvisitedNode.remove(minUnvisitedNode);\r\n\t\t\t\t\r\n\t\t\t\t// update the distance of its neighbors\r\n\t\t\t\tfor (Node neighborNode : graph.getNodeList().get(minUnvisitedNode).getNeighbors().keySet()) {\r\n\t\t\t\t\tdouble distanceFromTheMinNode = distance.get(minUnvisitedNode) + graph.getNodeList().get(minUnvisitedNode).getNeighbors().get(neighborNode).getWeight();\r\n\t\t\t\t\t// if the distance of the neighbor can be shorter from the current node, change \r\n\t\t\t\t\t// its details in distance and precedence\r\n\t\t\t\t\tif ( distanceFromTheMinNode < distance.get(neighborNode.getId()) ) {\r\n\t\t\t\t\t\tdistance.replace(neighborNode.getId(), distanceFromTheMinNode);\r\n\t\t\t\t\t\t// renew the precedence of the neighbor node\r\n\t\t\t\t\t\tprecedence.put(neighborNode.getId(), new HashSet<String>());\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (distanceFromTheMinNode == distance.get(neighborNode.getId())) {\r\n\t\t\t\t\t\t// unlike dijkstra's algorithm, multiple path should be update into the precedence\r\n\t\t\t\t\t\t// if from another node the distance is the same, add it to the precedence\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// if the current node in the process is the end node, we can stop the while loop here\r\n\t\t\t\tif (minUnvisitedNode == endNodeId) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (distance.get(endNodeId) == Double.MAX_VALUE) {\r\n\t\t\t\t// in case there is no shortest path between the 2 nodes\r\n\t\t\t\tlength = 0;\r\n\t\t\t\tnumOfPath = 0;\r\n\t\t\t\tpathList = null;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// other wise we have these information\r\n\t\t\t\tlength = distance.get(endNodeId);\r\n\t\t\t\t//numOfPath = this.getNumPath(precedence, startNodeId, endNodeId);\r\n\t\t\t\tpathList = this.findPathList(precedence, startNodeId, endNodeId);\r\n\t\t\t\tnumOfPath = pathList.size();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\t// END ELSE\t\t\r\n\t}", "void shortestPaths( Set<Integer> nodes );", "private static void simpleDijikstra(final DirectedGraph directedGraph,\n final Map<String, Integer> currentShortestPaths,\n final String start, final Set<String> visitedSet, final String destination) {\n // Terminate when we have visited all the nodes or if our start value isn't in our dijikstra table\n if (containsAndNotNull(currentShortestPaths, start) && visitedSet.size() != currentShortestPaths.keySet().size()) {\n compareDistanceAndReplace(directedGraph, currentShortestPaths, start);\n visitedSet.add(start);\n // Calculate the next current smallest node that hasn't been visited and not infinity\n final Optional<Map.Entry<String, Integer>> optionalSmallest =\n currentShortestPaths.entrySet().stream()\n .filter(node -> !visitedSet.contains(node.getKey()) && node.getValue() != null)\n .min(Comparator.comparingInt(Map.Entry::getValue));\n // Continue to next node if there is one available\n optionalSmallest.ifPresent(smallest -> {\n // No need to continue if the next smallest node is our destination\n if (!smallest.getKey().equals(destination)) {\n simpleDijikstra(directedGraph, currentShortestPaths, smallest.getKey(), visitedSet, destination);\n }\n });\n }\n }", "HashMap<GamePiece, Integer> distanceMap(GamePiece from) {\n ArrayDeque<GamePiece> worklist = new ArrayDeque<GamePiece>();\n HashMap<GamePiece, Integer> distances = new HashMap<GamePiece, Integer>();\n ArrayList<GamePiece> seen = new ArrayList<GamePiece>();\n distances.put(from, 0);\n worklist.add(from);\n\n while (worklist.size() > 0) {\n GamePiece next = worklist.removeFirst();\n\n if (seen.contains(next)) {\n // if seen has the next element don't do anything with it\n }\n else {\n for (String s : this.directions) {\n if (next.hasNeighbor(s) && next.connected(s) && !seen.contains(next.neighbors.get(s))) {\n distances.put(next.neighbors.get(s), distances.get(next) + 1);\n worklist.addFirst(next.neighbors.get(s));\n }\n }\n seen.add(next);\n }\n }\n return distances;\n }", "public void shortestPaths(int source) {\n\n\t\tlong start = 0;\n\t\tlong stop;\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tedgeList[v] = new Edge(vertexList[v].id, rand, 5000);\n\t\t}\n\t\t// creating object of fibonacci\n\t\tFHeap pq = new FHeap();\n\t\t// creating a map for checking\n\t\tMap<Integer, FHeap.Node> check = new HashMap<Integer, FHeap.Node>();\n\t\t// storing the mst costs\n\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tcheck.put(vertexList[v].id,\n\t\t\t\t\tpq.enqueue(vertexList[v].id, Double.POSITIVE_INFINITY));\n\t\t}\n\t\tstart = System.currentTimeMillis();\n\t\t// allot cost 0 to initial node\n\t\tpq.decreaseKey(check.get(vertexList[source].id), 0.0);\n\n\t\twhile (!pq.isEmpty()) {\n\t\t\t// take the current node and get its minimum cost\n\t\t\tFHeap.Node current = pq.dequeueMin();\n\n\t\t\t// store the values in the table\n\t\t\tresult.put(current.getValue(), current.getCost());\n\n\t\t\t// update the costs\n\t\t\tfor (Neighbor nbr = vertexList[current.getValue()].adjList; nbr != null; nbr = nbr.next) {\n\n\t\t\t\t// edge is not added if shortest cost is known\n\t\t\t\tif (result.containsKey(vertexList[nbr.vertexNumber].id))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// update cost to shortest\n\t\t\t\tFHeap.Node finalCost = check\n\t\t\t\t\t\t.get(vertexList[nbr.vertexNumber].id);\n\t\t\t\tif (nbr.weight < finalCost.getCost())\n\t\t\t\t\tpq.decreaseKey(finalCost, nbr.weight);\n\t\t\t}\n\t\t}\n\t\tstop = System.currentTimeMillis();\n\t\t// computing the time\n\t\ttime = stop - start;\n\n\t\t// calculate the MST cost\n\t\tfor (int i = 0; i < vertexList.length; i++) {\n\t\t\tsumHeapCost = (int) (sumHeapCost + result.get(i));\n\t\t}\n\t\t// for printing in case of input from file in fibonacci mode\n\t\n\t\t// System.out.println(sumHeapCost);\n\t}", "public List<node_info> shortestPath(int src, int dest);", "private List<BaseNode> findClosestNodes(BaseNode fromNode, List<BaseNode> toNodes,\n\t\t\tFloydWarshallShortestPaths<BaseNode, DefaultWeightedEdge> paths) {\n\t\t\n\t\tdouble shortestPath = 0;\n\t\tList<BaseNode> closestNodes = new ArrayList<>();\n\n\t\tfor (BaseNode toNode : toNodes) {\n\t\t\tGraphPath<BaseNode, DefaultWeightedEdge> path = paths.getPath(fromNode, toNode);\n\t\t\t// new closest found\n\t\t\tif ((shortestPath > path.getWeight() && path.getWeight() != 0) || shortestPath == 0) {\n\t\t\t\tshortestPath = path.getWeight();\n\t\t\t\tclosestNodes.clear();\n\t\t\t}\n\t\t\t// add closest to result list\n\t\t\tif (shortestPath != 0 && shortestPath == path.getWeight()) {\n\t\t\t\tclosestNodes.add(toNode);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn closestNodes;\n\t}", "public int breadthFirstSearch(T srcId, T destId)\n {\n if (nodeList.isEmpty())\n {\n System.out.println(\"Empty graph\");\n return -1;\n }\n \n // queue used during the traversal\n LinkedList<QueueNode> queue = new LinkedList();\n \n // keeps track of node which are visited and added into the queue\n HashMap<T, Integer> visited = new HashMap();\n \n // find srcNode with id = srcId in graph\n GraphNode srcNode = nodeList.get(srcId);\n \n // if srcNode is not there in graph, breadth first traversal which starts at srcNode cannot be done \n if (srcNode == null)\n {\n System.out.println(\"Source vertex not found\");\n return -1;\n }\n \n int minNumberTrials = -1;\n \n // add srcNode in queue, mark it as visited\n queue.add(new QueueNode(srcNode, 0));\n visited.put(srcNode.nodeId, 1);\n \n while (!queue.isEmpty())\n {\n QueueNode currentNode = queue.remove();\n \n // if destination node found\n if (currentNode.graphNode.nodeId == destId)\n {\n minNumberTrials = currentNode.level;\n break;\n }\n \n // first neighbor of current graph node\n GraphNode neighbor = currentNode.graphNode.next;\n \n // add all neighbors of current graph node into the queue\n while (neighbor != null)\n {\n // if this neighbor is not visited earlier, mark it as visited\n // add it to the queue at appropriate level\n if (visited.get(neighbor.nodeId) == null)\n {\n visited.put(neighbor.nodeId, 1);\n queue.add(new QueueNode(findGraphNode(neighbor.nodeId), currentNode.level + 1));\n }\n neighbor = neighbor.next; \n }\n }\n \n return minNumberTrials;\n }", "private static void compareDistanceAndReplace(final DirectedGraph directedGraph,\n final Map<String, Integer> currentShortestPaths,\n final String start) {\n final Map<String, Integer> possibleDestinations = directedGraph.get(start);\n if (possibleDestinations != null) {\n // For each possible edge to this node, check if the distance of this edge plus the value of how\n // we arrived at the start node is smaller than the current value in the table, if so then replace it\n possibleDestinations.forEach((toNode, distance) -> {\n final int valueToCompare = currentShortestPaths.get(start) + distance;\n final Integer currentShortest = currentShortestPaths.get(toNode);\n final boolean currentInfinity = currentShortestPaths.containsKey(toNode) && (currentShortest == null || currentShortest == 0);\n // If the to node we are currently looking at is infinity in our table, then always replace\n // or if there is a real value then compare it\n // and if the new route is shorter then replace it\n if (currentInfinity\n || (containsAndNotNull(currentShortestPaths, toNode) && (currentShortest > valueToCompare))) {\n currentShortestPaths.put(toNode, valueToCompare);\n }\n });\n }\n }", "private HashMap<String, Integer> getShortestPathBetweenSameNodes(Node node, int latency) {\n HashMap<String,Integer> allPaths = getAllPaths(node,Selection.MAX_LATENCY,latency);\n if(allPaths.isEmpty() && isEdge(node)) {\n allPaths = getShortestPathBetweenSameNodes(node,latency * 2);\n }\n\n String key = Collections.min(allPaths.entrySet(), Map.Entry.comparingByValue()).getKey();\n int value = Collections.min(allPaths.entrySet(), Map.Entry.comparingByValue()).getValue();\n allPaths.clear();\n allPaths.put(key,value);\n\n return allPaths;\n }", "public int[] shortestReach(int startId) {\n System.out.println(\"Graph with startId: \"+startId);\n for(int i=0 ; i<size ; i++){\n for(int j=0 ; j<size ; j++){\n System.out.print(graph[i][j]);\n }\n System.out.println(\"\");\n }\n\n int[] dist = new int[size];\n boolean[] srg = new boolean[size];\n\n //intialize dist and srg\n for(int i=0 ; i<size ; i++){\n dist[i] = Integer.MAX_VALUE;\n srg[i] = false;\n }\n\n //Start node\n dist[startId] = 0;\n\n for(int i=0 ; i<size ; i++){\n int u = minDist(dist, srg);\n\n srg[u] = true;\n\n for( int v=0; v<size ; v++){\n if(!srg[v] && graph[u][v]!=0 && dist[u]!=Integer.MAX_VALUE && dist[u] + graph[u][v] < dist[v]){\n dist[v] = dist[u] + graph[u][v];\n }\n }\n }\n\n int[] result = new int[size-1];\n int indx = 0;\n for(int i=0 ; i<size ; i++){\n if(i != startId){\n if(dist[i] == Integer.MAX_VALUE)\n result[indx] = -1;\n else{\n result[indx] = dist[i];\n }\n indx++;\n }\n\n }\n\n return result;\n }", "public static void computePaths(Vertex source){\n\t\tsource.minDistance=0;\n\t\t//visit each vertex u, always visiting vertex with smallest minDistance first\n\t\tPriorityQueue<Vertex> vertexQueue=new PriorityQueue<Vertex>();\n\t\tvertexQueue.add(source);\n\t\twhile(!vertexQueue.isEmpty()){\n\t\t\tVertex u = vertexQueue.poll();\n\t\t\tSystem.out.println(\"For: \"+u);\n\t\t\tfor (Edge e: u.adjacencies){\n\t\t\t\tVertex v = e.target;\n\t\t\t\tSystem.out.println(\"Checking: \"+u+\" -> \"+v);\n\t\t\t\tdouble weight=e.weight;\n\t\t\t\t//relax the edge (u,v)\n\t\t\t\tdouble distanceThroughU=u.minDistance+weight;\n\t\t\t\tif(distanceThroughU<v.minDistance){\n\t\t\t\t\tSystem.out.println(\"Updating minDistance to \"+distanceThroughU);\n\t\t\t\t\tv.minDistance=distanceThroughU;\n\t\t\t\t\tv.previous=u;\n\t\t\t\t\t//move the vertex v to the top of the queue\n\t\t\t\t\tvertexQueue.remove(v);\n\t\t\t\t\tvertexQueue.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n mNodes = sc.nextInt();\n mEdges = sc.nextInt();\n \n mDistances = new int[mNodes+1][mNodes+1];\n \n for (int i =1; i <= mNodes; i++)\n {\n \n for (int j =1; j <=mNodes;j++)\n {\n mDistances[i][j] = Integer.MAX_VALUE;\n \n }\n }\n \n for (int i =1; i <= mNodes; i++)\n {\n mDistances[i][i] =0;\n }\n \n for (int i = 0 ; i < mEdges; i++)\n {\n int from = sc.nextInt();\n int to = sc.nextInt();\n \n mDistances[from][to] = sc.nextInt();\n \n \n }\n \n \n //FW\n \n for (int k = 1; k <= mNodes; k++)\n {\n \n for (int i = 1; i <= mNodes; i++)\n {\n \n for (int j = 1; j <= mNodes; j++)\n {\n \n if (mDistances[i][k]!= Integer.MAX_VALUE && mDistances[k][j] != Integer.MAX_VALUE )\n {\n if (mDistances[i][j] > mDistances[i][k] + mDistances[k][j])\n {\n \n mDistances[i][j] = mDistances[i][k] + mDistances[k][j];\n }\n \n }\n \n }\n }\n \n }\n \n mQueries = sc.nextInt();\n \n for (int i =0; i < mQueries; i++)\n {\n int dist = mDistances[sc.nextInt()][sc.nextInt()];\n \n if (dist == Integer.MAX_VALUE)\n {\n dist = -1;\n }\n \n System.out.println(dist);\n \n }\n \n \n \n \n \n \n \n \n \n }", "private Node min(Node node){\n if(node == null)\n return null;\n else if(node.left == null)\n return node;\n\n //walk left nodes\n return min(node.left);\n }", "private int shortestDistance(Vertex dest) {\n Integer d = distance.get(dest);\n if (d==null)\n return Integer.MAX_VALUE;\n return d;\n }", "private int bfs(String source, String destination, final Set<String> uniqueWords) {\n\n class Node {\n String word;\n int distance;\n\n public Node(String word, int distance) {\n this.word = word;\n this.distance = distance;\n }\n }\n\n final Queue<Node> queue = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n queue.offer(new Node(source, 0)); //distance of source to source is 0\n visited.add(source);\n\n while (!queue.isEmpty()) {\n\n final Node node = queue.poll();\n final int distance = node.distance;\n\n //if we reached the destination node\n if (node.word.equals(destination))\n return distance + 1;\n\n //try all word which is 1 weight away\n for (String neighbour : getNeighbour(node.word, uniqueWords)) {\n if (!visited.contains(neighbour)) {\n visited.add(neighbour);\n queue.offer(new Node(neighbour, distance + 1));\n }\n }\n\n\n }\n return 0;\n }", "public int minimumCost(int N, int[][] connections) {\n int[] parent = new int[N + 1];\n Arrays.fill(parent, -1);\n Arrays.sort(connections, (a,b) -> (a[2]-b[2]));\n int cnt = 0;\n int minCost = 0;\n \n for(int[] edge: connections){\n int src = edge[0];\n int dst = edge[1];\n int cost = edge[2];\n \n int srcSubsetId = find(parent, src);\n int dstSubsetId = find(parent, dst);\n \n if(srcSubsetId == dstSubsetId) {\n // Including this edge will cause cycles, then ignore it\n continue;\n }\n cnt += 1;\n minCost += cost;\n union(parent, src, dst);\n }\n return cnt==N-1? minCost : -1;\n}", "@Override\n public List<Node> findShortestPath(Node s, Node t)\n {\n nodeDists.clear(); //clear previously calculated distances\n\n recordNodeDistances(s, t); //record node distances to target\n\n LinkedList<Node> shortestPath = new LinkedList<Node>();\n\n shortestPath.addLast(s);\n\n boolean reachedEnd = false;\n\n if(s==t) reachedEnd = true; // \"That was easy\"\n\n while(!reachedEnd)\n {\n //get the neighbors from the most recent step on the path\n Collection<? extends Node> neighbors = shortestPath.getLast().getNeighbors();\n\n //minimum cost from neighbors\n Node minNode = null;\n\n for(Node n: neighbors)\n {\n if(minNode == null || nodeDists.get(n) < nodeDists.get(minNode))\n {\n minNode = n;\n\n if(nodeDists.get(n) == 0)\n {\n reachedEnd = true;\n break;\n }\n }\n }\n\n if(nodeDists.get(minNode) == Integer.MAX_VALUE) return null; //no path\n else shortestPath.addLast(minNode);\n }\n\n return shortestPath;\n }", "void dijkstra(Coordinate startName) {\n if (!graph.containsKey(startName)) {\n //test use print statement\n //System.out.printf(\"Graph doesn't contain start vertex \\\"%s\\\"\\n\", startName);\n return;\n }\n final Node source = graph.get(startName);\n NavigableSet<Node> queue = new TreeSet<>();\n\n // set-up vertices\n for (Node node : graph.values()) {\n node.previous = node == source ? source : null;\n node.dist = node == source ? 0 : Integer.MAX_VALUE;\n queue.add(node);\n }\n dijkstra(queue);\n }", "public double getMinimumDistance() {\n double l = Double.POSITIVE_INFINITY;\n int stop = getDistanceEnd();\n\n calculateDistances();\n\n for (int i = 0; i < stop; i++) {\n l = Math.min(l, distances[i]);\n }\n\n return l;\n }", "private void computePaths(Vertex source, Vertex target, ArrayList<Vertex> vs)\n {\n \tfor (Vertex v : vs)\n \t{\n \t\tv.minDistance = Double.POSITIVE_INFINITY;\n \t\tv.previous = null;\n \t}\n source.minDistance = 0.;\t\t// distance to self is zero\n IndexMinPQ<Vertex> vertexQueue = new IndexMinPQ<Vertex>(vs.size());\n \n for (Vertex v : vs) vertexQueue.insert(Integer.parseInt(v.id), v);\n\n\t\twhile (!vertexQueue.isEmpty()) \n\t\t{\n\t \t// retrieve vertex with shortest distance to source\n\t \tVertex u = vertexQueue.minKey();\n\t \tvertexQueue.delMin();\n\t\t\tif (u == target)\n\t\t\t{\n\t\t\t\t// trace back\n\t\t\t\twhile (u.previous != null)\n\t\t\t\t{;\n\t\t\t\t\tu = u.previous;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n \t// Visit each edge exiting u\n \tfor (Edge e : u.adjacencies)\n \t\t{\n \t\tVertex v = e.target;\n\t\t\t\tdouble weight = e.weight;\n \tdouble distanceThroughU = u.minDistance + weight;\n\t\t\t\tif (distanceThroughU < v.minDistance) \n\t\t\t\t{\n\t\t\t\t\tint vid = Integer.parseInt(v.id);\n\t\t \t\tvertexQueue.delete(vid);\n\t\t \t\tv.minDistance = distanceThroughU;\n\t\t \t\tv.previous = u;\n\t\t \t\tvertexQueue.insert(vid,v);\n\t\t\t\t}\n\t\t\t}\n }\n }", "private int[] prim(int startNode) {\n int[] attachmentCost = new int[numNodes]; // The minimum distance from each node to MST set\n int[] visitedNodes = new int[numNodes]; // The order of visited node\n int[] parents = new int[numNodes]; // The closest node from MST set to each node\n\n // Keep track of the order of attaching nodes.\n int attachingSequence = 0;\n\n Arrays.fill(parents, startNode);\n\n for (int i = 0; i < numNodes; i++) {\n // MST set only has startNode\n attachmentCost[i] = matrix[startNode][i];\n\n // Set all nodes unvisited\n visitedNodes[i] = -1;\n }\n\n // Put startNode into MST set as the root of the tree\n visitedNodes[startNode] = attachingSequence;\n\n for (int i = 0; i < numNodes - 1; i++) {\n int minCost = Integer.MAX_VALUE;\n int attachingNode = -1;\n\n // Find the minimum cost edge and corresponding node connected to MST set\n for (int j = 0; j < numNodes; j++) {\n if (visitedNodes[j] == -1 && attachmentCost[j] < minCost) {\n minCost = attachmentCost[j];\n attachingNode = j;\n }\n }\n\n if (attachingNode != -1) {\n visitedNodes[attachingNode] = ++attachingSequence;\n\n // Update attachmentCost for each node\n for (int j = 0; j < numNodes; j++) {\n if (visitedNodes[j] == -1 && matrix[attachingNode][j] >= 0 && matrix[attachingNode][j] < attachmentCost[j]) {\n attachmentCost[j] = matrix[attachingNode][j];\n parents[j] = attachingNode;\n }\n }\n }\n }\n return parents;\n }", "@Override\n\tpublic int compareTo(Node node) {\n\t\treturn minPath - node.minPath;\n\t}", "private void expandNode() {\r\n\t\t\t// Dijkstra's algorithm to handle separately\r\n\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\tCell u;\r\n\t\t\t\t// 11: while Q is not empty:\r\n\t\t\t\tif (graph.isEmpty()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// 12: u := vertex in Q (graph) with smallest distance in dist[]\r\n\t\t\t\t// ;\r\n\t\t\t\t// 13: remove u from Q (graph);\r\n\t\t\t\tu = graph.remove(0);\r\n\t\t\t\t// Add vertex u in closed set\r\n\t\t\t\tclosedSet.add(u);\r\n\t\t\t\t// If target has been found ...\r\n\t\t\t\tif (u.row == targetPos.row && u.col == targetPos.col) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Counts nodes that have expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[u.row][u.col] = CLOSED;\r\n\t\t\t\t// 14: if dist[u] = infinity:\r\n\t\t\t\tif (u.dist == INFINITY) {\r\n\t\t\t\t\t// ... then there is no solution.\r\n\t\t\t\t\t// 15: break;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t// 16: end if\r\n\t\t\t\t}\r\n\t\t\t\t// Create the neighbors of u\r\n\t\t\t\tArrayList<Cell> neighbors = createSuccesors(u, false);\r\n\t\t\t\t// 18: for each neighbor v of u:\r\n\t\t\t\tfor (Cell v : neighbors) {\r\n\t\t\t\t\t// 20: alt := dist[u] + dist_between(u, v) ;\r\n\t\t\t\t\tint alt = u.dist + distBetween(u, v);\r\n\t\t\t\t\t// 21: if alt < dist[v]:\r\n\t\t\t\t\tif (alt < v.dist) {\r\n\t\t\t\t\t\t// 22: dist[v] := alt ;\r\n\t\t\t\t\t\tv.dist = alt;\r\n\t\t\t\t\t\t// 23: previous[v] := u ;\r\n\t\t\t\t\t\tv.prev = u;\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[v.row][v.col] = FRONTIER;\r\n\t\t\t\t\t\t// 24: decrease-key v in Q;\r\n\t\t\t\t\t\t// (sort list of nodes with respect to dist)\r\n\t\t\t\t\t\tCollections.sort(graph, new CellComparatorByDist());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// The handling of the other four algorithms\r\n\t\t\t} else {\r\n\t\t\t\tCell current;\r\n\t\t\t\tif (dfs.isSelected() || bfs.isSelected()) {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms DFS and BFS\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET ...\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms A* and Greedy\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET,\r\n\t\t\t\t\t// for which f(Si) ≤ f(Sj) for all other\r\n\t\t\t\t\t// open states Sj ...\r\n\t\t\t\t\t// (sort first OPEN SET list with respect to 'f')\r\n\t\t\t\t\tCollections.sort(openSet, new CellComparatorByF());\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t}\r\n\t\t\t\t// ... and add it to CLOSED SET.\r\n\t\t\t\tclosedSet.add(0, current);\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[current.row][current.col] = CLOSED;\r\n\t\t\t\t// If the selected node is the target ...\r\n\t\t\t\tif (current.row == targetPos.row && current.col == targetPos.col) {\r\n\t\t\t\t\t// ... then terminate etc\r\n\t\t\t\t\tCell last = targetPos;\r\n\t\t\t\t\tlast.prev = current.prev;\r\n\t\t\t\t\tclosedSet.add(last);\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Count nodes that have been expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Here is the 4rd step of the algorithms\r\n\t\t\t\t// 4. Create the successors of Si, based on actions\r\n\t\t\t\t// that can be implemented on Si.\r\n\t\t\t\t// Each successor has a pointer to the Si, as its predecessor.\r\n\t\t\t\t// In the case of DFS and BFS algorithms, successors should not\r\n\t\t\t\t// belong neither to the OPEN SET nor the CLOSED SET.\r\n\t\t\t\tArrayList<Cell> succesors;\r\n\t\t\t\tsuccesors = createSuccesors(current, false);\r\n\t\t\t\t// Here is the 5th step of the algorithms\r\n\t\t\t\t// 5. For each successor of Si, ...\r\n\t\t\t\tfor (Cell cell : succesors) {\r\n\t\t\t\t\t// ... if we are running DFS ...\r\n\t\t\t\t\tif (dfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the beginning of the list\r\n\t\t\t\t\t\t// OPEN SET\r\n\t\t\t\t\t\topenSet.add(0, cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are runnig BFS ...\r\n\t\t\t\t\t} else if (bfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the end of the list OPEN SET\r\n\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are running A* or Greedy algorithms (step 5\r\n\t\t\t\t\t\t// of A* algorithm) ...\r\n\t\t\t\t\t} else if (aStar.isSelected() || guloso.isSelected()) {\r\n\t\t\t\t\t\t// ... calculate the value f(Sj) ...\r\n\t\t\t\t\t\tint dxg = current.col - cell.col;\r\n\t\t\t\t\t\tint dyg = current.row - cell.row;\r\n\t\t\t\t\t\tint dxh = targetPos.col - cell.col;\r\n\t\t\t\t\t\tint dyh = targetPos.row - cell.row;\r\n\t\t\t\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t\t\t\t// with diagonal movements\r\n\t\t\t\t\t\t\t// calculate 1000 times the Euclidean distance\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + (int) ((double) 1000 * Math.sqrt(dxg * dxg + dyg * dyg));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = (int) ((double) 1000 * Math.sqrt(dxh * dxh + dyh * dyh));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// without diagonal movements\r\n\t\t\t\t\t\t\t// calculate Manhattan distances\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + Math.abs(dxg) + Math.abs(dyg);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = Math.abs(dxh) + Math.abs(dyh);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcell.f = cell.g + cell.h;\r\n\t\t\t\t\t\t// ... If Sj is neither in the OPEN SET nor in the\r\n\t\t\t\t\t\t// CLOSED SET states ...\r\n\t\t\t\t\t\tint openIndex = isInList(openSet, cell);\r\n\t\t\t\t\t\tint closedIndex = isInList(closedSet, cell);\r\n\t\t\t\t\t\tif (openIndex == -1 && closedIndex == -1) {\r\n\t\t\t\t\t\t\t// ... then add Sj in the OPEN SET ...\r\n\t\t\t\t\t\t\t// ... evaluated as f(Sj)\r\n\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// ... if already belongs to the OPEN SET, then ...\r\n\t\t\t\t\t\t\tif (openIndex > -1) {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (openSet.get(openIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\topenSet.remove(openIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// ... if already belongs to the CLOSED SET,\r\n\t\t\t\t\t\t\t\t// then ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (closedSet.get(closedIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\tclosedSet.remove(closedIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "private void computeShortestPathsFromSource(V source) {\n\t\tBFSDistanceLabeler<V, E> labeler = new BFSDistanceLabeler<V, E>();\n\t\tlabeler.labelDistances(mGraph, source);\n\t\tdistances = labeler.getDistanceDecorator();\n\t\tMap<V, Number> currentSourceSPMap = new HashMap<V, Number>();\n\t\tMap<V, E> currentSourceEdgeMap = new HashMap<V, E>();\n\n\t\tfor (V vertex : mGraph.getVertices()) {\n\n\t\t\tNumber distanceVal = distances.get(vertex);\n\t\t\t// BFSDistanceLabeler uses -1 to indicate unreachable vertices;\n\t\t\t// don't bother to store unreachable vertices\n\t\t\tif (distanceVal != null && distanceVal.intValue() >= 0) {\n\t\t\t\tcurrentSourceSPMap.put(vertex, distanceVal);\n\t\t\t\tint minDistance = distanceVal.intValue();\n\t\t\t\tfor (E incomingEdge : mGraph.getInEdges(vertex)) {\n\t\t\t\t\tfor (V neighbor : mGraph\n\t\t\t\t\t\t\t.getIncidentVertices(incomingEdge)) {\n\t\t\t\t\t\tif (neighbor.equals(vertex))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t// V neighbor = mGraph.getOpposite(vertex,\n\t\t\t\t\t\t// incomingEdge);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tNumber predDistanceVal = distances.get(neighbor);\n\n\t\t\t\t\t\tint pred_distance = predDistanceVal.intValue();\n\t\t\t\t\t\tif (pred_distance < minDistance && pred_distance >= 0) {\n\t\t\t\t\t\t\tminDistance = predDistanceVal.intValue();\n\t\t\t\t\t\t\tcurrentSourceEdgeMap.put(vertex, incomingEdge);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmDistanceMap.put(source, currentSourceSPMap);\n\t\tmIncomingEdgeMap.put(source, currentSourceEdgeMap);\n\t}", "private void resolverBFS() {\n\t\tQueue<Integer> cola = new LinkedList<Integer>();\n\t\tint[] vecDistancia = new int[nodos.size()];\n\t\tfor (int i = 0; i < vecDistancia.length; i++) {\n\t\t\tvecDistancia[i] = -1;\n\t\t\trecorrido[i] = 0;\n\t\t}\n\t\tint nodoActual = 0;\n\t\tcola.add(nodoActual);\n\t\tvecDistancia[nodoActual] = 0;\n\t\trecorrido[nodoActual] = -1;\n\t\twhile (!cola.isEmpty()) {\n\t\t\tif (tieneAdyacencia(nodoActual, vecDistancia)) {\n\t\t\t\tfor (int i = 1; i < matrizAdyacencia.length; i++) {\n\t\t\t\t\tif (matrizAdyacencia[nodoActual][i] != 99 && vecDistancia[i] == -1) {\n\t\t\t\t\t\tcola.add(i);\n\t\t\t\t\t\tvecDistancia[i] = vecDistancia[nodoActual] + 1;\n\t\t\t\t\t\trecorrido[i] = nodoActual;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcola.poll();\n\t\t\t\tif (!cola.isEmpty()) {\n\t\t\t\t\tnodoActual = cola.peek();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public int minCost(int[] keys, int[] freq) {\n /* Create an auxiliary 2D matrix to store results of subproblems */\n int cost[][] = new int[keys.length][keys.length];\n\n /* cost[i][j] = Optimal cost of binary search tree that can be\n formed from input[i] to input[j].\n cost[0][n-1] will store the resultant cost */\n \n // For a single key, cost is equal to frequency of the key\n for (int i = 0; i < cost.length; i++) {\n cost[i][i] = freq[i];\n }\n \n // Now we need to consider chains of length 2, 3, ... .\n // L is chain length.\n for (int L = 2; L <= keys.length; L++) {\n \n // i is row number in cost[][]\n for (int i = 0; i <= keys.length - L; i++) {\n // Get column number j from row number i and chain length L\n int j = i + L - 1;\n cost[i][j] = Integer.MAX_VALUE;\n // get summation of array elements freq[i] to freq[j]\n int sum = getSum(freq, i, j);\n\n // Try making all keys 'k' in interval keys[i..j] as root\n for (int k = i; k <= j; k++) {\n // val = value when when keys[k] becomes root of this subtree\n int val = sum \n + (k - 1 < i ? 0 : cost[i][k - 1]) //add range before key\n + (k + 1 > j ? 0 : cost[k + 1][j]); //add range after key\n if (val < cost[i][j]) { //keep best cost\n cost[i][j] = val;\n }\n }\n }\n }\n return cost[0][keys.length - 1];\n }", "public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}", "private static double findMinCost(double lemda, Vector finalVector,\r\n Host currentNode,\r\n ArrayList neighbors,\r\n ArrayList destList)\r\n {\n int n = neighbors.size();\r\n int m = destList.size();\r\n int w = n > m ? m : n;\r\n\r\n double [] costFor_r = new double[w];\r\n\r\n double minCost = MaxDistance;\r\n double totalCurToAll = findDistanceCurToAll(currentNode, destList);\r\n for ( int r = 0 ; r < w; r ++ )\r\n {\r\n Vector rSetVector = new Vector();\r\n costFor_r[r] = getMinSetCost_given_r( r+1, rSetVector,\r\n currentNode,\r\n neighbors,\r\n destList);\r\n costFor_r[r] = (1.0 - lemda) * (r + 1) / n + costFor_r[r] / totalCurToAll;\r\n if ( costFor_r[r] < minCost ) {\r\n minCost = costFor_r[r];\r\n finalVector.clear();\r\n for (int k = 0; k < rSetVector.size(); ++k) {\r\n finalVector.add(k, rSetVector.get(k));\r\n }\r\n }\r\n }\r\n\r\n return minCost;\r\n }", "public int getShortestDistance(final Node source, final Node target) {\n return D[source.id][target.id];\n }", "private void bfs(int nodeKey) {\n Queue<Integer> q = new LinkedList<>();\n // initialize all the nodes\n for (node_data node : G.getV())\n node.setTag(0);\n\n int currentNode = nodeKey;\n\n // iterate the graph and mark nodes that have been visited\n while (G.getNode(currentNode) != null) {\n for (edge_data edge : G.getE(currentNode)) {\n node_data dest = G.getNode(edge.getDest());\n if (dest.getTag() == 0) {\n q.add(dest.getKey());\n }\n G.getNode(currentNode).setTag(1);\n }\n if(q.peek()==null)\n currentNode=-1;\n else\n currentNode = q.poll();\n }\n }", "public void dijkstra(int graphWeight[][], int source){\r\n\t\t\r\n\t\tint queue[] = new int[vertices]; //The array which will hold the shortest distance from source to node i\r\n\t\tboolean set[] = new boolean[vertices]; //It will store true for node i if the shortest path to that vertex or node is found\r\n\t\t\r\n\t\t//Initialize distances to infinity and set[] array to false \r\n\t\tfor(int i=0;i<vertices;i++){\r\n\t\t\tqueue[i] = Integer.MAX_VALUE; \r\n\t\t\tset[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Distance of source vertex from itself is always 0\r\n\t\tqueue[source] = 0;\r\n\r\n\t\t//Find shortest path of all the vertices\r\n\t\tfor(int count=0;count<vertices-1;count++){\r\n\t\t\t\r\n\t\t\t//Pick the minimum distance vertex from the from the set of vertices \r\n\t\t\t//not processed. u is equal to source in first iteration\r\n\t\t\tint u = extractMinDistance(queue, set);\r\n\t\t\t\r\n\t\t\t//Mark the picked vertex processed\r\n\t\t\tset[u] = true;\r\n\t\t\t//Update queue value of the adjacent vertices of the picked vertex\r\n\t\t\tfor(int v=0;v<vertices;v++)\r\n\t\t\t{\r\n\t\t\t\t//Update queue[v] only if\r\n\t\t\t\t// 1. It is not in set true in the Set Array\r\n\t\t\t\t// 2. There is an edge from u to v\r\n\t\t\t\t// 3. Total weight of path from source to v through u is smaller than current value of queue[v]\r\n\t\t\t\tif((graphWeight[u][v] > 0) && set[v] == false){\r\n\t\t\t\t\t\tif(queue[u] + graphWeight[u][v] < queue[v]){\r\n\t\t\t\t\t\t\tqueue[v] = queue[u] + graphWeight[u][v];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//printSolution(queue, vertices);\r\n\t\t}\r\n\t\t//Print the constructed distance array\r\n\t\tprintSolution(queue, vertices);\r\n\t}", "@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}", "public ArcGraph getMinDistanceArc(GraphNode pNode, double pWeight){\n ArcGraph result = null;\n double max_double = Double.MAX_VALUE;\n \n ArrayList<ArcGraph> conections = pNode.getConections();\n \n for (int i = 0; i < conections.size(); i++){\n if (conections.get(i).getWeight() + pWeight < max_double ){\n max_double = conections.get(i).getWeight(); //updates the min weight\n result = conections.get(i);\n }\n }\n return result;\n }", "public Vertex getNextVertex(List<Vertex> unvisitedNodes){\n Vertex smallest = null;\n for(Vertex vertex: unvisitedNodes){\n if(smallest==null)\n smallest = vertex;\n else if(distance.get(vertex)< distance.get(smallest))\n smallest = vertex;\n }\n return smallest;\n }", "@Override\r\n\tpublic void Dijkstra(E src) {\r\n\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getDistance() > (long)s.getDistance() + (long)ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(ale.getDst());\r\n\t\t\t\t\t\td.setDistance(s.getDistance() + ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static int distanceBetweenNodes(Node node, int d1, int d2){\n ArrayList<Integer> al1= nodeToRootPath(node,d1);\n ArrayList<Integer> al2=nodeToRootPath(node,d2);\n\n if(al1.size()==0 || al2.size()==0)\n return -1;\n int l1=al1.size()-1;\n int l2=al2.size()-1;\n\n while(l1>=0 && l2>=0)\n {\n if(al1.get(l1)==al2.get(l2))\n {\n l1--;l2--;continue;\n }\n else break;\n }\n return l1+l2+2;\n }", "public int dijkstra(int adj[][], int source,int des) {\n\t\tint temp2=0;\n\t\tint distance[]=new int[vertexs];\n\t\tBoolean span_tree[]=new Boolean[vertexs];\n\t\t\n\t\tfor(int i=0;i<vertexs;i++) {\n\t\t\tdistance[i]=Integer.MAX_VALUE;\n\t\t\tspan_tree[i]=false;\n\t\t}\n\t\tdistance[source]=0;\n\t\tfor(int i=0;i<vertexs-1;i++) {\n\t\t\tint u=minDistance(distance,span_tree);\n\t\t\tspan_tree[u]=true;\n\t\t\tfor(int v=0;v<vertexs;v++) {\n\t\t\t\tif(!span_tree[v] && adj[u][v]!=0 && distance[u]!=Integer.MAX_VALUE && distance[u]\n\t\t\t\t\t\t+ adj[u][v]<distance[v]) {\n\t\t\t\t\tdistance[v]=distance[u]+adj[u][v];\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemp2=distance[des];\n\t\t}\n\t\tprintGraph(distance,vertexs);\n\t\treturn temp2;\n\t}", "public static int AStar(AdjList<Integer> adjList, int startNode, int endNode, LinkedList<String> pathList) {\n //Valid AdjList\n if (adjList == null || adjList.size() == 0 || adjList.hasNegativeEdges())\n return Integer.MAX_VALUE;\n\n //Checks if start and end nodes exist in adjList\n if (!adjList.contains(startNode) || !adjList.contains(endNode))\n return Integer.MAX_VALUE;\n\n //Sets all node objects in adjList to defaults\n adjList.cleanNodeFields();\n\n //Fibonacci Heap for storing current shortest path + heuristic value as direction for search\n FibHeap<Integer, Integer> qh = new FibHeap<>();\n\n //Set source node value to 0\n qh.insert(adjList.getNode(startNode), 0);\n qh.peek().d = 0;\n qh.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//List of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;//Current Node with shortest path / top of min-queue\n int edgeWeight;\n while (qh.size() != 0) {\n u = qh.extractMin();\n u.closed = true;\n\n //endNode found\n if (Objects.equals(u.value, endNode)) {\n //Build path of vertexes\n Node<Integer, Integer> current = adjList.getNode(endNode);\n pathList.add(Integer.toString(current.value));\n while ((current = current.prev) != null)\n pathList.addFirst(Integer.toString(current.value));\n return u.d;\n }\n\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {//Loops through every neighbor\n neighbor = neighborKeyValuePair.getKey();\n edgeWeight = neighborKeyValuePair.getValue();\n\n //Node already has his min path\n if (neighbor.closed)\n continue;\n\n //Relaxation step\n //Checks if node has been visited before\n //Checks if distance to neighbor node is less than the min distance already found\n if (!neighbor.visited || neighbor.d > u.d + edgeWeight) {\n //Assign shorter path found to neighbor in out array\n neighbor.d = u.d + edgeWeight;\n\n //Assigns previous shortest node to neighbor\n neighbor.prev = u;\n\n //Adds neighbor to queue\n if (!neighbor.visited) {\n qh.insert(neighbor, u.d + edgeWeight + diagonalDistance(neighbor.value, endNode));\n neighbor.visited = true;\n } else {\n //Decreases the key for neighbor in queue\n qh.decreaseKey(neighbor,\n u.d + edgeWeight + diagonalDistance(neighbor.value, endNode));\n }\n }\n }\n }\n return Integer.MAX_VALUE;\n }", "public Key min(Node node)\n {\n \tif(node==null)\n \t\treturn null;\n \tif(node.left==null)\n \treturn node.key;\n \telse\n \t\treturn min(node.left);\n \t\n }", "public double getMinDistance(GraphNode pNode, double pWeight){\n double result = Double.MAX_VALUE;\n ArrayList<ArcGraph> conections = pNode.getConections();\n \n for (int i = 0; i < conections.size(); i++){\n if (conections.get(i).getWeight() + pWeight < result ){\n result = conections.get(i).getWeight();\n }\n }\n return result;\n }" ]
[ "0.7048734", "0.68453205", "0.6761433", "0.66345596", "0.65546566", "0.63557214", "0.6322946", "0.62526834", "0.6236612", "0.6210339", "0.6191034", "0.6172588", "0.6137057", "0.6094233", "0.6089035", "0.6052574", "0.60518676", "0.6041192", "0.6034667", "0.6027773", "0.59936225", "0.59601045", "0.59337664", "0.5930913", "0.5929535", "0.58864313", "0.5869946", "0.5863727", "0.5845786", "0.5837097", "0.58323085", "0.5832298", "0.5825578", "0.58171445", "0.5813575", "0.5790525", "0.5764527", "0.5762325", "0.57615435", "0.57488537", "0.5739189", "0.57369137", "0.5727614", "0.57257587", "0.5724249", "0.5712292", "0.56946653", "0.5656741", "0.5654652", "0.5634432", "0.5628387", "0.56207746", "0.5616958", "0.5613963", "0.56113744", "0.5603178", "0.55969566", "0.5596327", "0.5584676", "0.55751115", "0.5565606", "0.5563506", "0.555451", "0.55505884", "0.5543447", "0.55427235", "0.553017", "0.55277586", "0.5520136", "0.54958254", "0.54875046", "0.5477895", "0.5475527", "0.54662335", "0.5461486", "0.545918", "0.5457979", "0.5445622", "0.543764", "0.5426258", "0.5418329", "0.54162276", "0.54141325", "0.54131836", "0.54089946", "0.54081434", "0.5406791", "0.5399934", "0.5377423", "0.53609324", "0.53583795", "0.5356601", "0.5338571", "0.53320104", "0.53274983", "0.53201336", "0.5319104", "0.5318225", "0.5313184", "0.53121626" ]
0.7257185
0
Computes influence of a node, given its distances from all other nodes O(n)
private float getTotal(HashMap<Integer, Integer> distances){ float result = 0.0f; Iterator it = distances.entrySet().iterator(); while(it.hasNext()){ Map.Entry pair = (Map.Entry)it.next(); result += (1/(Math.pow(2, (Integer)pair.getKey()))) * (Integer)pair.getValue(); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float influence(ArrayList<String> s)\n {\n HashMap<Integer, Integer> distances = new HashMap<>();\n HashMap<String, Integer> nodeDistances = new HashMap<>();\n\n for(String node : s){\n if(!graphVertexHashMap.containsKey(node)) continue;\n //At the end nodeDistances will contain min distance from all nodes to all other nodes\n getMinDistances(node, distances, nodeDistances);\n }\n distances = new HashMap<>();\n Iterator it = nodeDistances.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry entry = (Map.Entry) it.next();\n Integer distance = (Integer) entry.getValue();\n if(distances.containsKey(distance)){\n distances.put(distance, distances.get(distance)+1);\n }else{\n distances.put(distance, 1);\n }\n }\n return getTotal(distances);\n\n\n\n// float sum = 0.0f;\n// for(int i =0; i < numVertices; i++){\n// int y = gety(s, i);\n//// System.out.println(\"i is \" + i + \" and nodes at distance are \" + y);\n// sum += (1/(Math.pow(2,i)) * y);\n// }\n// return sum;\n }", "@Override\n\tpublic float estimate (Node node, Node endNode) {\n\t\treturn (float) Math.abs(endNode.position.distance(node.position));\n\t}", "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }", "Integer cost(PathFindingNode node, PathFindingNode neighbour);", "float getTransferFunction(ArrayList<INode> Nodes, ArrayList edges);", "double treeNodeTargetFunctionValue(){\n\t\t\t//loop counter variable\n\t\t\tint i;\n\t\t\t\n\t\t\t//stores the cost\n\t\t\tdouble sum = 0.0;\n\n\t\t\tfor(i=0; i<this.n; i++){\n\t\t\t\t//stores the distance\n\t\t\t\tdouble distance = 0.0;\n\n\t\t\t\t//loop counter variable\n\t\t\t\tint l;\n\n\t\t\t\tfor(l=0;l<this.points[i].dimension;l++){\n\t\t\t\t\t//centroid coordinate of the point\n\t\t\t\t\tdouble centroidCoordinatePoint;\n\t\t\t\t\tif(this.points[i].weight != 0.0){\n\t\t\t\t\t\tcentroidCoordinatePoint = this.points[i].coordinates[l] / this.points[i].weight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcentroidCoordinatePoint = this.points[i].coordinates[l];\n\t\t\t\t\t}\n\t\t\t\t\t//centroid coordinate of the centre\n\t\t\t\t\tdouble centroidCoordinateCentre;\n\t\t\t\t\tif(this.centre.weight != 0.0){\n\t\t\t\t\t\tcentroidCoordinateCentre = this.centre.coordinates[l] / this.centre.weight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcentroidCoordinateCentre = this.centre.coordinates[l];\n\t\t\t\t\t}\n\t\t\t\t\tdistance += (centroidCoordinatePoint-centroidCoordinateCentre) * \n\t\t\t\t\t\t\t(centroidCoordinatePoint-centroidCoordinateCentre) ;\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tsum += distance*this.points[i].weight;\t\n\t\t\t}\n\t\t\treturn sum;\n\t\t}", "private double actionCost(StarNode node) {\n StarNode previous = node.getPreviousNode();\n double xDist = previous.getXCoord() - node.getXCoord();\n double yDist = previous.getYCoord() - node.getYCoord();\n double totalDist = Math.sqrt(xDist*xDist + yDist*yDist);\n node.setG(previous.getG() + totalDist);\n return node.getG();\n }", "void calculate_distance()\n {\n \t\n \tfor(int i = 0; i<V ; i++)\n \t{\n \t\tfor(int j = 0; j<E ; j++)\n \t\t{\n \t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n \t\t}\n \t\tsp[i] = dist[i];\n \t\tx[i] = dist[i];\n \t}\n \tSystem.out.println();\n }", "public double distanceBetweenNodes(Node from, Node to) {\n double dx = from.getX() - to.getX();\n double dy = from.getY() - to.getY();\n \n if (to.isObstacle()) { \n return Double.MAX_VALUE / 2;\n }\n else {\n return Math.sqrt((dx * dx) + (dy * dy));\n }\n }", "private int dist(int city1, int city2){\n\t\treturn this.getGraph().getWeight(city1, city2);\n\t}", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 - n2;\r\n\t}", "public List<Node> getAdjacent(Node node){\n\n int nodeX, x = node.getX();\n int nodeY, y = node.getY();\n List<Node> adj = new ArrayList<Node>();\n\n for(Node n:allNodes){\n if(n.isReachable()) {\n nodeX = n.getX();\n nodeY = n.getY();\n if ((Math.abs(nodeX - x) == 1 && nodeY == y) || (nodeX == x && Math.abs(nodeY - y) == 1)) {\n adj.add(n);\n //if(node.getCost()==n.getCost()||n.getCost()==1) n.setCost(node.getCost()+1);\n }\n }\n }\n\n return adj;\n }", "double estimatedDistanceToGoal(Vertex s, Vertex goal);", "public int getDistanceTo(int node) {\n return this.distance[node];\n }", "double getWeight(int node) {\n\n return this.neighbors.get(node);\n }", "public float influence(String u)\n {\n if(influences.containsKey(u)) return influences.get(u);\n HashMap<Integer, Integer> distances = new HashMap<>();\n HashMap<String, Integer> nodeDistances = new HashMap<>();\n getMinDistances(u, distances, nodeDistances);\n\n if(distances.size() == 0) return 0.0f;\n\n float sum = getTotal(distances);\n influences.putIfAbsent(u, sum);\n return sum;\n\n// float sum = 0.0f;\n// for(int i =0; i < numVertices; i++){\n// int y = gety(u, i);\n// sum += (1/(Math.pow(2,i)) * y);\n// }\n//\n// return sum;\n }", "private double distanceEstimate(Node a, Node b){\n return Math.abs(a.getFloor() - b.getFloor()) * FLOOR_COST + distanceBetween(a,b);\n }", "public void calculate() {\r\n\t\tint bias = hasBias();\r\n\r\n\t\tfor(int i = bias; i < getNeurons().size(); i++) {\r\n\t\t\tgetNeurons().get(i).activate(); \r\n\t\t}\r\n\t}", "double treeNodeCostOfPoint(treeNode node, Point p){\n\t\tif(p.weight == 0.0){\n\t\t\treturn 0.0;\n\t\t}\n\n\t\t//stores the distance between centre and p\n\t\tdouble distance = 0.0;\n\t\t\n\t\t//loop counter variable\n\t\tint l;\n\n\t\tfor(l=0;l<p.dimension;l++){\n\t\t\t//centroid coordinate of the point\n\t\t\tdouble centroidCoordinatePoint;\n\t\t\tif(p.weight != 0.0){\n\t\t\t\tcentroidCoordinatePoint = p.coordinates[l] / p.weight;\n\t\t\t} else {\n\t\t\t\tcentroidCoordinatePoint = p.coordinates[l];\n\t\t\t}\n\t\t\t//centroid coordinate of the centre\n\t\t\tdouble centroidCoordinateCentre;\n\t\t\tif(node.centre.weight != 0.0){\n\t\t\t\tcentroidCoordinateCentre = node.centre.coordinates[l] / node.centre.weight;\n\t\t\t} else {\n\t\t\t\tcentroidCoordinateCentre = node.centre.coordinates[l];\n\t\t\t}\n\t\t\tdistance += (centroidCoordinatePoint-centroidCoordinateCentre) * \n\t\t\t\t\t(centroidCoordinatePoint-centroidCoordinateCentre) ;\n\t\t\t\t\t\n\t\t}\n\t\treturn distance * p.weight;\n\t}", "double treeNodeSplitCost(treeNode node, Point centreA, Point centreB){\n\t\t//loop counter variable\n\t\tint i;\n\t\t\n\t\t//stores the cost\n\t\tdouble sum = 0.0;\n\t\t\n\t\tfor(i=0; i<node.n; i++){\n\t\t\t//loop counter variable\n\t\t\tint l;\t\n\n\t\t\t//stores the distance between p and centreA\n\t\t\tdouble distanceA = 0.0;\n\n\t\t\tfor(l=0;l<node.points[i].dimension;l++){\n\t\t\t\t//centroid coordinate of the point\n\t\t\t\tdouble centroidCoordinatePoint;\n\t\t\t\tif(node.points[i].weight != 0.0){\n\t\t\t\t\tcentroidCoordinatePoint = node.points[i].coordinates[l] / node.points[i].weight;\n\t\t\t\t} else {\n\t\t\t\t\tcentroidCoordinatePoint = node.points[i].coordinates[l];\n\t\t\t\t}\n\t\t\t\t//centroid coordinate of the centre\n\t\t\t\tdouble centroidCoordinateCentre;\n\t\t\t\tif(centreA.weight != 0.0){\n\t\t\t\t\tcentroidCoordinateCentre = centreA.coordinates[l] / centreA.weight;\n\t\t\t\t} else {\n\t\t\t\t\tcentroidCoordinateCentre = centreA.coordinates[l];\n\t\t\t\t}\n\n\t\t\t\tdistanceA += (centroidCoordinatePoint-centroidCoordinateCentre) * \n\t\t\t\t\t\t(centroidCoordinatePoint-centroidCoordinateCentre) ;\n\t\t\t}\n\n\t\t\t//stores the distance between p and centreB\n\t\t\tdouble distanceB = 0.0;\n\n\t\t\tfor(l=0;l<node.points[i].dimension;l++){\n\t\t\t\t//centroid coordinate of the point\n\t\t\t\tdouble centroidCoordinatePoint;\n\t\t\t\tif(node.points[i].weight != 0.0){\n\t\t\t\t\tcentroidCoordinatePoint = node.points[i].coordinates[l] / node.points[i].weight;\n\t\t\t\t} else {\n\t\t\t\t\tcentroidCoordinatePoint = node.points[i].coordinates[l];\n\t\t\t\t}\n\t\t\t\t//centroid coordinate of the centre\n\t\t\t\tdouble centroidCoordinateCentre;\n\t\t\t\tif(centreB.weight != 0.0){\n\t\t\t\t\tcentroidCoordinateCentre = centreB.coordinates[l] / centreB.weight;\n\t\t\t\t} else {\n\t\t\t\t\tcentroidCoordinateCentre = centreB.coordinates[l];\n\t\t\t\t}\n\n\t\t\t\tdistanceB += (centroidCoordinatePoint-centroidCoordinateCentre) * \n\t\t\t\t\t\t(centroidCoordinatePoint-centroidCoordinateCentre) ;\n\t\t\t}\n\n\t\t\t//add the cost of the closest centre to the sum\n\t\t\tif(distanceA < distanceB){\n\t\t\t\tsum += distanceA*node.points[i].weight;\n\t\t\t} else {\n\t\t\t\tsum += distanceB*node.points[i].weight;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t//return the total cost\n\t\treturn sum;\n\n\t}", "@Override\n public double computeLikeliness(Node node1, Node node12) {\n return 0;\n }", "public double relativeInterference(Node w, Link a) {\n\t\tif (w == a.getSender()) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn sigma*Math.pow(a.getLength()/w.distanceToOtherNode(a.getReceiver()),exp)\n\t\t\t/(1-Math.pow(a.getLength()/max_rad,exp));\n\t}", "Integer distance(PathFindingNode a, PathFindingNode b);", "public abstract double distanceTo (Object object);", "private double computeForcesWithNeighbourCells() {\r\n double potentialEnergy = 0;\r\n for (Cell[] cellPair: neighbourCells) { \r\n if (cellPair[1].firstMolecule == null) continue; // If cell2 is empty, skip\r\n \r\n for (Molecule m1 = cellPair[0].firstMolecule; m1 != null; m1 = m1.nextMoleculeInCell) {\r\n for (Molecule m2 = cellPair[1].firstMolecule; m2 != null; m2 = m2.nextMoleculeInCell) {\r\n double pe = computeForceBetweenMolecules(m1, m2);\r\n if (pe != 0) {\r\n potentialEnergy += pe;\r\n }\r\n }\r\n }\r\n }\r\n return potentialEnergy;\r\n }", "private double calcErrForNeighbour(GNode node) {\n return 0.0;\n }", "@Override\r\n double computeAccelerations() {\r\n double potentialEnergy;\r\n \r\n potentialEnergy = computeWallForces();\r\n assignMoleculesToCells(); \r\n potentialEnergy += computeForcesWithinCells();\r\n potentialEnergy += computeForcesWithNeighbourCells();\r\n \r\n return potentialEnergy;\r\n }", "public static void computeDistanceToAllNodes()\r\n\t{\r\n\t\tScanner scan = new Scanner(System.in); // instance for input declared\r\n\t\tSystem.out.print(\"\\nPlease enter the Source node to show all distances: \");\r\n\t\tint src = scan.nextInt() - 1; // taking source node input\r\n\t\t\r\n\t\twhile(src < 0 || src > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered source node is out of range, please enter again: \"); // Printing error\r\n\t\t\tsrc = scan.nextInt() - 1;\t//re-input source\r\n\t\t}\r\n\t\t\r\n\t\tconnectNetwork(src, -1, false);\r\n\t}", "public int distanceTo(final int one) {\n int total = 0;\n for (Edge each : pathTo(one)) {\n total += each.getWeight();\n }\n return total;\n }", "private double calculateMinkowski(kNNNode oNode, int p){\n double sum = 0.0;\n // Using the center of mass, perform the summation of (Xk - Yk) where k\n // is a given attribute index.\n double[] temp = oNode.getData();\n for( int i = 0; i < NUM_ATTRIBUTES; i++) {\n sum += Math.pow(this.data[i] - temp[i], p);\n }\n // raise the summation to the power of 1/p to finish the euclidean\n // calculation.\n return (Math.pow(sum, 1/(double) p));\n }", "void onNodeNeighbourChange(World world, BlockPos pos, BlockPos neighbourPos);", "public abstract float getCost(AStarNode paramAStarNode);", "public void recalculateNodesVectors(int width) {\n List<double[]> inputVectors = new ArrayList<double[]>();\n // use squar of distance\n for (ReferenceNode node : nodeList) {\n Point location = node.getLocation();\n List<ReferenceNode> neighborNodes = getNodesWithin(location, width);\n inputVectors.clear();\n for (ReferenceNode neighborNode : neighborNodes) {\n List<double[]> data = neighborNode.getInputVectors();\n if (data != null)\n inputVectors.addAll(data);\n }\n // If nothing in the inputVectors, keep the original value\n if (inputVectors.size() > 0) {\n double[] newVector = average(inputVectors);\n node.setReferenceVector(newVector);\n }\n }\n // Have to empty input nodes\n for (ReferenceNode node : nodeList) {\n node.resetInputVectors();\n node.resetLabels();\n }\n }", "public void processNode(Node node, float delta);", "private double heuristic(Node a, Node b){\n\n // absolute value of the differences in floors\n return Math.abs(a.getFloor() - b.getFloor());\n }", "public double getFinalDistance(){\n return valori.get(end_node);\n }", "public abstract float getEstimatedCost(AStarNode paramAStarNode);", "public double differentialValue(Edge[] edges){\n\t\tdouble result = 0;\n\t\tint limit = edges.length-1;\t//ugly but quick versino of the loop\n\n\t\tfor (int i=limit;i>=0;i--)\t\t//sum all weights times their node's value\n\t\t\tresult += (edges[i].getWeight()*edges[i].getSource().value());\t\n\t\t\n\t\treturn 1/Math.cosh(k * result) * k / 2;\n\t}", "public void calculateCost() {\n\t\tthis.cost = 0.0;\n\t\t\n\t\tint i, count = this.cities.size()-1;\n\t\tfor (i = 0; i < count; i++)\n\t\t\tthis.cost += this.cities.get(i).distances[this.cities.get(i+1).index];\n\n\t\tthis.cost += this.cities.get(count).distances[this.cities.get(0).index];\n\t}", "private double findEvolutionaryDistanceHelper(PhyloTreeNode ancestor, PhyloTreeNode node) {\n if(ancestor == null || ancestor == node) {\n return 0.0;\n }\n if(ancestor.getLeftChild() != null && ancestor.getLeftChild().getLabel().contains(node.getLabel())) {\n return (ancestor.getDistanceToChild() + findEvolutionaryDistanceHelper(ancestor.getLeftChild(), node));\n }\n else if (ancestor.getRightChild() != null && ancestor.getRightChild().getLabel().contains(node.getLabel())) {\n return (ancestor.getDistanceToChild() + findEvolutionaryDistanceHelper(ancestor.getRightChild(), node));\n }\n else{\n return 0.0;\n }\n }", "public double calculateDistance(kNNNode oNode, int p) {\n return calculateMinkowski(oNode, p);\n }", "public void recalculateNodes(int width) {\n int x, y, minX, minY, maxX, maxY;\n List<Set<String>> inputData = new ArrayList<Set<String>>();\n // use squar of distance\n for (ReferenceNode node : nodeList) {\n Point location = node.getLocation();\n x = location.x;\n y = location.y;\n minX = Math.max(0, x - width);\n minY = Math.max(0, y - width);\n maxX = Math.min(SOM.X_LENGTH - 1, x + width);\n maxY = Math.min(SOM.Y_LENGTH - 1, y + width);\n inputData.clear();\n for (x = minX; x < maxX + 1; x++) {\n for (y = minY; y < maxY + 1; y++) {\n ReferenceNode neighborNode = getNodeAt(x, y);\n List<Set<String>> data = neighborNode.getInputData();\n if (data != null)\n inputData.addAll(data);\n }\n }\n // Set<String> newData = average(inputData);\n // node.setReferenceData(newData);\n node.setInputReferenceData(inputData);\n }\n // Have to empty input nodes\n for (ReferenceNode node : nodeList)\n node.resetInputData();\n }", "public double getDistance(Node start, Node end) {\n\tstartX = start.getX();\n\tstartY = start.getY();\n\tendX = end.getX();\n\tendY = end.getY();\n\n int Xsquared = (startX - endX) * (startX - endX);\n\tint Ysquared = (startY - endY) * (startY - endY);\n\n\treturn Math.sqrt(Xsquared + Ysquared);\n\t\n }", "@Override\n\t\tpublic double heuristic() {\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tsum += Math.abs(xGoals[i] - state[i]);\n\t\t\t\tsum += Math.abs(yGoals[i] - state[k + i]);\n\t\t\t}\n\t\t\treturn sum;\n\t\t}", "public static int[] bellf_access(Graph graph, Vertex start, Vertex destination) {\n\t\tint[] readWriteAccess = {0,0,0};\n\t\t\n\t\t//initialize\n\t\tArrayList<Integer> distance = new ArrayList<Integer>(); \n\t\tArrayList<Vertex> predecessor = new ArrayList<Vertex>();\n\t\t\t\n\t\tfor(Vertex v : graph.getVertexes()) {\n\t\t\treadWriteAccess[0]++;\n\t\t\treadWriteAccess[1]++;\n\t\t\tif(v == start) {\n\t\t\t\tdistance.add(0);\n\t\t\t\treadWriteAccess[2]++;\n\t\t\t\tpredecessor.add(v);\n\t\t\t\treadWriteAccess[2]++;\n\t\t\t} else {\n\t\t\t\tdistance.add(Integer.MAX_VALUE);\n\t\t\t\treadWriteAccess[2]++;\n\t\t\t\tpredecessor.add(null);\n\t\t\t\treadWriteAccess[2]++;\n\t\t\t}\n\t\t\treadWriteAccess[1]++;\n\t\t}\n\t\t\t\t\n\t\t//iterate\n\t\t//number of iterations\n\t\tfor(int i = 0; i < graph.getVertexes().size(); i++) {\n\t\t\treadWriteAccess[0]++;\n\t\t\treadWriteAccess[1]++;\n\t\t\tfor(Vertex s : graph.getVertexes()) {\n\t\t\t\treadWriteAccess[0]++;\n\t\t\t\treadWriteAccess[1]++;\n\t\t\t\tint indexS = graph.getVertexes().indexOf(s);\n\t\t\t\treadWriteAccess[2]++;\n\t\t\t\treadWriteAccess[0]++;\n\t\t\t\treadWriteAccess[1]++;\n\t\t\t\tfor(Vertex t : graph.getTarget(s)) {\n\t\t\t\t\treadWriteAccess[0]++;\n\t\t\t\t\treadWriteAccess[1]++;\n\t\t\t\t\tint indexT = graph.getVertexes().indexOf(t);\n\t\t\t\t\treadWriteAccess[2]++;\n\t\t\t\t\treadWriteAccess[0]++;\n\t\t\t\t\treadWriteAccess[1]++;\n\t\t\t\t\tint cost = add(distance.get(indexS), graph.getValE(s, t, \"cost\")); //evaluate new costs\n\t\t\t\t\treadWriteAccess[2]++;\n\t\t\t\t\treadWriteAccess[0]++;\n\t\t\t\t\treadWriteAccess[1]++;\n\t\t\t\t\tif(distance.get(indexT) > cost) { //if new costs are lower, replace old costs and change predecessor\n\t\t\t\t\t\tdistance.set(indexT, cost);\n\t\t\t\t\t\treadWriteAccess[2]++;\n\t\t\t\t\t\tpredecessor.set(indexT, s);\n\t\t\t\t\t\treadWriteAccess[2]++;\n\t\t\t\t\t}\n\t\t\t\t\treadWriteAccess[1]++;\n\t\t\t\t}\n\t\t\t}\n\t\t} //check for negative circle\n\t\tfor(int i = 0; i < graph.getVertexes().size(); i++) {\n\t\t\tfor(Vertex s : graph.getVertexes()) {\n\t\t\t\treadWriteAccess[0]++;\n\t\t\t\treadWriteAccess[1]++;\n\t\t\t\tint indexS = graph.getVertexes().indexOf(s);\n\t\t\t\treadWriteAccess[2]++;\n\t\t\t\treadWriteAccess[0]++;\n\t\t\t\treadWriteAccess[1]++;\n\t\t\t\tfor(Vertex t : graph.getTarget(s)) {\n\t\t\t\t\treadWriteAccess[0]++;\n\t\t\t\t\treadWriteAccess[1]++;\n\t\t\t\t\tint indexT = graph.getVertexes().indexOf(t);\n\t\t\t\t\treadWriteAccess[2]++;\n\t\t\t\t\treadWriteAccess[0]++;\n\t\t\t\t\treadWriteAccess[1]++;\n\t\t\t\t\tint cost = add(distance.get(indexS), graph.getValE(s, t, \"cost\"));\n\t\t\t\t\treadWriteAccess[2]++;\n\t\t\t\t\treadWriteAccess[0]++;\n\t\t\t\t\treadWriteAccess[1]++;\n\t\t\t\t\tif(distance.get(indexT) > cost) {\n\t\t\t\t\t\tSystem.out.println(\"negativer Kreis gefunden\");\n\t\t\t\t\t\treturn readWriteAccess; //if there are lower costs again, return null and an errormessage.\n\t\t\t\t\t}\n\t\t\t\t\treadWriteAccess[1]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get vertices for shortest way\n\t\tArrayList<Vertex> path = new ArrayList<Vertex>();\n\t\tVertex tmp = destination; //from destination\n\t\treadWriteAccess[2]++;\n\t\tpath.add(tmp);\n\t\treadWriteAccess[2]++;\n\t\twhile(tmp != start) {\n\t\t\treadWriteAccess[1]++;\n\t\t\tif(tmp == null) {//to start\n\t\t\t\treturn readWriteAccess;\n\t\t\t}\n\t\t\treadWriteAccess[1]++;\n\t\t\ttmp = predecessor.get(graph.getVertexes().indexOf(tmp));\n\t\t\treadWriteAccess[2]++;\n\t\t\treadWriteAccess[0]++;\n\t\t\treadWriteAccess[1]++;\n\t\t\tpath.add(tmp);\n\t\t\treadWriteAccess[2]++;\n\t\t}\n\t\tCollections.reverse(path); //reverse, so it has right order\n\t\treadWriteAccess[1]++;\n\t\treadWriteAccess[2]++;\n\t\treturn readWriteAccess; //and return it.\n\t}", "public int calculateEnergyDiff(int x,int y) {\n int energy = 0;\n int energyFlipped = 0;\n \n for (int i = x-1; i <= x+1; i+=2) {\n for (int j = y-1; j <= y+1; j+=2) {\n //if (!IsingLattice.isNeighbour(i,j,x,y)) continue;\n int i1 = (i+m)%m;\n int j1 = (j+m)%m;\n energy += -lattice[x][y]*lattice[i1][j1];\n energyFlipped += lattice[x][y]*lattice[i1][j1];\n }\n }\n return (energyFlipped - energy);\n }", "public abstract double calculateDistance(double[] x1, double[] x2);", "public static int distanceBetweenNodes(Node node, int d1, int d2){\n ArrayList<Integer> al1= nodeToRootPath(node,d1);\n ArrayList<Integer> al2=nodeToRootPath(node,d2);\n\n if(al1.size()==0 || al2.size()==0)\n return -1;\n int l1=al1.size()-1;\n int l2=al2.size()-1;\n\n while(l1>=0 && l2>=0)\n {\n if(al1.get(l1)==al2.get(l2))\n {\n l1--;l2--;continue;\n }\n else break;\n }\n return l1+l2+2;\n }", "private void euclidean(Node node, int d){\n int row1 = this.row;\n int col1 = this.col;\n int row2 = node.getRow();\n int col2 = node.getCol();\n\n double aSquared = Math.pow((row1-row2), 2);\n double bSquared = Math.pow((col1-col2), 2);\n\n if(d == 0) //Euclidean normal\n this.hVal = (float)Math.sqrt(aSquared+bSquared);\n else //Euclidean squared\n this.hVal = (float)(aSquared+bSquared);\n\n }", "double getDistance(Point p);", "private int getWeight(Node source, Node target) {\n LinkedList<Edge> edges = source.getEdges();\n for (Edge edge : edges) {\n if (edge.getDestination() == target) {\n return edge.getWeight();\n }\n }\n return 0;\n }", "public abstract int getNumberOfLivingNeighbours(int x, int y);", "public void recordNodeDistances(Node start, Node end)\n {\n HashSet<Node> inStack = new HashSet<Node>();\n LinkedList<Node> nodeStack = new LinkedList<Node>();\n\n nodeStack.push(start);\n\n Node curNode;\n\n while(!nodeStack.isEmpty())\n {\n //shortest distance from end to start = shortest distance of neighbor to start\n curNode = nodeStack.peekFirst();\n Collection<? extends Node> neighbors = curNode.getNeighbors();\n\n if(curNode == end) //if we've reached the end\n {\n nodeDists.put(curNode, 0); //the distance to the end is 0 (obviously)\n\n inStack.remove(curNode); //remove from our store of nodes that are in the stack\n nodeStack.removeFirst();\n }\n else\n {\n boolean readyForEval = true; //is node ready to have the min distance calculated?\n\n for (Node n : neighbors)\n {\n if (!nodeDists.containsKey(n) && !inStack.contains(n))\n {\n nodeStack.addFirst(n); //in order to calculate the min distance to target any neighbors not in\n inStack.add(n); //the stack must have already been calculated. Neighbors still in the stack\n //are to be considered closer to the source and, thus, \"behind\" curNode\n readyForEval = false;\n }\n }\n\n if (readyForEval)\n {\n int minDist = getMinDist(curNode); //get the minimum distance from this node to the target\n\n nodeDists.put(curNode, minDist); //if unreachable, distance is maxValue\n nodeStack.removeFirst();\n inStack.remove(curNode);\n }\n }\n }\n }", "private double computeModularityGain(Node i, String C) {\n\n\t\tdouble sumIn = 0;\n\t\tdouble sumTot = 0;\n\t\tdouble ki = 0;\n\t\tdouble kiin = 0;\n\n\t\tfor (Object o : G.getEdges()) {\n\t\t\tEdge e = (Edge) o;\n\t\t\tString start = e.getStartNode().getCommunity(scale);\n\t\t\tString end = e.getEndNode().getCommunity(scale);\n\t\t\t// Sum of the weights of the links inside the community.\n\t\t\tif (start.equals(C) && start.equals(end))\n\t\t\t\tsumIn += Double.parseDouble((String) e.getValue(key));\n\t\t\t// Sum of the weights of the links incident to the community.\n\t\t\tif (start.equals(C) && !end.equals(C) || !start.equals(C) && end.equals(C))\n\t\t\t\tsumTot += Double.parseDouble((String) e.getValue(key));\n\t\t\t// Sum of the weights of the links from i to nodes in C.\n\t\t\tif (start.equals(C) && e.getEndNode() == i || e.getStartNode() == i\n\t\t\t\t\t&& end.equals(C))\n\t\t\t\tkiin += Double.parseDouble((String) e.getValue(key));\n\t\t\t// Sum of the weights of the edges attached to vertex i.\n\t\t\tif (e.getStartNode() == i || e.getEndNode() == i)\n\t\t\t\tki += Double.parseDouble((String) e.getValue(key));\n\t\t}\n\n\t\tdouble dQ = 0;\n\t\tdouble m2 = 2 * m;\n\t\t// (SumIn + kiin)/2m\n\t\tdQ = (sumIn + kiin) / m2;\n\t\t// - ((sumTot + ki)/2m)²\n\t\tdQ = dQ - Math.pow((sumTot + ki) / m2, 2);\n\t\t// - [sumIn/2m - (sumTot/2m)² - (ki/2m)²]\n\t\tdQ = dQ\n\t\t\t\t- (sumIn / m2 - Math.pow(sumTot / m2, 2) - Math.pow(ki / m2, 2));\n\n\t\treturn dQ;\n\t}", "abstract ArrayList<Pair<Integer,Double>> adjacentNodes(int i);", "@Override\n\tpublic double getCommitment(int nodeIndex) {\n\t\tdouble den = this.inWeights[nodeIndex] + this.outWeights[nodeIndex];\n\t\tif (den == 0)\n\t\t\treturn 0;\n\t\treturn this.inWeights[nodeIndex] / den;\n\t}", "private void calculateNewIntensity(BSTNode node) {\r\n \r\n // if the node is NOT null, execute if statement\r\n if (node != null) {\r\n \r\n // call method on left node\r\n calculateNewIntensity(node.getLeft());\r\n \r\n // visit the node (calculate and assign new intensity value)\r\n node.newIntensity(node);\r\n \r\n // call method on right node\r\n calculateNewIntensity(node.getRight());\r\n }\r\n }", "public ArrayList<Double> calculateForward(ArrayList<Example> data) {\n\t\t// store outputs from hidden layer for each example\n\t\t// array will have size # examples.\n\t\tArrayList<Double> nodeOutputs = new ArrayList<Double>();\n\n\t\t// randomly shuffle training data\n\t\tCollections.shuffle(data);\n\n\t\t// go through each example and calculate forwards\n\t\tfor (Example ex : data) {\n\t\t\t// get associated weight in hiddenWeights & calculate dot product,\n\t\t\t// run through tanh function\n\t\t\tdouble bias = ex.getFeature(ex.getFeatureSet().size() - 1);\n\t\t\tArrayList<Double> thisNodeOutputs = new ArrayList<Double>();\n\t\t\t// loop through features, and the weight vector for each feature\n\t\t\tfor (int n = 0; n < numHidden; n++) {\n\t\t\t\tdouble thisNode = 0.0; // get dot product of f & h for each node\n\t\t\t\tArrayList<Double> weightVec = hiddenWeights.get(n);\n\t\t\t\tSet<Integer> features = ex.getFeatureSet();\n\t\t\t\tIterator<Integer> iter = features.iterator();\n\t\t\t\tfor (int i = 0; i < features.size(); i++) {\n\t\t\t\t\tdouble featureVal = ex.getFeature(iter.next());\n\t\t\t\t\tdouble weight = weightVec.get(i);\n\t\t\t\t\tthisNode += weight * featureVal;\n\t\t\t\t}\n\t\t\t\tthisNodeOutputs.add(Math.tanh(thisNode * bias));\n\t\t\t}\n\t\t\thiddenOutputs.add(thisNodeOutputs);\n\t\t\t// now do same for output layer\n\t\t\tdouble outSum = 0.0;\n\t\t\tfor (int i = 0; i < numHidden; i++) {\n\t\t\t\tdouble w = layerTwoWeights.get(i);\n\t\t\t\tdouble output = thisNodeOutputs.get(i);\n\t\t\t\toutSum += w * output;\n\t\t\t}\n\t\t\tnodeOutputs.add(Math.tanh(outSum * bias));\n\t\t}\n\t\treturn nodeOutputs;\n\t}", "public double distanceBetween(Node a, Node b){\n // used to be its own function, now is implemented in the Node class\n return a.getDist(b);\n }", "public double getEdge(int node1, int node2)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2))\n\t{\n\t\tNode s=(Node) getNodes().get(node1);\n\t\tif(s.getEdgesOf().containsKey(node2))\n\t\t{\n \t\t\t\t\n\t\treturn s.getEdgesOf().get(node2).get_weight();\n\t\t\t\t\t\t\n\t\t}\n\t}\n\t \n\t return -1;\n\n}", "double getDistance();", "public abstract double distanceFrom(double x, double y);", "public double frogPosition(int n, int[][] edges, int t, int target) {\n Map<Integer, List<Integer>> tree = new HashMap<>();\n for(int[] edge : edges) {\n List<Integer> children = tree.getOrDefault(edge[0], new ArrayList<>());\n children.add(edge[1]);\n tree.put(edge[0], children);\n\n children = tree.getOrDefault(edge[1], new ArrayList<>());\n children.add(edge[0]);\n tree.put(edge[1], children);\n }\n\n Queue<Node> queue = new LinkedList<>();\n Set<Integer> visited = new HashSet<>();\n queue.offer(new Node(1, 1.0));\n while(!queue.isEmpty() && t >= 0) {\n int size = queue.size();\n for(int i = 0; i < size; i++) {\n Node node = queue.poll();\n\n visited.add(node.index);\n List<Integer> children = tree.getOrDefault(node.index, new ArrayList<>())\n .stream()\n .filter(obj -> !visited.contains(obj))\n .collect(Collectors.toList());\n if(node.index == target && (t == 0 || children.size() == 0)) {\n return node.p;\n }\n for(int child : children) {\n queue.offer(new Node(child, node.p / (double)children.size()));\n }\n }\n t--;\n }\n return 0;\n }", "private void e_Neighbours(int u){ \n int edgeDistance = -1; \n int newDistance = -1; \n \n // All the neighbors of v \n for (int i = 0; i < adj.get(u).size(); i++) { \n Node v = adj.get(u).get(i); \n \n // If current node hasn't already been processed \n if (!settled.contains(v.node)) { \n edgeDistance = v.cost; \n newDistance = dist[u] + edgeDistance; \n \n // If new distance is cheaper in cost \n if (newDistance < dist[v.node]) \n dist[v.node] = newDistance; \n \n // Add the current node to the queue \n pq.add(new Node(v.node, dist[v.node])); \n } \n } \n }", "private double costOf(int w) {\n\t\treturn getVertex(w).getCost();\n\t}", "public int bellman(Edge[] graph, int start, int end, int n) {\n int[] dist = new int[n+1];\n fill(dist, inf);\n dist[start] = 0;\n\n for(int i=1; i<=n; i++) {\n for(Edge e: graph) {\n dist[e.to] = min(dist[e.from] + e.weight, dist[e.to]);\n }\n }\n\n if(hasNegCycle(graph, dist, end)) {\n return -1;\n } else if(dist[end] == inf){\n return -2;\n } else {\n return dist[end];\n }\n }", "public double getTotalAdjacentInternalWeight(int nodeIndex) {\n\t\treturn this.inWeights[nodeIndex];\n\t}", "public static int distanceBetweenNodes(Node node, int d1, int d2){\r\n ArrayList<Integer> path1 = nodeToRootPath(node, d1);\r\n ArrayList<Integer> path2 = nodeToRootPath(node, d2);\r\n \r\n //Traverse from behind to avoid time complexity\r\n int i = path1.size() - 1;\r\n int j = path2.size() - 1;\r\n \r\n //Check for valid iterations and till the time data is common, first occurence of diff data in arraulist is the time to stop\r\n while(i>=0 && j>=0 && path1.get(i) == path2.get(j)){\r\n i--; j--;\r\n }\r\n \r\n //Here returning i+1 and j+1 means there are i+1 elements left and j+1 elements left which are not common in \r\n //both ArrayList so answer will be addition of these, it will give us the distance between two nodes\r\n //+1 is two times for two edges between i to LCA and j to LCA\r\n return (i+1) + (j+1);\r\n }", "private static int calculateEuclidianDistance(Node actualNode, Node targetNode)\n\t{\n\t\t\n\t\treturn (int)Math.sqrt(Math.pow((actualNode.getRow() - targetNode.getRow()), 2) +\n\t\t\t\t\tMath.pow((actualNode.getColumn() - targetNode.getColumn()), 2));//distance*(int)Math.sqrt(dx+dy);\n\t}", "private static int MHDistance(int NODE1, int NODE2) {\n return Math.abs((NODE1 >> 16) - (NODE2 >> 16)) + Math.abs((NODE1 & 0x00FF) - (NODE2 & 0x00FF));\n }", "protected double getCost(double[] n) throws Exception {\n\t\tdouble[] da = this.outputDifferences(n);\n\t\tdouble o = 0;\n\t\tfor (double d : da) o += d*d;\n\t\treturn o;\n\t}", "public abstract double getDistance(T o1, T o2) throws Exception;", "public Map<Node<T>, Cost> dijkstra(T start) throws NodeNotFoundException {\n Node<T> origin = findNode(start);\n Map<Node<T>, Cost> costs = new HashMap<>();\n List<Node<T>> alreadyVisited = new ArrayList<>();\n\n // Step 1 : Initialization\n // Set every cost to infinity, except for the starting summit which is set to 0\n for(Node<T> node : getNodes()) {\n if(origin.equals(node)) { costs.put(node, new Cost(0.0)); }\n else { costs.put(node, new Cost()); }\n }\n\n while(ArrayMethods.similarity(getNodes(), alreadyVisited) != order()) {\n // Step 2 : Taking the node with the smallest cost\n Node<T> reference = Cost.findMin(costs, alreadyVisited);\n\n // Step 3 : Updating the table with the costs from that node\n for(WeightedLink link : findLinks(reference.getData())) {\n Node<T> other = (Node<T>) link.getOther(reference);\n Cost oldCost = costs.get(other);\n double old = oldCost.getCost();\n double cost = link.getWeight() + costs.get(reference).getCost();\n\n costs.put(other, (cost < old) ? new Cost(cost, reference) : oldCost);\n }\n\n // Step 4 : Repeat with the smallest costing summit that wasn't visited already\n alreadyVisited.add(reference);\n }\n\n return costs;\n }", "public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }", "public double distance(){\n return DistanceTraveled;\n }", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 / n2;\r\n\t}", "public BellmanFord(Edge[] edges, int nodes, int start) {\n distances = new int[nodes];\n parent = new int[nodes];\n child = new int[nodes];\n hasNegativeCycle = new boolean[nodes];\n boolean[] checked = new boolean[nodes];\t//used when checking for negative cycles\n boolean negativeCycle = false;\t\t\t//has ANY negative cycle\n\n //Step 1: Initialize\n for (int i = 0; i < nodes; i++) {\n distances[i] = Integer.MAX_VALUE;\n parent[i] = NOPARENT;\n child[i] = NOPARENT;\n hasNegativeCycle[i] = false;\n }\n distances[start] = 0;\n parent[start] = start; //start is itselves parent\n \n //Step 2: Find shortest distance from start to any other node\n for (int step = 0; step < nodes; step++) {\n for (int i = 0; i < edges.length; i++) {\n int from = edges[i].from;\n if (distances[from] == Integer.MAX_VALUE) {\n //infinite + something == infinite, therefore skip this one!\n continue;\n }\n int to = edges[i].to;\n\n if (distances[from] + edges[i].weight < distances[to]) {\n distances[to] = distances[from] + edges[i].weight;\n //System.err.println(\"from \" + from + \" to \" + to + \" dist[to] \" + distances[to]);\n parent[to] = from;\n child[from] = to;\n }\n }\n }\n \n //Step 3-1: Detect Negative Cycles:\n for (int i = 0; i < edges.length; i++) {\n int from = edges[i].from;\n int to = edges[i].to;\n \n if(hasNegativeCycle[from] && hasNegativeCycle[to]){\n continue;\n }\n if(parent[from] == NOPARENT){\n checked[from] = true;\n continue;\n }\n if (distances[from] + edges[i].weight < distances[to]) {\n negativeCycle = true;\n int tmp = from;\n while(tmp != to && tmp >= 0 && !checked[tmp]){\n \t//Mark the whole negative cycle as negative cycle! \n \t//Note that this will not detect elements that branch from the negative cycle as negative cycle!\n markNegativeCycle(checked, tmp);\n tmp = parent[tmp];\n }\n markNegativeCycle(checked, to);\n }\n }\n if(negativeCycle == false){\n \t//If no negative cycle detected, then we are done!\n return;\n }\n //Step 3-2: Mark ALL elements that are reached through a negative cycle as negative cycle!\n checked[start] = true; //We have checked start, prevents infinite loop\n for(int i = 0; i < nodes; i++){\n if(checked[i] == false){\n int tmp = parent[i];\n checked[i] = true;\n while(true){\n \t//Mark elements reached t\n if(tmp == NOPARENT){\n break;\n }else if(checked[tmp] && hasNegativeCycle[tmp] == false){\n \t//Reached start or a non-negative-cycle part of the graph, done checking this part\n break;\n }else if(hasNegativeCycle[tmp]){\n \t//If parent of i has negative cycle\n \t//then reach through everything reached by it and mark as negative cycle\n tmp = i;\n while(hasNegativeCycle[tmp] == false){\n markNegativeCycle(checked, tmp);\n tmp = parent[tmp];\n }\n break;\n }\n checked[tmp] = true;\n tmp = parent[tmp];\n }\n }\n }\n }", "ArrayList<PathFindingNode> neighbours(PathFindingNode node);", "public int distance(Coord coord1, Coord coord2);", "public void batchUpdateWeights() {\n\t\tObject[] keys = nextLayerNodes.keySet().toArray();\n\t\tfor (Object key : keys) {\n\t\t\tNode nextLayerNode = (Node) key;\n\t\t\t// System.out.printf(\"Updating weight from %f to %f%n\", nextLayerNodes.get(nextLayerNode), nextLayerNodesUpdateMap.get(nextLayerNode));\n\t\t\tdouble oldWeight = nextLayerNodes.get(nextLayerNode);\n\t\t\tnextLayerNodes.put(nextLayerNode, nextLayerNodesUpdateMap.get(nextLayerNode));\n\t\t\tdouble newWeight = nextLayerNodes.get(nextLayerNode);\n\t\t\tdouble deltaWeight = oldWeight-newWeight;\n\t\t\tSystem.out.printf(\"Changed from %f to %f%n\", oldWeight, newWeight);\n\t\t\tif (deltaWeight > 0.0) {\n\t\t\t\tif (nextLayerNodesArrayList.get(0).nextLayerNodes.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"Hidden Node connected to output layer \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Node connected to another hidden layer \");\n\t\t\t\t}\n\t\t\t\tSystem.out.printf (\"Increased!! Delta weight = %.10f%n\", deltaWeight);\n\t\t\t} else if (deltaWeight < 0.0) {\n\t\t\t\tif (nextLayerNodesArrayList.get(0).nextLayerNodes.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"Hidden Node connected to output layer \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Node connected to another hidden layer \");\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"Decreased!! Delta weight = %.10f%n\", deltaWeight);\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected SearchResponse compute() {\n if (this.searchRoot.children == null || this.searchRoot.children.isEmpty()) {\n return new SearchResponse(searchRoot.weight, null);\n }\n\n // Search child nodes recursively\n List<UnbalancedNodeSearcher> subtasks = new ArrayList<>(searchRoot.children.size());\n for (Node n : searchRoot.children) {\n UnbalancedNodeSearcher subtask = new UnbalancedNodeSearcher(n);\n subtasks.add(subtask);\n subtask.fork();\n }\n\n // Use a map to vote for the \"wrong\"(i.e. minority) disc weight\n Map<Long, AtomicLong> totalWeight = new HashMap<>();\n\n // To find out who reported the \"wrong\" weight\n Map<Long, Node> resultNodeMap = new HashMap<>();\n for (UnbalancedNodeSearcher searcher : subtasks) {\n SearchResponse response = searcher.join();\n\n // The search is over\n if (response.foundResult != null) {\n return response;\n }\n\n resultNodeMap.put(response.subSum, searcher.searchRoot);\n\n totalWeight.computeIfAbsent(response.subSum, (i) -> new AtomicLong(0L)).incrementAndGet();\n }\n\n if (totalWeight.size() == 1) {\n // Since there's only one\n long subtotal = totalWeight.keySet().iterator().next();\n long total = subtotal * subtasks.size() + searchRoot.weight;\n\n return new SearchResponse(total, null);\n } else if (totalWeight.size() == 2) {\n long correctWeight = -1;\n long wrongWeight = -1;\n for (Map.Entry<Long, AtomicLong> entry : totalWeight.entrySet()) {\n if (entry.getValue().get() != 1L) {\n correctWeight = entry.getKey();\n } else {\n wrongWeight = entry.getKey();\n }\n }\n\n return new SearchResponse(null, resultNodeMap.get(wrongWeight).weight - (wrongWeight - correctWeight));\n } else {\n throw new RuntimeException(\"More than one incorrect nodes\");\n }\n }", "private double distanceToGo(StarNode node, StarNode goal) {\n double xDist = goal.getXCoord() - node.getXCoord();\n double yDist = goal.getYCoord() - node.getYCoord();\n double distToGo = Math.sqrt(xDist*xDist + yDist*yDist);\n /*************************************************************\n * This is where the new elevator stuff was added\n **************************************************************/\n// if(node.getNodeType().equals(\"STAI\")) {\n// distToGo = 4 * distToGo;// * Math.abs(Integer.parseInt(node.getFloor()) - Integer.parseInt(goal.getFloor()));\n// }\n// else if(node.getNodeType().equals(\"ELEV\")) {\n// distToGo = 0 * distToGo;// * Math.abs(Integer.parseInt(node.getFloor()) - Integer.parseInt(goal.getFloor()));\n// }\n return distToGo;\n }", "public int getMinDist(Node n)\n {\n int minNeighborDist = Integer.MAX_VALUE - 1;\n\n Collection<? extends Node> neighbors = n.getNeighbors();\n\n for (Node x : neighbors)\n {\n if (nodeDists.containsKey(x) && nodeDists.get(x) < minNeighborDist)\n {\n minNeighborDist = nodeDists.get(x);\n }\n }\n\n return minNeighborDist+1;\n }", "private void heuristicSetter(Node node){\n int goalNodeFirstDigit = Integer.parseInt(goalNode.getDigit().getFirst_digit());\n int goalNodeSecondDigit = Integer.parseInt(goalNode.getDigit().getSecond_digit());\n int goalNodeThirdDigit = Integer.parseInt(goalNode.getDigit().getThird_digit());\n\n int nodeFirstDigit = Integer.parseInt(node.getDigit().getFirst_digit());\n int nodeSecondDigit = Integer.parseInt(node.getDigit().getSecond_digit());\n int nodeThirdDigit = Integer.parseInt(node.getDigit().getThird_digit());\n\n int heuristic = Math.abs(goalNodeFirstDigit - nodeFirstDigit)+\n Math.abs(goalNodeSecondDigit - nodeSecondDigit)+\n Math.abs(goalNodeThirdDigit - nodeThirdDigit);\n\n node.setHeuristic(heuristic);\n }", "public double distance() {\n \tif (dist == -1) {\n \t\tdist = distance(vertex1, vertex2);\n \t}\n \n \treturn dist;\n }", "public abstract double GetDistance();", "public abstract List<AStarNode> getNeighbours();", "public float getDistance();", "@Override\r\n\tpublic LinkedHashMap<IPSNode, Double> calculateEndNodeProbabilities() {\r\n\t\tfinal LinkedHashMap<IPSNode, Double> oResults = new LinkedHashMap<IPSNode, Double>();\r\n\r\n\t\t// loop through CPU nodes\r\n\t\tfor (final CPUNode cpuNode : getChildren()) {\r\n\t\t\t// get results for this CPU (unweighted at this point)\r\n\t\t\tfinal HashMap<IPSNode, Double> cpuProbabilityResults = cpuNode\r\n\t\t\t\t\t.calculateEndNodeProbabilities();\r\n\r\n\t\t\t// loop through unweighted CPU results, and add to output map with\r\n\t\t\t// the weighting applied\r\n\t\t\tfor (final Entry<IPSNode, Double> cpuProbabilityResult : cpuProbabilityResults\r\n\t\t\t\t\t.entrySet()) {\r\n\t\t\t\tfinal IPSNode ipsNodeForCPU = cpuProbabilityResult.getKey();\r\n\t\t\t\tfinal Double ipsNodeResultForCPU = cpuProbabilityResult\r\n\t\t\t\t\t\t.getValue();\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * add to results\r\n\t\t\t\t */\r\n\t\t\t\tDouble currentProbabilityForIPSNode = oResults\r\n\t\t\t\t\t\t.get(ipsNodeForCPU);\r\n\r\n\t\t\t\tif (currentProbabilityForIPSNode == null) {\r\n\t\t\t\t\t// we have not dealt with this node before\r\n\t\t\t\t\tcurrentProbabilityForIPSNode = Double.valueOf(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// add to results, applying weighting based on the CPU state\r\n\t\t\t\tcurrentProbabilityForIPSNode = Double\r\n\t\t\t\t\t\t.valueOf(currentProbabilityForIPSNode.doubleValue()\r\n\t\t\t\t\t\t\t\t+ (cpuNode.getProbability() * ipsNodeResultForCPU));\r\n\r\n\t\t\t\t// put new value to the result map\r\n\t\t\t\toResults.put(ipsNodeForCPU, currentProbabilityForIPSNode);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn oResults;\r\n\t}", "private static void dfsBribe(int n, List<Integer>[] ch, long[] w) {\n if (ch[n].size() == 0){\n In[n] = w[n];\n OutD[n] = Long.MAX_VALUE;\n OutU[n] = 0;\n }\n //recurrance case: non.leaf, do dfs for all subordinates then calculate In, OutUp & OutDown.\n else{\n for (int c:ch[n])\n dfsBribe(c, ch, w); //running once for each child thereby O(N)\n In[n] = w[n];\n for (int c:ch[n]){ //O(N) running time\n In[n] += OutU[c];\n OutU[n] += Math.min(In[c], OutD[c]);\n OutD[n] += Math.min(In[c], OutD[c]);\n }\n OutD[n] += delta(n, ch); //add delta for no in Children\n }\n\n }", "public List<Double> calculate1a(List<C> listOfNodes,double a, double b);", "public double value(Edge[] edges){\n\t\tdouble result = 0;\n\t\tint limit = edges.length-1;\t//ugly but quick versino of the loop\n\n\t\tfor (int i=limit;i>=0;i--)\t\t//sum all weights times their node's value\n\t\t\tresult += (edges[i].getWeight()*edges[i].getSource().value());\t\n\t\t\n\t\treturn hypTan(result);\t//take hypTan of that to smoothly combine\n\t}", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 * n2;\r\n\t}", "public int weight ();", "public double cost(Path<T> p) throws LinkNotFoundException, NodeNotFoundException {\n double cost = 0.0;\n\n for(int i = 0 ; i < p.size() - 1 ; i++) {\n Node<T> start = p.get(i);\n Node<T> end = p.get(i + 1);\n\n WeightedLink l = findLink(start.getData(), end.getData());\n\n cost += l.getWeight();\n }\n\n return cost;\n }", "public int getNetworth();", "@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}", "public static double getDistance(Node a, Node b) {\n return Math.abs(a.getX() - b.getX()) + Math.abs(a.getY() - b.getY());\n }", "double squaredDistanceTo(IMovingObject m);", "void bellman_ford(int s)\n {\n int dist[]=new int[V]; \n \n //to track the path from s to all\n int parent[]=new int[V] ;\n //useful when a vertex has no parent\n for(int i=0;i<V;i++)\n parent[i]=-2;\n \n for(int i=0;i<V;i++) \n dist[i]=INF;\n \n //start from source vertex\n dist[s]=0;\n parent[s]=-1;\n \n //we have to iterate over all the edges for V-1 times\n //each ith iteration finds atleast ith path length dist\n //worst case each ith will find ith path length \n \n for(int i=1;i<V;i++) \n {\n for(int j=0;j<E;j++)\n {\n //conside for all edges (u,v), wt\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt; \n //since dist[u]=INF and adding to it=>overflow, therefore check first\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n dist[v]=dist[u]+wt;\n parent[v]=u;\n } \n }\n }\n \n //iterate for V-1 times, one more iteration necessarily gives a path length of atleast V in W.C=>cycle\n for(int j=0;j<E;j++) \n {\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt;\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n System.out.println(\"Graph has cycle\");\n return;\n } \n }\n \n //print the distance to all from s\n System.out.println(\"from source \"+s+\" the dist to all other\");\n print_dist(dist); \n print_path(parent,dist,s); \n \n }", "public float getCost(Node n){\n char t1 = this.type;\n char t2 = n.getType();\n int row1 = this.row;\n int col1 = this.col;\n int row2 = n.getRow();\n int col2 = n.getCol();\n boolean straight;\n\n if(row1 == row2 || col1 == col2)\n straight = true;\n else\n straight = false;\n\n if(straight){\n switch (t1){\n case '1':\n switch (t2){\n case '1':\n return 1;\n case '2':\n return (float)1.5;\n case 'a':\n return 1;\n case 'b':\n return (float)1.5;\n }\n break;\n case '2':\n switch (t2){\n case '1':\n return (float)1.5;\n case '2':\n return 2;\n case 'a':\n return (float)1.5;\n case 'b':\n return 2;\n }\n break;\n case 'a':\n switch (t2){\n case '1':\n return 1;\n case '2':\n return (float)1.5;\n case 'a':\n return (float).25;\n case 'b':\n return (float).375;\n }\n break;\n case 'b':\n switch (t2){\n case '1':\n return (float)1.5;\n case '2':\n return 2;\n case 'a':\n return (float).375;\n case 'b':\n return (float).25;\n }\n break;\n }\n } else{\n switch(t1){\n case '1':\n switch (t2){\n case 'a':\n case '1':\n return (float)Math.sqrt(2);\n case '2':\n case 'b':\n return (float)((Math.sqrt(2)+Math.sqrt(8))/2);\n }\n break;\n case '2':\n switch (t2){\n case 'a':\n case '1':\n return (float)((Math.sqrt(2)+Math.sqrt(8))/2);\n case '2':\n case 'b':\n return (float)Math.sqrt(8);\n }\n break;\n case 'a':\n switch (t2){\n case 'a':\n case '1':\n return (float)Math.sqrt(2);\n case '2':\n case 'b':\n return (float)((Math.sqrt(2)+Math.sqrt(8))/2);\n }\n break;\n case 'b':\n switch (t2){\n case 'a':\n case '1':\n return (float)((Math.sqrt(2)+Math.sqrt(8))/2);\n case '2':\n case 'b':\n return (float)Math.sqrt(8);\n }\n break;\n }\n }\n\n return 0;\n }" ]
[ "0.70283854", "0.61093956", "0.6019422", "0.5927096", "0.5855591", "0.57570165", "0.5732765", "0.5667724", "0.56621724", "0.5620132", "0.5609803", "0.55623984", "0.55450135", "0.55349857", "0.55298436", "0.5481707", "0.5468481", "0.5437973", "0.5423531", "0.53574127", "0.535341", "0.53533435", "0.5337255", "0.5317537", "0.5316154", "0.53110623", "0.53081554", "0.53001237", "0.52888536", "0.5252655", "0.52476233", "0.5240228", "0.5224779", "0.5224109", "0.5219169", "0.52105606", "0.5198401", "0.5197742", "0.51898897", "0.5185633", "0.5164466", "0.5158493", "0.5150185", "0.51365244", "0.51217043", "0.5104225", "0.50745094", "0.50718594", "0.5070017", "0.5065139", "0.5062975", "0.50526863", "0.5050683", "0.50503695", "0.50357336", "0.50352347", "0.5027093", "0.5019939", "0.50048083", "0.4981389", "0.49782893", "0.49765876", "0.49760005", "0.49591365", "0.495875", "0.49574083", "0.4947778", "0.49428877", "0.49409106", "0.49370658", "0.49367818", "0.4924523", "0.4923042", "0.4921883", "0.49216288", "0.49214816", "0.49191165", "0.49170735", "0.49167672", "0.491086", "0.49049222", "0.490367", "0.489993", "0.48977894", "0.48954862", "0.48847967", "0.48838183", "0.4880357", "0.48797077", "0.48776338", "0.4876153", "0.48731217", "0.48721007", "0.4867276", "0.4866811", "0.4866388", "0.4860731", "0.4860495", "0.48600855", "0.48572624", "0.48562586" ]
0.0
-1
O(n) or Best Case O(1) if node u has been calculated before
public float influence(String u) { if(influences.containsKey(u)) return influences.get(u); HashMap<Integer, Integer> distances = new HashMap<>(); HashMap<String, Integer> nodeDistances = new HashMap<>(); getMinDistances(u, distances, nodeDistances); if(distances.size() == 0) return 0.0f; float sum = getTotal(distances); influences.putIfAbsent(u, sum); return sum; // float sum = 0.0f; // for(int i =0; i < numVertices; i++){ // int y = gety(u, i); // sum += (1/(Math.pow(2,i)) * y); // } // // return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void e_Neighbours(int u){ \n int edgeDistance = -1; \n int newDistance = -1; \n \n // All the neighbors of v \n for (int i = 0; i < adj.get(u).size(); i++) { \n Node v = adj.get(u).get(i); \n \n // If current node hasn't already been processed \n if (!settled.contains(v.node)) { \n edgeDistance = v.cost; \n newDistance = dist[u] + edgeDistance; \n \n // If new distance is cheaper in cost \n if (newDistance < dist[v.node]) \n dist[v.node] = newDistance; \n \n // Add the current node to the queue \n pq.add(new Node(v.node, dist[v.node])); \n } \n } \n }", "@Override\n public boolean add(E e) {\n// checkNotNull(e, \"e == null\");\n @SuppressWarnings(\"unchecked\")\n final Node<E>[] update = new Node[MAX_LEVEL];\n final int newLevel = randomLevel();\n Node<E> x = head;\n Node<E> y = head;\n int i;\n int idx = 0;\n for (i = level - 1; i >= 0; i--) {\n while (x.next[i] != y && comparator.compare(x.next[i].element, e) < 0) {\n idx += x.dist[i];\n x = x.next[i];\n }\n y = x.next[i];\n update[i] = x;\n index[i] = idx;\n }\n if (newLevel > level) {\n for (i = level; i < newLevel; i++) {\n head.dist[i] = size + 1;\n update[i] = head;\n }\n level = newLevel;\n }\n x = new Node<E>(e, newLevel);\n for (i = 0; i < level; i++) {\n if (i > newLevel - 1)\n update[i].dist[i]++;\n else {\n x.next[i] = update[i].next[i];\n update[i].next[i] = x;\n x.dist[i] = index[i] + update[i].dist[i] - idx;\n update[i].dist[i] = idx + 1 - index[i];\n\n }\n }\n x.prev = update[0];\n x.next().prev = x;\n modCount++;\n size++;\n return true;\n }", "protected void xremove(Node<T> u) {\n\t\tif (u == r) {\n\t\t\tremove();\n\t\t} else {\n\t\t\tif (u == u.parent.left) {\n\t\t\t\tu.parent.left = nil;\n\t\t\t} else {\n\t\t\t\tu.parent.right = nil;\n\t\t\t}\n\t\t\tu.parent = nil;\n\t\t\tr = merge(r, u.left);\n\t\t\tr = merge(r, u.right);\n\t\t\tr.parent = nil;\n\t\t\tn--;\n\t\t}\n\t}", "public void UpNumberOfVisitedNodes() {\n NumberOfVisitedNodes++;\n }", "void pairwiseCombine(){\n\t\t\n\t\tmin.Left.Right = min.Right;\n\t\tmin.Right.Left = min.Left;\n\t\t/**\n\t\tPairwise combine differentiates itself in operation of depending on the presence of a child node\n\t\t*/\n\t\t\n\t\tif(min.Child==null){\n\t\t/*map acts as the table to store similar degree nodes*/\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Right;\n\t\t\tmin = null;\n\t\t\tmin = current;\n\t\t\tlast = current.Left;\n\t\t\twhile(current!=last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\t\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\t\n\t\t\t\t\t/*Since a parent node can have only one child node a condition is checked to update its child node*/\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t/*If the node stored is less than the incoming node*/\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\tif(temp.Child == temp.Child.Right){\n\t\t\t\t\t\t\t\ttemp.Child.Right = current;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t/*If the incoming node is lower*/\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\t\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\t/*Since our condition is used only till last node and exits during last node the iteration is repeated for the last node*/\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\n\t\t}\n\t\telse{\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Child;\n\t\t\tcurrent.Parent = null;\n\t\t\tif(min!=min.Right){\n\t\t\t\tcurrent.Right.Left = min.Left;\n\t\t\t\tmin.Left.Right = current.Right;\n\t\t\t\tcurrent.Right = min.Right;\n\t\t\t\tmin.Right.Left = current;\n\t\t\t\tlast = current.Left;\n\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlast = current.Left;\n\n\t\t\t}\n\t\t\tmin =null;\n\t\t\tmin = current;\n\t\t\t/*In the presence of a child the child has to be inserted at the top level*/\n\t\t\twhile(current != last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\n\t\t\t\twhile(map.containsKey(current.degree)){\n\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist && temp.dist!=0){\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\t\t}\n\n\t}", "public abstract int getNodeDegree(N value);", "private int first_leaf() { return n/2; }", "static int APUtil(ArrayList<Arista>[] adj, int u, boolean visited[], int disc[], int low[], int parent[], int ap[]){\n\n // Count of children in DFS Tree\n int children = 0;\n\n // Mark the current node as visited\n visited[u] = true;\n\n // Initialize discovery time and low value\n disc[u] = low[u] = ++time;\n\n // Go through all vertices aadjacent to this\n for (Arista arista : adj[u]) {\n int v = arista.to; // v is current adjacent of u\n\n // If v is not visited yet, then make it a child of u\n // in DFS tree and recur for it\n if (!visited[v]) {\n children++;\n parent[v] = u;\n sol = APUtil(adj, v, visited, disc, low, parent, ap);\n\n // Check if the subtree rooted with v has a connection to\n // one of the ancestors of u\n low[u] = Math.min(low[u], low[v]);\n\n // u is an articulation point in following cases\n\n // (1) u is root of DFS tree and has two or more chilren.\n if (parent[u] == -1 && children > 1){\n ap[u]++;\n if((ap[u] > ap[sol]) || (ap[u] == ap[sol] && u < sol))\n sol = u;\n }\n\n\n // (2) If u is not root and low value of one of its child\n // is more than discovery value of u.\n if (parent[u] != -1 && low[v] >= disc[u]){\n ap[u]++;\n if((ap[u] > ap[sol]) || (ap[u] == ap[sol] && u < sol))\n sol = u;\n }\n\n }\n\n // Update low value of u for parent function calls.\n else if (v != parent[u])\n low[u] = Math.min(low[u], disc[v]);\n }\n\n return sol;\n }", "public boolean insert(int u, int v) {\n\n forward.addEdge(u, v);\n backward.addEdge(v, u);\n\n // classify the insertion of the edge\n int type = T.classifyInsertion(u, v);\n\n // type 1 insertion: do nothing\n if (type == 1) return true;\n\n //type 3 insertion: absorb free nodes\n if (type == 3) {\n\n MetaNode x = T.getMetaNode(u);\n MetaNode y = T.getMetaNode(v);\n\n // least common ancestor of x and y\n MetaNode z = T.leastCommonAncestor(x, y);\n\n HashSet<Integer> F = z.getMid().getSet();\n ArrayList<Integer> orderF = z.getMid().getOrder();\n\n HashSet<Integer> A = new HashSet<Integer>();\n HashSet<Integer> B = new HashSet<Integer>();\n\n int recourse = 0;\n\n if (F.contains(v)) {\n forward.restrictedDFS(v, F, A);\n ArrayList<Integer> orderA = new ArrayList<Integer>();\n orderA.addAll(orderF);\n orderA.retainAll(A);\n z.getMid().removeFromSet(A);\n recourse = T.ADD(z.getRight(), A, B, orderA, new ArrayList<Integer>(), forward, backward);\n }\n if (F.contains(u)) {\n backward.restrictedDFS(u, F, B);\n ArrayList<Integer> orderB = new ArrayList<Integer>();\n orderB.addAll(orderF);\n orderB.retainAll(B);\n z.getMid().removeFromSet(B);\n recourse = T.ADD(z.getLeft(), A, B, new ArrayList<Integer>(), orderB, forward, backward);\n }\n\n totalRecourse += recourse;\n\n // break it down into an STP after if they are in same set\n if (T.getMetaNode(u).equals(T.getMetaNode(v)))\n type = 2;\n }\n\n //type 2 insertion: break down into further STP\n if (type == 2) {\n\n // the set containing both u and v\n MetaNode x = T.getMetaNode(u);\n\n // nodes we wants to search\n HashSet<Integer> S = x.getSet();\n\n // nodes found in forward search\n HashSet<Integer> R = new HashSet<Integer>();\n\n // nodes found in backward search\n HashSet<Integer> L = new HashSet<Integer>();\n\n forward.restrictedDFS(v, S, R);\n backward.restrictedDFS(u, S, L);\n\n int recourse = 0;\n\n recourse += L.size(); // CAN BE IMPROVED\n recourse += R.size();\n\n totalRecourse += recourse;\n\n // break down x into 3 children\n ArrayList<Integer> orderL = new ArrayList<Integer>();\n orderL.addAll(x.getOrder());\n orderL.retainAll(L);\n\n MetaNode xL = new MetaNode(L, orderL);\n\n ArrayList<Integer> orderR = new ArrayList<Integer>();\n orderR.addAll(x.getOrder());\n orderR.retainAll(R);\n\n MetaNode xR = new MetaNode(R, orderR);\n\n HashSet<Integer> F = new HashSet<Integer>();\n F.addAll(S);\n F.removeAll(L);\n F.removeAll(R);\n\n ArrayList<Integer> orderF = new ArrayList<Integer>();\n orderF.addAll(x.getOrder());\n orderF.retainAll(F);\n\n MetaNode xF = new MetaNode(F, orderF);\n\n x.breakDown(xL, xF, xR);\n }\n\n return false;\n }", "void visit(Graph.Vertex u, Graph.Vertex v) {\n\t\tDFSVertex bv = getVertex(v);\n\t\tbv.seen = true;\n\t\tbv.parent = u;\n\t\tbv.distance = distance(u) + 1;\n\t}", "public static void kosajaru(int u , int pass){\n\t\tdfs_num[u] = 1;\n\t\tArrayList<Pair> neighbor;\n\t\tif(pass == 1) neighbor = adjList.get(u) ;else neighbor = adjListT.get(u);\n\t\tfor(int j = 0 ; j < neighbor.size(); j++){\n\t\t\tPair v = neighbor.get(j);\n\t\t\tif( dfs_num[v.first] == UNVISITED){\n\t\t\t\tkosajaru(v.first , pass);\n\t\t\t}\n\t\t}\n\t\tS.add(u);\n\t}", "public void add(T x) // O(n/M) nel caso medio e peggiore\n {\n // precondizioni\n if (x == null || contains(x)) \n return;\n \n // calcolo della chiave ridotta\n int kr = hash(x);\n \n // inserimento nel bucket di chiave ridotta calcolata\n ListNode n = (ListNode)v[kr]; // nodo header del bucket\n n.setElement(x); // inserimento nel nodo header\n v[kr] = new ListNode(null, n); // nuovo nodo header\n \n // incremento del numero di elementi\n size++; \n }", "private void addAsUseful(HashSet visited, HashSet path, Node n) {\n if (path.contains(n)) {\n return;\n }\n path.add(n);\n if (visited.contains(n)) {\n if (VERIFY_ASSERTIONS) Assert._assert(nodes.containsKey(n), n.toString());\n return;\n }\n if (n instanceof UnknownTypeNode) {\n path.remove(n);\n return;\n }\n visited.add(n); this.nodes.put(n, n);\n if (TRACE_INTER) out.println(\"Useful: \"+n);\n for (Iterator i = n.getNonEscapingEdgeTargets().iterator(); i.hasNext(); ) {\n addAsUseful(visited, path, (Node) i.next());\n }\n if (n.accessPathEdges != null) {\n for (Iterator i=n.accessPathEdges.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n Object o = e.getValue();\n if (o instanceof Node) {\n if (!addIfUseful(visited, path, (Node)o)) {\n i.remove();\n }\n } else {\n boolean any = false;\n for (Iterator j=((Set)o).iterator(); j.hasNext(); ) {\n Node j_n = (Node)j.next();\n if (!addIfUseful(visited, path, j_n)) {\n j.remove();\n } else {\n any = true;\n }\n }\n if (!any) i.remove();\n }\n }\n }\n for (Iterator i = n.getPredecessorTargets().iterator(); i.hasNext(); ) {\n addAsUseful(visited, path, (Node) i.next());\n }\n if (n instanceof FieldNode) {\n FieldNode fn = (FieldNode) n;\n for (Iterator i = fn.getAccessPathPredecessors().iterator(); i.hasNext(); ) {\n addAsUseful(visited, path, (Node)i.next());\n }\n }\n // Call \"addIfUseful()\" on all successor checkcast nodes.\n if (castPredecessors.contains(n)) {\n for (Iterator i = castMap.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry)i.next();\n Node goestocast = (Node)((Pair)e.getKey()).left;\n CheckCastNode castsucc = (CheckCastNode)e.getValue();\n if (n == goestocast)\n addIfUseful(visited, path, castsucc);\n }\n }\n\n // call \"addAsUseful()\" on all predecessors.\n if (n instanceof CheckCastNode) {\n Quad thiscast = ((QuadProgramLocation)((CheckCastNode)n).getLocation()).getQuad();\n for (Iterator i = castPredecessors.iterator(); i.hasNext(); ) {\n Node goestocast = (Node)i.next();\n CheckCastNode castsucc = (CheckCastNode)castMap.get(new Pair(goestocast, thiscast));\n if (castsucc != null)\n addAsUseful(visited, path, goestocast);\n }\n }\n path.remove(n);\n }", "Node findLoopByHash(Node n){\n Hashtable<Node,Integer> nodes = new Hashtable<Node,Integer>();\n while (n.next != null){\n if (nodes.containsKey(n)) break;\n nodes.put(n,1);\n n=n.next;\n }\n if (n.next != null) return n;\n return null;\n }", "boolean seen(Graph.Vertex u) {\n\t\treturn getVertex(u).seen;\n\t}", "public static void kosajaru(int u , int pass){\n\t\t\n\t\t\n\t\tdfs_num[u] = 1;\n\t\tArrayList<Pair> neighbor;\n\t\tif(pass == 1) neighbor = adjList.get(u) ;else neighbor = adjListT.get(u);\n\t\tif(pass == 2) set.add(u); \n\t\tfor(int j = 0 ; j < neighbor.size(); j++){\n\t\t\tPair v = neighbor.get(j);\n\t\t\tif( dfs_num[v.first] == UNVISITED){\n\t\t\t\tkosajaru(v.first , pass);\n\t\t\t}\n\t\t}\n\t\tS.add(u);\n\t}", "private boolean addIfUseful(HashSet visited, HashSet path, Node n) {\n if (path.contains(n)) return true;\n path.add(n);\n if (visited.contains(n)) return nodes.containsKey(n);\n visited.add(n);\n boolean useful = false;\n if (nodes.containsKey(n)) {\n if (TRACE_INTER) out.println(\"Useful: \"+n);\n useful = true;\n }\n if (n instanceof UnknownTypeNode) {\n path.remove(n);\n return true;\n }\n if (n.addedEdges != null) {\n if (TRACE_INTER) out.println(\"Useful because of added edge: \"+n);\n useful = true;\n for (Iterator i = n.getNonEscapingEdgeTargets().iterator(); i.hasNext(); ) {\n addAsUseful(visited, path, (Node) i.next());\n }\n }\n if (n.accessPathEdges != null) {\n for (Iterator i = n.accessPathEdges.entrySet().iterator(); i.hasNext(); ) {\n java.util.Map.Entry e = (java.util.Map.Entry)i.next();\n //jq_Field f = (jq_Field)e.getKey();\n Object o = e.getValue();\n if (o instanceof Node) {\n if (addIfUseful(visited, path, (Node)o)) {\n if (TRACE_INTER && !useful) out.println(\"Useful because outside edge: \"+n+\"->\"+o);\n useful = true;\n } else {\n if (n != o) i.remove();\n }\n } else {\n for (Iterator j=((Set)o).iterator(); j.hasNext(); ) {\n Node n2 = (Node)j.next();\n if (addIfUseful(visited, path, n2)) {\n if (TRACE_INTER && !useful) out.println(\"Useful because outside edge: \"+n+\"->\"+n2);\n useful = true;\n } else {\n if (n != n2) j.remove();\n }\n }\n if (!useful) i.remove();\n }\n }\n }\n if (castPredecessors.contains(n)) {\n for (Iterator i = castMap.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry)i.next();\n Node goestocast = (Node)((Pair)e.getKey()).left;\n CheckCastNode castsucc = (CheckCastNode)e.getValue();\n // Call \"addIfUseful()\" on all successor checkcast nodes, and set the \"useful\" flag if the call returns true.\n if (n == goestocast && addIfUseful(visited, path, castsucc))\n useful = true;\n }\n }\n if (n instanceof ReturnedNode) {\n if (TRACE_INTER && !useful) out.println(\"Useful because ReturnedNode: \"+n);\n useful = true;\n }\n if (n.predecessors != null) {\n useful = true;\n if (TRACE_INTER && !useful) out.println(\"Useful because target of added edge: \"+n);\n for (Iterator i = n.getPredecessorTargets().iterator(); i.hasNext(); ) {\n addAsUseful(visited, path, (Node) i.next());\n }\n }\n if (useful) {\n this.nodes.put(n, n);\n if (n instanceof FieldNode) {\n FieldNode fn = (FieldNode)n;\n for (Iterator i = fn.getAccessPathPredecessors().iterator(); i.hasNext(); ) {\n addAsUseful(visited, path, (Node)i.next());\n }\n }\n if (n instanceof CheckCastNode) {\n // If the \"useful\" flag is true and the node is a checkcast node,\n // call \"addAsUseful()\" on all predecessors.\n Quad thiscast = ((QuadProgramLocation)((CheckCastNode)n).getLocation()).getQuad();\n for (Iterator i = castPredecessors.iterator(); i.hasNext(); ) {\n Node goestocast = (Node)i.next();\n CheckCastNode castsucc = (CheckCastNode)castMap.get(new Pair(goestocast, thiscast));\n if (castsucc != null)\n addAsUseful(visited, path, goestocast);\n }\n }\n }\n if (TRACE_INTER && !useful) out.println(\"Not useful: \"+n);\n path.remove(n);\n return useful;\n }", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "private static void updateRangeLazy(int[] segtree, int[] lazyValue, int l, int r, int inc, int ns, int ne,\n int index) {\n if (lazyValue[index] != 0) {\n segtree[index] += lazyValue[index];\n if (ns != ne) {\n lazyValue[2 * index] += lazyValue[index];\n lazyValue[2 * index + 1] += lazyValue[index];\n }\n lazyValue[index] = 0;\n }\n\n if (r < ns || l > ne) {\n return;\n }\n if (ns == ne) {\n segtree[index] += inc;\n return;\n }\n if (ns >= l && ne <= r) {\n // complete overlap - update this node, pass the lazy value(if not leaf) &\n // return\n segtree[index] += inc;\n if (ns != ne) {\n lazyValue[2 * index] += inc;\n lazyValue[2 * index + 1] += inc;\n }\n // return from here only.\n return;\n } else {\n //partial overlap-call on left& right\n int mid = (ns + ne) / 2;\n updateRangeLazy(segtree, lazyValue, l, r, inc, ns, mid, 2 * index);\n updateRangeLazy(segtree, lazyValue, l, r, inc, mid + 1, ne, 2 * index + 1);\n segtree[index]=Math.min(segtree[2*index],segtree[2*index+1]);\n }\n\n }", "public int\ngetNodeIndexMin();", "int query_up(int u, int v) {\n int uchain, vchain = chainInInd[v], ans = 0;\n // uchain and vchain are chain numbers of u and v\n int last = -1;\n while (true) {\n uchain = chainInInd[u];\n if (uchain == vchain) {\n // Both u and v are in the same chain, so we need to query from u to v, update answer and break.\n // We break because we came from u up till v, we are done\n if (u == v) break;\n out.println(\"query = \" + (posInBase[v]) + \" \" + (posInBase[u]));\n out.println(query_tree(1, posInBase[v], posInBase[u], 1, pointer));\n ans += query_tree(1, posInBase[v], posInBase[u], 1, pointer);\n // Above is call to segment tree query function\n break;\n }\n out.println(\"query = \" + posInBase[chainInHead[uchain]] + \" \" + (posInBase[u]));\n out.println(query_tree(1, posInBase[chainInHead[uchain]], posInBase[u], 1, pointer));\n ans += query_tree(1, posInBase[chainInHead[uchain]], posInBase[u], 1, pointer);\n // Above is call to segment tree query function. We do from chainHead of u till u. That is the whole chain from\n // start till head. We then update the answer\n u = chainInHead[uchain]; // move u to u's chainHead\n u = par[u]; //Then move to its parent, that means we changed chains\n }\n out.println(ans+\" =ans\");\n return ans;\n }", "public int addIfNotExist(T x) {\n boolean insert = false;\n if (needRebuild) {\n rebuildSqrt();\n }\n for (int j = 0; j < numberOfBlocks; ++j) {\n if (size != 0 && dataInBegin[j] != null && comparator.compare((T) dataInBegin[j], x) > 0) {\n if (j == 0) {\n for (int k = endOfBlock[0]; k > 0; k--) {\n data[k] = data[k - 1];\n }\n data[0] = x;\n dataInBegin[0] = x;\n endOfBlock[0]++;\n insert = true;\n size++;\n if (endOfBlock[0] == (len << 1)) {\n needRebuild = true;\n }\n return 0;\n }\n for (int k = (len * (j - 1) << 1); k < endOfBlock[j - 1]; k++)\n if (comparator.compare((T) data[k], x) > 0) {\n for (int l = endOfBlock[j - 1]; l > k; l--) {\n data[l] = data[l - 1];\n }\n data[k] = x;\n endOfBlock[j - 1]++;\n insert = true;\n size++;\n if (endOfBlock[j - 1] == (len * j << 1)) needRebuild = true;\n return k;\n } else if (comparator.compare((T) data[k], x) == 0) {\n return -(k + 1);\n }\n if (!insert) {\n data[endOfBlock[j - 1]] = x;\n insert = true;\n endOfBlock[j - 1]++;\n size++;\n if (endOfBlock[j - 1] == (len * j << 1)) {\n needRebuild = true;\n }\n return endOfBlock[j - 1] - 1;\n }\n }\n }\n if (!insert) {\n for (int j = (len * (numberOfBlocks - 1) << 1); j < endOfBlock[numberOfBlocks - 1]; ++j)\n if (data[j] != null && comparator.compare((T)data[j], x) > 0) {\n for (int l = endOfBlock[numberOfBlocks - 1]; l > j; l--) {\n data[l] = data[l - 1];\n }\n data[j] = x;\n if (j == ((len * (numberOfBlocks - 1)) << 1)) dataInBegin[numberOfBlocks - 1] = x;\n insert = true;\n endOfBlock[numberOfBlocks - 1]++;\n size++;\n if (endOfBlock[numberOfBlocks - 1] == (len * numberOfBlocks << 1)) needRebuild = true;\n return j;\n } else if (comparator.compare((T)data[j], x) == 0) {\n return -(j + 1);\n }\n if (!insert) {\n size++;\n if (endOfBlock[numberOfBlocks - 1] == (len * (numberOfBlocks - 1) << 1))\n dataInBegin[numberOfBlocks - 1] = x;\n data[endOfBlock[numberOfBlocks - 1]] = x;\n endOfBlock[numberOfBlocks - 1]++;\n if (endOfBlock[numberOfBlocks - 1] == (len * numberOfBlocks << 1)) needRebuild = true;\n return endOfBlock[numberOfBlocks - 1] - 1;\n }\n }\n return NO_ELEMENT;\n }", "void process(N origin, TreeNodeProcessor<N> processor);", "private void updateQueue(Node n) throws PackingException, ParallelException {\n _nodesq.remove(n);\r\n Set nnbors = _k==2 ? n.getNNbors() : n.getNborsUnsynchronized(); // used to be n.getNbors();\r\n _nodesq.removeAll(nnbors);\r\n\t\tif (_k==2) { // itc-20170307: the code in the if is only useful when _k=2\r\n\t\t\t// 1. create the nnnbors set of the nbors of _nnbors U n set\r\n\t\t\tSet nnnbors = new HashSet(); // Set<Node>\r\n\t\t\tSet nbors = n.getNborsUnsynchronized(); // itc-20170307: used to be getNbors()\r\n\t\t\tIterator it = nbors.iterator();\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tNode nbor = (Node) it.next();\r\n\t\t\t\tSet nnbors2 = _k==2 ? nbor.getNNbors() : nbor.getNborsUnsynchronized(); // used to be nbor.getNbors();\r\n\t\t\t\tnnnbors.addAll(nnbors2);\r\n\t\t\t}\r\n\t\t\tnnnbors.removeAll(nnbors);\r\n\t\t\tnnnbors.remove(n);\r\n\t\t\tnnnbors.retainAll(_nodesq); // don't accidentally insert back bad nodes\r\n\t\t\t// 2. remove the nnnbors nodes from the _nodesq set and re-insert them\r\n\t\t\t// (which updates correctly the _nodesq TreeSet in case of _k==2)\r\n\t\t\t// nnnbors are all the nodes at distance 3 from the node n for _k==2, distance 2 for _k==1\r\n\t\t\t// Update the _nnbors data member of those nodes.\r\n\t\t\t_nodesq.removeAll(nnnbors);\r\n\t\t\t//if (_k==2) {\r\n\t\t\t\tIterator it2 = nnnbors.iterator();\r\n\t\t\t\twhile (it2.hasNext()) {\r\n\t\t\t\t\tNode nb = (Node) it2.next();\r\n\t\t\t\t\tnb.getNNbors().removeAll(nnbors);\r\n\t\t\t\t\tnb.getNNbors().remove(n);\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t_nodesq.addAll(nnnbors);\r\n\t\t\t//if (_k==2) \r\n\t\t\t nnbors.clear(); // clear n's NNbors\r\n\t\t}\r\n }", "private void getMinDistances(String u, HashMap<Integer, Integer> distances, HashMap<String, Integer> nodeDistances){\n if(!graphVertexHashMap.containsKey(u)) return;\n\n Queue<String> queue = new LinkedList<>();\n HashMap<String, Boolean> visited = new HashMap<>();\n queue.add(u);\n visited.put(u, true);\n int dist = 0;\n\n distances.put(dist, 1);\n nodeDistances.put(u, 0);\n\n while(!queue.isEmpty()){\n String node = queue.poll();\n dist += 1;\n boolean found = false;\n for(String edge : graphVertexHashMap.get(node).getOutDegrees().keySet()){\n if(!visited.containsKey(edge)){\n found = true;\n visited.put(edge, true);\n queue.add(edge);\n if(distances.get(dist) == null){\n distances.put(dist, 1);\n }\n else{\n distances.put(dist, distances.get(dist) + 1);\n }\n if(nodeDistances.containsKey(edge)){\n if(dist < nodeDistances.get(edge)){\n nodeDistances.put(edge, dist);\n }\n }else{\n nodeDistances.put(edge, dist);\n }\n }\n }\n if(!found) dist -=1;\n }\n\n }", "public Node succ(int time) {\n\t\tNode x = root;\n\t\tNode y = null;\n\t\twhile(x != null) {\n\t\t\tint tx = x.getTime();\n\t\t\tif (tx >= time) {\n\t\t\t\ty = x; // y points to the deepest node (yet found) that is bigger than k. Might be the successor.\n\t\t\t\tx = x.getLeft();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tx = x.getRight();\n\t\t\t}\n\t\t}\n\t\treturn y;\n\t}", "static int downToZero(Node root) {\n /*\n * Write your code here.\n */\n Queue<Node> queue = new PriorityQueue<>();\n queue.add(root);\n int min = 100001;\n while (!queue.isEmpty()){\n Node current = queue.poll();\n if(current.value <= 4){\n if (current.value == 4){\n min = current.depth + 3;\n return min;\n }\n min = current.depth+current.value;\n return min;\n }\n Node toAdd1 = new Node(current.value-1, current.depth+1);\n queue.add(toAdd1);\n for(int i = 2; i<=Math.sqrt(current.value); i++){\n if(current.value%i==0){\n Node toAdd = new Node(current.value/i, current.depth+1);\n queue.add(toAdd);\n }\n }\n }\n return min;\n }", "@Test\n public void tr0()\n {\n Graph g = new Graph(1);\n Set<Integer> nodes = new TreeSet<Integer>();\n nodes.add(0);\n assertTrue(g.reachable(nodes, nodes));\n }", "public void dijksra (Node v, Node w){\n v.distance = 0;\n v.parent = v;\n dijkstasQueue.add(v);\n\n int i = 0;\n while (dijkstasQueue.size() != 0){ //O(V), but because it runs by weight, the average runtime can be dropped down to O(log(V))\n if(w.known){\n return;\n }\n i++;\n\n Node t = dijkstasQueue.poll();\n if (t == null){\n System.out.println(\"Whoop went null\"); //should never happen\n return;\n }\n\n t.known = true;\n long s = System.currentTimeMillis();\n GraphNode l = adjNodeMap.get(t.name);\n GraphNode[] cons = l.getConnections();\n for(GraphNode c : cons){ //O(E), runs for every connection.\n Node j = nodeMap.get(c.id);\n if (j != null){\n if (!(j.known)){\n double cvw = getNodeWeight(t,j);\n if(t.distance + cvw < j.distance){\n j.distance = t.distance + cvw;\n j.parent = t;\n dijkstasQueue.add(j);\n }\n }\n }\n }\n long e = System.currentTimeMillis();\n }\n }", "private E removeNode(Node n) {\n \tassert (n != sentinel);\n \tn.succ.pred = n.pred;\n \tn.pred.succ = n.succ;\n \tsize--;\n \treturn n.data;\n }", "private IAVLNode findSuccessor(IAVLNode node) \r\n\t {\r\n\t\t if(node.getRight().getHeight() != -1) \r\n\t\t\t return minPointer(node.getRight());\r\n\t\t IAVLNode parent = node.getParent();\r\n\t\t while(parent.getHeight() != -1 && node == parent.getRight())\r\n\t\t {\r\n\t\t\t node = parent;\r\n\t\t\t parent = node.getParent();\r\n\t\t }\r\n\t\t return parent;\t \r\n\t\t}", "public abstract TreeNode getNode(int i);", "public void ucs (String input)\r\n\t{\r\n\t\tNode root_ucs = new Node (input);\r\n\t\tNode current = new Node(root_ucs.getState());\r\n\t\t\r\n\t\tNodeComparator ucs_comparator = new NodeComparator();\r\n\t\tPriorityQueue<Node> queue_ucs = new PriorityQueue<Node>(12, ucs_comparator);\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint pqueue_max_size = 0;\r\n\t\tint pq_size = 0;\r\n\t\t\r\n\t\tcurrent.cost = 0;\r\n\t\tcurrent.setTotalCost(0);\r\n\t\t\r\n\t\tgoal_ucs = isGoal(current.getState());\r\n\t\t\r\n\t\twhile(!goal_ucs)\r\n\t\t{\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Setting total cost used for the priority queue\r\n\t\t\t\t\tnino.setTotalCost(nino.parent.getTotalCost() + nino.cost);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!queue_ucs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_ucs.add(nino);\r\n\t\t\t\t\t\tpq_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Repeated State checking. Removing the same node from PQ if the path cost is less then the current one \r\n\t\t\t\t\telse if (queue_ucs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Node original : queue_ucs)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (original.equals(nino))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tNode copy = original;\r\n\t\t\t\t\t\t\t\tif (nino.getTotalCost() < copy.getTotalCost())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tqueue_ucs.remove(copy);\r\n\t\t\t\t\t\t\t\t\tqueue_ucs.add(nino);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = queue_ucs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\tif (pq_size > pqueue_max_size)\r\n\t\t\t{\r\n\t\t\t\tpqueue_max_size = pq_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpq_size--;\r\n\t\t\tgoal_ucs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tgoal_ucs = false;\r\n\t\tSystem.out.println(\"UCS Solved!!\");\r\n\t\tSolution.performSolution(current, root_ucs, nodes_popped, pqueue_max_size);\r\n\t}", "private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }", "@Override\r\n\tpublic int compareTo(Object o) {\n\t\tNode other=(Node)o;\r\n\t\t\r\n\t\t\r\n\t\treturn this.getWeight()-other.getWeight();//正序,\r\n\t}", "private void updateNextNode(SkiNode head, int nextI, int nextJ, int nextId) {\n\t\tif (!MatrixHelper.isPosValid(nextI, nextJ, map)) {\n\t\t\treturn;\n\t\t}\n\t\tif (head.v <= map[nextI][nextJ]) {\n\t\t\treturn;\n\t\t}\n\t\tif (hMap[nextI][nextJ] != 0) {\n\t\t\thead.level = Math.max(head.level, hMap[nextI][nextJ] + 1);\n\t\t} else {\n\t\t\thead.next[nextId] = new SkiNode(map[nextI][nextJ], nextI, nextJ, head);\n\t\t\tbuildSkiTree(head.next[nextId]);\n\t\t}\n\t}", "private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "protected boolean uniqueNodesUnderOps(Expression root, Fragment op) {\n Set<Expression> visited = new HashSet<>();\n return uniqueNodesUnderOps(root, op, visited);\n }", "private void doOneUpdateStep(){\r\n SparseFractalSubTree target = null; //stores the tree which will receive the update\r\n for (int i = 0; i < subTrees.length - 1; i++) { //top tree never receives an update (reason for -1)\r\n SparseFractalSubTree subTree = subTrees[i];\r\n if (!subTree.hasStopped()) { //not permanently or temporary finished\r\n if (target != null) { //are we the first tree who can receive an update\r\n if ((subTree.getTailHeight() < target.getTailHeight())) { //are we a better candidate then the last one?\r\n target = subTree;\r\n }\r\n } else { //we are the first not finished subtree, so we receive the update if no better candidate is found\r\n target = subTree;\r\n }\r\n\r\n }\r\n }\r\n assert (target != null);\r\n assert (check(target)); //check all the assumptions\r\n\r\n measureDynamicSpace(); //measure\r\n\r\n target.updateTreeHashLow(); //apply a update to the target\r\n }", "public static void bfs(int a, int b) {\n\t\t\r\n\t\tQueue<Node> q = new LinkedList<>();\r\n\t\t\r\n\t\tq.add(new Node(a,b));\r\n\t\t\r\n\t\twhile(!q.isEmpty()) {\r\n\t\t\t\r\n\t\t\tNode n = q.remove();\r\n\t\t\t\r\n\t\t\tint x = n.x;\r\n\t\t\tint y = n.y;\r\n\t\t\t\r\n\t\t\tif(x+1 <= N && map[x+1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x+1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x+1,y));\r\n\t\t\t\t\tvisited[x+1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(x-1 > 0 && map[x-1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x-1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x-1,y));\r\n\t\t\t\t\tvisited[x-1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y-1 > 0 && map[x][y-1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y-1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y-1));\r\n\t\t\t\t\tvisited[x][y-1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y+1 <=N && map[x][y+1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y+1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y+1));\r\n\t\t\t\t\tvisited[x][y+1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "protected T nextUnvisited() {\r\n\t\tfor (T node: getNodes()) {\r\n\t\t\tif (!visited.contains(node)) {\r\n\t\t\t\treturn node;\r\n\t\t\t}\r\n\t\t} \r\n\t\t\treturn null;\r\n\t}", "void printpopulateInorderSucc(Node t){\n\t\n\n}", "public int union(int u, int v) {\n int p1 = find(u), p2 = find(v);\n if (p1 == p2) {\n return p1;\n }\n int s1 = _sizes[p1], s2 = _sizes[p2];\n if (s1 > s2) {\n _sizes[p1] += s2;\n// int i = 1;\n// while (s2 > 0) {\n// if (_parents[i] == p2) {\n// _parents[i] = p1;\n// s2 -= 1;\n// }\n// i += 1;\n// }\n _parents[p2] = p1;\n return s1;\n } else {\n _sizes[p2] += s1;\n// int j = 1;\n// while (s1 > 0) {\n// if (_parents[j] == p1) {\n// _parents[j] = p2;\n// s1 -= 1;\n// }\n// j += 1;\n// }\n _parents[p1] = p2;\n return s2;\n }\n }", "private void merge(int u, int v){\n\t\tArrayList<Integer> rvAdj = id[root(v)].getAdjList(); // root(v)'s adj list\n\t\tArrayList<Integer> ruAdj = id[root(u)].getAdjList(); // root(u)'s adj list\n\n\t\tfor( int i = 0; i < ruAdj.size(); i++){ // remove internal edges\n\t\t\tif(find(ruAdj.get(i), v)){\n\t\t\t\truAdj.remove(i);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tfor( int i = 0; i < rvAdj.size(); i++){ // combine adj lists\n\t\t\tif(!find(rvAdj.get(i), u)){ // avoid self-loops\n\t\t\t\truAdj.add(rvAdj.get(i));\n\t\t\t}\n\t\t}\n\t\tkeyPool.remove(keyPool.indexOf(root(v)));\n\t\tunion(u, v); // important to union after to access v's adj list\n\t}", "@Override\npublic boolean fjern(T verdi) {\n Node<T> curr = hode;\n while (curr != null) {\n if (curr.verdi.equals(verdi)) {\n if (antall == 1) {\n hode = hale = null;\n } else if (curr == hode) {\n hode = hode.neste;\n hode.forrige = null;\n } else if (curr == hale) {\n hale = hale.forrige;\n hale.neste = null;\n } else {\n curr.forrige.neste = curr.neste;\n curr.neste.forrige = curr.forrige;\n }\n antall--;\n endringer++;\n return true;\n }\n curr = curr.neste;\n }\n return false;\n}", "public static GraphResult ModifiedNodeListAlgorithm(Graph g, int source, int type) {\r\n\t\tg.initialize(source);\r\n\t\t// remove and offer\r\n\t\tHashedLinkedList list = new HashedLinkedList(g.nodeCount, type);\r\n\t\tlist.offer(g.nodes[source]);\r\n\t\t//doesnt apply for stack implementations\r\n\t\t//naive upperbound on iterations...\r\n\t\tlong maxIterations = 2*((long)g.nodeCount) * (g.arcs.maxWeight - g.arcs.minWeight);\r\n\t\tif (type==1){\r\n\t\t\t//stack is exponential... not sure of bounds\r\n\t\t\tmaxIterations=Long.MAX_VALUE;\r\n\t\t}\r\n\t\t// could not get this to work right...\r\n//\t\telse if(type==0){\r\n//\t\t\tmaxIterations = (long) g.nodeCount+1;\r\n//\t\t}\r\n\r\n\t\tlong iterCount = 0;\r\n\t\tlong arcScanCount = 0;\r\n\t\tlong dUpdateCount = 0;\r\n\t\t\r\n\t\tint lastNodeTouched = 0;\r\n\r\n\t\tNode i, j;\r\n\t\tArc a;\r\n\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\twhile (!list.isEmpty()) {\r\n\t\t\ti = list.remove();\r\n\t\t\tfor (int k : i.out) {\r\n\t\t\t\tj = g.nodes[k];\r\n\t\t\t\ta = g.getArc(i.tag, j.tag);\r\n\t\t\t\tint value = g.distance[i.tag] + a.weight;\r\n\t\t\t\tif (g.distance[j.tag] > value) {\r\n\t\t\t\t\tlastNodeTouched = j.tag;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// update pred, value\r\n\t\t\t\t\tj.distanceTo = value;\r\n\t\t\t\t\tg.distance[j.tag] = value;\r\n\t\t\t\t\tg.pred[j.tag] = i.tag;\r\n\t\t\t\t\t// add if not in list\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!list.hasNode(j.tag)) { // is Hashed, O(1)\r\n\t\t\t\t\t\tlist.offer(j);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdUpdateCount++;\r\n\t\t\t\t\tint limit = -1*g.nodeCount*Integer.max(Math.abs(g.arcs.maxWeight), \r\n\t\t\t\t\t\t\t Math.abs(g.arcs.minWeight));\r\n\t\t\t\t\tif (g.distance[j.tag] < limit) {\r\n\t\t\t\t\t\tSystem.out.println(\"negative cycle detected\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarcScanCount++;\r\n\t\t\t}\r\n\t\t\titerCount++;\r\n\t\t\tif (iterCount > maxIterations) {\r\n\t\t\t\tSystem.out.println(String.format(\"Negative cycle detected. Node %d is connected.\",lastNodeTouched));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\t\r\n\t\tGraphResult res = new GraphResult(end - start, arcScanCount, dUpdateCount);\r\n\t\treturn res;\r\n\t}", "private void counting(MyBinNode<Type> r){\n if(r != null){\n this.nodes++;\n this.counting(r.left);\n this.counting(r.right);\n }\n }", "private void DFSVisit(Vertex<E> u) {\r\n\t\tDFStime++;\r\n\t\tu.setDiscovered(DFStime);\r\n\t\tu.setColor(Color.GRAY);\r\n\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\tfor(Edge<E> ale : adj) {\r\n\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\tDFSVisit(v);\r\n\t\t\t}\r\n\t\t}\r\n\t\tu.setColor(Color.BLACK);\r\n\t\tDFStime++;\r\n\t\tu.setFinished(DFStime);\r\n\t}", "public double cheapestInsert(Integer[] notSeen){\n List<Integer> list = new ArrayList<>();\n list.add(lastSeen);\n list.add(0);\n \n List<Integer> notSeenTemp = new ArrayList<>();\n for(Integer node: notSeen){\n notSeenTemp.add(node);\n }\n \n int i = 0;\n int chosenIndex=0;\n Integer chosenNode = null;\n \n //While all the inserts have not been done\n while (notSeenTemp.size() >0){\n double cheapestInsertCost = Double.MAX_VALUE;\n //For each position in the list\n for(i =0; i< list.size()-1; i++){\n //For each \"not seen\" node not yet inserted\n for(Integer nodeTemp: notSeenTemp){\n //find the cheapest insert\n if(cheapestInsertCost>(cost[list.get(i)][nodeTemp] + cost[nodeTemp][list.get(i+1)] - cost[list.get(i)][list.get(i+1)])){\n cheapestInsertCost=cost[list.get(i)][nodeTemp] + cost[nodeTemp][list.get(i+1)] - cost[list.get(i)][list.get(i+1)];\n chosenIndex = i+1;\n chosenNode = nodeTemp; \n }\n \n }\n \n }\n list.add(chosenIndex, chosenNode);\n notSeenTemp.remove(chosenNode);\n }\n \n double res =0;\n for(i = 0; i< list.size()-1; i++){\n res+= cost[list.get(i)][list.get(i+1)];\n }\n return res;\n }", "@Override\n @SuppressWarnings(\"Duplicates\")\n public V remove(K key) {\n TreeNode<KeyValuePair<K, V>> previous = root;\n TreeNode<KeyValuePair<K, V>> current = root;\n boolean smaller = false;\n V value = null;\n TreeNode<KeyValuePair<K, V>> result = null;\n int iter = 0;\n while(true) {\n if(current == null) {\n break;\n }\n// System.out.println(\"Iteration #\" + iter);\n// System.out.println(\"Previous = \" + previous.getValue());\n// System.out.println(\"Current = \" + current.getValue());\n if(key.compareTo(current.getValue().getKey()) < 0) {\n// System.out.println(\"Less\");\n smaller = true;\n previous = current;\n current = current.getLeft();\n } else if(key.compareTo(current.getValue().getKey()) > 0) {\n// System.out.println(\"Larger\");\n smaller = false;\n previous = current;\n current = current.getRight();\n } else if (key.equals(current.getValue().getKey())) {\n if(current.getValue().getKey() == previous.getValue().getKey()) {\n if(current.getLeft() == null && current.getRight() == null) root = null;\n else if(current.getLeft() == null && current.getRight() != null) root = root.getRight();\n else if(current.getLeft() != null && current.getRight() == null) root = root.getLeft();\n else if(current.getRight() != null && current.getLeft() != null) current.setValue(minVal(current));\n }\n// System.out.println(\"Found the value! key:val = \" + current.getValue().getKey()+\":\"+current.getValue().getValue());\n// System.out.println(\"Previous = \" + previous.getValue());\n result = current;\n break;\n }\n iter++;\n }\n if(result != null) {\n// System.out.println(\"not null result\");\n value = result.getValue().getValue();\n if(current.getLeft() == null && current.getRight() == null) {\n if(smaller) previous.setLeft(null);\n else previous.setRight(null);\n } else if(current.getLeft() != null && current.getRight() == null) {\n if(smaller) previous.setLeft(current.getLeft());\n else previous.setRight(current.getLeft());\n } else if(current.getLeft() == null && current.getRight() != null) {\n// System.out.println(\"Right not null\");\n// System.out.println(\"Previous = \" + previous.getValue());\n// System.out.println(\"Current = \" + current.getValue());\n if(smaller) previous.setLeft(current.getRight());\n else previous.setRight(current.getRight());\n } else {\n// System.out.println(\"Else\");\n current.setValue(minVal(current));\n }\n size--;\n return value;\n }\n return null;\n }", "static void bridgeUtil(int u, boolean visited[], int disc[],\n int low[], int parent[])\n {\n \n // Mark the current node as visited\n visited[u] = true;\n \n // Initialize discovery time and low value\n disc[u] = low[u] = ++time;\n \n // Go through all vertices aadjacent to this\n for (int data : adj.get(u)) \n {\n int v = data; // v is current adjacent of u\n \n // If v is not visited yet, then make it a child\n // of u in DFS tree and recur for it.\n // If v is not visited yet, then recur for it\n if (!visited[v])\n {\n parent[v] = u;\n bridgeUtil(v, visited, disc, low, parent);\n \n // Check if the subtree rooted with v has a\n // connection to one of the ancestors of u\n low[u] = Math.min(low[u], low[v]);\n \n // If the lowest vertex reachable from subtree\n // under v is below u in DFS tree, then u-v is\n // a bridge\n if (low[v] > disc[u])\n System.out.println(u+\" \"+v);\n }\n \n // Update low value of u for parent function calls.\n else if (v != parent[u])\n low[u] = Math.min(low[u], disc[v]);\n }\n }", "boolean usedByNode(Long id);", "private int size(Node x) {\n if (x == null) return 0;\n else return x.N;\n }", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "private void update(int v, int from, int to, int value) {\n\t\tNode node = heap[v];\n\n\t\t/**\n\t\t * If the updating-range contains the portion of the current Node We lazily update it. This means We\n\t\t * do NOT update each position of the vector, but update only some temporal values into the Node;\n\t\t * such values into the Node will be propagated down to its children only when they need to.\n\t\t */\n\t\tif (contains(from, to, node.from, node.to)) {\n\t\t\tchange(node, value);\n\t\t}\n\n\t\tif (node.size() == 1)\n\t\t\treturn;\n\n\t\tif (intersects(from, to, node.from, node.to)) {\n\t\t\t/**\n\t\t\t * Before keeping going down to the tree We need to propagate the the values that have been\n\t\t\t * temporally/lazily saved into this Node to its children So that when We visit them the values are\n\t\t\t * properly updated\n\t\t\t */\n\t\t\tpropagate(v);\n\n\t\t\tupdate(2 * v, from, to, value);\n\t\t\tupdate(2 * v + 1, from, to, value);\n\n\t\t\tnode.sum = heap[2 * v].sum + heap[2 * v + 1].sum;\n\t\t\tnode.min = Math.min(heap[2 * v].min, heap[2 * v + 1].min);\n\t\t}\n\t}", "void findUp(Board board) {\n if (tile.getRowPos() != 0) {\n Tile upTile = board.getTileObjByPosition(tile.getRowPos() - 1, tile.getColPos());\n if (upTile != null) {\n if (RailroadInk.areConnectedNeighbours(tile.getPlacementStr(), upTile.getPlacementStr())) {\n Node upNode;\n if ((upTile.graphId > 0) || ((upTile.graphId == -1) && (upTile.upId == graphId))) {\n upNode = nodeMap.get(upTile.pos);\n } else {\n upNode = new Node(upTile);\n if (upTile.name.equals(\"B2\")) {\n upTile.downId = graphId;\n }\n nodeMap.put(upTile.pos, upNode);\n }\n\n // Update the connection relationship.\n this.up = upNode;\n upNode.down = this;\n if (this.tile.name.equals(\"B2\")) {\n this.tile.upId = graphId;\n }\n\n if (upNode.up == null) {\n upNode.findUp(board);\n }\n if ((!upTile.name.equals(\"B2\")) && (upNode.right == null)) {\n upNode.findRight(board);\n }\n if ((!upTile.name.equals(\"B2\")) && (upNode.left == null)) {\n upNode.findLeft(board);\n }\n }\n }\n }\n }", "public Node<T> findSlow(T element);", "public T remove(Node<T> u) {\n\t\tif (u == nil || u == null)\n\t\t\treturn null;\n\n\t\tT element = u.x;\n\n\t\t// merge children of removed node\n\t\tNode<T> subroot = merge(u.left, u.right);\n\t\tif (subroot != nil)\n\t\t\tsubroot.parent = u.parent;\n\n\t\tif (u == r) // root was removed\n\t\t\tu = subroot;\n\t\telse if (u.parent.left == u)\n\t\t\tu.parent.left = subroot;\n\t\telse\n\t\t\tu.parent.right = subroot;\n\t\tn--;\n\t\treturn element;\n\t}", "int node(final int index) {\r\n\t\tif (index < (size >> 1)) {\r\n\t\t\tint x = first;\r\n\t\t\tfor (long l = 0; l < index; l++) {\r\n\t\t\t\tx = getNextPointer(x);\r\n\t\t\t}\r\n\t\t\treturn x;\r\n\t\t} else {\r\n\t\t\tint x = last;\r\n\t\t\tfor (int i = size - 1; i > index; i--) {\r\n\t\t\t\tx = getPrevPointer(x);\r\n\t\t\t}\r\n\t\t\treturn x;\r\n\t\t}\r\n\t}", "boolean hasNode()\n/* */ {\n/* 473 */ if ((this.bn == null) && (this.mn == null)) return false;\n/* 474 */ if (this.jt == null) return false;\n/* 475 */ return true;\n/* */ }", "private int Nodes(BTNode n){\r\n if (n == null)\r\n return 0;\r\n else {\r\n return ( (n.left == null? 0 : Nodes(n.left)) + (n.right == null? 0 : Nodes(n.right)) + 1 );\r\n }\r\n }", "private static void commonNodesInOrdSuc(Node r1, Node r2)\n {\n Node n1 = r1, n2 = r2;\n \n if(n1==null || n2==null)\n return;\n \n while(n1.left != null)\n n1 = n1.left;\n \n while(n2.left!= null)\n n2 = n2.left;\n \n while(n1!=null && n2!=null)\n {\n if(n1.data < n2.data)\n n1 = inOrdSuc(n1);\n \n else if(n1.data > n2.data)\n n2 = inOrdSuc(n2);\n \n else\n {\n System.out.print(n1.data+\" \"); n1 = inOrdSuc(n1); n2 = inOrdSuc(n2);\n }\n }\n \n System.out.println();\n }", "private void checkMinKeys(BTreeNode<T> currentNode) {\n BTreeNode<T> parent = findParent(root, currentNode);\n int indexCurrentChild = getIndexChild(parent, currentNode);\n\n BTreeNode<T> leftBrother;\n BTreeNode<T> rightBrother;\n\n //Dependiendo del indice del hijo se realizaran las operaciones\n //de prestamo y union\n switch (indexCurrentChild) {\n \n //Si el indice es 0 solo tiene hermano derecho por ende\n //las operaciones se realizan con el hermano derecho\n case 0 -> {\n rightBrother = parent.getChild(indexCurrentChild + 1);\n\n //Si el hermano derecho tiene mas de 2 llaves toma una de ellas\n //si no realiza una union\n if (rightBrother != null && rightBrother.getNumKeys() > 2) {\n borrowFromNext(parent, currentNode, rightBrother, indexCurrentChild);\n } else {\n merge(parent, currentNode, rightBrother, indexCurrentChild + 1, 1);\n }\n }\n \n //Si el indice es 5 solo tiene hermano izquierdo por ende las\n //operaciones solo se pueden realizar con el hermano izquierdo\n case 5 -> {\n leftBrother = parent.getChild(indexCurrentChild - 1);\n\n //Si el hermano izquierdo tiene mas de 2 llaves toma una de ellas\n //si no realiza una union\n if (leftBrother != null && leftBrother.getNumKeys() > 2) {\n borrowFromPrev(parent, currentNode, leftBrother, indexCurrentChild);\n } else {\n merge(parent, currentNode, leftBrother, indexCurrentChild, 0);\n }\n }\n \n //Si el indice es cualquier otro las operaciones se pueden realizar\n //tanto con el hermano derecho como con el hermano izquierdo\n default -> {\n leftBrother = parent.getChild(indexCurrentChild - 1);\n rightBrother = parent.getChild(indexCurrentChild + 1);\n\n // Si cualquiera de los dos hermanos tiene mas de 2 llaves se\n //toma una de ellas, de lo contrario se realiza una union con\n //el hermano izquierdo.\n if (leftBrother != null && leftBrother.getNumKeys() > 2) {\n borrowFromPrev(parent, currentNode, leftBrother, indexCurrentChild);\n } else if (rightBrother != null && rightBrother.getNumKeys() > 2) {\n borrowFromNext(parent, currentNode, rightBrother, indexCurrentChild);\n } else {\n merge(parent, currentNode, leftBrother, indexCurrentChild, 0);\n }\n }\n }\n\n //Despues de realizar las operaciones en el nodo hijo se valida que \n //el nodo padre no quede con menos de 2 llaves\n if (parent != root && parent.getNumKeys() < 2) {\n checkMinKeys(parent);\n }\n }", "private int percolateUpLeaf(){\n\t\treturn percolateUp(heap.size()-1);// TODO: A one-line function that calls percolateUp()\n\t}", "private Node removeMin(Node node){\n if(node == null)\n return null;\n else if(node.left == null) {//use right child to replace this node (min value node)\n if(node.count!=0){ //multiple value in same node\n node.count--;\n return node;\n }\n else{\n decDepth(node.right); //maintain depth when chain in right tree\n return node.right;\n }\n }\n\n //walk through left branch\n node.left = removeMin(node.left);\n if(node!=null) node.size--; // the min value must be removed\n return node;\n }", "private int getNearestNode(LatLng vic) {\n\t\tint node = 0;\n\t\tfor(int j=0; j<nodeList.size()-1; j++){\n\t\t\tdouble dist1 = getWeight(vic, nodeList.get(node));\n\t\t\tdouble dist2 = getWeight(vic, nodeList.get(j));\n\t\t\tif(dist1 > dist2){\n\t\t\t\tnode = j;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "private SkiNode updateNextNodeToBestTail(SkiNode head, int nextI, int nextJ, int nextId) {\n\t\tif (!MatrixHelper.isPosValid(nextI, nextJ, map)) {\n\t\t\treturn null;\n\t\t}\n\t\tif (head.level - 1 != hMap[nextI][nextJ]) {\n\t\t\treturn null;\n\t\t}\n\t\thead.next[nextId] = new SkiNode(map[nextI][nextJ], nextI, nextJ, head);\n\t\thead.next[nextId].level = hMap[nextI][nextJ];\n\t\tif (head.next[nextId].level == 1) {\n\t\t\treturn head.next[nextId];\n\t\t}\n\t\treturn findBestTail(head.next[nextId]);\n\t}", "public int get(int key) {\n if (!nodeMap.containsKey(key)) {\n return -1;\n }\n \n Node node = nodeMap.get(key);\n DoubleLinkedList list = countMap.get(node.count);\n list.remove(node);\n if (min == node.count && countMap.get(min).size() == 0) {\n min++;\n }\n \n node.count++;\n DoubleLinkedList list2 = countMap.get(node.count);\n if (list2 == null) {\n list2 = new DoubleLinkedList();\n countMap.put(node.count, list2);\n }\n list2.add(node);\n // System.out.println(\"get; (\" + key + \",\" + node.val + \"); \" + \"countMap: \" + countMap + \"\\n\");\n \n return node.val;\n }", "private Node _locate(Object key){\n\t\tint hashCode = key.hashCode();\r\n\t\tint bucketNum = hashCode % _numBuckets;\r\n\t\treturn _locate(key, bucketNum);\r\n\t}", "private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private static int queryLazy(int[] segtree, int[] lazyValue, int l, int r, int ns, int ne, int index) {\n if(lazyValue[index]!=0){\n segtree[index]+=lazyValue[index];\n if(ns!=ne){\n lazyValue[2*index]+=lazyValue[index];\n lazyValue[2*index+1]+=lazyValue[index];\n }\n lazyValue[index]=0;\n }\n if(r<ns || l>ne){\n //no overlap\n return Integer.MAX_VALUE;\n }\n if(ns>=l && ne<=r){\n //complete overlap\n return segtree[index];\n }else{\n //partial overlap\n int mid=(ns+ne)/2;\n int leftAns=queryLazy(segtree, lazyValue, l, r, ns, mid, 2*index);\n int rightAns=queryLazy(segtree, lazyValue, l, r, mid+1, ne, 2*index+1);\n return Math.min(leftAns,rightAns);\n }\n }", "private static long find_fast(long u)\n {\n long a, b, r;\n long maxUInt = 4294967295L;\n\n u += 0xe91aaa35;\n u = maxUInt % u;\n u ^= u >> 16;\n u = maxUInt % u;\n u += u << 8;\n u = maxUInt % u;\n u ^= u >> 4;\n u = maxUInt % u;\n b = (u >> 8) & 0x1ff;\n b = maxUInt % b;\n a = (u + (u << 2)) >> 19;\n a = maxUInt % a;\n r = a ^ hash_adjust[(int)b];\n r = maxUInt % r;\n return r;\n }", "boolean calcOrdering(int node) {\n boolean isFull = false;\n if(searchOrderSeq.size() == queryGraphNodes.size())\n return true;\n if(!searchOrderSeq.contains(node)) {\n searchOrderSeq.add(node);\n for(int edge: queryGraphNodes.get(node).edges.keySet()) {\n isFull =calcOrdering(edge);\n }\n }\n\n return isFull;\n }", "private void setCost(int u, double d) {\n\t\tgetVertex(u).setCost(d);\n\t}", "private int countNodes(BTNode r)\r\n {\r\n if (r == null)\r\n return 0;\r\n else\r\n {\r\n int l = 1;\r\n l += countNodes(r.getLeft());\r\n l += countNodes(r.getRight());\r\n return l;\r\n }\r\n }", "@Override\n\tpublic float estimate (Node node, Node endNode) {\n\t\treturn (float) Math.abs(endNode.position.distance(node.position));\n\t}", "@Override\n\t\tpublic int compareTo(Node o) {\n\t\t\treturn push == o.push ? cost - o.cost : push - o.push;\n\t\t}", "@Override\n\tpublic int compareTo(Node o) {\n\t\tif(this.cost > o.cost)return 1;\n\t\telse if(this.cost < o.cost)return -1;\n\t\telse return 0;\n\t}", "public Node addNode(Coordinate coordIn){//adds a node to the list\n\t\t//linear search to make sure the node already isnt there\n\t\tint i;\n\t\tfloat inx = coordIn.getX();\n\t\tfloat iny = coordIn.getY();\n\t\tfloat inz = coordIn.getZ();\n\t\tNode n = null;\n\t\tfor(i = 0; i < listOfNodes.size(); i++){\n\t\t\tn = listOfNodes.get(i);\n\t\t\tif(n==null) continue;\n\t\t\tfloat ox = n.getCoordinate().getX();\n\t\t\tfloat oy = n.getCoordinate().getY();\n\t\t\tfloat oz = n.getCoordinate().getZ();\n\t\t\tif(inx <= ox + 0.01f && inx >= ox - 0.01f && iny <= oy + 0.01f && iny >= oy - 0.01f && inz <= oz + 0.01f && inz >= oz - 0.01f)break;\n\t\t}\n\t\tif(i < listOfNodes.size()){ // found duplicate\n\t\t\treturn n;\n\t\t}\n\n\t\tnode_count++;\n\t\tfor(; node_arrayfirstopen < node_arraysize && listOfNodes.get(node_arrayfirstopen) != null; node_arrayfirstopen++);\n\t\tif(node_arrayfirstopen >= node_arraysize){\t//resize\n\t\t\tnode_arraysize = node_arrayfirstopen+1;\n\t\t\tlistOfNodes.ensureCapacity(node_arraysize);\n\t\t\tlistOfNodes.setSize(node_arraysize);\n\t\t}\n\t\tId nid = new Id(node_arrayfirstopen, node_count);\n\t\tn = new Node(coordIn, nid);\n\t\tlistOfNodes.set(node_arrayfirstopen, n);\n\t\tupdateAABBGrow(n.getCoordinate());\n\t\t\n\t\tif(node_arraylasttaken < node_arrayfirstopen) node_arraylasttaken = node_arrayfirstopen; //todo redo\n\t\treturn n;\n\t}", "public static void addSample() {\n System.out.println(\"==test for add(value) to tail\");\n Node ll1_5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1 = new Node(1, null);\n Node lln = new Node();\n\n ll1_5 = ll1_5.add(6);\n ll1_5.printList();\n ll1_5 = ll1_5.add(7);\n ll1_5.printList();\n\n ll1 = ll1.add(2);\n ll1.printList();\n\n lln = lln.add(10);\n lln.printList();\n\n System.out.println(\"==test for add(value,pos) to delicated position\");\n Node ll1_5a = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5b = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5c = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5d = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5e = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5f = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n Node ll1_2 = new Node(1, null);\n Node lln_2 = new Node();\n\n Node ll0p = ll1_5a.add(-1, 0);\n ll0p.printList();\n Node ll1p = ll1_5b.add(-2, 1);\n ll1p.printList();\n Node ll2p = ll1_5c.add(-3, 2);\n ll2p.printList();\n Node ll3p = ll1_5d.add(-4, 3);\n ll3p.printList();\n Node ll4p = ll1_5e.add(-5, 4);\n ll4p.printList();\n Node ll5p = ll1_5f.add(-6, 5);\n ll5p.printList();\n\n ll1_2 = ll1_2.add(2, 1);\n ll1_2.printList();\n\n lln_2 = lln_2.add(10, 1);\n lln_2.printList();\n }", "private SearchNode findFirstNode(HashSet<SearchNode> set){\n\t\t\tSearchNode min = null;\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (min == null || cur.fScore < min.fScore)\n\t\t\t\t\tmin = cur;\n\t\t\t}\n\t\t\treturn min;\n\t\t}", "private AccessPath findNode(Node n, HashSet s) {\n for (Iterator i = this.succ.iterator(); i.hasNext(); ) {\n IdentityHashCodeWrapper ap = (IdentityHashCodeWrapper)i.next();\n if (!s.contains(ap)) {\n AccessPath p = (AccessPath)ap.getObject();\n if (n == p._n) return p;\n s.add(ap);\n AccessPath q = p.findNode(n, s);\n if (q != null) return q;\n }\n }\n return null;\n }", "public N getInternalizedNode(N node)\n\t{\n\t\tif (node == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif (nodeEdgeMap.containsKey(node))\n\t\t{\n\t\t\t// Node already in this Graph\n\t\t\t/*\n\t\t\t * This is using a slow method (array search) when it would be nice\n\t\t\t * to be able to get the reference from the Map. However, that would\n\t\t\t * require the use of Jakarta Common Collections and extending their\n\t\t\t * HashMap in order to do that... because it's normally impossible\n\t\t\t * to get a Key back out of a Map without iterating over the Entries\n\t\t\t * :/\n\t\t\t */\n\t\t\treturn nodeList.get(nodeList.indexOf(node));\n\t\t}\n\t\t// TODO Consider whether to return null or v... ?\n\t\treturn null;\n\t}", "protected void addFixup(Node<T> u) {\n\t\twhile (u.colour == red) {\n\t\t\tif (u == r) { // u is the root - done\n\t\t\t\tu.colour = black;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tNode<T> w = u.parent;\n\t\t\tif (w.left.colour == black) { // ensure left-leaning\n\t\t\t\tflipLeft(w);\n\t\t\t\tu = w;\n\t\t\t\tw = u.parent;\n\t\t\t}\n\t\t\tif (w.colour == black)\n\t\t\t\treturn; // no red-red edge = done\n\t\t\tNode<T> g = w.parent; // grandparent of u\n\t\t\tif (g.right.colour == black) {\n\t\t\t\tflipRight(g);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tpushBlack(g);\n\t\t\t\tu = g;\n\t\t\t}\n\t\t}\n\t}", "protected Expression duplicateNodesUnderOps(Expression root, Fragment op) {\n Set<Expression> visited = new HashSet<>();\n if (duplicateNodesUnderOps(root, op, visited)) {\n return visited.iterator().next();\n }\n return null;\n }", "private List<Node> compute() {\n\t\t\tgetGraphFromResolvedTree(root);\n\t\t\tdepthFirst(root);\n\t\t\treturn result;\n\t\t}", "public ListNode mergeNodesV3(ListNode head) {\n /**\n * this step is very important.\n * head point at the first non-zero node.\n */\n head = head.next;\n ListNode start = head;\n while (start != null) {\n ListNode end = start;\n int sum = 0;\n while (end.val != 0) {\n sum += end.val;\n end = end.next;\n }\n if (sum > 0) {\n start.val = sum;\n start.next = end.next;\n start = start.next;\n }\n }\n return head;\n }", "private void pruneRecur(BinaryNode node, Integer sum, Integer k) {\n\n if (node == null) return;\n else {\n sum += (Integer)node.element;\n if (largestPath(node.left, sum) >= k) {\n pruneRecur(node.left, sum, k);\n } else {\n node.left = null;\n }\n if (largestPath(node.right, sum) >= k) {\n pruneRecur(node.right, sum, k);\n } else {\n node.right = null;\n }\n }\n }", "public void testAdvancedUsage() throws Exception {\n Map<Integer, byte[]> tree = createRandomTree(12, xorGen);\n TreeStorage storage = new TreeStorage(tree.get(1),xorGen, 12);\n \n // add 3, 5, 9, 16\n storage.add(3, tree.get(3));\n storage.add(5, tree.get(5));\n storage.add(9, tree.get(9));\n storage.add(16, tree.get(16));\n \n assertFalse(storage.getVerifiedNodes().contains(3));\n assertFalse(storage.getVerifiedNodes().contains(5));\n assertFalse(storage.getVerifiedNodes().contains(9));\n assertFalse(storage.getVerifiedNodes().contains(16));\n \n // add broken 17, nothing changes\n assertFalse(storage.add(17, tree.get(16)));\n assertFalse(storage.getVerifiedNodes().contains(3));\n assertFalse(storage.getVerifiedNodes().contains(5));\n assertFalse(storage.getVerifiedNodes().contains(9));\n assertFalse(storage.getVerifiedNodes().contains(16));\n \n // add real 17, they all become verified\n assertTrue(storage.add(17, tree.get(17)));\n// assert storage.add(17, tree.get(17));\n assertTrue(storage.getVerifiedNodes().contains(3));\n assertTrue(storage.getVerifiedNodes().contains(5));\n assertTrue(storage.getVerifiedNodes().contains(9));\n assertTrue(storage.getVerifiedNodes().contains(16));\n assertTrue(storage.getVerifiedNodes().contains(17));\n assertEquals(6, storage.getVerifiedNodes().size());\n \n // use 3, 5, 9, 16\n storage.used(3);\n storage.used(5);\n storage.used(9);\n storage.used(16);\n assertEquals(6, storage.getVerifiedNodes().size());\n \n // use 17 and only the root remains\n storage.used(17);\n assertEquals(1,storage.getVerifiedNodes().size());\n assertEquals(1,storage.getUsedNodes().size());\n assertTrue(storage.getVerifiedNodes().containsAll(storage.getUsedNodes()));\n assertTrue(storage.getVerifiedNodes().contains(1));\n }", "private static int distance(ArrayList<Integer>[] adj, ArrayList<Integer>[] cost, int s, int t) {\n\n Set<Integer> visited = new HashSet<>(); //option 1\n Map<Integer, Integer> distance = new HashMap<>();\n// Queue<Integer> q = new PriorityQueue<>(11, (o1, o2) -> { //option 0\n// Integer d1 = distance.get(o1); //option 0\n// Integer d2 = distance.get(o2); //option 0\n Queue<Map.Entry<Integer, Integer>> q = new PriorityQueue<>(11, (o1, o2) -> { //option 1\n Integer d1 = o1.getValue(); //option 1\n Integer d2 = o2.getValue(); //option 1\n\n if (Objects.equals(d1, d2)) return 0;\n if (d1 == null) return 1;\n if (d2 == null) return -1;\n\n return d1 - d2;\n });\n\n distance.put(s, 0);\n// q.addAll(IntStream.range(0, adj.length).boxed().collect(Collectors.toList())); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(s, 0)); //option 1\n\n while (!q.isEmpty()) {\n// int u = q.remove(); //option 0\n int u = q.remove().getKey(); //option 1\n\n if (u == t) {\n Integer dist = distance.get(u);\n if (dist == null) return -1;\n return dist;\n }\n\n if (visited.contains(u)) continue; //option 1\n visited.add(u); //option 1\n\n List<Integer> adjList = adj[u];\n List<Integer> costList = cost[u];\n for (int i = 0; i < adjList.size(); i++) {\n int v = adjList.get(i);\n int w = costList.get(i);\n Integer dist = distance.get(v);\n Integer newDist = distance.get(u);\n if (newDist != null) newDist += w;\n\n if (newDist != null && (dist == null || dist > newDist)) {\n //relax\n distance.put(v, newDist);\n// q.remove(v); //option 0\n// q.add(v); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(v, distance.get(v))); //option 1\n }\n }\n }\n\n return -1;\n }", "private int size(Node x) {\n\t\t\tif(x==null)return 0;\n\t\t\treturn x.N;\n\t\t}", "private static int helper(TreeNode root, TreeNode p, TreeNode q, List<TreeNode> ans) {\n if (root == null)\n return 0;\n int sum = 0;\n if (root.val == p.val || root.val == q.val)\n ++sum;\n int leftSum = helper(root.left, p, q, ans);\n int rightSum = helper(root.right, p, q, ans);\n sum += leftSum + rightSum;\n if (sum == 2 && leftSum < 2 && rightSum < 2)\n ans.add(root);\n return sum;\n }", "int nilaiMin(Node node){\n if (node.left != null) { // karena node yg nilainya minimum atau lebih kecil di sebelah kiri\n return nilaiMin(node.left);// maka jika != null akan me return node sebelah kiri\n }\n return node.data;\n }", "@Override\n public double computeLikeliness(Node node1, Node node12) {\n return 0;\n }", "private void expandNode() {\r\n\t\t\t// Dijkstra's algorithm to handle separately\r\n\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\tCell u;\r\n\t\t\t\t// 11: while Q is not empty:\r\n\t\t\t\tif (graph.isEmpty()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// 12: u := vertex in Q (graph) with smallest distance in dist[]\r\n\t\t\t\t// ;\r\n\t\t\t\t// 13: remove u from Q (graph);\r\n\t\t\t\tu = graph.remove(0);\r\n\t\t\t\t// Add vertex u in closed set\r\n\t\t\t\tclosedSet.add(u);\r\n\t\t\t\t// If target has been found ...\r\n\t\t\t\tif (u.row == targetPos.row && u.col == targetPos.col) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Counts nodes that have expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[u.row][u.col] = CLOSED;\r\n\t\t\t\t// 14: if dist[u] = infinity:\r\n\t\t\t\tif (u.dist == INFINITY) {\r\n\t\t\t\t\t// ... then there is no solution.\r\n\t\t\t\t\t// 15: break;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t// 16: end if\r\n\t\t\t\t}\r\n\t\t\t\t// Create the neighbors of u\r\n\t\t\t\tArrayList<Cell> neighbors = createSuccesors(u, false);\r\n\t\t\t\t// 18: for each neighbor v of u:\r\n\t\t\t\tfor (Cell v : neighbors) {\r\n\t\t\t\t\t// 20: alt := dist[u] + dist_between(u, v) ;\r\n\t\t\t\t\tint alt = u.dist + distBetween(u, v);\r\n\t\t\t\t\t// 21: if alt < dist[v]:\r\n\t\t\t\t\tif (alt < v.dist) {\r\n\t\t\t\t\t\t// 22: dist[v] := alt ;\r\n\t\t\t\t\t\tv.dist = alt;\r\n\t\t\t\t\t\t// 23: previous[v] := u ;\r\n\t\t\t\t\t\tv.prev = u;\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[v.row][v.col] = FRONTIER;\r\n\t\t\t\t\t\t// 24: decrease-key v in Q;\r\n\t\t\t\t\t\t// (sort list of nodes with respect to dist)\r\n\t\t\t\t\t\tCollections.sort(graph, new CellComparatorByDist());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// The handling of the other four algorithms\r\n\t\t\t} else {\r\n\t\t\t\tCell current;\r\n\t\t\t\tif (dfs.isSelected() || bfs.isSelected()) {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms DFS and BFS\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET ...\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms A* and Greedy\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET,\r\n\t\t\t\t\t// for which f(Si) ≤ f(Sj) for all other\r\n\t\t\t\t\t// open states Sj ...\r\n\t\t\t\t\t// (sort first OPEN SET list with respect to 'f')\r\n\t\t\t\t\tCollections.sort(openSet, new CellComparatorByF());\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t}\r\n\t\t\t\t// ... and add it to CLOSED SET.\r\n\t\t\t\tclosedSet.add(0, current);\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[current.row][current.col] = CLOSED;\r\n\t\t\t\t// If the selected node is the target ...\r\n\t\t\t\tif (current.row == targetPos.row && current.col == targetPos.col) {\r\n\t\t\t\t\t// ... then terminate etc\r\n\t\t\t\t\tCell last = targetPos;\r\n\t\t\t\t\tlast.prev = current.prev;\r\n\t\t\t\t\tclosedSet.add(last);\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Count nodes that have been expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Here is the 4rd step of the algorithms\r\n\t\t\t\t// 4. Create the successors of Si, based on actions\r\n\t\t\t\t// that can be implemented on Si.\r\n\t\t\t\t// Each successor has a pointer to the Si, as its predecessor.\r\n\t\t\t\t// In the case of DFS and BFS algorithms, successors should not\r\n\t\t\t\t// belong neither to the OPEN SET nor the CLOSED SET.\r\n\t\t\t\tArrayList<Cell> succesors;\r\n\t\t\t\tsuccesors = createSuccesors(current, false);\r\n\t\t\t\t// Here is the 5th step of the algorithms\r\n\t\t\t\t// 5. For each successor of Si, ...\r\n\t\t\t\tfor (Cell cell : succesors) {\r\n\t\t\t\t\t// ... if we are running DFS ...\r\n\t\t\t\t\tif (dfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the beginning of the list\r\n\t\t\t\t\t\t// OPEN SET\r\n\t\t\t\t\t\topenSet.add(0, cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are runnig BFS ...\r\n\t\t\t\t\t} else if (bfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the end of the list OPEN SET\r\n\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are running A* or Greedy algorithms (step 5\r\n\t\t\t\t\t\t// of A* algorithm) ...\r\n\t\t\t\t\t} else if (aStar.isSelected() || guloso.isSelected()) {\r\n\t\t\t\t\t\t// ... calculate the value f(Sj) ...\r\n\t\t\t\t\t\tint dxg = current.col - cell.col;\r\n\t\t\t\t\t\tint dyg = current.row - cell.row;\r\n\t\t\t\t\t\tint dxh = targetPos.col - cell.col;\r\n\t\t\t\t\t\tint dyh = targetPos.row - cell.row;\r\n\t\t\t\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t\t\t\t// with diagonal movements\r\n\t\t\t\t\t\t\t// calculate 1000 times the Euclidean distance\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + (int) ((double) 1000 * Math.sqrt(dxg * dxg + dyg * dyg));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = (int) ((double) 1000 * Math.sqrt(dxh * dxh + dyh * dyh));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// without diagonal movements\r\n\t\t\t\t\t\t\t// calculate Manhattan distances\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + Math.abs(dxg) + Math.abs(dyg);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = Math.abs(dxh) + Math.abs(dyh);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcell.f = cell.g + cell.h;\r\n\t\t\t\t\t\t// ... If Sj is neither in the OPEN SET nor in the\r\n\t\t\t\t\t\t// CLOSED SET states ...\r\n\t\t\t\t\t\tint openIndex = isInList(openSet, cell);\r\n\t\t\t\t\t\tint closedIndex = isInList(closedSet, cell);\r\n\t\t\t\t\t\tif (openIndex == -1 && closedIndex == -1) {\r\n\t\t\t\t\t\t\t// ... then add Sj in the OPEN SET ...\r\n\t\t\t\t\t\t\t// ... evaluated as f(Sj)\r\n\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// ... if already belongs to the OPEN SET, then ...\r\n\t\t\t\t\t\t\tif (openIndex > -1) {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (openSet.get(openIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\topenSet.remove(openIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// ... if already belongs to the CLOSED SET,\r\n\t\t\t\t\t\t\t\t// then ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (closedSet.get(closedIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\tclosedSet.remove(closedIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "private static boolean isUnivalNode(Node x, Set<Node> set) {\n if (x == null) { return true; }\n boolean left = isUnivalNode(x.left, set);\n boolean right = isUnivalNode(x.right, set);\n\n if (left && right) {\n boolean leftSubTree = x.left == null || x.left.val == x.val;\n boolean rightSubTree = x.right == null || x.right.val == x.val;\n if (leftSubTree && rightSubTree) {\n set.add(x);\n return true;\n }\n }\n return false;\n }", "private int nextNode(int rid) {\n if (!my_game.getMy_game().isRunning()) {\n return -1;\n }\n Robot robot = my_game.getRobots().get(rid);\n List<node_data> tmp = robots_paths.get(rid);\n if (tmp.isEmpty()) {\n fruits_status.remove(rid);\n synchronized (my_game.getFruits()) {\n if (my_game.getFruits().size() > 0) {\n Fruit fruit = findClosestFruit(robot);\n tmp = algo_g.shortestPath(robot.getSrc(),fruit.getEdge().getSrc());\n node_data dest = my_game.getGraph().getNode(fruit.getEdge().getDest());\n tmp.add(dest);\n robots_paths.put(robot.getId(),tmp);\n fruits_status.put(rid,fruit);\n }\n }\n }\n\n node_data n = tmp.get(0);\n tmp.remove(0);\n return n.getKey();\n\n\n// for (int i = 0; i < tmp.size(); i++) {\n// node_data n = tmp.get(i);\n// tmp.remove(i);\n// if (n.getKey() == robot.getSrc())\n// continue;\n// return n.getKey();\n// }\n// return -1;\n }", "private int getU(int[] inputs, int[] original) {\n\t\tint u = 0; \n\t\tint u2 = 0;\n\t\tfor(int i = 0 ; i < inputs.length ; i++) {\n\t\t\tu += inputs[i];\n\t\t\tu2 += original[i];\n\t\t}\n\t\treturn u <= u2 ? u : u2;\n\t}", "@Override\r\n public boolean add(E o) {\r\n\r\n // Check if dupliate\r\n if (!(contains(o))) {\r\n\r\n Node<E> newNode = new Node<E>(o);\r\n Node<E> currentNode = firstNode;\r\n\r\n if (firstNode == null || o.compareTo(firstNode.element) < 0) {\r\n newNode.next = firstNode;\r\n firstNode = newNode;\r\n numElements++;\r\n return true;\r\n } else {\r\n while(currentNode.next != null && o.compareTo(currentNode.next.element) >= 0) {\r\n currentNode = currentNode.next;\r\n }\r\n newNode.next = currentNode.next;\r\n currentNode.next = newNode;\r\n numElements++;\r\n return true;\r\n }\r\n }\r\n return false;\r\n }" ]
[ "0.61839616", "0.5938072", "0.57084084", "0.56230855", "0.5541828", "0.5534436", "0.55127215", "0.5507333", "0.5487505", "0.54676324", "0.5433886", "0.543258", "0.54218954", "0.5421436", "0.5414456", "0.54060173", "0.53208125", "0.5314413", "0.5311504", "0.5295498", "0.52878714", "0.5286906", "0.5279911", "0.527218", "0.52683616", "0.5265154", "0.526168", "0.5258282", "0.52517843", "0.52366114", "0.5235967", "0.5233293", "0.52301115", "0.52237195", "0.5215725", "0.52128565", "0.5211346", "0.52097857", "0.52062416", "0.520474", "0.52027965", "0.5201059", "0.5180158", "0.51678705", "0.51657236", "0.5164813", "0.5163546", "0.51345575", "0.5126555", "0.51262724", "0.5122815", "0.5119555", "0.5113993", "0.5111198", "0.51100594", "0.51080436", "0.5106169", "0.51029783", "0.5100264", "0.5100219", "0.5096534", "0.5090777", "0.5089026", "0.5086594", "0.50865936", "0.5083783", "0.5083237", "0.5069462", "0.50675684", "0.506546", "0.50653744", "0.5064275", "0.50642717", "0.50627697", "0.50598514", "0.50584173", "0.5058359", "0.505641", "0.50468034", "0.5046156", "0.5045129", "0.5044338", "0.50441957", "0.5043046", "0.5042102", "0.504083", "0.5037603", "0.5035645", "0.50339156", "0.50283", "0.5025482", "0.50192815", "0.5018474", "0.50179935", "0.50179064", "0.501779", "0.5016864", "0.5016554", "0.50084174", "0.5005701", "0.5005381" ]
0.0
-1
Non multi set O(s(n+e)) + O(n)+ O(n) to get total
public float influence(ArrayList<String> s) { HashMap<Integer, Integer> distances = new HashMap<>(); HashMap<String, Integer> nodeDistances = new HashMap<>(); for(String node : s){ if(!graphVertexHashMap.containsKey(node)) continue; //At the end nodeDistances will contain min distance from all nodes to all other nodes getMinDistances(node, distances, nodeDistances); } distances = new HashMap<>(); Iterator it = nodeDistances.entrySet().iterator(); while(it.hasNext()){ Map.Entry entry = (Map.Entry) it.next(); Integer distance = (Integer) entry.getValue(); if(distances.containsKey(distance)){ distances.put(distance, distances.get(distance)+1); }else{ distances.put(distance, 1); } } return getTotal(distances); // float sum = 0.0f; // for(int i =0; i < numVertices; i++){ // int y = gety(s, i); //// System.out.println("i is " + i + " and nodes at distance are " + y); // sum += (1/(Math.pow(2,i)) * y); // } // return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic MySet intersectSets(MySet[] t) {\r\n\t\tallElements = new ArrayList<Integer>();\r\n\r\n\t\t\r\n\t\tfor(Object element: t[0]) {\r\n\t\t\tallElements.add(element);\r\n\t\t}\r\n\t\r\n\t\tfor(Object e: allElements) {\r\n\t\t\tInteger c = map.getOrDefault(e, 0);\r\n\t\t\tmap.put((E)e, c + 1);\r\n\t\t}\r\n\t\t\r\n\t\tMySet<E> returnSet = (MySet<E>) new Set2<Integer>();\r\n\t\tfor(Map.Entry<E, Integer> entry :map.entrySet())\r\n\t\t\tif(entry.getValue() >= dataSet[0].length) // check\r\n\t\t\t\treturnSet.add(entry.getKey());\r\n\t\t\r\n\t\t\r\n\t\treturn returnSet;\r\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}", "public interface ISet<T> {\n\n // Maximum possible size of data structures\n int MAX_SIZE = 100;\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain one of each int from both unionWith and this]\n * @param unionWith ISet to find the union from\n */\n default void union(ISet<T> unionWith) {\n T temp;\n int tsize = unionWith.getSize();\n//For every element in unionWith...\n for (int i = 0; i < tsize; i++) {\n //Store value at first position\n //Remove value from unionWith\n temp = unionWith.removePos(0);\n //If this set does not contain value from unionWith...\n if (!this.contains(temp)) {\n //Add value to this set\n this.add(temp);\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are not in diffWith]\n * @param diffWith ISet to find the difference from\n */\n default void difference(ISet<T> diffWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If diffWith does not contain value from this set...\n if(!diffWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are also found in intWith]\n * @param intWith ISet to find the intersection from\n */\n default void intersect(ISet<T> intWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If intWith does not contain value from this set...\n if(intWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n\n }\n\n\n /**\n * @pre [ISet initialized]\n * @post [ISet contains same elements with a\n * new element - add - placed at the end]\n * @param add T value to be added to ISet\n */\n void add(T add);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and pos >= 0\n * @post [ISet contains same elements as\n * when it was passed, without element at pos] and [T returned]\n * @param pos position in ISet to be removed\n * @return T of position where the element was removed\n */\n T removePos(int pos);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and val != NULL\n * @post [ISet unmodified] and [boolean returned]\n * @param val value to be searched in ISet\n * @return true if ISet contains val, otherwise false\n */\n boolean contains(T val);\n\n /**\n * @pre [ISet initialized with constructor]\n * @post [ISet, size of ISet unmodified] and [int returned]\n * @return int value of the size of the ISet\n */\n int getSize();\n\n}", "public Map<K, Set<V>> coreGetAllSupersetsOf(Collection<?> set, int mode) {\n // Skip elements in the collection having an incorrect type, as we are looking for subsets which simply\n // cannot contain the conflicting items\n Set<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n List<SetTrieNode> frontier = new ArrayList<>();\n frontier.add(superRootNode);\n\n // For every value, extend the frontier with the successor nodes for that value.\n V from = null;\n V upto = null;\n\n // Use a flag for null safety so we do not rely on the comparator to treat null as the least element\n boolean isLeastFrom = true;\n while(it.hasNext()) {\n from = upto;\n upto = it.next();\n\n List<SetTrieNode> nextNodes = new ArrayList<>();\n\n // Based on the frontier, we need to keep scanning nodes whose values is in the range [from, upto]\n // until we find the nodes whose values equals upto\n // Only these nodes then constitute the next frontier\n Collection<SetTrieNode> currentScanNodes = frontier;\n do {\n Collection<SetTrieNode> nextScanNodes = new ArrayList<>();\n for(SetTrieNode currentNode : currentScanNodes) {\n if(currentNode.nextValueToChild != null) {\n NavigableMap<V, SetTrieNode> candidateNodes = isLeastFrom\n ? currentNode.nextValueToChild.headMap(upto, true)\n : currentNode.nextValueToChild.subMap(from, true, upto, true);\n\n for(SetTrieNode candidateNode : candidateNodes.values()) {\n if(Objects.equals(candidateNode.value, upto)) {\n nextNodes.add(candidateNode);\n } else {\n nextScanNodes.add(candidateNode);\n }\n }\n }\n }\n currentScanNodes = nextScanNodes;\n } while(!currentScanNodes.isEmpty());\n\n frontier = nextNodes;\n\n isLeastFrom = false;\n }\n\n Map<K, Set<V>> result = new HashMap<>();\n\n // Copy all data entries associated with the frontier to the result\n Stream<SetTrie<K, V>.SetTrieNode> stream = frontier.stream();\n\n if(mode != 0) {\n stream = stream.flatMap(node -> reachableNodesAcyclic(\n node,\n x -> (x.nextValueToChild != null ? x.nextValueToChild.values() : Collections.<SetTrieNode>emptySet()).stream()));\n }\n\n stream.forEach(currentNode -> {\n if(currentNode.keyToSet != null) {\n for(Entry<K, NavigableSet<V>> e : currentNode.keyToSet.entrySet()) {\n result.put(e.getKey(), e.getValue());\n }\n }\n });\n\n return result;\n }", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "public static int hashCodeForSet(Collection set) {\n/* 122 */ if (set == null) {\n/* 123 */ return 0;\n/* */ }\n/* 125 */ int hashCode = 0;\n/* 126 */ Iterator it = set.iterator();\n/* 127 */ Object obj = null;\n/* */ \n/* 129 */ while (it.hasNext()) {\n/* 130 */ obj = it.next();\n/* 131 */ if (obj != null) {\n/* 132 */ hashCode += obj.hashCode();\n/* */ }\n/* */ } \n/* 135 */ return hashCode;\n/* */ }", "static void subsetSums(int arr[], int n)\n {\n \n // There are totoal 2^n subsets\n int total = 1 << n;\n \n // Consider all numbers from 0 to 2^n - 1\n for (int i = 0; i < total; i++) {\n int sum = 0;\n \n // Consider binary reprsentation of\n // current i to decide which elements\n // to pick.\n for (int j = 0; j < n; j++)\n if ((i & (1 << j)) != 0)\n sum += arr[j];\n \n // Print sum of picked elements.\n System.out.print(sum + \" \");\n }\n }", "public Set<Set<Integer>> calculate(Set<Integer> originalSet)\n\t{\n\t\tvalidateInputSet(originalSet);\n\n\t\tSet<Set<Integer>> sets = new HashSet<Set<Integer>>();\n\t\t//Base class returns the empty set.\n\t\tif (originalSet.isEmpty())\n\t\t{\n\t\t\tsets.add(new HashSet<Integer>());\n\t\t\treturn sets;\n\t\t}\n\t\t//Take the first element in head.\n\t\tList<Integer> list = new ArrayList<Integer>(originalSet);\n\t\tInteger head = list.get(0);\n\t\t//Generate a hash set without the first element\n\t\tSet<Integer> rest = new HashSet<Integer>(list.subList(1, list.size()));\n\t\t//Recursive call to iterate over every combination generated with the rest list.\n\t\tfor (Set<Integer> set : calculate(rest))\n\t\t{\n\t\t\t//Add every element and the head, the old set and the new set.\n\t\t\tSet<Integer> newSet = new HashSet<Integer>();\n\t\t\tnewSet.add(head);\n\t\t\tnewSet.addAll(set);\n\t\t\tsets.add(newSet);\n\t\t\tsets.add(set);\n\t\t}\n\t\treturn sets;\n\t}", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "@Override\n public int size() {\n return theSet.size();\n }", "static int countOfSubsetsOfSum(int[] arr,int sum){\n int n = arr.length;\n int[][] dp = new int[n + 1][sum + 1];\n\n for (int j = 0;j<=sum; j++){\n dp[0][j] = 0;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public static void main(String[] args) {\n\t\t TreeSet<Integer> treeSet = new TreeSet<Integer>();\n\t\t \n\t\t treeSet.add(21);\n\t\t treeSet.add(10);\n\t\t treeSet.add(25);\n\t\t // treeSet.add(null);\n\t\t treeSet.add(25);\n\t\t //treeSet.add(null);\n\t\t long start = System.currentTimeMillis();\n\t\t Iterator<Integer> iterator = treeSet.iterator();\n\t\t while(iterator.hasNext())\n\t\t {\n\t\t\t System.out.println(iterator.next());\n\t\t }\n\t\t long end = System.currentTimeMillis();\n\t\t System.out.println(end - start);\n\t}", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "public static void main(String[] args) {\n List<Integer> nums = new ArrayList<>(Arrays.asList(5, 7, 3, 7, 2, 8, 3, 7, 2));\n //Map<Integer, Integer> numCount = countOccurance(nums);\n Map<Integer, Long> numCount = nums.stream().collect(Collectors.groupingBy(num -> num, Collectors.counting()));\n Set<Integer> numSet = new LinkedHashSet<>(nums);\n numSet.forEach(num -> System.out.println(num + \" \" + numCount.get(num)));\n }", "public int arrayNesting(int[] nums) {\n Set<Integer> oneSet = new HashSet<>();\n\n boolean[] flags = new boolean[nums.length];\n\n for(int i=0; i<nums.length; i++) {\n if(!flags[i]) {\n Set<Integer> compete = recursivelyConstructSet(i, flags, nums, new HashSet<>());\n if(compete.size() > oneSet.size()) {\n oneSet = compete;\n }\n }\n }\n\n return oneSet.size();\n }", "public int hashCode(){\n \tint n = 0;\n \tfor(Iterator it = iterator(); it.hasNext();){\n \t\tObject object = it.next();\n \t\tif(object != null){\n \t\t\tn += object.hashCode();\n \t\t}\n \t}\n \treturn n;\n }", "public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }", "public static int findSubsequencesThatSumUpTo(int[] arr, int neededSum) {\n int total = 0;\n\n Set<Integer> set = new HashSet<>();\n\n int acc = 0;\n for (int i = 0; i < arr.length; i++) {\n acc += arr[i];\n set.add(acc);\n }\n\n for (Integer x: set) {\n if (x == neededSum) {\n total++;\n }\n\n int required = x + neededSum;\n if (set.contains(required)) {\n total++;\n }\n }\n\n return total;\n }", "private Set<List<Integer>> combCount(int[] candidates, int i, int target) {\n int len = candidates.length;\n if (i >= len || (i == len - 1 && candidates[i] != target)) {\n return Collections.emptySet();\n }\n\n Set<List<Integer>> comb = new HashSet<>();\n if (candidates[i] == target) {\n List<Integer> list = new ArrayList<>();\n list.add(candidates[i]);\n comb.add(list);\n }\n\n List<Integer> out = new ArrayList<>();\n if (i != len - 1) {\n out.add(0);\n }\n if (candidates[i] < target) {\n out.add(candidates[i]);\n }\n for (Integer val: out) {\n Set<List<Integer>> lists = combCount(candidates, i + 1, target - val);\n if (val != 0) {\n for (List<Integer> list : lists) {\n list.add(val);\n }\n }\n comb.addAll(lists);\n }\n return comb;\n }", "public static void main(String[] args) {\n\n HashSet <Integer> numbers = new HashSet <>();\n numbers.add(1);\n numbers.add(2);\n numbers.add(1);\n System.out.println(numbers.size());\n\n }", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public int sizeOfSet( T obj )\n {\n \tNode temp = nodes.get(obj);\n \tif(temp!=null){\n \t\treturn getRoot(temp).size;\n \t}\n \t\n // If here, no such such data object; throw exception.\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj );\n }", "static int numOfSubsets(int[] arr, int n, int k) {\n List<Integer> vect1 = new ArrayList<Integer>(); \n List<Integer> vect2 = new ArrayList<Integer>(); \n List<Integer> subset1 = new ArrayList<Integer>(); \n List<Integer> subset2 = new ArrayList<Integer>(); \n \n // ignore element greater than k and divide\n // array into 2 halves\n for (int i = 0; i < n; i++) {\n \n // ignore element if greater than k\n if (arr[i] > k)\n continue;\n if (i <= n / 2)\n vect1.add(arr[i]);\n else\n vect2.add(arr[i]);\n }\n \n // generate all subsets for 1st half (vect1)\n for (int i = 0; i < (1 << vect1.size()); i++) {\n int value = 1;\n for (int j = 0; j < vect1.size(); j++) {\n if (i & (1 << j))\n value *= vect1[j];\n }\n \n // add only in case subset product is less\n // than equal to k\n if (value <= k)\n subset1.add(value);\n }\n \n // generate all subsets for 2nd half (vect2)\n for (int i = 0; i < (1 << vect2.size()); i++) {\n int value = 1;\n for (int j = 0; j < vect2.size(); j++) {\n if (i & (1 << j))\n value *= vect2[j];\n }\n \n // add only in case subset product is\n // less than equal to k\n if (value <= k)\n subset2.add(value);\n }\n \n // sort subset2\n sort(subset2.begin(), subset2.end());\n \n int count = 0;\n for (int i = 0; i < subset1.size(); i++)\n count += upper_bound(subset2.begin(), subset2.end(),\n (k / subset1[i]))\n - subset2.begin();\n \n // for null subset decrement the value of count\n count--;\n \n // return count\n return count;\n }", "public int singleNumber_Math(int[] nums) {\n \n Set<Integer> set = new HashSet<Integer>();\n \n int sumOfnums = 0;\n int setSum = 0;\n \n for(int a : nums){\n set.add(a);\n sumOfnums += a;\n }\n \n for(int a : set)\n setSum += a;\n \n \n return 2*(setSum)-sumOfnums;\n \n }", "@Override\r\n\tpublic int size() {\n\t\treturn set.size();\r\n\t}", "int getTotalElements();", "private void apriori(){\n HashMap<BitSet, Integer> frequentItemsBit = new HashMap<>();\n HashMap<BitSet, Integer> allAssociations = new HashMap<>();\n \n // Put all the 1-itemsets in frequent item hashmap. It will be scanned\n // for getting k-itemsets and cleared iteratively. \n for (int i = 0; i < frequentItemListSetLenOne.size(); i++) {\n BitSet bitSet = new BitSet(bitsetLen);\n bitSet.set(i, true);\n frequentItemsBit.put(bitSet, frequentItemListSetLenOne.get(i).getValue());\n }\n\n int currentK = 1;\n boolean emptyFrequentSet = false;\n \n while (!emptyFrequentSet) {\n \n // create candidates\n if(currentK > 1){\n HashMap<BitSet, Integer> frequentItemsBitT = (HashMap)frequentItemsBit.clone();\n frequentItemsBit.clear();\n frequentItemsBit = candidate_gen(frequentItemsBitT, currentK);\n }\n \n // If no frequent itemSet in current level break\n if(frequentItemsBit.isEmpty())\n break;\n \n // if currentK >= minimumK insert into final list\n if (currentK >= min_itemset_size_K) {\n for (Map.Entry<BitSet, Integer> entry : frequentItemsBit.entrySet()) {\n allAssociations.put(entry.getKey(), entry.getValue());\n }\n }\n currentK++;\n }\n \n printAssociations(allAssociations);\n }", "static int countSubarrWithEqualZeroAndOne(int arr[], int n)\n {\n int count=0;\n int currentSum=0;\n HashMap<Integer,Integer> mp=new HashMap<>();\n for(int i=0;i<arr.length;i++)\n {\n if(arr[i]==0)\n arr[i]=-1;\n currentSum+=arr[i];\n \n if(currentSum==0)\n count++;\n if(mp.containsKey(currentSum))\n count+=mp.get(currentSum);\n if(!mp.containsKey(currentSum))\n mp.put(currentSum,1);\n else\n mp.put(currentSum,mp.get(currentSum)+1);\n \n \n }\n return count;\n }", "public int solution(int[] A) {\n int len = A.length;\n Set<Integer> intSet= new HashSet<>();\n for (int i=0; i<len; i++){\n if(!intSet.contains(A[i])){\n intSet.add(A[i]);\n }\n }\n return intSet.size();\n }", "public static void main(String[] args) {\n int[] a={11, 15, 6, 8, 9, 10,4};\n int sum =2;\n //SORTING AND FIND PAIRS\n /*Arrays.sort(a);\n \n int i=0,j=a.length-1;\n while(i<j)\n {\n\t if(a[i]+a[j]==sum)\n\t {\n\t\t System.out.println(\"pair is+\"+a[i]+\" \"+a[j]);\n\t\t i++;j++;\n\t\t }\n\t else if(a[i]+a[j]<sum)\n\t {\n\t\t i++;\n\t }\n\t else if(a[i]+a[j]>sum)\n\t {\n\t\t j--;\n\t }\n }*/\n //Arrays.sort(a);\n LinkedHashSet<Integer> m = new LinkedHashSet<Integer>();\n int temp;\n for(int i=0;i<a.length;i++)\n {\n\t temp=sum+a[i];\n\t if(m.contains(temp))\n\t {\n\t\t System.out.println(\"par is:\"+a[i]+\" \"+temp);\n\t }\n\t else\n\t\t m.add(a[i]);\n }\n\n\t}", "static long triplets(int[] a, int[] b, int[] c) {\n SortedSet<Integer> setA = getSet(a);\n SortedSet<Integer> setB = getSet(b);\n SortedSet<Integer> setC = getSet(c);\n\n NavigableMap<Integer, Integer> aMap = cumulated(setA);\n NavigableMap<Integer, Integer> cMap = cumulated(setC);\n\n long counter = 0;\n\n for(Integer bElement : setB){\n Map.Entry<Integer, Integer> entryA = aMap.floorEntry(bElement);\n int itemsA = entryA == null ? 0 : entryA.getValue();\n\n Map.Entry<Integer, Integer> entryC = cMap.floorEntry(bElement);\n int itemsC = entryC == null ? 0 : entryC.getValue();\n\n counter += (long)itemsA*itemsC;\n }\n return counter;\n }", "static int nonDivisibleSubset(int k, int[] S) {\n\t\tint result = 0;\n\n\t\tArrayList < ArrayList < Integer >> solutions = new ArrayList < ArrayList < Integer >>();\n\t\tArrayList < HashSet < Integer >> minSets = new ArrayList < HashSet < Integer >>();\n\n\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( S [ 0 ])));\n\t\tminSets.add (new HashSet <Integer > ( ));\n\t\tminSets.get(0).add ( S [ 0 ] % k);\n\n\n\t\t// Go over all the numbers\n\t\tfor ( int i = 1; i < S.length; i++ ){\n\t\t\tint n = S [ i ]; \n\t\t\tint m = S [ i ] % k; // Number we will add to all the elements of all the minSets.\n\n\t\t\t// Go over all the minSets.\n\t\t\t// For each one, check that each element plus m is not divisible by k.\n\n\t\t\tboolean workedForASet = false;\n\t\t\tfor ( int j = 0; j < minSets.size(); j++){\n\t\t\t\t// For each set, check all the elements of the set.\n\n\t\t\t\tHashSet < Integer > minSet = minSets.get(j);\n\t\t\t\tIterator < Integer > iter = minSet.iterator();\n\n\t\t\t\tboolean works = true;\n\t\t\t\twhile ( iter.hasNext() && works ){\n\t\t\t\t\tint num = iter.next();\n\t\t\t\t\tif ( (num + m) % k == 0 ){\n\t\t\t\t\t\tworks = false;\n\t\t\t\t\t\tworkedForASet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( works ){\n\t\t\t\t\tsolutions.get(j).add(n);\n\t\t\t\t\tminSet.add(m);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( !workedForASet ){\n\t\t\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( n )));\n\t\t\t\tminSets.add (new HashSet <Integer > ( ));\n\t\t\t\tminSets.get (minSets.size() - 1).add ( m ); \n\t\t\t} \n\t\t}\n\n\t\t// Find the solution with the most elements.\n\n\t\tfor ( ArrayList <Integer > solution : solutions ){\n\t\t\tresult = Math.max ( result, solution.size() );\n\t\t\tSystem.out.println ( solution );\n\t\t}\n\n\t\tif ( result == 1 ) result = 0;\n\t\treturn result;\n\t}", "int count() {\n\t\tArrayList<Integer> checked = new ArrayList<Integer>();\r\n\t\tint count = 0;\r\n\t\tfor (int x = 0; x < idNode.length; x++) {// Order of N2\r\n\t\t\tint rootX = getRoot(x);\r\n\t\t\tif (!checked.contains(rootX)) {// Order of N Access of Array\r\n\r\n\t\t\t\tSystem.out.println(\"root x is \" + rootX);\r\n\t\t\t\tcount++;\r\n\t\t\t\tchecked.add(rootX);// N Access of Array\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "static int rawNumElementsInCommon(Set s1, Set s2) {\n int result = 0;\n for (Object o1 : s1)\n if (s2.contains(o1))\n result++;\n return result;\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}", "public int size() {\n \tint currentSize = 0;\n \t\n \tIterator<E> iterateSet = this.iterator();\n \t\n \t// calculates number of elements in this set\n \twhile(iterateSet.hasNext()) {\n \t\titerateSet.next();\n \t\tcurrentSize++;\t\t\n \t}\n \t\n \treturn currentSize;\n \t\n }", "@Test\r\n\tpublic void testMultset() {\n\t\tMultiset<Integer> multiSet = HashMultiset.create();\r\n\t\tmultiSet.add(10);\r\n\t\tmultiSet.add(30);\r\n\t\tmultiSet.add(30);\r\n\t\tmultiSet.add(40);\r\n\r\n\t\tassertEquals(2, multiSet.count(30));\r\n\t\tassertEquals(4, multiSet.size());\r\n\t}", "public int size(){\n return set.length;\n }", "private static long calc1()\n {\n final int min = 1000;\n final int max = 10000;\n\n // initialize\n List<List<Integer>> m = new ArrayList<>();\n for (int k = 0; k < end; k++) {\n List<Integer> list = new ArrayList<Integer>();\n int n = 1;\n while (k >= start) {\n int p = pkn(k, n);\n if (p >= max) {\n break;\n }\n if (p >= min) {\n list.add(p);\n }\n n++;\n }\n m.add(list);\n }\n\n boolean[] arr = new boolean[end];\n arr[start] = true;\n\n List<Integer> solutions = new ArrayList<>();\n List<Integer> list = m.get(start);\n for (Integer first : list) {\n LinkedList<Integer> values = new LinkedList<>();\n values.add(first);\n f(m, arr, values, 1, solutions);\n // we stop at the first solution found\n if (!solutions.isEmpty()) {\n break;\n }\n }\n\n // solutions.stream().forEach(System.out::println);\n int res = solutions.stream().reduce(0, Integer::sum);\n return res;\n }", "private List<int[]> validateCandidatesWithSet(List<int[]> candidates) {\n List<SetWithFrequency> frequency = new LinkedList<>();\n\n for (int[] candidate : candidates){\n String key = arrayToString(candidate);\n frequency.add(new SetWithFrequency(key, candidate, 0));\n }\n\n for (int i = 0; i < mDataList.size(); i++){\n if (skipLines.contains(i)){\n continue;\n }\n boolean empty = true;\n Set<Integer> line = new HashSet<>();\n line.addAll(mDataList.get(i));\n\n for (SetWithFrequency candidate : frequency){\n // Check if candidate is subset\n boolean isSubset = true;\n for (int n : candidate.set){\n if (!line.contains(n)){\n isSubset = false;\n break;\n }\n }\n if (isSubset){\n empty = false;\n candidate.frequency++;\n }\n }\n if (empty){\n skipLines.add(i);\n }\n }\n\n List<int[]> res = new ArrayList<>();\n for (SetWithFrequency entry : frequency){\n if (entry.frequency >= mThreshold){\n res.add(entry.set);\n\n // Put the Set - frequency entry in result\n mItemSet.add(entry.key + \"(\" + entry.frequency + \")\\n\");\n }\n }\n\n return res;\n }", "static public int solution(int[] A) {\n HashSet <Integer> newDistList = new HashSet<Integer>();\n for (int s = 0; s<A.length; s++){\n newDistList.add(A[s]);\n }\n return newDistList.size();\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n n = in.nextInt();\n m = in.nextLong();\n initFactorSets();\n long total = 0;\n\n boolean add = true;\n for (ArrayList<Integer> factorSet : factorSets) {\n for (int factor : factorSet) {\n if (add) {\n total += m / factor;\n } else {\n total -= m / factor;\n }\n }\n add = !add;\n }\n System.out.println(total);\n }", "public int total() {\n int summation = 0;\n for ( int value : map.values() ) {\n summation += value;\n }\n return summation;\n }", "public static Set<Integer> find(int[] arr)\r\n\t{\n\t\tSet<Integer> set1=new HashSet<>();\r\n\t\tSet<Integer> set2=new HashSet<>();\r\n\t\t\r\n\t\t//Here Storing the Integers in set1 And set2 so, here set1 And set2 will not allow to store\r\n\t\t//duplicate integers\r\n\t\tfor(Integer i:arr)\r\n\t\t{\r\n\t\t\tset1.add(i);\r\n\t\t\tset2.add(i);\r\n\t\t}\r\n\t\t//Now set1 & set2 contains non duplicate Integers\r\n\t\t// One for every integer in set1 and for every integer in given array And and int counter=0\r\n\t\t //here if Integer in set1 equals to Integer in given array,Then increase the counter.\r\n\t\t\r\n\t\tfor(Integer i:set1)\r\n\t\t{\r\n\t\t\tint count=0;\r\n\t\t\tfor(Integer a:arr)\r\n\t\t\t{\r\n\t\t\t\t//Integer in set1==Integer in array counter will increases by one \r\n\t\t\t\tif(i==a)\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//If count of that integer greater or equal to 2 then delete that Integer in set2\r\n\t\t\tif(count>=2)\r\n\t\t\t{\r\n\t\t\t\tset2.remove(i);\r\n\t\t\t\t//NOTE:- Here I Took set2 because I can not delete the Integer in set1 because it is already in use(Concurrent Modification Exception)\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Returning the set2 which containing NonRepeated Integers\r\n\t\treturn set2;\r\n\t\t\r\n\t}", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "public abstract Set<Map.Entry<K, V>> a();", "private static Set<String> m23474a(Set<String> set, Set<String> set2) {\n if (set.isEmpty()) {\n return set2;\n }\n if (set2.isEmpty()) {\n return set;\n }\n HashSet hashSet = new HashSet(set.size() + set2.size());\n hashSet.addAll(set);\n hashSet.addAll(set2);\n return hashSet;\n }", "public int size() {\n return set.size();\n }", "Integer countAll();", "public List<List<Integer>> threeSum(int[] nums) {\n Arrays.sort(nums);\n\n Set<List<Integer>> triplets = new HashSet<List<Integer>>();\n\n for (int i = 0; i < nums.length; i++) {\n // we choose the number at index i to pinpoint\n int a = nums[i];\n int deficit = 0 - a;\n\n // initialize our two pointers such that they're at either end of the\n // array and that they're not i\n int b = i == 0 ? 1 : 0;\n int c = i == nums.length - 1 ? nums.length - 2 : nums.length - 1;\n\n while (b < c) {\n // check if b and c add up to the deficit\n if (nums[b] + nums[c] == deficit) {\n // add it to the list\n List<Integer> triplet = new ArrayList<Integer>();\n\n triplet.add(a);\n triplet.add(nums[b]);\n triplet.add(nums[c]);\n\n Collections.sort(triplet);\n if (!triplets.contains(triplet)) {\n triplets.add(triplet);\n }\n\n\n // move pointer up and down\n c -= 1;\n if (c == i) {\n c -= 1;\n }\n\n b += 1;\n if (b == i) {\n b += 1;\n }\n } else if (nums[b] + nums[c] > deficit) {\n // if it's too large, bring top pointer down\n c -= 1;\n if (c == i) {\n c -= 1;\n }\n } else {\n // if it's too small, bring bottom pointer up\n b += 1;\n if (b == i) {\n b += 1;\n }\n }\n }\n }\n\n List<List<Integer>> last = new ArrayList<List<Integer>>(triplets);\n return last;\n }", "public List<List<Integer>> findSubsequences3(int[] nums) {\n //below set is not working\n Set<List<Integer>> ret = new HashSet<>();\n\n ret.add(new ArrayList<>());\n int index = 0;\n while (index < nums.length) {\n //try to add nums[index]\n\n Set<List<Integer>> newly_added_set = new HashSet<>();\n\n for (List<Integer> l : ret) {\n if (l.size() <= 0 || l.get(l.size() - 1) <= nums[index]) {\n List<Integer> newList = new ArrayList<>(l);\n newList.add(nums[index]);\n newly_added_set.add(newList);\n }\n }\n\n ret.addAll(newly_added_set);\n\n ++index;\n }\n\n List<List<Integer>> ret2 = new ArrayList<>();\n for (List<Integer> l : ret) {\n if (l.size() >= 2) {\n ret2.add(l);\n }\n }\n return ret2;\n }", "public static void fourSum(int[] data){\n HashMap<Integer,Pair> set = new HashMap<>();//integer = sum, pair are the nums\n for(int i = 0; i < data.length; i++)\n for(int j = i+1; j < data.length; j++) {\n Pair check = set.get(i+j);\n if(check != null) {\n System.out.println(\"fauifa\");\n return;\n }\n set.put(check.a()+check.b(), check);\n }\n System.out.println(\"None found.\");\n }", "List<List<Integer>> threeSumSubSets(int[] numbers) {\n List<List<Integer>> lists = new ArrayList<>();\n if (numbers.length == 0) {\n lists.add(Collections.emptyList());\n return lists;\n }\n int head = numbers[0];\n final int[] rest = new int[numbers.length - 1];\n System.arraycopy(numbers, 1, rest, 0, numbers.length - 1);\n\n for (List<Integer> list : threeSumSubSets(rest)) {\n int sum = head;\n for (int i = 0; i < list.size(); i++) {\n sum += list.get(i);\n }\n if (sum == 0) {\n final List<Integer> newList = new ArrayList<>();\n newList.add(head);\n newList.addAll(list);\n lists.add(newList);\n }\n }\n return lists;\n }", "public static void main(String[] args){\n int MIN = Integer.parseInt(args[0]);\n MAX = Integer.parseInt(args[1]);\n cutoffs = new int[args.length - 2];\n cache = new ArrayList<IndexedArrayList<SuperSavvyTrieHelper2>>();\n for (int i = 2; i < args.length; i++){\n cutoffs[i - 2] = Integer.parseInt(args[i]);\n cache.add(new IndexedArrayList<SuperSavvyTrieHelper2>());\n }\n for (int i = 0; i < cutoffs.length / 2; i++){\n int temp = cutoffs[i];\n cutoffs[i] = cutoffs[cutoffs.length - 1 - i];\n cutoffs[cutoffs.length - 1 - i] = temp;\n }\n multiplicitiesUsed = new boolean[MAX + 1];\n basesUsed = new DoublyLinkedArray(MAX + 1);\n SuperSavvyTrieHelper2.setCorrespondance(basesUsed);\n /*\n long count1 = lowerRecursion(MAX, 0);\n long count2 = middleRecursion(MAX, 0);\n long count3 = upperRecursion(MAX, 0);\n long total = count1 + count2 + count3;\n System.out.printf(\"%d + %d + %d = %d\\n\", count1, count2, count3, total);\n */\n hitCounts = new long[cutoffs.length];\n missCounts = new long[cutoffs.length];\n statCollector = new StatCollector(cutoffs);\n\n long startTime = System.nanoTime();\n long[] values = new long[MAX - MIN + 1];\n for (int i = MIN; i <= MAX; i++) {\n values[i - MIN] = upperRecursionWrapper(i);\n }\n //long[] testValues = new long[] {1752443,1911046, 2067456,2249444,2429337, 2647532,2852449,3101167,3350292,3632299,3916575};\n for (int i = 0; i < values.length; i++){\n //if (testValues[i] != values[i]){\n System.out.printf(\"%d: %d\\n\", i + MIN, values[i]);\n //}\n }\n long endTime = System.nanoTime();\n System.out.printf(\"%f,\", (double)(endTime - startTime) / 1000000000.0);\n long totalMissCounts = 0;\n long totalMissWeight1 = 0;\n long totalMissWeight2 = 0;\n long totalMissWeight3 = 0;\n /*\n for (int i = 0; i < cutoffs.length; i++){\n long totalCounts = hitCounts[i] + missCounts[i];\n totalMissCounts += missCounts[i];\n totalMissWeight1 += missCounts[i] * cutoffs[i];\n totalMissWeight2 += (hitCounts[i] / missCounts[i]) * cutoffs[i];\n totalMissWeight3 += (hitCounts[i] - missCounts[i]) * cutoffs[i] * cutoffs[i];\n System.out.printf(\"\\tCache %d: %d/%d/%d (%.5f%%)\", cutoffs[i], hitCounts[i], missCounts[i], totalCounts, (double) hitCounts[i] / totalCounts);\n }\n System.out.printf(\"\\t\\tMissCounts: %d, weighted: %d, ratio: %d, diff^2: %d\\n\", totalMissCounts, totalMissWeight1, totalMissWeight2, totalMissWeight3);\n */\n statCollector.printAll();\n }", "public int getSumOfMultiples(int i, int[] set) {\n\t\t/*\n\t\t * Variables:\t\n\t\t * \t\tsum is the sum of all unique multiples. sum is returned at the end\n\t\t * \t\tmax is the number we want to stay under with the multiples\n\t\t * \t\tmultiple is the value of the multiple we have at any given time as an element of the array is added to itself\n\t\t * \t\tduplicates is an array that will store each multiple. This is to ensure we are not adding duplicates to the\n\t\t * \t\t\toverall sum.\n\t\t */\n\t\tint sum = 0;\n\t\tint max = i;\n\t\tint multiple;\t\n\t\tList<Integer> duplicates = new ArrayList<>();\n\n\t\t/*\n\t\t * for each value in the array, add its multiples to the sum as long as it's both unique per our duplicates array\n\t\t * \t\tand less than the max\n\t\t */\n\t\tfor (int j = 0; j < set.length; j++) { \n\t\t\tmultiple = set[j];\n\t\t\twhile (multiple < max) {\n\t\t\t\t\n\t\t\t\tif (!duplicates.contains(multiple)){\n\t\t\t\t\tduplicates.add(multiple);\n\t\t\t\t\t//System.out.println(multiple);\n\t\t\t\t\tsum = sum + multiple;\t\n\t\t\t\t}\n\t\t\t\tmultiple += set[j];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "private static int count(int S[], int m, int n) {\n // If n is o then there is 1 solution\n if (n == 0 ) return 1;\n // If n is less than 0 then no solution exists\n if (n < 0 ) return 0;\n // If there are no coins and n >= 0, then no solution exists\n if (m <= 0 && n >= 1) return 0;\n\n // Count is sum of solution that do not contain mth coin && contain at least one coin mth.\n // Including S[m-1] && excluding S[m-1]\n return count(S, m-1, n) + count(S, m, n-S[m-1]);\n }", "public int size() {\r\n\t\treturn set.size();\r\n\t}", "static int numElementsInCommon(Set<?> s1, Set<?> s2) {\n int result = 0;\n for (Object o1 : s1)\n if (s2.contains(o1))\n result++;\n return result;\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\tint hashCode = 0;\r\n\t\tfor (K key : keySet()) {\r\n\t\t\thashCode += (key.hashCode() ^ get(key).hashCode());\r\n\t\t}\r\n\t\treturn hashCode;\r\n\t}", "public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n if (t < 0) return false;\n TreeSet<Long> set = new TreeSet<>();\n for (int i = 0; i < nums.length; ++i) {\n long num = (long)nums[i];\n Long floor = set.floor(num), ceiling = set.ceiling(num);\n if (floor != null && num - floor <= t || ceiling != null && ceiling - num <= t) return true;\n set.add(num);\n if (i >= k) set.remove((long)nums[i - k]);\n }\n return false;\n}", "public Set<E> getNextSet()\r\n/* */ {\r\n/* 155 */ List<E> result = getNextArray();\r\n/* 156 */ if (result == null) {\r\n/* 157 */ return null;\r\n/* */ }\r\n/* */ \r\n/* 160 */ Set<E> resultSet = new LinkedHashSet(result);\r\n/* 161 */ return resultSet;\r\n/* */ }", "public int findPairs(int[] nums, int k) {\n if (k < 0) {\n return 0;\n }\n Set<Integer> unique = new HashSet<>();\n Set<Integer> duplicate = new HashSet<>();\n for (int n : nums) {\n if (!unique.add(n)) {\n duplicate.add(n);\n }\n }\n if (k == 0) {\n return duplicate.size();\n }\n int count = 0;\n for (int v : unique) {\n if (unique.contains(v + k)) {\n count += 1;\n }\n }\n return count;\n }", "private static HashSet<String> addElement(Map m, String key,int count) {\n\t\tIterator it = m.entrySet().iterator();\n\t\tHashSet<String> allParents=new HashSet<String>();\n\t\tHashSet<String> newNodeHS=new HashSet<String>();\n\t\tHashSet<String> receive=new HashSet<String>();\n\t\tString parent=\"\";\n\t\tif(readNodes.get(key)==null)\n\t\t{\n\t\t\tif(!(key.equals(root)))\n\t\t\t{\n\t\t\tallParents=(HashSet)m.get(key);\n\t\t\tIterator iter = allParents.iterator();\n\t\t\twhile(iter.hasNext())\n\t\t\t{\n\t\t\t\tparent=(String)iter.next();\n\t\t\t\tcount++;\n\t\t\t\treceive=addElement(m,parent,count);\n\t\t\t\tString str=key+\"-\"+parent;\n\t\t\t\tIterator toRecieve = receive.iterator();\n\t\t\t\twhile(toRecieve.hasNext())\n\t\t\t\t{\n\t\t\t\t\tnewNodeHS.add((String)toRecieve.next());\n\t\t\t\t}\n\t\t\t\tnewNodeHS.add(str);\n\t\t\t\tcount--;\n\t\t\t}\n\t\t\t\tif(count==0)\n\t\t\t\t{\n\t\t\t\t\tIterator<HashSet> iternew = totalDAG.iterator();\n\t\t\t\t\tHashSet<HashSet> inProgressDAG=new HashSet<HashSet>(totalDAG); \n\t\t\t\t\twhile (iternew.hasNext()) {\n\t\t\t\t\t HashSet<String> tillCreatedDAG=iternew.next();\n\t\t\t\t\t HashSet<String> union=new HashSet<String>(newNodeHS);\n\t\t\t\t\t union.addAll(tillCreatedDAG);\n\t\t\t\t\t inProgressDAG.add(union);\n\t\t\t\t\t}\n\t\t\t\t\ttotalDAG.clear();\n\t\t\t\t\ttotalDAG=inProgressDAG;\n\t\t\t\t\ttotalDAG.add(newNodeHS);\n\t\t\t\t\treadNodes.put(key, newNodeHS);\n\t\t\t\t\tSystem.out.println(\"Size: \" +totalDAG.size()+\" Nodes: \"+(++totalCount));\n\t\t\t\t\treturn newNodeHS;\n\t\t\t\t}\n\t\t\t\tcount--;\n\t\t\t\treturn newNodeHS;\t\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tString str=root;\n\t\t\t\t\tnewNodeHS.add(str);\n\t\t\t\t\tcount--;\n\t\t\t\t\treturn newNodeHS;\n\t\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (HashSet)readNodes.get(key);\n\t\t}\n\t}", "@Test\n\tpublic void testAddAll() {\n\t Set<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t Set<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t setA.addAll(setB);\n\t Set<Integer> union = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9));\n\t assertEquals(setA, union);\n }", "static boolean subSetSumProblem(int[] arr,int sum){\n// init\n int n = arr.length;\n boolean[][] dp = new boolean[n+1][sum+1];\n\n for (int j = 0;j<=sum;j++){\n dp[0][j] = false;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = true;\n }\n\n for (int i = 1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] || dp[i-1][j-arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "static long solve(long[] d) {\n int len = d.length;\n long[] dp = new long[len];\n\n Set<Long> set = new HashSet<>();\n\n for (int index1 = len - 1; index1 >= 0; index1--) {\n int count = 0;\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > d[index1]) {\n if( set.contains(d[index2] ) )continue;\n set.add(d[index2]);\n count++;\n }\n }\n set = new HashSet<>();\n dp[index1] = count;\n }\n\n long res = 0;\n Set<Long> distinct = new HashSet<>();\n for (int index1 = 0; index1 < len; index1++) {\n long curr = d[index1];\n if (distinct.contains(curr)) {\n continue;\n } else distinct.add(curr);\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > curr) {\n if (set.contains(d[index2])) continue;\n res += dp[index2];\n set.add(d[index2]);\n }\n }\n set = new HashSet<>();\n }\n\n return res;\n\n }", "@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }", "private static int pairwise(int[] input, int target) {\n\n Set<Integer> set = new HashSet<>();\n int indicesSum = 0;\n for(int i = 0; i < input.length; i++) {\n for(int j = i+1; j < input.length; j++) {\n if(isUseful(input, target, set, i, j)) {\n indicesSum += i + j;\n set.add(i);\n set.add(j);\n }\n }\n }\n return indicesSum;\n }", "@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }", "int[] MinSubUnion(int x, ArrayList<Integer> vn, ArrayList<Integer> vnComp){\n\tint[] ret = new int[x];\n\t\n\t/*\n\t * Build the set for legitimate users\n\t */\n\t//ArrayList<String> L = new ArrayList<String>();\n\tArrayList<String> LComp = new ArrayList<String>();\n\t//for (int v : vn)\n\t//\tL.addAll(this.LiSet[v]);\n\tfor (int v : vnComp){\n\t\tLComp.removeAll(this.LiSet[v]);\n\t\tLComp.addAll(this.LiSet[v]);\n\t}\n\t\n\tfor(int i = 0; i < x; i ++){\n\t\tint gain = 1000000000;\n\t\tint v_min = -1;\n\t\t\n\t\tfor(int v : vn){\n\t\t\tArrayList<String> temp = this.LiSet[v];\n\t\t\ttemp.removeAll(LComp);\n\t\t\tif(gain > temp.size()){\n\t\t\t\tgain = temp.size();\n\t\t\t\tv_min = v;\n\t\t\t}\n\t\t}\n\t\tif(v_min == -1)\n\t\t\tcontinue;\n\n\t\t//L.removeAll(this.LiSet[v_max]);\n\t\tLComp.removeAll(this.LiSet[v_min]);\n\t\tLComp.addAll(this.LiSet[v_min]);\n\t\tvn.remove(vn.indexOf(v_min));\n\t\tvnComp.add(v_min);\n\t\tret[i] = v_min;\n\t}\n\treturn ret;\n}", "public int getSumOfMultiples(int i, int[] set) {\n\t\tint min = set[0];\n\t\tint sum = 0;\n\t\t\n\t\tfor(int k = 0; k < set.length; k++) {\n\t\t\tif(set[k] < min) {\n\t\t\t\tmin = set[k];\n\t\t\t}\n\t\t}\n\t\tfor(int x = min; x < i; x++) {\n\t\t\tboolean multiplefound = false;\n\t\t\tfor(int y = 0; y < set.length; y++) {\n\t\t\t\tif(x % set[y] == 0) {\n\t\t\t\t\tmultiplefound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(multiplefound == true) {\n\t\t\t\tsum += x;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//System.out.println(sum);\n\t\treturn sum;\n\t}", "private void createBitStremMap(){\n itemListMap = new HashMap<>();\n \n for (ArrayList<Integer> transactions_set1 : transactions_set) {\n ArrayList curr_tr = (ArrayList) transactions_set1;\n if(curr_tr.size() >= min_itemset_size_K) \n for (Object curr_tr1 : curr_tr) {\n int item = (int) curr_tr1;\n itemListMap.put(item, itemListMap.getOrDefault(item, 0)+1);\n }\n }\n \n // 3. Remove items without minimum support\n itemListMap.values().removeIf(val -> val<min_sup);\n \n // 4. Sort the map to a set of entries\n Set<Map.Entry<Integer, Integer>> set = itemListMap.entrySet();\n frequentItemListSetLenOne = new ArrayList<>(set);\n Collections.sort( frequentItemListSetLenOne, new Comparator<Map.Entry<Integer, Integer>>(){\n @Override\n public int compare( Map.Entry<Integer, Integer> o1, Map.Entry<Integer, Integer> o2 )\n {\n return (o2.getValue()).compareTo( o1.getValue() );\n }\n });\n\n // 5.\n itemIndex = new HashMap<>();\n for(Map.Entry<Integer, Integer> entry : frequentItemListSetLenOne){\n itemIndex.put(entry.getKey(), itemIndex.size());\n }\n\n // 6.\n bitsetLen = frequentItemListSetLenOne.size();\n }", "private int[] hashSetMethod(int[] nums1, int[] nums2) {\n HashSet<Integer> s = new HashSet<Integer>();\n for (Integer i : nums1) {\n if (!s.contains(i)) s.add(i);\n }\n HashSet<Integer> intersection = new HashSet<Integer>();\n for (Integer i : nums2) {\n if (s.contains(i) && !intersection.contains(i)) {\n \tintersection.add(i);\n }\n }\n int[] res = new int[intersection.size()];\n Iterator<Integer> iter = intersection.iterator();\n for (int i = 0; iter.hasNext(); i++) {\n res[i] = iter.next();\n }\n return res;\n }", "@Test\n\tpublic void testAddHash() {\n\t\t// add a new method for ordering\n\t\tMySet <String> s = loadSet();\n\t\ts.add(\"Alice\");\n\t\ts.add(\"Sue\");\n\t\ts.add(\"Bob\");\n\t\ts.add(\"Cindy\");\n\t\ts.add(\"Joe\");\n\t\t\n\t\tassertEquals(5, ((MyHashSet<String>)s).map.size());\n\t\t\n\t\t\t\n\t}", "public List<List<Integer>> subsets2(int[] A){\n\n int res = 0;\n int diff = Integer.MIN_VALUE;\n int count = 0;\n int start = 0;\n for (int i = 1; i < A.length; i++){\n int curDiff = A[i] - A[i - 1];\n if (diff == curDiff){\n count += i - start - 1 > 0 ? i - start - 1 : 0;\n } else {\n start = i - 1;\n diff = currDiff;\n res += count;\n count = 0;\n }\n }\n res += count;\n System.out.println(res);\n return new ArrayList<List<Integer>>();\n }", "@Override\n public final int hashCode() {\n int acc = 0;\n for (E e : this) {\n if (e != null) {\n acc += e.hashCode();\n }\n }\n return acc;\n }", "public long findSet_representative( long data ){\n return findSet( map.get(data) ).data;\n }", "public int sumCount(int number){\n int sum=0;\n for(int i=1; i<=number; i++){\n sum=sum+countSetBits(i);\n }\n return sum;\n }", "MultiSet<X> add(X x);", "boolean SubArraySum( int arr[] , int n , int sum ){\n HashSet<Integer> s = new HashSet<Integer>();\n int pre_sum = 0 ;\n for( int i = 0 ; i < n ; i++ ){\n pre_sum += arr[i];\n if( pre_sum == sum ) // Corner case if pre-sum is equal to sum.\n return true;\n if( s.contains(pre_sum - sum))\n return true;\n s.add(pre_sum);\n }\n return false;\n }", "public int solution(int[] A) {\n Set<Integer> set = new HashSet<>();\n\n for(int i=1; i < A.length+1; i++)\n set.add(i);\n\n for(int i=0; i < A.length; i++)\n {\n if(set.contains(A[i]))\n set.remove(A[i]);\n\n else\n set.add(A[i]); \n }\n\n if(set.isEmpty())\n return 1;\n\n return 0;\n }", "public static void main( String[] args )\n {\n OrderedSet set = new OrderedSet( true );\n set.add( new Integer( 6 ) );\n set.add( new Integer( 1 ) );\n set.add( new Integer( 4 ) );\n set.add( new Integer( 1 ) );\n System.out.println( set );\n System.out.println();\n\n System.out.println( \"Enumerate the OrderedSet\" );\n Enumeration e = set.elements();\n while ( e.hasMoreElements() )\n System.out.println( e.nextElement() );\n System.out.println();\n\n System.out.println( \"Iterate through the OrderedSet\" );\n for ( OrderedSetIterator i = set.begin(); !i.atEnd(); i.advance() )\n System.out.println( i.get() );\n System.out.println();\n\n System.out.println( \"Show that duplicates can be added.\" );\n set.add( new Integer( 8 ) );\n System.out.println( \"set = \" + set );\n\n set.add( new Integer( 4 ) );\n System.out.println( \"set = \" + set );\n }", "@Override\n\tpublic int size() {\n\t\tint tamano = 0;\n\t\tint i = 0;\n\t\tIterator it = tabla.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tit.next();\n\t\t\ttamano += tabla.get(i).keySet().size();\n\t\t\ti++;\n\t\t}\n\t\treturn tamano;\n\t}", "public interface Set {\n\n /**\n * Create an empty set.\n *\n * @return the empty set\n */\n static Set createEmpty() {\n return new EmptySet();\n }\n\n /**\n * Checks if the ASet is empty.\n *\n * @return true if the set is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Given an {@code Integer} {@code element} add the element to the set. If {@code element} is\n * already a member of the set, we perform no operation and return back the set intact.\n *\n * @param element the new element to add to the set\n *\n * @return a newly created set that contains {@code element} and the original elements of the set.\n */\n Set add(Integer element);\n\n /**\n * Given an {@code Integer} {@code element} returns {@code true} if the element is already in the\n * set and {@code false} otherwise.\n *\n * @param element the element to check\n *\n * @return true if {@code element} is in the set, false otherwise\n */\n Boolean contains(Integer element);\n\n /**\n * Return the size of the set.\n *\n * @return return the size of the set\n */\n Integer size();\n\n /**\n * Given an element {@code element} remove it from the this list if it exists.\n *\n * @param element the element to remove\n *\n * @return set without {@code element}\n */\n Set remove(Integer element);\n\n\n /**\n * Given a set {@code other} return a new set which is the set union between {@code this} set and\n * {@code other} set.\n *\n * @param other set to perform union\n *\n * @return set union of this and other\n */\n Set union(Set other);\n\n\n /**\n * Returns the set intersection between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform intersection with\n *\n * @return set intersection between {@code this} and {@code otherSet}\n */\n Set intersect(Set otherSet);\n\n\n /**\n * Returns the set difference between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform set difference with\n *\n * @return set difference between {@code this} and {@code otherSet}\n */\n Set difference(Set otherSet);\n\n\n /**\n * Returns true if {@code this} set is a subset of {@code otherSet}.\n *\n * @param otherSet the set to check against\n *\n * @return true if this is a subset of otherSet, false otherwise\n */\n Boolean subset(Set otherSet);\n\n\n}", "public int size() {\n\t\treturn set.size();\n\t}", "public Collection<MatchingPair> matchingPairs(Collection<Integer> values, Integer targetSum)\n {\n HashMap<Integer, Integer> tableCompteur = new HashMap<>();\n LinkedHashMap<Integer, Integer> tablePaire = new LinkedHashMap<Integer, Integer>();\n Collection<MatchingPair> paireSansDuplication = new LinkedList();\n Collection<MatchingPair> solution = new LinkedList();\n\n // On itere sur les valeurs donnee pour savoir le compte de chaque valeur\n for (Integer valeur : values)\n {\n if (tableCompteur.containsKey(valeur))\n {\n // Partie Compteur\n Integer compteur = tableCompteur.get(valeur);\n compteur++;\n tableCompteur.put(valeur, compteur);\n }\n else {\n tableCompteur.put(valeur, 0);\n }\n\n }\n\n // On itere sur les valeurs donnee pour savoir les paires\n for (Integer element : values)\n {\n int temp = targetSum - element;\n if (tablePaire.containsKey(element))\n {\n if (tablePaire.get(element) != null)\n {\n paireSansDuplication.add(new MatchingPair(element, temp));\n }\n // si la table contient l'element on met nul pour ne pas avoir de repetition\n tablePaire.put(temp, null);\n }\n else if (!tablePaire.containsKey(element))\n {\n tablePaire.put(temp, element);\n }\n }\n\n // On trouve le minimum count entre les paire et leur compte pour tenir en compte de toutes les possibilites. Ici le meilleur cas reste O(n) ( pas de paire)\n for (MatchingPair paire : paireSansDuplication)\n {\n if (paire != null) { // verification au debug pr erreur nullpointer\n int a = tableCompteur.get(paire.first);\n int b = tableCompteur.get(paire.second);\n int minCount = Math.min(a+1, b+1);\n for (int i = 0; i < pow(minCount, 2); i++)\n {\n solution.add(new MatchingPair(paire.first, paire.second));\n }\n }\n }\n return solution;\n }", "private static long size(UIDSet[] uidset, long uidmax) {\n\tlong count = 0;\n\n\tif (uidset != null)\n\t for (UIDSet u : uidset) {\n\t\tif (uidmax < 0)\n\t\t count += u.size();\n\t\telse if (u.start <= uidmax) {\n\t\t if (u.end < uidmax)\n\t\t\tcount += u.end - u.start + 1;\n\t\t else\n\t\t\tcount += uidmax - u.start + 1;\n\t\t}\n\t }\n\t\n\treturn count;\n }", "int nnzInColumnSum(int[] colIds) {\n // Give a guess to the size of the union\n int totalSize = 0;\n for (int colId : colIds) {\n totalSize += this.getColumn(colId).size();\n }\n // Take union\n IntSet colIdUnion = new IntOpenHashSet(totalSize, 0.99F);\n for (int colId : colIds) {\n synchronized (this.getColumn(colId)) {\n colIdUnion.addAll(this.getColumn(colId));\n }\n }\n return colIdUnion.size();\n }", "@Test\n public void testIntersection3()\n {\n List<Integer> expected = new ArrayList<>();\n ConciseSet set1 = new ConciseSet();\n ConciseSet set2 = new ConciseSet();\n for (int i = 0; i < 1000; i++) {\n set1.add(i);\n set2.add(i);\n expected.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }", "public static void main(String[] args) {\n List<Integer> pr = new ArrayList<>();\n out:\n for (int p = 2; p <= 100; p++) {\n for (int q : pr) {\n if (p % q == 0) {\n continue out;\n }\n }\n pr.add(p);\n }\n Set<List<Integer>> s = new HashSet<>();\n for (int a = 2; a <= 100; a++) {\n List<Integer> l = new ArrayList<>();\n for (int p : pr) {\n int e = 0;\n for (int c = a; c % p == 0; c /= p) {\n e++;\n }\n l.add(e);\n }\n for (int b = 2; b <= 100; b++) {\n List<Integer> m = new ArrayList<>();\n for (int e : l) {\n m.add(b * e);\n }\n s.add(m);\n }\n }\n System.out.println(s.size());\n }", "void unionTreeCoreset(int k,int n_1,int n_2,int d, Point[] setA,Point[] setB, Point[] centres, MTRandom clustererRandom) {\n\t\t//printf(\"Computing coreset...\\n\");\n\t\t//total number of points\n\t\tint n = n_1+n_2;\n\n\t\t//choose the first centre (each point has the same probability of being choosen)\n\t\t\n\t\t//stores, how many centres have been choosen yet\n\t\tint choosenPoints = 0; \n\t\t\n\t\t//only choose from the n-i points not already choosen\n\t\tint j = clustererRandom.nextInt(n-choosenPoints); \n\n\t\t//copy the choosen point\n\t\tif(j < n_1){\n\t\t\t//copyPointWithoutInit(&setA[j],&centres[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setA[j].clone();\n\t\t} else {\n\t\t\tj = j - n_1;\n\t\t\t//copyPointWithoutInit(&setB[j],&centres[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setB[j].clone();\n\t\t}\n\t\ttreeNode root = new treeNode(setA,setB,n_1,n_2, centres[choosenPoints],choosenPoints); //??\n\t\tchoosenPoints = 1;\n\t\t\n\t\t//choose the remaining points\n\t\twhile(choosenPoints < k){\n\t\t\tif(root.cost > 0.0){\n\t\t\t\ttreeNode leaf = selectNode(root, clustererRandom);\n\t\t\t\tPoint centre = chooseCentre(leaf, clustererRandom);\n\t\t\t\tsplit(leaf,centre,choosenPoints);\n\t\t\t\t//copyPointWithoutInit(centre,&centres[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = centre;\n\t\t\t} else {\n\t\t\t\t//create a dummy point\n\t\t\t\t//copyPointWithoutInit(root.centre,&centres[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = root.centre;\n\t\t\t\tint l;\n\t\t\t\tfor(l=0;l<root.centre.dimension;l++){\n\t\t\t\t\tcentres[choosenPoints].coordinates[l] = -1 * 1000000;\n\t\t\t\t}\n\t\t\t\tcentres[choosenPoints].id = -1;\n\t\t\t\tcentres[choosenPoints].weight = 0.0;\n\t\t\t\tcentres[choosenPoints].squareSum = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\tchoosenPoints++;\n\t\t}\n\n\t\t//free the tree\n\t\tfreeTree(root);\n\n\t\t//recalculate clustering features\n\t\tint i;\n\t\tfor(i=0;i<n;i++){\n\t\t\t\t\n\t\t\tif(i < n_1) {\n\t\t\t\t\n\t\t\t\tint index = setA[i].centreIndex;\n\t\t\t\tif(centres[index].id != setA[i].id){\n\t\t\t\t\tcentres[index].weight += setA[i].weight;\n\t\t\t\t\tcentres[index].squareSum += setA[i].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setA[i].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setA[i].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tint index = setB[i-n_1].centreIndex;\n\t\t\t\tif(centres[index].id != setB[i-n_1].id){\n\t\t\t\t\tcentres[index].weight += setB[i-n_1].weight;\n\t\t\t\t\tcentres[index].squareSum += setB[i-n_1].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setB[i-n_1].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setB[i-n_1].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int subarraySumLeetCode(int[] nums, int k) {\n int count = 0;\n for (int start = 0; start < nums.length; start++) {\n for (int end = start + 1; end <= nums.length; end++) {\n int sum = 0;\n for (int i = start; i < end; i++) {\n sum += nums[i];\n }\n if (sum == k) {\n count++;\n }\n }\n }\n return count;\n }", "private List<int[]> validateCandidatesWithList(List<int[]> candidates){\n int size = candidates.get(0).length;\n\n Map<String, SetWithFrequency> frequency = new HashMap<>();\n for (int[] candidate : candidates){\n String key = arrayToString(candidate);\n frequency.put(key, new SetWithFrequency(key, candidate, 0));\n }\n\n\n // Filtering the database using the items appeared frequent in FIS of size k - 1\n\n Set<Integer> dict = new HashSet<>();\n for (int[] list : candidates){\n for (int num : list){\n dict.add(num);\n }\n }\n\n for (int i = 0; i < mDataList.size(); i++) {\n if (skipLines.contains(i)){\n continue;\n }\n\n List<Integer> transaction = mDataList.get(i);\n\n // Remove the item not in dictionary (still frequent set)\n transaction.removeIf(p -> !dict.contains(p));\n\n if (transaction.size() < size){\n skipLines.add(i);\n continue;\n }\n\n // Finds all subset of size k for this transaction\n\n List<List<Integer>> subsets = subsetOfSizeK(transaction, size);\n\n boolean empty = true;\n\n for (List<Integer> subset : subsets){\n String key = listToString(subset);\n if (frequency.containsKey(key)){\n empty = false;\n frequency.get(key).frequency++;\n }\n }\n\n if (empty){\n skipLines.add(i);\n }\n }\n\n\n List<int[]> res = new ArrayList<>();\n for (SetWithFrequency entry : frequency.values()){\n if (entry.frequency >= mThreshold){\n res.add(entry.set);\n\n // Put the Set - frequency entry in result\n mItemSet.add(entry.key + \"(\" + entry.frequency + \")\\n\");\n }\n }\n\n return res;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "public static long maximumSubarraySum_bf(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n for (int i = 0; i <= len - k; i++) {\n long sum = 0;\n Set<Integer> set = new HashSet<>();\n for (int j = 0; j < k; j++) {\n if (set.contains(nums[i + j])) {\n sum = 0;\n break;\n }\n\n set.add(nums[i + j]);\n sum += nums[i + j];\n }\n\n ans = Math.max(ans, sum);\n }\n\n return ans;\n }", "void mo30185a(HashSet<zzawj> hashSet);", "public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }" ]
[ "0.6326504", "0.6208082", "0.6125647", "0.5959933", "0.5845171", "0.5835554", "0.5826625", "0.5774367", "0.5762074", "0.57428813", "0.56355846", "0.56328374", "0.557005", "0.55548006", "0.5545186", "0.5543762", "0.55432564", "0.55423355", "0.55282074", "0.55109143", "0.549637", "0.5487485", "0.5485263", "0.5484042", "0.5476433", "0.5475865", "0.54743433", "0.5473371", "0.5457016", "0.5449073", "0.5446132", "0.5439266", "0.5434693", "0.5431342", "0.54190624", "0.5418551", "0.54084533", "0.5407277", "0.539923", "0.539053", "0.5386863", "0.5386087", "0.53799564", "0.53797776", "0.53767556", "0.5374837", "0.5369987", "0.5369624", "0.5368666", "0.5368089", "0.53665847", "0.536592", "0.5359714", "0.5339212", "0.533891", "0.5338769", "0.53289056", "0.53195995", "0.5319255", "0.5305886", "0.5304636", "0.5304517", "0.5303309", "0.5297953", "0.5297168", "0.5292898", "0.529142", "0.5287929", "0.5282177", "0.5282118", "0.52792895", "0.5278313", "0.5275962", "0.5269496", "0.5266208", "0.5266085", "0.5259192", "0.52559257", "0.52549946", "0.5251525", "0.52513385", "0.52468765", "0.5244996", "0.52431726", "0.5239325", "0.5238297", "0.52375746", "0.52361506", "0.5234731", "0.52334374", "0.5233121", "0.5230651", "0.52270687", "0.52161473", "0.521437", "0.52096325", "0.5208082", "0.52075076", "0.52063733", "0.5203029", "0.5199163" ]
0.0
-1
Takes O(n) + Collections.sort()
public void getDegreeMaps(HashMap<Integer, ArrayList<String>> allValues, ArrayList<Integer> maxValues){ Iterator it = graphVertexHashMap.entrySet().iterator(); while(it.hasNext()){ Map.Entry pair = (Map.Entry) it.next(); String vertex = (String)pair.getKey(); int outDegree = outDegree(vertex); if(allValues.get(outDegree) == null){ ArrayList<String> list = new ArrayList<String>(); list.add(vertex); allValues.put(outDegree, list); } else{ allValues.get(outDegree).add(vertex); } maxValues.add(outDegree); } Collections.sort(maxValues); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sort();", "void sort();", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "static List<Integer> getBySorting(Integer[] arr) {\n //copy of n elems => n\n List<Integer> sortedArr = Arrays.asList(arr);\n //n OR n log(n) => n + n OR n + n log(n)\n Collections.sort(sortedArr);\n //constant speed\n return Stream.of(sortedArr.get(sortedArr.size() - 1), sortedArr.get(sortedArr.size() - 2), sortedArr.get(sortedArr.size() - 3)).collect(Collectors.toList());\n }", "public void mergeSort(List<Integer> a, int n) {\n if (n < 2) {\n return;\n }\n int mid = n / 2;\n List<Integer> l = new LinkedList<Integer>();\n List<Integer> r = new LinkedList<Integer>();\n \n for (int i = 0; i < mid; i++) {\n l.add(a.get(i));\n }\n for (int i = mid; i < n; i++) {\n r.add(a.get(i));\n }\n mergeSort(l, mid);\n mergeSort(r, n - mid);\n \n merge(a, l, r, mid, n - mid);\n }", "public static void sort(int[] a, int n) {\n\t\t\n\t\t\n\t\tint i, j, temp;\n\t\tfor (i = 1; i < n; i++) {\n\t\t\t//a[i] is the first element of unsorted part\n\t\t\ttemp = a[i];\n\t\t\tfor (j = i - 1; j >= 0 && a[j] > temp; j--) {\n\t\t\t\ta[j + 1] = a[j];\n\t\t\t}\n\t\t\ta[j + 1] = temp;\n\t\t}\n\n\t}", "public static void s1AscendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Ascending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n start = System.nanoTime();\n sli.sort1(ai);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "public static <T extends Comparable <? super T>> void mysterySort1(List <T> list){\r\n\t\tfor (int i = 1; i < list.size(); i++){ //n\r\n\t\t\tint j = i; //1\r\n\t\t\t\r\n\t\t\t//list.get => O(1)\r\n\t\t\t\r\n\t\t\twhile (j > 0 && list.get(j - 1).compareTo(list.get(j)) > 0){ //\r\n\t\t\t\tswap(list, j, j - 1); //O(1)\r\n\t\t\t\tj --;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void sortAccording(int A1[], int A2[], int m, int n)\n {\n // The temp array is used to store a copy \n // of A1[] and visited[] is used to mark the \n // visited elements in temp[].\n int temp[] = new int[m], visited[] = new int[m];\n for (int i = 0; i < m; i++)\n {\n temp[i] = A1[i];\n visited[i] = 0;\n }\n \n // Sort elements in temp\n Arrays.sort(temp);\n \n // for index of output which is sorted A1[]\n int ind = 0; \n \n // Consider all elements of A2[], find them\n // in temp[] and copy to A1[] in order.\n for (int i = 0; i < n; i++){\n\n // Find index of the first occurrence\n // of A2[i] in temp\n int f = first(temp, 0, m-1, A2[i], m);\n \n // If not present, no need to proceed\n if (f == -1) \n continue;\n \n // Copy all occurrences of A2[i] to A1[]\n for (int j = f; (j < m && temp[j] == A2[i]); j++){\n \n A1[ind++] = temp[j];\n visited[j] = 1;\n }\n }\n \n // Now copy all items of temp[] which are \n // not present in A2[]\n for (int i = 0; i < m; i++)\n if (visited[i] == 0)\n A1[ind++] = temp[i];\n }", "private void testCountingSort() {\n int listSize = 1000000;\r\n // Generate list of random values\r\n int[] a = new int[listSize];\r\n Random r = new Random();\r\n for (int i = 0; i < a.length; i++) {\r\n a[i] = r.nextInt(20000);\r\n }\r\n \r\n //a = new int[] {10, 20, 8, -4, -7, 22 };\r\n\r\n // Copy list to new array\r\n int[] a2 = new int[listSize];\r\n System.arraycopy(a, 0, a2, 0, a.length);\r\n\r\n TestUtil.print(a);\r\n // Sort the two arrays\r\n long time = System.currentTimeMillis();\r\n countSort(a);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Count sort took: \" + time);\r\n TestUtil.print(a);\r\n time = System.currentTimeMillis();\r\n Arrays.sort(a2);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Java sort took: \" + time);\r\n\r\n // Compare the two arrays\r\n for (int i = 0; i < listSize; i++) {\r\n if (a[i] != a2[i]) {\r\n System.out.println(\"Error: Results do not match.\");\r\n return;\r\n }\r\n }\r\n System.out.println(\"Sort successful\");\t\t\r\n\t}", "void sort() {\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) { // if the first term is larger\n\t\t\t\t\t\t\t\t\t\t\t\t// than the last term, then the\n\t\t\t\t\t\t\t\t\t\t\t\t// temp holds the previous term\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];// swaps places within the array\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "private static void sort(int[] arr, int n) {\n for(int i=0;i<n;i++) {\n int min = arr[i];\n int idx = i;\n for(int j = i+1; j<n;j++) {\n if(arr[j] < min) {\n min = arr[j];\n idx = j;\n }\n }\n swap(arr, i,idx);\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "void sortV();", "private PerfectMergeSort() {}", "public static void sort(int[] a, int n) {\n\t\tint x, j, temp;\n\n\t\tfor (x = n - 2; x >= 0; x--) {\n\t\t\tfor (j = 0; j <= x; j++) {\n\t\t\t\tif (a[j] > a[j + 1]) {\n\t\t\t\t\ttemp = a[j];\n\t\t\t\t\ta[j] = a[j+1];\n\t\t\t\t\ta[j+1] = temp;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}", "static void heapSortVector(Vector<Integer> arr, int n) {\r\n\t\tint z = n / 2 - 1;\r\n\t\tdo {\r\n\t\t\theapify1(arr, n, z);\r\n\t\t\tz--;\r\n\t\t} while (z >= 0);\r\n\t\tint i = n - 1;\r\n\t\twhile (i >= 0) {\r\n\t\t\tInteger temp = arr.get(0);\r\n\t\t\tarr.set(0, arr.get(i));\r\n\t\t\tarr.set(i, temp);\r\n\t\t\theapify1(arr, i, 0);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}", "public static void s1DescendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Descending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n Integer[] bi = new Integer[ai.length];\n int count = 0;\n for (int i = ai.length - 1; i >= 0; i--) {\n bi[count] = ai[i];\n count++;\n }\n start = System.nanoTime();\n sli.sort1(bi);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "void sort(int arr[])\n {\n int n = arr.length;\n for (int i=1; i<n; i++)\n {\n int key = arr[i];\n int j = i-1;\n \n while (j>=0 && arr[j] > key)\n {\n arr[j+1] = arr[j];\n j--;\n }\n arr[j+1] = key;\n }\n }", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "public static int[] sort(int[] data, int n) {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint min = i;\n\t\t\tfor (int j = i + 1; j < n; j++) {\n\t\t\t\tif (data[j] <= data[min]) {\n\t\t\t\t\tmin = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tUtil.swap(data, i, min);\n\n\t\t}\n\t\treturn data;\n\t}", "public void triCollection(){\r\n Collections.sort(collection);\r\n }", "public static void sort(int a[], int n) {\n\t\tint l = 0;\r\n\t\tint h = n-1;\r\n\t\tint mid = 0;\r\n\t\twhile (mid <= h) {\r\n\t\t\tint temp = 0;\r\n\t\t\tswitch(a[mid]) {\r\n\t\t\tcase 0 : {\r\n\t\t\t\ttemp = a[l];\r\n\t\t\t\ta[l] = a[mid];\r\n\t\t\t\ta[mid] = temp;\r\n\t\t\t\tl++;\r\n\t\t\t\tmid++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 1 : {\r\n\t\t\t\tmid++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 2 : {\r\n\t\t\t\ttemp = a[mid];\r\n\t\t\t\ta[mid] = a[h];\r\n\t\t\t\ttemp = a[h];\r\n\t\t\t\th--;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void Insertionsort(int a[]) \n\t { \n\t int n = a.length; \n\t for (int i=1; i<n; ++i) \n\t { \n\t int key = a[i]; \n\t int j = i-1;\n\t while (j>=0 && a[j] > key) \n\t { \n\t a[j+1] = a[j]; \n\t j = j-1; \n\t } \n\t a[j+1] = key; \n\t } \n\t }", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}", "static long[] radixsort(int arr[], int n)\r\n\r\n {\n\r\n int m = getMax(arr, n);\r\n\r\n long st = System.nanoTime();\r\n\r\n\r\n\r\n for (int exp = 1; m/exp > 0; exp *= 10)\r\n\r\n countSort(arr, n, exp);\r\n\r\n \r\n\r\n long et = System.nanoTime();\r\n\r\n threeVals[2] = et - st;\r\n\r\n return threeVals;\r\n\r\n }", "public void sortGivenArray_popularity() { \n int i, j, k; \n for(i = movieList.size()/2; i > 0; i /= 2) {\n for(j = i; j < movieList.size(); j++) {\n Movie key = movieList.get(j);\n for(k = j; k >= i; k -= i) {\n if(key.rents > movieList.get(k-i).rents) {\n movieList.set(k, movieList.get(k-i));\n } else {\n break; \n }\n }\n movieList.set(k, key);\n }\n } \n }", "public static int[] partialSort(int[] a) {\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < 2 - i; j++) {\n if (a[j] > a[j+1]) {\n int temp = a[j+1];\n a[j+1] = a[j];\n a[j] = temp;\n }\n }\n }\n return a;\n}", "public static void sort(Comparable[] a)\n {\n // Do lg N passes of pairwise merges.\n int N = a.length;\n aux = new Comparable[N];\n for (int sz = 1; sz < N; sz = sz+sz) // sz: subarray size\n for (int lo = 0; lo < N - sz; lo += sz + sz) // lo: subarray index\n merge(a, lo, lo + sz - 1, Math.min(lo + sz + sz - 1, N - 1));\n }", "private int[] sortIntegers(int n) {\n\n int nArray[] = new int[n];\n int temp, s;\n Random myRandom = new Random();\n //initialize array from 0 to n - 1\n for (int i = 0; i < n; i++) {\n nArray[i] = i;\n }\n //i is number ot items remaining in list\n for (int i = n; i >= 1; i--) {\n s = myRandom.nextInt(i);\n temp = nArray[s];\n nArray[s] = nArray[i - 1];\n nArray[i - 1] = temp;\n }\n return (nArray);\n }", "public static void sorting() {\n List<String> wordList = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n wordList.add(UUID.randomUUID().toString());\n\n //Sort and filter the list using compare to sequentially\n long t1s = System.nanoTime();\n List<String> a =wordList.stream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t1d = System.nanoTime() - t1s;\n\n //Sort and filter the list using compare to in parallel\n long t2s = System.nanoTime();\n List<String> b = wordList.parallelStream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t2d = System.nanoTime() - t2s;\n\n System.out.println(\"Filter + Sort Serial time : \" + t1d);\n System.out.println(\"Filter + Sort Parallel time : \" + t2d);\n }", "private int[] sort(int arr[]) {\r\n\t\tint n = arr.length;\r\n\r\n\t\tif (n == 1) { // base case\r\n\t\t\treturn arr;\r\n\t\t}\r\n\t\t// divide\r\n\t\tint[] arrL = Arrays.copyOfRange(arr, 0, (n / 2));\r\n\t\tint[] arrR = Arrays.copyOfRange(arr, (n / 2), (n));\r\n\t\t// and conquer\r\n\t\treturn merge(sort(arrL), sort(arrR));\r\n\t}", "public void sort() {\n Stack<Pair> stack = new Stack();\n //fill the stack\n Pair temp = new Pair(0, a.length);\n stack.push(temp);\n quickSort(stack,stack.peek().first, stack.peek().n);\n }", "public void sort(int[] a) {\n\t\tint n = a.length;\n\t\tint temp;\n\t\tfor (int gap = n / 2; gap > 0; gap /= 2) {\n\t\t\tfor (int i = gap; i < n; i++) {\n\t\t\t\tfor (int j = i - gap; j >= 0; j -= gap) {\n\t\t\t\t ++totalValCmp;\n\t\t\t\t if (a[j] > a[j + gap]) {\n\t\t\t\t\t temp = a[j];\n\t\t\t\t\t a[j] = a[j + gap];\n\t\t\t\t\t a[j + gap] = temp;\n\t\t\t\t\t ++totalswaps;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "ArrayList <Integer> nearlySorted(int arr[], int num, int k)\n {\n PriorityQueue<Integer> pq = new PriorityQueue<>();\n ArrayList<Integer> res = new ArrayList<>();\n for(int i=0;i<k+1;i++){\n pq.add(arr[i]);\n }\n \n for(int i=k+1;i<num;i++){\n res.add(pq.remove());\n pq.add(arr[i]);\n }\n \n while(pq.size()>0){\n res.add(pq.remove());\n }\n \n return res;\n }", "static void heapSort(ArrayList<Integer> arr, int n) {\r\n\t\tint z = n / 2 - 1;\r\n\t\tdo {\r\n\t\t\theapify(arr, n, z);\r\n\t\t\tz--;\r\n\t\t} while (z >= 0);\r\n\t\tint i = n - 1;\r\n\t\twhile (i >= 0) {\r\n\t\t\tint temp = arr.get(0);\r\n\t\t\tarr.set(0, arr.get(i));\r\n\t\t\tarr.set(i, temp);\r\n\t\t\theapify(arr, i, 0);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}", "public static <T extends Comparable <? super T>> void mysterySort3(List <T> list){\r\n\t\twhile (!isSorted(list)){ // O(n)\r\n\t\t\tCollections.shuffle(list); //O(n)\r\n\t\t}\r\n\t}", "private static void sortingMemo() {\n\t\t\n\t}", "static void sortByFreq(int arr[], int n){\n Map<Integer, Integer> map = new HashMap<>(); \n List<Integer> outputArray = new ArrayList<>(); \n \n // Assign elements and their count in the list and map \n for (int current : arr) { \n int count = map.getOrDefault(current, 0); \n map.put(current, count + 1); \n outputArray.add(current); \n } \n \n // Compare the map by value \n SortComparator comp = new SortComparator(map); \n \n // Sort the map using Collections CLass \n Collections.sort(outputArray, comp); \n \n // Final Output \n for (Integer i : outputArray) { \n System.out.print(i + \" \"); \n }\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }" ]
[ "0.6338632", "0.6338632", "0.62166876", "0.6203396", "0.6166537", "0.6139021", "0.6085457", "0.60511965", "0.6042732", "0.6036588", "0.60335547", "0.6028109", "0.6021967", "0.60026664", "0.5999322", "0.59242123", "0.5921562", "0.5903082", "0.5880479", "0.58681685", "0.58668995", "0.58582234", "0.5855606", "0.5855291", "0.58460367", "0.5821951", "0.5812396", "0.5804445", "0.5787455", "0.57793915", "0.5768209", "0.5766296", "0.5765786", "0.5763474", "0.5759852", "0.57416755", "0.57401085", "0.5738386", "0.57341427", "0.5726281", "0.5717279", "0.5712795", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.57127446", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155", "0.571155" ]
0.0
-1
Takes O(n) + O(n)
public void getInfluentialModularMaps(HashMap<Float, ArrayList<String>> allValues, ArrayList<Float> maxValues){ Iterator it = graphVertexHashMap.entrySet().iterator(); while(it.hasNext()){ Map.Entry pair = (Map.Entry) it.next(); String vertex = (String)pair.getKey(); float influence = influence(vertex); if(allValues.get(influence) == null){ ArrayList<String> list = new ArrayList<>(); list.add(vertex); allValues.put(influence, list); } else{ allValues.get(influence).add(vertex); } maxValues.add(influence); } Collections.sort(maxValues); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "public int findDuplicate(int[] nums) {\n if(nums == null || nums.length == 0) return 0;\n\n int slow = nums[0];\n int fast = nums[nums[0]];\n\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n}", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(1)\r\n nums[i+1]=nums[j+1]; //O(1)\r\n nums[j+1]=temp; // O(1)\r\n while(j+1<nums.length && nums[j+1] != 4) //O(n)\r\n j++; // n+1\r\n }\r\n i++; // n+1\r\n }\r\n return nums; //O(1)\r\n}", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "static int[] OnepassSol1(int[]a, int n){\r\n Map<Integer, Integer> map = new HashMap<>();\r\n for (int i = 0; i < a.length; i++) {\r\n int complement = n - a[i];\r\n if (map.containsKey(complement)) {\r\n return new int[] { map.get(complement), i };\r\n }\r\n map.put(a[i], i);\r\n }\r\n int[] ans = {-1,-1};\r\n return ans;\r\n }", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public boolean linearIn(int[] outer, int[] inner) {\r\n int comp=0; // O(1)\r\n int count=0; // O(1)\r\n if(inner.length==0) // O(1)\r\n return true; // O(1)\r\n for(int i=0; i<outer.length; i++) { // O(n)\r\n if(outer[i]==inner[count]) { // O(1)\r\n comp++; // O(1)\r\n count++; // O(1)\r\n } else if(outer[i]>inner[count]) // O(1)\r\n return false; // O(1)\r\n if (comp==inner.length) // O(1)\r\n return true; // O(1)\r\n }\r\n return false; // O(1)\r\n}", "static long nPolyNTime(int[] n) {\n int temp = n.length;\n long sum = 0;\n if(n == null || n.length == 0) return -1;\n for(int i = 0; i < n.length; ++i) {\n while(temp --> 0) {\n for(int j = 0; j < n.length; ++j) {\n sum += n[i] + n[j];\n }\n }\n }\n return sum;\n }", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "static int getMissingByAvoidingOverflow(int a[], int n)\n\t {\n\t int total = 2;\n\t for (int i = 3; i <= (n + 1); i++)\n\t {\n\t total =total+ i -a[i - 2];\n\t //total =total- a[i - 2];\n\t }\n\t return total;\n\t }", "static long arrayManipulation(int n, int[][] queries) {\r\n long result = 0, sum = 0;\r\n long[] arr = new long[n];\r\n for(int i = 0; i < queries.length; i++){\r\n int firstIndex = queries[i][0] - 1;\r\n int lastIndex = queries[i][1] - 1;\r\n long numberToAdd = queries[i][2];\r\n arr[firstIndex] += numberToAdd;\r\n if (lastIndex+1 < n)\r\n arr[lastIndex+1] -= numberToAdd;\r\n }\r\n\r\n for(long l : arr){\r\n sum += l;\r\n if(sum > result)\r\n result = sum;\r\n }\r\n\r\n return result;\r\n }", "private static int f(int n, int complete, int other, int[] arr) {\n if(n<=0)\n return 0;\n int res=0;\n ArrayList<Integer>list=new ArrayList<Integer>();\n for(int a:arr)\n if(a>0)\n list.add(a);\n int brr[]=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n while(brr.length!=0){\n int index=0;\n for(int i=1;i<brr.length;i++)\n if(brr[index]<brr[i])\n index=i;\n for(int i=0;i<brr.length;i++){\n if(index==i)\n brr[i]-=complete;\n else\n brr[i]-=other;\n }\n list=new ArrayList<Integer>();\n for(int a:brr)\n if(a>0)\n list.add(a);\n brr=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n res++;\n }\n return res;\n }", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "private static int betterSolution(int n) {\n return n*n*n;\n }", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }", "public static void main(String args[] ) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] seqArray = new int[n];\n for (int i = 0; i < n; i++) {\n seqArray[i] = scanner.nextInt();\n }\n // getSeqValue(seqArray); //this method is an accepted one on Hackerrank but time complexity is not order n; i.e. !O(n);\n getLinearOrderY(seqArray); // trying to get O(n) time complexity;\n }", "public static int solveEfficient(int n) {\n if (n == 0 || n == 1)\n return 1;\n\n int n1 = 1;\n int n2 = 1;\n int sum = 0;\n\n for (int i = 2; i <= n; i++) {\n sum = n1 + n2;\n n1 = n2;\n n2 = sum;\n }\n return sum;\n }", "public static int ulam(int n) {\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n\n int i = 3;\n while (list.size() < n) {\n\n int count = 0;\n for (int j = 0; j < list.size() - 1; j++) {\n\n for (int k = j + 1; k < list.size(); k++) {\n if (list.get(j) + list.get(k) == i)\n count++;\n if (count > 1)\n break;\n }\n if (count > 1)\n break;\n }\n if (count == 1)\n list.add(i);\n i++;\n }\n return list.get(n - 1);\n }", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "static long findSum(int N)\n\t{\n\t\tif(N==0) return 0;\n\t\treturn (long)((N+1)>>1)*((N+1)>>1)+findSum((int)N>>1);\n\t\t\n\t}", "public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n if (t < 0) return false;\n TreeSet<Long> set = new TreeSet<>();\n for (int i = 0; i < nums.length; ++i) {\n long num = (long)nums[i];\n Long floor = set.floor(num), ceiling = set.ceiling(num);\n if (floor != null && num - floor <= t || ceiling != null && ceiling - num <= t) return true;\n set.add(num);\n if (i >= k) set.remove((long)nums[i - k]);\n }\n return false;\n}", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "public static void targetSumPair(int[] arr, int target){\n //write your code here\n Arrays.sort(arr); // O(nlogn)\n int i=0, j=arr.length-1;\n while(i < j) {\n if(arr[i]+arr[j] < target) {\n i++;\n }\n else if(arr[i] + arr[j] > target)\n j--;\n else {\n System.out.println(arr[i] + \", \" + arr[j]);\n i++; j--;\n }\n }\n }", "private static boolean findEqualSumSubsetBottomUp(int[] arr, int n) {\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tsum+=arr[i];\n\t\t}\n\t\tif(sum%2==1) {\n\t\t\treturn false;\n\t\t}\n \t\treturn findEqualSumBottomUp(arr,n,sum/2);\n\t}", "static int countSubarrWithEqualZeroAndOne(int arr[], int n)\n {\n int count=0;\n int currentSum=0;\n HashMap<Integer,Integer> mp=new HashMap<>();\n for(int i=0;i<arr.length;i++)\n {\n if(arr[i]==0)\n arr[i]=-1;\n currentSum+=arr[i];\n \n if(currentSum==0)\n count++;\n if(mp.containsKey(currentSum))\n count+=mp.get(currentSum);\n if(!mp.containsKey(currentSum))\n mp.put(currentSum,1);\n else\n mp.put(currentSum,mp.get(currentSum)+1);\n \n \n }\n return count;\n }", "public static boolean addUpToFast(int[] array, int n){\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor(int i = 0; i < array.length; i++){\n\t\t\tif(hs.contains(n-array[i]))\n\t\t\t\treturn true;\n\t\t\ths.add(array[i]);\n\t\t}\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "public List<List<Integer>> threeSum(int[] nums) {\n List<List<Integer>> result = new ArrayList<>(nums.length);\n\n // Prepare\n Arrays.sort(nums);\n// int firstPositiveIndex = 0;\n// int negativeLength = 0;\n// List<Integer> numsFiltered = new ArrayList<>();\n// for (int i = 0; i < nums.length; i++) {\n// if (i == 0 || i == 1 || nums[i] == 0 || (nums[i] != nums[i-2])) {\n// numsFiltered.add(nums[i]);\n// if ((nums[i] >= 0) && (firstPositiveIndex == 0)) {\n// firstPositiveIndex = numsFiltered.size() - 1;\n// }\n// if ((nums[i] <= 0)) {\n// negativeLength = numsFiltered.size();\n// }\n// }\n// }\n// nums = numsFiltered.stream().mapToInt(i->i).toArray();\n\n // Func\n\n for(int i=0; (i < nums.length) && (nums[i] <= 0); i++) {\n if (i != 0 && nums[i] == nums[i-1]) {\n continue;\n }\n for(int j=i+1; j<nums.length; j++) {\n if (j != i+1 && nums[j] == nums[j-1]) {\n continue;\n }\n for(int k=nums.length-1; (k>j) && nums[k] >= 0; k--) {\n if (k != nums.length-1 && nums[k] == nums[k+1]) {\n continue;\n }\n int sum = nums[i]+nums[j]+nums[k];\n if (sum > 0) {\n continue;\n } else if (sum < 0) {\n break;\n }\n\n List<Integer> ok = new ArrayList<>();\n ok.add(nums[i]);\n ok.add(nums[j]);\n ok.add(nums[k]);\n result.add(ok);\n break;\n }\n }\n }\n\n// System.out.println(\"Finish time = \" + (System.nanoTime() - start) / 1_000_000);\n// System.out.println(\"result size = \" + result.size());\n\n return result;\n }", "private static void sortAccording(int A1[], int A2[], int m, int n)\n {\n // The temp array is used to store a copy \n // of A1[] and visited[] is used to mark the \n // visited elements in temp[].\n int temp[] = new int[m], visited[] = new int[m];\n for (int i = 0; i < m; i++)\n {\n temp[i] = A1[i];\n visited[i] = 0;\n }\n \n // Sort elements in temp\n Arrays.sort(temp);\n \n // for index of output which is sorted A1[]\n int ind = 0; \n \n // Consider all elements of A2[], find them\n // in temp[] and copy to A1[] in order.\n for (int i = 0; i < n; i++){\n\n // Find index of the first occurrence\n // of A2[i] in temp\n int f = first(temp, 0, m-1, A2[i], m);\n \n // If not present, no need to proceed\n if (f == -1) \n continue;\n \n // Copy all occurrences of A2[i] to A1[]\n for (int j = f; (j < m && temp[j] == A2[i]); j++){\n \n A1[ind++] = temp[j];\n visited[j] = 1;\n }\n }\n \n // Now copy all items of temp[] which are \n // not present in A2[]\n for (int i = 0; i < m; i++)\n if (visited[i] == 0)\n A1[ind++] = temp[i];\n }", "public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n if (t < 0) return false;\n long sz = (long)t + 1;\n Map<Long, Long> map = new HashMap<>();\n for (int i = 0; i < nums.length; ++i) {\n long bucket = getBucket(nums[i], sz);\n if (map.containsKey(bucket)) return true;\n if (map.containsKey(bucket + 1) && Math.abs(nums[i] - map.get(bucket + 1)) < sz) return true;\n if (map.containsKey(bucket - 1) && Math.abs(nums[i] - map.get(bucket - 1)) < sz) return true;\n map.put(bucket, (long)nums[i]);\n if (i >= k) map.remove(getBucket(nums[i - k], sz));\n }\n return false;\n}", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "private int getCondensedIndex(int n, int i, int j) {\n if (i < j) {\n return n * i - (i * (i + 1) / 2) + (j - i - 1);\n }\n else if (i > j) {\n return n * j - (j * (j + 1) / 2) + (i - j - 1);\n }\n else{\n return 0;\n }\n }", "void solve() throws IOException {\n int[] nk = ril(2);\n int n = nk[0];\n int k = nk[1];\n int[] p = ril(n);\n int[] b = ril(k);\n for (int i = 0; i < n; i++) p[i]--;\n for (int i = 0; i < k; i++) b[i]--;\n\n int[] numToIdx = new int[n];\n for (int i = 0; i < n; i++) numToIdx[p[i]] = i;\n\n boolean[] remove = new boolean[n];\n Arrays.fill(remove, true);\n for (int bi : b) remove[bi] = false;\n List<Integer> toRemove = new ArrayList<>(n - k);\n for (int i = 0; i < n; i++) if (remove[i]) toRemove.add(i);\n Collections.sort(toRemove);\n\n int[] prevSmaller = new int[n];\n prevSmaller[0] = -1;\n int prevIdx = remove[p[0]] ? -1 : 0;\n for (int i = 1; i < n; i++) {\n int j = prevIdx;\n while (j != -1 && p[i] < p[j]) j = prevSmaller[j];\n prevSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n int[] nextSmaller = new int[n];\n nextSmaller[n-1] = n;\n prevIdx = remove[p[n-1]] ? n : n-1;\n for (int i = n-2; i >= 0; i--) {\n int j = prevIdx;\n while (j != n && p[i] < p[j]) j = nextSmaller[j];\n nextSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n\n int[] init = new int[n];\n Arrays.fill(init, 1);\n SegmentTree st = new SegmentTree(init);\n long ans = 0;\n for (int x : toRemove) {\n int idx = numToIdx[x];\n int l = prevSmaller[idx] + 1;\n int r = nextSmaller[idx] - 1;\n ans += st.query(l, r+1);\n st.modify(idx, 0);\n }\n pw.println(ans);\n }", "private static int[] p2(int[] ar, int n) {\n int[] p2 = new int[n];\n Arrays.fill(p2, n);\n Stack<Integer> st = new Stack<>();\n for (int i = 0; i < n; i++) {\n while (st.size() != 0 && ar[i] < ar[st.peek()]) {\n p2[st.peek()] = i;\n st.pop();\n }\n st.push(i);\n }\n return p2;\n }", "public static int solution(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n while (arr[i] != i + 1 && arr[i] < n && arr[i] > 0) {\n int temp = arr[i];\n if (temp == arr[temp - 1])\n break;\n arr[i] = arr[temp - 1];\n arr[temp - 1] = temp;\n }\n }\n for (int i = 0; i < n; i++)\n if (arr[i] != i + 1)\n return i + 1;\n return n + 1;\n }", "public static void main(String[] args) \n {\n int[] numOfPoints = { 1000, 10000, 7000, 10000, 13000 };\n for(int count = 0; count < numOfPoints.length; count++)\n {\n List<Point> pointsTobeUsed = new ArrayList<Point>();\n int current = numOfPoints[count];\n int inc = 0;\n \n //creating list of points to be used\n for(int x = 0; x <= current; x++)\n {\n \n if(x <= current/2)\n {\n pointsTobeUsed.add(new Point(x,x));\n \n }\n else\n {\n pointsTobeUsed.add(new Point(x, x - (1 + 2*(inc)) ) );\n inc++;\n }\n }\n \n //n logn implementation of Pareto optimal\n long timeStart = System.currentTimeMillis();\n \n // n logn quicksort\n pointsTobeUsed = quickSort(pointsTobeUsed, 0, pointsTobeUsed.size() -1 );\n \n \n \n ParetoOptimal(pointsTobeUsed);\n \n \n long timeEnd = System.currentTimeMillis();\n System.out.println(\"final:\" + \" exper: \" + (timeEnd - timeStart) + \" N: \" + current ); \n }\n }", "private int gameV(int i, int j, int x) {\n int count = 2;\n for (int ii = 0; ii < i; ii++) {\n for (int jj = ii + 1; jj < n; jj++) {\n if (ii != x && jj != x) count++;\n }\n }\n for (int jj = i + 1; jj < j; jj++) {\n if (jj != x) count++;\n }\n return count;\n }", "public static void main(String[] args){\n int MIN = Integer.parseInt(args[0]);\n MAX = Integer.parseInt(args[1]);\n cutoffs = new int[args.length - 2];\n cache = new ArrayList<IndexedArrayList<SuperSavvyTrieHelper2>>();\n for (int i = 2; i < args.length; i++){\n cutoffs[i - 2] = Integer.parseInt(args[i]);\n cache.add(new IndexedArrayList<SuperSavvyTrieHelper2>());\n }\n for (int i = 0; i < cutoffs.length / 2; i++){\n int temp = cutoffs[i];\n cutoffs[i] = cutoffs[cutoffs.length - 1 - i];\n cutoffs[cutoffs.length - 1 - i] = temp;\n }\n multiplicitiesUsed = new boolean[MAX + 1];\n basesUsed = new DoublyLinkedArray(MAX + 1);\n SuperSavvyTrieHelper2.setCorrespondance(basesUsed);\n /*\n long count1 = lowerRecursion(MAX, 0);\n long count2 = middleRecursion(MAX, 0);\n long count3 = upperRecursion(MAX, 0);\n long total = count1 + count2 + count3;\n System.out.printf(\"%d + %d + %d = %d\\n\", count1, count2, count3, total);\n */\n hitCounts = new long[cutoffs.length];\n missCounts = new long[cutoffs.length];\n statCollector = new StatCollector(cutoffs);\n\n long startTime = System.nanoTime();\n long[] values = new long[MAX - MIN + 1];\n for (int i = MIN; i <= MAX; i++) {\n values[i - MIN] = upperRecursionWrapper(i);\n }\n //long[] testValues = new long[] {1752443,1911046, 2067456,2249444,2429337, 2647532,2852449,3101167,3350292,3632299,3916575};\n for (int i = 0; i < values.length; i++){\n //if (testValues[i] != values[i]){\n System.out.printf(\"%d: %d\\n\", i + MIN, values[i]);\n //}\n }\n long endTime = System.nanoTime();\n System.out.printf(\"%f,\", (double)(endTime - startTime) / 1000000000.0);\n long totalMissCounts = 0;\n long totalMissWeight1 = 0;\n long totalMissWeight2 = 0;\n long totalMissWeight3 = 0;\n /*\n for (int i = 0; i < cutoffs.length; i++){\n long totalCounts = hitCounts[i] + missCounts[i];\n totalMissCounts += missCounts[i];\n totalMissWeight1 += missCounts[i] * cutoffs[i];\n totalMissWeight2 += (hitCounts[i] / missCounts[i]) * cutoffs[i];\n totalMissWeight3 += (hitCounts[i] - missCounts[i]) * cutoffs[i] * cutoffs[i];\n System.out.printf(\"\\tCache %d: %d/%d/%d (%.5f%%)\", cutoffs[i], hitCounts[i], missCounts[i], totalCounts, (double) hitCounts[i] / totalCounts);\n }\n System.out.printf(\"\\t\\tMissCounts: %d, weighted: %d, ratio: %d, diff^2: %d\\n\", totalMissCounts, totalMissWeight1, totalMissWeight2, totalMissWeight3);\n */\n statCollector.printAll();\n }", "public static int firstMissingEffective(int[] x){\n int i = 0;\n while(i<x.length){\n // first two conditions check that element can correspond to index of array\n // third condition checks that they are not in their required position\n // fourth condition checks that there is no duplicate already at their position\n if( x[i]>0 && x[i]<x.length && x[i]-1!=i && x[x[i]-1]!=x[i]) exch(x,i,x[i]-1);\n else i++;\n }\n\n // second pass\n for(int j=0; j < x.length; j++){\n if( x[j]-1!=j) return j+1;\n }\n return x.length+1;\n\n }", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "public static int[] twoSum(int[] numbers, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] aux = new int[numbers.length];\n HashMap<Integer, Integer> valueToIndex = new HashMap<Integer, Integer>();\n for (int i = 0; i < numbers.length; i++) {\n valueToIndex.put(numbers[i], i);\n aux[i] = numbers[i];\n }\n \n int i = 0, j = numbers.length - 1;\n boolean found = false;\n \n Arrays.sort(aux);\n \n while (i != j) {\n if (aux[i] + aux[j] < target) i++;\n else if (aux[i] + aux[j] > target) j--;\n else {\n found = true;\n break;\n }\n }\n \n if (!found) return null;\n \n int[] result = new int[2];\n if (aux[i] == aux[j]) { /* Handle duplicates */\n int first = -1, second = -1;\n for (int k = 0; k < numbers.length; k++) {\n if (numbers[k] == aux[i]) {\n if (first == -1) {\n first = k;\n } else if (second == -1) {\n second = k;\n break;\n }\n }\n }\n result[0] = first + 1;\n result[1] = second + 1;\n return result;\n }\n \n \n if (valueToIndex.get(aux[i]) < valueToIndex.get(aux[j])) {\n result[0] = valueToIndex.get(aux[i]) + 1;\n result[1] = valueToIndex.get(aux[j]) + 1;\n } else {\n result[0] = valueToIndex.get(aux[j]) + 1;\n result[1] = valueToIndex.get(aux[i]) + 1;\n }\n return result;\n }", "private static int distance(ArrayList<Integer>[] adj, ArrayList<Integer>[] cost, int s, int t) {\n\n Set<Integer> visited = new HashSet<>(); //option 1\n Map<Integer, Integer> distance = new HashMap<>();\n// Queue<Integer> q = new PriorityQueue<>(11, (o1, o2) -> { //option 0\n// Integer d1 = distance.get(o1); //option 0\n// Integer d2 = distance.get(o2); //option 0\n Queue<Map.Entry<Integer, Integer>> q = new PriorityQueue<>(11, (o1, o2) -> { //option 1\n Integer d1 = o1.getValue(); //option 1\n Integer d2 = o2.getValue(); //option 1\n\n if (Objects.equals(d1, d2)) return 0;\n if (d1 == null) return 1;\n if (d2 == null) return -1;\n\n return d1 - d2;\n });\n\n distance.put(s, 0);\n// q.addAll(IntStream.range(0, adj.length).boxed().collect(Collectors.toList())); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(s, 0)); //option 1\n\n while (!q.isEmpty()) {\n// int u = q.remove(); //option 0\n int u = q.remove().getKey(); //option 1\n\n if (u == t) {\n Integer dist = distance.get(u);\n if (dist == null) return -1;\n return dist;\n }\n\n if (visited.contains(u)) continue; //option 1\n visited.add(u); //option 1\n\n List<Integer> adjList = adj[u];\n List<Integer> costList = cost[u];\n for (int i = 0; i < adjList.size(); i++) {\n int v = adjList.get(i);\n int w = costList.get(i);\n Integer dist = distance.get(v);\n Integer newDist = distance.get(u);\n if (newDist != null) newDist += w;\n\n if (newDist != null && (dist == null || dist > newDist)) {\n //relax\n distance.put(v, newDist);\n// q.remove(v); //option 0\n// q.add(v); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(v, distance.get(v))); //option 1\n }\n }\n }\n\n return -1;\n }", "private int calcDistanceMemoize(int i, int j, char[] one, char[] two, int [][]table) {\n if (i < 0)\n return j+1;\n\tif (j < 0)\n\t return i+1;\n\n if (table[i][j] == -1) \n table[i][j] = calcDistanceRecursive(i, j, one, two, table);\n\t\n return table[i][j];\n }", "WeightedUnionFind(int N){\n id = new int[N];\n size = new int[N];\n for (int i = 0; i < N; i++){\n id[i] = i;\n size[i] = 1;\n }\n }", "static void subsetSums(int arr[], int n)\n {\n \n // There are totoal 2^n subsets\n int total = 1 << n;\n \n // Consider all numbers from 0 to 2^n - 1\n for (int i = 0; i < total; i++) {\n int sum = 0;\n \n // Consider binary reprsentation of\n // current i to decide which elements\n // to pick.\n for (int j = 0; j < n; j++)\n if ((i & (1 << j)) != 0)\n sum += arr[j];\n \n // Print sum of picked elements.\n System.out.print(sum + \" \");\n }\n }", "public void triplet(int[] b,int n){\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<n;i++){\r\n\t\t\tfor(int j=i+1;j<n-1;j++){\r\n\t\t\t\tfor(int k=j+1;k<n-2;k++){\r\n\t\t\t\t\tif(b[i]+b[j]+b[k]==0){\r\n\t\t\t\t\t\tSystem.out.println(b[i]+\" \"+b[j]+\" \"+b[k]);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"no of distinct triplet is:\"+count);\t\r\n\r\n\t}", "private static void find_coins(int[] d, int k, int n) {\n\t\t\n\t}", "public int removeDuplicates(int[] nums) {\n if (nums.length == 0) return 0;\n int i = 0;\n for (int j = 1; j < nums.length; j++) {\n if (nums[j] != nums[i]) {\n i++;\n nums[i] = nums[j];\n }\n }\n return i + 1;\n}", "public int get_odd_occurences_optimal_v2(int[] a) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tresult ^= i;\n\t\t}\n\t\treturn result;\n\t}", "private static void findMissingAndDuplicateNumberFrom1toN(int[] input) {\n\t\tint len = input.length;\n\t\tint i = 0;\n\n\t\twhile (i < len) {\n\t\t\t//if its already in correct place\n\t\t\tif (input[i] == i + 1) {\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t} else if (input[i] == input[input[i] - 1]) { //if the elment to be swapped with are same\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tint temp = input[i];\n\t\t\t\tinput[i] = input[input[i] - 1];\n\t\t\t\tinput[temp - 1] = temp;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (input[i] != i + 1) {\n\t\t\t\tSystem.out.println(\"Missing number : \" + (i + 1));\n\t\t\t\tSystem.out.println(\"Duplicate number : \" + input[i]);\n\t\t\t}\n\t\t}\n\n\t}", "static void UseArrayList(ArrayList<Integer> myList2){\r\n\t\tLong start = System.currentTimeMillis();\r\n\t\tfor (int n=0; n<myList2.size();n++)\r\n\t\t{\r\n\t\t\tfor (int m=n+1; m<myList2.size();m++){\r\n\t\t\t\tif( myList2.get(n)== myList2.get(m) ) {System.out.println(\"Duplicate found \"+myList2.get(n));}\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong End = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"Total time taken for executing this code is: \" + (End-start));\r\n\t}", "static int getMissingNo (int a[], int n) \n { \n int x1 = a[0]; \n int x2 = 1; \n \n for (int i = 1; i <= n; i++) {\n if(i != n)\n x1 = x1 ^ a[i]; \n x2 = x2 ^ (i+1); \n \n }\n System.out.println(\"x2 :\"+x2);\n return (x1 ^ x2); \n \n /* //For xor of all the elements \n //in array \n for (int i = 1; i < n; i++) {\n \n System.out.print(x1+\" ^ \"+a[i]);\n x1 = x1 ^ a[i]; \n System.out.println(\"=\"+x1);\n \n }\n System.out.println(\"x1 :\"+x1);\n System.out.println(\"==\");\n //For xor of all the elements \n // from 1 to n+1 \n for (int i = 2; i <= n+1; i++) {\n \tSystem.out.print(x2+\" ^ \"+i);\n x2 = x2 ^ i; \n System.out.println(\"=\"+x2);\n }\n \n System.out.println(\"x2 :\"+x2);\n return (x1 ^ x2); */\n }", "private static int findMissingNumber( int[] a, int n) {\n int result = 0;\n for(int i=1; i<(n+1)+1; i++) {\n result = result ^ i;\n }\n for(int i=0; i<a.length; i++) {\n result = result ^ a[i];\n }\n return result;\n }", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n\n int max = Integer.MIN_VALUE;\n for (int i = 0; i < nums.length; i++) {\n max=Math.max(max,nums[i]);\n }\n Integer[] map = new Integer[max+1];\n for (int i = 0; i < nums.length; i++) {\n Integer c = map[nums[i]];\n if(c!=null && i-c<=k){\n return true;\n }else {\n map[nums[i]]=i;\n }\n }\n return false;\n }", "public int findFirstUniqueNumber (List<Integer> numberList) {\n\n ////// Solution 1:\n LinkedHashMap<Integer, Integer> occurMap = new LinkedHashMap<>();\n\n for (int number: numberList) { // O(n)\n if (occurMap.containsKey(number) && occurMap.get(number) != 0) {\n occurMap.replace(number, occurMap.get(number), 0);\n }\n occurMap.putIfAbsent(number, 1);\n }\n\n for (Map.Entry<Integer, Integer> entry: occurMap.entrySet()) {\n if (entry.getValue() == 1) {\n return entry.getKey();\n }\n }\n\n ////// Solution 2: O(n * n)\n// for (int n: numberList) {\n// if (numberList.indexOf(n) == numberList.lastIndexOf(n)) { // O(n * n)\n// return n;\n// }\n// }\n\n return -1;\n }", "public static void getLeastNumbers_2(int[] input, int[] output) {\n int start = 0;\n int end = input.length - 1;\n int k = output.length;\n int index = partition(input, start, end);\n while(index != k - 1) {\n if(index > k - 1) {\n end = index - 1;\n index = partition(input, start, end);\n }\n else {\n start = index + 1;\n index = partition(input, start, end);\n }\n }\n \n for(int i = 0; i < k; ++i)\n output[i] = input[i];\n }", "public void missingNumberEfficient2(int[] array, int n) {\n\t\t\n\t\tint X = 0;\n\t\tint Y = 0;\n\t\t\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tX ^= array[i];\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tY ^= i;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Missing Number is : \" + (X ^ Y));\n\t}", "public int findDuplicate(int[] nums) {\n int slow = nums[0];\n int fast = nums[0];\n do {\n slow = nums[slow];\n fast = nums[nums[fast]];\n } while (slow != fast);\n \n slow = nums[0];\n while (slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n return slow;\n }", "public static void main(String[] args) {\n int N = 100, i, j, min;\n System.out.println(\"Value of N: \" + N);\n\n for (i = 1; i <= N; i++)\n {\n for (j = 1; j <= N; j++)\n {\n min = i < j ? i : j;\n System.out.print(N - min + 1);\n }\n System.out.println();\n\n\n\n\n }\n}", "private static List<Integer> getCommonElementsAlgo2(int [] arr1, int [] arr2) {\n\t\t\n\t\tList<Integer> duplicates = new ArrayList<>();\n\t\t\n\t\tHashtable<Integer, Integer> table = new Hashtable<>();\n\t\t\n\t\tfor (int i : arr1) {\n\t\t\tif (table.containsKey(i)) {\n\t\t\t\ttable.put(i, table.get(i) + 1);\n\t\t\t}\n\t\t\ttable.put(i, 1);\n\t\t}\n\t\t\n\t\tfor (int j : arr2) {\n\t\t\tif (table.containsKey(j)) {\n\t\t\t\tduplicates.add(j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn duplicates;\n\t\t\n\t}", "static long arrayManipulation(int n, int[][] queries) {\n int len = queries.length;\n long[] arr = new long[n + 2];\n\n for (int i = 0; i < arr.length; i++) {\n arr[i] = 0;\n }\n\n\n for (int i = 0; i < len; i++) {\n int[] query = queries[i];\n int a = query[0];\n int b = query[1];\n int k = query[2];\n arr[a] = arr[a] + k;\n if (b + 1 <= arr.length) {\n arr[b + 1] = arr[b + 1] - k;\n }\n }\n\n long max = arr[0];\n long x = 0;\n\n for (int i = 0; i < arr.length; i++) {\n x = x + arr[i];\n max = Math.max(x, max);\n }\n\n return max;\n }", "static int[] find2(int a[]){\r\n int sum = a[0];\r\n int pro = a[0];\r\n for(int i=1;i<a.length;i++){\r\n sum += a[i];\r\n pro += a[i]*a[i];\r\n }\r\n int s = (n*(n+1))/2 - sum;\r\n int p = (n*(n+1)*(2*n+1))/6 - pro;\r\n return solveSP(s, p);\r\n }", "public ArrayList<Edge> Prim (String s){\n Node Start = nodeMap.get(s);\n mst = new ArrayList<>();\n HashMap<String, String> inserted = new HashMap<String, String>();\n ArrayList<Edge> failed = new ArrayList<Edge>();\n PriorityQueue<Edge> pq = new PriorityQueue<Edge>();\n ArrayList<Edge> ed = new ArrayList<Edge>(edgeMap.values());\n Edge first = ed.get(0);\n mst.add(first);\n inserted.put(first.w, first.w);\n inserted.put(first.v, first.v);\n\n priorityEdgeInsert(pq, first);\n\n while (inserted.size() <= edges() && pq.size() != 0){ //O(E log(V))\n //runs for E checking the possible V, where the number of V is devided each time, or log(V), giving ELog(V)\n Edge e = pq.poll();\n String w = inserted.get(e.w);\n String v = inserted.get(e.v);\n\n if ((w == null) ^ (v == null)){\n priorityEdgeInsert(pq, e);\n for(Edge f : failed){\n if(f.v == e.v || f.v == e.w || f.w == e.v || f.w == e.w){\n\n }\n else{\n pq.add(f);\n }\n }\n failed.clear();\n mst.add(e);\n inserted.put(e.w, e.w); //only puts one, the null one is hashed to a meaningless spot\n inserted.put(e.v, e.v);\n }\n else if ((w == null) && (v == null) ){\n failed.add(e);\n }\n else if (!(w == null) && !(v == null) ){\n failed.remove(e);\n pq.remove(e);\n }\n else if (e == null){\n System.out.println(\"HOW?\"); //should never happen.\n }\n }\n return mst;\n }", "static long solve(long[] d) {\n int len = d.length;\n long[] dp = new long[len];\n\n Set<Long> set = new HashSet<>();\n\n for (int index1 = len - 1; index1 >= 0; index1--) {\n int count = 0;\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > d[index1]) {\n if( set.contains(d[index2] ) )continue;\n set.add(d[index2]);\n count++;\n }\n }\n set = new HashSet<>();\n dp[index1] = count;\n }\n\n long res = 0;\n Set<Long> distinct = new HashSet<>();\n for (int index1 = 0; index1 < len; index1++) {\n long curr = d[index1];\n if (distinct.contains(curr)) {\n continue;\n } else distinct.add(curr);\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > curr) {\n if (set.contains(d[index2])) continue;\n res += dp[index2];\n set.add(d[index2]);\n }\n }\n set = new HashSet<>();\n }\n\n return res;\n\n }", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "public static void process(int n){\n\t\tint right, left, i;\n\n\t\tright = i = 0;\n\t\twhile(i < n){\n\t\t\twhile (right < n && c[i] == c[right]) right++;\n\t\t\tfor(int j = i; j < right; ++j) max_right[j] = right;\n\t\t\ti = right;\n\t\t}\n\n\t\tleft = i = n-1;\n\t\twhile(i >= 0){\n\t\t\twhile (left >= 0 && c[i] == c[left]) left--;\n\t\t\tfor (int j = i; j > left; --j) max_left[j] = left;\n\t\t\ti = left;\n\t\t}\n\t}", "private static void second(int[] arr, int sum){\n\n Map<Integer,Boolean> map = new Hashtable<>();\n\n for(int i:arr){\n\n if (map.containsKey(sum - i)){\n System.out.println(i + \" , \" + (sum-i));\n }\n else{\n map.put(i, true);\n }\n\n }\n\n }", "static int gen(int n)\n{ \n int []S = new int [n + 1];\n \n S[0] = 0;\n if(n != 0)\n S[1] = 1;\n \n for (int i = 2; i <= n; i++)\n { \n \n // S(2 * n) = 4 * S(n)\n if (i % 2 == 0)\n S[i] = 4 * S[i / 2];\n \n // S(2 * n + 1) = 4 * S(n) + 1\n else\n S[i] = 4 * S[i/2] + 1;\n }\n \n return S[n];\n}", "public static void cntArray(int A[], int N) \n { \n // initialize result with 0 \n int result = 0; \n \n for (int i = 0; i < N; i++) { \n \n // all size 1 sub-array \n // is part of our result \n result++; \n \n // element at current index \n int current_value = A[i]; \n \n for (int j = i + 1; j < N; j++) { \n \n // Check if A[j] = A[i] \n // increase result by 1 \n if (A[j] == current_value) { \n result++; \n } \n } \n } \n \n // print the result \n System.out.println(result); \n }", "public static boolean canThreePartsEqualSum(int[] arr) {\n int sum=0;\n int cumulative[]=new int[arr.length];\n for(int i=0;i<arr.length;i++){\n sum+=arr[i];\n cumulative[i]=sum;\n }\n for(int i=0;i<cumulative.length;i++){\n for(int j=i+1;j<cumulative.length;j++){\n if(cumulative[i]==cumulative[j]-cumulative[i]){\n if(cumulative[i]==cumulative[cumulative.length-1]-cumulative[j] && (cumulative.length-1) !=j){\n return true;\n }\n }\n }\n }\n return false;\n}", "private static int[] computePermutations(int n) {\n final int[] indexes = new int[n];\n for (int i = 0; i < n; i++) {\n indexes[i] = i;\n //indexes[i] = i + 1;\n }\n\n final int total = computePermutations(indexes, 0, n);\n System.out.println(\"# \" + np + \"; total = \" + total);\n\n return indexes;\n }", "private int elementNC(int i) {\n return first + i * stride;\n }", "public static void solve(int n, List<Integer> a) {\n Collections.sort(a);\n Collections.reverse(a);\n double sum = a.stream().mapToDouble(num -> Double.valueOf(num)).sum();\n double currentN = Double.valueOf(n);\n double currentSum = sum;\n for(Integer next : a)\n {\n double nextDouble = Double.valueOf(next);\n if(nextDouble<=currentSum/currentN)\n {\n break;\n }\n currentSum -= nextDouble;\n currentN--;\n }\n System.out.println(currentSum/currentN);\n\n\n }", "public static void main(String[] args) {\n int l1=1000, l2=1000;\n int[] a1=new int[l1];\n int[] a2=new int[l2];\n int[] combine = new int[l1+l2];\n\n Random r = new Random();\n for (int i=0; i<a1.length; ++i){\n a1[i]=r.nextInt(a1.length*3);\n combine[i]=a1[i];\n }\n\n for (int i=0; i<a2.length; ++i){\n a2[i]=r.nextInt(a2.length*3);\n combine[l1+i]=a2[i];\n }\n\n Arrays.sort(a1);\n Arrays.sort(a2);\n Arrays.sort(combine);\n\n cnt=0;\n int m = findByRank(a1, 0, a1.length, a2, 0, a2.length, (a1.length+a2.length)/2);\n int m2 = combine[combine.length/2-1];\n\n System.out.printf(\"m=%d, m2=%d, cnt=%d\", m, m2, cnt);\n\n\n\n }", "public static int f3(int N) {\n \n // O(1)\n if (N == 0) return 1;\n else{ \n \n int x = 0;\n // O(N)\n for(int i = 0; i < N; i++)\n x += f3(N-1);\n return x;\n }\n }", "public static int findCommon4(int[] in1, int[] in2) {\r\n\t\tint common = 0;\r\n\t\t//mlogn\r\n\t\tArrays.sort(in1);\r\n\t\t//nlogn\r\n\t\tArrays.sort(in2);\r\n\t\t//m+n-1 (as one element will remain uncompared in the end)\r\n\t\tint i=0,j=0;\r\n\t\twhile (i < in1.length && j < in2.length) {\r\n\t\t\tif (in1[i] == in2[j]) {\r\n\t\t\t\t++common;\r\n\t\t\t\t++i;\r\n\t\t\t\t++j;\r\n\t\t\t} else if (in1[i] < in2[j]) {\r\n\t\t\t\t++i;\r\n\t\t\t} else {\r\n\t\t\t\t++j;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn common;\r\n\t}", "static int findMissing2(int arr[], int size)\n {\n int shift = segregate (arr, size);\n int arr2[] = new int[size-shift];\n int j=0;\n for(int i=shift;i<(size);i++)\n {\n arr2[j] = arr[i];\n j++;\n } \n return findMissingPositive(arr2, j);\n }", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "@Test\n\tpublic void intersection() {\n\n\t\tlong n = 105;\n\t\tlong m = 100;\n\t\tfor(long i = n - 1; i > 1; i--){\n\t\t\tn = n * i;\n\t\t\tfor(long j = getZero(n); j > 0; j--){\n\t\t\t\tm = m * 10;\n\t\t\t}\n\t\t\tn = n % m;\n\t\t\tm = 100;\n\n\t\t\tSystem.out.println(n+\" \"+i);\n\n\t\t}\n\n\n\n\n\n\t}", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "public static int frog(int n, int [] h){\n\n int dp[] = new int [n];\n\n dp[0] = 0;\n dp[1] = Math.abs(h[1] - h[0]);\n\n for(int i = 2; i < n ; i ++){\n\n dp[i] = Math.min(dp [i - 2] + Math.abs(h[i] - h[i - 2]), dp[i - 1] + Math.abs(h[i] - h[i - 1]));\n\n\n\n }\n //print(dp);\n return dp[n - 1];\n }", "public static long sb(long a[], long n, long x) {\n long len = Long.MAX_VALUE;\n int p1 = 0;\n int p2 = 0;\n long sum = 0l;\n while(p1<=p2 && p2<n) {\n sum = sum + a[p2];\n p2++;\n while(sum >= x) {\n len = len > (p2-p1) ? (p2-p1) : len;\n sum = sum - a[p1];\n p1++;\n }\n }\n return len == Long.MAX_VALUE ? -1 : len;\n }", "static BigInteger findSum(BigInteger n) {\n if (n.equals(BigInteger.ZERO))\n return BigInteger.ZERO;\n BigInteger TWO = BigInteger.valueOf(2);\n\n BigInteger sum = BigInteger.ZERO;\n sum = sum.add(\n n.multiply(n.add(BigInteger.ONE))\n .divide(TWO)\n );\n\n BigInteger flooredN = findFraction(n);\n sum = sum.add(\n n.multiply(flooredN)\n );\n\n sum = sum.subtract(\n flooredN.multiply(flooredN.add(BigInteger.ONE))\n .divide(TWO)\n );\n\n sum = sum.subtract(findSum(flooredN));\n\n return sum;\n }", "public int minimumCost(int N, int[][] connections) {\n int[] parent = new int[N + 1];\n Arrays.fill(parent, -1);\n Arrays.sort(connections, (a,b) -> (a[2]-b[2]));\n int cnt = 0;\n int minCost = 0;\n \n for(int[] edge: connections){\n int src = edge[0];\n int dst = edge[1];\n int cost = edge[2];\n \n int srcSubsetId = find(parent, src);\n int dstSubsetId = find(parent, dst);\n \n if(srcSubsetId == dstSubsetId) {\n // Including this edge will cause cycles, then ignore it\n continue;\n }\n cnt += 1;\n minCost += cost;\n union(parent, src, dst);\n }\n return cnt==N-1? minCost : -1;\n}" ]
[ "0.6789362", "0.6576443", "0.6196888", "0.591904", "0.57985973", "0.57792604", "0.576192", "0.57424575", "0.57237566", "0.5713545", "0.5703651", "0.56784695", "0.56579155", "0.5654762", "0.5647236", "0.5644685", "0.5597692", "0.5542499", "0.55402565", "0.55167305", "0.55121464", "0.5495694", "0.5492595", "0.5488195", "0.5487812", "0.54856986", "0.54685235", "0.54676443", "0.54473114", "0.54454356", "0.54332954", "0.54254264", "0.53915596", "0.537872", "0.53781766", "0.53611064", "0.535088", "0.5340154", "0.53378195", "0.5330067", "0.5328876", "0.53222924", "0.5310547", "0.5304834", "0.5304258", "0.5301836", "0.52986753", "0.52938306", "0.5278704", "0.52684665", "0.52668643", "0.5251495", "0.52399266", "0.5234325", "0.52269924", "0.5226972", "0.52136415", "0.5204716", "0.5202048", "0.519545", "0.51850826", "0.5183263", "0.5179376", "0.5177052", "0.5173192", "0.51669675", "0.51658565", "0.5162337", "0.5161184", "0.5159193", "0.5158586", "0.5154533", "0.5146558", "0.51438963", "0.51372015", "0.5122328", "0.51208276", "0.5119643", "0.51183814", "0.5107947", "0.5107197", "0.5102139", "0.50966763", "0.5093553", "0.50914544", "0.5085057", "0.50839645", "0.50810575", "0.5078592", "0.50769264", "0.5075968", "0.5069424", "0.50691813", "0.50623184", "0.5058912", "0.50585455", "0.505478", "0.50522685", "0.50484574", "0.5047761", "0.50469065" ]
0.0
-1
O( k ( n + ( s(n+e) + n + n) ) ) = O(k(n^2)(n+e)) approx.. O(kn^2)
public ArrayList<String> mostInfluentialSubModular(int k) { if(k >= graphVertexHashMap.size()){ return new ArrayList<String>(graphVertexHashMap.keySet()); } if(k ==0) return new ArrayList<String>(); double changling = (double)k/numVertices; // if(numVertices >= 900 && (numVertices - k <= 70 ) // || numVertices >= 800 && (numVertices - k <= 56 ) // || numVertices >= 700 && (numVertices - k <= 49 ) // || numVertices >= 600 && (numVertices - k <= 40 ) // || numVertices >= 500 && (numVertices - k <= 35 ) // || numVertices >= 400 && (numVertices - k <= 28 ) // || numVertices >= 300 && (numVertices - k <= 21 ) // || numVertices >= 200 && (numVertices - k <= 14 ) // ){ // ArrayList<String> result = new ArrayList<>(graphVertexHashMap.keySet()); // for(int i = graphVertexHashMap.size()-1; i >= (graphVertexHashMap.size() - (graphVertexHashMap.size() -k)) ; i--){ // result.remove(i); // } // return result; // } // else if(changling >= 0.80 && numVertices >= 200 ){ // approximate = true; // } ArrayList<String> orderedResult = new ArrayList<>(); HashMap<String, Float> S = new HashMap(); float currentModular = Integer.MIN_VALUE; for(int i =0; i < k; i++){ String maxString = ""; float maxValue = (float)Integer.MIN_VALUE; Iterator it = graphVertexHashMap.entrySet().iterator(); while(it.hasNext()){ ArrayList<String> vCopy = new ArrayList<>(S.keySet()); Map.Entry entry = (Map.Entry)it.next(); String compareString = (String)entry.getKey(); if(S.containsKey(compareString)) continue; else{ vCopy.add(compareString); float compareValue = influence(vCopy); float approximation = compareValue - currentModular; if(approximate && S.size() > 0 && maxValue > 0 && approximation >= ratio){ maxValue = compareValue; maxString = compareString; break; }else if(compareValue > maxValue){ maxValue = compareValue; maxString = compareString; } } } if(!S.containsKey(maxString)){ S.put(maxString, maxValue); currentModular = influence(new ArrayList<>(S.keySet())); orderedResult.add(maxString); } if(S.size() >= k) break; // System.out.println(S.size()); } return orderedResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "public int count(int n, int k)\n {\n\n long MOD = 1000000007;\n long res;\n\n res = (long)Math.pow(k, n);\n Map<Integer, Integer> divisor = new HashMap<>();\n\n long count = 0;\n for(int i = 2; i <= k; i++) {\n if(!(i % 2 == 0 && divisor.containsKey(i / 2))) {\n int div = divisorCount(i);\n divisor.put(i, div);\n count += div - 1;\n }\n else{\n int log2 = 31 - Integer.numberOfLeadingZeros(i);\n int div;\n if(Math.pow(2, log2) == i){\n div = divisor.get(i / 2) + 1;\n\n }\n else\n div = divisor.get(i / 2) * 2;\n\n divisor.put(i, div);\n count += div - 1;\n\n }\n\n }\n\n res -= (n - 1) * Math.pow(k, n - 2) * count;\n return (int)(res % MOD);\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static int solveEfficient(int n) {\n if (n == 0 || n == 1)\n return 1;\n\n int n1 = 1;\n int n2 = 1;\n int sum = 0;\n\n for (int i = 2; i <= n; i++) {\n sum = n1 + n2;\n n1 = n2;\n n2 = sum;\n }\n return sum;\n }", "private static long combinations(int n, int k) {\n\t\tif (k > n / 2) {\n\t\t\tk = n - k;\n\t\t}\n\n\t\tlong result = 1;\n\n\t\tfor (int i = 1, j = n - k + 1; i <= k; i++, j++) {\n\t\t\tresult = result * j / i;\n\t\t}\n\n\t\treturn result;\n\t}", "static int expt(int n,int k) {\n\t\tif (k==0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn n*expt(n,k-1);\n\t}", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "public static int countP(int n, int k) {\n // Base cases\n if (n == 0 || k == 0 || k > n)\n return 0;\n if (k == 1 || k == n)\n return 1;\n\n // S(n+1, k) = k*S(n, k) + S(n, k-1)\n return (k * countP(n - 1, k)\n + countP(n - 1, k - 1));\n }", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "private static long calc1()\n {\n final int min = 1000;\n final int max = 10000;\n\n // initialize\n List<List<Integer>> m = new ArrayList<>();\n for (int k = 0; k < end; k++) {\n List<Integer> list = new ArrayList<Integer>();\n int n = 1;\n while (k >= start) {\n int p = pkn(k, n);\n if (p >= max) {\n break;\n }\n if (p >= min) {\n list.add(p);\n }\n n++;\n }\n m.add(list);\n }\n\n boolean[] arr = new boolean[end];\n arr[start] = true;\n\n List<Integer> solutions = new ArrayList<>();\n List<Integer> list = m.get(start);\n for (Integer first : list) {\n LinkedList<Integer> values = new LinkedList<>();\n values.add(first);\n f(m, arr, values, 1, solutions);\n // we stop at the first solution found\n if (!solutions.isEmpty()) {\n break;\n }\n }\n\n // solutions.stream().forEach(System.out::println);\n int res = solutions.stream().reduce(0, Integer::sum);\n return res;\n }", "static int nonDivisibleSubset(int k, int[] S) {\n\t\tint result = 0;\n\n\t\tArrayList < ArrayList < Integer >> solutions = new ArrayList < ArrayList < Integer >>();\n\t\tArrayList < HashSet < Integer >> minSets = new ArrayList < HashSet < Integer >>();\n\n\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( S [ 0 ])));\n\t\tminSets.add (new HashSet <Integer > ( ));\n\t\tminSets.get(0).add ( S [ 0 ] % k);\n\n\n\t\t// Go over all the numbers\n\t\tfor ( int i = 1; i < S.length; i++ ){\n\t\t\tint n = S [ i ]; \n\t\t\tint m = S [ i ] % k; // Number we will add to all the elements of all the minSets.\n\n\t\t\t// Go over all the minSets.\n\t\t\t// For each one, check that each element plus m is not divisible by k.\n\n\t\t\tboolean workedForASet = false;\n\t\t\tfor ( int j = 0; j < minSets.size(); j++){\n\t\t\t\t// For each set, check all the elements of the set.\n\n\t\t\t\tHashSet < Integer > minSet = minSets.get(j);\n\t\t\t\tIterator < Integer > iter = minSet.iterator();\n\n\t\t\t\tboolean works = true;\n\t\t\t\twhile ( iter.hasNext() && works ){\n\t\t\t\t\tint num = iter.next();\n\t\t\t\t\tif ( (num + m) % k == 0 ){\n\t\t\t\t\t\tworks = false;\n\t\t\t\t\t\tworkedForASet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( works ){\n\t\t\t\t\tsolutions.get(j).add(n);\n\t\t\t\t\tminSet.add(m);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( !workedForASet ){\n\t\t\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( n )));\n\t\t\t\tminSets.add (new HashSet <Integer > ( ));\n\t\t\t\tminSets.get (minSets.size() - 1).add ( m ); \n\t\t\t} \n\t\t}\n\n\t\t// Find the solution with the most elements.\n\n\t\tfor ( ArrayList <Integer > solution : solutions ){\n\t\t\tresult = Math.max ( result, solution.size() );\n\t\t\tSystem.out.println ( solution );\n\t\t}\n\n\t\tif ( result == 1 ) result = 0;\n\t\treturn result;\n\t}", "public void sum(int n) {\n int sum = 0;\n for (int j = 0; j < n; j++) // 2n+2\n sum += j;\n for (int k = 0; k < n; k++) // 2n+2\n sum += k;\n for (int l = 0; l < n; l++) //2n+2\n sum += l;\n }", "static double k(int n, final double x) {\n n = Math.abs(n);\n if (n > 31) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n if (x <= 0) {\n return Double.NaN; // domain error or singularity\n }\n if (x <= 9.55) {\n double ans = 0;\n final double z0 = 0.25 * x * x;\n double fn = 1;\n double pn = 0;\n double zmn = 1;\n final double tox = 2 / x;\n double s, t, k;\n\n if (n > 0) {\n // compute factorial of n and psi(n)\n pn = -Constants.EULER;\n k = 1;\n for (int i = 1; i < n; ++i) {\n pn += 1 / k;\n fn *= ++k;\n }\n zmn = tox;\n if (n == 1) {\n ans = 1 / x;\n } else {\n double nk1f = fn / n;\n double kf = 1;\n s = nk1f;\n final double z = -z0;\n double zn = 1;\n for (int i = 1; i < n; ++i) {\n nk1f /= (double) (n - i);\n kf *= (double) i;\n zn *= z;\n t = nk1f * zn / kf;\n s += t;\n if ((Double.MAX_VALUE - Math.abs(t)) < Math.abs(s)) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n if (tox > 1 && Double.MAX_VALUE / tox < zmn) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n zmn *= tox;\n }\n s *= 0.5;\n t = Math.abs(s);\n if (zmn > 1 && Double.MAX_VALUE / zmn < t) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n if (t > 1 && Double.MAX_VALUE / t < zmn) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n ans = s * zmn;\n }\n }\n final double t1g = 2 * Math.log(0.5 * x);\n double pk = -Constants.EULER;\n if (n == 0) {\n pn = pk;\n t = 1;\n } else {\n pn += 1.0 / n;\n t = 1 / fn;\n }\n s = (pk + pn - t1g) * t;\n k = 1;\n do {\n t *= z0 / (k * (k + n));\n pk += 1 / k;\n pn += 1 / (k + n);\n s += (pk + pn - t1g) * t;\n ++k;\n } while (Math.abs(t / s) > Constants.MACHINE_PRECISION);\n s = 0.5 * s / zmn;\n if ((n & 1) != 0) {\n s = -s;\n }\n return ans + s;\n } else {\n // asymptotic expansion\n if (x > MAXLOG) {\n return 0; // underflow\n }\n final double k = (double) n;\n final double pn = 4 * k * k;\n double pk = 1;\n final double z0 = 8 * x;\n double fn = 1;\n double t = 1;\n double s = t;\n double nkf = Double.MAX_VALUE;\n int i = 0;\n do {\n final double z = pn - pk * pk;\n t = t * z / (fn * z0);\n final double nk1f = Math.abs(t);\n if (i >= n && nk1f > nkf) {\n return Math.exp(-x) * Math.sqrt(Math.PI / (2 * x)) * s;\n }\n ++i;\n nkf = nk1f;\n s += t;\n ++fn;\n pk += 2;\n } while (Math.abs(t / s) > Constants.MACHINE_PRECISION);\n return Math.exp(-x) * Math.sqrt(Math.PI / (2 * x)) * s;\n }\n }", "void solve() throws IOException {\n int[] nk = ril(2);\n int n = nk[0];\n int k = nk[1];\n int[] p = ril(n);\n int[] b = ril(k);\n for (int i = 0; i < n; i++) p[i]--;\n for (int i = 0; i < k; i++) b[i]--;\n\n int[] numToIdx = new int[n];\n for (int i = 0; i < n; i++) numToIdx[p[i]] = i;\n\n boolean[] remove = new boolean[n];\n Arrays.fill(remove, true);\n for (int bi : b) remove[bi] = false;\n List<Integer> toRemove = new ArrayList<>(n - k);\n for (int i = 0; i < n; i++) if (remove[i]) toRemove.add(i);\n Collections.sort(toRemove);\n\n int[] prevSmaller = new int[n];\n prevSmaller[0] = -1;\n int prevIdx = remove[p[0]] ? -1 : 0;\n for (int i = 1; i < n; i++) {\n int j = prevIdx;\n while (j != -1 && p[i] < p[j]) j = prevSmaller[j];\n prevSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n int[] nextSmaller = new int[n];\n nextSmaller[n-1] = n;\n prevIdx = remove[p[n-1]] ? n : n-1;\n for (int i = n-2; i >= 0; i--) {\n int j = prevIdx;\n while (j != n && p[i] < p[j]) j = nextSmaller[j];\n nextSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n\n int[] init = new int[n];\n Arrays.fill(init, 1);\n SegmentTree st = new SegmentTree(init);\n long ans = 0;\n for (int x : toRemove) {\n int idx = numToIdx[x];\n int l = prevSmaller[idx] + 1;\n int r = nextSmaller[idx] - 1;\n ans += st.query(l, r+1);\n st.modify(idx, 0);\n }\n pw.println(ans);\n }", "static long sumOfGroup(int k) {\n long start = 1;\n long sum = 0;\n for(int i=1;i<=k;i++){\n long count = 0;\n sum = 0;\n while(count<i){\n if(start%2 == 1){\n sum = sum+start;\n count++;\n }\n start++;\n }\n }\n return sum;\n }", "public static int Main()\n\t{\n\t\tint s = 0;\n\t\tint t = 0;\n\t\tint[] a = new int[100000];\n\t\tint n;\n\t\tint i;\n\t\tint j;\n\t\tint k;\n\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\n\t\tfor (i = 1;i <= n;i++)\n\t\t{\n\t\t\ta[i - 1] = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t}\n\n\t\tk = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\n\t\tfor (j = 1;j <= n;j++) //?for??????????k??????\n\t\t{\n\t\t\tif (a[j - 1] != k)\n\t\t\t{\n\t\t\t\tt++; //?t?????k???????????????????????\n\t\t\t}\n\t\t}\n\t\tfor (j = 1;j <= n;j++)\n\t\t{\n\t\t\tif (a[j - 1] != k) //???k?????\n\t\t\t{\n\t\t\t\ts++;\n\t\t\t\tif (s <= t - 1) //?????????k???s?t????????????\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(a[j - 1]);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t\telse //??????????????\n\t\t\t\t{\n\t\t\t\tSystem.out.print(a[j - 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "long getLsum(int n, int i, int k){ \r\n return (i-k+1)>=0 ? (i-k+1) + ssum(k) : ssum(k) - ssum(k-i-1);\r\n }", "public static int kInversePairs(int n, int k) {\n int mod = 1000000007;\n if (k > n * (n - 1) / 2 || k < 0) return 0;\n if (k == 0 || k == n * (n - 1) / 2) return 1;\n long[][] dp = new long[n + 1][k + 1];\n dp[2][0] = 1;\n dp[2][1] = 1;\n for (int i = 3; i <= n; i++) {\n dp[i][0] = 1;\n for (int j = 1; j <= Math.min(k, i * (i - 1) / 2); j++) {\n dp[i][j] = dp[i][j - 1] + dp[i - 1][j];\n if (j >= i) dp[i][j] -= dp[i - 1][j - i];\n dp[i][j] = (dp[i][j] + mod) % mod;\n }\n }\n return (int) dp[n][k];\n }", "static int gen(int n)\n{ \n int []S = new int [n + 1];\n \n S[0] = 0;\n if(n != 0)\n S[1] = 1;\n \n for (int i = 2; i <= n; i++)\n { \n \n // S(2 * n) = 4 * S(n)\n if (i % 2 == 0)\n S[i] = 4 * S[i / 2];\n \n // S(2 * n + 1) = 4 * S(n) + 1\n else\n S[i] = 4 * S[i/2] + 1;\n }\n \n return S[n];\n}", "static int numOfSubsets(int[] arr, int n, int k) {\n List<Integer> vect1 = new ArrayList<Integer>(); \n List<Integer> vect2 = new ArrayList<Integer>(); \n List<Integer> subset1 = new ArrayList<Integer>(); \n List<Integer> subset2 = new ArrayList<Integer>(); \n \n // ignore element greater than k and divide\n // array into 2 halves\n for (int i = 0; i < n; i++) {\n \n // ignore element if greater than k\n if (arr[i] > k)\n continue;\n if (i <= n / 2)\n vect1.add(arr[i]);\n else\n vect2.add(arr[i]);\n }\n \n // generate all subsets for 1st half (vect1)\n for (int i = 0; i < (1 << vect1.size()); i++) {\n int value = 1;\n for (int j = 0; j < vect1.size(); j++) {\n if (i & (1 << j))\n value *= vect1[j];\n }\n \n // add only in case subset product is less\n // than equal to k\n if (value <= k)\n subset1.add(value);\n }\n \n // generate all subsets for 2nd half (vect2)\n for (int i = 0; i < (1 << vect2.size()); i++) {\n int value = 1;\n for (int j = 0; j < vect2.size(); j++) {\n if (i & (1 << j))\n value *= vect2[j];\n }\n \n // add only in case subset product is\n // less than equal to k\n if (value <= k)\n subset2.add(value);\n }\n \n // sort subset2\n sort(subset2.begin(), subset2.end());\n \n int count = 0;\n for (int i = 0; i < subset1.size(); i++)\n count += upper_bound(subset2.begin(), subset2.end(),\n (k / subset1[i]))\n - subset2.begin();\n \n // for null subset decrement the value of count\n count--;\n \n // return count\n return count;\n }", "int help(int n, int k, int[][] map) {\n if (n <= 0 || k < 0) return 0;\n if (0 == k) return 1;\n if (1 == k) return n - 1;\n if (map[n][k] > 0) return map[n][k];\n long sum = 0;\n for (int i = 1; i <= k; i ++) {\n for (int j = 0; j < n; j ++) {\n// System.out.println(\"i = \" + i + \", j = \" + j + \", j - i = \" + (j - i) + \", j + i = \" + (j + i) + \", f0 = \" + (n - j + i - 1) + \", f1 = \" + (n - j - i - 1) + \", k - i = \" + (k - i));\n int g = 0, g0 = 0, g1 = 0;\n if (j - i >= 0) {\n g += help(n - j + i - 1, k - i, map);\n sum += g;\n// System.out.println(\"g0 = \" + g0 + \", g1 = \" + g1 + \", g = \" + g + \", sum = \" + sum);\n// System.out.println(\"-\");\n }\n }\n\n }\n// System.out.println(\"sum = \" + sum + \" ----\");\n map[n][k] = (int)sum;\n return (int)sum;\n }", "private Proof sumEraseN(Expression s, Expression t, int n, Proof p) {\n if (n == 0) {\n return equalityShuffle(faxm6Gen(t), equalityRightConvert(faxm6Gen(s), p));\n }\n n = n - 1;\n Proof eqSubL = equalityRightConvert(faxm5Gen(s, intToLit(n)), p);\n Proof eqSubR = equalityShuffle(faxm5Gen(t, intToLit(n)), eqSubL);\n return sumEraseN(s, t, n, faxm3Convert(eqSubR));\n }", "public int findPairs(int[] nums, int k) {\n if (k < 0) {\n return 0;\n }\n Set<Integer> unique = new HashSet<>();\n Set<Integer> duplicate = new HashSet<>();\n for (int n : nums) {\n if (!unique.add(n)) {\n duplicate.add(n);\n }\n }\n if (k == 0) {\n return duplicate.size();\n }\n int count = 0;\n for (int v : unique) {\n if (unique.contains(v + k)) {\n count += 1;\n }\n }\n return count;\n }", "static BigInteger SigmaWithOutLoop(int N) { \n BigInteger f = BigInteger.valueOf(N); \n // N*(N+1)/2\n f = f.multiply(f.add( BigInteger.valueOf(1))).divide(new BigInteger(\"2\")); \n return f; \n }", "private static int betterSolution(int n) {\n return n*n*n;\n }", "long getRsum(int n, int i, int k){\r\n return n-i>=k ? (n-i-k)+ssum(k-1): ssum(k-1) - ssum(k-n+i);\r\n }", "public static int max2K(int n) {\r\n\t\treturn (int) Math.pow(2, log2n(n));\r\n\t}", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "private double deCasteljau(double s, int n, int k) {\n\t\treturn ((fatorial(n)/(fatorial(k)*fatorial(n-k)))*Math.pow(s, k)* Math.pow(1-s, n-k));\n\t}", "static long findSum(int N)\n\t{\n\t\tif(N==0) return 0;\n\t\treturn (long)((N+1)>>1)*((N+1)>>1)+findSum((int)N>>1);\n\t\t\n\t}", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public boolean findComplimentaryPair_O_NlogN(int []a, int k, int[] basket){\n\t\tQuickSort.qSort(a, 0, a.length-1);\n\t\tint i = 0;\t\t//left pointer\n\t\tint j = a.length - 1; // right pointer\n\n\t\twhile( i <= j){\n\t\t int s = a[i] + a[j];\n\t\t if(s < k){\n\t\t ++i;\n\t\t }else if( s > k ){\n\t\t --j;\n\t\t }else{\n\t\t basket[0] = i;\n\t\t basket[1] = j;\n\t\t return true;\n\t\t }\n\t\t }\n\t\t return false;\n\t}", "public static void main(String[] args){\n int n;int k;\n Scanner sc=new Scanner(System.in);\n n=sc.nextInt();\n k=sc.nextInt();\n int[] a=new int[n];\n int[] reMain=new int[k];\n int num=0;\n for(int i=0;i<k;i++){\n reMain[i]=0;\n }\n for(int i=0;i<n;i++){\n int d=sc.nextInt()%k;\n reMain[d]++;\n }\n int p=0;\n if(k%2==0)\n p=k/2;\n else p=(k+1)/2;\n for(int i=1;i<p;i++){\n if(reMain[i]>reMain[k-i])\n num+=reMain[i];\n else\n num+=reMain[k-i];\n \n }\n if(reMain[p]%2==1 && k%2==0)\n num++;\n if(k==2)\n num=reMain[1];\n \n \n System.out.println(num);\n\t}", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "private static boolean kthSmallesElementFound(int[] list1, int[] list2, int nElementsList1, int nElementsList2) {\n if(nElementsList2 < 1) {\n return true;\n }\n\n if(list1[nElementsList1-1] == list2[nElementsList2-1]) {\n return true;\n }\n\n if(nElementsList1 == list1.length) {\n return list1[nElementsList1-1] <= list2[nElementsList2];\n }\n\n if(nElementsList2 == list2.length) {\n return list2[nElementsList2-1] <= list1[nElementsList1];\n }\n\n return list1[nElementsList1-1] <= list2[nElementsList2] && list2[nElementsList2-1] <= list1[nElementsList1];\n }", "public void calcS(){\n if (n.subtract(one).mod(new BigNumber(\"2\")).compareTo(zero)!=0){\n s=zero;\n return;\n }\n while(n.subtract(one).mod(pow(two,s)).compareTo(zero)!=0){\n //System.out.println(s);\n s=s.add(one);\n }\n s=s.subtract(one);\n }", "private static void find_coins(int[] d, int k, int n) {\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int arr_i=0; arr_i < n; arr_i++){\n int integer = in.nextInt();\n list.add(new Integer(integer));\n }\n in.close();\n\n\n\n if(k == 1){\n System.out.println(k);\n return;\n }\n\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i) % k;\n list.set(i, x);\n }\n\n int[] kx = new int[k];\n for(int i = 0;i < k;i ++){\n kx[i] = 0;\n }\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i);\n kx[x] ++;\n }\n\n\n int num = 0;\n int A = 0;\n if(k % 2 == 0){\n A = k / 2 - 1;\n }else{\n A = k / 2;\n }\n if(kx[0] != 0){\n num += 2;\n }\n for(int i = 1; i <= A;i ++){\n if(kx[i] >= kx[k - i]){\n num += kx[i];\n }else {\n\n num += kx[k - i];\n }\n\n }\n System.out.println(num);\n }", "static int digitSum(String n, int k) {\n int sum = findSum(convertToList(n));\n // Finding the initial super digit where k=1\n sum = findSuperDigit(convertToList(sum));\n // Calculating k times the super digit to find actual result\n return findSuperDigit(convertToList(sum*k));\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}", "public int lengthOfLongestSubstringKDistinctImprvd(String s, int k) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n \n int[] map = new int[256];\n int j = 0;\n int distinctCt = 0;\n int maxLen = 0;\n\n for (int i = 0; i < s.length(); i++) {\n while (j < s.length()) {\n map[s.charAt(j)] += 1;\n if (map[s.charAt(j)] == 1) {\n distinctCt++;\n }\n j++;\n if (distinctCt > k) {\n break;\n }\n maxLen = Math.max(j- i, maxLen);\n }\n map[s.charAt(i)] -= 1;\n if (map[s.charAt(i)] == 0) {\n distinctCt--;\n }\n }\n\n return maxLen;\n}", "static long nPolyNTime(int[] n) {\n int temp = n.length;\n long sum = 0;\n if(n == null || n.length == 0) return -1;\n for(int i = 0; i < n.length; ++i) {\n while(temp --> 0) {\n for(int j = 0; j < n.length; ++j) {\n sum += n[i] + n[j];\n }\n }\n }\n return sum;\n }", "public int lengthOfLongestSubstringKDistinct(String s, int k) {\n Map<Character, Integer> map = new HashMap<>();\n int maxLenght = 0;\n\n int i = 0;\n int j = 0;\n int n = s.length();\n\n while (j < s.length()) {\n\n char c = s.charAt(j);\n if (map.containsKey(c)) {\n map.put(c, map.get(c) + 1);\n } else {\n map.put(c, 1);\n }\n\n if (map.size() <= k) {\n maxLenght = Math.max(maxLenght, j - i + 1);\n }\n\n if (map.size() > k) {\n\n while (map.size() > k && i < j) {\n char cx = s.charAt(i);\n map.put(cx, map.get(cx) - 1);\n if (map.get(cx) == 0) {\n map.remove(cx);\n }\n i++;\n }\n }\n\n j++;\n }\n\n return maxLenght;\n }", "public static long solve(long[] data, long k) {\n int n = data.length;\n\n Buffer<Interval> buffer = new Buffer<>(Interval::new, x -> {}, n * 2);\n\n Randomized.shuffle(data);\n Arrays.sort(data);\n\n List<Interval> lastLevel = new ArrayList<>(n);\n List<Interval> curLevel = new ArrayList<>(n);\n lastLevel.add(newInterval(buffer, 0, n - 1));\n int level = Log2.floorLog(data[n - 1]);\n long mask = 0;\n for (; level >= 0; level--) {\n curLevel.clear();\n for (Interval interval : lastLevel) {\n int l = interval.l;\n int r = interval.r;\n int m = r;\n while (m >= l && Bits.get(data[m], level) == 1) {\n m--;\n }\n interval.m = m;\n }\n long total = 0;\n for (Interval interval : lastLevel) {\n total += (long) (interval.m - interval.l + 1) * (interval.relative.m - interval.relative.l + 1);\n total += (long) (interval.r - interval.m) * (interval.relative.r - interval.relative.m);\n }\n if (total < k) {\n k -= total;\n mask = Bits.set(mask, level, true);\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m && interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.r > interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m >= interval.relative.l) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n } else {\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n a.relative = a;\n curLevel.add(a);\n }\n if (interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = a;\n curLevel.add(a);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.l <= interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m < interval.relative.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n }\n\n for (Interval interval : lastLevel) {\n buffer.release(interval);\n }\n\n List<Interval> tmp = curLevel;\n curLevel = lastLevel;\n lastLevel = tmp;\n }\n\n return mask;\n }", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n\n int max = Integer.MIN_VALUE;\n for (int i = 0; i < nums.length; i++) {\n max=Math.max(max,nums[i]);\n }\n Integer[] map = new Integer[max+1];\n for (int i = 0; i < nums.length; i++) {\n Integer c = map[nums[i]];\n if(c!=null && i-c<=k){\n return true;\n }else {\n map[nums[i]]=i;\n }\n }\n return false;\n }", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "public static int ulam(int n) {\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n\n int i = 3;\n while (list.size() < n) {\n\n int count = 0;\n for (int j = 0; j < list.size() - 1; j++) {\n\n for (int k = j + 1; k < list.size(); k++) {\n if (list.get(j) + list.get(k) == i)\n count++;\n if (count > 1)\n break;\n }\n if (count > 1)\n break;\n }\n if (count == 1)\n list.add(i);\n i++;\n }\n return list.get(n - 1);\n }", "public static void main(String args[] ) throws Exception {\n String l[] = br.readLine().split(\" \");\n long N = Long.parseLong(l[0]);\n long S = Long.parseLong(l[1]);\n long E = Long.parseLong(l[2]);\n TreeMap<Long,Long> t1 = new TreeMap<Long,Long>();\n TreeMap<Long,Long> t2 = new TreeMap<Long,Long>();\n for(int i=0;i<N;i++) {\n String s[] = br.readLine().split(\" \");\n long x = Long.parseLong(s[0]);\n long p = Long.parseLong(s[1]);\n t1.put((x-p),(x+p));\n }\n ArrayList<Long> l1 = new ArrayList<Long>(t1.keySet());\n ArrayList<Long> l2 = new ArrayList<Long>(t1.values());\n long c = l1.get(0);\n long d = l2.get(0);\n for(int i=1;i<t1.size();i++)\n {\n if(l1.get(i)<=d)\n d = Math.max(d,l2.get(i));\n else\n {\n \n t2.put(c,d);\n c = l1.get(i);\n d = l2.get(i);\n }\n \n }\n t2.put(c,d);\n int i;\n long ans = 0;\n l1=new ArrayList<Long>(t2.keySet());\n l2=new ArrayList<Long>(t2.values());\n \n \n for(i=0;i<l1.size();i++)\n {\n if(S>=E)\n {\n S=E;\n break;\n }\n if(l1.get(i)<=S && S<=l2.get(i))\n S = l2.get(i);\n \n else if(S<=l1.get(i) && E>=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = l2.get(i);\n \n }\n else if(S<=l1.get(i) && E>=l1.get(i) && E<=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = E;\n }\n else if(S<=l1.get(i) && E<=l1.get(i))\n {\n ans+=E-S;\n S = E;\n }\n }\n if(S<E)\n ans+=E-S;\n pw.println(ans);\n \n pw.close();\n }", "static double geometricSum(int k) {\n\t\tif (k==0) \n\t\t\treturn 1; // Endpoint\n\t\telse \n\t\t\treturn 1/Math.pow(2,k) + geometricSum(k-1); \n\t}", "static public int solve(int n,int A[])\n {\n int freqArr[] = new int[1001];\n int dp[] = new int[1001];\n\n for(int i=0; i<n; i++){\n freqArr[A[i]]++;\n }\n\n dp[0] = 0;\n dp[1] = freqArr[1] > 0 ? freqArr[1] : 0;\n\n for(int i=2; i<=1000; i++){\n dp[i] = Math.max(dp[i-2] + i*freqArr[i], dp[i-1]);\n }\n return dp[1000];\n }", "static BigInteger findSum(BigInteger n) {\n if (n.equals(BigInteger.ZERO))\n return BigInteger.ZERO;\n BigInteger TWO = BigInteger.valueOf(2);\n\n BigInteger sum = BigInteger.ZERO;\n sum = sum.add(\n n.multiply(n.add(BigInteger.ONE))\n .divide(TWO)\n );\n\n BigInteger flooredN = findFraction(n);\n sum = sum.add(\n n.multiply(flooredN)\n );\n\n sum = sum.subtract(\n flooredN.multiply(flooredN.add(BigInteger.ONE))\n .divide(TWO)\n );\n\n sum = sum.subtract(findSum(flooredN));\n\n return sum;\n }", "public int lengthOfLongestSubstringKDistinct(String s, int k) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int j = 0;\n int max = 0;\n int[] map = new int[256];\n int distinctCt = 0;\n\n for (int i = 0; i < s.length(); i++) {\n while( j < s.length()) {\n int ch = s.charAt(j);\n if (map[ch] == 0) {\n if (distinctCt + 1 > k) {\n break;\n }\n map[ch] = 1;\n distinctCt++;\n j++;\n } else {\n map[ch] += 1;\n j++;\n }\n }\n max = Math.max(max, j - i);\n map[s.charAt(i)] -= 1;\n if (map[s.charAt(i)] == 0) {\n distinctCt--;\n }\n }\n return max;\n }", "private void PuzzleSolve(int k, ArrayList<Integer> S, ArrayList<Integer> U) {\n // for every integer value in the array passed in U we will add it to the empty array and remove it from the\n // new array made called list.\n for (Integer s : U) {\n ArrayList<Integer> list = new ArrayList<>(U);\n S.add(s);\n list.remove(s);\n // If we have removed all numbers in the list and S is now full, check the evaluation.\n if (k == 1) {\n Equals(S);\n }\n // else we keep calling this method until U is empty.\n else {\n PuzzleSolve(k - 1, S, list);\n }\n // remove the value from s and then add it back to the list to test a new variation at the end.\n S.remove(s);\n list.add(s);\n }\n }", "public static void findKComplemenentaryPairs(int[] values, int k) {\n\t\t\n\t\t// first of all, we need to divide to conquer, let's build a binary tree\n\t\t// I will set root as K. This way, for each new value 'i' I will know which side of the tree\n\t\t// I should find 'j' \n\t\t\n\t\tLeaf root = new Leaf(k);\n\t\tcountIterations = 0;\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\taddLeaf(root, values[i]);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.print(\"Tree built: \");\n\t\tprintTree(root); \t\t\t\t\t// this is just for debugging and will not be included in asymptotic analysis\n\t\tSystem.out.println(\"\\nTotal of \" + countIterations + \" iterations to build a tree for an array of \" + values.length + \" elements\");\n\t\t\n\t\tStringBuffer report = new StringBuffer();\n\t\t\n\t\tSystem.out.println(\"\\nPairs:\");\n\t\t// Trespass array and find value j that satisfies A[i] + A[j] = k\n\t\t\n\t\tint countTotal = 0;\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tcountIterations = 0;\n\t\t\tint val = values[i];\n\t\t\tint wanted = k - val;\n\t\t\tif (hasValue(root, wanted)) { \n\t\t\t\tSystem.out.println(\"- A[i,j] = [\" + val + \",\" + wanted + \"]\");\n\t\t\t}\n\t\t\treport.append(\"Iteration \" + i + \" took \" + countIterations + \" operations to search in the tree\\n\");\n\t\t\tcountTotal += countIterations;\n\t\t}\n\t\t\n\t\tSystem.out.println(report.toString());\n\t\tSystem.out.println(\"Total of operations for n=\" + values.length + \" was \" + countTotal + \" operations\");\n\t\t\n\t}", "public int numWays(int n, int k) {\n if(n == 0)\n return 0;\n int numsDiff = k;\n int numsSame = 0;\n for(int i = 2; i <= n; i++){\n int preSame = numsSame;\n numsSame = numsDiff;\n numsDiff = preSame * (k - 1) + numsDiff * (k - 1);\n }\n return numsSame + numsDiff;\n }", "@Override \n public int binom(int n, int k){\n this.binumInputCheck(n, k);\n if ( n == 0 || k == 0 || n == k )\n return 1;\n \n if(k > n/2)\n k = n - k; \n \n if(this.saveArr[n][k] != 0)\n return this.saveArr[n][k];\n \n this.saveArr[n][k] = binom(n-1, k-1) + binom(n-1, k);\n return this.saveArr[n][k];\n }", "public int findPairsTwoPointers(int[] nums, int k) {\n if (k < 0) {\n return 0;\n }\n Arrays.sort(nums); // O(N*logN)\n\n int i = 0;\n int j = 1;\n int count = 0;\n while (j < nums.length) { // O(N)\n if (i == j || nums[j] - nums[i] < k) {\n j++;\n } else if (nums[j] - nums[i] > k) {\n i++;\n } else {\n count += 1;\n j++;\n while (j < nums.length && nums[j] == nums[j - 1]) {\n j++;\n }\n }\n }\n return count;\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public int subarraySumLeetCode(int[] nums, int k) {\n int count = 0;\n for (int start = 0; start < nums.length; start++) {\n for (int end = start + 1; end <= nums.length; end++) {\n int sum = 0;\n for (int i = start; i < end; i++) {\n sum += nums[i];\n }\n if (sum == k) {\n count++;\n }\n }\n }\n return count;\n }", "public double testCloseness(int k)\r\n {\r\n return Math.log(2) - alternatingSequence(k);\r\n }", "public static long sb(long a[], long n, long x) {\n long len = Long.MAX_VALUE;\n int p1 = 0;\n int p2 = 0;\n long sum = 0l;\n while(p1<=p2 && p2<n) {\n sum = sum + a[p2];\n p2++;\n while(sum >= x) {\n len = len > (p2-p1) ? (p2-p1) : len;\n sum = sum - a[p1];\n p1++;\n }\n }\n return len == Long.MAX_VALUE ? -1 : len;\n }", "static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}", "static int solve(int n) \n\t{ \n\t // base case \n\t if (n < 0) \n\t return 0; \n\t if (n == 0) \n\t return 1; \n\t \n\t return solve(n-1) + solve(n-3) + solve(n-5); \n\t}", "@Override\r\n\tpublic int runn(int k) {\n\t\treturn 0;\r\n\t}", "public int R_M(){\n\t\tBigInteger nminus1=n.subtract(BigInteger.ONE);\n\t\tdo{\n\t\t\tif(nminus1.mod(two.pow(a)).equals(BigInteger.ZERO)){\n\t\t\t\ttable.add(a);\n\t\t\t}\n\t\t\titerator++;\n\t\t\ta++;\n\t\t}while(!(two.pow(a).compareTo(n)>0));\n\t\t\n\t\ta=table.get(table.size()-1);\n\t\tBigInteger m=nminus1.divide(two.pow(a));\n\t\tint wlen=n.bitLength();\n\t\tBigInteger b;\n\t\tBigInteger z;\n\t\tfor(int i=0;i<iterations;i++){\n\t\t\tint straznik=0;\n\t\t\tint straznik1=0;\n\t\t\tdo{\n\t\t\t b=new BigInteger(wlen,new Random());\n\t\t\t}while(!(b.compareTo(BigInteger.ONE)>0) && !(b.compareTo(nminus1)<0));\n\t\t\tz=b.modPow(m, n);\n\t\t\tif(z.equals(BigInteger.ONE) || z.equals(nminus1)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int j=0;j<a-1;j++){\n\t\t\t\t\tz=z.pow(2).mod(n);\n\t\t\t\t\tif(z.equals(nminus1)){\n\t\t\t\t\t\tstraznik++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(z.equals(BigInteger.ONE)){\n\t\t\t\t\t\tstraznik1++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(straznik==1){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(straznik1==1){\n\t\t\t\t\tgetComposite();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tgetComposite();\n\t\t\treturn 0;\n\t\t}\n\t\tgetProbablyPrime();\n\t\treturn 1;\n\t\t}", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n if (t < 0) return false;\n long sz = (long)t + 1;\n Map<Long, Long> map = new HashMap<>();\n for (int i = 0; i < nums.length; ++i) {\n long bucket = getBucket(nums[i], sz);\n if (map.containsKey(bucket)) return true;\n if (map.containsKey(bucket + 1) && Math.abs(nums[i] - map.get(bucket + 1)) < sz) return true;\n if (map.containsKey(bucket - 1) && Math.abs(nums[i] - map.get(bucket - 1)) < sz) return true;\n map.put(bucket, (long)nums[i]);\n if (i >= k) map.remove(getBucket(nums[i - k], sz));\n }\n return false;\n}", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "private int determineNumberOfIterations()\r\n\t{\r\n\t\tint number = 0;\r\n\r\n\t\tfor (@SuppressWarnings(\"unused\")\r\n\t\tMap.Entry<Integer, LinkedHashMap<Integer, Double>> entry : ENERGIES_E.entrySet()) {\r\n\t\t\tnumber++;\r\n\t\t}\r\n\r\n\t\tfor (@SuppressWarnings(\"unused\")\r\n\t\tMap.Entry<Integer, LinkedHashMap<Integer, Double>> entry : ENERGIES_A.entrySet()) {\r\n\t\t\tnumber++;\r\n\t\t}\r\n\r\n\t\treturn number * 2; // *2 is to account for the reversed branch iterations\r\n\t}", "public int numTrees(int n) {\n if(n<=1)\n return 1;\n int[] dp = new int[n+1];\n dp[0] = 1;\n dp[1] = 1;\n dp[2] = 2;\n \n for(int i=3;i<=n;i++){\n int sum = 0;\n for(int a=0;a<i;a++){\n sum+=dp[0+a]*dp[i-1-a];\n }\n dp[i] = sum;\n //if i is odd then add the i/2 dp after you multiply by 2\n }\n return dp[n];\n }", "public BigInteger calculatePermutations(long n, long k) {\n\t\treturn Factorial.factorial(n).divide(Factorial.factorial(n-k));\n\t}", "static int sherlockAndAnagrams(String s) {\n HashTable hashTable = new HashTable(s.length() * s.length() * 4);\n substrings(s).map(Solution::ordered).forEach(hashTable::insert);\n return substrings(s).map(Solution::ordered).mapToInt(s1 -> {\n hashTable.remove(s1);\n return hashTable.count(s1);\n }).sum();\n }", "static int cntDisPairs(int arr[], int N, int K) {\n\t\t// Stores count of distinct pairs\n\t\t// whose sum equal to K\n\t\tint cntPairs = 0;\n\n\t\t// Sort the array\n\t\tArrays.sort(arr);\n\n\t\t// Stores index of\n\t\t// the left pointer\n\t\tint i = 0;\n\n\t\t// Stores index of\n\t\t// the right pointer\n\t\tint j = N - 1;\n\n\t\t// Calculate count of distinct\n\t\t// pairs whose sum equal to K\n\t\twhile (i < j) {\n\n\t\t\t// If sum of current pair\n\t\t\t// is equal to K\n\t\t\tif (arr[i] + arr[j] == K) {\n\n\t\t\t\t// Remove consecutive duplicate\n\t\t\t\t// array elements\n\t\t\t\twhile (i < j && arr[i] == arr[i + 1]) {\n\n\t\t\t\t\t// Update i\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\t// Remove consecutive duplicate\n\t\t\t\t// array elements\n\t\t\t\twhile (i < j && arr[j] == arr[j - 1]) {\n\n\t\t\t\t\t// Update j\n\t\t\t\t\tj--;\n\t\t\t\t}\n\n\t\t\t\t// Update cntPairs\n\t\t\t\tcntPairs += 1;\n\n\t\t\t\t// Update i\n\t\t\t\ti++;\n\n\t\t\t\t// Update j\n\t\t\t\tj--;\n\t\t\t}\n\n\t\t\t// if sum of current pair\n\t\t\t// less than K\n\t\t\telse if (arr[i] + arr[j] < K) {\n\n\t\t\t\t// Update i\n\t\t\t\ti++;\n\t\t\t} else {\n\n\t\t\t\t// Update j\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\treturn cntPairs;\n\t}", "public int numSquaresII(int n) {\n // build a hashset contains all i from 1 to sqrt(n) which have i^2 <= n\n Set<Integer> set = new HashSet<>();\n for (int i = 1; i * i <= n; i++) {\n set.add(i * i);\n }\n // start from 1 to n, test possible condition\n int count = 1;\n while (count <= n) {\n if (isDivided(n, count, set)) {\n return count;\n }\n count++;\n }\n return count;\n }", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "private static int lucas_cost(int n, double v) {\r\n\t\tint c, d, e, r;\r\n\r\n\t\td = n;\r\n\t\tr = (int) ((double) d / v + 0.5);\r\n\t\tif (r >= n)\r\n\t\t\treturn (ADD * n);\r\n\t\td = n - r;\r\n\t\te = 2 * r - n;\r\n\t\tc = DUP + ADD; /* initial duplicate and final addition */\r\n\t\twhile (d != e) {\r\n\t\t\tif (d < e) {\r\n\t\t\t\tr = d;\r\n\t\t\t\td = e;\r\n\t\t\t\te = r;\r\n\t\t\t}\r\n\t\t\tif (4 * d <= 5 * e && ((d + e) % 3) == 0) { /* condition 1 */\r\n\t\t\t\tr = (2 * d - e) / 3;\r\n\t\t\t\te = (2 * e - d) / 3;\r\n\t\t\t\td = r;\r\n\t\t\t\tc += 3 * ADD; /* 3 additions */\r\n\t\t\t} else if (4 * d <= 5 * e && (d - e) % 6 == 0) { /* condition 2 */\r\n\t\t\t\td = (d - e) / 2;\r\n\t\t\t\tc += ADD + DUP; /* one addition, one duplicate */\r\n\t\t\t} else if (d <= (4 * e)) { /* condition 3 */\r\n\t\t\t\td -= e;\r\n\t\t\t\tc += ADD; /* one addition */\r\n\t\t\t} else if ((d + e) % 2 == 0) { /* condition 4 */\r\n\t\t\t\td = (d - e) / 2;\r\n\t\t\t\tc += ADD + DUP; /* one addition, one duplicate */\r\n\t\t\t} else if (d % 2 == 0) { /* condition 5 */\r\n\t\t\t\td /= 2;\r\n\t\t\t\tc += ADD + DUP; /* one addition, one duplicate */\r\n\t\t\t} else if (d % 3 == 0) { /* condition 6 */\r\n\t\t\t\td = d / 3 - e;\r\n\t\t\t\tc += 3 * ADD + DUP; /* three additions, one duplicate */\r\n\t\t\t} else if ((d + e) % 3 == 0) { /* condition 7 */\r\n\t\t\t\td = (d - 2 * e) / 3;\r\n\t\t\t\tc += 3 * ADD + DUP; /* three additions, one duplicate */\r\n\t\t\t} else if ((d - e) % 3 == 0) { /* condition 8 */\r\n\t\t\t\td = (d - e) / 3;\r\n\t\t\t\tc += 3 * ADD + DUP; /* three additions, one duplicate */\r\n\t\t\t} else if (e % 2 == 0) { /* condition 9 */\r\n\t\t\t\te /= 2;\r\n\t\t\t\tc += ADD + DUP; /* one addition, one duplicate */\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (c);\r\n\t}", "public static long binom(int n, int k) {\n if (k > n || n < 0 || k < 0) {\n return 0;\n }\n\n if (bin == null)\n bin = new ArrayList<ArrayList<Long>>();\n\n if (bin.size() <= n) {\n for (int i = bin.size(); i <= n; i++) {\n ArrayList<Long> newList = new ArrayList<Long>();\n bin.add(newList);\n }\n }\n\n if (bin.get(n).size() <= k) {\n for (int i = 0; i <= n; i++) {\n if (bin.get(i).size() <= k && bin.get(i).size() <= i) {\n for (int j = bin.get(i).size(); j <= k && j <= i; j++) {\n bin.get(i).add(Long.valueOf(0));\n }\n }\n }\n }\n\n return recBinom(n, k);\n }", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "public int findKthNumber(int m, int n, int k) {\n int low = 1, high = m * n + 1, mid;\n\n while (low < high) {\n mid = low + ((high - low) >> 1);\n if (count(mid, m, n) >= k) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n return high;\n }", "private static BigInteger binomial(int n, int k) {\n BigInteger ret = new BigInteger(\"1\");\n if (k > n) {\n return BigInteger.ZERO;\n } else {\n \tif (binom[n][k] != null) {\n \t\treturn binom[n][k];\n \t}\n if (k > n / 2) {\n k = n - k;\n }\n // (n choose i+1) = (n choose i) * (n - i) / (i + 1)\n for (int i = 0; i < k; i++) {\n ret = ret.multiply(BigInteger.valueOf(n - i)).divide(BigInteger.valueOf(i + 1));\n }\n }\n return binom[n][k] = ret;\n }", "public static int eggDrop(int n, int k) {\n\t\tif(k == 0 || k==1) {\n\t\t\treturn k;\n\t\t}\n\t\tif(n==1) {\n\t\t\treturn k;\n\t\t}\n\t\tint res = 0;\n\t\tint min = Integer.MAX_VALUE;\n\t\tint x;\n\t\tfor(x=1; x<=k; x++) {\n\t\t\tres = 1+Math.max(eggDrop(n-1, x-1), eggDrop(n, k-x));\n\t\t\tif(res < min)min = res;\n\t\t}\n\t\treturn min+1;\n\t}", "public int kSum(int[] A, int k, int target) {\n\t\tint res=0;\r\n\t\t//考虑k=1的情况\r\n//\t\tif (k==1) {\r\n//\t\t\tfor(int i=0;i<A.length;i++) {\r\n//\t\t\t\tif (A[i]==target) {\r\n//\t\t\t\t\tres++;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\treturn res;\r\n//\t\t}\r\n//\t\tint sum_k_1=0;\r\n//\t\tint sum=target-sum_k_1;\r\n//\t\tif (k>1 && k<A.length) {\r\n//\t\t\tfor(int i=0;i<A.length-1;i++) {\r\n//\t\t\t\tfor(int j=i+1;j<A.length;j++) {\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t//动态规划\r\n\t\tint n=A.length;\r\n\t\tint[][][] f=new int[n+1][k+1][target+1];\r\n\t\tfor(int i=0;i<n+1;i++) {\r\n\t\t\tf[i][0][0]=1;\r\n\t\t}\r\n\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\tfor(int j=1;j<=k && j<=i;j++) {\r\n\t\t\t\tfor(int t=1;t<=target;t++) {\r\n\t\t\t\t\tf[i][j][t]=0;\r\n\t\t\t\t\tif (t>=A[i-1]) {\r\n\t\t\t\t\t\tf[i][j][t]=f[i-1][j-1][t-A[i-1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tf[i][j][t]+=f[i-1][j][t];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn f[n][k][target];\r\n }", "public static int Main()\n\t{\n\t\tint n; //????\n\t\tint k;\n\t\tint i;\n\t\tint i2;\n\t\tint j;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tk = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (i2 = 1;;i2++)\n\t\t{ //????\n\t\t\ti = i2;\n\t\t\tfor (j = 0;j < n;j++)\n\t\t\t{ //????\n\t\t\t\tif (i % (n - 1) != 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti = i * n / (n - 1) + k;\n\t\t\t}\n\t\t\tif (j == n)\n\t\t\t{\n\t\t\t\tSystem.out.print(i);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "private boolean kcss(int[] i, long[] e, long y) {\n int I = i.length;\n long[] x = new long[I];\n while (true) {\n x[0] = ll(i[0]); // 1\n snapshot(i, 1, I, x); // 2\n if (Arrays.compare(x, e) != 0) { // 3\n sc(i[0], x[0]); // 3a\n return false; // 3a\n }\n if (sc(i[0], y)) return true; // 3b\n } // 3c\n }", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint t = sc.nextInt();\n\t\twhile(t-->0)\n\t\t{\n\t\t int n = sc.nextInt();\n\t\t long[] arr = new long[n];\n\t\t long sum=0;\n\t\t for(int i=0;i<n;i++)\n\t\t {\n\t\t arr[i]=sc.nextLong();\n\t\t sum=sum+arr[i];\n\t\t }\n\t\t int i, k=0;\n\t\t double x=(double)sum/n;\n for(i=0;i<n;i++){\n if(arr[i]==x) \n {\n k=i; \n break;\n \n }\n }\n if(i==n)\n System.out.println(\"Impossible\");\n else \n System.out.println(k+1);\n\t\t}\n\t\t \n\t}", "public static int maxSubStringSizeKDistinctChars(String str, int k) {\n int start = 0;\n int maxLen = 0;\n int localSum = 0;\n HashMap<Character, Integer> hm = new HashMap<>();\n\n for(int end = 0; end < str.length(); end++) {\n\n localSum++;\n if (hm.containsKey(str.charAt(end))) {\n hm.put(str.charAt(end), hm.get(str.charAt(end)) + 1);\n } else {\n hm.put(str.charAt(end), 1);\n }\n\n while(hm.size() > k) {\n // maxLen = Math.max(maxLen, end - start);\n maxLen = Math.max(maxLen, localSum - 1);\n hm.put(str.charAt(start), hm.get(str.charAt(start)) - 1);\n if(hm.get(str.charAt(start)) == 0) {\n hm.remove(str.charAt(start));\n }\n start++;\n localSum--;\n }\n }\n\n return Math.max(maxLen, localSum);\n\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "public static int findPairs(int[] nums, int k) {\n \tif(k<0){\n \t\treturn 0;\n \t}\n \t\n int re=0;\n Map<Integer, Integer> map=new HashMap<Integer, Integer>();\n for(int num: nums){\n \tif(map.containsKey(num)){\n \t\tif(k==0&&map.get(num)==1){\n \t\t\tre++;\n \t\t\tmap.put(num, 0);\n \t\t}\n \t\tcontinue;\n \t}\n \tif(map.containsKey(num+k)){\n \t\tre++;\n \t}\n \tif(map.containsKey(num-k)){\n \t\tre++;\n \t}\n \tmap.put(num, 1);\n }\n return re;\n }", "private static int combinationRecursive(int n, int k) {\n\t\tif (k == 0 || n == k) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn (int)(n/(double)k) * combinationRecursive(n-1, k-1);\n\t\t}\n\t}", "private static int numTrees(int n) {\n int[] counts = new int[n + 2];\n counts[0] = 1;\n counts[1] = 1;\n for (int i = 2; i <= n; i++) {\n for (int j = 0; j < i; j++) {\n counts[i] += counts[j] * counts[i - j - 1];\n }\n }\n return counts[n];\n }", "public static void main(String args[] ) throws Exception {\n Scanner s = new Scanner(System.in);\n int N=s.nextInt();\n long S=s.nextLong();\n long E=s.nextLong();\n long[] x=new long[N];\n long[] p=new long[N];\n int[] c=new int[N];\n for(int i=0;i<N;i++){\n x[i]=s.nextLong();\n p[i]=s.nextLong();\n c[i]=0;\n }\n long m=S;\n long dist=0;\n while(m<=E){\n long min=E;\n int index=0;\n for(int i=0;i<N;i++){\n if((x[i]-p[i])<min && c[i]==0){\n min=x[i]-p[i];\n index=i;\n }\n }\n if(m<(x[index]-p[index])){\n dist=dist+x[index]-p[index]-m;\n }\n\t if(m<(x[index]+p[index])){\n\t m=x[index]+p[index];\n\t }\n c[index]=1;\n }\n System.out.println(dist);\n }", "public int numSquaresIII(int n) {\n List<Integer> squareNum = new ArrayList<>();\n for (int i = 1; i * i <= n; i++) {\n squareNum.add(i * i);\n }\n Queue<Integer> queue = new ArrayDeque<>();\n queue.offer(n);\n int level = 0;\n while (!queue.isEmpty()) {\n ++level;\n Queue<Integer> nextQueue = new ArrayDeque<>();\n for (Integer rem : queue) {\n for (Integer square : squareNum) {\n if (rem.equals(square)) {\n return level;\n } else if (rem < square) {\n break;\n } else {\n nextQueue.offer(rem - square);\n }\n }\n }\n queue = nextQueue;\n }\n return level;\n }", "public int numTrees(int n) {\n if (n==0) return 1;\n int[] dp = new int[n+1];\n dp[0] = dp[1] = 1;\n for (int i=2;i<=n;i++) {\n for (int j=1;j<=i;j++) {\n dp[i] += dp[j-1] * dp[i-j];\n }\n }\n return dp[n];\n }", "private int first_leaf() { return n/2; }", "public boolean checkSubarraySum(int[] nums, int k) {\n int N = nums.length;\n if (N == 0)\n return false;\n Map<Integer, Integer> m = new HashMap();\n int sum = 0;\n m.put(0, -1);\n for (int i = 0; i < N; i++) {\n sum += nums[i];\n if (k != 0 )\n sum %= k;\n if (m.containsKey(sum)) {\n if (i - m.get(sum) >= 2)\n return true;\n } else {\n m.put(sum, i);\n }\n }\n return false;\n }", "private static long recBinom(int n, int k) {\n if (bin.get(n).get(k) > 0) {\n return bin.get(n).get(k).longValue();\n }\n \n if (k == 0 || k == n) {\n bin.get(n).set(k, Long.valueOf(1));\n return 1;\n } \n\n long result = recBinom(n - 1, k - 1) + recBinom(n - 1, k);\n bin.get(n).set(k, Long.valueOf(result));\n\n return result;\n }", "public String KolmogorovComplexity(int size, int numrules)\n {\n\t double k = (sigmaSize + numrules +size) * Math.log(numrules+sigmaSize);\n\t return String.format(\"%.2f\", k);\n\t\t \n }", "public String getPermutation(int n, int k) {\n if(n<1)\n return null;\n List<Long> list=new LinkedList<Long>();\n for(long i=1;i<=n;i++){\n list.add(i);\n }\n long kk=k-1;\n StringBuilder res=new StringBuilder();\n long total=1;\n for(long i=2;i<n;i++){\n total*=i;\n }\n for(long i=n-1;i>=0;i--){\n res.append(list.remove((int)(kk/total)));\n kk=kk%total;\n if(i>0)\n total=total/i;\n }\n return res.toString();\n }", "private static long f(long m) {\n\t\tlong k = 1;\r\n\t\tfor (long i=1; i<=m; i++){\r\n\t\t\tk *= i;\r\n\t\t}\r\n\t\treturn k;\r\n\t}" ]
[ "0.6883014", "0.64022136", "0.63558567", "0.6322002", "0.6264173", "0.62484354", "0.61707276", "0.6162148", "0.61529624", "0.6143867", "0.60994166", "0.6092051", "0.60644543", "0.60373867", "0.5967092", "0.5920717", "0.59100246", "0.5903195", "0.5884141", "0.58307475", "0.58233416", "0.5823168", "0.5812486", "0.5812217", "0.58018565", "0.5801676", "0.577601", "0.5772337", "0.5767911", "0.5753127", "0.5745845", "0.5740174", "0.5735267", "0.57311213", "0.5717466", "0.5709114", "0.56988674", "0.56948656", "0.5688162", "0.5670832", "0.5666191", "0.56551456", "0.5647166", "0.56448853", "0.56396663", "0.5638336", "0.56366456", "0.5634695", "0.5626489", "0.5622773", "0.56125396", "0.55955476", "0.5594359", "0.5589782", "0.5586052", "0.5584989", "0.5582564", "0.55823", "0.5580431", "0.5566354", "0.5559402", "0.55556864", "0.5550887", "0.5546832", "0.55433714", "0.5538785", "0.55275893", "0.55232763", "0.55213505", "0.5519726", "0.5518404", "0.55175656", "0.5509818", "0.5508719", "0.55069584", "0.5504449", "0.5503311", "0.5502421", "0.55012536", "0.54898334", "0.54882115", "0.5483445", "0.54770905", "0.5476034", "0.5462549", "0.5459408", "0.5455875", "0.5451602", "0.5451237", "0.5444443", "0.5441952", "0.54385865", "0.54364705", "0.5434331", "0.5426821", "0.54256815", "0.54253286", "0.5425317", "0.5414282", "0.5411315", "0.539845" ]
0.0
-1
TODO: Return the communication channel to the service.
@Override public IBinder onBind(Intent intent) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Channel channel() {\n return channel;\n }", "public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}", "SocketChannel getChannel();", "EzyChannel getChannel();", "public Channel getChannel()\n {\n return channel;\n }", "java.lang.String getChannel();", "protected Channel getChannel()\n {\n return mChannel;\n }", "@Override\n public int getChannel()\n {\n return channel;\n }", "public SocketChannel getChannel() {\n return channel;\n }", "public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}", "public Channel getChannel() {\n return channel;\n }", "private ManagedChannel getManagedChannel() {\n return ManagedChannelBuilder.forAddress(\"localhost\", mGrpcPortNum)\n .usePlaintext()\n .build();\n }", "public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}", "public int GetChannel();", "public ChannelManager getChannelManager() {\n return channelMgr;\n }", "public String getChannel() {\r\n return channel;\r\n }", "public String getChannel() {\n return channel;\n }", "public Channel getChannel() throws ConnectException\n {\n return getChannel(null);\n }", "public Object getCommunicationChannel()\r\n\t\t\tthrows PersistenceMechanismException {\n\t\treturn null;\r\n\t}", "public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }", "public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}", "private SocketChannel getChannel(){\n if ( key == null ) {\n return getSocket().getChannel();\n } else {\n return (SocketChannel)key.channel();\n }\n }", "public String getChannel() {\n\t\treturn channel;\n\t}", "public String getChannel() {\n\t\treturn channel;\n\t}", "public int getChannel() {\n return channel;\n }", "public interface Channel\r\n{\r\n /**\r\n * Get a duplex connection for this channel. This method must be called for each request-response message exchange.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n DuplexConnection getDuplex(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a send-only connection for this channel. This method must be called for each message to be sent without a\r\n * response.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n OutConnection getOutbound(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a receive-only connection for this channel. This method must be called for each message to be received, and\r\n * will wait for a message to be available before returning.\r\n * \r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n InConnection getInbound() throws IOException, WsConfigurationException;\r\n \r\n /**\r\n * Close the channel. Implementations should disconnect and free any resources allocated to the channel.\r\n * @throws IOException on I/O error\r\n */\r\n void close() throws IOException;\r\n}", "public int getChannel() {\r\n\t\treturn channel;\r\n\t}", "public Byte getChannel() {\n return channel;\n }", "public SocketChannel getChannel() { return null; }", "public ChannelFuture getChannelFuture() {\n return channelFuture;\n }", "public interface ChannelsService {\n\n /**\n * Gets the Facebook data-ref to create send to messenger button.\n *\n * @param callback Callback with the result.\n */\n void createFbOptInState(@Nullable Callback<ComapiResult<String>> callback);\n }", "private static ManagedChannel getManagedChannel(int port) {\n return ManagedChannelBuilder.forAddress(\"localhost\", port)\n .usePlaintext(true)\n .build();\n }", "protected SocketChannel getSocket() {\n\t\treturn channel;\n\t}", "public interface MessagingService {\n\n /**\n * Checks whether message receivers are registered for this channel.\n * \n * @param ccid the channel id\n * @return <code>true</code> if there are message receivers on this channel,\n * <code>false</code> if not.\n */\n boolean hasMessageReceiver(String ccid);\n\n /**\n * Passes the message to the registered message receiver.\n * \n * @param ccid the channel to pass the message on\n * @param serializedMessage the message to send (serialized SMRF message)\n */\n void passMessageToReceiver(String ccid, byte[] serializedMessage);\n\n /**\n * Check whether the messaging component is responsible to send messages on\n * this channel.<br>\n * \n * In scenarios with only one messaging component, this will always return\n * <code>true</code>. In scenarios in which channels are assigned to several\n * messaging components, only the component that the channel was assigned\n * to, returns <code>true</code>.\n * \n * @param ccid\n * the channel ID or cluster controller ID, respectively.\n * @return <code>true</code> if the messaging component is responsible for\n * forwarding messages on this channel, <code>false</code>\n * otherwise.\n */\n boolean isAssignedForChannel(String ccid);\n\n /**\n * Check whether the messaging component was responsible before but the\n * channel has been assigned to a new messaging component in the mean time.\n * \n * @param ccid the channel id\n * @return <code>true</code> if the messaging component was responsible\n * before but isn't any more, <code>false</code> if it either never\n * was responsible or still is responsible.\n */\n boolean hasChannelAssignmentMoved(String ccid);\n}", "org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n }\n }", "public final int getChannel() {\n return device.getChannel();\n }", "public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}", "public ChannelLogger getChannelLogger() {\n return this.channelLogger;\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n }\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public NotificationsChannel getChannel(String channelId) throws Exception;", "java.lang.String getChannelName();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public TextChannel getSupportChannel() { return supportChannel; }", "public ChannelLocator getChannelLocator();", "com.google.protobuf.ByteString\n getChannelBytes();", "private SmartCardChannel getChannel() throws UsbDeviceException, NotAvailableUSBDeviceException{\n\t\tif(this.channel != null){\n\t\t\treturn this.channel;\n\t\t}\n\t\tif(getUsbInterface() != null){\n\t\t\tif (!getUsbDeviceConnection().claimInterface(getUsbInterface(), true)) {\n\t\t\t\tthrow new NotAvailableUSBDeviceException(\"Imposible acceder al interfaz del dispositivo USB\"); //$NON-NLS-1$\n\t\t\t}\n\t\t\tthis.channel = new SmartCardChannel(getUsbDeviceConnection(), getUsbInterface());\n\t\t\treturn this.channel;\n\t\t}\n\t\tthrow new UsbDeviceException(\"usbInterface cannot be NULL\"); //$NON-NLS-1$\n\t}", "public String getChannel() {\n if(this.isRFC2812())\n return this.getNumericArg(1);\n else\n return this.getNumericArg(0);\n }", "@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract Channel getChannel(String name);", "public interface Channels {\n \n public void createChannel();\n\n}", "public int getChannelId( ) {\r\n return channelId;\r\n }", "public String getChannelId()\n {\n return channelId;\n }", "public Channel method_4090() {\n return null;\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic int getChannel() {\n\t\treturn super.getDeviceID();\n\t}", "public interface ChannelServiceI {\r\n Channel createChannel(Channel channel);\r\n\r\n int updateChannelUser(int id);\r\n\r\n int minusChannelUser(int id);\r\n\r\n List<Channel> getChannelPage(Channel channel);\r\n\r\n int count();\r\n\r\n Channel getChannel(String channelToken);\r\n\r\n List<Channel> getUserChannel(Channel channel);\r\n\r\n int deleteUser(Integer id);\r\n\r\n List<Channel> getUserChannelTotal(Channel channel);\r\n\r\n int updateChannel(Channel channel);\r\n}", "protected Channel connect() {\n\t\t\tif (channel == null) {\n\t\t\t\tinit();\n\t\t\t}\n\t\t\tSystem.out.println(\"channel === \"+channel);\n\t\t\tif (channel.isDone() && channel.isSuccess())\n\t\t\t\treturn channel.channel();\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}", "public abstract ManagedChannelBuilder<?> delegate();", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index);\n } else {\n return channelBuilder_.getMessage(index);\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getChannelToken();", "java.lang.String getChannelToken();", "public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}", "String getServerConnectionChannelName();", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Bean\n\tpublic DirectChannel requestChooserOutputChannel() {\n\t\treturn MessageChannels.direct().get();\n\t}", "public ManagedChannelBuilder<?> delegate() {\n return this.delegateBuilder;\n }", "@Override\n public ScheduledExecutorService getSchedExecService() {\n return channelExecutor;\n }", "@objid (\"1bb2731c-131f-497d-9749-1f4f1e705acb\")\n Link getChannel();", "private ManagedChannel emulatedPubSubChannel() {\n if (!useEmulator) {\n throw new RuntimeException(\"You shouldn't be calling this when using the real \"\n + \"(non-emulator) implementation\");\n }\n String hostport = System.getenv(\"PUBSUB_EMULATOR_HOST\");\n return ManagedChannelBuilder.forTarget(hostport).usePlaintext().build();\n }", "public String getChannelId() {\n return channelId;\n }", "public Channel method_4112() {\n return null;\n }", "public Channel method_4121() {\n return null;\n }", "public SodiumChannel getSodiumChannel() {\n\t\t\treturn sodiumChannel;\n\t\t}", "public interface ChannelManager {\n int createChannel(String channel, long ttlInSeconds);\n int publishToChannel(String channel, String msg);\n}", "public interface ChannelConnection {\n public Channel getChannel();\n public Connector getConnector();\n}", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }", "public ChannelType getChannelType() {\n return type;\n }", "@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}", "public interface ChatPlayerService extends PlayerService, Chatter\n{\n /**\n * Sets the player's ChatTarget focus.\n * \n * @param focus The new ChatTarget to focus\n */\n void setFocus( ChatTarget focus );\n \n /**\n * Gets the player's current focus.\n * \n * @return The channel the player has focused\n */\n ChatTarget getFocus();\n \n /**\n * Gets the player's BaseComponent name.\n * \n * @return The player's BaseComponent name.\n */\n BaseComponent getComponentName();\n \n /**\n * Gets the ChatManagerImpl.\n * \n * @return The ChatManagerImpl instance\n */\n ChatManager getChatManager();\n \n /**\n * Gets the PrivateMessageTarget from the last inbound PM.\n * \n * @return The PrivateMessageTarget from the last PM received\n */\n PrivateMessageTarget getLastInboundWhisperTarget();\n \n /**\n * Sets the most recent inbound PM's PrivateMessageTarget.\n * \n * @param lastInboundWhisperTarget The new target.\n * @return This ChatPlayerService object.\n */\n ChatPlayerService setLastInboundWhisperTarget( PrivateMessageTarget lastInboundWhisperTarget );\n \n /**\n * Gets a formatted message to show all of the channels the\n * player is currently in.\n * \n * @return A formatted message showing the channels the player is in.\n */\n BaseComponent[] getChannelsJoinedMessage();\n}", "public String getSubChannel() {\r\n\t\treturn this.subChannel;\r\n\t}", "public String getChannelId() {\n\t\treturn channelId;\n\t}", "public ReadableByteChannel getByteChannel() throws IOException {\n InputStream source = getInputStream();\n \n if(source != null) {\n return Channels.newChannel(source);\n }\n return null;\n }", "public DmaChannel getChannelAt(int i);", "public interface MessageInputChannel extends\r\n Channel<MessageInput, MessageInputChannelAPI>, OneDimensional, MessageCallback {\r\n\r\n}", "public int getChannelType( ) {\r\n return 1;\r\n }", "public interface IRemoteMessageService {\n\n void unsubscribeToMessage(UnSubscribeToMessage cmd);\n\n /**\n * Sets a message element to a specified value\n */\n void setElementValue(SetElementValue cmd);\n\n void zeroizeElement(ZeroizeElement cmd);\n\n /**\n * Notifies service to send message updates to the specified ip address\n */\n SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);\n\n Set<? extends DataType> getAvailablePhysicalTypes();\n\n boolean startRecording(RecordCommand cmd);\n\n InetSocketAddress getRecorderSocketAddress();\n\n InetSocketAddress getMsgUpdateSocketAddress();\n\n void stopRecording();\n\n void terminateService();\n\n void reset();\n\n void setupRecorder(IMessageEntryFactory factory);\n\n public Map<String, Throwable> getCancelledSubscriptions();\n}", "@Test\n\tpublic void testChannel() {\n\t\tString requestXml =\n\t\t\t\t\"<FahrenheitToCelsius xmlns=\\\"http://www.w3schools.com/webservices/\\\">\" +\n\t\t\t\t\" <Fahrenheit>55</Fahrenheit>\" +\n\t\t\t\t\"</FahrenheitToCelsius>\";\n\n\t\t// Create the Message object\n\t\tMessage<String> message = MessageBuilder.withPayload(requestXml).build();\n\n\t\t// Send the Message to the handler's input channel\n\t\t//MessageChannel channel = channelResolver.resolveChannelName(\"fahrenheitChannel\");\n\t\tchannel.send(message);\n\t}", "public Message getMessageWizardChannel() {\n\t\tMessage temp = null;\n\t\t\n\t\ttry {\n\t\t\t//se ia mesajul din buffer\n\t\t\ttemp = bufferWizardChannel.take();\t\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t\t\n\t}", "public MessageChannel getGameChannel() {\r\n\t\treturn gameChannel;\r\n\t}", "public Message getMessageWizardChannel() {\n\t\tMessage msg1=null;\n\t\ttry{\n\t\t\tmsg1=chann1.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn msg1;\n\t}", "void start(Channel channel, Object msg);", "@Override\n\tpublic String getChannelId()\n\t{\n\t\treturn null;\n\t}", "public String getChannelCode() {\n return channelCode;\n }", "byte[] getChannelCommand() throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n baos.write(rgbCommand(r, g, b));\n baos.write(wwcwCommand(ww, cw));\n return baos.toByteArray();\n }", "java.lang.String getChannelId();", "protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }", "public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }", "public interface SendService {\n\n public void sendMessage(RemotingCommand remotingCommand, long timeout);\n}" ]
[ "0.7437254", "0.73157257", "0.7183302", "0.7135984", "0.7129005", "0.71285546", "0.7090409", "0.7070889", "0.7067624", "0.7038997", "0.6988283", "0.6917885", "0.68884337", "0.67946744", "0.67914945", "0.67852235", "0.677885", "0.674656", "0.67354923", "0.6681876", "0.66714543", "0.6667951", "0.6658963", "0.6658963", "0.6637923", "0.65924364", "0.6589948", "0.65803987", "0.65801334", "0.656291", "0.6394705", "0.6370899", "0.6364142", "0.6360486", "0.63541204", "0.63400555", "0.6295168", "0.62838054", "0.6278035", "0.6249136", "0.62438136", "0.62114525", "0.6202571", "0.6174055", "0.6163322", "0.61605746", "0.6151532", "0.614542", "0.6134949", "0.61321455", "0.60943747", "0.6087775", "0.60815173", "0.60634476", "0.6059933", "0.60573", "0.6053354", "0.6047734", "0.60389555", "0.6030655", "0.6022905", "0.60092485", "0.6005142", "0.6005142", "0.60051006", "0.60014427", "0.6001328", "0.5996678", "0.59943444", "0.59914345", "0.59837997", "0.5970838", "0.59568334", "0.5928881", "0.5895364", "0.58861846", "0.58624125", "0.5857131", "0.58528924", "0.581504", "0.581163", "0.58108175", "0.58004445", "0.57914156", "0.57894915", "0.578917", "0.5776858", "0.57738584", "0.576785", "0.57609695", "0.5759547", "0.5758005", "0.57573795", "0.5743325", "0.5738268", "0.5733163", "0.57316715", "0.5726644", "0.5715349", "0.57023185", "0.5701523" ]
0.0
-1
Creates a new crime with random ID.
public Crime() { mId = UUID.randomUUID(); mDate = new Date(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Ignore\n public Crime(UUID id) {\n mId = id;\n mDate = new Date();\n }", "public org.oep.usermgt.model.Citizen create(long citizenId);", "public Person(String firstName, String lastName) {\r\n name = new Name(firstName, lastName); \r\n id = (int )(Math.random() * 200 + 100);; \r\n }", "private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }", "public void addCrime(Crime c) {\n ContentValues values = getContentValues(c);\n mDatabase.insert(CrimeTable.NAME, null, values);\n }", "public static CrimeFragment newInstance(UUID crimeId) {\n\t\tBundle args = new Bundle();\n\t\targs.putSerializable(ARG_CRIME_ID, crimeId);\n\n\t\tCrimeFragment fragment = new CrimeFragment();\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}", "public void deleteCrime(UUID id) {\n\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public static int genID(){\n Random rand = new Random();\n\n int theID = rand.nextInt(999)+1;\n\n return theID;\n\n }", "public static void createCard() throws IOException {\n\t\t\n\t\tString num = randomPhone();\n\t\twhile(CCnum.containsKey(num)) {\n\t\t\tnum = randomPhone();\n\t\t}\n\t\tCCnum.put(num, 1);\n\t\tCCnumbers.add(num);\n\t\t\n\t\tString type = cardType[random(4)];\n\t\tint balance = random(100000);\n\t\tint limit = random(100000) + balance;\n\t\t\n\t\twriter.write(\"INSERT INTO CreditCard (Number, Type, cclimit, isActive, Balance) Values ('\" + num +\"', '\" + type + \n\t\t\t\t\"', \" + limit + \", \" + rando() + \", \" + balance + line);\n\t\twriter.flush();\n\t}", "@PostMapping(\"/citizens\")\n @Timed\n public ResponseEntity<Citizen> createCitizen(@RequestBody Citizen citizen) throws URISyntaxException {\n log.debug(\"REST request to save Citizen : {}\", citizen);\n if (citizen.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"citizen\", \"idexists\", \"A new citizen cannot already have an ID\")).body(null);\n }\n Citizen result = citizenService.save(citizen);\n return ResponseEntity.created(new URI(\"/api/citizens/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"citizen\", result.getId().toString()))\n .body(result);\n }", "public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}", "private static int generateCircleId(){\n return snextCircleId.incrementAndGet();\n\n }", "Id createId();", "public void createResident(Resident resident);", "public com.inikah.slayer.model.MMCity create(long cityId);", "public Crime getCrime(UUID id) {\n CrimeCursorWrapper cursor = queryCrimes(CrimeTable.Cols.UUID + \" = ?\",\n new String[] {id.toString() }\n );\n\n try {\n if(cursor.getCount() == 0){\n return null;\n }\n\n cursor.moveToFirst();\n return cursor.getCrime();\n }\n finally {\n cursor.close();\n }\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public int get_crimeid() {\r\n return _crimeid;\r\n }", "public RandomNPC(int id) {\n\t\tsuper(id);\n\t}", "@Override\n\tpublic Candidate create(long candidateId) {\n\t\tCandidate candidate = new CandidateImpl();\n\n\t\tcandidate.setNew(true);\n\t\tcandidate.setPrimaryKey(candidateId);\n\n\t\treturn candidate;\n\t}", "public boolean newCustomer(int id, int cid)\n throws RemoteException, DeadlockException;", "id(int id) {}", "void nodeCreate( long id );", "public Campus create(long campusId);", "public void generarId() {\n try{\n int numAleatorio = (int)(Math.random()*99999);\n boolean resultado = dgt.generarIdAutomatico(numAleatorio);\n tfid.setText(String.valueOf(numAleatorio));\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "Person createPerson();", "public void create(Person p) {\n\t\t\n\t}", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "public void addNewEntity() {\n Random random = new Random();\n int bound = Aquarium.WIDTH / 10;\n int randX = bound + random.nextInt(Aquarium.WIDTH - (2 * bound));\n int randY = bound + random.nextInt(Aquarium.HEIGHT - (2 * bound));\n Piranha newPiranha = new Piranha(randX, randY);\n piranhas.add(newPiranha);\n }", "public org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);", "public void studIdGenr()\n {\n \tthis.studentID = (int)(Math.random() * (2047300 - 2047100 + 1) + 2047100);\n }", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "public Account()\n {\n id = UUID.randomUUID();\n }", "public void updateCrime(Crime crime) {\n String uuidString = crime.getmId().toString();\n ContentValues values = getContentValues(crime);\n\n // WUUUTTTTT>????\n mDatabase.update(CrimeTable.NAME, values, CrimeTable.Cols.UUID + \" = ?\",\n new String[]{ uuidString });\n }", "private void generateCandies(){\n\t\tfor (int i = 0; i < 16; i++){\n\t\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tCandy candy = new Candy(coordX, coordY, i);\n\t\t\tcandies.put(i, candy);\n\t\t}\n\t}", "public Person getRandomPerson() {\n //Randomize all characteristics of a person\n int age = (int) (rd.nextDouble() * 100); //within 100y old\n int gd = (int) Math.round(rd.nextDouble() * (Person.Gender.values().length - 1));\n int bt = (int) Math.round(rd.nextDouble() * (Person.BodyType.values().length - 1));\n int pf = (int) Math.round(rd.nextDouble() * (Person.Profession.values().length - 1));\n boolean isPreg = rd.nextBoolean();\n\n //Construct a person with random characteristic\n //Person(int age, Profession profession, Gender gender, BodyType bodytype, boolean isPregnant)\n P = new Person(age, Person.Profession.values()[pf], Person.Gender.values()[gd], Person.BodyType.values()[bt], isPreg);\n return P;\n }", "public void createNewClient(String nom, String prenom, String tel, String mail, String adresse) throws SQLException {\n\t\tint tmp = getLastClientId();\n\t\tSystem.out.println(tmp);\n\t\tif(tmp != 0) {\n\t\t\t//voir generated keys pour l'id\n\t\t\tClient tmpClient = new Client(tmp, nom, prenom, tel, mail, adresse);\n\t\t\tClient tmp2 = create(tmpClient);\n\t\t\tSystem.out.println(tmp2.getLogin());\n\t\t\tSystem.out.println(\"Succès lors de la création de l'utilisateur\");\n\t\t}else\n\t\t\tSystem.out.println(\"Erreur lors de la création de l'utilisateur\");\n\t}", "public void generateID()\n {\n ID = this.hashCode();\n }", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "public Persona(int idPersona){\n this.idPersona = idPersona;\n }", "@PostMapping(\"/cards\")\n StarbucksCard newCard() {\n StarbucksCard newcard = new StarbucksCard();\n\n Random random = new Random();\n int num = random.nextInt(900000000) + 100000000;\n int code = random.nextInt(900) + 100;\n\n newcard.setCardNumber(String.valueOf(num));\n newcard.setCardCode(String.valueOf(code));\n newcard.setBalance(20.00);\n newcard.setActivated(false);\n newcard.setStatus(\"New Card\");\n return repository.save(newcard);\n }", "public void newCrayon(Crayon cr) {\r\n\tem.getTransaction( ).begin( );\r\n em.persist(cr);\r\n em.getTransaction().commit();\r\n }", "public void newCandy() {\n\t\tDebugger.print(\"Making new candy\");\n\t\tint x = (Random.nextInt(1, this.SIZE * 2) - 2);\n\t\tint y = (Random.nextInt(1, this.SIZE - 2));\n\n\t\tTile t = new Tile(x, y);\n\t\tboolean foundFreeTile = false;\n\t\twhile (!foundFreeTile) {\n\t\t\tfor (Snake snake : this.snakes) {\n\t\t\t\tif (snake != null) {\n\n\t\t\t\t\tif (snake.find(t)) {\n\t\t\t\t\t\tx = (Random.nextInt(1, this.SIZE * 2) - 1);\n\t\t\t\t\t\ty = (Random.nextInt(1, this.SIZE - 1));\n\t\t\t\t\t\tt.setX(x);\n\t\t\t\t\t\tt.setY(y);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfoundFreeTile = true;\n\t\t}\n\t\tif (this.getGui() != null) {\n\t\t\tthis.getGui().print(\"New candy made\");\n\t\t}\n\t\tthis.setCandy(new Candy(x, y));\n\t}", "public void newGame() {\n\t\ttheNumber = (int)(Math.random()* 100 + 1);\r\n\t\t\r\n\t}", "public Employee() {\n employeeID = genID.incrementAndGet();\n }", "public void addCrime(Crime c) {\n mCrimes.add(c);\n }", "public int create(Candidato c) {\r\n\t\t Connection con = null;\r\n\t\t String sql = \"INSERT INTO candidato(cpf, nome, cargo) VALUES(?,?,?)\";\r\n\t\t PreparedStatement stmt = null;\r\n\t\t con = ConnectionFactory.getConnection();\r\n\t\t try {\r\n\t\t\t stmt = con.prepareStatement(sql);\r\n\t\t\t stmt.setString(1, c.getCpf());\r\n\t\t\t stmt.setString(2, c.getNome());\r\n\t\t\t stmt.setString(3, c.getCargo());\r\n\t\t\t stmt.execute();\r\n\t\t\t return 1;\r\n\t\t } catch(SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Erro ao cadastrar no banco de dados!\"+e.getMessage(), \"Erro\", 2);\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tConnectionFactory.closeConnection(con,stmt);\r\n\t\t\t}\r\n\t }", "void new_seed( Seed seed );", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "public void getNewPentomino()\t{\n\t\tRan = (int) (Math.random() * Pentominos.length);\n\t\tPentominoName = Pentominos[Ran];\n\t\tSetShape(Ran);\n\t\t\n\t}", "@Override\n public Tournament newTournament() {\n String newId = Tournament.randomId();\n while(tournamentCache.containsKey(newId) || tournamentRepository.findById(newId).isPresent()){\n newId = Tournament.randomId();\n }\n Tournament newTournament = new Tournament(newId, fighterService);\n tournamentCache.put(newId, newTournament);\n return newTournament;\n }", "@Test\r\n\tpublic void testCreateRandomCustomer() {\r\n\r\n\t\tint NO_FLOORS = 25;\r\n\t\t\r\n\t\tCustomer c = custFact.createRandomCustomer(NO_FLOORS);\r\n\t\t\r\n\t\tassertNotNull(c);\r\n\t\t\r\n\t}", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "@Test\n public void testNewInstance(){\n car = Car.newInstance();\n assertNotNull(car);\n assertNotNull(car.getID());\n }", "@Override\n\tpublic EntityAgeable createChild(EntityAgeable mate) {\n\t\treturn getReproductionHelper().createChild(mate);\n\t}", "@Test\n public void createRandomNumber() throws IOException {\n Assert.assertNotNull(Utils.createRandomNumber());\n }", "public void CreatePerson(Person p){\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager(); \n\t\t Person p1 = new Person(p.getId(), p.getFirstName(), p.getLastName(), p.getRelationship(),\n\t\t\t\t p.getAddress(), p.getPhone(), p.getEmail(), p.getComment(), user.getId());\n\t\t System.out.println(\"p1 : \" + p1);\n\t\t System.out.println(\"p : \" + p);\n\t\t// TODO - should to iterate on the results that returns when calling to \"getpersons\" method.\n\t\tPersonDBManager.getInstance().CreateNewPerson(con.getConnectionFromPool(), p1);\t\n\t}", "public static Chef creerChef(String nom, String qualificatif, int force) {\n // Retrieves the current universe's controller\n BaseGestionnaireUnivers gestionnaireUnivers = GestionnaireUnivers.get_gestionnaireUnivers();\n\n // Create a chef of the current universe\n int personnageID = nextID++;\n Chef createdPersonnage = gestionnaireUnivers.creerChef(personnageID, nom, qualificatif, force);\n\n // Register the character and return it\n personnages.put(personnageID, createdPersonnage);\n return createdPersonnage;\n }", "Individual createIndividual();", "public static boolean createCorsoMateria(Course newCorso) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CREATE_COURSE;\n\t\t\trp.parameters = new Object[] { newCorso };\n\t\t\tsend(rp);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore nella creazione di un corso materia\");\n\t\t}\n\t\treturn false;\n\t}", "public CargoAirplane createRandomCargoAirplane() {\n\tthrow new RuntimeException(\"Cargo airplanes is not supported\");\n }", "public static String makeRandomID() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "Secuencia createSecuencia();", "public Person(ElevatorControllerGUI elevatorController){\n this.id = idGenerator.getAndIncrement();\n this.arrivalTime = random.nextInt((30-1)+1)+1; \n this.arrivalFloor = random.nextInt((4-2)+1)+2; \n\t\t this.destinationFloor = random.nextInt((10-5)+1)+5; \n\t\t this.baggageWeight = setLuggageWeight();\n this.personWeight = setPassengerWeight();\n this.random = new Random();\n this.elevatorControllerGUI = elevatorController;\n }", "@Override\n public long generateNewContractId() {\n return idCounter++;\n }", "int insertPerson(UUID id, Person person);", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "private int IdRandom() {\n\t\tRandom random = new Random();\n\t\tint id = random.nextInt(899999) + 100000;\n\t\treturn id;\n\t}", "@Test\n public void getId() {\n UUID id = UUID.randomUUID();\n User u = new User(id.toString(), name, mail, pass, address, gender);\n Assert.assertEquals(u.getId(), id);\n }", "public static void createPayment() throws IOException {\t\t\n\t\tDate date = new Date((long) random(100000000));\n\t\tString date2 = \"'19\" + date.getYear() + \"-\" + (random(12)+1) + \"-\" + (random(28)+1) + \"'\";\n\t\tint amount = random(10000);\n\t\t\n\t\twriter.write(\"INSERT INTO Payment (Id, Date, CCNum, amount) Values (\" + pid++ +\", \" \n\t\t\t\t+ date2 + \", '\" + CCnumbers.get(random(CCnumbers.size())) + \"', \" + amount + line);\n\t\twriter.flush();\n\t}", "public static JobID generate() {\n return new JobID();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString str_personname = personname.getText().toString();\n\t\t\t\tList<String> faceIds = new ArrayList<String>();\n\t\t\t\tfaceIds.add(faceid);\n\t\t\t\tList<String> groupid = new ArrayList<String>();\n\t\t\t\tgroupid.add(groupid_long);\n\t\t\t\tResult result = mFacePlus.createPerson(str_personname, faceIds, str_personname, groupid );\n\t\t\t\tDebug.debug(TAG, \"result=\" + result.type.name());\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfinal Person person = (Person)result.data;\n\t\t\t\tpersonid = person.getId();\n\t\t\t\tLog.e(TAG,personid);\n\t\t\t\tDebug.debug(TAG, person.toString());\n\t\t\t\t\n\t\t\t}", "public void create(){}", "private Customer createCustomerInstanceWithId(String name, String email, String phoneNumber) {\n Customer customer = new Customer();\n customer.setId(1000L);\n customer.setName(name);\n customer.setEmail(email);\n customer.setPhoneNumber(phoneNumber);\n return customer;\n }", "public static Character[] createCrew()\r\n \t{\r\n \t\tint nb = CharacterProfile.values().length;\r\n \t\t\r\n \t\tCharacter crew[] = new Character[nb];\r\n \t\tint temp_loyalties[] = INITIAL_LOYALTY;\r\n \t\t\r\n \t\tfor(int i = 0; i < nb; i++)\r\n \t\t{\r\n \t\t\tint r = MathHelper.randInt(0, temp_loyalties.length-1);\r\n \t\t\tint secure = 0; //security against infinite loop\r\n \t\t\twhile(temp_loyalties[r] == -1)\r\n \t\t\t{\r\n \t\t\t\tr++;\r\n \t\t\t\tsecure ++;\r\n \t\t\t\tif(r >= nb)\r\n \t\t\t\t\tr = 0;\r\n \t\t\t\tif(secure >= nb)\r\n \t\t\t\t{\r\n \t\t\t\t\tSystem.out.println(\"Error: wrong initial loyalty.\");\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tcrew[i] = new Character(i, temp_loyalties[r]);\r\n \t\t\tcrew[i].enterRoom(Ship.get().getRoom(RoomType.CORRIDOR.ordinal()));\r\n \t\t\ttemp_loyalties[r] = -1;\r\n \t\t}\r\n \t\treturn crew;\r\n \t}", "public int NewMonster(){\n int r = (int) (Math.random() * (9 - 2 + 1) + 2);\n return r;\n }", "private String crearCodigoRuta(String nombre){\n String fecha = new SimpleDateFormat(\"ddMMyyyy\").format(new Date());\n Random randomGenerator = new Random();\n int RndNum = randomGenerator.nextInt(1000);\n\n return nombre+\"_\"+fecha+\"_\"+RndNum;\n }", "public Crime getCrime(UUID id) {\n for (Crime crime : mCrimes) {\n if (crime.getId().equals(id)) {\n return crime;\n }\n }\n return null;\n }", "void crearNuevaPersona(Persona persona);", "@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }", "private void generateNewQuestion() {\n GameManager gameManager = new GameManager();\n long previousQuestionId = -1;\n try {\n previousQuestionId = mGameModel.getQuestion().getId();\n } catch (NullPointerException e) {\n previousQuestionId = -1;\n }\n mGameModel.setQuestion(gameManager.generateRandomQuestion(previousQuestionId));\n mGameModel.getGameMaster().setDidPlayerAnswer(false);\n mGameModel.getGameMaster().setPlayerAnswerCorrect(false);\n mGameModel.getGameSlave().setDidPlayerAnswer(false);\n mGameModel.getGameSlave().setPlayerAnswerCorrect(false);\n LOGD(TAG, \"New question generated\");\n }", "public void createStudent(String name, String ID){}", "public static int makeSegID() {\n int newID = (int) (Math.random() * 100000000);\n return newID;\n }", "public Person createPerson(Person p);", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "Company getOrCreateCompanyId(String companyID) throws Exception;", "public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseableClues();\n ArrayList<Clue> list = new ArrayList<>(usableClues.values());\n int i = rand.nextInt(usableClues.size());\n return list.get(i);\n }", "Account create();", "String createSessionId(long seedTerm);", "public PlanoSaude create(long plano_id);", "@Override\n\tpublic int getID()\n\t{\n\t\treturn Main.creaPersonaggio;\n\t}", "public Cop generateCop(){\r\n\r\n\t\t\tPatch currentPatch = randPatch();\r\n\r\n\t\t\tCop cop= new Cop(currentPatch);\r\n\r\n\t\t\tcurrentPatch.setPerson(cop);\r\n\r\n\t\t\treturn cop;\r\n\t\t}", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "private void setAccountNumber() // setare numar de cont\n {\n int random = ThreadLocalRandom.current().nextInt(1, 100 + 1);\n accountNumber = ID + \"\" + random + SSN.substring(0,2);\n System.out.println(\"Your account number is: \" + accountNumber);\n }", "@Test(enabled = true)\n public void createPerson() {\n List <Account> accounts = new ArrayList<>();\n List<Subscription> sub = new ArrayList<>();\n \n Contact contact = new Contact.Builder().emailaddress(\"[email protected]\").phoneNumber(\"021345685\").build();\n Address address = new Address.Builder().location(\"Daveyton\").streetName(\"Phaswane Street\").houseNumber(45).build();\n \n repo = ctx.getBean(PersonsRepository.class);\n Person p = new Person.Builder()\n .firstname(\"Nobu\")\n .lastname(\"Tyokz\")\n .age(25)\n .account(accounts)\n .sub(sub)\n .contact(contact)\n .address(address)\n .build();\n repo.save(p);\n id = p.getId();\n Assert.assertNotNull(p);\n\n }", "Tank() {\n\n print(\"Tank \" + id + \" is created!\");\n print(\"Tank \" + id + \" is created!\");\n }", "Clase createClase();", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "public int createWithNewId(AirspaceObject aircraft)\n\t{\n\t\tcounter += 1;\n\t\tcreate(counter, aircraft);\n\t\treturn counter;\n\t}" ]
[ "0.6989622", "0.6265634", "0.59244084", "0.5741468", "0.5730433", "0.55951834", "0.5568061", "0.554807", "0.5513965", "0.54934543", "0.5453546", "0.5448366", "0.5426751", "0.542031", "0.53988093", "0.53853095", "0.5356998", "0.53335875", "0.5307541", "0.5300922", "0.5281979", "0.5247857", "0.52408445", "0.52310765", "0.5216541", "0.5210976", "0.520542", "0.5192826", "0.5180295", "0.517776", "0.51776975", "0.51705843", "0.5159219", "0.51536316", "0.51414406", "0.5123086", "0.51226956", "0.5120719", "0.5103647", "0.5096941", "0.50923586", "0.5089778", "0.5089685", "0.5078333", "0.5066409", "0.50642395", "0.50642323", "0.5063031", "0.50510544", "0.50404835", "0.503382", "0.5021583", "0.5018934", "0.50185263", "0.50020397", "0.49945757", "0.49930406", "0.49903226", "0.49838945", "0.49729207", "0.4956008", "0.49528828", "0.49508297", "0.49458247", "0.49402", "0.49330842", "0.49310905", "0.49283075", "0.49278095", "0.49221915", "0.49193183", "0.491615", "0.49158403", "0.491558", "0.49072656", "0.4903571", "0.4903176", "0.490255", "0.49013287", "0.48884252", "0.4870381", "0.48672858", "0.48655096", "0.48633292", "0.48615944", "0.48608816", "0.48598674", "0.4859729", "0.4857293", "0.48554784", "0.4854283", "0.48532858", "0.485161", "0.4850797", "0.48491716", "0.48474064", "0.48469937", "0.48458672", "0.48416772", "0.48405015" ]
0.751254
0
Creates a new crime with the given id.
@Ignore public Crime(UUID id) { mId = id; mDate = new Date(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Crime() {\n mId = UUID.randomUUID();\n mDate = new Date();\n }", "public org.oep.usermgt.model.Citizen create(long citizenId);", "public Crime getCrime(UUID id) {\n CrimeCursorWrapper cursor = queryCrimes(CrimeTable.Cols.UUID + \" = ?\",\n new String[] {id.toString() }\n );\n\n try {\n if(cursor.getCount() == 0){\n return null;\n }\n\n cursor.moveToFirst();\n return cursor.getCrime();\n }\n finally {\n cursor.close();\n }\n }", "public org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);", "public void addCrime(Crime c) {\n ContentValues values = getContentValues(c);\n mDatabase.insert(CrimeTable.NAME, null, values);\n }", "public static CrimeFragment newInstance(UUID crimeId) {\n\t\tBundle args = new Bundle();\n\t\targs.putSerializable(ARG_CRIME_ID, crimeId);\n\n\t\tCrimeFragment fragment = new CrimeFragment();\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}", "public Crime getCrime(UUID id) {\n for (Crime crime : mCrimes) {\n if (crime.getId().equals(id)) {\n return crime;\n }\n }\n return null;\n }", "public static org.oep.cmon.dao.qlhc.model.ChucVu2VaiTro create(long id) {\n\t\treturn getPersistence().create(id);\n\t}", "public org.oep.cmon.dao.dvc.model.ThuTuc2GiayTo create(long id);", "@Override\n\tpublic Candidate create(long candidateId) {\n\t\tCandidate candidate = new CandidateImpl();\n\n\t\tcandidate.setNew(true);\n\t\tcandidate.setPrimaryKey(candidateId);\n\n\t\treturn candidate;\n\t}", "public com.inikah.slayer.model.MMCity create(long cityId);", "public boolean newCustomer(int id, int cid)\n throws RemoteException, DeadlockException;", "@Override\n\tpublic EmployeeComplaint create(long employeeComplaintId) {\n\t\tEmployeeComplaint employeeComplaint = new EmployeeComplaintImpl();\n\n\t\temployeeComplaint.setNew(true);\n\t\temployeeComplaint.setPrimaryKey(employeeComplaintId);\n\n\t\treturn employeeComplaint;\n\t}", "public void addCrime(Crime c) {\n mCrimes.add(c);\n }", "public Campus create(long campusId);", "public com.alain.puntocoma.model.Catalogo create(long catalogoId);", "@Override\n\tpublic LocalRichInfo create(long id) {\n\t\tLocalRichInfo localRichInfo = new LocalRichInfoImpl();\n\n\t\tlocalRichInfo.setNew(true);\n\t\tlocalRichInfo.setPrimaryKey(id);\n\n\t\treturn localRichInfo;\n\t}", "id(int id) {}", "@PostMapping(\"/citizens\")\n @Timed\n public ResponseEntity<Citizen> createCitizen(@RequestBody Citizen citizen) throws URISyntaxException {\n log.debug(\"REST request to save Citizen : {}\", citizen);\n if (citizen.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"citizen\", \"idexists\", \"A new citizen cannot already have an ID\")).body(null);\n }\n Citizen result = citizenService.save(citizen);\n return ResponseEntity.created(new URI(\"/api/citizens/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"citizen\", result.getId().toString()))\n .body(result);\n }", "public iUser createUser(int id) {\n iUser user = null;\n String username = getUsername();\n String password = getPassword();\n\n boolean confirmed = confirmed(id, username);\n if (confirmed) {\n user = registerOptions(username, password, id);\n }\n return user;\n }", "public Comic saveComicById(Long id) {\n\t\tif(findById(id).isPresent()) throw new ValidationException(\"Comic (id= \"+ id +\") already registered\");\n\t\t\n\t\t\n\t\tRestTemplate restTemplate = new RestTemplate();\t\t\n\t\tString url = \"https://gateway.marvel.com/v1/public/comics/\" + id\n\t\t\t\t\t\t+ \"?apikey=\" + key\n\t\t\t\t \t\t+ \"&hash=\" + hash\n\t\t\t\t \t\t+ \"&ts=\" + ts;\n\t\t\n\t\tString response = restTemplate.getForObject(url, String.class);\n\t\t\n\t\treturn saveFromApi(response).get(0);\n\t}", "public com.vportal.portlet.vfaq.model.FAQComment create(long id);", "public PlanoSaude create(long plano_id);", "public CsclAppointeeMaster create(long id_);", "public void deleteCrime(UUID id) {\n\n }", "public int create(Candidato c) {\r\n\t\t Connection con = null;\r\n\t\t String sql = \"INSERT INTO candidato(cpf, nome, cargo) VALUES(?,?,?)\";\r\n\t\t PreparedStatement stmt = null;\r\n\t\t con = ConnectionFactory.getConnection();\r\n\t\t try {\r\n\t\t\t stmt = con.prepareStatement(sql);\r\n\t\t\t stmt.setString(1, c.getCpf());\r\n\t\t\t stmt.setString(2, c.getNome());\r\n\t\t\t stmt.setString(3, c.getCargo());\r\n\t\t\t stmt.execute();\r\n\t\t\t return 1;\r\n\t\t } catch(SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Erro ao cadastrar no banco de dados!\"+e.getMessage(), \"Erro\", 2);\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tConnectionFactory.closeConnection(con,stmt);\r\n\t\t\t}\r\n\t }", "@Override\n\tpublic vn.gov.hoabinh.model.Clip createClip(java.lang.String id) {\n\t\treturn _clipLocalService.createClip(id);\n\t}", "@BodyParser.Of(BodyParser.Json.class)\n public Result create(Long id) {\n Script script = Script.find.byId(id);\n if (script != null) {\n JsonNode json = request().body().asJson();\n String name = json.findPath(\"name\").textValue();\n String description = json.findPath(\"description\").textValue();\n\n models.Preset preset = models.Preset.createDummyPreset(name, description, script);\n\n return ok(Json.toJson(preset));\n }\n return notFound();\n }", "protected void createGroup(int id) {\n\t\tcreateGroup(id, _motherGroupID);\n\t}", "public void createNewId(String id)\n { \n IDNode node=new IDNode(id);\n idReferences.put(id,node);\n }", "public Fila carregar(int id) throws IOException{\t\t\n\t\treturn dao.carregar(id);\n\t}", "private Contest newContest(long id, long forumId, Limit limit, List languages) {\n\t\tContest contest = new Contest();\n\t\tcontest.setId(id);\n\t\tcontest.setDescription(\"desc\" + id);\n\t\tcontest.setLimit(limit);\n\t\tcontest.setLanguages(languages);\n\t\tcontest.setTitle(\"title\" + id);\n\t\tcontest.setForumId(forumId);\n\t\tcontest.setStartTime(new Date(id * 1000));\n\t\tcontest.setEndTime(new Date(id * 2000));\n\t\treturn contest;\n\t}", "@Override\n\tpublic Campus create(long campusId) {\n\t\tCampus campus = new CampusImpl();\n\n\t\tcampus.setNew(true);\n\t\tcampus.setPrimaryKey(campusId);\n\n\t\treturn campus;\n\t}", "public Job(int id) {\n this.id = id;\n }", "public Canary withId(String id) {\n setId(id);\n return this;\n }", "@Auth({User.Role.Admin, User.Role.Customer})\n public static Result create(Long id) {\n Form<Product> form = null;\n List<Manufacturer> manufacturers = Manufacturer.find.all();\n if(id == 0)\n form = Form.form(Product.class).fill(new Product());\n else\n form = Form.form(Product.class).fill(Product.findById(id.intValue()));\n return ok(views.html.product.form.render(form, manufacturers));\n }", "public Customer(int id) {\n\t\tthis.id = id;\n\t}", "public void newCrayon(Crayon cr) {\r\n\tem.getTransaction( ).begin( );\r\n em.persist(cr);\r\n em.getTransaction().commit();\r\n }", "public void create(int id, AirspaceObject aircraft)\n\t{\n\t\tidToObject.put(id, aircraft);\n\t\tobjectToId.put(aircraft, id);\n\t}", "private static FuncionalidadeCustos create(String id, String name) {\n FuncionalidadeCustos result = new FuncionalidadeCustos(id, name);\n addToMap(id, result);\n return result;\n }", "id(int id, id id, int id) {}", "@Override\n public Cours creerCours(String nomCours, Integer niveauCible, Date dateDebut, Integer duree, Integer enseignant, String idPiscine) {\n Creneau creneau = new Creneau(dateDebut, duree);\n creneau=creneauRepo.save(creneau);\n Piscine p = piscineRepo.findOne(idPiscine);\n Cours c = new Cours (nomCours, niveauCible,creneau, enseignant, new Participant[4],p );\n Cours insert = coursRepo.save(c);\n return insert;\n }", "public Complaint create(Complaint complaint) {\n\t\t//int employeeId,customerServiceId;\n\t\t//String employeeName=complaint.getEmployeeName();\n\t\t//String customerServiceName=complaint.getCustomerServiceName();\n\t\t//Employee employee=findByEmployeeName(employeeName);\n\t\t//Employee employee1=findByEmployeeName(customerServiceName);\n\t\t//employeeId=employee.getEmployeeId();\n\t\t//customerServiceId=employee1.getEmployeeId();\n\t\tSimpleDateFormat date=new SimpleDateFormat(\"dd/MM/yyyy\");\n \t\tDate dt=new Date();\n \t\t//complaint.setEmployeeId(complaint.getEmployeeId());\n \t\t//complaint.setCustomerServiceId(complaint.getCustomerServiceId());\n \t\tcomplaint.setCreatedDate(date.format(dt));\n \t\tcomplaint.setCreatedBy(complaint.getCustomerServiceId());\n \t\tcomplaint.setModifiedDate(date.format(dt));\n \t\tcomplaint.setModifiedBy(complaint.getCustomerServiceId());\n \t\tcomplaint.setDeletedFlag(\"Y\");\n\t\treturn complaintRepository.save(complaint);\n\t}", "public Persona(int idPersona){\n this.idPersona = idPersona;\n }", "public PresencePerson createPresencePerson(String id);", "@Override\n\tpublic Approvatore create(long id_approvatore) {\n\t\tApprovatore approvatore = new ApprovatoreImpl();\n\n\t\tapprovatore.setNew(true);\n\t\tapprovatore.setPrimaryKey(id_approvatore);\n\n\t\treturn approvatore;\n\t}", "public Job(int id, String name, Recruiter recruiter, int fee, String category)\n {\n this.id = id;\n this.name = name;\n this.recruiter = recruiter;\n this.fee = fee;\n this.category = category;\n }", "public DebitCredit(String id) {\n\t\tsuper(id);\n\t}", "public Agent createNewAgent(String id) throws AgentException, MaceException {\r\n\t\t// Check, if an agent with this Id is already in the pool\r\n\t\tif (getAgent(id) != null) {\r\n\t\t\tthrow new AgentException(\"Buyer agent with ID=\" + id\r\n\t\t\t\t\t+ \" is already in the pool. Could not add it.\");\r\n\t\t}\r\n\t\tAgent agent = new Agent(id, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\treturn agent;\r\n\r\n\t}", "@PostMapping(\"/conto-contabiles\")\n @Timed\n public ResponseEntity<ContoContabile> createContoContabile(@RequestBody ContoContabile contoContabile) throws URISyntaxException {\n log.debug(\"REST request to save ContoContabile : {}\", contoContabile);\n if (contoContabile.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new contoContabile cannot already have an ID\")).body(null);\n }\n ContoContabile result = contoContabileService.save(contoContabile);\n return ResponseEntity.created(new URI(\"/api/conto-contabiles/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public TrabajadorEmpresa create(String idPersona) {\n\t\tTrabajadorEmpresa trabajadorEmpresa = new TrabajadorEmpresaImpl();\n\n\t\ttrabajadorEmpresa.setNew(true);\n\t\ttrabajadorEmpresa.setPrimaryKey(idPersona);\n\n\t\treturn trabajadorEmpresa;\n\t}", "public void create(int id, DVD dvd, Categorie categorie);", "public org.oep.cmon.dao.qlhc.model.ChucVu2VaiTro createChucVu2VaiTro(\n\t\tlong id);", "public ua.org.gostroy.guestbook.model.Entry3 create(long entryId);", "public BaseVedioscore (java.lang.Integer id) {\n\t\tthis.setId(id);\n\t\tinitialize();\n\t}", "public static Project Create(String id)\n\t{\n\t\t// Need to use an ancestor query to do this inside a transaction.\n\t\t// But the ancestor of project is project.\n\t\t// So we just create a normal key with only the type and id\n\t\tproject = ofy().load().key(Key.create(Project.class, id)).now();\n\n\t\treturn project;\n\t}", "public Professor(String name, int id)\r\n {\r\n this.name = name;\r\n this.id = id;\r\n }", "private synchronized void createConversation(int id) throws IOException {\n ConversationGUI convo = new ConversationGUI(model, id, this);\n conversations.put(id, convo);\n convo.setVisible(true);\n }", "public Book(Integer id) {\n\t\tthis.id = id;\n\t}", "public void era (int idProcedimiento){\n // crear nuevo objeto Registro con el id correspondiente\n Registro registroNuevo = new Registro();\n registroNuevo.setIdentificadorProcedimiento(idProcedimiento);\n this.pilaEras.push(registroNuevo);\n }", "public void assignId(int id);", "static User create(int id){\n return Users.isMyID(id) ? new LoggedUser(id) : new User(id);\n }", "People(int id, String name, int age) {\n this.id = id;\n this.name = name;\n this.age = age;\n }", "@POST\n @Path(\"/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public CohortCharacterizationDTO copy(@PathParam(\"id\") final Long id) {\n CohortCharacterizationDTO dto = getDesign(id);\n dto.setName(service.getNameForCopy(dto.getName()));\n dto.setId(null);\n dto.setTags(null);\n dto.getStratas().forEach(s -> s.setId(null));\n dto.getParameters().forEach(p -> p.setId(null));\n return create(dto);\n }", "public Comunidades(int id) {\n\t\tthis.setId(id);\n\t}", "public void setIdCandidatura(int idCandidatura){\n if (idCandidatura < 0 ) {\n throw new IdInvalidoException(\"Id da Candidatura é inválido!\");\n }\n this.idCandidatura = idCandidatura;\n }", "@Override\n\tpublic void create(String id, String code) {\n\t\tStringBuilder qString = new StringBuilder(\"INSERT INTO required_nomenclature (id_required_nomenclature, code) VALUES (?, ?)\");\n\t jdbcTemplate.update(qString.toString(), id, code);\n\t}", "public Cliente carregarPorId(int id) throws Exception {\n \n Cliente c = new Cliente();\n String sql = \"SELECT * FROM cliente WHERE idCliente = ?\";\n PreparedStatement pst = conn.prepareStatement(sql);\n pst.setInt(1, id);\n ResultSet rs = pst.executeQuery();\n if (rs.next()) {\n c.setIdCliente(rs.getInt(\"idCliente\"));\n c.setEndereco(rs.getString(\"endereco\"));\n c.setCidade(rs.getString(\"cidade\"));\n c.setDdd(rs.getInt(\"ddd\"));\n c.setNome(rs.getString(\"nome\"));\n c.setUf(rs.getString(\"uf\"));\n c.setTelefone(rs.getString(\"telefone\"));\n Empresa e = new Empresa();\n EmpresaDAO ePB = new EmpresaDAO();\n ePB.conectar();\n e = ePB.carregarPorCnpj(rs.getString(\"Empresa_cnpj\"));\n ePB.desconectar();\n Usuario p = new Usuario();\n UsuarioDAO pPB = new UsuarioDAO();\n pPB.conectar();\n p = pPB.carregarPorId(rs.getInt(\"Usuario_idUsuario\"));\n pPB.desconectar();\n c.setEmpresa(e);\n c.setUsuario(p);\n }\n return c;\n }", "public Vehicle(int id) \n\t{\n\t\t// each vehicle has a different identifying number\n\t\tthis.id = id;\n\t}", "public static Category create(DataService mgr, String id,\n Marketplace marketplace) throws NonUniqueBusinessKeyException {\n Category category = new Category();\n category.setCategoryId(id);\n category.setMarketplace(marketplace);\n mgr.persist(category);\n return category;\n }", "public com.Hotel.model.Hotel create(long hotelId);", "@Override\r\n\tpublic int create(Estado_Civil civil) {\n\t\treturn jdbcTemplate.update(\"call PKG_ESTADO_CIVIL.PR_INS_ESTADO_CIVIL(?)\", civil.getNombre());\r\n\t}", "public GCoffee withId(Long id) {\n this.setId(id);\n return this;\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "@Transactional\n\t@Override\n\tpublic Prenotazione create(long id,LocalDate dataInzio, LocalDate dataFine, LocalTime oraInzio, LocalTime oraFine, \n\t\t\tString descrizione, Car car, User user) {\n\t\treturn this.prenotazioneRepository.create(id, dataInzio, dataFine, oraInzio, oraFine, descrizione, car, user);\n\t}", "@Override\n\tpublic Person createPerson(String id, String slug, String firstName,\n\t\t\tString lastName, String photoId, Gender gender) {\n\t\tfinal Person person = createPerson();\n\t\tperson.setId(id);\n\t\tperson.setSlug(slug);\n\t\tperson.setFirstName(firstName);\n\t\tperson.setLastName(lastName);\n\t\tperson.setName(firstName + \" \" + lastName);\n\t\tperson.setPhotoId(photoId);\n\t\tperson.setGender(gender);\n\t\treturn person;\n\t}", "public Employee(String id) {\n super(id);\n }", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "public Film create(Film obj) {\n\t\t\n\t\tConnection.update(\"INSERT INTO film (codeFilm,nomFilm) VALUES('\"\n\t\t\t\t\t\t +obj.getCodeFilm() +\"','\"\n\t\t\t\t\t\t +obj.getNomFilm() +\"')\");\n\t\t\n\t\tResultSet result = \tConnection.selectFrom(\"SELECT idFilm \"\n\t\t\t\t+ \"FROM film \"\n\t\t\t\t+\";\");\n\n\t\tint i = 0;\n\t\ttry\n\t\t{\n\t\t\tresult.last();\n\t\t\ti = result.getInt(\"idFilm\");\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tobj.setId(i);\n\t\tConnection.close();\n\t\treturn obj;\n\t}", "public void createPile(int id, String name) {\n\t\tif (mTable.get(id) != null) {\n\t\t\treturn; // There was already a pile there\n\t\t}\n\t\t// Check that the name is unique and that it\n\t\tif (pileNames.contains(name)) {\n\t\t\treturn;\n\t\t} else if (name.equals(\"Pile \" + pileNo)) {\n \t\t\tpileNo++;\n \t\t\tgs.setDefaultPileNo(pileNo);\n \t\t}\n\t\t// Make a new Pile object and set() it in the list\n \t\tmTable.set(id, new Pile(name));\n \t\tpileNames.add(name);\n \t\tsendUpdatedState();\n \t}", "void nodeCreate( long id );", "public Cajeros CajerosXID(int id);", "public Todo create(long todoId);", "public Civilisation(int id, String nameNullForRandom, Case firstCase, Color couleur, Ideologie ideologie, Regime regime, PolTerritoriale polT) {\r\n\t\t\r\n\t\tthis.id = id;\r\n\t\tthis.culture = new Basique();\r\n\t\tthis.ideologie = ideologie;\r\n\t\tthis.regimePolitique = regime;\r\n\t\tthis.couleur = new Color(couleur.getRed(), couleur.getGreen(), couleur.getBlue(), 150);\r\n\t\t//this.couleur = new Color(couleur.getRed(), couleur.getGreen(), couleur.getBlue());\r\n\t\tnom = (nameNullForRandom != null) ? nameNullForRandom : noms[(int)(Math.random()*noms.length)];\r\n\t\tpopulation = 10;\r\n\t\tpopulationColoniale = 0;\r\n\t\tproduction = 0;\r\n\t\teconomie = 0;\r\n\t\tinfluence = 0;\r\n\t\tarmee = 0;\r\n\t\tscienceLvl = 1;\r\n\t\tscience = 10; //decrementation de la science pour passer au lvl supp\r\n\t\tnourriture = 50;\r\n\t\tcaseOwned = new ArrayList<>();\r\n\t\tressourcesStrat = new ArrayList<>();\r\n\t\tressourcesAnimal = new ArrayList<>();\r\n\t\taggresiveWar = new ArrayList<>();\r\n\t\tdefensiveWar = new ArrayList<>();\r\n\t\tvoisins = checkVoisins();\r\n\t\tenFamine = false;\r\n\t\ttauxEducation = 0;\r\n\t\ttauxCroissance = 0.02; // =1x taux mondiale IRL\r\n\t\ttauxAccroissementScience = 1.2;\r\n\t\tbaseScience = 10;\r\n\t\tbaseBonheur = 10;\r\n\t\tbaseEfficaciteArmee = 1;\r\n\t\tnoteMinimale = firstCase.note();\r\n\t\taddCase(firstCase);\r\n\t\tfor(Case c : firstCase.getVoisinesLibres()) addCase(c);\r\n\t\timpactRegime();\r\n\t\tthis.politiqueTerritoriale = polT;\r\n\t\tcalculerBonheur();\r\n\t\tcalculerEffiArmee();\r\n\t\t\r\n\t}", "@PostMapping(\"/experiences\")\n @Timed\n public ResponseEntity<Experience> createExperience(@Valid @RequestBody Experience experience) throws URISyntaxException {\n log.debug(\"REST request to save Experience : {}\", experience);\n if (experience.getId() != null) {\n throw new BadRequestAlertException(\"A new experience cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Experience result = experienceRepository.save(experience);\n return ResponseEntity.created(new URI(\"/api/experiences/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "void create(int id, int authorId, String title);", "public Model(int id) {\n\t\tthis.id = id;\n\t}", "public FiltreEnvoiIDUnique(int id) {\n\t\tthis.id = id;\n\t}", "public RetreatHouse(Long id) {\r\n\t\tthis.id = id;\r\n\t}", "public Community(String id, String name) {\r\n this.id = id;\r\n this.name = name;\t\t\r\n return; \r\n }", "@Override\n\tpublic DmHistoryGoods create(int id) {\n\t\tDmHistoryGoods dmHistoryGoods = new DmHistoryGoodsImpl();\n\n\t\tdmHistoryGoods.setNew(true);\n\t\tdmHistoryGoods.setPrimaryKey(id);\n\n\t\treturn dmHistoryGoods;\n\t}", "@POST(\"/AddEmpire\")\n\tint addEmpire(@Body Empire empire,@Body int id) throws GameNotFoundException;", "@PostMapping(\"/convites\")\n @Timed\n public ResponseEntity<ConviteDTO> createConvite(@Valid @RequestBody ConviteDTO conviteDTO) throws URISyntaxException {\n log.debug(\"REST request to save Convite : {}\", conviteDTO);\n if (conviteDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new convite cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n ConviteDTO result = conviteService.save(conviteDTO);\n mailService.sendConviteEmail(conviteDTO.getEmail());\n return ResponseEntity.created(new URI(\"/api/convites/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public Customer(Long id, String name, Integer age) {\r\n this.id = id;\r\n this.name = name;\r\n this.age = age;\r\n }", "public CreditCard (String number, String expire, String type, int id)\r\n\t{\r\n\t\tthis.setNumber(number);\r\n\t\tthis.setExpirationDate(expire);\r\n\t\tthis.setType(type);\r\n\t\tthis.setId(id);\r\n\t}", "private Character(int id, int loyalty)\r\n \t{\r\n \t\tif(id < CharacterProfile.values().length && id >= 0)\r\n \t\t{\r\n \t\t\tCharacterProfile profile = CharacterProfile.values()[id];\r\n \t\t\t\r\n \t\t\tthis.selected = false;\r\n \t\t\tthis.id = id;\r\n \t\t\tthis.loyalty = loyalty;\r\n \t\t\tthis.lastSleep = 0;\r\n \t\t\tthis.targetedRoom = null;\r\n \t\t\tthis.name = profile.name;\r\n \t\t\tthis.currentRoom = null; // None\r\n \t\t\tthis.x = 0;\r\n \t\t\tthis.y = 0;\r\n \r\n \t\t\ttry {\r\n \t\t\t\tthis.img = new Image(Game.ASSETS_DIR + profile.spriteName);\r\n \t\t\t} catch (SlickException e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t\tSystem.out.println(\"Error: wrong ID!\");\r\n \t}", "@Override\n\tpublic VcmsPortion create(String portionId) {\n\t\tVcmsPortion vcmsPortion = new VcmsPortionImpl();\n\n\t\tvcmsPortion.setNew(true);\n\t\tvcmsPortion.setPrimaryKey(portionId);\n\n\t\tvcmsPortion.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn vcmsPortion;\n\t}", "public void ajouterJoueur(String id)\n\t{\n\t\tJoueur j = new Joueur(id);\n\t\tListJoueur.add(j);\n\t}", "public Citas getCita(int id) {\n Citas c = new Citas();\n try {\n PreparedStatement pstm = null;\n ResultSet rs = null;\n String query = \"SELECT *FROM paciente WHERE id_paciente=?\";\n pstm = con.prepareStatement(query);\n pstm.setInt(1, id);\n rs = pstm.executeQuery();\n while (rs.next()) {\n c.setId(rs.getInt(\"id_paciente\"));\n c.setName(rs.getString(\"name\"));\n c.setDoctor(rs.getString(\"doctor\"));\n c.setFecha(rs.getString(\"fecha\"));\n c.setHora(rs.getString(\"hora\"));\n c.setTel(rs.getString(\"tel\"));\n c.setCorreo(rs.getString(\"correo\"));\n c.setGenero(rs.getString(\"genero\"));\n c.setMotivo(rs.getString(\"motivo\"));\n c.setSintomas(rs.getString(\"sintomas\"));\n } \n }catch (SQLException ex) {\n ex.printStackTrace();\n }\n return c;\n }", "public Employee(int id, String firstName, String lastName, String company) {\n this(firstName, lastName, company);\n\n this.id = id;\n }" ]
[ "0.6599532", "0.652831", "0.62332904", "0.6106619", "0.60000956", "0.5857791", "0.57927316", "0.5760283", "0.57229656", "0.57003194", "0.5681889", "0.5651635", "0.55579793", "0.5556354", "0.55441946", "0.55359167", "0.5490356", "0.5485772", "0.5471904", "0.5466683", "0.5451767", "0.544014", "0.5424449", "0.5377473", "0.5370174", "0.5341179", "0.53269196", "0.53246826", "0.5309815", "0.53006226", "0.5294859", "0.5232085", "0.52292806", "0.52273345", "0.5212889", "0.5173242", "0.51720244", "0.515815", "0.51552624", "0.5153579", "0.5147575", "0.5123173", "0.5085594", "0.50841117", "0.507532", "0.50702864", "0.50617826", "0.50492316", "0.5038688", "0.5038664", "0.5012213", "0.50080514", "0.4995984", "0.49915153", "0.49852154", "0.49704754", "0.4964611", "0.4961208", "0.49576223", "0.49566704", "0.4949271", "0.49488482", "0.49434173", "0.49366438", "0.4936184", "0.49347427", "0.49271184", "0.4920921", "0.49136046", "0.49062988", "0.49055153", "0.48979455", "0.48914683", "0.4889955", "0.48788488", "0.4877466", "0.48769057", "0.48738304", "0.48733726", "0.48687652", "0.4868144", "0.48650977", "0.4845057", "0.4842502", "0.4838568", "0.48356104", "0.48319373", "0.48271787", "0.4825395", "0.48250976", "0.48239583", "0.48222104", "0.48121458", "0.4811948", "0.4807638", "0.4805721", "0.48036245", "0.47928602", "0.47905225", "0.47867566" ]
0.74898857
0
Returns the ID of the crime.
public UUID getId() { return mId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int get_crimeid() {\r\n return _crimeid;\r\n }", "public int getCineplexID() {\n return cineplexID;\n }", "public int getId() {\n return decision.getConsensusId();\n }", "public int getCodiceID() \r\n\t\t{\r\n\t\t\treturn CodiceID;\r\n\t\t}", "public Crime() {\n mId = UUID.randomUUID();\n mDate = new Date();\n }", "public String getCinemaId() {\n return sharedPreferences.getString(CINEMA_ID, \"\");\n }", "Integer getID();", "Integer getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "public int getCinemaID() {\n return cinemaID;\n }", "public int getCuisineID() {\n return cuisineID;\n }", "public Integer getCid() {\n return cid;\n }", "public Integer getCid() {\n return cid;\n }", "@Override\n\tpublic int getID()\n\t{\n\t\treturn Main.creaPersonaggio;\n\t}", "public Crime getCrime(UUID id) {\n CrimeCursorWrapper cursor = queryCrimes(CrimeTable.Cols.UUID + \" = ?\",\n new String[] {id.toString() }\n );\n\n try {\n if(cursor.getCount() == 0){\n return null;\n }\n\n cursor.moveToFirst();\n return cursor.getCrime();\n }\n finally {\n cursor.close();\n }\n }", "public Crime getCrime(UUID id) {\n for (Crime crime : mCrimes) {\n if (crime.getId().equals(id)) {\n return crime;\n }\n }\n return null;\n }", "String getID();", "String getID();", "String getID();", "String getID();", "public String getCid() {\n return cid;\n }", "public Number getID();", "String getIdNumber();", "java.lang.String getID();", "Integer getId();", "Integer getId();", "Integer getId();", "Integer getCCPID();", "public Integer getcId() {\n return cId;\n }", "String getCampoId();", "UUID getInitiativeId();", "public long getID();", "public String getMaternalID();", "public int CCID() {\n\t\treturn this.creditCardIDNum;\n\t}", "@Id\n @GeneratedValue(strategy = GenerationType.AUTO)\n public Integer getCid() {\n return cid;\n }", "@Ignore\n public Crime(UUID id) {\n mId = id;\n mDate = new Date();\n }", "protected String getCourseID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_COURSE, null);\n }", "public abstract java.lang.Long getId_causal_peticion();", "public java.lang.Integer getCare_id();", "int getMyId();", "public int getId(){\n if (ID != null) {\n int i = Integer.parseInt(ID);\n return i;\n }\n return 0;\n }", "public void obtenerID();", "public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}", "public Integer getCrowdId() {\n return crowdId;\n }", "public String getCpnID() {\n\t\treturn this.CpnID;\n\t}", "int getDoctorId();", "int getDoctorId();", "public abstract Integer getCompteId();", "AtomID ID();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public int getID();", "public int getID();", "public int getID();", "public String getCateId() {\n return cateId;\n }", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();" ]
[ "0.76215607", "0.675135", "0.67498934", "0.66715413", "0.662156", "0.6611651", "0.6610218", "0.6610218", "0.6558657", "0.6558657", "0.6558657", "0.6558657", "0.6558657", "0.6558657", "0.6558657", "0.6558657", "0.6558657", "0.6558657", "0.6558657", "0.6539704", "0.65336424", "0.65317357", "0.65317357", "0.6505389", "0.6484525", "0.64751846", "0.6389462", "0.6389462", "0.6389462", "0.6389462", "0.63719994", "0.6335473", "0.63328147", "0.63253534", "0.6316557", "0.6316557", "0.6316557", "0.63085204", "0.6305919", "0.63018787", "0.62968105", "0.62910366", "0.6267258", "0.62569773", "0.6243565", "0.6217387", "0.6200785", "0.61930317", "0.61894786", "0.6185309", "0.61604005", "0.6155588", "0.6152026", "0.61472327", "0.614645", "0.6131628", "0.6131628", "0.612898", "0.6123675", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6088076", "0.6073256", "0.6073256", "0.6073256", "0.6068994", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615", "0.60618615" ]
0.0
-1
Returns the title of the crime.
public String getTitle() { return mTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "String title();", "String title();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "public java.lang.String getTitle();", "IDisplayString getTitle();", "public String getTitle()\n {\n return (this.title);\n }", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle() {\n \t\treturn title;\n \t}", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public String title()\n\t{\n\t\treturn title;\n\t}", "public String getTitle()\n {\n return title;\n }", "public String getTitle()\r\n {\r\n return title;\r\n }", "public String getTitle()\r\n {\r\n return title;\r\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "@ObjectSupport public final String title() {\n return title==null\n ? title = createTitle()\n : title;\n }", "public String getTitle()\r\n\t{\r\n\t\treturn TITLE;\r\n\t}", "@NotNull\n String getTitle();", "public String getTitle() \r\n\t{\r\n\t\treturn this.title;\r\n\t}", "public String getTitle() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_TITLE);\r\n }", "public String getTitle(){\n\n\t\treturn title;\n\t}", "public String getTitle()\n {\n return title;\n }", "public String getTitle()\n {\n return title;\n }", "public String getTitle()\n {\n return title;\n }", "public String getTitle()\n {\n return title;\n }", "public String getTitle()\n {\n return title;\n }", "public String getTitle()\n {\n return title;\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle()\n {\n return m_title;\n }", "public String getTitle()\n {\n return name;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }" ]
[ "0.74641323", "0.74641323", "0.74641323", "0.74641323", "0.74641323", "0.7437632", "0.7437632", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.7394217", "0.73752075", "0.7206885", "0.7177337", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7108646", "0.7097973", "0.7097973", "0.708829", "0.70780295", "0.7065966", "0.7053474", "0.7047997", "0.7044651", "0.7044651", "0.70430183", "0.70430183", "0.70430183", "0.7035007", "0.70273787", "0.70194703", "0.7019322", "0.70177597", "0.70145214", "0.6985635", "0.6985635", "0.6985635", "0.6985635", "0.6985635", "0.6985635", "0.69670045", "0.69670045", "0.69670045", "0.69670045", "0.69670045", "0.69670045", "0.69670045", "0.69661695", "0.69661695", "0.69661695", "0.69661695", "0.69661695", "0.69661695", "0.69661695", "0.69620097", "0.69600564", "0.69596", "0.69596", "0.69596", "0.69596", "0.69596", "0.6959291", "0.69539326", "0.69539326", "0.69539326", "0.69539326", "0.69539326", "0.69539326", "0.69539326", "0.69539326", "0.69539326", "0.69539326", "0.69539326", "0.69539326" ]
0.0
-1
Sets the title of the crime.
public void setTitle(String title) { mTitle = title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(java.lang.String title);", "public void setTitle(String title) { this.title = title; }", "public void setTitle(String title) {\r\n _title = title;\r\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(Title title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\n mTitle = title;\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title)\n {\n mTitle = title;\n }", "public void setTitle(String title){\n this.title = title;\n }", "public void setTitle(String title){\n \tthis.title = title;\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "void setTitle(java.lang.String title);", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title){\n\t\tthis.title = title;\n\t}", "@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "protected void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title)\n\t{\n\t\tthis.title = title;\n\t}", "@Override\r\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title; \n\t}", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "@Override\n public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n\tthis.title = title;\n}", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "public void setTitle(String newTitle)\r\n {\r\n title = newTitle;\r\n }", "public void setTitle(final String title)\n {\n this.title = title;\n }", "public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }", "public void setTitle( String title ) {\n\t\t_title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(final String title) {\n this.title = title;\n }", "public void setTitle_(String title_) {\n this.title_ = title_;\n }", "public void setTitle(java.lang.String title)\n {\n this.title = title;\n }", "protected void SetTitle(String newTitle){ title = newTitle; }", "private void setTitle(String userTitle){\n title = userTitle;\n }", "public void setTitle(Title Title) {\n\t\ttitle = Title;\n\t}", "@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_esfTournament.setTitle(title);\n\t}", "public void setTitle(final String title) {\n\t\tthis.title = title;\n\t}", "public void doSetTitle(String newTitle) \n {\n this.title = newTitle;\n }", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_scienceApp.setTitle(title);\n\t}", "void setTitle(@NonNull String title);", "public void setTitle(String strTitle) { m_strTitle = strTitle; }", "private void setWindowTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title){\n lblTitle.setText(title);\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n impl.setTitle(getElement(),legend, title);\r\n }", "public void setTitle(java.lang.Object title) {\n this.title = title;\n }", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_candidate.setTitle(title);\n\t}", "public void setTitle(String mTitle) {\n this.mTitle = mTitle;\n }", "public void setTitle(java.lang.String value) {\n this.title = value;\n }", "@Override\n\tpublic void setTitle(String title) {\n\t\tmodel.setTitle(title);\n\t}" ]
[ "0.7904788", "0.7904788", "0.7904788", "0.7886692", "0.78826654", "0.78775513", "0.78597736", "0.78597736", "0.78597736", "0.7858919", "0.7853336", "0.7851291", "0.7851291", "0.78510034", "0.7844868", "0.78416216", "0.7837412", "0.7837412", "0.7831039", "0.7828071", "0.7828071", "0.7828071", "0.7828071", "0.78227186", "0.78221", "0.78214115", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.7817015", "0.78021854", "0.77920336", "0.77845323", "0.77845323", "0.77845323", "0.77845323", "0.77845323", "0.77742946", "0.7769924", "0.77619964", "0.7761312", "0.77609754", "0.77609754", "0.77609754", "0.77609754", "0.77609754", "0.7731814", "0.7731032", "0.7725889", "0.77256984", "0.77224404", "0.7714316", "0.77139896", "0.7711173", "0.7711173", "0.7711173", "0.7711173", "0.7711173", "0.7711173", "0.7711173", "0.7711173", "0.7711173", "0.76641196", "0.7659285", "0.76576173", "0.7651553", "0.76414007", "0.7611706", "0.7610116", "0.7607373", "0.7607373", "0.7607373", "0.75913405", "0.7570998", "0.75703615", "0.7553507", "0.75205845", "0.7509194", "0.75028527", "0.7486368", "0.7477215", "0.74392116", "0.74294794", "0.74237096", "0.74186283", "0.7413439" ]
0.7794694
45
Returns the date of the crime as a Date object.
public Date getDate() { return mDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}", "Date getDate();", "Date getDate();", "Date getDate();", "final public synchronized Date getDate() {\n return new Date(crtime) ;\n }", "public static Date date() {\n GregorianCalendar cal = new GregorianCalendar();\n return cal.getTime();\n }", "public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }", "public java.util.Date getCivDate () {\n\t\treturn civDate;\n\t}", "LocalDate getDate();", "public CustomDate getDate() {\n return new CustomDate(date.getTime());\n }", "public Date GetDate();", "Date getFechaNacimiento();", "public Date date (){\r\n\t\t\treturn _date;\r\n\t\t}", "public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}", "public java.util.Date getDate() {\n\t}", "public Date getDate()\n\t{\n\t\treturn date;\n\t}", "public java.sql.Date getDateassemb() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"dateassemb\")));\n }", "public Date() {\r\n\t\tGregorianCalendar c = new GregorianCalendar();\r\n\t\tmonth = c.get(Calendar.MONTH) + 1; // our month starts from 1\r\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\r\n\t\tyear = c.get(Calendar.YEAR);\r\n\t}", "public Date getCommencDate() {\n return commencDate;\n }", "Date getEDate();", "public Date getAccessionDateDate() {\n\t\tString t = doc.get(\"collaccessiondate\");\n\n\t\tif (t == null)\n\t\t\treturn null;\n\n\t\ttry {\n\t\t\t// Stored in the form 20090207080305\n\t\t\treturn new Date(DateFieldTools.stringToTime(t));\n\t\t} catch (Throwable e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic Calendar getDate(){\n\t\treturn date;\n\t}", "public String Get_date() \n {\n \n return date;\n }", "public Date getAsDate()\n {\n // Nope, shouldn't do that\n if (isASAP() || isNEVER()) {\n return null;\n }\n\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return new Date((itsValue - DUTC.get() * 1000000L - 3506716800000000L) / 1000L);\n }", "public Date date()\n\t{\n\t\treturn this.date;\n\t}", "public java.util.Calendar getDate() {\n return date;\n }", "public java.util.Calendar getDate() {\n return date;\n }", "public Date getDate(){\n\t\treturn date;\n\t}", "public Date getCHEQUE_DATE() {\r\n return CHEQUE_DATE;\r\n }", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "public Date getDate() {\n\t\n\t\treturn date;\n\t\n\t}", "public Date getDate()\n {\n return date;\n }", "Date getForDate();", "public Calendar getDate()\n {\n return date;\n }", "public Date getDate() {\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n calendar.set(Calendar.YEAR, year);\n calendar.set(Calendar.MONTH, month - 1); // MONTH is zero based\n calendar.set(Calendar.DAY_OF_MONTH, day);\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n return calendar.getTime();\n }", "public Date date() {\r\n\t\treturn date;\r\n\t}", "public Calendar getDate() {\n\treturn date;\n }", "public Date getDate() {\r\n\t\treturn date;\r\n\t}", "public Date getDate() {\r\n\t\treturn date;\r\n\t}", "public Date getCadastro() {\n\n\t\treturn this.cadastro;\n\t}", "public Date getDate() {\n\t\treturn date;\n\t}", "public Date getDate() {\n\t\treturn date;\n\t}", "Date getCreateDate();", "Date getCreateDate();", "public Date getDate() {\n return date;\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getCreDate() {\n return creDate;\n }", "public GregorianCalendar getDate() { return date; }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Calendar getDate() {\n\t\treturn date;\n\t}", "public Calendar getDate() {\r\n\t\treturn date;\r\n\t}", "public Date getCtDate() {\n return ctDate;\n }", "public LocalDate getDate() {\n return date;\n }", "public LocalDate getDate() {\n return date;\n }", "public LocalDate getDate() {\n return date;\n }", "@Override\n public Date getDate() {\n return date;\n }", "public Date getDateDembauche () {\n return dateEmbauche.copie();\n }", "public Date getDate() {\n\t\treturn date_;\n\t}", "public Date getDate() {\n if (mDate != null) {\n return (Date) mDate.clone();\n } else {\n Logger.d(TAG, \"The mDate is null\");\n return null;\n }\n }", "public Date getDate() {\n if (mDate != null) {\n return (Date) mDate.clone();\n } else {\n Logger.d(TAG, \"The mDate is null\");\n return null;\n }\n }", "public Date getDate() {\n\t\treturn _date;\n\t}", "public Calendar getDate()\n {\n return this.dateOfCreation;\n }", "public java.util.Date toDate() {\n return toCalendar().getTime();\n }", "public java.sql.Date getDatepr() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"datepr\")));\n }", "public Calendar getDate(){\n return date;\n }", "public Date getDate()\n {\n return this.date;\n }", "public Calendar getDate() {\n\n\t\treturn _date;\n\t}", "public LocalDate getDate() {\n\t\treturn this.date;\n\t}", "public static String getDate()\n {\n Date date = new Date();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n return dateFormat.format(date);\n }", "public Date getDate() {\r\n\t\treturn this.date;\r\n\t}", "String getDate();", "String getDate();", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "ValuationDate getValuationDate();", "java.lang.String getDate();", "LocalDate getDateOfBirth();", "public int getDate() {\n return date ;\n }", "public Date getIssuanceDate() {\n return (Date) getAttributeInternal(ISSUANCEDATE);\n }", "Date date(LocalDate date);", "public long getDate() {\n return date;\n }", "public Date getGioBatDau();", "com.google.type.Date getAcquireDate();", "Date getBirthDate();", "public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }" ]
[ "0.7180956", "0.7079284", "0.7079284", "0.7079284", "0.7023979", "0.6885063", "0.6747182", "0.6621712", "0.6590226", "0.6566926", "0.6497039", "0.6475076", "0.64731884", "0.64222807", "0.63638544", "0.6356835", "0.63560647", "0.6335493", "0.6312403", "0.6308921", "0.6295867", "0.6284457", "0.62715304", "0.62678933", "0.6266776", "0.6265422", "0.6265422", "0.62504053", "0.62437445", "0.62418467", "0.6206106", "0.62034774", "0.62034327", "0.618078", "0.61595136", "0.61561745", "0.6147588", "0.6146089", "0.6146089", "0.61372787", "0.61299706", "0.61299706", "0.6126223", "0.6126223", "0.61181533", "0.61180514", "0.61180514", "0.61180514", "0.6117129", "0.61086535", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.61040986", "0.60933626", "0.6092999", "0.60795265", "0.6069834", "0.6066171", "0.6066171", "0.6057076", "0.6052025", "0.60518557", "0.6049564", "0.6049564", "0.6046672", "0.6041034", "0.6036282", "0.60310745", "0.6025954", "0.60181993", "0.6015652", "0.6011015", "0.6008307", "0.60077983", "0.6007296", "0.6007296", "0.6003161", "0.6003161", "0.6000152", "0.5987512", "0.5987402", "0.59866387", "0.5985993", "0.5984549", "0.598407", "0.5982621", "0.5978361", "0.5974573", "0.5964371" ]
0.6009489
83
Returns the date of the crime as a String object. The format depends on the locale of the device.
public String getDateString() { DateFormat format = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault()); return format.format(mDate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "public String dateToString() {\n\t\treturn new String(year + \"/\"\n\t\t\t\t+ month + \"/\"\n\t\t\t\t+ day);\n }", "public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}", "public String getStringDate(){\n String finalDate = \"\";\n Locale usersLocale = Locale.getDefault();\n DateFormatSymbols dfs = new DateFormatSymbols(usersLocale);\n String weekdays[] = dfs.getWeekdays();\n int day = date.get(Calendar.DAY_OF_WEEK);\n String nameOfDay = weekdays[day];\n\n finalDate += nameOfDay + \" \" + date.get(Calendar.DAY_OF_MONTH) + \", \";\n\n String months[] = dfs.getMonths();\n int month = date.get(Calendar.MONTH);\n String nameOfMonth = months[month];\n\n finalDate += nameOfMonth + \", \" + date.get(Calendar.YEAR);\n\n return finalDate;\n }", "java.lang.String getDate();", "String getDate();", "String getDate();", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }", "public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }", "public String toString() {\r\n String date = month + \"/\" + day;\r\n return date;\r\n }", "public static String getDate()\n {\n Date date = new Date();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n return dateFormat.format(date);\n }", "public static String getDate() {\n return getDate(DateUtils.BASE_DATE_FORMAT);\n }", "public String getEntryDateString() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy MMM dd\");\n return sdf.format(entryDate.getTime());\n }", "public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}", "public String getDataNascimentoString() {\r\n\r\n\t\tSimpleDateFormat data = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\treturn data.format(this.dataNascimento.getTime());\r\n\r\n\t}", "public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public String getEmotionDate() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\", Locale.CANADA);\n return dateFormat.format(emotionDate);\n }", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\t\tDate date = formatter.parse(month + \"/\" + day + \"/\" + year);\n\n\t\t\treturn formatter.format(date);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public String getDate(){\n\t\treturn toString();\n\t}", "public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "public String Get_date() \n {\n \n return date;\n }", "public String toString() {\r\n\t\treturn String.format(\"%02d/%02d/%02d\", month, day, year);\r\n\r\n\t}", "public String toString() {\n\t\treturn String.format(\"%d/%d/%d\", year, month, day);\n\t}", "public String getDataNastereString(){\n\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tString sd = df.format(new Date(data_nastere.getTime()));\n\t\treturn sd;\n\t\t\n\t}", "public String toString() {\n\treturn String.format(\"%d/%d/%d\", year, month, day);\t\r\n\t}", "public static String getTimeString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss yyyy\");\n return formatter.format(new java.util.Date());\n }", "java.lang.String getToDate();", "public String toStringDateOfBirth() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\treturn dateofbirth.format(format);\n\t}", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "public String retornaData(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn df.format(calendar.getTime());\n\t}", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "public String getSystemDate() {\n\t\tDate date = new Date();\n\t\treturn date.toString();\n\t}", "protected final static String getDateStamp() {\n\n\t\treturn\n\n\t\tnew SimpleDateFormat(\"MMM d, yyyy h:mm:ss a zzz\").format(new Date());\n\n\t}", "public String getDateString(Date date) {\n Calendar cal = Calendar.getInstance();\n\n cal.setTime(date);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n return year + month + day;\n }", "public String getDateFormate() {\n return mDateFormat;\n }", "public String getDate() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn sdf.format(txtDate.getDate());\n\t}", "public String getDate()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"EE d MMM yyyy\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "public java.lang.String getDate() {\n return date;\n }", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "public String toString() {\n\t\t\treturn month + \"/\" + day + \"/\" + year;\n\t\t}", "public String getFecha() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }", "public String getFechaSistema() {\n Date date = new Date();\n DateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n //Aplicamos el formato al objeto Date y el resultado se\n //lo pasamos a la variable String\n fechaSistema = formato.format(date);\n \n return fechaSistema;\n }", "public String getFormatDate() {\n String formatDate = servletRequest.getHeader(ConstantsCustomers.CUSTOMER_FORMAT_DATE);\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = jwtTokenUtil.getFormatDateFromToken();\n }\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = ConstantsCustomers.APP_DATE_FORMAT_ES;\n }\n return formatDate;\n }", "public String getPrintFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "public String toString(){\n\t\t\n\t\treturn month+\"/\"+day+\"/\"+year;\n\t}", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "public String getFecha(){\r\n return fechaInicial.get(Calendar.DAY_OF_MONTH)+\"/\"+(fechaInicial.get(Calendar.MONTH)+1)+\"/\"+fechaInicial.get(Calendar.YEAR);\r\n }", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }", "public static String currentdate() {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tDate date = new Date();\n\t\treturn dateFormat.format(date);\n\n\t}", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}", "public String getArticleDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMM dd, yyyy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public String getCitationString() {\n\t\tDate date = mostRecentVersion;\n\t\tif (date == null) {\n\t\t\tdate = new Date();\n\t\t}\n\t\treturn yearFormat.format(date) + \". \";\n\t}", "protected String getRentDateString() { return \"\" + dateFormat.format(this.rentDate); }", "protected String getDateString() {\n String result = null;\n if (!suppressDate) {\n result = currentDateStr;\n }\n return result;\n }", "public String date() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public String getDate() {\n return date;\n }", "public static String getStandardDate(Date date){\n\t\t\n\t\tif(date == null)\n\t\t\tthrow new RuntimeException(\"Given date object is null...\");\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\treturn format.format(date.getTime());\n\t}", "public String getDate() {\r\n return date;\r\n }", "public String getDateCreatedAsString() {\n return dateCreated.toString(\"MM/dd/yyyy\");\n }", "public static String dateOnly() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}", "public static java.lang.String getDateFormat() {\r\n\t\treturn getDBLayer().getDateFormat();\r\n\t}", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public static String currentDate() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public static String getCurrentDate() {\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate dateobj = new Date();\n\t\treturn df.format(dateobj);\n\t}", "public static String getDate(Date date)\n\t{\n\t\treturn getFormatString(date, getDateFormat());\n\t}", "public String toString() {\n synchronized (FORMATTER) {\n return FORMATTER.format(_calendar.getTime());\n }\n }", "public String toString(){\n\t\tString result = Integer.toString(day) + \" \";\n\t\tswitch (month){\n\t\t\tcase 1:\n\t\t\t\tresult += \"January, \";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tresult += \"February, \";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tresult += \"March, \";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tresult += \"April, \";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tresult += \"May, \";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tresult += \"June, \";\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tresult += \"July, \";\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tresult += \"August, \";\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tresult += \"September, \";\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tresult += \"October, \";\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tresult += \"November, \";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tresult += \"December, \";\n\t\t\t\tbreak;\n\t\t}\n\t\tresult += Integer.toString((year / 10 % 10)) + Integer.toString((year % 10));\n\n\t\treturn result;\n\t}", "public String getFormatedDate() {\n DateFormat displayFormat = new SimpleDateFormat(\"EEEE', ' dd. MMMM yyyy\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public final String obtenerFechaFormateada() {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\");\n return fechaDeLaVisita.get().format(formatter);\n }", "public static String getDate() {\n\t\tString\ttoday=\"\";\n\n\t\tCalendar Datenow=Calendar.getInstance();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t today = formatter.format(Datenow.getTime());\n\n\t return today;\n\t}", "public String convertDateToString(Date date) {\n\t\tString dateTime = SDF.format(date);\n\t\treturn dateTime;\t\n\t}", "private String createDate(){\n SimpleDateFormat date = new SimpleDateFormat(\"EEE, MMM d, yyyy\");\n String stringDate = date.format(new Date()); \n return stringDate;\n }", "public String getDate() {\r\n\t\treturn date;\r\n\t}", "public static String getSystemDate()\n {\n\t DateFormat dateFormat= new SimpleDateFormat(\"_ddMMyyyy_HHmmss\");\n\t Date date = new Date();\n\t return dateFormat.format(date);\n }", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}", "public String getCurrentDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "@Override\n public String toString() {\n // Jahr, immer 4-stellig (führenden Nullen)\n String j = String.format(\"%04d\", jahr());\n\n // Monat, immer 2-stellig (führende Null)\n String m = String.format(\"%02d\", monat());\n\n // Tag, immer 2-stellig (führende Null)\n String t = String.format(\"%02d\", tag());\n\n // Trennzeichen (char -> String für String.join())\n String tz = String.valueOf(separator);\n\n // Setzt Datum entsprechend dem festgelegten format zusammen\n String datum = switch (format) {\n case \"jmt\" -> String.join(tz, j, m, t);\n case \"tmj\" -> String.join(tz, t, m, j);\n case \"mtj\" -> String.join(tz, m, t, j);\n default -> \"Usage: jmt/tmj/mtj\";\n };\n return datum;\n }", "public String getFechaEntrada(){\n\t\treturn fecha.substring(0,10);\n\t}", "public String getDate() {\n\t\treturn date;\n\t}", "public String getDate() {\n\t\treturn date;\n\t}", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "@Override\r\n public String toString() {\r\n \r\n DateFormat data = DateFormat.getDateInstance();\r\n return \"Nome: \" + getNome()+ \" \\nCPF: \" + getCpf() + \" \\nTelefone: \"\r\n + getTelefone() + \" \\nData de Nascimento : \" + data.format(getDataNasc())\r\n + \" \\nSexo: \" + getSexo();\r\n }", "private String getDate(Calendar c) {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(EventHelper.getMonth(c));\n\t\tsb.append(\" \");\n\t\tsb.append(EventHelper.getDate(c));\n\t\t\n\t\treturn sb.toString();\n\t\t\n\t}", "public static String getDate()\r\n {\r\n Date now = new Date();\r\n DateFormat df = new SimpleDateFormat (\"yyyy-MM-dd'T'hh-mm-ss\");\r\n String currentTime = df.format(now);\r\n return currentTime; \r\n \r\n }", "public static String dateToString(Date date){\r\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n return df.format(date);\r\n }", "public String toDate(Date date) {\n DateFormat df = DateFormat.getDateInstance();\r\n String fecha = df.format(date);\r\n return fecha;\r\n }" ]
[ "0.74333197", "0.738239", "0.7201604", "0.71782905", "0.71396786", "0.70778084", "0.7068027", "0.7068027", "0.69936246", "0.6959156", "0.69274306", "0.68812096", "0.6814885", "0.68098885", "0.68039525", "0.6785859", "0.6738962", "0.66972536", "0.6682731", "0.66809577", "0.6648894", "0.66316354", "0.66089094", "0.6594319", "0.6580666", "0.6573002", "0.6570862", "0.6519382", "0.65168667", "0.65163416", "0.65118206", "0.6505962", "0.6502334", "0.6500625", "0.64926404", "0.64807105", "0.6458353", "0.64343286", "0.64229727", "0.64155674", "0.64113116", "0.64007276", "0.6388997", "0.6371107", "0.63701326", "0.63660365", "0.63612616", "0.6355876", "0.6349604", "0.63304156", "0.6310062", "0.6307655", "0.6286556", "0.6286556", "0.628178", "0.62670314", "0.6255302", "0.6255189", "0.6252182", "0.62485886", "0.62455094", "0.62417656", "0.62391794", "0.6238283", "0.6235218", "0.62308776", "0.6227382", "0.62269104", "0.6225097", "0.6224412", "0.6219528", "0.6219528", "0.6219528", "0.6219528", "0.6219528", "0.62137485", "0.6212683", "0.6211998", "0.621079", "0.62105435", "0.6206482", "0.61947644", "0.6193355", "0.61888564", "0.6184252", "0.618373", "0.6181107", "0.6178181", "0.61665994", "0.6164625", "0.6162481", "0.6157955", "0.61564076", "0.61564076", "0.6145358", "0.61451447", "0.61366796", "0.6135001", "0.6121732", "0.61177826" ]
0.73744535
2
Returns the time of the crime as a String object. The example format is 23:59.
public String getTimeString() { DateFormat format = new SimpleDateFormat("HH:mm"); return format.format(mDate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }", "public static String getTime()\n {\n Date time = new Date();\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return timeFormat.format(time);\n }", "public String getTimeInString() {\n int minutes = (time % 3600) / 60;\n int seconds = time % 60;\n String timeString = String.format(\"%02d:%02d\", minutes, seconds);\n\n return timeString;\n }", "java.lang.String getTime();", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "public String getTime() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString time = dateFormat.format(cal.getTime());\n\t\t\treturn time;\n\t\t}", "public String getTime() {\n return String.format(\"%02d\", hours) + \":\" + String.format(\"%02d\", minutes);\n }", "public String getTime(){\r\n\t\tDate date = new GregorianCalendar().getTime();\r\n\r\n\t\tString time= new SimpleDateFormat(\"HH:mm:ss\").format(date.getTime());\r\n\t\t\r\n\t\treturn time;\r\n\t}", "static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}", "public String getTimeString() {\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n\n String AM_PM = \"PM\";\n if (date.get(Calendar.AM_PM) == Calendar.AM) AM_PM = \"AM\";\n\n String hour_fixed = String.valueOf(hour);\n if (hour == 0) hour_fixed = \"12\";\n\n String minute_fixed = String.valueOf(minute);\n while (minute_fixed.length() < 2) {\n minute_fixed = \"0\" + minute_fixed;\n }\n\n return hour_fixed + \":\" + minute_fixed + ' ' + AM_PM;\n }", "public String toString() {\n if (time != null) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n return time.format(formatter);\n } else {\n return \"INVALID TIME\";\n }\n }", "public String getTime(){\r\n String time = \"\";\r\n return time;\r\n }", "public String getTimeString() {\n // Converts slot to the minute it starts in the day\n int slotTimeMins =\n SlopeManagerApplication.OPENING_TIME * 60 + SESSION_LENGTHS_MINS * getSlot();\n\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, slotTimeMins/60);\n cal.set(Calendar.MINUTE, slotTimeMins % 60);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm\");\n return sdf.format(cal.getTime());\n }", "public String timeToString() {\n\t\tString start = \"\";\n\t\tString hmSep = \":\";\n\t\tString msSep = \":\";\n\t\tif (hour < 10)\n\t\t\tstart = new String(\"0\");\n\t\tif (minute < 10)\n\t\t\thmSep = new String(\":0\");\n\t\tif (second < 10)\n\t\t\tmsSep = new String(\":0\");\n\t\treturn new String(start\n\t\t\t\t+ hour + hmSep\n\t\t\t\t+ minute + msSep\n\t\t\t\t+ second);\n\t}", "public String getTime() {\n return time;\n }", "public static String time(int time) {\n return time((long)time);\n }", "public String getTime() {\r\n\t\treturn time;\r\n\t}", "public String getTime() {\n\t\treturn time;\n\t}", "public String getTimeString(){\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(hourPicker.getValue())\n .append(':')\n .append(minutePicker.getValue())\n .append(':')\n .append(secondsPicker.getValue())\n .append('.')\n .append(decimalPicker.getValue());\n return sBuilder.toString();\n }", "public String getTime() {\n boolean pastNoon = hour >= 12;\n if(pastNoon && hour == 12) {\n return hour + \"pm\";\n }\n else if(pastNoon) {\n return (hour - 12) + \"pm\";\n }\n else if(hour == 0) {\n return \"12am\";\n }\n else {\n return hour + \"am\";\n }\n }", "public String getTime() {\n return dateTime.format(c.getTime());\n }", "public String getTime() {\n String show = time;\n return show;\n }", "public String toString() {\n return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\n }", "public String getTime(){\n return time;\n }", "public String getTime() {\n return this.time;\n }", "public java.lang.String getTime () {\n\t\treturn time;\n\t}", "public String getNiceTime(){\n\t\treturn sTimeFormat.format(mTime);\n\t}", "@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}", "public String toString()\n {\n String output = new String();\n output = \"The time is \" + hour + \":\" + min + \":\" + sec + \"\\n\";\n return output;\n }", "public String getTime()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"HH:mm\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "public String getTime() {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\n String date = simpleDateFormat.format(new Date());\n return date;\n }", "public static String getTimeString(int t) {\n\t\tint hours = t / 3600;\n\t\tint minutes = (t / 60) % 60;\n\t\tint seconds = t % 60;\n\t\treturn (hours < 10 ? \"0\" : \"\")\n\t\t\t+ hours\n\t\t\t+ (minutes < 10 ? \":0\" : \":\")\n\t\t\t+ minutes\n\t\t\t+ (seconds < 10 ? \":0\" : \":\")\n\t\t\t+ seconds;\n\t}", "public String getTime() {\n\t}", "public static String TimeFormate() {\n\t\tString time;\n\t\tSimpleDateFormat dateFormat1 = new SimpleDateFormat();\n\t dateFormat1.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, 3);\n String n=dateFormat1.format(cal.getTime());\n //n=\"03/09/20 8:30 AM\";\n System.out.println(\"Full Date = \" +n);\n int colonindex=n.indexOf(\":\");\n //System.out.println(\": placed= \" +colonindex);\n //String tt =n.substring(colonindex, n.length());\n //System.out.println(\"tt= \" +tt);\n String tt1 =n.substring(colonindex-2,colonindex-1);\n System.out.println(\"tt1= \" +tt1);\n if(tt1.equals(\"1\")) {\n \t time=n.substring(colonindex-2, n.length());\n \t System.out.println(\"Time with two digits in hours= \" +time);\n }\n else {\n \t time=n.substring(colonindex-1, n.length());\n \t System.out.println(\"Time with one digit in hours= \" +time);\n }\n return time;\n\t}", "public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }", "public String toString() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // 4\n\t\tString hours = String.format(\"%02d\", this.hours);\n\t\tString minutes = String.format(\"%02d\", this.minutes);\n\t\tString seconds = String.format(\"%05.2f\", this.seconds);\n\n\t\tString time = hours + \":\" + minutes + \":\" + seconds;\n\t\treturn time;\n\t}", "private String getMinutesInTime(int time) {\n String hour = String.valueOf(time / 60);\n String minutes = String.valueOf(time % 60);\n\n if(minutes.length() < 2) {\n minutes = \"0\" + minutes;\n }\n\n return hour + \":\" + minutes;\n\n }", "public String toString() {\n return String.format(\"%d: %02d: %02d %s\",\n ((hour == 0 || hour == 12) ? 12 :hour % 12 ),\n minutes, seconds, (hour < 12 ? \"AM\" : \"PM\"));\n\n }", "public String getTime()\r\n\t{\r\n\t\treturn displayString;\r\n\t}", "public String getTime() {\n\t\treturn mTime;\n\t}", "public String getTime() {\n Date date = new Date();\n return (date.toString());\n }", "public String getFormatedTime() {\n DateFormat displayFormat = new SimpleDateFormat(\"HH:mm\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "String getTime(){\n\t\tCalendar c = Calendar.getInstance();\n int mseconds = c.get(Calendar.MILLISECOND);\n String currentDateandTime = mDateFormat.format(new Date()) + String.format(\"-%04d\", mseconds);\n \n return currentDateandTime;\n\t}", "public synchronized String getTime() {\n\t\treturn time;\n\t}", "private static String time() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH-mm-ss \");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public String toString()\r\n {\r\n DecimalFormat twoDigits = new DecimalFormat( \"00\" );\r\n\r\n return ( this.getHour() == 12 || this.getHour() == 0 ?\r\n 12 : this.getHour() % 12 ) + \":\" +\r\n twoDigits.format( this.getMinute() ) + \":\" +\r\n twoDigits.format( this.getSecond() ) +\r\n ( this.getHour() < 12 ? \" AM\" : \" PM\" );\r\n }", "public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }", "public String toString(){\r\n String strout = \"\";\r\n strout = String.format(\"%02d:%02d\", this.getMinutes(), this.getSeconds());\r\n return strout;\r\n }", "Time getTime();", "public String getPrintFormattedTime() {\n return this.optionalTime.map(x -> x.format(DateTimeFormatter.ofPattern(\"HHmma\"))).orElse(\"\");\n }", "public String getCurrentTimeHourMinSec() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public String toString() {\n return hour+\" \"+minute;\r\n }", "private String getTime(Calendar c) {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(EventHelper.getTime(c));\n\t\tif (!sb.toString().equals(\"noon\")) {\n\t\t\tsb.append(\" \");\n\t\t\tsb.append(EventHelper.getAmPm(c));\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t\t\n\t}", "private String readableTime(Integer minutes) {\r\n String time = \"\";\r\n if (minutes / 60.0 > 1) {\r\n time = (minutes / 60) + \" hrs, \"\r\n + (minutes % 60) + \" min\";\r\n } else {\r\n time = minutes + \" min\";\r\n }\r\n return time;\r\n }", "public String getReadableCookTime() {\r\n if (recipe != null) {\r\n return readableTime(recipe.getCookTime());\r\n } else {\r\n return \"\";\r\n }\r\n }", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "public static String getNowTimeHHMM() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\t\treturn timeFormat.format(new Date());\n\t}", "public java.lang.String getTime() {\n java.lang.Object ref = time_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n time_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static String getHHMM()\r\n/* 74: */ {\r\n/* 75: 94 */ String nowTime = \"\";\r\n/* 76: 95 */ Date now = new Date();\r\n/* 77: 96 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 78: 97 */ nowTime = formatter.format(now);\r\n/* 79: 98 */ return nowTime;\r\n/* 80: */ }", "private static String getTime() {\n\t\tDate getDate = new Date();\n\t\tString timeFormat = \"M/d/yy hh:mma\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(timeFormat);\n\t\treturn \"[\" + sdf.format(getDate) + \"]\\t\";\n\t}", "public static String getTime(int second) {\n if (second < 10) {\n return \"00:00:0\" + second;\n }\n if (second < 60) {\n return \"00:00:\" + second;\n }\n if (second < 3600) {\n int minute = second / 60;\n second = second - minute * 60;\n if (minute < 10) {\n if (second < 10) {\n return \"00:\" + \"0\" + minute + \":0\" + second;\n }\n return \"00:\" + \"0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"00:\" + minute + \":0\" + second;\n }\n return \"00:\" + minute + \":\" + second;\n }\n int hour = second / 3600;\n int minute = (second - hour * 3600) / 60;\n second = second - hour * 3600 - minute * 60;\n if (hour < 10) {\n if (minute < 10) {\n if (second < 10) {\n return \"0\" + hour + \":0\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"0\" + hour + \":\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":\" + minute + \":\" + second;\n }\n if (minute < 10) {\n if (second < 10) {\n return hour + \":0\" + minute + \":0\" + second;\n }\n return hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return hour + \":\" + minute + \":0\" + second;\n }\n return hour + \":\" + minute + \":\" + second;\n }", "public String gameTimeToText()\n {\n // CALCULATE GAME TIME USING HOURS : MINUTES : SECONDS\n if ((startTime == null) || (endTime == null))\n return \"\";\n long timeInMillis = endTime.getTimeInMillis() - startTime.getTimeInMillis();\n return timeToText(timeInMillis);\n }", "public static String getTime() {\r\n\r\n\t\t//Gets current date and time\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tDate date = new Date();\r\n\t\tcurrDateTime = dateFormat.format(date);\r\n\t\treturn currDateTime;\r\n\t}", "@SimpleFunction(description = \"Gets the current time.\"\n + \"It is formatted correctly for iSENSE\")\n public String GetTime() {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n return sdf.format(cal.getTime()).toString();\n }", "public java.lang.String getTime() {\n java.lang.Object ref = time_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n time_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTimeString()\n\t{\n\t\treturn TimeUtils.getTimeString(this.timesCurrentMillis);\n\t}", "String formatTime(int time) {\r\n\t\tint h = time / 3600;\r\n\t\ttime %= 3600;\r\n\t\tint m = time / 60;\r\n\t\ttime %= 60;\r\n\t\tint s = time;\r\n\t\treturn String.format(\"%02d:%02d:%02d\", h, m, s);\r\n\t}", "public String toString() {\n\t\treturn hours + \"h\" + minutes + \"m\";\n\t}", "public static String getTimeString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss yyyy\");\n return formatter.format(new java.util.Date());\n }", "public String getFormattedTimeFromStart() {\r\n if (history.getNumberOfJumpsSoFar() == 0) {\r\n return \"00:00\";\r\n }\r\n\r\n double time = history.getTimeFromStart();\r\n double maxTime = 59.59;\r\n if (time < maxTime) {\r\n return String.format(\"%02d:%02d\", (int) (time % 60), (int) (time * 100 % 100));\r\n } else {\r\n return \"59:59\";\r\n }\r\n }", "public String getFormattedTime() {\n return formattedTime;\n }", "public java.lang.String getTime() {\n java.lang.Object ref = time_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n time_ = s;\n return s;\n }\n }", "public java.lang.String getTime() {\n java.lang.Object ref = time_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n time_ = s;\n return s;\n }\n }", "private String getDate() {\n\t\tSimpleDateFormat parseFormat = new SimpleDateFormat(\"hh:mm a\");\n\t\tDate date = new Date();\n\t\tString s = parseFormat.format(date);\n\t\treturn s;\n\t}", "public static String getNowTime(){\r\n\t\tDate date = new Date();\r\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tString time = format.format(date);\r\n\t\treturn time;\r\n\t}", "String getCurTime();", "@SuppressLint(\"SimpleDateFormat\")\n\tpublic static String getStringTime(Long time){\n\t\tSimpleDateFormat dateaf = new SimpleDateFormat(\"MM-dd\"); \n\t\tSimpleDateFormat timef = new SimpleDateFormat(\"HH:mm\"); \n\t\tString date = dateaf.format(time);\n\t\tString times = timef.format(time);\n\t\tString result = date+\" \"+times;\n\t\treturn result;\n\t}", "private String currentTime()\t{\n\t\tCalendar c = Calendar.getInstance(); \n\n\t\tString seconds;\n\t\tif(c.get(Calendar.SECOND) < 10)\t{\n\t\t\tseconds = \"0\"+Integer.toString(c.get(Calendar.SECOND));\n\t\t} else {\n\t\t\tseconds = Integer.toString(c.get(Calendar.SECOND));\n\t\t}\n\n\t\tString minutes;\n\t\tif(c.get(Calendar.MINUTE) < 10)\t{\n\t\t\tminutes = \"0\"+Integer.toString(c.get(Calendar.MINUTE));\n\t\t} else {\n\t\t\tminutes = Integer.toString(c.get(Calendar.MINUTE));\n\t\t}\n\n\t\tString hours;\n\t\tif(c.get(Calendar.HOUR_OF_DAY) < 10)\t{\n\t\t\thours = \"0\"+Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t} else {\n\t\t\thours = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t}\n\n\t\tString day;\n\t\tif(c.get(Calendar.DATE) < 10)\t{\n\t\t\tday = \"0\"+Integer.toString(c.get(Calendar.DATE));\n\t\t} else {\n\t\t\tday = Integer.toString(c.get(Calendar.DATE));\n\t\t}\n\n\t\tString month;\n\t\tif((c.get(Calendar.MONTH)+1) < 10)\t{\n\t\t\tmonth = \"0\"+Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t} else {\n\t\t\tmonth = Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t}\n\n\t\tString year;\n\t\tif(c.get(Calendar.YEAR) < 10)\t{\n\t\t\tyear = \"0\"+Integer.toString(c.get(Calendar.YEAR));\n\t\t} else {\n\t\t\tyear = Integer.toString(c.get(Calendar.YEAR));\n\t\t}\n\n\t\treturn day+\"/\"+month+\"/\"+year + \" \"+hours+\":\"+minutes+\":\"+seconds;\t\n\t}", "@Override\n\tpublic String toString() {\n\t\tLocalTime lT = LocalTime.of(hour, minute);\n\t\tDateTimeFormatter.ofPattern(\"hh:mm\").format(lT);\n\t\treturn lT.toString() + \" \" + timeType;\n\t}", "public String getHora() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n return sdf.format(calendario.getTime());\n }", "public String getTotalTime() {\r\n if (recipe != null) {\r\n return readableTime(recipe.getCookTime() + recipe.getPrepTime());\r\n } else {\r\n return \"\";\r\n }\r\n }", "java.lang.String getPlayTime();", "public static String time_str(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n return String.format(\"%02d:%02d:%02d\", hours, mins, secs);\n //return hoursMinutesSeconds(t);\n }", "public String toString()\n {\n return String.format(\"%d:%02d:%02d %s %d/%d/%d\", \n ((getHour() == 0 || getHour() == 12) ? 12 : getHour() % 12),\n getMinute(), getSecond(), (getHour() < 12 ? \"AM\" : \"PM\"), \n \tmonth, day, year);\n }", "public String getElapsedTimeHoursMinutesSecondsString(int milisec) {\n\t\t int time = milisec/1000;\n\t\t String seconds = Integer.toString((int)(time % 60)); \n\t\t String minutes = Integer.toString((int)((time % 3600) / 60)); \n\t\t String hours = Integer.toString((int)(time / 3600)); \n\t\t for (int i = 0; i < 2; i++) { \n\t\t if (seconds.length() < 2) { \n\t\t seconds = \"0\" + seconds; \n\t\t } \n\t\t if (minutes.length() < 2) { \n\t\t minutes = \"0\" + minutes; \n\t\t } \n\t\t if (hours.length() < 2) { \n\t\t hours = \"0\" + hours; \n\t\t } \n\t\t }\n\t\t String timeString = hours + \":\" + minutes + \":\" + seconds; \n\t\t return timeString;\n\t }", "public String toString () {\n String dayTime;\n\n if (isPM == true)\n dayTime = \"PM\";\n\n else\n dayTime = \"AM\";\n\n String hourString = String.format(\"%02d\", hour);\n String minString = String.format(\"%02d\", minute);\n return (hourString + \":\" + minString + \" \" + dayTime);\n }", "public String retornaHora(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat hora = new SimpleDateFormat(\"HH\");\n\t\tSimpleDateFormat minuto = new SimpleDateFormat(\"mm\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn hora.format(calendar.getTime()) + \"h\" + minuto.format(calendar.getTime());\n\t}", "public String TI()\n\t{\n\t\tDateTimeFormatter f = DateTimeFormatter.ofPattern(\"hh:mm a\");\n\t\tString ti = f.format(st);\n\t\tString ti2 = f.format(et);\n\t\treturn ti + \" - \" + ti2;\n \t}", "java.lang.String getArrivalTime();", "java.lang.String getArrivalTime();", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public static String formatTime(long time) {\n long tmp = time;\n int hour = (int) (time / 3600);\n tmp -= hour * 3600;\n int min = (int) (tmp / 60);\n int sec = (int) (tmp - min * 60);\n\n String hourText = hour < 10 ? \"0\" + hour : \"\" + hour;\n String minText = min < 10 ? \"0\" + min : \"\" + min;\n String secText = sec < 10 ? \"0\" + sec : \"\" + sec;\n\n\n return hourText + \":\" + minText + \":\" + secText;\n }", "public String calculateHour() {\n\t\tString hora;\n\t\tString min;\n\t\tString seg;\n\t\tString message;\n\t\tCalendar calendario = new GregorianCalendar();\n\t\tDate horaActual = new Date();\n\t\tcalendario.setTime(horaActual);\n\n\t\thora = calendario.get(Calendar.HOUR_OF_DAY) > 9 ? \"\" + calendario.get(Calendar.HOUR_OF_DAY)\n\t\t\t\t: \"0\" + calendario.get(Calendar.HOUR_OF_DAY);\n\t\tmin = calendario.get(Calendar.MINUTE) > 9 ? \"\" + calendario.get(Calendar.MINUTE)\n\t\t\t\t: \"0\" + calendario.get(Calendar.MINUTE);\n\t\tseg = calendario.get(Calendar.SECOND) > 9 ? \"\" + calendario.get(Calendar.SECOND)\n\t\t\t\t: \"0\" + calendario.get(Calendar.SECOND);\n\n\t\tmessage = hora + \":\" + min + \":\" + seg;\n\t\treturn message;\n\n\t}", "public int getTime() {\r\n return time;\r\n }", "public String getCurrentTimeHourMin() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public static String getTimeStamp() {\r\n\r\n\t\tlong now = (System.currentTimeMillis() - startTime) / 1000;\r\n\r\n\t\tlong hours = (now / (60 * 60)) % 24;\r\n\t\tnow -= (hours / (60 * 60)) % 24;\r\n\r\n\t\tlong minutes = (now / 60) % 60;\r\n\t\tnow -= (minutes / 60) % 60;\r\n\r\n\t\tlong seconds = now % 60;\r\n\r\n\t return String.format(\"%02d:%02d:%02d\", hours, minutes, seconds);\r\n\t}", "public String getDisplayValue()\n {\n\t\t\t\tString time_str;\n\t\t\t\tif (hours.getValue()<12&&minutes.getValue()<10) {\n time_str = \"0\" + hours.getValue()+ \": 0\" + minutes.getValue();\n }\n\t\t\t\tif (hours.getValue()<12) {\n time_str = \"0\" + hours.getValue()+ \": \" + minutes.getValue();\n } else if (minutes.getValue()<10) {\n time_str = hours.getValue()+\": 0\"+ minutes.getValue();\n } else {\n time_str = hours.getValue()+\":\"+ minutes.getValue();\n }\n\t\t\t\treturn time_str;\n }", "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }" ]
[ "0.7821647", "0.78085965", "0.7755939", "0.76641726", "0.7588905", "0.75016916", "0.7460997", "0.7404352", "0.7307479", "0.7275628", "0.7236121", "0.7234657", "0.71368134", "0.7124513", "0.711433", "0.7108794", "0.7070324", "0.7039515", "0.70260775", "0.70209116", "0.696509", "0.6962641", "0.69594145", "0.69562954", "0.6950358", "0.6947327", "0.69379634", "0.68941975", "0.6894143", "0.6871333", "0.68462485", "0.6820834", "0.68182886", "0.6800585", "0.6776702", "0.6774069", "0.675975", "0.6749553", "0.6737478", "0.67283195", "0.67267877", "0.6712122", "0.67107654", "0.6704648", "0.67031336", "0.6700962", "0.6697471", "0.66880476", "0.66755366", "0.66623986", "0.66533685", "0.66424364", "0.66279477", "0.6625338", "0.6608928", "0.6607591", "0.6602296", "0.65983033", "0.65976834", "0.65953577", "0.6593485", "0.6588874", "0.65505975", "0.6545379", "0.65450954", "0.6540356", "0.65312725", "0.6524018", "0.65201825", "0.64982206", "0.6489932", "0.6486042", "0.6482513", "0.6472839", "0.6472428", "0.64622957", "0.646034", "0.6429321", "0.6415334", "0.6396691", "0.6378657", "0.6373808", "0.6357168", "0.6342169", "0.63372904", "0.6327762", "0.6317071", "0.6314505", "0.6301202", "0.6301202", "0.6298547", "0.6298547", "0.6298547", "0.6291172", "0.6288576", "0.62809277", "0.6277335", "0.6276476", "0.6263531", "0.6263088" ]
0.73612106
8
Sets the date of the crime.
public void setDate(Date date) { mDate = date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void SetDate(Date date);", "public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "void setDate(Date data);", "public void setDate(final Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\r\n this.date = date;\r\n }", "public void setDate(Date date) {\n if (date != null) {\n this.mDate = (Date) date.clone();\n } else {\n Logger.d(TAG, \"The date is null\");\n }\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(int date){\n this.date = date;\n }", "public void setDate(Date date) {\n\t\tthis._date = date;\n\t}", "public void setDate(Date date) {\n\t\t\n\t\tdate_ = date;\n\t}", "public void setDate() {\n this.date = new Date();\n }", "public void setDate(Calendar date) {\n\tthis.date = date;\n }", "public void setDate(int dt) {\n date = dt;\n }", "public void setDate(Calendar date)\n {\n this.date = date;\n }", "public void setDate(Calendar date) {\r\n\t\tthis.date = date;\r\n\t}", "private void setCurrentDate(Date date)\n {\n date.setTime(System.currentTimeMillis());\n }", "public void setDate(Date date) {\n if (date != null) {\n this.mDate = (Date) date.clone();\n } else {\n this.mDate = null;\n }\n }", "public void setDate(Date date) {\n setDate(date, null);\n }", "public void setDate(long date) {\r\n\t\tthis.date = new Date(date);\r\n\t}", "void setBirthDate(Date birthDate);", "public void setDate(java.util.Calendar date) {\n this.date = date;\n }", "public void setDate(java.util.Calendar date) {\n this.date = date;\n }", "public void setDate(long date) {\n\t\tthis.date = date;\n\t}", "@Override\n\tprotected void setDate() {\n\n\t}", "public void updateDate()\n\t{\n\t\t// Translate year, month and day into a Date object.\n\t\tmDate = new GregorianCalendar(mYear, mMonth, mDay, mHour, mMin).getTime();\n\t\t\n\t\t// Update arguments to preserve selected value on rotation.\n\t\tgetArguments().putSerializable(CrimeFragment.EXTRA_DATE, mDate);\n\t}", "void setDate(java.lang.String date);", "private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}", "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public void setDate(DateInfo dates) {\r\n\t\tsuper.setDate(dates);\r\n\t\t//maturityDate = new DateInfo(dates);\r\n\t}", "public void setDate(String date) {\r\n this.date = date;\r\n }", "public void setDate(String date){\n this.date = date;\n }", "public void setDate(int m, int d, int y){\n\t\tday = d;\n\t\tyear =y;\n\t\tmonth = m;\n\t}", "public void setBirthday(Date birthday);", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setBirthDate(Date birthDate);", "public void setCHEQUE_DATE(Date CHEQUE_DATE) {\r\n this.CHEQUE_DATE = CHEQUE_DATE;\r\n }", "public void setDate(String date){\n this.date = date;\n }", "void setDateOfBirth(LocalDate dateOfBirth);", "public final void setDate(LocalDate date) {\n dateProperty().set(date);\n }", "public void setDate(int day,int month,int year){\n this.day=day;\n this.month=month;\n this.year=year;\n }", "void setCreateDate(Date date);", "public void setCommencDate(Date commencDate) {\n this.commencDate = commencDate;\n }", "public void setBirthdate(Date birthdate)\n {\n this.birthdate = birthdate;\n }", "private void initializeDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear = c.get(Calendar.YEAR);\n\t\tmMonth = c.get(Calendar.MONTH);\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\texpense.setDate(c.getTime());\n\n\t\t// display the current date\n\t\tupdateDateDisplay();\n\t}", "public void setCtDate(Date ctDate) {\n this.ctDate = ctDate;\n }", "public void setDate(int year, int month, int dayOfMonth)\n {\n this.date = new GregorianCalendar(year, month-1, dayOfMonth);\n }", "public void setBirthDate(Date inBirthDate)\n {\n birthdate = inBirthDate;\n }", "public void setDate(long value) {\n this.date = value;\n }", "public void setDate(LocalDate date) {\n this.date = date;\n }", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public void setDate(DateTime \n date) {\n this.date = date;\n }", "public void setDate(java.lang.String date) {\n this.date = date;\n }", "public void setBirthdate(Date birthdate) {\n this.birthdate = birthdate;\n }", "public void setBirthdate(Date birthdate) {\r\n this.birthdate = birthdate;\r\n }", "Employee setBirthdate(Date birthdate);", "public void setDate(LocalDate date) {\n\t\tthis.date = date;\n\t}", "public void setDate(long date)\r\n/* 199: */ {\r\n/* 200:299 */ setDate(\"Date\", date);\r\n/* 201: */ }", "public void setDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), DATE, value);\r\n\t}", "private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setDate(long value) {\n validate(fields()[5], value);\n this.date = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "public void setDate() {\n DatePickerDialog dateDialog = new DatePickerDialog(this, myDateListener,\n calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));\n //set the date limits so user cannot pick a date outside of game scope\n dateDialog.getDatePicker().setMinDate(System.currentTimeMillis() + MILLIS_IN_DAY);\n dateDialog.getDatePicker().setMaxDate(System.currentTimeMillis() + (MILLIS_IN_DAY * MAX_END_DAY_COUNT));\n dateDialog.show();\n }", "public void setDate(Date newDate) {\n this.currentDate = newDate;\n }", "public void setDate(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public void setEditDate(Date editDate)\r\n/* */ {\r\n/* 193 */ this.editDate = editDate;\r\n/* */ }", "public void setDate(String d) {\n\t\tdate = d;\n\t\tif (super.getPubDate() != null)\n\t\t\tsuper.setPubDate(d);\n\t\tdate = d;\n\t}", "public void setRequestDate(Date requestDate);", "public void setDate (String s) {\n date = s;\n }", "public void setDateTime(Date date)\n\t{\n\t\tint nHour, nMin;\n\n\t\tCalendar cal = Calendar.getInstance(); //Get calender\n\t\tcal.setTime(date); //Set given date\n\t\tnHour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tnMin = cal.get(Calendar.MINUTE);\n\n\t\tsetDateTime(nHour, nMin, date);\n\t}", "@Override\n\tpublic void setDateOfBirth(java.util.Date dateOfBirth) {\n\t\t_candidate.setDateOfBirth(dateOfBirth);\n\t}", "public void setDate(int day, int month, int year, int hour, int minute) // Maybe\n\n {\n this.day = day;\n this.month = month;\n this.year = year;\n this.hour = hour;\n this.minute = minute;\n }", "public void setData (Date date) {\r\n\t\tthis.data=date;\r\n\t\t\r\n\t}", "public static void setDate() {\r\n\t\tDate.set(DateFormat.getDateTimeInstance(DateFormat.SHORT,\r\n\t\t\t\tDateFormat.LONG, Locale.getDefault()).format(\r\n\t\t\t\tnew java.util.Date()));\r\n\t}", "public void setmDate(Date mDate) {\n this.mDate = mDate;\n }", "public void setIssuanceDate(Date value) {\n setAttributeInternal(ISSUANCEDATE, value);\n }", "public void setDate(String newDate)\n\t{\n\t\tthis.date = newDate;\n\t}", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n //Month is from 0 to 11 so need to increment once\n month++;\n //Store selected date in variable\n dob = month + \"/\" + day + \"/\" + year;\n Log.d(\"CIS 3334\", \"date = \" + dob);\n\n //Set the date in the mainViewModel\n mainViewModel.setDateOfBirth(dob);\n }", "private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }", "public void setCreDate(Date creDate) {\n this.creDate = creDate;\n }", "public void setReleaseDate(Date date) {\r\n this.releaseDate = date;\r\n // set the fact we have called this method to set the date value\r\n this.hasSetReleaseDate=true;\r\n }" ]
[ "0.76730996", "0.76251787", "0.75306875", "0.75306875", "0.75306875", "0.75237733", "0.7518967", "0.7484504", "0.7481519", "0.7448491", "0.7448491", "0.7448491", "0.7448491", "0.7448491", "0.7448491", "0.7448491", "0.7448491", "0.7448491", "0.7421149", "0.7421149", "0.7421149", "0.73960406", "0.7386827", "0.7379", "0.7374922", "0.73575366", "0.73202246", "0.72823685", "0.727882", "0.7197165", "0.71938515", "0.71766925", "0.7155467", "0.7137084", "0.71282", "0.71282", "0.71234816", "0.7120086", "0.7114361", "0.7089724", "0.70151126", "0.69771624", "0.69486773", "0.6939024", "0.6922709", "0.6916161", "0.6899975", "0.6891307", "0.6891307", "0.6891307", "0.6891307", "0.6891307", "0.6888276", "0.68778753", "0.6876872", "0.6869632", "0.686381", "0.68596935", "0.6852528", "0.68428755", "0.6827421", "0.68220073", "0.6805859", "0.68027854", "0.68017864", "0.68001807", "0.6787385", "0.67795765", "0.67795765", "0.6777089", "0.6767933", "0.6755614", "0.6747256", "0.6719913", "0.6710915", "0.6687024", "0.668312", "0.6671142", "0.6656955", "0.66334385", "0.6619997", "0.661287", "0.6591622", "0.6591622", "0.65878576", "0.6564108", "0.6549381", "0.6543298", "0.65366656", "0.65327895", "0.6530377", "0.6515723", "0.65135664", "0.6503965", "0.65022624", "0.64988285", "0.647201", "0.64688885", "0.6468062", "0.6456497" ]
0.75658053
2
Returns true if the crime has been solved.
public boolean isSolved() { return mSolved; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSolved()\r\n\t{\r\n\t\t\r\n\t}", "public boolean isSolved() {\n return (this.getCellNumber() != 0);\n }", "public boolean isSolved() {\n\t\tboolean solved = true;\n\t\tfor (int row = 0; row < Sudoku.ROWS; row++ ) {\n\t\t\tfor (int col = 0; col < Sudoku.COLUMNS; col++) {\n\t\t\t\tVariable var = Sudoku.grid[row][col];\n\t\t\t\tif (!var.isFound()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\treturn solved;\n\t}", "private boolean finalMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (thirdMilestoneAccomplished()) &&\n (beliefs.puzzle[2][1] == 10) &&\n (beliefs.puzzle[2][2] == 11) &&\n (beliefs.puzzle[2][3] == 12) &&\n (beliefs.puzzle[3][1] == 14) &&\n (beliefs.puzzle[3][2] == 15)\n\n )\n return true;\n else\n return false;\n }", "public boolean solve(){\n\t\treturn solve(0,0);\n\t}", "@Override\n\tpublic boolean solved() {\n\n\t\treturn solved;\n\t}", "public boolean isSolved(){ return getRemainingValues() == 0; }", "public boolean isSolvable() {\r\n return solution() != null;\r\n }", "public boolean solved()\n\t{\n\t\tfor(int row = 0; row < board.length; row++)\n\t\t{\n\t\t\tfor(int col = 0; col < board.length; col++)\n\t\t\t{\n\t\t\t\tif(board[row][col] == 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean hasSolved()\r\n {\r\n for (Food food : getFoods())\r\n {\r\n //if food is moving the board is not solved yet\r\n if (food.hasVelocity())\r\n return false;\r\n \r\n //if the food is still in the playing area the board is not solved yet\r\n if (food.getRow() <= VALID_ROWS)\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "@Override\n\tpublic boolean isSolved () {\n\t\tCube222 solved = new Cube222();\n\t\tfor ( int ctr = 0 ; ctr < state_.length ; ctr++ ) {\n\t\t\tif ( state_[ctr].id() != ctr\n\t\t\t || state_[ctr].frontback() != solved.state_[ctr].frontback()\n\t\t\t || state_[ctr].updown() != solved.state_[ctr].updown()\n\t\t\t || state_[ctr].leftright() != solved.state_[ctr].leftright() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean solve(){\n\t\t//Solve the puzzle using backtrack method\n\t\treturn solve(0,0);\n\t}", "public boolean isSolved() {\n\t\tfor (int i=0; i<size*size; i++) {\n\t\t\tif (inRow(0, i) || inCol(0,i) || inBox(0,i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isSolvable() {\n return solution != null || initialNode.board.isGoal();\n }", "public boolean solve()\n\t{\n\t\t// Call the internal solver with the initial values\n\t\treturn solve(numberOfDiscs, poles[0], poles[1], poles[2]);\n\t}", "static boolean isSolved() {\n\t\tfor (int i=0; i<Play.NUM[TOTAL]; i++) {\t\n\t\t\tif (!isPieceCorrect(Play.jigsawPieces.get(i))) { //check if the piece is in the correct position and orientation\n\t\t\t\treturn false; //return if even once piece is not\n\t\t\t}\n\t\t}\n\t\treturn true; //if the method reached here, then it means that all the pieces are correctly placed\n\t}", "public boolean isPuzzleSolved() {\n\t\t// check rows/col/block )\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif ((this.constraints[i][0].nextClearBit(1) < N + 1) || (this.constraints[0][i].nextClearBit(1) < N + 1)\n\t\t\t\t\t|| (this.constraints[N + 1][i].nextClearBit(1) < N + 1))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isSolvable() {\n\t\tif (goal == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public boolean amelioreSolution() {\n\n\t\t// TODO a ecrire etudiant\n\n\t\t// Prend un voisin au hasard et l'evaluer\n\n\t\t// si c'est meilleur, on remplace et retourn vrai\n\n\t\t// FinTODO a ecrire etudiant\n\n\t\t// sion on s'arrete si la solution ne s'ameliore plus\n\t\tSolutionAbstract ame = this.solutionEnCours.retourneVoisinHasard();\n\n\t\tif (problemeATraiter.evaluation(ame) < problemeATraiter.evaluation(solutionEnCours)) {\n\t\t\tsolutionEnCours = ame;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\n\t}", "private boolean firstMilestoneAccomplished()\n {\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4)\n )\n return true;\n else\n return false;\n }", "public boolean isSolvable() {\n return goal != null;\n }", "public boolean isValid() {\n\t\t//for every city\n\t\tfor(int i = 0; i < numKingdoms; i++) {\n\t\t\t//check its adjacency list\n\t\t\tfor(int j = 0; j < numKingdoms; j++) {\n\n\t\t\t\t//if reachable from i and if j has been conquered\n\t\t\t\tif(cost[i][j] > 0 && conquered.contains(j)) {\n\t\t\t\t\t//yes, this city has been conquered\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isSolvable()\n {\n return moves() >= 0;\n }", "public boolean solve() {\n Cell openCell = getOpenCell();\n if (openCell == END) {\n return true;\n }\n for (int n = 1; n < 10; n++) {\n if (isSafe(openCell.row, openCell.col, n)) {\n add(openCell, n);\n if (solve()) {\n return true;\n }\n add(openCell, 0); // reset\n }\n }\n\n return false;\n }", "public boolean isSolved(){\n\t\t// if any of row, col, and block contains 1,2,...,size*size,\n\t\t// then the sudoku is solved\n\t\tList<Integer> correctArray = new ArrayList<Integer>(size*size);\n\t\tfor (int i = 0; i < size*size; i++){\n\t\t\tcorrectArray.add(i+1);\n\t\t}\n\t\tfor (int n = 0; n < size*size; n++){\n\t\t\tif (!(this.getRowAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t\tif (!(this.getColAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t\tif (!(this.getBlockAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isSolvable()\n {\n if (goalNode!=null && goalNode.board.isGoal()){\n return true;\n }\n return false;\n\n }", "public boolean isHasSolution() {\n return hasSolution;\n }", "public boolean solve() {\r\n\r\n\tint nextBox = findLeast();\r\n\t//coors for the least box\r\n\tint c = nextBox % 10;\r\n\tint r = nextbox/10;\r\n\t\r\n\r\n\t//look for least\r\n\t//for the numbers in the least box\r\n\t//assignT == true \r\n\t//check the max; if max is 100; well done! return true\r\n\t//if its not then if (solve() == true) again\r\n\t//if \r\n }", "private boolean secondMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8)\n )\n return true;\n else\n return false;\n }", "private boolean thirdMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[3][0] == 13)\n )\n return true;\n else\n return false;\n }", "public boolean isGameSolved() {\n Block[] blocks = board.getBlocks();\n\n for (Block block: blocks) {\n if (!isBlockSolved(block))\n return false;\n }\n\n for (int r = 0; r < 9; r++) {\n if (!isRowSolved(this.board, r)) {\n return false;\n }\n }\n\n for (int c = 0; c < 9; c++) {\n if (!isColumnSolved(this.board, c)) {\n return false;\n }\n }\n\n return true;\n }", "public boolean isBoardSolved() {\n for (int goal : goalCells) {\n if (!((board[goal] & 15) == BOX_ON_GOAL)) {\n return false;\n }\n }\n return true;\n }", "public boolean isWinnable() {\n Solver<ArrayList<Integer>> mySolver =\n new Solver<ArrayList<Integer>>();\n ArrayList<ArrayList<Integer>> Solution =\n mySolver.SolveBFS(this);\n\n //Reset 'tried' to none\n tried = new HashSet<ArrayList<Integer>>();\n\n if(Solution.size() == 0) {\n //No Solution\n return false;\n }\n return true;\n }", "public boolean isSolvable() {\n\n return initialSolvable;\n }", "public boolean solucionar() {\n\t\treturn false;\n\t}", "private boolean checkFinalPuzzle() throws Exception {\n for(int i = 0; i < puzzle.getColumns(); ++i) {\n var clues = puzzle.getColumnClue(i);\n var solver_col = searchBoard.getFilledGroups(i, TraversalType.COLUMN);\n if(clues.size() != solver_col.size()) {\n return false;\n }\n for(int j = 0; j < clues.size(); ++j) {\n if(!clues.get(j).equals(solver_col.get(j))) {\n return false;\n }\n }\n }\n for(int i = 0; i < puzzle.getRows(); ++i) {\n var clues = puzzle.getRowClue(i);\n var solver_row = searchBoard.getFilledGroups(i, TraversalType.ROW);\n if(clues.size() != solver_row.size()) {\n return false;\n }\n for(int j = 0; j < clues.size(); ++j) {\n if(!clues.get(j).equals(solver_row.get(j))) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean isSolvable() {\n Board twin = initial.twin();\n MinPQ<Node> mainQueue = new MinPQ<>(getComparator());\n MinPQ<Node> twinQueue = new MinPQ<>(getComparator());\n mainQueue.insert(new Node(initial, 0, null));\n twinQueue.insert(new Node(twin, 0, null));\n while (this.solution == null) {\n Node temp = mainQueue.delMin();\n if (temp.board.isGoal()) {\n this.solution = temp;\n return true;\n }\n Iterable<Board> nebrs = temp.board.neighbors();\n for (Board x : nebrs) {\n if (!x.equals(temp.previousNode.board)) {\n mainQueue.insert(new Node(x, temp.movesToBoard + 1, temp));\n }\n }\n Node temp2 = twinQueue.delMin();\n if (temp2.board.isGoal()) {\n this.solution = null;\n return false;\n }\n Iterable<Board> nebrs2 = temp2.board.neighbors();\n for (Board x : nebrs2) {\n if (!x.equals(temp2.previousNode.board)) {\n twinQueue.insert(new Node(x, temp2.movesToBoard + 1, temp2));\n }\n }\n }\n return false;\n }", "private Boolean esSolucion() {\n if(debug) {\n System.out.println(\"**********************esSolucion\");\n printSol(); \n }\n \n return (this.sol.numVerticesEmparejados == (this.G.numVertices()-1));\n }", "public boolean isSolvable() {\n\t\treturn result != null;\n\t}", "public boolean isSolved() {\n return towers[0].empty() && towers[1].empty() && towers[2].size() == numDisks;\n }", "public boolean isSolution() {\n\t\t\n\t\tboolean foundSolution = false;\n\t\t\n\t\tif (inconsistencyCount == 0) {\n\t\t\tfoundSolution = true;\n\t\t\tSet<PlanGraphLiteral> lastLevelFacts = facts.get(maxLevel);\n\t\t\tPlanGraphStep endStep = steps.get(maxLevel + 1).iterator().next();\n\t\t\tfor (PlanGraphLiteral goalCondition : endStep.getParentNodes()) {\n\t\t\t\tif (!lastLevelFacts.contains(goalCondition)) {\n\t\t\t\t\tinconsistencies.get(maxLevel).add(new UnsupportedPrecondition(goalCondition, maxLevel));\n\t\t\t\t\tinconsistencyCount++;\n\t\t\t\t\tfoundSolution = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn foundSolution;\n\t}", "public boolean isSolvable() {\n return finalMove != null;\n }", "public static boolean isSolved(Cube cube){\n\t\tint counter = 0;\n\t\tfor(int i = 0; i <6; i++){\n\t\t\tif(isFaceSolved(cube, i)) counter++;\n\t\t}\n\t\tif(counter == 6) return true;\n\t\telse return false;\n\t}", "public boolean check() {\n BigInteger t1 = y.modPow(int2, c.p);\n BigInteger t2 = x.modPow(int3, c.p);\n BigInteger t3 = ((t2.add(c.a.multiply(x))).add(c.b)).mod(c.p);\n return t1.compareTo(t3) == 0;\n }", "@Override\n\t\tpublic boolean isValidSolution() {\n\t\t\treturn super.isValidSolution();\n\t\t}", "public boolean finished() {\n\t\t\n\t\tfor ( int i = 0; i <this.num; i++) {\n\t\t\tif (this.car[i]!=null) {\n\t\t\t\tif (this.car[i].checkFinished()==false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isSolvable() {\n return _solvable;\n }", "public static void isSolutionComplete(boolean[][] flag)\r\n\t{\r\n\t\tboolean indivFlag = true;\r\n\t\t\r\n\t\tfor(int i = 0; i < 9; ++i)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j < 9; ++j)\r\n\t\t\t{\r\n\t\t\t\tif(flag[i][j] == false)\r\n\t\t\t\t{\r\n\t\t\t\t\tindivFlag = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(indivFlag == true)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You finished the game\");\r\n\t\t}\r\n\t}", "public boolean isSolvable() {\n Node preNode = minNode;\n while (preNode.getPrevious() != null) {\n preNode = preNode.getPrevious();\n }\n\n if (preNode.getBoard().equals(inNode.getBoard())) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isGoal(){\n\t\tboolean ok = true;\n\t\tfor (int i = 0; i < getRows() && ok; i++) {\n\t\t\tfor (int j = 0; j < getColumns() && ok; j++) {\n\t\t\t\tif (cells[i][j].getSand() != getK()) \n\t\t\t\t\tok = false;\n\t\t\t}\n\t\t} \n\t\treturn ok;\n\t}", "public boolean isSolvable() {\n\t\tfor (Cell[] cellRow : board) {\n\t\t\tfor (Cell cell : cellRow) {\n\t\t\t\t// not solvable if empty with no possible values\n\t\t\t\tif (cell.val==0 && cell.pval.size()==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isSolvable() {\n return moves != -1;\n }", "boolean isNewSolution();", "public boolean isSolutionExist() {\n // Mengecek apakah sebuah matriks SPL memiliki solusi\n boolean ada_solusi = true;\n\n int i = this.NBrsEff - 1;\n\n while(ada_solusi && i >= 0){\n int j = 0;\n boolean found = false;\n\n while(!found && j <= this.NKolEff) {\n if(this.M[i][j] != 0 && j != this.NKolEff - 1) {\n found = true;\n }\n j += 1;\n }\n\n if(!found) {\n boolean all_zero_brs = false;\n\n for(int k = 0; k < this.NBrsEff; k++){\n if(this.isAllZeroBrs(k)) {\n all_zero_brs = true;\n }\n }\n\n if(!all_zero_brs) {\n ada_solusi = false;\n }\n }\n\n i -= 1;\n }\n\n return ada_solusi;\n }", "public boolean realSolution() {\n this.polySolve();\n return this.real;\n }", "public boolean runSolver()\n {\n Variable current = getUnassignedVar();\n\n if (current == null)\n {\n return true;\n }\n\n for (int i = 0; i < current.getDomain().size(); i++)\n {\n List<Integer> oldDomain = current.getDomain();\n int newval = oldDomain.get(i);\n current.setValue(newval);\n current.setDomain(i);\n\n if (constraintsSatisfied(constraintsWithAnyVals()))\n {\n if (runSolver())\n {\n return true;\n }\n }\n\n current.setDomain(oldDomain);\n current.setValue(current.getPrevious()); \n }\n return false;\n }", "public boolean isGoal() \n {\n return this.manhattan() == 0;\n // return this.manhattan() == 0 || this.checkTwinSolution();\n }", "public boolean esConexo() {\n\t\tboolean result = true;\n\t\tint indice = 0;\n\t\tBusquedaEnProfundidad busqueda = new BusquedaEnProfundidad(this, 0);\n\n\t\twhile (result && indice < cantNodos) {\n\t\t\tif (!busqueda.estaVisitado(indice))\n\t\t\t\tresult = false;\n\t\t\tindice++;\n\t\t}\n\n\t\treturn result;\n\t}", "public boolean isGoal() {\n return hamming() == 0; // Board is solved if hamming distance is 0\n }", "public boolean isFinished() {\n\t\tif (gameSituation == UNFINISHED) {\n\t\t\treturn false;\n\t\t} // Of if\n\n\t\treturn true;\n\t}", "public boolean isSolvable() {\n return solvable;\n }", "@Override\n public final void solve() {\n this.flag1 = this.neo.getPosition().equals(this.goal);\n \n }", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }", "public boolean isSolved() {\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 2) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 2) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 3) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2, 3) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 3) != RubiksColor.BLUE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 2) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 2) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 3) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2, 3) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 3) != RubiksColor.YELLOW) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 2) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 2) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 3) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2, 3) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 3) != RubiksColor.GREEN) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 2) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 2) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 3) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2, 3) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 3) != RubiksColor.WHITE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 2) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 2) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 3) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2, 3) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 3) != RubiksColor.ORANGE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 2) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 2) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 3) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2, 3) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 3) != RubiksColor.RED) return false;\n\n return true;\n }", "boolean checkGoal(Node solution);", "boolean hasResolve();", "public boolean isDone() {\n //check if valid board\n assert isValidSolitaireBoard();\n if (numPiles == NUM_FINAL_PILES){\n //create array checkDonewith size NUM_FINAL_PILES\n int[] checkDone = new int[NUM_FINAL_PILES];\n \n /**\n the value in piles[i] needs to be unique, not greater than NUM_FINAL_PILES\n and no duplicates of the number\n each value is used as an index to the new array and their value is\n the checkDone's value. Eg. piles[2] = 4, checkDone[4] = 4\n if the checkDone[piles[i]] equals to piles[i], there is a duplicate.\n */\n for (int i = 0 ; i < numPiles; i++){\n if ((piles[i] <= NUM_FINAL_PILES) && (checkDone[piles[i] - 1] != piles[i])){\n checkDone[piles[i] - 1] = piles[i];\n }\n else\n return false;\n }\n return true;\n }\n else\n return false;\n }", "public boolean isManySolution() {\n\n boolean all_zero_brs = false;\n\n for(int i = 0; i < this.NBrsEff; i++){\n if(this.isAllZeroBrs(i)) {\n all_zero_brs = true;\n }\n }\n\n return all_zero_brs;\n }", "public static boolean isSolution(String inputFile)throws IOException{\r\n\t\tGrid grid2Test = buildGrid(inputFile);\r\n\t\tfor(Piece[] linep : grid2Test.getAllPieces()){\r\n\t\t\tfor(Piece p : linep){\r\n\t\t\t\tif(!grid2Test.isTotallyConnected(p)) return false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean isSolvable() {\n \treturn isSolvable;\n }", "private Boolean esMejor() {\n if(debug) {\n System.out.println(\"**********************esMejor\");\n }\n \n if(this.solOptima == null || (this.sol.pesoEmparejamiento < this.solOptima.pesoEmparejamiento)) return true;\n else return false;\n }", "public boolean solve()\n\t{\n Position[] pos=path.getLastStep().neighbors();\n if (grid.isOnBoundary(path.getLastStep())&&grid.isOpen(path.getLastStep()))\n\t\treturn true;\n if (path.getLastStep()==start)\n return false;\n for (int i=0;i<4;i++)\n {\n if (pos[i]!=path.getLastStep() && grid.isOpen(pos[i]))\n path.extend(pos[i]);\n }\n if (grid.isBlocked(path.getLastStep())||grid.isRejected(path.getLastStep()))\n {\n path.backUp();\n solve();\n }\n return false;\n \n\t}", "public final boolean isDone() {\n\t\tboolean result = true;\n\t\tfor (String mdl : executors.keySet()) {\n\t\t\tSubstructureExecutorI exe = executors.get(mdl);\n\t\t\tresult = result && exe.stepIsDone();\n\t\t}\n\t\t// final int matlabWait = 200;\n\t\t// try {\n\t\t// log.debug(\"Waiting to return\");\n\t\t// Thread.sleep(matlabWait);\n\t\t// } catch (InterruptedException e) {\n\t\t// log.debug(\"HEY who woke me up?\");\n\t\t// }\n\t\treturn result;\n\t}", "public static boolean isSolved(int[][] board) {\n\t\tfor(int i = 0; i < 9; i++) {\n\t\t\tfor(int j = 0; j < 9; j++) {\n\t\t\t\tif(board[i][j] < 1) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//rows\n\t\tfor(int i = 0; i < 9; i++) {\n\t\t\tif(!checkRow(board, i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//columns\n\t\tfor(int i = 0; i < 9; i++) {\n\t\t\tif(!checkCol(board, i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//cells\n\t\tfor(int r = 0; r < 3; r++) {\n\t\t\tfor(int c = 0; c < 3; c++) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public boolean amIWinning() {\n return myCommitment != null && winning;\n }", "protected boolean isFinished() {\n\t\tif(switchSide) {\n\t\t\treturn !launchCubeSwitch.isRunning() && state == 4;\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\treturn !launchCubeScale.isRunning() && state == 4;\n\t\t}\n\t\telse {\n\t\t\treturn !crossLine.isRunning() && timer.get() > 1;\n\t\t}\n\t}", "private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}", "public boolean isSolvable() {\r\n return isSolvable;\r\n }", "public boolean isSolvable() {\n return isSolvable;\n }", "public boolean isSolvable() {\n return isSolvable;\n }", "public static boolean isFinishedCity()\r\n {\r\n try\r\n {\r\n Building b = astApp.getBuildings().get( astApp.getBuildings().size() - 1 );\r\n \r\n if( b.getBuilding().getXLocation() + b.getBuilding().getWidth() >= 700 )\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n catch( ArrayIndexOutOfBoundsException e )\r\n {\r\n return false;\r\n }\r\n }", "public boolean canSolve(Class<? extends Problem> problem, Class<? extends Solution> solution);", "protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }", "public boolean isFinished() {\n\t\tif ((player1_moves | player2_moves) == COMPLETE) {\n\t\t\tfinished = true;\n\t\t\tcurrentPlayer = '\\0';\n\t\t}\n\t\tfor (int i : winning_cases) {\n\t\t\tif ((player1_moves & i) == i) {\n\t\t\t\twinner = 'X';\n\t\t\t\tfinished = true;\n\t\t\t} else if ((player2_moves & i) == i) {\n\t\t\t\twinner = 'O';\n\t\t\t\tfinished = true;\n\t\t\t}\n\t\t}\n\t\treturn finished;\n\t}", "public boolean isDone() {\n return done.isTrue() || depth == PSymGlobal.getConfiguration().getMaxStepBound();\n }", "public boolean trueSolution() {\n this.tanSolve();\n return this.solution;\n }", "protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }", "public boolean isSolvable() {\n int inversions = 0;\n int zrow = 0;\n int beg;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (tiles[i][j] == 0)\n zrow = i;\n else {\n for (int k = i; k < n; k++) {\n beg = (k == i)? j+1 : 0;\n for (int l = beg; l < n; l++) {\n if (tiles[i][j] != 0 && tiles[k][l] != 0 && tiles[i][j] > tiles[k][l])\n inversions++;\n }\n }\n }\n }\n }\n if (n%2 == 1)\n return (inversions%2 == 0);\n return ((inversions+zrow)%2 == 1);\n }", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "public boolean canFinish(int numCourses, int[][] prerequisites) {\n this.numCourses = numCourses;\n this.indegree = new int[numCourses];\n this.graph = new HashMap<>();\n for(int[] dependency : prerequisites) {\n List<Integer> list = graph.getOrDefault(dependency[1], new ArrayList<>());\n list.add(dependency[0]);\n indegree[dependency[0]]++;\n graph.put(dependency[1], list);\n }\n\n Queue<Integer> queue = new LinkedList<>();\n int count = 0;\n for(int i = 0; i < indegree.length; i++) {\n if(indegree[i] == 0) queue.add(i);\n }\n\n while(!queue.isEmpty()) {\n int curr = queue.poll();\n if(indegree[curr] == 0) count++;\n if(!graph.containsKey(curr)) continue;\n for(int neighbor : graph.get(curr)) {\n indegree[neighbor]--;\n if(indegree[neighbor] == 0) queue.add(neighbor);\n }\n }\n return count == numCourses;\n }", "public boolean isClosed(){\n\t\tFreeVariableSet temp=freeVariables(new HashSet<Integer>());\n\t\tif (temp.size()==0) return true;\n\t\treturn false;\n\t}", "public boolean isGameFinished() {\n if (listaJogadores.size() - listaJogadoresFalidos.size() == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "public boolean isClosed() {\n return calculateSumOfHouse() > 31;\n }", "private boolean checkSolutions() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tif (populationArray.get(i).getFitness() == 0) {\n\t\t\t\tsolution = populationArray.get(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isSolution(Grid grid2Test){\r\n\t\tfor(Piece[] linep : grid2Test.getAllPieces()){\r\n\t\t\tfor(Piece p : linep){\r\n\t\t\t\tif(!grid2Test.isTotallyConnected(p)) return false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "public boolean isGoal() {\n if (posX != N-1 || posY != N-1) return false;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (matrix[i][j] == 0) continue;\n if (i*N+j+1 != matrix[i][j]) return false;\n }\n }\n return true;\n }", "protected boolean isFinished() {\n \tif(timeSinceInitialized() >= 1.75){\n \t\treturn true;\n \t}\n return false;\n }", "protected boolean isFinished() {\r\n \tif (i >= 1 || i <= 1){\r\n \treturn true;\r\n \t}\r\n\t\treturn false;\r\n }", "public boolean generateSolution() {\n //first clear all filled in fields by user (they could be wrong)\n clearGame();\n\n //use solver\n SudokuSolver solver = new BacktrackSolver();\n return solver.solveSudoku(this);\n }" ]
[ "0.7375292", "0.71506333", "0.7127173", "0.6885732", "0.6857899", "0.6831304", "0.6831071", "0.6821604", "0.6757921", "0.67558557", "0.66658545", "0.6631392", "0.6607896", "0.65799356", "0.65679485", "0.654578", "0.65393543", "0.65247256", "0.6522543", "0.651687", "0.6514835", "0.64691526", "0.6455695", "0.64546686", "0.64413446", "0.6421351", "0.6417896", "0.63584447", "0.62683344", "0.625246", "0.6246069", "0.62143767", "0.6212378", "0.6181996", "0.61781675", "0.6174474", "0.6168193", "0.6164729", "0.614451", "0.61418676", "0.61271715", "0.6114865", "0.6106822", "0.6100081", "0.609699", "0.6077705", "0.60769105", "0.6075885", "0.6074428", "0.6065303", "0.604417", "0.60364795", "0.603344", "0.60289204", "0.6026452", "0.602181", "0.6020108", "0.60181713", "0.6005184", "0.59955287", "0.59888405", "0.59658873", "0.59646314", "0.5953329", "0.5950089", "0.59435385", "0.5938742", "0.593173", "0.59212226", "0.5921162", "0.5916517", "0.5910998", "0.59104115", "0.5897114", "0.5893373", "0.58907735", "0.58794415", "0.5877609", "0.58592", "0.58592", "0.58590156", "0.5852445", "0.5844174", "0.5823091", "0.58159673", "0.5804799", "0.5799184", "0.5798287", "0.57921964", "0.5787732", "0.57778203", "0.57708234", "0.57644755", "0.5757769", "0.5751186", "0.5730225", "0.572784", "0.5721442", "0.5708213", "0.57065827" ]
0.6736985
10
Sets whether the crime is solved.
public void setSolved(boolean solved) { mSolved = solved; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIsSuccessInSolving(Integer isSuccessInSolving)\n/* */ {\n/* 219 */ this.isSuccessInSolving = isSuccessInSolving;\n/* */ }", "private void setChemical(boolean chemical) {\n this.chemical = chemical;\n }", "public boolean isSolved()\r\n\t{\r\n\t\t\r\n\t}", "public void setPiston(boolean x){\n armPiston.set(x);\n }", "public void setCompetitive(boolean value) {\n this.competitive = value;\n }", "public void setIsPrime()\n\t{\n\t\tint divisor = 2;\n\t\tdo\n\t\t{\n\t\t\tif (number % divisor == noRemainder)\n\t\t\t{\n\t\t\t\texactDivision = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\texactDivision = false;\n\t\t\t}\n\t\t\tdivisor++;\n\t\t} while (divisor < number && exactDivision == false);\n\t}", "public void setSolucion(boolean sol) {\n this._esSolucion = sol;\n }", "void setSet(boolean set);", "public void setC(boolean c) {\n\tthis.c = c;\n }", "@Override\n\tpublic boolean solved() {\n\n\t\treturn solved;\n\t}", "public boolean isSolved() {\n return mSolved;\n }", "void set(boolean on);", "public void set(boolean bol);", "public void set()\r\n {\r\n isSet = true;\r\n }", "public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tmCrime.setSolved(isChecked);\n\t\t\t\tupdateCrime();\n\t\t\t}", "public boolean solve()\n\t{\n\t\t// Call the internal solver with the initial values\n\t\treturn solve(numberOfDiscs, poles[0], poles[1], poles[2]);\n\t}", "@Override\n public final void solve() {\n this.flag1 = this.neo.getPosition().equals(this.goal);\n \n }", "public void setChemResist(Boolean chemResist)\n {\n this.chemResist = chemResist;\n }", "public void setCarry(final boolean value) {\n\t\tif (value) {\n\t\t\tsetCarry();\n\t\t}\n\t\telse {\n\t\t\tresetCarry();\n\t\t}\n\t}", "@Override\n public void set(boolean state) {\n if (isInverted) {\n super.set(!state);\n } else {\n super.set(state);\n }\n }", "void setMode(SolvingMode solvingMode);", "public boolean isSolved() {\n return (this.getCellNumber() != 0);\n }", "public void setRecoisInput(boolean b) {\n Component[] contenu = this.getComponents();\n for (int i = 0; i < contenu.length; i++) {\n if (contenu[i].getClass().equals(CaseJeu.class)) {\n CaseJeu c = (CaseJeu) contenu[i];\n c.setRecoisInput(b);\n }\n }\n }", "public void changeIsParalysed()\r\n\t{\r\n\t\tisParalysed = !isParalysed;\r\n\t}", "public void setReached(boolean reached);", "public void setSoft(boolean soft);", "public void setJ(boolean j) {\n\tthis.j = j;\n }", "public void setIsCompletingGame(boolean state)\r\n {\r\n this.isCompletingGame= state; \r\n }", "public void setParking(java.lang.Boolean value);", "public void setOn(boolean arg) {\n isOn = arg;\n }", "public void setIsElectronic(boolean value) {\n this.isElectronic = value;\n }", "public boolean isSolvable() {\n\n return initialSolvable;\n }", "public void setIsTurn()\n\t{\n\t\tthis.isTurn = true;\n\t}", "public void setSolutionList(boolean b){\n returnAllSolutions = b;\n }", "public boolean solve(){\n\t\treturn solve(0,0);\n\t}", "public void setDone(boolean doneIt)\n {\n notDone = doneIt;\n }", "public void setIsChosen(boolean isChosen);", "public boolean runSolver()\n {\n Variable current = getUnassignedVar();\n\n if (current == null)\n {\n return true;\n }\n\n for (int i = 0; i < current.getDomain().size(); i++)\n {\n List<Integer> oldDomain = current.getDomain();\n int newval = oldDomain.get(i);\n current.setValue(newval);\n current.setDomain(i);\n\n if (constraintsSatisfied(constraintsWithAnyVals()))\n {\n if (runSolver())\n {\n return true;\n }\n }\n\n current.setDomain(oldDomain);\n current.setValue(current.getPrevious()); \n }\n return false;\n }", "public void setAlive(boolean x){\n \talive = x;\r\n }", "public void setCircleBroken(boolean isBroken){\n this.circleBroken = isBroken;\n refreshTheView();\n }", "void setAlive(boolean isAlive);", "public final void setFoundCI(java.lang.Boolean foundci)\r\n\t{\r\n\t\tsetFoundCI(getContext(), foundci);\r\n\t}", "public void setIndicadorFacturaElectronica(boolean indicadorFacturaElectronica)\r\n/* 199: */ {\r\n/* 200:340 */ this.indicadorFacturaElectronica = indicadorFacturaElectronica;\r\n/* 201: */ }", "public boolean isSolved(){ return getRemainingValues() == 0; }", "public void setPrimeiraLeitura(boolean primeiraLeitura) {\n this.primeiraLeitura = primeiraLeitura;\n }", "public void setCorrectFlag(){\n\t\tcorrectFlag = true;\n\t}", "public void setPredeterminado(boolean predeterminado)\r\n/* 159: */ {\r\n/* 160:274 */ this.predeterminado = predeterminado;\r\n/* 161: */ }", "public boolean setIndustrialComplex(boolean IC)\r\n {\n if(this.getIsLand())\r\n {\r\n //Cannot build an IC if one exists\r\n if(this.hasIndustrialComplex == true)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n this.hasIndustrialComplex = IC;\r\n return true;\r\n }\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "public void setInvincible(boolean i) {\n \tthis.invincible = i;\n \tthis.UIgnome().set(i);\n \tif(!i) {\n \t\tthis.steptracer = 0;\n \t}else {\n \t\tdungeon.invincibilityLeft().set(\"Invincibility Steps: 25\\n\");\n \t}\n }", "public abstract void setCheck(Boolean check);", "public void changeIsDone(boolean isDone) {\r\n this.isDone = isDone;\r\n }", "public void changeIsInvincible()\r\n\t{\r\n\t\tisInvincible = !isInvincible;\r\n\t}", "void setEmisoraRadioCambio(boolean x){\n this.emisoraRadio = x;\n }", "boolean setFrozen(boolean frozen);", "public void setFork(boolean s) {\r\n this.fork = s;\r\n }", "public void setX(boolean x) {\n\tthis.x = x;\n }", "void set(boolean value);", "void setQuick(boolean quick);", "public void setIsour( java.lang.Boolean newValue ) {\n __setCache(\"isour\", newValue);\n }", "void setFinal(boolean isFinal);", "public void changeIsFlagged() {\r\n\t\tif (this.isFlagged) {\r\n\t\t\tthis.isFlagged = false;\r\n\t\t} else {\r\n\t\t\tthis.isFlagged = true;\r\n\t\t}\r\n\t}", "public void setFork( final boolean fork )\n {\n m_fork = fork;\n }", "void setRecalculate(boolean recalculate);", "void setProbables(boolean probables);", "public void setRoundabout(java.lang.Boolean value);", "public void setDone(boolean done) {\n \tthis.done = done;\n }", "void setVisivel(boolean visivel);", "public void setIsCalculated(Boolean value) {\n this.isCalculated = value;\n }", "public static void setBooleanSwitchPossible() {\n booleanSwitchPossible = true;\n }", "void setMortgaged(boolean mortgaged);", "public void setI(boolean i) {\n\tthis.i = i;\n }", "public void setOptics(boolean value) {\n this.optics = value;\n }", "public void setWorking(boolean working) {}", "void setManualCheck (boolean value);", "public void resetFeasible() {\r\n \tstillFeasible = true;\r\n }", "public void setEditfact( boolean newValue ) {\n __setCache(\"editfact\", new Boolean(newValue));\n }", "public void setIsEffective(Boolean isEffective) {\n this.isEffective = isEffective;\n }", "void setestadoRadio(boolean x){\n estadoRadio = x;\n }", "boolean isSetCit();", "public void setYourTurn(Boolean yourTurn) {\n this.yourTurn = yourTurn;\n }", "public void setSoporteSolucionado(boolean soporteSolucionado) {\n this.soporteSolucionado = soporteSolucionado;\n }", "public void setActivo(boolean activo)\r\n/* 115: */ {\r\n/* 116:142 */ this.activo = activo;\r\n/* 117: */ }", "public void setRoad(Boolean bool) {\r\n\t \tthis.road = bool;\r\n\t }", "public void setValue(boolean value) {\n this.value = value;\n }", "public void setAchieved(Boolean newValue);", "public void setCascadedLookup(java.lang.Boolean value);", "public void setIsReal(Boolean isReal) {\n this.isReal = isReal;\n }", "public boolean setChipOnProject(Subproject project) {\n\t\tSubprojectField field=project.setChip(current.removeChip());\n\t\tcurrent.raiseScore(field.getAmountSZT());\n\t\tif(field.isVField()) {\n\t\t\treturn true;\n\t\t}\n\t\tif(field.isLastField()) {\n\t\t\tfinishProject(project);\n\t\t}\n\t\treturn false;\n\t}", "public boolean isSolvable() {\n \treturn isSolvable;\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "public boolean isSolvable() {\n return _solvable;\n }", "public void setIsCascaded(boolean isCascaded) {\r\n this.isCascaded = isCascaded;\r\n }", "public void solveIt() {\n\t\tfirstFreeSquare.setNumberMeAndTheRest();\n\t}", "public void setZero(final boolean value) {\n\t\tif (value) { \n\t\t\tsetZero();\n\t\t}\n\t\telse {\n\t\t\tresetZero();\n\t\t}\n\t}", "public void setOurs(boolean beours) {\n if (this.ours != beours) {\n if (beours) {\n setAlive(true);\n } else {\n setAlive(false);\n }\n this.ours = beours;\n }\n }", "public boolean isSolvable() {\n\t\tif (goal == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "void setInvoiced(boolean invoiced);", "public void setMine()\n {\n mine = true;\n }", "public void setDone(boolean value) {\n this.done = value;\n }" ]
[ "0.6238591", "0.6041768", "0.59106493", "0.59071326", "0.58639264", "0.58586854", "0.58139175", "0.5804128", "0.5790467", "0.5781439", "0.5768914", "0.57684684", "0.57669187", "0.57554644", "0.57175016", "0.56903", "0.56897926", "0.56889266", "0.5676154", "0.5656928", "0.5643673", "0.5627881", "0.5612652", "0.5588254", "0.5573405", "0.5565934", "0.55492115", "0.552754", "0.55211073", "0.54731303", "0.54645675", "0.5463195", "0.5462213", "0.54590446", "0.54585624", "0.5450766", "0.5439515", "0.543316", "0.5390145", "0.53847194", "0.53841233", "0.5377316", "0.5375772", "0.5372524", "0.5364701", "0.53597194", "0.53512573", "0.5351091", "0.53470904", "0.53268796", "0.5325242", "0.53197306", "0.5307617", "0.5297471", "0.52947664", "0.52942586", "0.5292002", "0.5283325", "0.5281298", "0.5276665", "0.5276067", "0.5261252", "0.5256803", "0.5255373", "0.52539736", "0.5253359", "0.5245859", "0.5245446", "0.524331", "0.5241027", "0.5239829", "0.52393013", "0.52392226", "0.52377826", "0.523267", "0.5228117", "0.52225393", "0.52180743", "0.52172005", "0.5211955", "0.520205", "0.520106", "0.51994234", "0.5198161", "0.5174875", "0.5173054", "0.5163085", "0.516304", "0.5160999", "0.51555055", "0.5147134", "0.5145712", "0.51433396", "0.51424056", "0.51377976", "0.5131004", "0.51296866", "0.5128287", "0.51281404", "0.5120157" ]
0.71571136
0
Returns true if the crime requires police assistant.
public boolean isRequiresPolice() { return mRequiresPolice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean prereqCheck(Player p){\r\n\t\t\r\n\t\tif (p.getLearning() < prereqSkill[Chips.LEARNING.ordinal()] ||\r\n\t\t\tp.getCraft() < prereqSkill[Chips.CRAFTING.ordinal()] ||\r\n\t\t\tp.getIntegrity() < prereqSkill[Chips.INTEGRITY.ordinal()]){\r\n\t\t\treturn false;\r\n\t\t} else return true;\r\n\t}", "boolean isPulsing();", "public boolean is_punctual(){\n if(this.get_punctuality() == 2){\n return true;\n } else {\n return false;\n }\n }", "public boolean isPlausible() {\n if (_isPlausible == null) {\n _isPlausible = computePlausibility();\n }\n return _isPlausible;\n }", "boolean isPwc();", "public boolean isSatisfied() {\r\n\t\tif (isParked() == true || wasParked() == true) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\n public boolean isAlcoholic() {\n return liquids\n .stream()\n .anyMatch(liquid -> liquid.getAlcoholPercent() > 0);\n }", "public void setRequiresPolice(boolean requiresPolice) {\n mRequiresPolice = requiresPolice;\n }", "boolean hasPokers();", "boolean hasPokers();", "private boolean isPregnant() {\n return this.hasCapability(LifeStage.PREGNANT);\n }", "public static boolean playsAsProtoss() {\n return AtlantisConfig.MY_RACE.equals(RaceTypes.Protoss);\n }", "public boolean presenceCheck()\r\n\t{\r\n\t\treturn validateAnswer();\r\n\t}", "private boolean askForSuperviser(Person p) throws Exception {\n\n\t\treturn p.isResearcher() && (p.getInstitutionalRoleId() > 1);\n\t}", "public boolean isCanPierce() {\n\t\treturn canPierce;\n\t}", "public abstract boolean isSatisfied();", "private boolean isCorrect() {\n return !console.getTrueFalse(\"Is this correct?>>> \");\n }", "boolean hasHasInjury();", "public boolean isPiston() {\n return this.type == Type.PISTON;\n }", "public String is_punctual_friendly(){\n this.get_punctuality();\n\n return friendly[this.punctuality];\n }", "Boolean getCompletelyCorrect();", "boolean hasHasAlcohol();", "boolean hasInitialPromptFulfillment();", "public boolean isInPitfall() {\n return isInPitfall;\n }", "boolean hasSuit();", "boolean hasResidentYn();", "public boolean isPlein() {\n\t\treturn estPlein;\n\t}", "boolean hasCorrect();", "protected boolean isPilot() {\n\t\tif (request.getSession().getAttribute(\"type\") == null)\n\t\t\treturn false;\n\t\treturn request.getSession().getAttribute(\"type\").equals(\"pilot\");\n\t}", "boolean canCrit();", "Boolean getPartiallyCorrect();", "public static boolean isLearnable(IndustrySpecAPI spec)\n {\n return true;\n }", "public boolean isRocky()\r\n\t{\r\n\t\treturn isRocky;\r\n\t}", "boolean isIntroduced();", "public boolean parrotTrouble(boolean talking, int hour) {\n return (talking && (hour < 7 || hour > 20));\n}", "public boolean addIndustrialPrimitiveCockpit() {\n if (getEmptyCriticals(LOC_HEAD) < 5) {\n return false;\n }\n addCritical(LOC_HEAD, 0, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_LIFE_SUPPORT));\n addCritical(LOC_HEAD, 1, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_SENSORS));\n addCritical(LOC_HEAD, 2, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_COCKPIT));\n addCritical(LOC_HEAD, 4, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_SENSORS));\n addCritical(LOC_HEAD, 5, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_LIFE_SUPPORT));\n setCockpitType(COCKPIT_PRIMITIVE_INDUSTRIAL);\n return true;\n }", "default public boolean getSoundness() {\n if (getValidity()) {\n for (Proposition premise : getPremises()) {\n if (!premise.determineTruth()) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n }", "boolean isOnlineEvaluation();", "public boolean isPerishable() {\r\n return perishable;\r\n }", "public static boolean isPoker(){\n return (frequencyCount[4]==1);\n }", "boolean hasCandidate();", "public boolean isProved() {\n\t\treturn proveState == PROVED;\n\t}", "public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }", "private static void readIsPracticeBot() {\n isPracticeBot = !practiceInput.get();\n }", "boolean contemProfessor(String cpf);", "private boolean isPersonResponsibleForProcedure(IacucProtocolPerson iacucProtocolPerson, IacucProtocolStudyGroup iacucProtocolStudyGroup) {\n boolean personResponsibleForProcedure = false;\n for(IacucProcedurePersonResponsible IacucProcedurePersonResponsible : iacucProtocolStudyGroup.getIacucProcedurePersonResponsibleList()) {\n if(IacucProcedurePersonResponsible.getProtocolPersonId().equals(iacucProtocolPerson.getProtocolPersonId())) {\n personResponsibleForProcedure = true;\n break;\n }\n }\n return personResponsibleForProcedure;\n }", "private boolean startScouting(){\n\t\t// calculate motivation to forage based on amount of food in hive\n\t\tdouble motivation = 1 - (hive.food/hive.foodCapacity);\n\t\t\n\t\t// calculate motivation to follow dance based on amount of dances\n\t\tdouble danceFactor = (1-Math.exp((-1/colonySize)*hive.dancingBees.size()));\n\t\t\n\t\t// calculate whether or not bee should scout\n\t\tif(RandomHelper.nextDoubleFromTo(0,1) < scoutProb*motivation + \n\t\t\t\t(1-scoutProb)*motivation*(1-danceFactor)*scoutProb){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// otherwise follow a dance\n\t\treturn false;\n\t}", "public boolean canBeActivated(Player p) {\n if (p == null) throw new IllegalArgumentException(\"Argument is null\");\n int i;\n boolean retValue;\n\n retValue = true;\n for (i = 0; i < requirements.length && retValue; i++) {\n retValue = requirements[i].checkRequirement(p);\n }\n return retValue;\n }", "boolean hasFairplay();", "public boolean isRocky() {\r\n\t\treturn this.rocky;\r\n\t}", "boolean hasHasAlcoholResult();", "public boolean canOfferInsurance() {\n\t\treturn this.hand.getCards().get(0) == Card.ACE;\n\t}", "public boolean canCompete(String t){\n\t\tif(talents != null)\n\t\t{\n\t\t\tint i;\n\t\t\tfor(i = 0; i < talents.length; i++)\n\t\t\t\tif (talents[i] == t)\n\t\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n }", "public abstract boolean isPossible(Player p);", "boolean hasDecision();", "boolean hasDecision();", "boolean isMet();", "public boolean isCompetitive() {\n return competitive;\n }", "boolean hasHasAlcoholSpecimanType();", "public boolean muerteInesperada() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probMuerte) <= 0;\r\n }", "boolean hasCorrectAnswer();", "public boolean isPrimitive() {\n return (getCockpitType() == Mech.COCKPIT_PRIMITIVE) || (getCockpitType() == Mech.COCKPIT_PRIMITIVE_INDUSTRIAL);\n }", "private boolean canResumeGame() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n && isGamePaused();\n }", "public boolean addPrimitiveCockpit() {\n if (getEmptyCriticals(LOC_HEAD) < 5) {\n return false;\n }\n addCritical(LOC_HEAD, 0, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_LIFE_SUPPORT));\n addCritical(LOC_HEAD, 1, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_SENSORS));\n addCritical(LOC_HEAD, 2, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_COCKPIT));\n addCritical(LOC_HEAD, 4, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_SENSORS));\n addCritical(LOC_HEAD, 5, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_LIFE_SUPPORT));\n setCockpitType(COCKPIT_PRIMITIVE);\n return true;\n }", "public static boolean isPyrimidic(char iupac) {\n\tswitch(iupac) {\n\tcase 'T': case 't' :\n\tcase 'U': case 'u':\n\tcase 'C': case 'c':\n\tcase 'Y': case 'y':\n\t\treturn true;\n\tdefault: return false;\n\t}\n}", "boolean hasPokemon();", "boolean contemProfessor(Professor p);", "public boolean isGoal();", "boolean isGoodQuestion(){\n\t\treturn goodQ;\n\t}", "boolean hasPants();", "public abstract boolean isGoal(CCState state);", "boolean hasActivePokemon();", "protected boolean isValidInteractee() {\n\t\treturn interactee.isInteracteeNeutral(xGameCoord, yGameCoord, orientation);\n\t}", "private boolean isMancalaPit(Pit aPit) {\n\t\tif (aPit.getPitNumber() == 7) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasReqardTypeThree();", "public boolean isPerPerson() {\n return perPerson;\n }", "boolean getCorrect();", "private boolean pptIsAvailable() {\n try {\n pinpoint = new pinpointInterface(true);\n } catch (NoConnectionException ex) {\n JOptionPane.showMessageDialog(RACApp.getApplication().getMainFrame(),\n \"No PIN Points were found.\\nPlease make sure it is plugged in and turned on.\",\n \"PIN POINT NOT FOUND\",\n JOptionPane.ERROR_MESSAGE);\n return false;\n } catch (Exception ex) {\n return false;\n }\n return true;\n }", "public boolean isPrime()\n\t{\n\t\treturn ! exactDivision;\n\t}", "public boolean takeControl() {\n\t\tif (Squirrel.us.getDistance() <= 30 && Squirrel.notDetected)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "boolean hasHas_certainty();", "@Test\n public void euclidesAreCoprimeTest_pseudoprimeCoprimes() {\n BigInteger a = new BigInteger(\"33153\");\n // pseudoprime (151 * 331)\n BigInteger b = new BigInteger(\"49981\");\n boolean result = Algo.euclidesAreCoprime(a, b);\n assertTrue(result);\n }", "public boolean isGoal(){\n char c = this.getGoalLetter();\n return 'a' <= c && c <= 'z'; // will return true if goalLetter is a lowercase letter\n }", "public boolean isPistonACEngine () \n\t{\n\t\tObject oo = get_Value(COLUMNNAME_IsPistonACEngine);\n\t\tif (oo != null) \n\t\t{\n\t\t\t if (oo instanceof Boolean) \n\t\t\t\t return ((Boolean)oo).booleanValue(); \n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "public boolean isFromAuthoritative()\n {\n if ((this.flag & 0x0400) == 0)\n {\n // not from a authoritative server\n return false;\n }\n\n else return true;\n }", "boolean hasRecommendation();", "public static boolean isPuryn(char iupac) {\n\tswitch(iupac) {\n\tcase 'A': case 'a' :\n\tcase 'G': case 'g':\n\tcase 'R': case 'r':\n\t\treturn true;\n\tdefault: return false;\n\t}\n}", "public boolean addCockpit() {\n if (getEmptyCriticals(LOC_HEAD) < 5) {\n return false;\n }\n addCritical(LOC_HEAD, 0, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_LIFE_SUPPORT));\n addCritical(LOC_HEAD, 1, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_SENSORS));\n addCritical(LOC_HEAD, 2, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_COCKPIT));\n addCritical(LOC_HEAD, 4, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_SENSORS));\n addCritical(LOC_HEAD, 5, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_LIFE_SUPPORT));\n setCockpitType(COCKPIT_STANDARD);\n return true;\n }", "boolean hasCampaignExperiment();", "private boolean canAccept(Planet planet, Person person) {\n Skillset peS = person.getSkills();\n Skillset plS = planet.getSkills();\n return peS.getAgriculture() >= plS.getAgriculture() && peS\n .getMedicine() >= plS.getMedicine() && peS.getTechnology() >= plS\n .getTechnology();\n }", "boolean hasPublicProfile();", "boolean hasResidues();", "public static boolean isWorthyCompCape(Player player) {\n\t\tboolean worthy;\n\t\tif (isMaxed(player)\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.DUNGEONEERING) == 120 \n\t\t\t\t&& player.isKilledQueenBlackDragon()\n\t\t\t\t&& player.isCompletedFightCaves()\n\t\t\t\t&& player.isKilledCulinaromancer()\n\t\t\t\t&& player.getQuestManager().completedQuest(Quests.NOMADS_REQUIEM)\n\t\t\t\t&& player.isCompletedFightKiln())\n\t\t\tworthy = true;\n\t\telse\n\t\t\tworthy = false;\n\t\treturn worthy;\n\t}", "public boolean checkNaturals() {\n return getSize() == 2 && handValue() == 21;\n }", "boolean hasHadithChapterIntro();", "boolean hasPokerId();", "boolean isAlwaysTrue();", "public boolean estPlein() {\n return this.tapis.size() == capacite;\n }", "public static boolean canLearn(Thing b,String s) {\r\n \t\tString order=getOrder(s);\r\n \t\treturn b.getStat(order)>0;\r\n \t\t//return RPG.test(b.getStat(RPG.ST_LEVEL), levels[type]);\r\n \t}", "boolean puedoHipotecar(Casilla casilla){\n //Para poder hipotecar la casilla tiene que ser propiedad del jugador.\n return this.esDeMipropiedad(casilla);\n }" ]
[ "0.65809727", "0.6525939", "0.62828135", "0.62394804", "0.6221136", "0.611795", "0.60872436", "0.60591996", "0.59438217", "0.59438217", "0.59323364", "0.591411", "0.5880286", "0.5874819", "0.58232874", "0.5783024", "0.5765624", "0.57467544", "0.5741113", "0.5714262", "0.57013124", "0.56959903", "0.5673634", "0.5671721", "0.5660969", "0.56424385", "0.5637595", "0.56308913", "0.56302994", "0.56302595", "0.5616828", "0.5614974", "0.56027263", "0.5602157", "0.5590944", "0.5580379", "0.55478454", "0.55395377", "0.55386585", "0.5528612", "0.5525483", "0.5522434", "0.5516249", "0.5515942", "0.54863125", "0.5485762", "0.547204", "0.546343", "0.54529274", "0.5452726", "0.5442689", "0.5427665", "0.54227483", "0.5415955", "0.54153496", "0.54153496", "0.5411765", "0.54096824", "0.5407737", "0.54070264", "0.5405614", "0.5402652", "0.5399573", "0.53994495", "0.5396512", "0.5379968", "0.53710574", "0.5366803", "0.5361933", "0.5352506", "0.5352331", "0.5350475", "0.5349426", "0.5340456", "0.5337338", "0.53333026", "0.53287876", "0.53222924", "0.5321399", "0.531818", "0.5315666", "0.5305595", "0.5299475", "0.5298003", "0.528869", "0.52789795", "0.52783495", "0.52706534", "0.5265896", "0.52638566", "0.526366", "0.5251435", "0.52445877", "0.52406114", "0.52369505", "0.5233377", "0.5228375", "0.52280754", "0.52273893", "0.52240956" ]
0.703011
0
Sets whether the crime requires police assistant.
public void setRequiresPolice(boolean requiresPolice) { mRequiresPolice = requiresPolice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isRequiresPolice() {\n return mRequiresPolice;\n }", "private void SetInitialPoliticalParty() {\n\t\tif(debug) logger.info(\"SetInitialPoliticalParty: Entering\");\n\t\tint rand = Random.randomInt(100);\t\t \n\t\tif(debug) logger.info(\"SetInitialPoliticalParty: rand = \" + rand);\n\t\tif (rand < 50) {\n\t\t\tsetDemocratElected(true);\t\t\t\n\t\t}\n\t\telse {\n\t\t\tsetDemocratElected(false);\n\t\t}\n\t\tif(debug) logger.info(\"SetInitialPoliticalParty: Returning\");\n\t}", "public void setPiston(boolean x){\n armPiston.set(x);\n }", "void setProbables(boolean probables);", "public void setPerishable(boolean value) {\r\n this.perishable = value;\r\n }", "public void setP(boolean p) {\n\tthis.p = p;\n }", "public void setCompetitive(boolean value) {\n this.competitive = value;\n }", "public void setInPitfall(boolean inPitfall) {\n isInPitfall = inPitfall;\n }", "public void setPerPerson(boolean value) {\n this.perPerson = value;\n }", "public void setAI(boolean ai) {\r\n this.ai = ai;\r\n }", "public void setTruthChallenge() {\n while (!(getActiveChallenge()).contains(\"Truth\")) {\n categories.get(indexOfActiveCategory).increaseIndexOfActiveChallenge();\n }\n }", "public void setTypal(boolean value) {\n this.typal = value;\n }", "public void setProcentasePresence(double procentasePresence) {\n this.procentasePresence = procentasePresence;\n }", "public void setPcr(boolean pcr) {\n this.pcr = pcr;\n }", "public void setCanPierce(boolean canPierce) {\n\t\tthis.canPierce = canPierce;\n\t}", "protected void setProved() {\n\t\tproveState = PROVED;\n\t}", "private boolean askForSuperviser(Person p) throws Exception {\n\n\t\treturn p.isResearcher() && (p.getInstitutionalRoleId() > 1);\n\t}", "void setProtection(boolean value);", "public void setValidated(Player p, boolean value) {\n this.getInstance(p).setValidated(value);\n }", "public void setProtection(boolean value);", "public void setAchieved(Boolean newValue);", "public void setCorrect(boolean ncorrect) {\r\n this.correct = ncorrect;\r\n }", "public void setIsPrime()\n\t{\n\t\tint divisor = 2;\n\t\tdo\n\t\t{\n\t\t\tif (number % divisor == noRemainder)\n\t\t\t{\n\t\t\t\texactDivision = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\texactDivision = false;\n\t\t\t}\n\t\t\tdivisor++;\n\t\t} while (divisor < number && exactDivision == false);\n\t}", "public void setCorrectFlag(){\n\t\tcorrectFlag = true;\n\t}", "public boolean isPlausible() {\n if (_isPlausible == null) {\n _isPlausible = computePlausibility();\n }\n return _isPlausible;\n }", "@VisibleForTesting\n public void setAssistantVisible(boolean z) {\n updateBiometricListeningState();\n }", "final void setProtection(boolean required)\r\n {\r\n requires_PRO = required;\r\n }", "public void setRoundabout(java.lang.Boolean value);", "public void setForua(boolean newValue);", "public void setIsElectronic(boolean value) {\n this.isElectronic = value;\n }", "public void setParking(java.lang.Boolean value);", "public void setMandatory(boolean mandatory)\n {\n this.mandatory = mandatory;\n performFlags();\n }", "void setRequired(boolean required);", "public void setPrimeiraLeitura(boolean primeiraLeitura) {\n this.primeiraLeitura = primeiraLeitura;\n }", "public boolean setDangerous() {\r\n\t\tif(!isDangerous && isCovered) {\r\n\t\t\tisDangerous=true;\r\n\t\t\t\r\n\t\t\tthis.setChanged();\r\n\t\t\tthis.notifyObservers();\r\n\t\t\tthis.clearChanged();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void check_always_true_condition(boolean on){\r\n this.e_always_true_condition = on;\r\n }", "public boolean prereqCheck(Player p){\r\n\t\t\r\n\t\tif (p.getLearning() < prereqSkill[Chips.LEARNING.ordinal()] ||\r\n\t\t\tp.getCraft() < prereqSkill[Chips.CRAFTING.ordinal()] ||\r\n\t\t\tp.getIntegrity() < prereqSkill[Chips.INTEGRITY.ordinal()]){\r\n\t\t\treturn false;\r\n\t\t} else return true;\r\n\t}", "void setManualCheck (boolean value);", "public void setLotOriented(boolean value) {\n this.lotOriented = value;\n }", "void setEmisoraRadioCambio(boolean x){\n this.emisoraRadio = x;\n }", "public void setInvincible(boolean i) {\n \tthis.invincible = i;\n \tthis.UIgnome().set(i);\n \tif(!i) {\n \t\tthis.steptracer = 0;\n \t}else {\n \t\tdungeon.invincibilityLeft().set(\"Invincibility Steps: 25\\n\");\n \t}\n }", "private static void readIsPracticeBot() {\n isPracticeBot = !practiceInput.get();\n }", "void set(boolean on);", "public void check_always_false_condition(boolean on){\r\n this.e_always_false_condition = on;\r\n }", "public void setIswialon(Boolean iswialon) {\r\n this.iswialon = iswialon;\r\n }", "protected abstract void setPpl();", "public void setTallied(java.lang.Boolean value);", "public void setPaid() {\n isPaid = true;\n }", "public void setOn(boolean arg) {\n isOn = arg;\n }", "public boolean isCanPierce() {\n\t\treturn canPierce;\n\t}", "public void setIsChosen(boolean isChosen);", "@Override\n public void initialize() {\n intake.intakePistons.set(true);\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"True if this Participant has talk privileges in the Conference. False otherwise.\")\n\n public Boolean getTalk() {\n return talk;\n }", "public void turnOn(boolean truth) {\r\n setEnabled(truth);\r\n }", "public boolean is_punctual(){\n if(this.get_punctuality() == 2){\n return true;\n } else {\n return false;\n }\n }", "public Builder setCorrect(boolean value) {\n bitField0_ |= 0x00000001;\n correct_ = value;\n onChanged();\n return this;\n }", "private void setChemical(boolean chemical) {\n this.chemical = chemical;\n }", "public void setProposition(String string);", "void setInvoiced(boolean invoiced);", "public boolean isRocky()\r\n\t{\r\n\t\treturn isRocky;\r\n\t}", "public void setCarry(final boolean value) {\n\t\tif (value) {\n\t\t\tsetCarry();\n\t\t}\n\t\telse {\n\t\t\tresetCarry();\n\t\t}\n\t}", "public void setYourTurn(Boolean yourTurn) {\n this.yourTurn = yourTurn;\n }", "public void accomplishGoal() {\r\n isAccomplished = true;\r\n }", "@Test\r\n\tpublic void testSetGetTravelNeeded() {\r\n\t\tteachu1.setTravelNeed(false);\r\n\t\tassertFalse(teachu1.getTravelNeed());\r\n\r\n\t\tteachu1.setTravelNeed(true);\r\n\t\tassertTrue(teachu1.getTravelNeed());\r\n\t}", "private void turnOnSpeakerPhone() {\n mAudioManager.setMode(AudioManager.MODE_IN_CALL);\n mAudioManager.setSpeakerphoneOn(true);\n }", "public boolean isInPitfall() {\n return isInPitfall;\n }", "private void setDegreeRequired ()\r\n {\r\n int j = 0;\r\n\r\n while (j < CAREERS.length && !CAREERS[j].equalsIgnoreCase (name))\r\n j++;\r\n\r\n if (j <= 3)\r\n degreeRequired = true;\r\n else degreeRequired = false;\r\n }", "public void setRequired(boolean required);", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setPickable(boolean pickable);", "public void setWon(){\n won = true;\n }", "String propose() {\r\n Person person = preferences[pointer];\r\n partner = determinePartner(person);\r\n String result;\r\n if (partner == null) {\r\n result = person.name + \" rejects. \";\r\n } else if (ex == null || ex.isEmpty()) {\r\n result = person.name + \" accepts. \";\r\n } else {\r\n result = person.name + \" dumps \" + ex + \", gets engaged to \" + name + \".\";\r\n }\r\n pointer++;\r\n ex = \"\";\r\n return name + \" proposes to \" + person.name + \". \" + result;\r\n }", "public void setHuman(boolean value) {\r\n this.human = value;\r\n }", "public boolean isPiston() {\n return this.type == Type.PISTON;\n }", "boolean isSetWhoOwnsWhom();", "public void setQwertyMode(boolean isQwerty);", "public void setHarvested(boolean harvested);", "boolean isPulsing();", "public void setAI ( boolean ai ) {\n\t\ttry {\n\t\t\tinvoke ( \"setAI\" , new Class[] { boolean.class } , ai );\n\t\t} catch ( NoSuchMethodException e ) {\n\t\t\thandleOptional ( ).ifPresent ( handle -> EntityReflection.setAI ( handle , ai ) );\n\t\t}\n\t}", "private void setTalking(boolean talking) {\n\t\ttalkmode = talking;\n\t\ttalkingVillager.setTalking(talking, Values.getCounterAngle(player.direction));\n\t\tplayer.stop();\n\t}", "public void setAvisCourtier(Boolean avisCourtier) {\r\n this.avisCourtier = avisCourtier;\r\n }", "public void setTurning(java.lang.Boolean value);", "@Override\r\n\tpublic boolean seLanceSurServiteurProprietaire() {\n\t\treturn false;\r\n\t}", "public void setClaim(boolean a){\n isClaimed= a;\n \n}", "public void setUnproved() {\n\t\tproveState = UNPROVED;\n\t}", "@Override\n public void setAiIsOn(boolean aiIsOn)\n {\n this.aiIsOn = aiIsOn;\n }", "boolean isSetParlay();", "public void setToroidal(boolean newStatus) {\n toroidal = newStatus;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. \")\n\n public Boolean getTalk() {\n return talk;\n }", "void changeAcceptance(final boolean acceptance);", "public void setCertificado(boolean certificado) {\n this.certificado = certificado;\n }", "public void changePowerUp(boolean powerUpQuestion)\n {\n this.currentState = ClientStateName.POWERUP;\n setChanged();\n notifyObservers(currentState);\n }", "public void setPeutTirer(boolean peutTirer) {\n this.peutTirer = peutTirer;\n }", "protected void setPossib(Possibility possib) {\n\t\tthis.possib = possib;\r\n\t}", "public void setSex(Boolean sex);", "public static void setOnline(boolean flag) {\r\n ONLINE = flag;\r\n }", "protected void initialize()\n\t{\n\t\tenable = SmartDashboard.getBoolean(RobotMap.EnableRespoolWinch);\n\t}", "public void setIndicative(String string) {\n\t\t\r\n\t}", "public void presetTrueFalse() {\n pollOptions.clear();\n pollOptions.add(\"True\");\n pollOptions.add(\"False\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }", "@Override\n public void togglePrimaryCaregiver(boolean b) {\n }" ]
[ "0.67140967", "0.60833395", "0.6017485", "0.5936", "0.58123463", "0.57347566", "0.57211035", "0.55727595", "0.55600965", "0.5479672", "0.5462471", "0.54285854", "0.5402624", "0.5400314", "0.5383403", "0.5380922", "0.53534436", "0.5334981", "0.53280234", "0.52968144", "0.5290582", "0.5254642", "0.5199865", "0.519425", "0.5190019", "0.51752955", "0.51727736", "0.5168299", "0.5165975", "0.5165169", "0.5148274", "0.51437634", "0.5132387", "0.5120963", "0.51088226", "0.51025933", "0.5096497", "0.5091429", "0.50645584", "0.5063316", "0.5062989", "0.50623494", "0.50601673", "0.5055363", "0.50502914", "0.5035106", "0.50324684", "0.50199467", "0.5011856", "0.5010666", "0.5004386", "0.499673", "0.4986646", "0.4983782", "0.49827933", "0.4976626", "0.49725226", "0.4968766", "0.4960811", "0.4956469", "0.49471614", "0.49460554", "0.49443066", "0.49408972", "0.49381068", "0.4936231", "0.493281", "0.49240407", "0.49230978", "0.49174553", "0.49149957", "0.49138775", "0.49119225", "0.4911533", "0.49111584", "0.49015746", "0.49012703", "0.48998186", "0.48960763", "0.4892748", "0.48891774", "0.48775613", "0.4877306", "0.48772055", "0.48749056", "0.48604465", "0.4855659", "0.48532528", "0.48515135", "0.4849195", "0.48465055", "0.4843481", "0.48276815", "0.4824688", "0.48219138", "0.48214814", "0.48155785", "0.48065734", "0.4802071", "0.47986737" ]
0.7307765
0
Returns the crime's suspect name.
public String getSuspect() { return mSuspect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\r\n return \"Boyer/Moore-Suche in Strings\";\r\n }", "private String getSuitName() {\n String result;\n if (this.suit == 0) {\n result = \"Clubs\";\n } else if (this.suit == 1) {\n result = \"Diamonds\";\n } else if (this.suit == 2) {\n result = \"Hearts\";\n } else {\n result = \"Spades\";\n }\n return result;\n }", "public String getUserSciper() {\n String sciper = \"\";\n try {\n sciper = fAuth.getCurrentUser().getDisplayName();\n } catch (NullPointerException e) {\n e.printStackTrace();\n Toast.makeText(this, R.string.toast_no_connection, Toast.LENGTH_SHORT)\n .show();\n return \"\";\n }\n return sciper;\n }", "public String getSname() {\n return sname;\n }", "public String getFaculty() {\n String tamperedFaculty = faculty.toUpperCase();\n return tamperedFaculty;\n }", "public String name() {\n return celestialName;\n }", "public String getSuitString()\n {\n switch (suit)\n {\n case SPADES: return \"SPADES\";\n case CLUBS: return \"CLUBS\";\n case DIAMONDS: return \"DIAMONDS\";\n case HEARTS: return \"HEARTS\";\n default: return \"Invalid\";\n }\n \n }", "String getSurname();", "public String getNiceName() {\n\t\treturn niceName;\n\t}", "public String getNotchianName();", "String getCurrentUserDisplayName() throws Exception;", "public final java.lang.String getDisplayName() { throw new RuntimeException(\"Stub!\"); }", "public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "public String getNiceName()\n {\n String name = getBuildFile().getName();\n\n return Utility.replaceBadChars(name);\n }", "public String getName(){\n\t\treturn girlName;\r\n\t}", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "java.lang.String getSchoolName();", "java.lang.String getSurname();", "String displayName();", "String displayName();", "public String getName() {\n return stid.trim() + std2.trim();\n }", "String simpleName();", "public String getName(){\r\n\t\tString s=\"\";\r\n\r\n\t\tif(getPersonId() != null && getPersonId().length() != 0)\r\n\t\t\ts += \" \" + getPersonId();\r\n\t\t\r\n\t\tif(getStudySubjectId() != null && getStudySubjectId().length() != 0)\r\n\t\t\ts += \" \" + getStudySubjectId();\r\n\r\n\t\tif(getSecondaryId() != null && getSecondaryId().length() != 0)\r\n\t\t\ts += \" \" + getSecondaryId();\r\n\r\n\t\treturn s;\r\n\t}", "String fullName();", "public String getName() {\n return sname;\n }", "public String getName() {\n\t\treturn ((name != null) && !name.isEmpty()) ? name\n\t\t\t\t: (\"[\" + Long.toString(dciId) + \"]\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t}", "public java.lang.String getFriendlyName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FRIENDLYNAME$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public static String generatePatientName(){\n\n\t\tString retName = \"\";\t// return this string\n\n\t\t// Seed random generator\n\t\tRandom generator = new Random();\n\n\t\tint length = getRandomBetween(5,6);\n\n\t\t// CVCCVC or VCCVCV\n\t\tif(getRandomBetween(1,2) < 2)\n\t\t{\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName = retName.toUpperCase();\n\t\t\tretName += getRandomVowel();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomConsonant();\n\t\t\tif (length >= 5) { retName += getRandomVowel(); }\n\t\t\tif (length >= 6) { retName += getRandomConsonant(); }\n\t\t}\n\t\telse\n\t\t{\n\t\t\tretName += getRandomVowel();\n\t\t\tretName = retName.toUpperCase();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomVowel();\n\t\t\tif (length >= 5) { retName += getRandomConsonant(); }\n\t\t\tif (length >= 6) { retName += getRandomVowel(); }\n\t\t}\n\n\t\treturn retName;\n\t}", "public String newHumanName() {\n return String.format(\"%s %s\", newName(4, 6), newName(4, 8));\n }", "String getSupName();", "public String findWinnerName(){\n\t\t\n\t\tContestant t = contestants[0][0];\n\t\t\n\t\tfor (int i = 0; i < contestants.length; i++) {\n\t\t\tfor (int j = 0; j < contestants[i].length; j++) {\n\t\t\t\tif(contestants[i][j].getScore()>t.getScore()) {\n\t\t\t\t\tt = contestants[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn t.getName();\n\t}", "public String getUserDisplayName() throws Exception\r\n {\n return null;\r\n }", "private String getName()\r\n {\r\n return JOptionPane.showInputDialog(frame, \"Choose a screen name:\", \"Screen name selection\",\r\n JOptionPane.PLAIN_MESSAGE);\r\n }", "String getCruiseName();", "public String getSurname()\n\t{\n\t\treturn getSurname( getSession().getSessionContext() );\n\t}", "public String showName(){\r\n\t\tSystem.out.println(\"This is a \" + name);\r\n\t\treturn name;}", "String getDisplay_name();", "java.lang.String getGameName();", "java.lang.String getGameName();", "public String getGoodname() {\r\n return goodname;\r\n }", "public String getName()\n {\n return name.toUpperCase();\n }", "public String getSpecies() {\n if(species == null)\n return \"\";\n return species;\n }", "@Override\n\tpublic String getNaam(){\n\t\tString pName= ctx.getCallerPrincipal().getName();\n\t\tPerson p=userEJB.findPerson(pName);\n\t\tString w=p.getName();\n\t\treturn w;\n\t}", "public static String getUserName(Scanner read) {\n System.out.println(\"Welcome to Rock Paper Scissors. I, the computer, will be your opponent.\");\n System.out.print(\"Please type in your name and press return: \");\n return read.nextLine();\n }", "public static String inputName() {\n return GolferScoresTree.inputString(\"Golfer name: \");\n }", "public String getGoodname() {\n return goodname;\n }", "public static String name(){\n return \"10.Schneiderman.Lorenzo\"; \n }", "public String getColouredName() {\n\t\tConfigManager crates = new ConfigManager(\"crates.yml\");\n\t\tcrates.get().getString(\"crates.\"+name.toLowerCase()+\".colouredName\");\n\t\treturn new String(ChatColor.translateAlternateColorCodes('&', crates.get().getString(\"crates.\"+name+\".colouredName\")));\n\t}", "public String getTheName() {\n\t\treturn name.getText();\n\t}", "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "String getPreferredName();", "public String getReal_name() {\n return real_name;\n }", "Caseless getName();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "String name();", "public String getCouseName() {\n return couseName;\n }", "String realmDisplayName();" ]
[ "0.6466023", "0.6464554", "0.63427657", "0.6301697", "0.62828064", "0.62273604", "0.6207728", "0.6200361", "0.6153033", "0.6152493", "0.60900253", "0.6076098", "0.6065371", "0.6064367", "0.6064367", "0.6064367", "0.6064367", "0.6064367", "0.6064367", "0.6049381", "0.6024326", "0.60184765", "0.60184765", "0.60184765", "0.60184765", "0.60184765", "0.60184765", "0.6001231", "0.5981741", "0.59817207", "0.59817207", "0.59669274", "0.59601194", "0.59534234", "0.59523976", "0.5945872", "0.59331936", "0.5929612", "0.59191674", "0.59085155", "0.59076136", "0.59018743", "0.5880824", "0.5877971", "0.58668077", "0.5857366", "0.5847903", "0.58422995", "0.58411777", "0.58411777", "0.58362615", "0.5824562", "0.58209413", "0.58167326", "0.5810349", "0.5803255", "0.58000034", "0.57960534", "0.5776385", "0.5775885", "0.5774947", "0.5770917", "0.57706004", "0.5769001", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57679385", "0.57631624", "0.5761916" ]
0.0
-1
Sets the crime's suspect name.
public void setSuspect(String suspect) { mSuspect = suspect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setName(String name){\r\n gotUserName = true;\r\n this.name = name;\r\n }", "public final void setName(String name) {_name = name;}", "public void setName(String s) {\n this.name = s;\n }", "protected void setName(final String theName)\r\n {\r\n _theName = theName;\r\n }", "public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}", "public static void setName(String n){\n\t\tname = n;\n\t}", "public void setName(String n) {\r\n name = n;\r\n }", "public void setName (String n) {\n name = n;\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "void setName(String name_);", "private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }", "public void setName(String theName)\n\t{\n\t\tthis.theName=theName;\n\t\tif(theName.length()==0)\n\t\t{\n\t\t\tthis.theName=\"**No Name**\";\n\t\t}\n\t}", "public void setName(String newName){\n name = newName;\n }", "public void setName(String newname)\n {\n name = newname;\n \n }", "@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }", "public void setName(String name) {\n//\t\tif((name==null) || (name.length()<2)){\n//\t\t\tthrow new RuntimeException(\"Name muss mindestens 2 Zeichen enthalten!\");\n//\t\t}\n\t\tthis.name = name;\n\t}", "void setName(String s);", "public void setName(String name) {\n\t\tName = name;\n\t}", "public void setName(final String name);", "public void setName( String pName )\n {\n name = pName;\n }", "public void setName(String name)\r\n\t{\r\n\t\tthis.name = name.trim();\r\n\t\tif(name.length() > 0)\r\n\t\t{\r\n\t\t this.sponsorFirstChar = Character.toLowerCase(name.charAt(0));\r\n\t\t}\r\n\t\t\r\n\t}", "public void setName(String inName)\n {\n\tname = inName;\n }", "public void setName(String newname){\n name = newname; \n }", "protected void setName(String name) {\n this._name = name;\n }", "public void setName(String inName)\n {\n name = inName;\n }", "protected void setName(String name) {\r\n this.name = name;\r\n }", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "public void setName(String newName){\n name=newName;\n }", "protected final void setName(final String name) {\n this.name = name;\n }", "public void setName(String n){ name=n; }", "public void setName(String name) throws Exception;", "public void setName(String name) {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE, 0);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t\teditor.putString(USERNAME_KEY, name);\n\t\teditor.commit();\n\t}", "public void setName(String name){\n \t\tthis.name = name;\n \t}", "public void setName(String Name){\r\n name = Name;\r\n }", "public void setName(String name)\n \t{\n \t\tthis.name = name;\n \t}", "public void setName(String name)\r\n\t{\r\n\t\tthis.nome = nome;\r\n\t}", "public void setName(String newName) {\n this.name = newName;\n }", "public void setName(String name) {\n _name = name;\n }", "protected void setName(String name) {\n this.name = name;\n }", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "public void setName(String n) {\n this.name = n;\n }", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String newName) {\n name = newName;\n }", "public final void setName(String name) {\n\t\tthis.name = name;\n\t}", "public String setName(String name){\n return personName = name;\n }", "public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }", "public void setName(String new_name){\n this.name=new_name;\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "public void setName(String newname) {\n name=newname;\n }", "protected void setName(String newName) {\n\t\tname = newName;\n\t}", "public void setName( final String name )\r\n {\r\n this.name = name;\r\n }", "public void setName(String string) {\n\t\t\n\t}", "public void setName(String name)\r\n\t{\t\t\r\n\t\tthis.name = name;\r\n\t}", "void setName(String name) {\n setStringStat(name, playerName);\n }", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName( String name )\n {\n this.name = name;\n }", "protected void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String newName) {\n name = newName;\n }", "public void setName(String newName) {\n name = newName;\n }", "public void setName(String name) {\n monsterName = name;\n }", "public void setName(String name) {\n monsterName = name;\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\n \t\tthis.name = name;\n \t}", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public void setName (String name){\n \n boyName = name;\n }", "public void setName(String name)\n {\n fName = name;\n }", "public void setName(String n) {\r\n\t\tthis.name = n;\r\n\t}", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name) \n {\n this.name = name;\n }", "public void setName(String name) {\n \tif (name==null)\n \t\tthis.name = \"\";\n \telse\n \t\tthis.name = name;\n\t}", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setNameString(String s) {\n nameString = s;\r\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }" ]
[ "0.71173763", "0.7047202", "0.7004318", "0.6977531", "0.69644207", "0.69502467", "0.69372064", "0.69351196", "0.6931499", "0.69140047", "0.69116575", "0.69015455", "0.68406457", "0.68182105", "0.681515", "0.6811779", "0.6804578", "0.67987406", "0.6798669", "0.67874676", "0.67856383", "0.6780274", "0.677491", "0.67740434", "0.6766925", "0.6765456", "0.67631215", "0.67631215", "0.67631215", "0.67631215", "0.67631215", "0.67631215", "0.67630094", "0.67623", "0.67612845", "0.6759224", "0.6758495", "0.6757375", "0.6752884", "0.6752723", "0.67512554", "0.67466944", "0.6741767", "0.6737628", "0.67343307", "0.67343307", "0.67343307", "0.6733317", "0.67303234", "0.67303234", "0.67303234", "0.6726835", "0.6715239", "0.6715219", "0.6714995", "0.67119104", "0.67114276", "0.67114276", "0.67063946", "0.67016256", "0.67010117", "0.66992086", "0.66949743", "0.6694237", "0.66895574", "0.66867936", "0.66867936", "0.66834027", "0.66808355", "0.66808355", "0.66798484", "0.66798484", "0.667795", "0.667795", "0.667795", "0.66772443", "0.66761446", "0.66753834", "0.6675142", "0.66735095", "0.66695654", "0.66695654", "0.66695654", "0.66695654", "0.6668183", "0.6666101", "0.66653204", "0.66653204", "0.66653204", "0.66653204", "0.66653204", "0.66653204", "0.66653204", "0.66653204", "0.66653204", "0.66653204", "0.6663474", "0.6663474", "0.6663474", "0.6663114", "0.6663007" ]
0.0
-1
Returns the suspect's phone number.
public String getSuspectNum() { return mSuspectNum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "java.lang.String getUserPhone();", "java.lang.String getPhonenumber();", "java.lang.String getPhone();", "public String getPhoneNumber() throws NullPointerException {\n\n\t\tString phoneNumber = user.getPhoneNumber();\n\t\tif (phoneNumber == null || phoneNumber.isEmpty()) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\n\t\treturn Utils.formatPhoneNumber(phoneNumber);\n\t}", "public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}", "public String getPhoneNumber()\n\t{\n\t\treturn this._phoneNumber;\n\t}", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n phoneNumber_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n phoneNumber_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getContactPhoneNumber()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONTACTPHONENUMBER$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public long getPhoneNumber() {\r\n\t\treturn phoneNumber;\r\n\t}", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n phoneNumber_ = s;\n return s;\n }\n }", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n phoneNumber_ = s;\n return s;\n }\n }", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "@Override\n public String getPhoneNumber() {\n\n if(this.phoneNumber == null){\n\n this.phoneNumber = TestDatabase.getInstance().getClientField(token, id, \"phoneNumber\");\n }\n\n return phoneNumber;\n }", "public String getUserPhone() {\r\n return userPhone;\r\n }", "public String getPhoneNumber() {\n\t\treturn this.phoneNumber;\n\t}", "public String getphoneNum() {\n\t\treturn _phoneNum;\n\t}", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "public String returnPhoneNumber() {\n\t\treturn this.registration_phone.getAttribute(\"value\");\r\n\t}", "private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }", "public String getUserphone() {\n return userphone;\n }", "public String getPhoneNumber() {\r\n return number;\r\n }", "@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }", "public String getPhoneNum()\r\n {\r\n\treturn phoneNum;\r\n }", "public String getPhoneNumber(){\r\n\t\treturn phoneNumber;\r\n\t}", "public java.lang.String getUserPhone() {\n java.lang.Object ref = userPhone_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userPhone_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUserPhone() {\n java.lang.Object ref = userPhone_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userPhone_ = s;\n }\n return s;\n }\n }", "public String getPhonenumber() {\n return phonenumber;\n }", "public String getSpPhoneNumber() {\r\n return spPhoneNumber;\r\n }", "public String getPhoneNo() {\n return (String)getAttributeInternal(PHONENO);\n }", "public String getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}", "public int getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}", "@java.lang.Override\n public com.google.protobuf.StringValue getPhoneNumber() {\n return phoneNumber_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : phoneNumber_;\n }", "public java.lang.String getPhone() {\n java.lang.Object ref = phone_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n phone_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public final String getPhone() {\n return phone;\n }", "public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}", "public String getPhonenumber() {\n\t\treturn phonenumber;\n\t}", "public com.google.protobuf.StringValue getPhoneNumber() {\n if (phoneNumberBuilder_ == null) {\n return phoneNumber_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : phoneNumber_;\n } else {\n return phoneNumberBuilder_.getMessage();\n }\n }", "public java.lang.String getPhone_number() {\n return phone_number;\n }", "public String getPhoneNumber() {\n return this.phoneNumber;\n }", "public java.lang.String getStudent_contactPhoneNumber() {\n\t\treturn _primarySchoolStudent.getStudent_contactPhoneNumber();\n\t}", "public java.lang.String getPhone() {\n java.lang.Object ref = phone_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n phone_ = s;\n }\n return s;\n }\n }", "public java.lang.String getPhone () {\n\t\treturn phone;\n\t}", "public String getSenderPhoneNumber();", "public String getPhoneNumber() {\r\n return phoneNumber;\r\n }", "public String getFixedPhone() {\n return fixedPhone;\n }", "public String getPhoneNumber() {\n return mPhoneNumber;\n }", "public String getMyPhoneNumber() {\n return ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))\n .getLine1Number();\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhone_number() {\n return phone_number;\n }", "public String getPhoneNum()\r\n {\r\n return phoneNum;\r\n }", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhone()\n\t{\n\t\treturn getPhone( getSession().getSessionContext() );\n\t}", "public String getPhone()\n\t{\n\t\treturn getPhone( getSession().getSessionContext() );\n\t}", "public String getPhone() {\n\t\treturn phone;\n\t}", "public String getPhoneNumberString() {\n return mPhoneNumberString;\n }", "public String getPhone() {\r\n // Bouml preserved body begin 00040C82\r\n\t return phoneNumber;\r\n // Bouml preserved body end 00040C82\r\n }", "public Integer getPhonenumber() {\n return phonenumber;\n }", "public String getSMemPhone() {\n return sMemPhone;\n }", "public java.lang.String getPhone() {\n return phone;\n }", "@Override\r\n\tpublic String getPhone() {\n\t\treturn phone;\r\n\t}", "public String getUserPhone()\n {\n return userPhone;\n }", "public java.lang.String getPstnphone() {\n\treturn pstnphone;\n}", "public String getPhone() {\n return _phone;\n }", "public String getPhone(){\n\t\treturn phone;\n\t}", "int getPhone();", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\n return phone;\n }", "public java.lang.String getTelphone () {\r\n\t\treturn telphone;\r\n\t}", "public String getPatientPhone() {\n return patientPhone;\n }", "public java.lang.String getShipOwnerPhone() {\n\t\treturn _tempNoTiceShipMessage.getShipOwnerPhone();\n\t}", "public Long getMobile_phone();", "public String Phone() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(phone);\r\n\t\t\t\tStr_phoneno = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Phone Number NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Str_phoneno;\r\n\t\t\t\r\n\t\t}", "public synchronized String getTelephoneNumber()\r\n {\r\n return telephoneNumber;\r\n }", "public long getPhone() {\n return phone;\n }", "public String getTelphone() {\n return telphone;\n }", "public String getTelphone() {\n return telphone;\n }", "public String getTelphone() {\n return telphone;\n }", "public String getaPhone() {\n return aPhone;\n }", "public String getMobilePhoneNumber() {\n\t\treturn mobilePhoneNumber;\n\t}", "public String getPhone(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, PHONE);\n\t}", "public String getPhone(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, PHONE);\n\t}" ]
[ "0.76689667", "0.76689667", "0.76689667", "0.76665676", "0.7414219", "0.73933697", "0.7363194", "0.73272705", "0.72356653", "0.72354025", "0.7234851", "0.7204925", "0.71963763", "0.71885014", "0.7188366", "0.7179682", "0.7167839", "0.7160938", "0.7155018", "0.7153324", "0.71528417", "0.7141041", "0.7133384", "0.7121556", "0.70982516", "0.7086985", "0.7083615", "0.7080517", "0.7069668", "0.70691764", "0.706141", "0.7060992", "0.7040472", "0.7038281", "0.70345396", "0.7024999", "0.7012039", "0.7006436", "0.6995278", "0.6991668", "0.69841856", "0.6981485", "0.6972187", "0.6968595", "0.69685566", "0.69655347", "0.6962186", "0.6962048", "0.6958285", "0.6954953", "0.6932689", "0.6889971", "0.68823713", "0.68823713", "0.68823713", "0.68823713", "0.68823713", "0.68823713", "0.68823713", "0.68823713", "0.68823713", "0.6874021", "0.6865709", "0.68620133", "0.68620133", "0.68620133", "0.6848632", "0.6848632", "0.6829395", "0.6824964", "0.68193454", "0.68041605", "0.67884296", "0.6779283", "0.67424184", "0.6737837", "0.67345524", "0.6730892", "0.67119896", "0.66940266", "0.6665923", "0.6665923", "0.6665923", "0.6665923", "0.6665923", "0.6665923", "0.6664811", "0.6660109", "0.6646307", "0.66144764", "0.6602915", "0.66026247", "0.6578499", "0.6550952", "0.65402216", "0.65402216", "0.65402216", "0.65398157", "0.65361917", "0.6531786", "0.6531786" ]
0.0
-1
Sets the suspect's phone number.
public void setSuspectNum(String suspectNum) { mSuspectNum = suspectNum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.politrons.avro.AvroPerson.Builder setPhoneNumber(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.phone_number = value;\n fieldSetFlags()[3] = true;\n return this; \n }", "public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }", "public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\n }", "public void setPhone(String phone)\r\n/* 46: */ {\r\n/* 47:58 */ this.phone = phone;\r\n/* 48: */ }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhone(String phone);", "public void setPhoneNumber(String phoneNumber) {\n\t\tthis.phoneNumber=phoneNumber;\r\n\t}", "public void setphoneNum(String phoneNum) {\n\t\t_phoneNum = phoneNum;\n\t}", "public void setUserPhone( String userPhone )\n {\n this.userPhone = userPhone;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "void setPhone(int phone);", "public void setPhoneNumber(String phoneNumber)\n\t{\n\t\tthis._phoneNumber=phoneNumber;\n\t}", "void setPhone(String phone) throws IllegalArgumentException;", "public void setPhoneNum(String phoneNum) {\n this.phoneNum = phoneNum;\n }", "public void setPhoneNumber(String phoneNumber) {\r\n this.phoneNumber = doTrim(phoneNumber);\r\n }", "public void setPhoneNumber(int phoneNumber) {\n\t\tthis.phoneNumber = phoneNumber;\n\t}", "public void setPhone(String phone) {\r\n // Bouml preserved body begin 00041002\r\n\t this.phoneNumber = phone;\r\n // Bouml preserved body end 00041002\r\n }", "public void setPhoneNumber(String phoneNumber) {\n if (this.phoneNumber != null) {\n return;\n }\n this.phoneNumber = phoneNumber;\n }", "public void setPhone(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(PHONE_PROP.get(), value);\n }", "public void setPhone(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(PHONE_PROP.get(), value);\n }", "public void setPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setter method initialized\r\n System.out.println(\"Phone Number : \"+phoneNumber);}", "public void setPhoneNo(String value) {\n setAttributeInternal(PHONENO, value);\n }", "public void setPhone(String phone) {\n this.mPhone = phone;\n }", "public void setPhone_number(String phone_number) {\n this.phone_number = phone_number;\n }", "public void setPhone(String mPhone) {\n this.mPhone = mPhone;\n }", "public void setPhone(String phone)\n {\n this.phone = phone;\n }", "public void setPhone(String phone) {\r\n this.phone = phone;\r\n }", "public void setPhone(String newPhone) {\r\n\t\tthis.phone = newPhone;\r\n\t}", "public void setPhone(final String value)\n\t{\n\t\tsetPhone( getSession().getSessionContext(), value );\n\t}", "public void setPhone(final String value)\n\t{\n\t\tsetPhone( getSession().getSessionContext(), value );\n\t}", "public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n phoneNumber_ = value;\n onChanged();\n return this;\n }", "public void set_phone(String Phone)\n {\n phone =Phone;\n }", "public void setPhone( String phone ) {\n this.phone = phone;\n }", "public void setPhone(final String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber == null ? null : phoneNumber.trim();\n }", "public void setPhone(String phone){\n\t\tthis.phone = phone;\n\t}", "public void setTelephoneNumber(String newNumber)\r\n\t{\r\n\t\ttelephoneNumber = newNumber;\r\n\t}", "public final void setPhone(final String phoneNew) {\n this.phone = phoneNew;\n }", "public void updatePhoneNumber(String newPhoneNum)\r\n {\r\n phoneNum = newPhoneNum;\r\n }", "public void setSpPhoneNumber(String _PhoneNumber) {\r\n this.spPhoneNumber = _PhoneNumber;\r\n }", "public void setPhone(long phone) {\n this.phone = phone;\n }", "public void setPhoneNum(String phoneNum) {\n this.phoneNum = phoneNum == null ? null : phoneNum.trim();\n }", "public void setContactPhoneNumber(java.lang.String contactPhoneNumber)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONTACTPHONENUMBER$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CONTACTPHONENUMBER$0);\r\n }\r\n target.setStringValue(contactPhoneNumber);\r\n }\r\n }", "public void setPhone(String phonenum) {\n\t\tPHONE = phonenum;\n\t}", "public abstract void setPhone1(String sValue);", "public void setPhone(java.lang.String phone) {\n this.phone = phone;\n }", "public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n phoneNumber_ = value;\n onChanged();\n return this;\n }", "public void setUserPhone(String userPhone) {\r\n this.userPhone = userPhone == null ? null : userPhone.trim();\r\n }", "public void setTelphone(String telphone) {\n this.telphone = telphone;\n }", "public void setTelphone(String telphone) {\n this.telphone = telphone;\n }", "public Builder setUserPhone(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n userPhone_ = value;\n onChanged();\n return this;\n }", "public void setPhonenumber(Integer phonenumber) {\n this.phonenumber = phonenumber;\n }", "public abstract void setPhone2(String sValue);", "@Override\r\n\tpublic void setPhone(String phone) {\n\t\tif (phone == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (phone.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.phone = phone;\r\n\t}", "public void setPhone_number(java.lang.String phone_number) {\n this.phone_number = phone_number;\n }", "public void setPhone(String phone) {\n\t\tthis.phone = StringUtils.trimString( phone );\n\t}", "public abstract void setPhone3(String sValue);", "public void setPhonenumber(String phonenumber) {\n\t\tthis.phonenumber = phonenumber;\n\t}", "public void setPhone(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, PHONE,value);\n\t}", "public void setPhone(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, PHONE,value);\n\t}", "public void setPhone (java.lang.String phone) {\n\t\tthis.phone = phone;\n\t}", "public boolean setPhoneNumber(String phoneNumber) {\n phoneNumber = phoneNumber.trim().replaceAll(\"\\\"\", \"\");\n\n if (PhoneNumberValidator.isPhoneNumberValid(phoneNumber)) {\n phoneNumber = PhoneNumberValidator.formatPhoneNumber(phoneNumber);\n\n if(this.phoneNumber != null && this.phoneNumber.equalsIgnoreCase(phoneNumber)){\n return false;\n }\n this.phoneNumber = phoneNumber;\n return true;\n } else if (this.phoneNumber == null) {\n this.phoneNumber = \"INVALID\";\n } else {\n System.out.println(\"Person \" + name + \"'s phone number will not be modified as the given number is invalid\");\n }\n\n return false;\n }", "public void setPhone(String phone) {\n\t\tthis.phone = phone == null ? null : phone.trim();\n\t}", "public void setPstnphone(java.lang.String newPstnphone) {\n\tpstnphone = newPstnphone;\n}", "public void setPhoneNuber(int value) {\r\n this.phoneNuber = value;\r\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public Builder setPhone(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n phone_ = value;\n onChanged();\n return this;\n }", "public Builder setPhoneNumber(com.google.protobuf.StringValue value) {\n if (phoneNumberBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n phoneNumber_ = value;\n onChanged();\n } else {\n phoneNumberBuilder_.setMessage(value);\n }\n\n return this;\n }", "@Generated(hash = 1187165439)\n public void setPhone(Phone phone) {\n synchronized (this) {\n this.phone = phone;\n phoneId = phone == null ? null : phone.getId();\n phone__resolvedKey = phoneId;\n }\n }", "public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }", "public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }", "public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }", "public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }", "public void setMobile(int number) {\n\t\t\tthis.Mobile = number;\r\n\t\t}", "void setPhone(String ph){ // SETTER METHOD\n\t\tif(ph.length()>10 && ph.length()<=13){\n\t\t\tphone = ph; // writing the data based on some rules\n\t\t}else{\n\t\t\tphone = \"NA\";\n\t\t\tSystem.out.println(\"Please Enter Correct Phone Number\");\n\t\t}\n\t}", "public void setPhonenumber(String phonenumber) {\n this.phonenumber = phonenumber == null ? null : phonenumber.trim();\n }", "public void setSrcPhone(String value) {\r\n setAttributeInternal(SRCPHONE, value);\r\n }", "public void setPhoneNumbr(String phoneNumber) {\n\t\tthis.phoneNumber = phoneNumber;\n\t}", "public void setPhoneno(String phoneno) {\n\tthis.phoneno = phoneno;\n}" ]
[ "0.7712758", "0.7519289", "0.74979407", "0.7436905", "0.7434623", "0.7350863", "0.7320308", "0.73050624", "0.7266503", "0.72650766", "0.72650766", "0.72650766", "0.72650766", "0.72650766", "0.72638404", "0.7255357", "0.72504044", "0.723005", "0.7206924", "0.71892935", "0.7141474", "0.7119735", "0.71040094", "0.7068678", "0.7042389", "0.70294756", "0.7003392", "0.6986226", "0.6970777", "0.69595975", "0.6956725", "0.6937654", "0.6931202", "0.6931202", "0.6911197", "0.68821716", "0.6881357", "0.6877427", "0.6875802", "0.6875802", "0.6875802", "0.6875802", "0.6875802", "0.6875802", "0.6875802", "0.6875802", "0.6875802", "0.6875802", "0.6875802", "0.68721646", "0.6861529", "0.6859031", "0.68462884", "0.68370587", "0.6814106", "0.6812209", "0.6811615", "0.68053234", "0.6801043", "0.6797007", "0.6794723", "0.67868346", "0.67717344", "0.672905", "0.672905", "0.6714153", "0.67126834", "0.67068714", "0.66991", "0.66921246", "0.6686227", "0.6675812", "0.6664935", "0.66444457", "0.66444457", "0.663969", "0.66245097", "0.6618402", "0.66182154", "0.660304", "0.6594353", "0.6594353", "0.6594353", "0.6594353", "0.6594353", "0.6594353", "0.6594353", "0.6591119", "0.6589058", "0.65872055", "0.6578468", "0.6578468", "0.6578468", "0.6578468", "0.650208", "0.646703", "0.6466828", "0.64520794", "0.6440164", "0.6415032" ]
0.659627
80
Returns the file name for the photo of the crime.
public String getPhotoFileName() { return "IMG_" + getId().toString() + ".jpg"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getFilename() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String filename = getExternalStoragePublicDirectory(DIRECTORY_PICTURES).getPath().toString() + \"/\" + timeStamp + \".jpg\";\n\n return filename;\n }", "public String getFileName() {\r\n\t\tString filename=\"\";\r\n\t\tJFileChooser file = new JFileChooser();\r\n\t\tfile.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n\t\tfile.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"Image Files\", \"jpg\", \"png\", \"tif\");\r\n\t\tfile.addChoosableFileFilter(filter);\r\n\t\tfile.setAcceptAllFileFilterUsed(true);\r\n\r\n\t\tint temp=file.showOpenDialog(jf);\r\n\t\tif(temp==JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile selectedFile = file.getSelectedFile();\r\n\t\t\tif(selectedFile.length()==0) {\r\n\t\t\t\tJOptionPane.showMessageDialog(jf,\r\n\t\t\t\t\t \"ERROR: Image cannot be opened.\"\r\n\t\t\t\t\t\t+\"\\nPress OK to select another image\",\r\n\t\t\t\t\t \"Error\",\r\n\t\t\t\t\t JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\treturn getFileName();\r\n\t\t\t}\r\n\t\t\tfilename=selectedFile.getAbsolutePath();\r\n\t\t}\r\n\t\telse if(temp==JFileChooser.CANCEL_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\telse if(temp==JFileChooser.ERROR_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(jf,\r\n\t\t\t\t \"ERROR: Image cannot be opened.\"\r\n\t\t\t\t\t+\"\\nPress OK to select another image\",\r\n\t\t\t\t \"Error\",\r\n\t\t\t\t JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn getFileName();\r\n\t\t}\r\n\r\n\t\treturn filename;\r\n\t}", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public String getOriginalFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "public static String getFilename()\n\t{\n\t\tString s = \"scene \"\n//\t\t\t\t+(LORENTZ_WINDOW?\"through Lorentz Window \":\"\")\n\t\t\t\t+\"with camera with \" + APERTURE_SIZE + \" aperture size \"\n\t\t\t\t+\"focussed at z=\"+FOCUSSING_DISTANCE + \" \"\n\t\t\t\t+\"and focus-surface fixed shutter model \"\n\t\t\t\t+(BETA_0?\"at rest\":(\"moving with beta=\"+beta))\n\t\t\t\t+(TEST?\" (test)\":\"\");\n//\t\tif(!PINHOLE_CAMERA)\n//\t\t{\n//\t\t\ts = s+(FOCUSSED_ON_IMAGE?\"image\":\"object\");\n//\t\t}\n\t\treturn s+\".bmp\";\n\t}", "public native String getFileName() throws MagickException;", "static String getMascotImageFilename() {\n Path filePath = Paths.get(badgeResourcePath, \"kumoricon_2017-mascot_chibi.png\");\n return filePath.toAbsolutePath().toString();\n }", "public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "private String getUniquePhotoName() {\n\t\tTime now = new Time();\n\t\tnow.setToNow();\n\t\treturn now.format2445();\n\t}", "public String getName() {\n return _file.getAbsolutePath();\n }", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}", "public String getFileName();", "public String getFileName();", "private String getNameImage(String imagePath) {\n\t\treturn imagePath != null ? imagePath.replace(pathFileBase, \"\") : \"\";\n\t}", "public String getName() {\n if (filename != null) {\n int index = filename.lastIndexOf(separatorChar);\n\n if (index >= 0) {\n return filename.substring(index + 1);\n } else {\n if (filename == null) {\n return \"\";\n } else {\n return filename;\n }\n }\n } else {\n return \"\";\n }\n }", "private byte[] getFileNameBytes(File photo) {\r\n return photo.getName().getBytes();\r\n }", "String getFilename();", "public String fotoToNick() {\r\n if (fotoFile == null) {\r\n foto = \"avatar.png\";\r\n } else {\r\n String nombreString = fotoFile.getName();\r\n String[] extensionStrings = nombreString.split(\"\\\\.\");\r\n foto = nick + \".\" + (extensionStrings[extensionStrings.length - 1]);\r\n }\r\n return foto;\r\n }", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "public String getOriginalFilename() {\r\n return mFile.getOriginalFilename();\r\n }", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "private static String getFileName(Card modelCard) {\n return fileNameMap.get(modelCard.getName() );\n }", "public String getFileName ();", "public String getName()\n {\n return( file );\n }", "public String getFileRealName() {\n return fileRealName;\n }", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "public static String getImagePathname(Bundle data) {\n // Extract the path to the image file from the Bundle, which\n // should be stored using the IMAGE_PATHNAME key.\n return data.getString(IMAGE_PATHNAME);\n }", "public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}", "public final String getImageName() {\n return this.imageName;\n }", "public String getFile_name() {\n\t\treturn file_name;\n\t}", "public String getName() {\n\t\treturn filename;\n\t}", "public String getFilename() throws ImageException {\r\n\tif (!bValid){\r\n\t\tthrow new ImageException(\"image not valid\");\r\n\t}\t\r\n\treturn imageName;\r\n}", "public String getName() {\r\n return mFile.getName();\r\n }", "public String getFilename() {\n\treturn file.getFilename();\n }", "public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "public String createImageName(File imageFile)\n\t{\n\t\tString name = imageFile.getAbsolutePath();\n\t\t\n\t\t// remove the initial part of the path that is common among all images so that only the relative path within the image folder remains\n\t\t// also remove the file's extension\n\t\tname = name.substring(imageFolder.getAbsolutePath().length() + 1, name.lastIndexOf('.'));\t\t\n\t\treturn name;\n\t}", "public String getFileName ()\n\t{\n\t\treturn FileName;\n\t}", "public final String getSuffix() {\n/* 62 */ return \".jpg\";\n/* */ }", "public String getFinalFileName()\r\n\t{\r\n\t\treturn this.getFileName() + this.getFileFormat();\r\n\t}", "public String getIconFileName() {\n\tif (this.isSuccess()) {\n\t return this.icon;\n\t} else {\n\t return null;\n\t}\n }", "static public String getFileName(ObjectNode schemeId)\n\t{\n\t\treturn schemeId.path(\"fileName\").asText(null);\n\t}", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "public String getFilename();", "public abstract String getFotoPath();", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "private String getTempFileString() {\n final File path = new File(getFlagStoreDir() + String.valueOf(lJobId) + File.separator);\n // // If this does not exist, we can create it here.\n if (!path.exists()) {\n path.mkdirs();\n }\n //\n return new File(path, Utils.getDeviceUUID(this)+ \".jpeg\")\n .getPath();\n }", "public String getSimpleName() { return FilePathUtils.getFileName(_name); }", "public String getImageFile() {\n\t\treturn imagefile;\n\t}", "public String getImageName() {\r\n\t\treturn _imageName;\r\n\t}", "String avatarImage();", "private File createImageFileName() throws IOException {\n String timestamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //there are two types of SimpleDateFormat and Date()\n String prepend = \"JPEG_\" + timestamp + \"_\";\n File imageFile = File.createTempFile(prepend, \".jpg\", mImageFolder);\n mImageFileName = imageFile.getAbsolutePath();\n return imageFile;\n\n }", "public String getFileName()\r\n {\r\n return sFileName;\r\n }", "@Override\n\tpublic String getName()\n\t{\n\t\treturn fileName;\n\t}", "public abstract String getFileName();", "private String generateFileName(MultipartFile multiPart) {\n return new Date().getTime() + \"-\" + multiPart.getOriginalFilename().replace(\" \", \"_\");\n }", "private String getUploadFileName() {\r\n\t\tJFileChooser fc = new JFileChooser(\"./\");\r\n\t\tint returnVal = fc.showOpenDialog(this);\r\n\t\tif (returnVal != JFileChooser.APPROVE_OPTION) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tFile quizFile = fc.getSelectedFile();\r\n\t\treturn quizFile.getAbsolutePath();\r\n\t}", "public final String getFileName()\r\n {\r\n return _fileName;\r\n }", "public abstract String getImageSuffix();", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "public String getFileName() {\n return mFileNameTextField == null ? \"\" : mFileNameTextField.getText(); //$NON-NLS-1$\n }", "@Override\n public String getPicPhoto() {\n return pic_filekey;\n }", "private String nakedFileName() {\n return f.getName().split(\"\\\\.\")[0];\n }", "public String getFileName(int index) {\n\t\tFile f = openFiles.get(index);\n\t\tString nom = f.getName().substring(0,f.getName().length()-5);\n\t\treturn nom;\n\t}", "@Override\r\n public String getInfo() {\r\n return \"Photo name: \"+this.info;\r\n }", "public String getFILE_NAME() { return FILE_NAME; }", "public String getPicture(String name){\r\n return theContacts.get(name).getPicture();\r\n }", "private String getFile() {\r\n\t\tJFileChooser fileChooser = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\r\n\t\tfileChooser.setDialogTitle(\"Choose a file to open: \");\r\n\t\tfileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\tint success = fileChooser.showOpenDialog(null);\r\n\t\tif (success == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile selectedFile = fileChooser.getSelectedFile();\r\n\t\t\tString fileName = selectedFile.getName();\r\n\t\t\treturn fileName;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "private String beautiplyFileNameReferer() {\r\n\r\n\t\tif (checkBeautiplyImagesExixtence()) {\r\n\t\t\ttry {\r\n\t\t\t\tString fname = beautiplyFileNameGenerator();\r\n\t\t\t\tFileInputStream fis = context.openFileInput(fname);\r\n\t\t\t\treturn fname;\r\n\t\t\t} catch (FileNotFoundException e4) {\r\n\t\t\t\treturn beautiplyFileNameReferer();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t}", "String get_name() {\n File file = new File(url);\n return file.getName();\n }", "java.lang.String getProfileImage();", "public static String getFileName()\r\n\t{\r\n\t\tString name = \"d3_\";\r\n\t\tjava.util.Date tNow = new java.util.Date();\r\n\r\n\t\tjava.text.SimpleDateFormat df = new java.text.SimpleDateFormat(\"mm_ss\");\r\n\r\n\t\tname = name + \"_\" + df.format(tNow) + \".wmf\";\r\n\r\n\t\treturn name;\r\n\t}", "public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }", "public String getDisplayFileName() {\r\n return fileName + \" (\" + FileItem.getDisplayFileSize(fileSize) + \")\";\r\n }", "@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public String getNameFile(){\n\t\t\treturn this.nameFile;\n\t\t}", "public String getOriginalFileName() {\n if (originalFilePath==null) {\n return null;\n }\n // the path passed is in the client system's format,\n // so test all known path separator chars ('/', '\\' and \"::\" )\n // and pick the one which would create the smallest filename\n // Using Math is rather ugly but at least it is shorter and performs better\n // than Stringtokenizer, regexp, or sorting collections\n int last = Math.max(Math.max(\n originalFilePath.lastIndexOf(':'), // old mac path (::)\n originalFilePath.lastIndexOf('/')), // unix path\n originalFilePath.lastIndexOf('\\\\')); // windows path\n if (last > -1) {\n return originalFilePath.substring(last+1);\n }\n return originalFilePath;\n }", "public String getFileName() {\n return filename;\n }" ]
[ "0.699538", "0.67597204", "0.66939", "0.66939", "0.66939", "0.66939", "0.66939", "0.66939", "0.66939", "0.66939", "0.66939", "0.664641", "0.6620513", "0.6620513", "0.6620513", "0.6620513", "0.6620513", "0.66084045", "0.6589689", "0.6578198", "0.65276045", "0.65257883", "0.652286", "0.6435956", "0.6415159", "0.63984567", "0.6395455", "0.6395455", "0.63920134", "0.63914156", "0.63800794", "0.6378758", "0.6355765", "0.6352878", "0.6352878", "0.63301384", "0.631663", "0.63163483", "0.6300035", "0.6293328", "0.6287849", "0.62867707", "0.6284802", "0.6277536", "0.6262038", "0.6248536", "0.6247577", "0.6241758", "0.6212858", "0.62000376", "0.6199246", "0.61758965", "0.6164701", "0.61444867", "0.6134803", "0.61137474", "0.6112733", "0.61102355", "0.61049354", "0.6101325", "0.6089272", "0.607038", "0.60620946", "0.60619247", "0.60610825", "0.6027807", "0.60229367", "0.6008547", "0.5996662", "0.59940505", "0.5993773", "0.5988092", "0.59860635", "0.5983063", "0.59735215", "0.5971165", "0.5960198", "0.5958835", "0.5958575", "0.59563005", "0.5952354", "0.5951599", "0.59404486", "0.59382075", "0.59328866", "0.5928221", "0.5922841", "0.5917619", "0.5915058", "0.5910926", "0.5902392", "0.58997136", "0.58983386", "0.5895795", "0.58914286", "0.5887916", "0.5885728", "0.58786035", "0.58711576", "0.5863622" ]
0.7617007
0
/ JADX INFO: this call moved to the top of the method (can break code semantics)
public BitmapEncoder() { this((Bitmap.CompressFormat) null, 90); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "public final void mo91715d() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private stendhal() {\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "public void m23075a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "public void mo21785J() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public abstract void mo70713b();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo21793R() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void prot() {\n }", "protected boolean func_70041_e_() { return false; }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo115190b() {\n }", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo23813b() {\n }", "private void level7() {\n }", "public void mo21792Q() {\n }", "public void m9741j() throws cf {\r\n }", "public void mo12628c() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void mo21787L() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21782G() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo21825b() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void mo21791P() {\n }", "public void mo21781F() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void mo21794S() {\n }", "public boolean method_218() {\r\n return false;\r\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public final void mo8775b() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private void m50367F() {\n }", "void berechneFlaeche() {\n\t}", "void m1864a() {\r\n }", "public boolean method_208() {\r\n return false;\r\n }", "public void mo3376r() {\n }", "public boolean method_216() {\r\n return false;\r\n }", "public void mo6081a() {\n }", "public boolean method_194() {\r\n return false;\r\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "public void mo21878t() {\n }", "public void mo3749d() {\n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "public final void mo1285b() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void mo1531a() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public void mo9848a() {\n }", "public void mo44053a() {\n }", "public final void mo11687c() {\n }", "public void mo21795T() {\n }", "@Override\n\tpublic void jugar() {}", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo21877s() {\n }", "public void skystonePos4() {\n }" ]
[ "0.6830817", "0.66819465", "0.6609077", "0.6525115", "0.6517902", "0.6495668", "0.6465134", "0.6446171", "0.6385651", "0.6360214", "0.63249755", "0.63155377", "0.63088524", "0.62682533", "0.6254697", "0.62397885", "0.62229204", "0.61979973", "0.6189011", "0.61762315", "0.61762315", "0.61517334", "0.6138688", "0.61347014", "0.6134523", "0.6117467", "0.6116378", "0.6115174", "0.60962635", "0.6092719", "0.6067141", "0.60624", "0.6057757", "0.6055942", "0.6055942", "0.6052017", "0.60458046", "0.6039118", "0.60356313", "0.6026827", "0.6022101", "0.6018698", "0.6013145", "0.59967357", "0.5990948", "0.59856147", "0.5984414", "0.59836334", "0.5975643", "0.5972907", "0.5969955", "0.59475523", "0.5947059", "0.5946806", "0.5946108", "0.59454745", "0.59394175", "0.5938494", "0.59376085", "0.5925184", "0.5921312", "0.59140134", "0.5913084", "0.5908626", "0.5905524", "0.58981556", "0.5897819", "0.58917356", "0.5889569", "0.58839333", "0.58809054", "0.5879552", "0.58773446", "0.5877096", "0.58706087", "0.5863943", "0.58602077", "0.5850894", "0.5849856", "0.58459663", "0.58421695", "0.58397424", "0.5837932", "0.58345085", "0.5833094", "0.58320636", "0.5831569", "0.5828216", "0.58271515", "0.58192503", "0.58184963", "0.58093417", "0.5807162", "0.5807162", "0.5807162", "0.5807162", "0.5807162", "0.5807162", "0.5807162", "0.5800974", "0.57975113" ]
0.0
-1
Test case number: 0 / 1 covered goal: Goal 1. wheel.components.Component.col()Lwheel/components/Component;: rootBranch
@Test public void test000() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); // Undeclared exception! try { Component component0 = errorPage0.col(); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Col component can be added only to a TableBlock. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "boolean isBranchTaken();", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testGetFinalCol() {\n setUp();\n assertEquals(1, move.getFinalCol());\n tearDown();\n }", "String branch();", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "double getBranchProbability();", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void buildNotDome() {\n nextWorkerCell.setLevel(1);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "@Override\n\tpublic void run(){\n\t\tbranch(0, sol,0);\t\n\t\tSystem.out.println(\"####### \" + counter + \" #######\");\n\t}", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void buildDomeTrue() {\n nextWorkerCell.setLevel(3);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(4, nextWorkerCell.getLevel());\n assertTrue(nextWorkerCell.getIsOccupied());\n }", "@Test\n\tpublic void testBuild() {\n\n\t\tSystem.out.println(\"End\");\n\t}", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testUnstableOnlyStableTrue() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(true).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogNotContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Skipping Cobertura coverage report as build was not SUCCESS or better\", run);\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test55() {\n //$NON-NLS-1$\n deployBundles(\"test55\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void buildAgainTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n workerHephaestus.specialPower(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n\n }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tpublic void testRoomExit()\n\t{\n\t\t// Take one step, essentially just the adj list\n\t\tboard.calcTargets(18, 21, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\t// Ensure doesn't exit through the wall\n\t\tassertEquals(1, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 21)));\n\t\t// Take two steps\n\t\tboard.calcTargets(18, 21, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 20)));\n\t}", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public static void main(String[] args) {\nint score = 91;\nString grade;\nif (score >90)\n{\n\tgrade = \"A\";\n}\n\n\n\nelse if (score>=80)\n{\n\tgrade = \"B\";\n}\n//THis is to test Git\n//THis is to test Git\n//THis is to test Git2\n//This is to test the brach made by gitdemo\n//Change from GitX\nelse \n{\n\tgrade = \"C\";\n}\nSystem.out.println(grade);\n}", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalculation = this.getRectanglesToConsiderForBranchingVarCalculation( );\r\n \r\n //collect 0 direction refcounts into this map\r\n Map<String, Integer> zeroVar_RefCountMap = new HashMap<String, Integer> () ;\r\n //and one diirection refconts into this map\r\n Map<String, Integer> oneVar_RefCountMap = new HashMap<String, Integer> () ;\r\n \r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle =null;\r\n for (Rectangle rect: rectanglesToConsiderForBranchingVarCalculation){\r\n variablesUsedForBranchingInThisRectangle = getVariablesUsedForBranchingInThisRectangle (rect);\r\n if (variablesUsedForBranchingInThisRectangle.size()>ZERO) {\r\n this.updateVariableRefCounts(zeroVar_RefCountMap, oneVar_RefCountMap, variablesUsedForBranchingInThisRectangle) ;\r\n }else {\r\n System.err.print(\"trying to branch a node which should have been marked infeasible\" );\r\n exit(ONE);\r\n }\r\n }\r\n \r\n \r\n //now find the highest refcount var, no matter its direction\r\n int highZeroFreq = zeroVar_RefCountMap.isEmpty()?ZERO:Collections.max( zeroVar_RefCountMap.values());\r\n int highOneFreq = oneVar_RefCountMap.isEmpty()? ZERO: Collections.max(oneVar_RefCountMap.values()) ;\r\n \r\n //we need to find the selected var's refcount on the other side\r\n int selectedVarRefCountOnOtherSide = ZERO;\r\n \r\n int totalRects = getNumberOfRects(this.myInfeasibleRectanglesList) ;\r\n \r\n if (highZeroFreq>highOneFreq) {\r\n result.varName=getHighestFreqVar (zeroVar_RefCountMap,highZeroFreq ) ;\r\n result.coeff=highZeroFreq;\r\n selectedVarRefCountOnOtherSide= oneVar_RefCountMap.get( result.varName)==null? ZERO : oneVar_RefCountMap.get( result.varName);\r\n //this is how many rects will survive on either side\r\n childRectCounts.zeroSideCount = totalRects - selectedVarRefCountOnOtherSide;\r\n childRectCounts.oneSideCount=totalRects -highZeroFreq ;\r\n \r\n } else {\r\n result.varName=getHighestFreqVar (oneVar_RefCountMap,highOneFreq ) ;\r\n result.coeff=highOneFreq;\r\n selectedVarRefCountOnOtherSide= zeroVar_RefCountMap.get( result.varName)==null? ZERO : zeroVar_RefCountMap.get( result.varName);\r\n \r\n childRectCounts.zeroSideCount = totalRects - highOneFreq;\r\n childRectCounts.oneSideCount=totalRects - selectedVarRefCountOnOtherSide;\r\n }\r\n \r\n return result;\r\n }", "@Test\n public void testOneStep1() {\n board sol = new board(3);\n assertEquals(-2, sol.neighbors(1,2));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "private static void dfsComponents() {\r\n\t\tprintThis(\"Standard DFS Demo (the input graph must be UNDIRECTED)\");\r\n\t\tfor (int i = 0; i < V; i++) { // for each vertex i in [0..V-1]\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) { // if that vertex is not visited yet\r\n\t\t\t\tSystem.out.printf(\"Component %d:\", ++numComp);\r\n\t\t\t\tdfs(i);\r\n\t\t\t\tSystem.out.printf(\"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.printf(\"There are %d connected components\\n\", numComp);\r\n\t}", "@Test\r\n public void testForCNSHIsFullCNCHHasOnlyOnePlace() {\r\n createCNSHIsFullCNCHHasOnlyOnePlace();\r\n this.sol = new Solution(this.studentList, this.schoolList, this.studentPreferences, this.schoolPreferences);\r\n assertEquals(solutionForCNSHIsFullCNCHHasOnlyOnePlace(), sol.getSolution(), \"Should work\");\r\n }", "@Test\n public void testUnstableOnlyStableFalse() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(false).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Cobertura coverage report found.\", run);\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Test\r\n\tpublic void testRoomExit()\r\n\t{\r\n\t\t// Take one step, essentially just the adj list\r\n\t\tboard.calcTargets(8, 2, 1);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\t// Ensure doesn't exit through the wall\r\n\t\tassertEquals(1, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\t// Take two steps\r\n\t\tboard.calcTargets(8, 2, 2);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(3, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 1)));\r\n\t}", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test\n public void test095() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.del((Object) errorPage0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n \n ErrorPage errorPage1 = (ErrorPage)errorPage0.remove((Component) label0);\n TableBlock tableBlock0 = new TableBlock(errorPage1);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try {\n Component component0 = any0.dfn();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n\tpublic void verifyCombosOnBoard() {\n\t\tBoard board = boardFactory.fromTextGenerateBoard(\"/boards/1LineOf3.txt\", mockGroup);\n\t\tassertFalse(board.outOfMoves());\n\n\t}", "int countComponents() throws Exception;", "@Test\n\t\t\tpublic void testRoomExit()\n\t\t\t{\n\t\t\t\t// One step from room\n\t\t\t\tboard.calcTargets(13, 14, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 14)));\n\n\t\t\t\t// Take two steps\n\t\t\t\tboard.calcTargets(13, 14, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(11, 14)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 13)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 15)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void test6() {\n //$NON-NLS-1$\n deployBundles(\"test6\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test114() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"*f\");\n TableBlock tableBlock0 = table0.thead();\n Any any0 = tableBlock0.col();\n String[] stringArray0 = new String[8];\n // Undeclared exception!\n try {\n Component component0 = any0.area(stringArray0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "public int getBranchCount() { return _brcnt; }", "@Test\r\n\tpublic void censusCornerTest() throws FileNotFoundException\r\n\t{\r\n\t\tint [] p=new int[5];\r\n\t\tString fileName=\"RabbitTestA.txt\";\r\n\t\tWorld w=new World(fileName);\r\n\t\t\r\n\t\tw.grid[0][0].census(p);\r\n\t\tassertEquals(0,p[0]);\r\n\t\tassertEquals(0, p[1]);\r\n\t\tassertEquals(0,p[2]);\r\n\t\tassertEquals(3,p[3]);\r\n\t\tassertEquals(1,p[4]);\r\n\t}", "@Test\n public void oncoTreeVersionTest() {\n // TODO: test oncoTreeVersion\n }", "@Test\n public void testFailedOnlyStableTrue() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"FAILURE\").setOnlyStable(true).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogNotContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Skipping Cobertura coverage report as build was not SUCCESS or better\", run);\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void testGetComponent() {\n System.out.println(\"getComponent\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent comp = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(comp).getComponent();\n DesignComponent expResult = comp;\n \n assertEquals(expResult,result);\n }\n });\n \n }", "private boolean doTestsPass()\r\n {\r\n return minimalSteps(\"ABCDABCE\") == 8 && minimalSteps(\"ABCABCE\") == 5;\r\n }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\n public void testIsActionable_FirstCornerCase() {\n board.getCell(3, 4).addLevel();\n board.getCell(3, 3).addLevel();\n board.getCell(4, 3).addLevel();\n assertFalse(godPower.isActionable(board, player.getWorker1()));\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "public void checkAndSetStart() {\r\n\t\tSystem.out.println(\"\t\tcheckAndSetStart \"+this.id +\" size:\"+this.components.size());\r\n\t\tif(hasNoStart()) {\t\t\r\n\t\t\tList<ComponentConfig> longestVisitedComps = new ArrayList<ComponentConfig>();\r\n\t\t\tComponentConfig longestVisitedComp = null;\r\n\t\t\tint longestVisited = 0;\r\n\t\t\tfor(ComponentConfig comp: components) {\r\n\t\t\t\tint visited = traverseModel(0,comp);\r\n\t\t\t\tSystem.out.println(\"\t\t\ttraverse\"+comp.getId()+\" v:\"+visited);\r\n\t\t\t\tif(visited > longestVisited) {\r\n\t\t\t\t\tlongestVisited = visited;\r\n\t\t\t\t\tlongestVisitedComps.clear();\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t} else if(visited == longestVisited) {\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t}\r\n\t\t\t\t// catch deadloop, if all component are visisted\r\n\t\t\t\tif(longestVisited == components.size())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(ComponentConfig st: longestVisitedComps) {\r\n\t\t\t\tst.setIsstartcaller(true);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t// find other component that call to the same component that start component calls within model\r\n\t\tList<ComponentConfig> startComps = new ArrayList<ComponentConfig>();\r\n\t\tfor(ComponentConfig st: components) {\r\n\t\t\tif(st.isIsstartcaller())\r\n\t\t\t\tstartComps.add(st);\r\n\t\t}\r\n\t\tList<Integer> calls = new ArrayList<Integer>();\r\n\t\tfor(ComponentConfig st: startComps) {\r\n\t\t\tif(st.isIsstartcaller() && st.getCalls()!=null) {\r\n\t\t\t\tfor(int i: st.getCalls())\r\n\t\t\t\t\tfor(ComponentConfig eachComp: components) {\r\n\t\t\t\t\t\tSystem.out.println(\"\tfind comp that call \"+i+\" \"+eachComp.getCalls());\r\n\t\t\t\t\t\tif(eachComp.getCalls()!=null)\r\n\t\t\t\t\t\t\tfor(int callee: eachComp.getCalls()) {\r\n\t\t\t\t\t\t\t\t// found component that call to the same target\r\n\t\t\t\t\t\t\t\tif(callee == i)\r\n\t\t\t\t\t\t\t\t\teachComp.setIsstartcaller(true);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@Test\r\n public void testSelectionStateOnRemoveLastChildOfBranch_38341() {\r\n TreeItem branch = createBranch(\"branch\", true);\r\n int insert = 1;\r\n getRoot().getChildren().add(insert , branch);\r\n int lastBranchIndex = branch.getChildren().size() -1;\r\n Object item = branch.getChildren().get(lastBranchIndex);\r\n // index in model is insert in root children + child index in branch + the inserted \r\n // node itself\r\n int select = insert + lastBranchIndex + 1;\r\n getSelectionModel().select(select);\r\n assertEquals(\"sanity: selected the expected child \", item, getSelectedItem());\r\n ListChangeReport indicesReport = new ListChangeReport(getSelectedIndices());\r\n ListChangeReport itemsReport = new ListChangeReport(getSelectedItems());\r\n branch.getChildren().remove(lastBranchIndex);\r\n if (getSelectedIndex() == select) {\r\n // this would be the default implementation for all SimpleXX: keep \r\n // selectedIndex unchanged, effectly selecting the next item\r\n // which here would be the next sibling of the removed child's parent\r\n assertEquals(\"selectedIndex unchanged\", select, getSelectedIndex());\r\n assertEquals(getView().getTreeItem(select), getSelectedItem());\r\n assertEquals(0, indicesReport.getEventCount());\r\n assertEquals(1, itemsReport.getEventCount());\r\n \r\n } else { // index was changed\r\n assertEquals(\"selected decremented\", select -1, getSelectedIndex());\r\n assertEquals(\"selectedItem\", getView().getTreeItem(select - 1), getSelectedItem());\r\n // fails .. we fire more than one event, reselect issue again?\r\n assertEquals(\"items changes fired\", 1, itemsReport.getEventCount());\r\n assertEquals(\"indices changes fired \", 1, indicesReport.getEventCount());\r\n }\r\n fail(\"TBD: spec and implement removal of last child in a branch\");\r\n }", "private void selectBranch () {\n \n TagsNode node = (TagsNode)tagsTree.getLastSelectedPathComponent();\n \n if (node == null) {\n // nothing selected\n }\n else\n if (node == position.getTagsNode()) {\n // If we're already positioned on the selected node, then no\n // need to do anything else (especially since it might set off\n // an endless loop).\n }\n else\n if (node.getNodeType() == TagsNode.ITEM) {\n // System.out.println (\"selectBranch selected item = \" + node.toString());\n boolean modOK = modIfChanged();\n if (modOK) {\n ClubEvent branch = (ClubEvent)node.getTaggable();\n int branchIndex = clubEventList.findByUniqueKey (branch);\n if (branchIndex >= 0) {\n position = clubEventList.positionUsingListIndex (branchIndex);\n position.setTagsNode (node);\n positionAndDisplay();\n } else {\n System.out.println (\"ClubPlanner.selectBranch\");\n System.out.println \n (\"-- Selected a branch from the tree that couldn't be found in the list\");\n System.out.println (\"-- node = \" + node.toString());\n System.out.println (\"-- event = \" + branch.getWhat());\n System.out.println (\"-- branch index = \" + String.valueOf(branchIndex));\n }\n }\n }\n else {\n // Do nothing until an item is selected\n // System.out.println (\"selectBranch selected node = \" + node.toString());\n }\n }", "@Test\r\n\tpublic void censusBoundaryTest() throws FileNotFoundException\r\n\t{\r\n\t\tint [] p=new int[5];\r\n\t\tString fileName=\"BadgerTestC.txt\";\r\n\t\tWorld w=new World(fileName);\r\n\t\t\r\n\t\tw.grid[0][1].census(p);\r\n\t\tassertEquals(2,p[0]);\r\n\t\tassertEquals(0, p[1]);\r\n\t\tassertEquals(2,p[2]);\r\n\t\tassertEquals(0,p[3]);\r\n\t\tassertEquals(2,p[4]);\r\n\t}", "@Test\n\tpublic void upperLeft1SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 12);\n\t\td.set(1, 23);\n\t\td.set(13, 13);\n\t\td.set(14, 24);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(34);\n\t\tassertTrue(0==test_arr.get(0).getX() && 2==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 1==test_arr.get(1).getY());\n\t}", "@Test\n public void testVicrotyFullGrid(){\n for (Cell c: modelTest.grid) {\n if (c.getY() == 5)\n c.setColor(Color.BLUE);\n }\n\n modelTest.researchVictory(0,1);\n boolean vicrotyTest = modelTest.getVictory();\n // On a rempli la grille de cellule bleu, on test également la victoire du bleu\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(vicrotyTest,true);\n Assert.assertEquals(winnerTest,Color.BLUE);\n }", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test\n public void testFinalState()\n { \n \n GameOfLife game = new GameOfLife();\n for (int gens = 0; gens < 9; gens++)\n {\n game.createNextGeneration();\n \n }\n\n for(int row = 26; row < 31; row++)\n {\n for(int col = 30; col < 35; col++)\n {\n // in this example, an alive cell has a non-null actor and a dead cell has a null actor\n Actor cell = game.getActor(row, col);\n\n // if the cell at the current row and col should be alive, assert that the actor is not null\n if( (row == 27 && col == 31) ||\n (row == 27 && col == 34) ||\n (row == 28 && col == 30) ||\n (row == 28 && col == 32) ||\n (row == 29 && col == 30) ||\n (row == 29 && col == 31) )\n \n {\n assertNotNull(\"expected alive cell at (\" + row + \", \" + col + \")\", cell);\n }\n else // else, the cell should be dead; assert that the actor is null\n {\n assertNull(\"expected dead cell at (\" + row + \", \" + col + \")\", cell);\n }\n }\n }\n \n \n }", "@Test\n public void testFailedOnlyStableFalse() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"FAILURE\").setOnlyStable(false).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Cobertura coverage report found.\", run);\n }", "@Test(expected = NullPointerException.class)\n public void Test02() {\n component = new DamageEffectComponent(null, 3, 20);\n }", "void testColorChecker(Tester t) {\r\n initData();\r\n Cell topLeft = (Cell) this.game7.indexHelp(0, 0);\r\n Cell topRight = (Cell) this.game7.indexHelp(1, 0);\r\n Cell botLeft = (Cell) this.game7.indexHelp(0, 1);\r\n Cell botRight = (Cell) this.game7.indexHelp(1, 1);\r\n t.checkExpect(topLeft.flooded, true);\r\n t.checkExpect(topRight.flooded, false);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(botRight.flooded, false);\r\n\r\n topRight.colorChecker(topLeft.color);\r\n t.checkExpect(topRight.flooded, true);\r\n t.checkExpect(botRight.flooded, true);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(topLeft.flooded, true);\r\n }", "public void test5() {\n //$NON-NLS-1$\n deployBundles(\"test5\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Not empty\", delta.isEmpty());\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test5() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getContained();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test(timeout = 4000)\n public void test317() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.col();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Col component can be added only to a TableBlock.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test309() throws Throwable {\n Select select0 = new Select((Component) null, \"b^o1IoN.19~.aqo/\", \"'.\", \"'.\", (ISelectModel) null, true);\n // Undeclared exception!\n try { \n select0.colgroup();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Colgroup component can be added only to a Table.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public static void main(String}] args) {\n Node root = new Node(7);\n root.left = new Node(3);\n root.right = new Node(15);\n \n root.left.left = new Node(1);\n root.left.right = new Node(4);\n \n root.right.left = new Node(9);\n root.right.right = new Node(20);\n\n System.out.println(root);\n \n coverToDoublyLL(root);\n \n \n }", "@Test\n public void test11() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n int int0 = defaultMenuItem0.getDepth();\n assertEquals(0, int0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test\n public void testLineCoverageUnstableNoFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(\n new ScriptBuilder().setFailUnstable(false).setLineCoverage(\"91,0,91\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Finished: UNSTABLE\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "public void test3() {\n //$NON-NLS-1$\n deployBundles(\"test3\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void buildInitialBand()\r\n\t{\n\t\r\n\tint bl = boundary.size();\r\n\tfor(int i=0; i<bl; i++) \r\n\t\t{\r\n\t\tInt2d bCur = boundary.get(i);\r\n\t\t//System.out.println(bCur.x + \", \" + bCur.y + \": size = \" + heap.size());\r\n\t\t\r\n\t\ttestPointsAround(bCur.x,bCur.y);\r\n\t\t}\r\n\t\r\n\t}", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }" ]
[ "0.60825235", "0.5902429", "0.5877747", "0.5839439", "0.56362826", "0.5531141", "0.54336536", "0.5424704", "0.5378082", "0.53288114", "0.53234494", "0.5308773", "0.5290444", "0.52771205", "0.52626127", "0.52593255", "0.5249497", "0.5245973", "0.5238577", "0.52352244", "0.52314687", "0.52152467", "0.52029437", "0.51801115", "0.51744217", "0.51722527", "0.51699126", "0.5150038", "0.51403725", "0.5139077", "0.5125529", "0.5123537", "0.51227164", "0.5116825", "0.5108534", "0.5084431", "0.5083282", "0.5080357", "0.5049313", "0.5046102", "0.50455993", "0.5027377", "0.50243646", "0.50219357", "0.50189537", "0.50094986", "0.50070906", "0.5000524", "0.50005", "0.49994072", "0.49986577", "0.49954116", "0.4985075", "0.49795216", "0.49788895", "0.4976672", "0.4975874", "0.4973231", "0.49664822", "0.49611303", "0.49543962", "0.49515888", "0.49496385", "0.49481264", "0.49460354", "0.49437284", "0.49357685", "0.49337348", "0.49299288", "0.49263823", "0.49263197", "0.491798", "0.49171677", "0.49083522", "0.4903748", "0.48980483", "0.48930445", "0.48921445", "0.48914137", "0.48889813", "0.48827884", "0.48799014", "0.4875167", "0.48731226", "0.48715076", "0.48706624", "0.48621106", "0.4859789", "0.4854555", "0.48514238", "0.48507163", "0.4849355", "0.4846942", "0.48453656", "0.4843932", "0.48402092", "0.48384058", "0.4837155", "0.48362687", "0.48355353", "0.48333877" ]
0.0
-1
Test case number: 1 / 1 covered goal: Goal 1. wheel.components.Component.pre(Ljava/lang/Object;)Lwheel/components/Component;: rootBranch
@Test public void test001() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Label label0 = (Label)errorPage0.pre((Object) errorPage0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Override\n\tpublic void preBacktrack() {\n\t\t\n\t}", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Override\n\tpublic String[] goPreviosBranch(String[] currentBranch) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void preorder() {\n\n\t}", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n\tpublic void pre()\n\t{\n\n\t}", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "boolean isBranchTaken();", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "protected abstract void trace_update_pre(final AtomicComponent<T> c);", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "String branch();", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test3() {\n //$NON-NLS-1$\n deployBundles(\"test3\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "public static void main(String[] args) {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n System.out.println(new Solution().preorderTraversal(null));\n }", "@Override\r\n\tpublic void preCheck(CheckCommand checkCommand) throws Exception {\n\r\n\t}", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "protected abstract void before();", "public void test13() {\n //$NON-NLS-1$\n deployBundles(\"test13\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test55() {\n //$NON-NLS-1$\n deployBundles(\"test55\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "@SuppressWarnings(\"EmptyMethod\")\npublic interface BeforeState {\n\n /**\n * This method will be called immediately prior to getting the baseline state.\n */\n void beforeState();\n}", "public void test28() {\n //$NON-NLS-1$\n deployBundles(\"test28\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertTrue(\"No extend restrictions\", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public RelocateBranch() {\n }", "double getBranchProbability();", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "public static void main(String[] args) {\n\t\tBST bst=new BST();\n\t\tbst.Insert(30);\n\t\tbst.Insert(20);\n\t\tbst.Insert(40);\n\t\tbst.Insert(10);\n\t\tbst.Insert(25);\n\t\tbst.Insert(35);\n\t\tbst.Insert(45);\n\t\tbst.Insert(5);\n\t\tbst.Insert(27);\n\t\tbst.Insert(38);\n\t\tbst.Insert(43);\n\t\tbst.Insert(47);\n\t\t\n\t\tSystem.out.println(bst.isEmpty());\n\t\t\n\t\tbst.preorder();\n\n\t\t\n\t}", "public void test18() {\n //$NON-NLS-1$\n deployBundles(\"test18\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TRANSIENT_TO_NON_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public Branch() { }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void enterModelComponent(ProgramElement pe) {\n/* 35 */ ModelRepository mr = DefaultModelRepository.getModelRepository(null);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 51 */ CodeStripe cs = mr.getCurrentStripe();\n/* 52 */ if (cs != null) {\n/* 53 */ MethodReference metr = (MethodReference)pe;\n/* 54 */ Method mmmm = ReferenceConverter.getMethod(metr);\n/* 55 */ Location loc = new Location(mr.getCurrentFile());\n/* 56 */ Call call = mr.addCall(mmmm, mmmm, cs);\n/* 57 */ loc.setStartLine(metr.getFirstElement().getStartPosition().getLine());\n/* 58 */ loc.setStartChar(metr.getFirstElement().getStartPosition().getColumn());\n/* 59 */ loc.setEndLine(metr.getLastElement().getEndPosition().getLine());\n/* 60 */ loc.setEndChar(metr.getLastElement().getEndPosition().getColumn());\n/* 61 */ call.addInstance(cs.getRelPosOf(loc));\n/* */ } \n/* */ }", "public void test17() {\n //$NON-NLS-1$\n deployBundles(\"test17\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_STATIC_TO_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test15() {\n //$NON-NLS-1$\n deployBundles(\"test15\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_NON_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "public void incrementBranchCount() {\n this.branchCount++;\n }", "public void test2() {\n //$NON-NLS-1$\n deployBundles(\"test2\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "@Stub\n\tpublic void before()\n\t{\n\t\t//\n\t}", "public void test10() {\n //$NON-NLS-1$\n deployBundles(\"test10\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "abstract protected void pre(int code);", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello\");\n\t\t//ADDing comment 1 in testRebase branch\n\t\t//Adding commit2 in testRebase branch\n\t\t\n\t\t\n\t\t//Add commit 1.1 in master branch\n\n\t}", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void checkAndSetStart() {\r\n\t\tSystem.out.println(\"\t\tcheckAndSetStart \"+this.id +\" size:\"+this.components.size());\r\n\t\tif(hasNoStart()) {\t\t\r\n\t\t\tList<ComponentConfig> longestVisitedComps = new ArrayList<ComponentConfig>();\r\n\t\t\tComponentConfig longestVisitedComp = null;\r\n\t\t\tint longestVisited = 0;\r\n\t\t\tfor(ComponentConfig comp: components) {\r\n\t\t\t\tint visited = traverseModel(0,comp);\r\n\t\t\t\tSystem.out.println(\"\t\t\ttraverse\"+comp.getId()+\" v:\"+visited);\r\n\t\t\t\tif(visited > longestVisited) {\r\n\t\t\t\t\tlongestVisited = visited;\r\n\t\t\t\t\tlongestVisitedComps.clear();\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t} else if(visited == longestVisited) {\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t}\r\n\t\t\t\t// catch deadloop, if all component are visisted\r\n\t\t\t\tif(longestVisited == components.size())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(ComponentConfig st: longestVisitedComps) {\r\n\t\t\t\tst.setIsstartcaller(true);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t// find other component that call to the same component that start component calls within model\r\n\t\tList<ComponentConfig> startComps = new ArrayList<ComponentConfig>();\r\n\t\tfor(ComponentConfig st: components) {\r\n\t\t\tif(st.isIsstartcaller())\r\n\t\t\t\tstartComps.add(st);\r\n\t\t}\r\n\t\tList<Integer> calls = new ArrayList<Integer>();\r\n\t\tfor(ComponentConfig st: startComps) {\r\n\t\t\tif(st.isIsstartcaller() && st.getCalls()!=null) {\r\n\t\t\t\tfor(int i: st.getCalls())\r\n\t\t\t\t\tfor(ComponentConfig eachComp: components) {\r\n\t\t\t\t\t\tSystem.out.println(\"\tfind comp that call \"+i+\" \"+eachComp.getCalls());\r\n\t\t\t\t\t\tif(eachComp.getCalls()!=null)\r\n\t\t\t\t\t\t\tfor(int callee: eachComp.getCalls()) {\r\n\t\t\t\t\t\t\t\t// found component that call to the same target\r\n\t\t\t\t\t\t\t\tif(callee == i)\r\n\t\t\t\t\t\t\t\t\teachComp.setIsstartcaller(true);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public void test12() {\n //$NON-NLS-1$\n deployBundles(\"test12\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "void before();", "protected void runBeforeStep() {}", "public void test6() {\n //$NON-NLS-1$\n deployBundles(\"test6\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public interface ComponentProcessor {\n\n /**\n * Starts processing components for the rootnode, this shall call {@link #processNode(Node, float)} on all of the\n * nodes\n * that shall be processed.\n * Perform init if needed in this method\n * \n * @param root\n * @param delta\n */\n public void processRoot(RootNode root, float delta);\n\n /**\n * Processes the non-culled logic nodes\n * \n * @param node\n * @param delta\n */\n public void processNode(Node node, float delta);\n}", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\r\n @Test\r\n @ConditionalIgnore(condition = IgnoreTreeAnchor.class)\r\n public void testAlsoSelectPreviousAscending() {\r\n super.testAlsoSelectPreviousAscending();\r\n }", "public void getBranchCommand() {\n\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}", "@Override\n\tpublic void beforePhase(PhaseEvent arg0) {\n\t\t\n\t}", "public UpdateandRemoveBranch() {\n initComponents();\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public void testPreConditions() {\r\n\t //fail(\"Precondition check not implemented!\");\r\n\t assertEquals(true,true);\r\n\t }", "@Test\n public void testUnstableOnlyStableTrue() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(true).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogNotContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Skipping Cobertura coverage report as build was not SUCCESS or better\", run);\n }", "private BaleElement.Branch createOuterBranch(BaleAstNode sn)\n{\n switch (sn.getNodeType()) {\n case FILE :\n\t return new BaleElement.CompilationUnitNode(for_document,cur_parent);\n case CLASS :\n\t return new BaleElement.ClassNode(for_document,cur_parent);\n case METHOD :\n\t return new BaleElement.MethodNode(for_document,cur_parent);\n case FIELD :\n\t return new BaleElement.FieldNode(for_document,cur_parent);\n case ANNOTATION :\n\t return new BaleElement.AnnotationNode(for_document,cur_parent);\n case STATEMENT :\n\t return new BaleElement.SplitStatementNode(for_document,cur_parent);\n case EXPRESSION :\n\t return new BaleElement.SplitExpressionNode(for_document,cur_parent);\n case BLOCK :\n\t return new BaleElement.BlockNode(for_document,cur_parent);\n case SWITCH_BLOCK :\n\t return new BaleElement.SwitchBlockNode(for_document,cur_parent);\n case INITIALIZER :\n\t return new BaleElement.InitializerNode(for_document,cur_parent);\n case SET :\n\t // return new BaleElement.DeclSet(for_document,cur_parent);\n\t break;\n default:\n\t break;\n }\n return null;\n}", "@Test\n public void oncoTreeVersionTest() {\n // TODO: test oncoTreeVersion\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(2836);\n JavaParser javaParser0 = new JavaParser(\"ConditionalAndExpression\");\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 2836);\n simpleNode0.jjtSetParent(simpleNode1);\n Node node0 = simpleNode0.jjtGetParent();\n simpleNode1.jjtSetParent(node0);\n assertSame(node0, simpleNode1);\n }", "void preProcess();", "public void test19() {\n //$NON-NLS-1$\n deployBundles(\"test19\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_TRANSIENT_TO_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void upFocusCycle(Component paramComponent)\n/* */ {\n/* 1398 */ if (paramComponent != null) {\n/* 1399 */ paramComponent.transferFocusUpCycle();\n/* */ }\n/* */ }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "public AccessibilityNodeInfo getTraversalBefore() {\n/* 376 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static void main(String[] args) {\n\n\t\tGitService gitService = new GitServiceImpl();\n\t\tGitHistoryRefactoringMiner miner = new GitHistoryRefactoringMinerImpl();\n\n\t\tRepository repo;\n\t\ttry {\n\t\t\trepo = gitService.cloneIfNotExists(\n\t\t\t\t\t\"/home/steve/Steve/git/commons-rng\",\n\t\t\t\t\t\"https://github.com/apache/commons-rng.git\");\n\t\t\t//\t\t\trepo = gitService.cloneIfNotExists(\n\t\t\t//\t\t\t\t\t\"tmp/refactoring-toy-example\",\n\t\t\t//\t\t\t\t\t\"https://github.com/danilofes/refactoring-toy-example.git\");\n\t\t\t// For all with sample\n\t\t\t//\t\t\tminer.detectAll(repo, \"master\", new RefactoringHandler() {\n\t\t\t//\t\t\t\t @Override\n\t\t\t//\t\t\t\t public void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t//\t\t\t\t System.out.println(\"Refactorings at \" + commitId);\n\t\t\t//\t\t\t\t for (Refactoring ref : refactorings) {\n\t\t\t//\t\t\t\t System.out.println(ref.toString());\n\t\t\t////\t\t\t\t System.out.println(ref.toJSON());\n\t\t\t//\t\t\t\t }\n\t\t\t//\t\t\t\t }\n\t\t\t//\t\t\t\t});\n\t\t\t// For between 2 commits with sample\n\t\t\t//\t\t\t// start commit: 819b202bfb09d4142dece04d4039f1708735019b\n\t\t\t//\t\t\t// end commit: d4bce13a443cf12da40a77c16c1e591f4f985b47\n\t\t\t//\t\t\tminer.detectBetweenCommits(repo, \n\t\t\t//\t\t\t\t\t\"819b202bfb09d4142dece04d4039f1708735019b\", \"d4bce13a443cf12da40a77c16c1e591f4f985b47\",\n\t\t\t//\t\t\t\t\tnew RefactoringHandler() {\n\t\t\t//\t\t\t\t@Override\n\t\t\t//\t\t\t\tpublic void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t//\t\t\t\t\tSystem.out.println(\"Refactorings at \" + commitId);\n\t\t\t//\t\t\t\t\tfor (Refactoring ref : refactorings) {\n\t\t\t//\t\t\t\t\t\t//\t\t\t System.out.println(ref.toString());\n\t\t\t//\t\t\t\t\t\tSystem.out.println(ref.toJSON());\n\t\t\t//\t\t\t\t\t}\n\t\t\t//\t\t\t\t}\n\t\t\t//\t\t\t});\n\n\t\t\t// start commit: 40fd7ad244b350d657ca4f1a9efe667c52697327\n\t\t\t// end commit: 3ca48892811538e911eb3c5bafd60b4d9ca92483\n\t\t\tminer.detectBetweenCommits(repo, \n\t\t\t\t\t\"40fd7ad244b350d657ca4f1a9efe667c52697327\", \"3ca48892811538e911eb3c5bafd60b4d9ca92483\",\n\t\t\t\t\tnew RefactoringHandler() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t\t\tSystem.out.println(\"***********************************************************************************\");\n\t\t\t\t\tSystem.out.println(\"Refactorings at \" + commitId);\n\t\t\t\t\tfor (Refactoring ref : refactorings) {\n\t\t\t\t\t\t// System.out.println(ref.toString());\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(ref.toJSON());\n\t\t\t\t\t\tif (ref instanceof ExtractOperationRefactoring) {\n\t\t\t\t\t\t\tExtractOperationRefactoring refactoring = (ExtractOperationRefactoring)ref;\n\t\t\t\t\t\t\tUMLOperationBodyMapper mapper = refactoring.getBodyMapper();\n\t\t\t\t\t\t\tList<StatementObject> newLeaves = mapper.getNonMappedLeavesT2(); //newly added leaf statements\n\t\t\t\t\t\t\tList<CompositeStatementObject> newComposites = mapper.getNonMappedInnerNodesT2(); //newly added composite statements\n\t\t\t\t\t\t\tList<StatementObject> deletedLeaves = mapper.getNonMappedLeavesT1(); //deleted leaf statements\n\t\t\t\t\t\t\tList<CompositeStatementObject> deletedComposites = mapper.getNonMappedInnerNodesT1(); //deleted composite statements\n\t\t\t\t\t\t\tSystem.out.println(\"newLeaves: \\n\" + newLeaves);\n\t\t\t\t\t\t\tSystem.out.println(\"newComposites: \\n\" + newComposites);\n\t\t\t\t\t\t\tSystem.out.println(\"deletedLeaves: \\n\" + deletedLeaves);\n\t\t\t\t\t\t\tSystem.out.println(\"deletedComposites: \\n\" + deletedComposites);\n\n\t\t\t\t\t\t\tfor(AbstractCodeMapping mapping : mapper.getMappings()) {\n\t\t\t\t\t\t\t\tAbstractCodeFragment fragment1 = mapping.getFragment1();\n\t\t\t\t\t\t\t\tAbstractCodeFragment fragment2 = mapping.getFragment2();\n\t\t\t\t\t\t\t\tSet<Replacement> replacements = mapping.getReplacements();\n\t\t\t\t\t\t\t\tSystem.out.println(\"**************** Replacements: ***********\\n\");\n\t\t\t\t\t\t\t\tfor(Replacement replacement : replacements) {\n\t\t\t\t\t\t\t\t\tString valueBefore = replacement.getBefore();\n\t\t\t\t\t\t\t\t\tString valueAfter = replacement.getAfter();\n\t\t\t\t\t\t\t\t\tReplacementType type = replacement.getType();\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"valueBefore: \" + valueBefore);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"valueAfter: \" + valueAfter);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"type: \" + type);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"***********************************************************************************\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n}", "public void test5() {\n //$NON-NLS-1$\n deployBundles(\"test5\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Not empty\", delta.isEmpty());\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "private void editPipelineDefAddBranchNode(PipelineDefinition pipelineDef) {\n PipelineDefinitionNode newPipelineNode = new PipelineDefinitionNode(\n expectedModuleDef3.getName());\n pipelineDef.getRootNodes()\n .get(0)\n .getNextNodes()\n .add(newPipelineNode);\n newPipelineNode.setUnitOfWork(new ClassWrapper<UnitOfWorkTaskGenerator>(\n new TestUowTaskGenerator()));\n newPipelineNode.setStartNewUow(false);\n }", "public final void buildNext() {\n branch++;\n }", "@Test\n public void TestBeforeWithTooStrongAfter() {\n try {\n new RuleBasedCollator(\"&[before 2]x<<q<p\");\n errln(\"should forbid before-2-reset followed by primary relation\");\n } catch(Exception expected) {\n }\n try {\n new RuleBasedCollator(\"&[before 3]x<<<q<<s<p\");\n errln(\"should forbid before-3-reset followed by primary or secondary relation\");\n } catch(Exception expected) {\n }\n }", "protected abstract void preRun();", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void testStep() {\n\n DT_TractographyImage crossing = Images.getCrossing();\n\n FACT_FibreTracker tracker = new FACT_FibreTracker(crossing);\n\n Vector3D[] pds = crossing.getPDs(1,1,1);\n\n Vector3D step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, true);\n\n assertEquals(1.0, pds[0].dot(step.normalized()), 1E-8);\n\n assertEquals(Images.xVoxelDim / 2.0, step.mod(), 0.05);\n \n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, false);\n\n assertEquals(-1.0, pds[0].dot(step.normalized()), 1E-8);\n\n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 1, true);\n\n assertEquals(1.0, pds[1].dot(step.normalized()), 1E-8);\n\n\n for (int i = 0; i < 2; i++) {\n\n step = tracker.getNextStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), new Vector3D(pds[i].x + 0.01, pds[i].y + 0.02, pds[i].z + 0.03).normalized());\n\n assertEquals(1.0, pds[i].dot(step.normalized()), 1E-8);\n\n }\n\n \n }", "private UnifiedAst precompile(PrecompilationContext precompilationContext)\n\t\t\tthrows UnableToCompleteException {\n\t\ttry {\n\t\t\t// (0) Assert preconditions\n\t\t\tif (precompilationContext.getEntryPoints().length\n\t\t\t\t\t+ precompilationContext\n\t\t\t\t\t\t\t.getAdditionalRootTypes().length == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"entry point(s) required\");\n\t\t\t}\n\t\t\tboolean singlePermutation = precompilationContext\n\t\t\t\t\t.getPermutations().length == 1;\n\t\t\tPrecompilationMetricsArtifact precompilationMetrics = precompilationContext\n\t\t\t\t\t.getPrecompilationMetricsArtifact();\n\t\t\t/*\n\t\t\t * Do not introduce any new pass here unless it is logically a part\n\t\t\t * of one of the 6 defined stages and is physically located in that\n\t\t\t * stage.\n\t\t\t */\n\t\t\t// (1) Initialize local state\n\t\t\tjprogram = new JProgram(compilerContext.getMinimalRebuildCache());\n\t\t\t// Synchronize JTypeOracle with compile optimization behavior.\n\t\t\tjprogram.typeOracle.setOptimize(options\n\t\t\t\t\t.getOptimizationLevel() > OptionOptimize.OPTIMIZE_LEVEL_DRAFT);\n\t\t\tjsProgram = new JsProgram();\n\t\t\t// (2) Construct and unify the unresolved Java AST\n\t\t\tCompilationState compilationState = constructJavaAst(\n\t\t\t\t\tprecompilationContext);\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tJsniRestrictionChecker.exec(logger, jprogram);\n\t\t\tJsInteropRestrictionChecker.exec(logger, jprogram,\n\t\t\t\t\tgetMinimalRebuildCache());\n\t\t\tlogTypeOracleMetrics(precompilationMetrics, compilationState);\n\t\t\tMemory.maybeDumpMemory(\"AstOnly\");\n\t\t\tAstDumper.maybeDumpAST(jprogram);\n\t\t\t// TODO(stalcup): is in wrong place, move to optimization stage\n\t\t\tConfigurationProperties configurationProperties = new ConfigurationProperties(\n\t\t\t\t\tmodule);\n\t\t\tEnumNameObfuscator.exec(jprogram, logger, configurationProperties,\n\t\t\t\t\toptions);\n\t\t\t// (3) Normalize the unresolved Java AST\n\t\t\t// Replace default methods by static implementations.\n\t\t\tDevirtualizeDefaultMethodForwarding.exec(jprogram);\n\t\t\t// Replace calls to native overrides of object methods.\n\t\t\tReplaceCallsToNativeJavaLangObjectOverrides.exec(jprogram);\n\t\t\tFixAssignmentsToUnboxOrCast.exec(jprogram);\n\t\t\tif (options.isEnableAssertions()) {\n\t\t\t\tAssertionNormalizer.exec(jprogram);\n\t\t\t} else {\n\t\t\t\tAssertionRemover.exec(jprogram);\n\t\t\t}\n\t\t\tif (module != null && options.isRunAsyncEnabled()) {\n\t\t\t\tReplaceRunAsyncs.exec(logger, jprogram);\n\t\t\t\tConfigurationProperties config = new ConfigurationProperties(\n\t\t\t\t\t\tmodule);\n\t\t\t\tCodeSplitters.pickInitialLoadSequence(logger, jprogram, config);\n\t\t\t}\n\t\t\tImplementClassLiteralsAsFields.exec(jprogram, shouldOptimize());\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tlogAstTypeMetrics(precompilationMetrics);\n\t\t\t// (4) Construct and return a value.\n\t\t\tEvent createUnifiedAstEvent = SpeedTracerLogger\n\t\t\t\t\t.start(CompilerEventType.CREATE_UNIFIED_AST);\n\t\t\tUnifiedAst result = new UnifiedAst(options,\n\t\t\t\t\tnew AST(jprogram, jsProgram), singlePermutation,\n\t\t\t\t\tRecordRebinds.exec(jprogram));\n\t\t\tcreateUnifiedAstEvent.end();\n\t\t\treturn result;\n\t\t} catch (Throwable e) {\n\t\t\tthrow CompilationProblemReporter.logAndTranslateException(logger,\n\t\t\t\t\te);\n\t\t}\n\t}" ]
[ "0.59651005", "0.5871104", "0.57724655", "0.57705724", "0.5755423", "0.56828696", "0.5668822", "0.5592742", "0.558691", "0.5537686", "0.553374", "0.5527968", "0.5508817", "0.5498191", "0.54814327", "0.5480638", "0.54720795", "0.5469013", "0.5467981", "0.5467321", "0.5462273", "0.5449854", "0.5448357", "0.544486", "0.54318166", "0.54216915", "0.54161656", "0.54160243", "0.54128844", "0.5406366", "0.5395023", "0.5388238", "0.53465885", "0.5345374", "0.53310305", "0.5313031", "0.52818865", "0.52686065", "0.52595246", "0.5255873", "0.52485484", "0.52409923", "0.5231726", "0.522378", "0.5214587", "0.5205428", "0.5205013", "0.5204007", "0.5200513", "0.5196558", "0.5192125", "0.5186693", "0.51834536", "0.5183368", "0.51799184", "0.5166604", "0.5158433", "0.5156297", "0.51501733", "0.5149311", "0.51487136", "0.51480883", "0.51465297", "0.5140271", "0.5137801", "0.5132402", "0.5129391", "0.5114815", "0.51084906", "0.5097413", "0.50782686", "0.50690895", "0.50636286", "0.5056921", "0.5038215", "0.5034706", "0.5025765", "0.50236356", "0.5018404", "0.5018271", "0.50150645", "0.501219", "0.500581", "0.5005099", "0.50050956", "0.4989706", "0.4987466", "0.49872646", "0.49851227", "0.4983121", "0.4964195", "0.4963165", "0.49585143", "0.4953726", "0.495061", "0.49473554", "0.49456304", "0.493695", "0.4932707", "0.49298623" ]
0.52503556
40
Test case number: 2 / 1 covered goal: Goal 1. wheel.components.Component.nbsp()Lwheel/components/Component;: rootBranch
@Test public void test002() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); ErrorPage errorPage1 = (ErrorPage)errorPage0.nbsp(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void test5() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getContained();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.p();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Block_1\", component0.getComponentId());\n }", "@Test\n public void test8() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.toString();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void test11() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n int int0 = defaultMenuItem0.getDepth();\n assertEquals(0, int0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test320() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n // Undeclared exception!\n try { \n xmlEntityRef0.nbsp();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void test7() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getParent();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.br();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Any_1\", component0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n Checkbox checkbox0 = new Checkbox(label0, \"\", \"\");\n Component component0 = checkbox0.renderHint(\"\");\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "String branch();", "@Test\n public void test108() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.ul();\n Label label0 = (Label)errorPage0.big((Object) errorPage0);\n ActionExpression actionExpression0 = errorPage0.action(\"~Dci\");\n Label label1 = (Label)errorPage0.small((Object) actionExpression0);\n Block block1 = (Block)errorPage0.b();\n List<ActionExpression> list0 = errorPage0._getActions();\n block1._clear();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(block1._isGeneratedId());\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "boolean isBranchTaken();", "@Test\n public void test090() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Vi_5aV\", \"Vi_5aV\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.br();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void VerifylogosonCheckoutPage(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Vat Exclude button with WebElement \"+elementProperties.getProperty(\"Vatinclusion\")+\" should be clicked\");\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"imgStapleslogoonleft\"))& isElementPresent(locator_split(\"imgCheckoutLockicon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"imgCheckoutNortan\")) ){\r\n\t\t\t\tSystem.out.println(\"All the three logos are present\");\r\n\t\t\t\tPoint stapleslogo = getcoordinates(locator_split(\"imgStapleslogoonleft\"));\r\n\t\t\t\tSystem.out.println(stapleslogo);\r\n\t\t\t\tPoint lockicon = getcoordinates(locator_split(\"imgCheckoutLockicon\"));\r\n\t\t\t\tSystem.out.println(lockicon);\r\n\t\t\t\tPoint Nortonicon = getcoordinates(locator_split(\"imgCheckoutNortan\"));\r\n\t\t\t\tSystem.out.println(Nortonicon);\r\n\t\t\t\tif(stapleslogo.x<lockicon.x & lockicon.x<Nortonicon.x){\r\n\t\t\t\t\tSystem.out.println(\"Staples logo is on left side, Lock icon in middle and Norton img on right side\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"Logos are mis aligned\");\r\n\t\t\t\t\tthrow new Error(\"Logos are mis aligned\");\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"One or all the three logos are not present\");\r\n\t\t\t\tthrow new Error(\"One or all the three logos are not present\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Logo Elements are not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgStapleslogoonleft\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCheckoutLockicon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCheckoutNortan\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- One or all the three logos are not present/Logos are mis aligned\");\r\n\r\n\t\t}\r\n\t}", "@Test\n public void test3() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n boolean boolean0 = defaultMenuItem0.isLeaf();\n assertEquals(true, boolean0);\n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test4() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setName((String) null);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"null\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.strong();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test13() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setDepth(0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n assertEquals(0, defaultMenuItem0.getDepth());\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "@Test\n public void test094() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"\", \"\");\n Image image0 = new Image(hidden0, \"\", \"\");\n Label label0 = (Label)errorPage0.ins((Object) image0);\n Block block0 = (Block)errorPage0.h3();\n Label label1 = (Label)errorPage0.u((Object) errorPage0);\n assertTrue(label1._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test\n public void test12() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n \n defaultMenuItem0.setLeaf(false);\n assertEquals(false, defaultMenuItem0.isLeaf());\n }", "@Test(timeout = 4000)\n public void test71() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n int[] intArray0 = new int[0];\n Instance instance0 = BallNode.calcCentroidPivot(intArray0, instances0);\n instances0.add(instance0);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(table0, \"input\", (String) null);\n // Undeclared exception!\n try { \n checkbox0.samp((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.q();\n Component component1 = component0.span();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Block_2\", component1.getComponentId());\n }", "@Test\n public void test100() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.li();\n Label label0 = (Label)errorPage0.label((Object) null);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "public abstract void bepaalGrootte();", "@Test\n public void testRemoveDuplicateParentLabels() {\n System.out.println(\"removeDuplicateParentLabels\");\n HuffmanEncoder huffman = new HuffmanEncoder(p, ensemble);\n HuffmanNode root = huffman.createTree();\n HuffmanDemoComponent comp = new HuffmanDemoComponent(root, ensemble);\n HuffmanCell[][] cells = comp.cells;\n CellDisplayCleaner.removeDuplicateParentLabels(cells);\n assertEquals(6, cells.length);\n assertEquals(5, cells[0].length);\n assertTrue(cells[0][0].getLabel().getText().isEmpty());\n assertEquals(\"step 1\", cells[0][1].getLabel().getText());\n assertEquals(\"step 2\", cells[0][2].getLabel().getText());\n assertEquals(\"step 3\", cells[0][3].getLabel().getText());\n assertEquals(\"step 4\", cells[0][4].getLabel().getText());\n assertEquals(\"a\", cells[1][0].getLabel().getText());\n assertEquals(\"b\", cells[2][0].getLabel().getText());\n assertEquals(\"c\", cells[3][0].getLabel().getText());\n assertEquals(\"d\", cells[4][0].getLabel().getText());\n assertEquals(\"e\", cells[5][0].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][1].getLabel().getText());\n assertEquals(\"0.25\", cells[2][1].getLabel().getText());\n assertEquals(\"0.2\", cells[3][1].getLabel().getText());\n assertEquals(\"0.15\", cells[4][1].getLabel().getText());\n assertEquals(\"0.15\", cells[5][1].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][2].getLabel().getText());\n assertEquals(\"0.25\", cells[2][2].getLabel().getText());\n assertEquals(\"0.2\", cells[3][2].getLabel().getText());\n assertEquals(\"0.3\", cells[4][2].getLabel().getText());\n assertEquals(\"\", cells[5][2].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][3].getLabel().getText());\n assertEquals(\"0.45\", cells[2][3].getLabel().getText());\n assertEquals(\"\", cells[3][3].getLabel().getText());\n assertEquals(\"0.3\", cells[4][3].getLabel().getText());\n assertEquals(\"\", cells[5][3].getLabel().getText());\n \n assertEquals(\"0.55\", cells[1][4].getLabel().getText());\n assertEquals(\"0.45\", cells[2][4].getLabel().getText());\n assertEquals(\"\", cells[3][4].getLabel().getText());\n assertEquals(\"\", cells[4][4].getLabel().getText());\n assertEquals(\"\", cells[5][4].getLabel().getText());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n MockDate mockDate0 = new MockDate((-800), (-800), (-707), 75, 43);\n Label label0 = new Label(errorPage0, mockDate0);\n Component component0 = label0.b();\n Submit submit0 = new Submit(component0, \"The list of names must not be null\", \"\\f\");\n Component component1 = label0.strike((Object) submit0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component1._isGeneratedId());\n }", "@Test\n public void test9() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.setIndex(0);\n assertEquals(0, defaultMenuItem0.getIndex());\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "public void test12() {\n //$NON-NLS-1$\n deployBundles(\"test12\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n public void test095() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.del((Object) errorPage0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n \n ErrorPage errorPage1 = (ErrorPage)errorPage0.remove((Component) label0);\n TableBlock tableBlock0 = new TableBlock(errorPage1);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try {\n Component component0 = any0.dfn();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n public void test114() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"*f\");\n TableBlock tableBlock0 = table0.thead();\n Any any0 = tableBlock0.col();\n String[] stringArray0 = new String[8];\n // Undeclared exception!\n try {\n Component component0 = any0.area(stringArray0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "double getBranchProbability();", "@Test\n public void test113() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.acronym((Object) \"Col component can e added onlG to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n public void test054() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.i((Object) \"Tfoot component can be added only to a Table.\");\n }", "@Test\n public void testAddCase3b()\n {\n RedBlackTree<Integer> tree = new RedBlackTree<Integer>();\n tree.add(0);\n tree.add(3);\n tree.add(2);\n tree.add(4);\n tree.add(1);\n assert(\"[b:0]\\n[r:3]\\n[b:2]\\n[r:1]\\n[b:4]\\n\".equals(tree.toString()));\n }", "@Test\n public void test091() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n LabeledWord labeledWord0 = new LabeledWord(\"\");\n Label label0 = (Label)errorPage0.s((Object) labeledWord0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test253() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.ol();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Block_1\", component0.getComponentId());\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"/c[~rNl!Ma-\", \"kIh 4+,VlA$]12\");\n ElExpression elExpression0 = new ElExpression(\"J>w9x0K2Bs|BOY\");\n // Undeclared exception!\n try { \n submit0.eval(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.map((String) null);\n assertEquals(\"Block_1\", component0.getComponentId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "@Test(timeout = 4000)\n public void test187() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0.getPage();\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test291() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n // Undeclared exception!\n try { \n checkbox0.h3((Object) \"0G-VP2>k}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public int getBranchCount() { return _brcnt; }", "@Test\n public void test0() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.getName();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test(timeout = 4000)\n public void test225() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"java.lang.String@000000005\", \"]f '8Drr>Uj1==M2\");\n List<RenderableComponent> list0 = checkbox0._getRenderableChildren();\n assertEquals(\"]f '8Drr>Uj1==M2\", xmlEntityRef0.getComponentId());\n assertNotNull(list0);\n }", "@Test(timeout = 4000)\n public void test163() throws Throwable {\n ElExpression elExpression0 = new ElExpression(\"N2}mQjM@Rjzvl\");\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"z:_i>EAQ.Bdq@CL&k?\\\"\");\n // Undeclared exception!\n try { \n xmlEntityRef0.clasS(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void testLabelForSet(Component comp) {\n if (testSettings.AP_labelForSet && (comp instanceof JLabel)){\n // H1- hack for JLabels labels.add(comp);\n Component labelFor = ((JLabel)comp).getLabelFor();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testLabelForSet()> - labelFor=\"+labelFor);\n \n if (labelFor == null){\n noLabelFor.add(comp);\n }\n }\n \n if (testSettings.AP_noLabelFor) {\n if ((testSettings.AP_nlf_text && (comp instanceof JTextComponent)) ||\n (testSettings.AP_nlf_table && (comp instanceof JTable)) ||\n (testSettings.AP_nlf_list && (comp instanceof JList)) ||\n (testSettings.AP_nlf_tree && (comp instanceof JTree)) ||\n (testSettings.AP_nlf_tabbedPane && (comp instanceof JTabbedPane))){\n labelForPointingComponents.add(comp);\n }\n }\n \n }", "public void test13() {\n //$NON-NLS-1$\n deployBundles(\"test13\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test24() {\n //$NON-NLS-1$\n deployBundles(\"test24\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test374() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n Component component0 = xmlEntityRef0.clasS((CharSequence) null);\n assertEquals(\"wheel_components_XmlEntityRef\", component0.getComponentId());\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }" ]
[ "0.59463364", "0.57910424", "0.57749015", "0.56678605", "0.5608242", "0.5539121", "0.5537519", "0.5531893", "0.55083454", "0.5484992", "0.5482707", "0.54813355", "0.5478615", "0.54643536", "0.5452039", "0.5410417", "0.5408981", "0.53993446", "0.5398146", "0.5360672", "0.5355583", "0.53354084", "0.53327954", "0.5329234", "0.532194", "0.5304739", "0.5298645", "0.52943814", "0.52819186", "0.52815527", "0.527742", "0.5277374", "0.5275711", "0.52654207", "0.52634203", "0.5263137", "0.5259549", "0.5254981", "0.52480084", "0.52469033", "0.52441853", "0.52420866", "0.5226031", "0.5224993", "0.5223136", "0.5214829", "0.5214317", "0.52130127", "0.5212044", "0.5207367", "0.5204799", "0.52011883", "0.5192541", "0.51869607", "0.51862186", "0.5181999", "0.5179948", "0.5177242", "0.5176227", "0.51760334", "0.5174326", "0.51732206", "0.5172236", "0.51687235", "0.5166895", "0.51588017", "0.51572645", "0.51562643", "0.5156063", "0.51533985", "0.51526695", "0.5150783", "0.5144249", "0.51370883", "0.513618", "0.5135568", "0.51320505", "0.51309216", "0.5127318", "0.5126728", "0.5124466", "0.5116325", "0.5114359", "0.51095694", "0.51039654", "0.509453", "0.50907534", "0.5088954", "0.5087366", "0.50873524", "0.50771904", "0.50765616", "0.50636", "0.5061662", "0.5058058", "0.50569224", "0.5042866", "0.5042223", "0.5041309", "0.504118", "0.5040146" ]
0.0
-1
Test case number: 3 / 1 covered goal: Goal 1. wheel.components.Component.getComponents()Ljava/util/Map;: I12 Branch 69 IFNE L1774 false
@Test public void test003() throws Throwable { Form form0 = new Form("Ir{`W#0r@'S$`m:"); // Undeclared exception! try { Map<String, Component> map0 = form0.getComponents(); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // No top level component found. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Test\n public void test057() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Map<String, Component> map0 = errorPage0.getComponents();\n }", "int countComponents() throws Exception;", "Map<?,?> getComponents();", "@Test\n void test014_testGetConnectedComponents() {\n try {\n christmasBuddENetwork.addFriendship(\"Harry\", \"Prancer\");\n\n christmasBuddENetwork.addFriendship(\"Santa\", \"Rudolph\");\n christmasBuddENetwork.addFriendship(\"Comet\", \"Santa\");\n christmasBuddENetwork.addFriendship(\"Rudolph\", \"Comet\");\n christmasBuddENetwork.addFriendship(\"Grinch\", \"Comet\");\n\n // There should be 2 connected components.\n Set<Graph> christmasComponents =\n christmasBuddENetwork.getConnectedComponents();\n int numComponents = christmasComponents.size();\n //\n if (numComponents != 2) {\n fail(\"\");\n }\n Iterator<Graph> christmasGraphIterator = christmasComponents.iterator();\n\n boolean firstCompFound = false;\n boolean secondCompFound = false;\n int componentsFound = 0;\n while (christmasGraphIterator.hasNext()) {\n Graph christmasGraph = christmasGraphIterator.next();\n componentsFound = componentsFound + 1;\n //\n if (christmasGraph.size() == 1) {\n if (firstCompFound == true) {\n fail(\"test014_testGetConnectedComponents(): FAILED! Duplicate \"\n + \"component (size 1) found! :(\");\n }\n Set<User> oneConnectedComponentVertices =\n christmasGraph.getAllVertices();\n ArrayList<String> componentUsersList = new ArrayList<String>();\n for (User userName : oneConnectedComponentVertices) {\n componentUsersList.add(userName.getName());\n System.out.println(userName.getName());\n }\n if ((!componentUsersList.contains(\"Harry\"))\n || (!componentUsersList.contains(\"Prancer\"))) {\n fail(\"test014_testGetConnectedComponents(): Failed! :( Did NOT \"\n + \"have Harry and Prancer\");\n } else {\n firstCompFound = true;\n\n }\n }\n\n if (christmasGraph.size() == 4) {\n if (secondCompFound == true) {\n fail(\"test014_testGetConnectedComponents: FAILED! Duplicate \"\n + \"component (size 4) found! :(\");\n }\n Set<User> secondConnectedComponentVertices =\n christmasGraph.getAllVertices();\n ArrayList<String> componentUsersList2 = new ArrayList<String>();\n for (User userName : secondConnectedComponentVertices) {\n componentUsersList2.add(userName.getName());\n }\n if ((!componentUsersList2.contains(\"santa\"))\n || (!componentUsersList2.contains(\"rudolph\"))\n || (!componentUsersList2.contains(\"comet\"))\n || (!componentUsersList2.contains(\"grinch\"))) {\n fail(\"test014_testGetConnectedComponents(): FAILED! Did NOT have \"\n + \"Santa, Rudolph, Comet, and Grinch!\");\n } else {\n secondCompFound = true;\n }\n }\n }\n\n if (componentsFound != 2) {\n fail(\"test014_testGetConnectedComponents(): Did NOT return 2 for the \"\n + \"connected components but instead returned: \" + componentsFound);\n }\n } catch (Exception e) {\n fail(\"test014_testGetConnectedComponents(): Failed! :(. Threw unexpected \"\n + \"exception\");\n }\n\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "protected void checkComponentList()\n {\n String lsLeft ;\n String lsDocComp ;\n int liDotIdx ;\n int liNumComps ;\n Hashtable loCompHash = new Hashtable( 5 ) ;\n\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n lsLeft = getData( \"AND_COND_LHS_\" + liCtr ).getString() ;\n if ( lsLeft != null )\n {\n liDotIdx = lsLeft.indexOf( '.' ) ;\n if ( liDotIdx >= 0 )\n {\n lsDocComp = lsLeft.substring( 0, liDotIdx ) ;\n } /* end if ( liDotIdx >= 0 ) */\n else\n {\n lsDocComp = lsLeft ;\n } /* end else */\n loCompHash.put( lsDocComp, lsDocComp ) ;\n } /* end if ( lsLeft != null ) */\n } /* end for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ ) */\n\n liNumComps = loCompHash.size() ;\n if ( liNumComps > 2 )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( liNumComps > 2 ) */\n else if ( liNumComps == 2 )\n {\n Enumeration leComps = loCompHash.elements() ;\n String lsComp1 = (String)leComps.nextElement() ;\n String lsComp2 = (String)leComps.nextElement() ;\n\n if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) &&\n ( !lsComp2.endsWith( \"_DOC_HDR\" ) ) )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) && . . . */\n } /* end else if ( liNumComps == 2 ) */\n }", "@Test\n public void Test14() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertEquals(54760, component.hashCode());\n }", "public void testGetComponent() {\n System.out.println(\"getComponent\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent comp = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(comp).getComponent();\n DesignComponent expResult = comp;\n \n assertEquals(expResult,result);\n }\n });\n \n }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "private void c() {\n/* 258 */ int tIdx = getTileIdx();\n/* */ \n/* 260 */ if (this.e.getNumComps() < 3) {\n/* 261 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 264 */ if (this.e.getTileCompWidth(tIdx, 0) != this.e.getTileCompWidth(tIdx, 1) || this.e\n/* 265 */ .getTileCompWidth(tIdx, 0) != this.e.getTileCompWidth(tIdx, 2) || this.e\n/* 266 */ .getTileCompHeight(tIdx, 0) != this.e.getTileCompHeight(tIdx, 1) || this.e\n/* 267 */ .getTileCompHeight(tIdx, 0) != this.e.getTileCompHeight(tIdx, 2)) {\n/* 268 */ throw new IllegalArgumentException(\"Can not use RCT on components with different dimensions\");\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 274 */ int[] utd = new int[this.e.getNumComps()];\n/* 275 */ for (int i = utd.length - 1; i >= 0; i--) {\n/* 276 */ utd[i] = this.e.getNomRangeBits(i);\n/* */ }\n/* 278 */ this.i = a(utd, 1, (int[])null);\n/* */ }", "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "@Test\n\tvoid test4AddComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tvc.addComponent(comp3);\n\t\tassertEquals(comp3.hashCode(), vc.getComponentsList().get(vc.getComponentsList().size() - 1).hashCode());\n\t}", "protected final Map getComponentMap()\n {\n return m_components;\n }", "protected abstract Object[] getComponents();", "private void d() {\n/* 287 */ int tIdx = getTileIdx();\n/* */ \n/* 289 */ if (this.e.getNumComps() < 3) {\n/* 290 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 293 */ if (this.e.getTileCompWidth(tIdx, 0) != this.e.getTileCompWidth(tIdx, 1) || this.e\n/* 294 */ .getTileCompWidth(tIdx, 0) != this.e.getTileCompWidth(tIdx, 2) || this.e\n/* 295 */ .getTileCompHeight(tIdx, 0) != this.e.getTileCompHeight(tIdx, 1) || this.e\n/* 296 */ .getTileCompHeight(tIdx, 0) != this.e.getTileCompHeight(tIdx, 2)) {\n/* 297 */ throw new IllegalArgumentException(\"Can not use ICT on components with different dimensions\");\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 303 */ int[] utd = new int[this.e.getNumComps()];\n/* 304 */ for (int i = utd.length - 1; i >= 0; i--) {\n/* 305 */ utd[i] = this.e.getNomRangeBits(i);\n/* */ }\n/* 307 */ this.i = a(utd, 2, (int[])null);\n/* */ }", "public boolean isValidComponent(String key){\r\n //Remove \"Components.\" from begining\r\n if(key.length() > 11 && key.subSequence(0, 11).equals(\"Components.\")){\r\n key = key.substring(11); \r\n } \r\n \r\n // Check Logical Component mappings\r\n for(Netlist nl: netlists){\r\n if(nl.containsKey(key)){\r\n return true;\r\n }\r\n } \r\n return false;\r\n }", "@Test(expected = NullPointerException.class)\n public void Test02() {\n component = new DamageEffectComponent(null, 3, 20);\n }", "protected HashSet getNoComponentName(){\n return tester.noComponentName;\n }", "public void checkAndSetStart() {\r\n\t\tSystem.out.println(\"\t\tcheckAndSetStart \"+this.id +\" size:\"+this.components.size());\r\n\t\tif(hasNoStart()) {\t\t\r\n\t\t\tList<ComponentConfig> longestVisitedComps = new ArrayList<ComponentConfig>();\r\n\t\t\tComponentConfig longestVisitedComp = null;\r\n\t\t\tint longestVisited = 0;\r\n\t\t\tfor(ComponentConfig comp: components) {\r\n\t\t\t\tint visited = traverseModel(0,comp);\r\n\t\t\t\tSystem.out.println(\"\t\t\ttraverse\"+comp.getId()+\" v:\"+visited);\r\n\t\t\t\tif(visited > longestVisited) {\r\n\t\t\t\t\tlongestVisited = visited;\r\n\t\t\t\t\tlongestVisitedComps.clear();\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t} else if(visited == longestVisited) {\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t}\r\n\t\t\t\t// catch deadloop, if all component are visisted\r\n\t\t\t\tif(longestVisited == components.size())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(ComponentConfig st: longestVisitedComps) {\r\n\t\t\t\tst.setIsstartcaller(true);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t// find other component that call to the same component that start component calls within model\r\n\t\tList<ComponentConfig> startComps = new ArrayList<ComponentConfig>();\r\n\t\tfor(ComponentConfig st: components) {\r\n\t\t\tif(st.isIsstartcaller())\r\n\t\t\t\tstartComps.add(st);\r\n\t\t}\r\n\t\tList<Integer> calls = new ArrayList<Integer>();\r\n\t\tfor(ComponentConfig st: startComps) {\r\n\t\t\tif(st.isIsstartcaller() && st.getCalls()!=null) {\r\n\t\t\t\tfor(int i: st.getCalls())\r\n\t\t\t\t\tfor(ComponentConfig eachComp: components) {\r\n\t\t\t\t\t\tSystem.out.println(\"\tfind comp that call \"+i+\" \"+eachComp.getCalls());\r\n\t\t\t\t\t\tif(eachComp.getCalls()!=null)\r\n\t\t\t\t\t\t\tfor(int callee: eachComp.getCalls()) {\r\n\t\t\t\t\t\t\t\t// found component that call to the same target\r\n\t\t\t\t\t\t\t\tif(callee == i)\r\n\t\t\t\t\t\t\t\t\teachComp.setIsstartcaller(true);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testTRK3HasNoSubComponents() {\n assertThat( hasSubComponents( TRK3_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(timeout = 4000)\n public void test213() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"wh\\\"vVQ `'HnBv\", \"~qV]vimZJQ;pcba\");\n // Undeclared exception!\n try { \n checkbox0.get(\"4_R]T<#2)Q?]R7Ut\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Could not find component with id '4_R]T<#2)Q?]R7Ut'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testASSY2HasSubComponents() {\n assertThat( hasSubComponents( ASSY2_WITH_SUB_COMP ), is( true ) );\n }", "@Test\n public void Test13_1() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_DEBUFF, 3, -40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2127L, 2127L);\n Object object0 = new Object();\n range0.equals(object0);\n Object object1 = new Object();\n range0.equals((Object) null);\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }", "protected ComponentStruct[] getCASComponents() throws SessionQueryException\n {\n ComponentStruct[] cases = null;\n\n try\n {\n cases = getSessionManagementAdminService().getComponentsForType(Components.SOURCE_COMPONENT);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT, cases);\n if (GUILoggerHome.find().isInformationOn())\n {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT,\n \"Found \" + cases.length + \" CAS Components\");\n }\n }\n catch(Exception e)\n {\n throw new SessionQueryException(\"Could not retrieve CAS Components.\", e);\n }\n\n return cases;\n }", "@Test\n public void Test13_3() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 50);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test\n public void testTRK1HasSubComponents() {\n assertThat( hasSubComponents( TRK1_WITH_SUB_COMP ), is( true ) );\n }", "@Test\n\tpublic void verifyCombosOnBoard() {\n\t\tBoard board = boardFactory.fromTextGenerateBoard(\"/boards/1LineOf3.txt\", mockGroup);\n\t\tassertFalse(board.outOfMoves());\n\n\t}", "private void checkNoCycles(List<JpsModule> component) {\n if (component.size() > 1) {\n StringBuilder message = new StringBuilder();\n message.append(\"Found circular module dependency: \")\n .append(component.size())\n .append(\" modules\");\n for (JpsModule module : component) {\n message.append(\" \").append(module.getName());\n }\n logger.error(message.toString());\n }\n }", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 3253L, 3253L);\n range0.getLength();\n range0.toString();\n Object object0 = new Object();\n Range range1 = Range.ofLength(3253L);\n range1.intersects(range0);\n range0.equals(range1);\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"[ 3253 .. 3252 ]/0B\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.[ 3253 .. 3252 ]/0B\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32729L, 2147483647L);\n range0.toString();\n range0.toString(range_CoordinateSystem0);\n range0.toString();\n range0.equals(range0);\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }", "@Test\n public void testTRK2HasNoSubComponents() {\n assertThat( hasSubComponents( TRK2_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testACFTHasSubComponents() {\n assertThat( hasSubComponents( ACFT ), is( true ) );\n }", "@Test(timeout = 4000)\n public void test220() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.getComponents();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 4294967244L, 9223372036854775806L);\n range0.getBegin();\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n range0.toString(range_CoordinateSystem1);\n Object object0 = new Object();\n range0.equals(range_CoordinateSystem1);\n Range.CoordinateSystem.values();\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n range0.equals((Object) null);\n Range.CoordinateSystem[] range_CoordinateSystemArray1 = Range.CoordinateSystem.values();\n assertNotSame(range_CoordinateSystemArray1, range_CoordinateSystemArray0);\n }", "public int getNumberOfComponents();", "@Test(expected = LackOfComponentsException.class)\n\tpublic void testLackOfComponentsException() throws Exception {\n\t\tnew MovieGraphFactory().parse(\"Vertex=<Movie,<1994,USA,9.3>>\");\n\t}", "public ImmutableComponent[] getComponents(){\n\t return this.components;\n\t}", "@Test\n public void Test13_2() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 4, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "public abstract Map<String,List<Component>> getNamedComponents();", "public StructureVillagePieces.Village buildComponent(StructureVillagePieces.PieceWeight parPieceWeight, StructureVillagePieces.Start parStart, List<StructureComponent> parPiecesList, Random parRand, int parMinX, int parMinY, int parMinZ, EnumFacing parFacing, int parType) {\n/* 50 */ System.out.println(\"TekHouse6 buildComponent() at \" + parMinX + \", \" + parMinY + \", \" + parMinZ);\n/* */ \n/* 52 */ StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(parMinX, parMinY, parMinZ, 0, 0, 0, 9, 7, 12, parFacing);\n/* 53 */ return (canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(parPiecesList, structureboundingbox) == null) ? (StructureVillagePieces.Village)new TekHouse6(parStart, parType, parRand, structureboundingbox, parFacing) : null;\n/* */ }", "public Map<String, Set<ProjectVersionComponentView>> getVulnerableComponentMap() {\n if (vulnerableComponentMap.isEmpty()) {\n List<ProjectVersionComponentView> components = new ArrayList<>();\n Optional<ProjectVersionWrapper> projectVersionWrapper = Optional.empty();\n try {\n projectVersionWrapper = projectService.getProjectVersion(hubProjectName, hubProjectVersionName);\n } catch (IntegrationException e) {\n logger.error(String.format(\"Couldn't find the Black Duck project '%s' and version '%s'. Error: %s\", hubProjectName, hubProjectVersionName, e.getMessage()), e);\n }\n if (projectVersionWrapper.isPresent()) {\n ProjectVersionView projectVersionView = projectVersionWrapper.get().getProjectVersionView();\n components = getProjectVersionComponents(projectVersionView);\n }\n logger.debug(String.format(\"Found %d components for Black Duck project '%s' version '%s'.\", components.size(), hubProjectName, hubProjectVersionName));\n mapMatchedFilesToComponents(vulnerableComponentMap, components);\n }\n return vulnerableComponentMap;\n }", "public void testGetComponent() throws Exception {\n Component component = Aura.getInstanceService()\n .getInstance(\"auratest:testComponent1\", ComponentDef.class, null);\n assertEquals(\"Default String\", component.getAttributes().getExpression(\"myString\")); // from\n // the\n // component\n assertEquals(true, component.getAttributes().getExpression(\"myBoolean\")); // from\n // the\n // parent\n // component\n assertEquals(\"Interface String\", component.getAttributes().getExpression(\"interfaceString\")); // from\n // the\n // interface\n assertEquals(\"1\", component.getGlobalId());\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-999L), (-999L));\n Range range1 = Range.of((-999L), (-999L));\n range1.getEnd();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n Object object0 = new Object();\n range0.equals(range1);\n Range.CoordinateSystem.values();\n Range.CoordinateSystem.values();\n range1.equals(range_CoordinateSystem0);\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "public static void detectComponents(String f) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void Test10() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Test\n\tpublic void componentToString()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent comp = new Component();\n\t\t\tcomp.setName(compName);\n\t\t\tcomp.setGroup(compGroup);\n\t\t\tcomp.setVersion(compVersion);\n\t\t\tcomp.setType(compType);\n\t\t\t\n\t\t\tString expectedStringWithoutTabs = \"Name:newComponent\\n\" +\n\t\t\t\t\t\"Group: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"Version: 1.5.1\\n\";\n\t\t\tString actualStringWithoutTabs = ComponentUtilities.toString(comp);\n\t\t\t\n\t\t\tif (expectedStringWithoutTabs.equals(actualStringWithoutTabs))\n\t\t\t\twatcher.getLogger()\n\t\t\t\t\t\t.info(\"Got Expected String from ComponentUtilities.toString(comp)!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithoutTabs,\n\t\t\t\t\t\tactualStringWithoutTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithoutTabs.equals(actualStringWithoutTabs));\n\t\t\t\n\t\t\tString expectedStringWithTabs = \"\tName:newComponent\\n\" +\n\t\t\t\t\t\"\tGroup: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"\tVersion: 1.5.1\\n\";\n\t\t\t\n\t\t\tString actualStringWithTabs = ComponentUtilities.toString(comp, \"\t\");\n\t\t\t\n\t\t\tif (actualStringWithTabs.equals(expectedStringWithTabs))\n\t\t\t\twatcher.getLogger().info(\"Got Expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\")!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithTabs,\n\t\t\t\t\t\tactualStringWithTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\"): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithTabs.equals(actualStringWithTabs));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting ComponentUtilities.toString.\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Range range0 = Range.of(0L, 0L);\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Range.Builder range_Builder1 = range_Builder0.copy();\n Range range1 = range_Builder1.build();\n long long0 = 9223372036854775807L;\n range_Builder1.shift(9223372036854775807L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 243L, 466L);\n range2.isSubRangeOf(range1);\n Range range3 = Range.of((-636L), (-636L));\n range3.complement(range2);\n range1.intersects(range3);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Name is null\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private void checkCastleCollisions() {\n\t\t\n\t}", "@Test\n public void Test12() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n ManaEffectComponent another = new ManaEffectComponent(EffectEnum.MANA_BUFF, 3, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test\n\tpublic void testGetPieces() {\n\t\tPiece[] pieces = Piece.getPieces();\n\n assertTrue(pieces[Piece.S1].equals(s));\n assertTrue(pieces[Piece.L2].equals(l2));\n assertTrue(pieces[Piece.SQUARE].equals(square));\n assertTrue(pieces[Piece.PYRAMID].equals(pyr1));\n \n assertTrue(pieces[Piece.S1].fastRotation().equals(sRotated));\n assertFalse(pieces[Piece.S1].fastRotation().equals(s));\n \n assertTrue(pieces[Piece.L2].fastRotation().equals(l2Rotated));\n assertTrue(pieces[Piece.PYRAMID].fastRotation().equals(pyr2));\n \n\t}", "@Test\n void getCurrentRewardsFromUpgradeTest() {\n EnumMap<CardPoints,Integer> oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 3);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); //index/state = 0, cost stage 1\n assertEquals(oracle, this.wonder.getProp().get(this.wonder.getState()).y); //index/state = 0, cost stage 1\n\n wonder.setState(wonder.getState() + 1); // stage one is build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n //reward is an effect, so no cardpoints\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 1, cost stage 2\n\n wonder.setState(wonder.getState() + 1); // 2 stage build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 7);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 2, cost stage 3\n wonder.setState(wonder.getState() + 1); // Build the last stage\n\n //return an outIndexError when we call this method\n }", "@Test(timeout = 4000)\n public void test190() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"org.mvel.conversion.IntegerCH$10\");\n TextInput textInput0 = new TextInput(xmlEntityRef0, \"org.mvel.conversion.IntegerCH$10\", \"org.mvel.conversion.IntegerCH$10\");\n // Undeclared exception!\n try { \n textInput0._getTopLevelComponent(true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2117L, 2117L);\n // Undeclared exception!\n try { \n range0.getBegin((Range.CoordinateSystem) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // CoordinateSystem can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private void tryGetComponents() {\n\t\tutil.mask(pmsMessages.mskComponents());\n\n\t\tAsyncCallback<List<InheritedComponentInstanceSelDTO>> callback = new AsyncCallback<List<InheritedComponentInstanceSelDTO>>() {\n\t\t\tpublic void onFailure(Throwable arg0) {\n\t\t\t\tutil.unmask();\n\t\t\t\terrorProcessor.processError(arg0, errorMessageResolver, pmsMessages.msgErrorRetrieveComponents());\n\t\t\t}\n\n\t\t\tpublic void onSuccess(List<InheritedComponentInstanceSelDTO> arg0) {\n\t\t\t\tstore.removeAll();\n\t\t\t\tstore.clearFilters();\n\t\t\t\tfilter.setValue(null);\n\n\t\t\t\tList<InheritedComponentInstanceSelModelData> inheritedModelData = new LinkedList<InheritedComponentInstanceSelModelData>();\n\t\t\t\tfor (InheritedComponentInstanceSelDTO dto : arg0) {\n\t\t\t\t\tinheritedModelData.add(new InheritedComponentInstanceSelModelData(dto));\n\t\t\t\t}\n\t\t\t\tstore.add(inheritedModelData);\n\n\t\t\t\tutil.unmask();\n\t\t\t}\n\t\t};\n\t\tcomponentsService.getInheritedComponents(portalNameDto.getId(), callback);\n\t}", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(table0, \"input\", (String) null);\n // Undeclared exception!\n try { \n checkbox0.samp((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private static Set<C3246b> m11182c(List<Component<?>> list) {\n Set<C3246b> set;\n HashMap hashMap = new HashMap(list.size());\n for (Component next : list) {\n C3246b bVar = new C3246b(next);\n Iterator it = next.getProvidedInterfaces().iterator();\n while (true) {\n if (it.hasNext()) {\n Class cls = (Class) it.next();\n C3247c cVar = new C3247c(cls, !next.isValue());\n if (!hashMap.containsKey(cVar)) {\n hashMap.put(cVar, new HashSet());\n }\n Set set2 = (Set) hashMap.get(cVar);\n if (set2.isEmpty() || cVar.f18935b) {\n set2.add(bVar);\n } else {\n throw new IllegalArgumentException(String.format(\"Multiple components provide %s.\", new Object[]{cls}));\n }\n }\n }\n }\n for (Set<C3246b> it2 : hashMap.values()) {\n for (C3246b bVar2 : it2) {\n for (Dependency next2 : bVar2.mo20819c().getDependencies()) {\n if (next2.isDirectInjection() && (set = (Set) hashMap.get(new C3247c(next2.getInterface(), next2.isSet()))) != null) {\n for (C3246b bVar3 : set) {\n bVar2.mo20817a(bVar3);\n bVar3.mo20818b(bVar2);\n }\n }\n }\n }\n }\n HashSet hashSet = new HashSet();\n for (Set addAll : hashMap.values()) {\n hashSet.addAll(addAll);\n }\n return hashSet;\n }", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "boolean checkForShortCircuit(CaveGen g) {\n int i = g.placedMapUnits.size() - 1;\n MapUnit m = g.placedMapUnits.get(i);\n if (i >= Parser.scUnitTypes.length) return false;\n if (Parser.scUnitTypes[i] != -1) {\n String targetName = g.spawnMapUnitsSorted.get(Parser.scUnitTypes[i]).name;\n if (!targetName.equals(m.name))\n return true;\n } \n if (Parser.scRots[i] != -1) {\n if (m.rotation != Parser.scRots[i])\n return true;\n } \n if (Parser.scUnitIdsFrom[i] != -1 \n && Parser.scDoorsFrom[i] != -1\n && Parser.scDoorsTo[i] != -1) {\n Door d = m.doors.get(Parser.scDoorsTo[i]);\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n return true;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n return true;\n if (o.doors.indexOf(d.adjacentDoor) != Parser.scDoorsFrom[i])\n return true;\n }\n else {\n if (Parser.scDoorsTo[i] != -1) {\n Door d = m.doors.get(Parser.scDoorsTo[i]);\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n return true;\n }\n if (Parser.scUnitIdsFrom[i] != -1 \n && Parser.scDoorsFrom[i] != -1) {\n boolean isGood = false;\n for (Door d: m.doors) {\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n continue;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n continue;\n if (o.doors.indexOf(d.adjacentDoor) != Parser.scDoorsFrom[i])\n continue;\n isGood = true;\n }\n if (!isGood) return true;\n }\n else if (Parser.scUnitIdsFrom[i] != -1) {\n boolean isGood = false;\n for (Door d: m.doors) {\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n continue;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n continue;\n isGood = true;\n }\n if (!isGood) return true;\n }\n }\n return false;\n }", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.map((String) null);\n assertEquals(\"Block_1\", component0.getComponentId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test\n public void testGetCoinTypeList() throws Exception {\n\n Map<Long,VirtualCoin> map;\n map = CacheHelper.getObj(CacheKey.VIRTUAL_COIN_ALL_KEY);\n Boolean flag = false;\n if (map == null){\n flag = true;\n }\n System.out.println(\"sdafds = \" + flag );\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"cannot bind to collection property: \", \"\");\n // Undeclared exception!\n try { \n checkbox0.q();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Override\n public int getNumComponents()\n {\n return components.size();\n }", "private void testLabelForSet(Component comp) {\n if (testSettings.AP_labelForSet && (comp instanceof JLabel)){\n // H1- hack for JLabels labels.add(comp);\n Component labelFor = ((JLabel)comp).getLabelFor();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testLabelForSet()> - labelFor=\"+labelFor);\n \n if (labelFor == null){\n noLabelFor.add(comp);\n }\n }\n \n if (testSettings.AP_noLabelFor) {\n if ((testSettings.AP_nlf_text && (comp instanceof JTextComponent)) ||\n (testSettings.AP_nlf_table && (comp instanceof JTable)) ||\n (testSettings.AP_nlf_list && (comp instanceof JList)) ||\n (testSettings.AP_nlf_tree && (comp instanceof JTree)) ||\n (testSettings.AP_nlf_tabbedPane && (comp instanceof JTabbedPane))){\n labelForPointingComponents.add(comp);\n }\n }\n \n }", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-524L), (-524L));\n range0.equals((Object) null);\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }", "private void dumpComponent(ServiceComponentExt comp)\n {\n log(\"*\");\n log(\"* ServiceComponent Information\");\n assertNotNull(\"SC Name cannot be null\", comp.getName());\n log(\"* SC Name: \" + comp.getName());\n int pid = comp.getPID();\n // TODO (Josh) Verify this range of pids\n assertTrue(\"SC Pid does not fall within valid range\", pid > 0 && pid < 65535);\n log(\"* SC Pid: \" + pid);\n log(\"* SC Assoc. Language: \" + comp.getAssociatedLanguage());\n assertNotNull(\"SC ServiceInformationType cannot be null\", comp.getServiceInformationType());\n log(\"* SC ServiceInformationType: \" + comp.getServiceInformationType());\n assertNotNull(\"SC StreamType cannot be null\", comp.getStreamType());\n log(\"* SC StreamType: \" + comp.getStreamType());\n short est = comp.getElementaryStreamType();\n // TODO (Josh) Enable once Elementary StreamType is broadcast properly\n // assertTrue(\"Elementary StreamType does not fall within valid range: 1-14 or 128-132 (inclusive)\",\n // (est > 0 && est < 15) && (est > 127 && est < 133));\n log(\"* SC Elementary StreamType: \" + est);\n assertNotNull(\"SC UpdateTime cannot be null\", comp.getUpdateTime());\n long now = new Date().getTime();\n long oneYearAgo = now - (1000 * 60 * 60 * 24 * 365);\n long oneYearAhead = now + (1000 * 60 * 60 * 24 * 365);\n assertTrue(\"ServiceDetails' Update time should not be more than a year off\", (oneYearAgo < comp.getUpdateTime()\n .getTime())\n && (oneYearAhead > comp.getUpdateTime().getTime()));\n log(\"* SC UpdateTime: \" + comp.getUpdateTime());\n try\n {\n log(\"* SC Component Tag: \" + comp.getComponentTag());\n }\n catch (SIException ex)\n {\n log(\"* SC Component Tag: UNDEFINED\");\n }\n try\n {\n log(\"* SC Carousel ID: \" + comp.getCarouselID());\n }\n catch (SIException ex)\n {\n log(\"* SC Carousel ID: UNDEFINED\");\n }\n assertNotNull(\"SC Locator cannot be null\", comp.getLocator());\n log(\"* SC Locator: \" + comp.getLocator());\n assertNotNull(\"SC Handle cannot be null\", comp.getServiceComponentHandle());\n log(\"* SC Handle: \" + comp.getServiceComponentHandle());\n assertNotNull(\"Returned ServiceDetails cannot be null\", comp.getServiceDetails());\n }", "@Test\n public void test58() throws Throwable {\n Rectangle2D.Double rectangle2D_Double0 = (Rectangle2D.Double)Plot.DEFAULT_LEGEND_ITEM_BOX;\n double double0 = rectangle2D_Double0.getWidth();\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n combinedDomainCategoryPlot0.rendererChanged((RendererChangeEvent) null);\n combinedDomainCategoryPlot0.setWeight((-1699));\n double double1 = combinedDomainCategoryPlot0.getRangeCrosshairValue();\n int int0 = combinedDomainCategoryPlot0.getDomainAxisCount();\n Collection collection0 = combinedDomainCategoryPlot0.getRangeMarkers((Layer) null);\n Color color0 = (Color)combinedDomainCategoryPlot0.getRangeCrosshairPaint();\n combinedDomainCategoryPlot0.mapDatasetToDomainAxis(1, (-1699));\n AxisLocation axisLocation0 = combinedDomainCategoryPlot0.getDomainAxisLocation();\n Range range0 = combinedDomainCategoryPlot0.getDataRange((ValueAxis) null);\n combinedDomainCategoryPlot0.setRangeAxisLocation(axisLocation0, true);\n combinedDomainCategoryPlot0.rendererChanged((RendererChangeEvent) null);\n MockFile mockFile0 = new MockFile(\"$dhA|P=px%DHgW<3M\", \"$dhA|P=px%DHgW<3M\");\n MockFileInputStream mockFileInputStream0 = null;\n try {\n mockFileInputStream0 = new MockFileInputStream((File) mockFile0);\n } catch(FileNotFoundException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"org.evosuite.runtime.mock.java.io.MockFileInputStream\", e);\n }\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args){\n Robot robot = new DifferentialWheels();\n\n // Get the time step of the current world.\n int timeStep = (int) Math.round(robot.getBasicTimeStep());\n\n // Get references to, and enable, all required devices on the robot.\n Lidar lidar = robot.getLidar(\"lms291\");\n lidar.enable(timeStep);\n lidar.enablePointCloud();\n\n GPS gps = robot.getGPS(\"gps\");\n gps.enable(timeStep);\n\n Emitter emitter = robot.getEmitter(\"emitter\");\n emitter.setChannel(0);\n\n Compass compass = robot.getCompass(\"compass\");\n compass.enable(timeStep);\n\n Motor frontLeft = robot.getMotor(\"front_left_wheel\");\n frontLeft.setPosition(Double.POSITIVE_INFINITY);\n Motor frontRight = robot.getMotor(\"front_right_wheel\");\n frontRight.setPosition(Double.POSITIVE_INFINITY);\n Motor backLeft = robot.getMotor(\"back_left_wheel\");\n backLeft.setPosition(Double.POSITIVE_INFINITY);\n Motor backRight = robot.getMotor(\"back_right_wheel\");\n backRight.setPosition(Double.POSITIVE_INFINITY);\n\n TestTurnPB turnPBController = new TestTurnPB(gps, compass, emitter, frontLeft, frontRight, backLeft, backRight);\n System.out.println(\"current param : \" + turnPBController.toString());\n\n //Initialise Start and Goal Coordinates\n robot.step(timeStep);\n turnPBController.updateObstacleReadings(lidar.getPointCloud());\n turnPBController.isRunning = true;\n turnPBController.initMetrics();\n turnPBController.initPositions();\n //potBugController.initAlgorithm();\n turnPBController.runInit();\n\n //Iteration Count\n int itCount = 0;\n\n while (robot.step(timeStep*100) != -1) {\n //Check max iteration\n //while (itCount<DEFAULT_MAX_ITERATION_COUNT){\n //Update Turn Angles\n turnPBController.updateAngles();\n\n //Update Sensor Information\n turnPBController.updateObstacleReadings(lidar.getPointCloud());\n\n //Check if goal is reached and terminate as appropriate\n if (turnPBController.isGoalReached()){\n turnPBController.isRunning = false;\n turnPBController.setRobotSpeed(0,0);\n turnPBController.terminatePotBug();\n System.out.println(\"Goal Reached Successfully!\");\n }\n\n if(!turnPBController.isGoalReached() && turnPBController.isRunning){\n //Check for goal direction on forwards semi-circle\n if (!turnPBController.isObstruction()){\n\n turnPBController.setDriveMode(DEFAULT_DRIVE_MODE_TOWARDS_GOAL);\n //Move 'freely' to the next sample point, towards goal\n turnPBController.updateMetrics();\n\n } else {\n\n if (turnPBController.isClearToLeave()){\n\n if (turnPBController.isProgressAttained() &&\n turnPBController.isClearToLeave()){\n\n turnPBController.setDriveMode(DEFAULT_DRIVE_MODE_TOWARDS_GOAL);\n turnPBController.updateMetrics();\n\n }\n } else {\n\n if (turnPBController.hitPoint == null){\n\n turnPBController.setHitPoint();\n turnPBController.setDriveMode(DEFAULT_DRIVE_MODE_TOWARDS_CONTOUR);\n turnPBController.updateMetrics();\n\n } else {\n\n // engaged mode\n turnPBController.setDriveMode(DEFAULT_DRIVE_MODE_ALONG_CONTOUR);\n turnPBController.updateMetrics();\n\n }\n }\n }\n }\n //}\n }\n }", "@Test\n\tpublic void testGet() {\n\t\tassertTrue(LevelGen.connected(LevelGen.get(100, 100)));\n\t}", "@Test\n public void Test05() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n component.setDamage(10);\n double currentDamage = component.getDamage();\n assertTrue(currentDamage == 10);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32729L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32729 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.equals(range0);\n Range.CoordinateSystem.values();\n Range.Comparators[] range_ComparatorsArray0 = Range.Comparators.values();\n assertEquals(4, range_ComparatorsArray0.length);\n }", "private static void getAllComponents( Component[] components, Collection<Component> allComponents ) {\n for( int i = 0; i < components.length; i++ ) {\n if( components[i] != null ) {\n allComponents.add( components[i] );\n if( ( ( Container )components[i] ).getComponentCount() != 0 ) {\n getAllComponents( ( ( Container )components[i] ).getComponents(), allComponents );\n }\n }\n }\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n range0.toString();\n Object object0 = new Object();\n range0.getBegin();\n Object object1 = new Object();\n range0.split(2147483647L);\n range0.equals(object1);\n range0.getEnd();\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }", "@Test\n public void test114() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"*f\");\n TableBlock tableBlock0 = table0.thead();\n Any any0 = tableBlock0.col();\n String[] stringArray0 = new String[8];\n // Undeclared exception!\n try {\n Component component0 = any0.area(stringArray0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32767L, 9223372036854775554L);\n Object object0 = new Object();\n range0.toString();\n range0.equals(object0);\n range0.getEnd();\n range0.getLength();\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n range0.equals((Object) null);\n Range.CoordinateSystem[] range_CoordinateSystemArray1 = Range.CoordinateSystem.values();\n assertNotSame(range_CoordinateSystemArray1, range_CoordinateSystemArray0);\n }", "public boolean addComponentParts(World world, Random random, StructureBoundingBox boundingBox)\n {\n if (this.field_143015_k < 0)\n {\n this.field_143015_k = this.getAverageGroundLevel(world, boundingBox);\n\n if (this.field_143015_k < 0)\n {\n return true;\n }\n\n this.boundingBox.offset(0, this.field_143015_k - this.boundingBox.maxY + 5 - 1, 0);\n }\n\n this.fillWithBlocks(world, boundingBox, 1, 1, 1, 10, 4, 10, Blocks.air, Blocks.air, false);\n this.fillWithBlocks(world, boundingBox, 0, 0, 0, 10, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n /*this.fillWithBlocks(world, boundingBox, 0, 0, 0, 10, 0, 0, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 10, 0, 0, 10, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 10, 0, 10, 0, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 0, 0, 10, 0, 0, 0, Blocks.cobblestone, Blocks.cobblestone, false);*/\n this.fillWithBlocks(world, boundingBox, 1, 0, 1, 9, 0, 9, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 4, 0, 10, 4, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n \n //RIGHT WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 0, 0, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 0, 0, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 1, boundingBox);\n this.fillWithBlocks(world, boundingBox, 0, 2, 2, 0, 2, 4, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 5, boundingBox);\n this.fillWithBlocks(world, boundingBox, 0, 2, 6, 0, 2, 8, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 10, boundingBox);\n \n //LEFT WALL\n this.fillWithBlocks(world, boundingBox, 10, 1, 0, 10, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 10, 3, 0, 10, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 1, boundingBox);\n this.fillWithBlocks(world, boundingBox, 10, 2, 2, 10, 2, 4, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 5, boundingBox);\n this.fillWithBlocks(world, boundingBox, 10, 2, 6, 10, 2, 8, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 10, boundingBox);\n \n //FRONT WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 0, 5, 1, 0, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 7, 1, 0, 10, 1, 0, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 0, 10, 3, 0, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 1, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 2, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 3, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 4, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 5, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 7, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 8, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 0, boundingBox);\n \n //BACK WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 10, 10, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 10, 10, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 1, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 2, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 3, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 4, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 5, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 6, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 7, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 8, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 10, boundingBox);\n \n \n //DECO\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.crafting_table, 0, 9, 1, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 1, 8, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 8, 1, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.furnace, this.getMetadataWithOffset(Blocks.furnace, 1), 8, 1, 9, boundingBox);\n this.generateStructureChestContents(world, boundingBox, random, 7, 1, 9, workshopChestContents, getCount(random, 5, 7));\n this.generateStructureChestContents(world, boundingBox, random, 6, 1, 9, workshopChestContents, getCount(random, 5, 7));\n this.placeDoorAtCurrentPosition(world, boundingBox, random, 6, 1, 0, this.getMetadataWithOffset(Blocks.wooden_door, 1));\n //this.placeBlockAtCurrentPosition(world, Blocks.torch, this.getMetadataWithOffset(Blocks.torch, 1), 5, 3, 9, boundingBox);\n\n if (this.getBlockAtCurrentPosition(world, 6, 0, -1, boundingBox).getMaterial() == Material.air && this.getBlockAtCurrentPosition(world, 6, -1, -1, boundingBox).getMaterial() != Material.air)\n {\n this.placeBlockAtCurrentPosition(world, Blocks.stone_stairs, this.getMetadataWithOffset(Blocks.stone_stairs, 3), 6, 0, -1, boundingBox);\n }\n\n /* for (l = 0; l < 6; ++l)\n {\n for (int i1 = 0; i1 < 9; ++i1)\n {\n this.clearCurrentPositionBlocksUpwards(p_74875_1_, i1, 9, l, p_74875_3_);\n this.func_151554_b(p_74875_1_, Blocks.cobblestone, 0, i1, -1, l, p_74875_3_);\n }\n }*/\n\n this.spawnVillagers(world, boundingBox, 2, 1, 2, 1);\n return true;\n }", "@Test\n public void testIndexWithMiltiComponentItem() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/C.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"C.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement gElem = sm.findByNameAndType(\"C000\", GlobalElement.class);\n assertNotNull(gElem);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n GlobalComplexType gType = sm.findByNameAndType(\"C000\", GlobalComplexType.class);\n assertNotNull(gType);\n //\n GlobalAttribute gAttr = sm.findByNameAndType(\"C000\", GlobalAttribute.class);\n assertNotNull(gAttr);\n //\n GlobalAttributeGroup gAttrGroup =\n sm.findByNameAndType(\"C000\", GlobalAttributeGroup.class);\n assertNotNull(gAttrGroup);\n //\n GlobalGroup gGroup = sm.findByNameAndType(\"C000\", GlobalGroup.class);\n assertNotNull(gGroup);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexWithMiltiComponentItem \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "static void m11180a(List<Component<?>> list) {\n Set<C3246b> c = m11182c(list);\n Set<C3246b> b = m11181b(c);\n int i = 0;\n while (!b.isEmpty()) {\n C3246b next = b.iterator().next();\n b.remove(next);\n i++;\n for (C3246b next2 : next.mo20820d()) {\n next2.mo20823g(next);\n if (next2.mo20822f()) {\n b.add(next2);\n }\n }\n }\n if (i != list.size()) {\n ArrayList arrayList = new ArrayList();\n for (C3246b next3 : c) {\n if (!next3.mo20822f() && !next3.mo20821e()) {\n arrayList.add(next3.mo20819c());\n }\n }\n throw new DependencyCycleException(arrayList);\n }\n }", "Set<Component> getComponents();", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem0);\n Object object0 = new Object();\n range0.equals(\"[ 0 .. -1 ]/0B\");\n Range.CoordinateSystem.values();\n Range.CoordinateSystem.values();\n range0.equals(range0);\n range0.getBegin();\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"[ 0 .. -1 ]/0B\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.[ 0 .. -1 ]/0B\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Test\n public void test106() throws Throwable {\n Form form0 = new Form(\"&<baD1At0a\");\n boolean boolean0 = form0.equals((Object) \"&<baD1At0a\");\n assertEquals(\"&<baD1At0a\", form0.getComponentId());\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test344() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Map<String, String> map0 = hidden0.getAttributes();\n assertEquals(1, map0.size());\n }", "@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }" ]
[ "0.613479", "0.6006852", "0.5941861", "0.57913697", "0.5781431", "0.5775363", "0.5774033", "0.5735537", "0.57323766", "0.5711616", "0.56537163", "0.55667925", "0.5560312", "0.5525218", "0.5495533", "0.5454848", "0.54448265", "0.54401195", "0.54389155", "0.54324675", "0.53828454", "0.5348187", "0.5344385", "0.5318805", "0.5308477", "0.53080666", "0.5296522", "0.5288104", "0.5271144", "0.52703184", "0.5266776", "0.5266306", "0.5258261", "0.5238912", "0.52302593", "0.5213712", "0.52099085", "0.5209016", "0.5208548", "0.5207872", "0.5207567", "0.5204412", "0.5187579", "0.517688", "0.51683813", "0.51677376", "0.5166141", "0.5162213", "0.51574785", "0.51543224", "0.51539254", "0.51492023", "0.51438653", "0.51418096", "0.5139647", "0.5137819", "0.5131417", "0.51300925", "0.5109465", "0.51070887", "0.51043004", "0.50893503", "0.50860006", "0.5076446", "0.5071497", "0.5070807", "0.50708055", "0.506752", "0.50620824", "0.50609887", "0.5058419", "0.5050375", "0.5049686", "0.50456965", "0.5039272", "0.50375205", "0.5028485", "0.5025262", "0.50200534", "0.50154096", "0.5010751", "0.50066787", "0.5000555", "0.49945816", "0.49920562", "0.49914873", "0.49913836", "0.49869508", "0.49855095", "0.49817678", "0.49770346", "0.49744916", "0.49743617", "0.4968235", "0.49648565", "0.4962882", "0.49571964", "0.49523053", "0.4947578", "0.494711" ]
0.5625144
11
Test case number: 4 / 1 covered goal: Goal 1. wheel.components.Component.tr()Lwheel/components/Component;: rootBranch
@Test public void test004() throws Throwable { XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null); // Undeclared exception! try { Component component0 = xmlEntityRef0.tr(); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Tr component can be added only to a TableBlock. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "String branch();", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testTRK1HasSubComponents() {\n assertThat( hasSubComponents( TRK1_WITH_SUB_COMP ), is( true ) );\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "boolean isBranchTaken();", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test18() {\n //$NON-NLS-1$\n deployBundles(\"test18\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TRANSIENT_TO_NON_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"/c[~rNl!Ma-\", \"kIh 4+,VlA$]12\");\n ElExpression elExpression0 = new ElExpression(\"J>w9x0K2Bs|BOY\");\n // Undeclared exception!\n try { \n submit0.eval(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tpublic void testAddLinkOkComponent() {\n\t\tSubmenu root = new Submenu(\"root\");\n\t\tAssert.assertNull(root.getParentBean());\n\t\tAssert.assertEquals(\"root\", root.getName());\n\t\tAssert.assertNull(root.getMenuentrys());\n\n\t\tMenuItem item1 = new MenuItem(\"item1\");\n\t\tAssert.assertNull(item1.getParentBean());\n\t\troot.addMenuentry(item1);\n\t\tAssert.assertEquals(1, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, root.getMenuentrys().iterator().next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\n\t\tSubmenu submenu1 = new Submenu(\"submenu1\");\n\t\tAssert.assertNull(submenu1.getParentBean());\n\t\troot.addMenuentry(submenu1);\n\n\t\tIterator<?> iter = root.getMenuentrys().iterator();\n\t\tAssert.assertEquals(2, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, iter.next());\n\t\tAssert.assertSame(submenu1, iter.next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\t\tAssert.assertSame(root, submenu1.getParentBean());\n\t}", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test642_smartLifting3() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl3Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl3_1 t = new Team642sl3_3();\\n\" +\n\t\t\t \" T642sl3_2 o = new T642sl3_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_4 extends Team642sl3_3 {\\n\" +\n\t\t\t \" public class Role642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_4.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_3 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_1 extends T642sl3_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl3_2 extends Role642sl3_1 playedBy T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl3_3 extends Role642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl3_2 as Role642sl3_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_4 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_2 extends Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl3_4 extends Role642sl3_3 playedBy T642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_5 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_3 extends Team642sl3_2 {\\n\" +\n\t\t\t \" public class Role642sl3_5 extends Role642sl3_3 playedBy T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_3.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_6 extends T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl3_2 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl3_3.Role642sl3_4\");\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test332() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.tr();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Tr component can be added only to a TableBlock.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test13() {\n //$NON-NLS-1$\n deployBundles(\"test13\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test3() {\n //$NON-NLS-1$\n deployBundles(\"test3\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test17() {\n //$NON-NLS-1$\n deployBundles(\"test17\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_STATIC_TO_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "public UpdateandRemoveBranch() {\n initComponents();\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test15() {\n //$NON-NLS-1$\n deployBundles(\"test15\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_NON_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test19() {\n //$NON-NLS-1$\n deployBundles(\"test19\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_TRANSIENT_TO_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test6() {\n //$NON-NLS-1$\n deployBundles(\"test6\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "@Test\n public void testTRK3HasNoSubComponents() {\n assertThat( hasSubComponents( TRK3_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test642_smartLifting4() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl4Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl4_1 t = new Team642sl4_4();\\n\" +\n\t\t\t \" T642sl4_2 o = new T642sl4_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_4 extends Team642sl4_3 {\\n\" +\n\t\t\t \" public class Role642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_4.this.toString() + \\\".Role642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_3 extends Team642sl4_2 {\\n\" +\n\t\t\t \" public class Role642sl4_5 extends Role642sl4_3 playedBy T642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_3.this.toString() + \\\".Role642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_6 extends T642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl4_2 extends T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_3 extends T642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_1 {\\n\" +\n\t\t\t \" public class Role642sl4_1 extends T642sl4_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl4_2 extends Role642sl4_1 playedBy T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl4_3 extends Role642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl4_2 as Role642sl4_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_4 extends T642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_2 extends Team642sl4_1 {\\n\" +\n\t\t\t \" public class Role642sl4_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_2.this.toString() + \\\".Role642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl4_4 extends Role642sl4_3 playedBy T642sl4_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_2.this.toString() + \\\".Role642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_5 extends T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl4_4.Role642sl4_4\");\n }", "private boolean testTraversalComponent(Component comp){\n \n if (parent == null){\n return false;\n }\n \n /* Build list of focus traversable components in the parent component\n * This is only done once, unless resetReport is called */\n if (!tabTraversalPerformed){\n getTraversableComponents(parent);\n }\n \n if (!comp.hasFocus()){\n // try{\n comp.requestFocus();\n // Hack for our Windowing system - it invokes IllegalStateException if requestFocus isn't called from AWT thread\n // }catch(IllegalStateException exc){\n // // LOG ONLY -/\n // if(debugLog) {\n // System.err.println(\"EXCEPTION \" + exc.getMessage());\n // System.err.println(\"TRY TO CALL IT FROM AWT THREAD\");\n // }\n // final Component comp_final = comp;\n // try{\n // SwingUtilities.invokeAndWait(\n // new Runnable() {\n // public void run() {\n // comp_final.requestFocus();\n // }\n // });\n // }catch(Exception ex){\n // if(debugLog) System.err.println(\"EXCEPTION \" + ex.getMessage());\n //\n // }\n // }\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - After request focus | comp=\"+comp.getClass().getName()+\" hasFocus()=\"+comp.hasFocus());\n }\n \n tabTraversalFinished = false;\n switchTabbed = false;\n \n \n /* Attach custom focus listeners */\n org.netbeans.a11y.AccessibilityTester.TraversalFocusListener listener = new org.netbeans.a11y.AccessibilityTester.TraversalFocusListener();\n \n Iterator i = traversableComponents.iterator();\n while(i.hasNext()){\n ((Component)(i.next())).addFocusListener(listener);\n }\n \n org.netbeans.a11y.AccessibilityTester.TabTraversalTimeOut timeout = new org.netbeans.a11y.AccessibilityTester.TabTraversalTimeOut();\n timeout.start();\n \n /* Tab through all components */\n try{\n Robot robot = getRobot();\n \n // - LOG ONLY\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - Robot=\"+robot.hashCode());\n Iterator it = traversableComponents.iterator();\n int ssl=0;\n while(it.hasNext()){\n ssl++;\n Component fcp = (Component)(it.next());\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - [\"+ssl+\"] \"+fcp);\n }\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - Traversable Components + end - =======\");\n } // LOG ONLY -/\n \n \n if (traversableComponents.size() > 0){\n Component lastFocused = null;\n \n while(!tabTraversalFinished){\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> TAB Last Focused component=\"+lastFocused);\n \n try{\n Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY);\n } catch(InterruptedException e){}\n \n Component focusedComponent = listener.getFocusedComponent();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> Focused component=\"+focusedComponent);\n \n Component reallyFocusedComponent = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> Really Focused component=\"+reallyFocusedComponent);\n \n if((focusedComponent instanceof JTabbedPane) && !testSettings.TT_showingOnly) {\n robot.keyPress(KeyEvent.VK_RIGHT);\n robot.keyRelease(KeyEvent.VK_RIGHT);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> VK_LEFT Focused component=\"+lastFocused);\n \n try{\n Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY);\n } catch(InterruptedException e){}\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> TAB Focused component=\"+lastFocused);\n \n switchTabbed = true;\n }else\n switchTabbed = false;\n \n if((focusedComponent==null && lastFocused==null) &&\n !( (reallyFocusedComponent instanceof JTextComponent) ||\n (reallyFocusedComponent instanceof JTabbedPane) ||\n (reallyFocusedComponent instanceof JTable)) ) {\n \n if(debugLog) System.err.println(LOG_CAPTION+\" - ERROR : It's impossible test Tab traversal. After TAB, CTRL + TAB or RIGHT hitting nothing happends.\");\n \n return false;\n }\n \n if (focusedComponent==lastFocused){\n // Component probably swallowed Tab keypress so try Ctrl-Tab\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> CONTROL_TAB Focused component=\"+focusedComponent);\n \n try{ Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY); } catch(InterruptedException e){}\n \n focusedComponent = listener.getFocusedComponent();\n \n if ((focusedComponent == lastFocused) && (!switchTabbed)){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - !!!!! LOCK !!!!! \"+focusedComponent + \"==\" + lastFocused);\n \n // Stuck or window lost focus, so give up\n break;\n }\n }\n lastFocused = focusedComponent;\n }\n }\n }catch(AWTException e){ e.printStackTrace();}\n \n timeout.cancel();\n \n /* Detach focus listeners */\n i = traversableComponents.iterator();\n while(i.hasNext()){\n ((Component)(i.next())).removeFocusListener(listener);\n }\n \n /* Set flag to show at least one tab traversal performed */\n tabTraversalPerformed = true;\n \n return true;\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.br();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Any_1\", component0.getComponentId());\n }", "@Test\n\tpublic void componentToString()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent comp = new Component();\n\t\t\tcomp.setName(compName);\n\t\t\tcomp.setGroup(compGroup);\n\t\t\tcomp.setVersion(compVersion);\n\t\t\tcomp.setType(compType);\n\t\t\t\n\t\t\tString expectedStringWithoutTabs = \"Name:newComponent\\n\" +\n\t\t\t\t\t\"Group: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"Version: 1.5.1\\n\";\n\t\t\tString actualStringWithoutTabs = ComponentUtilities.toString(comp);\n\t\t\t\n\t\t\tif (expectedStringWithoutTabs.equals(actualStringWithoutTabs))\n\t\t\t\twatcher.getLogger()\n\t\t\t\t\t\t.info(\"Got Expected String from ComponentUtilities.toString(comp)!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithoutTabs,\n\t\t\t\t\t\tactualStringWithoutTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithoutTabs.equals(actualStringWithoutTabs));\n\t\t\t\n\t\t\tString expectedStringWithTabs = \"\tName:newComponent\\n\" +\n\t\t\t\t\t\"\tGroup: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"\tVersion: 1.5.1\\n\";\n\t\t\t\n\t\t\tString actualStringWithTabs = ComponentUtilities.toString(comp, \"\t\");\n\t\t\t\n\t\t\tif (actualStringWithTabs.equals(expectedStringWithTabs))\n\t\t\t\twatcher.getLogger().info(\"Got Expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\")!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithTabs,\n\t\t\t\t\t\tactualStringWithTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\"): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithTabs.equals(actualStringWithTabs));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting ComponentUtilities.toString.\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Override\n\tpublic void run(){\n\t\tbranch(0, sol,0);\t\n\t\tSystem.out.println(\"####### \" + counter + \" #######\");\n\t}", "public void test55() {\n //$NON-NLS-1$\n deployBundles(\"test55\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "public void test28() {\n //$NON-NLS-1$\n deployBundles(\"test28\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertTrue(\"No extend restrictions\", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test642_smartLifting1() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl1Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl1_1 t = new Team642sl1_1();\\n\" +\n\t\t\t \" T642sl1_2 o = new T642sl1_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_4 extends Team642sl1_3 {\\n\" +\n\t\t\t \" public class Role642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_4.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_2 extends Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl1_4 extends Role642sl1_3 playedBy T642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_5 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_3 extends Team642sl1_2 {\\n\" +\n\t\t\t \" public class Role642sl1_5 extends Role642sl1_3 playedBy T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_3.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_6 extends T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl1_2 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_3 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_1 extends T642sl1_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl1_2 extends Role642sl1_1 playedBy T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl1_3 extends Role642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl1_2 as Role642sl1_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_4 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl1_1.Role642sl1_3\");\n }", "@Test(timeout = 4000)\n public void test163() throws Throwable {\n ElExpression elExpression0 = new ElExpression(\"N2}mQjM@Rjzvl\");\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"z:_i>EAQ.Bdq@CL&k?\\\"\");\n // Undeclared exception!\n try { \n xmlEntityRef0.clasS(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.id(\".?p5{ul\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "@Test\r\n\tpublic void test()\r\n\t{\n\t\t\r\n\t\tCreatePlungeStrategy frame = new CreatePlungeStrategy(path1, retractPlane); //manda os parametros path e retractplane pra execucao\r\n\r\n\t\tfor(;;);\r\n\t}", "public void test10() {\n //$NON-NLS-1$\n deployBundles(\"test10\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "@Test(timeout = 4000)\n public void test187() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0.getPage();\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }", "@Test\n public void testACFTHasSubComponents() {\n assertThat( hasSubComponents( ACFT ), is( true ) );\n }", "@Test\r\n public void testSelectionStateOnRemoveLastChildOfBranch_38341() {\r\n TreeItem branch = createBranch(\"branch\", true);\r\n int insert = 1;\r\n getRoot().getChildren().add(insert , branch);\r\n int lastBranchIndex = branch.getChildren().size() -1;\r\n Object item = branch.getChildren().get(lastBranchIndex);\r\n // index in model is insert in root children + child index in branch + the inserted \r\n // node itself\r\n int select = insert + lastBranchIndex + 1;\r\n getSelectionModel().select(select);\r\n assertEquals(\"sanity: selected the expected child \", item, getSelectedItem());\r\n ListChangeReport indicesReport = new ListChangeReport(getSelectedIndices());\r\n ListChangeReport itemsReport = new ListChangeReport(getSelectedItems());\r\n branch.getChildren().remove(lastBranchIndex);\r\n if (getSelectedIndex() == select) {\r\n // this would be the default implementation for all SimpleXX: keep \r\n // selectedIndex unchanged, effectly selecting the next item\r\n // which here would be the next sibling of the removed child's parent\r\n assertEquals(\"selectedIndex unchanged\", select, getSelectedIndex());\r\n assertEquals(getView().getTreeItem(select), getSelectedItem());\r\n assertEquals(0, indicesReport.getEventCount());\r\n assertEquals(1, itemsReport.getEventCount());\r\n \r\n } else { // index was changed\r\n assertEquals(\"selected decremented\", select -1, getSelectedIndex());\r\n assertEquals(\"selectedItem\", getView().getTreeItem(select - 1), getSelectedItem());\r\n // fails .. we fire more than one event, reselect issue again?\r\n assertEquals(\"items changes fired\", 1, itemsReport.getEventCount());\r\n assertEquals(\"indices changes fired \", 1, indicesReport.getEventCount());\r\n }\r\n fail(\"TBD: spec and implement removal of last child in a branch\");\r\n }", "@Test\n\tvoid test4AddComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tvc.addComponent(comp3);\n\t\tassertEquals(comp3.hashCode(), vc.getComponentsList().get(vc.getComponentsList().size() - 1).hashCode());\n\t}", "public void testStep() {\n\n DT_TractographyImage crossing = Images.getCrossing();\n\n FACT_FibreTracker tracker = new FACT_FibreTracker(crossing);\n\n Vector3D[] pds = crossing.getPDs(1,1,1);\n\n Vector3D step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, true);\n\n assertEquals(1.0, pds[0].dot(step.normalized()), 1E-8);\n\n assertEquals(Images.xVoxelDim / 2.0, step.mod(), 0.05);\n \n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, false);\n\n assertEquals(-1.0, pds[0].dot(step.normalized()), 1E-8);\n\n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 1, true);\n\n assertEquals(1.0, pds[1].dot(step.normalized()), 1E-8);\n\n\n for (int i = 0; i < 2; i++) {\n\n step = tracker.getNextStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), new Vector3D(pds[i].x + 0.01, pds[i].y + 0.02, pds[i].z + 0.03).normalized());\n\n assertEquals(1.0, pds[i].dot(step.normalized()), 1E-8);\n\n }\n\n \n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCYCLE() {\n CuteNetlibCase.doTest(\"CYCLE.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public RelocateBranch() {\n }", "public void test12() {\n //$NON-NLS-1$\n deployBundles(\"test12\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "protected Component getTestTarget(){\n return tester.parent;\n }", "double getBranchProbability();", "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testTRK2HasNoSubComponents() {\n assertThat( hasSubComponents( TRK2_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test\n public void oncoTreeVersionTest() {\n // TODO: test oncoTreeVersion\n }", "public void test24() {\n //$NON-NLS-1$\n deployBundles(\"test24\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test291() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n // Undeclared exception!\n try { \n checkbox0.h3((Object) \"0G-VP2>k}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test642_smartLifting2() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl2Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl2_1 t = new Team642sl2_2();\\n\" +\n\t\t\t \" T642sl2_2 o = new T642sl2_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_4 extends Team642sl2_3 {\\n\" +\n\t\t\t \" public class Role642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_4.this.toString() + \\\".Role642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_1 {\\n\" +\n\t\t\t \" public class Role642sl2_1 extends T642sl2_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl2_2 extends Role642sl2_1 playedBy T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl2_3 extends Role642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl2_2 as Role642sl2_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_4 extends T642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_2 extends Team642sl2_1 {\\n\" +\n\t\t\t \" public class Role642sl2_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_2.this.toString() + \\\".Role642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl2_4 extends Role642sl2_3 playedBy T642sl2_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_2.this.toString() + \\\".Role642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_5 extends T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_3 extends Team642sl2_2 {\\n\" +\n\t\t\t \" public class Role642sl2_5 extends Role642sl2_3 playedBy T642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_3.this.toString() + \\\".Role642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_6 extends T642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl2_2 extends T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_3 extends T642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl2_2.Role642sl2_4\");\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n Checkbox checkbox0 = new Checkbox(label0, \"\", \"\");\n Component component0 = checkbox0.renderHint(\"\");\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "public void test642_smartLifting7() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl7Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl7_1 t = new Team642sl7_3();\\n\" +\n\t\t\t \" T642sl7_2 o = new T642sl7_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_4 extends Team642sl7_3 {\\n\" +\n\t\t\t \" public class Role642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_4.this.toString() + \\\".Role642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_3 extends T642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_1 {\\n\" +\n\t\t\t \" public class Role642sl7_1 extends T642sl7_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl7_2 extends Role642sl7_1 playedBy T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl7_3 extends Role642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl7_2 as Role642sl7_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_4 extends T642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_2 extends Team642sl7_1 {\\n\" +\n\t\t\t \" public class Role642sl7_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_2.this.toString() + \\\".Role642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl7_4 extends Role642sl7_3 playedBy T642sl7_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_2.this.toString() + \\\".Role642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_5 extends T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_3 extends Team642sl7_2 {\\n\" +\n\t\t\t \" public class Role642sl7_5 extends Role642sl7_3 playedBy T642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_3.this.toString() + \\\".Role642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_6 extends T642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl7_2 extends T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl7_3.Role642sl7_3\");\n }", "public void VerifylogosonCheckoutPage(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Vat Exclude button with WebElement \"+elementProperties.getProperty(\"Vatinclusion\")+\" should be clicked\");\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"imgStapleslogoonleft\"))& isElementPresent(locator_split(\"imgCheckoutLockicon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"imgCheckoutNortan\")) ){\r\n\t\t\t\tSystem.out.println(\"All the three logos are present\");\r\n\t\t\t\tPoint stapleslogo = getcoordinates(locator_split(\"imgStapleslogoonleft\"));\r\n\t\t\t\tSystem.out.println(stapleslogo);\r\n\t\t\t\tPoint lockicon = getcoordinates(locator_split(\"imgCheckoutLockicon\"));\r\n\t\t\t\tSystem.out.println(lockicon);\r\n\t\t\t\tPoint Nortonicon = getcoordinates(locator_split(\"imgCheckoutNortan\"));\r\n\t\t\t\tSystem.out.println(Nortonicon);\r\n\t\t\t\tif(stapleslogo.x<lockicon.x & lockicon.x<Nortonicon.x){\r\n\t\t\t\t\tSystem.out.println(\"Staples logo is on left side, Lock icon in middle and Norton img on right side\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"Logos are mis aligned\");\r\n\t\t\t\t\tthrow new Error(\"Logos are mis aligned\");\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"One or all the three logos are not present\");\r\n\t\t\t\tthrow new Error(\"One or all the three logos are not present\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Logo Elements are not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgStapleslogoonleft\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCheckoutLockicon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCheckoutNortan\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- One or all the three logos are not present/Logos are mis aligned\");\r\n\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test302() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"D&J!^F2~~&lT'Lakt\");\n // Undeclared exception!\n try { \n xmlEntityRef0.entity(\"D&J!^F2~~&lT'Lakt\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test271() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"!x\");\n // Undeclared exception!\n try { \n xmlEntityRef0.wrapSelf();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n //test if the jumper can move if it's surrounded by the rocks\n public void testBarrierRock() {\n world.add(new Location(FOUR , FOUR), jumper);\n world.add(new Location(TWO, FOUR), new Rock());\n world.add(new Location(SIX, FOUR), new Rock());\n world.add(new Location(FOUR, TWO), new Rock());\n world.add(new Location(FOUR, SIX), new Rock());\n jumper.act();\n assertEquals(new Location(FOUR, FOUR), jumper.getLocation());\n assertEquals(FORTYFIVE, jumper.getDirection());\n }" ]
[ "0.6147549", "0.5781654", "0.5712166", "0.56991094", "0.5643271", "0.55979997", "0.54922676", "0.54676473", "0.5465767", "0.5454444", "0.54515404", "0.5434516", "0.54286367", "0.54244524", "0.5413534", "0.53937334", "0.53902304", "0.538777", "0.53844213", "0.5382536", "0.5380075", "0.5379357", "0.53660095", "0.5359551", "0.53549796", "0.53507876", "0.5350085", "0.53360337", "0.5318031", "0.5276783", "0.52682596", "0.52565056", "0.52552533", "0.52548987", "0.5233347", "0.5211769", "0.5203501", "0.519247", "0.5190121", "0.5187805", "0.518401", "0.5180988", "0.51771486", "0.51767206", "0.51704484", "0.5169275", "0.5165027", "0.51519895", "0.51477605", "0.51397985", "0.5137972", "0.51296324", "0.5127669", "0.5122113", "0.51167226", "0.51009834", "0.50937283", "0.50921285", "0.50865626", "0.50716144", "0.5071058", "0.5065637", "0.5057304", "0.50493026", "0.504087", "0.50403434", "0.50397086", "0.5028465", "0.5027392", "0.50218713", "0.50130767", "0.5007783", "0.50020397", "0.5001723", "0.49934042", "0.49895886", "0.49864253", "0.49831694", "0.49797285", "0.49781168", "0.4973349", "0.4967691", "0.49673104", "0.49590263", "0.4958331", "0.49560395", "0.49537852", "0.49535304", "0.4949918", "0.49491364", "0.49490276", "0.4948405", "0.49463603", "0.49456736", "0.4943392", "0.49335846", "0.49300444", "0.492536", "0.49241906", "0.49209425", "0.4919244" ]
0.0
-1
Test case number: 5 / 1 covered goal: Goal 1. wheel.components.Component.dfn(Ljava/lang/Object;)Lwheel/components/Component;: rootBranch
@Test public void test005() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); ElExpression elExpression0 = new ElExpression("</featureFactory>"); RadioGroup radioGroup0 = new RadioGroup(errorPage0, "</featureFactory>", "</featureFactory>", (ISelectModel) null, elExpression0); Label label0 = (Label)errorPage0.dfn((Object) radioGroup0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "abstract void depComponent(DepComponent depComponent);", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "@Override\n public void bfs() {\n\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testDependencyEvolutionOnJavaComplete() {\n Depinder depinder = new Depinder(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\testFingerprints.json\");\n\n DepinderConfiguration.getInstance().setProperty(DepinderConstants.ROOT_FOLDER, ROOT_FOLDER);\n depinder.analyzeProject(ROOT_FOLDER, \"master\", false);\n\n DependencyRegistry dependencyRegistry = depinder.getDependencyRegistry();\n\n String dependencyID = \"Java Util, External Libraries\";\n Dependency dependency = dependencyRegistry.getById(dependencyID)\n .orElseThrow(() -> new IllegalArgumentException(dependencyID));\n\n// Set<TechnologySnapshot> snapshots = dependencyEvolutionAnalyzer.dependencyValueForCommits(dependency);\n//\n// Path filePath = Paths.get(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\test_results.json\");\n// try {\n// writeSnapshotsToFile(snapshots, filePath);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "boolean isBranchTaken();", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public interface DDTest {\n\t/**\n\t * Runs the dependence test on a direction vector\n\t * @param dv The dependence vector under which test needs to be performed\n\t * @return whether dependence exists or not\n\t */\n\tboolean testDependence(DependenceVector dv);\n\t\n\t/**\n\t * Returns whether the constructor for the dependence test determined\n\t * whether it would be eligible to run the test on the pair of\n\t * subscripts or not\n\t * @return true if it is, false otherwise.\n\t */\n\tboolean isTestEligible();\n\t\n\t/**\n\t * Returns a list of loops from outermost to innermost that are common to\n * the two expressions being tested for dependence, whether they are a pair\n * of subscripts or a pair of whole array accesses\n\t * @return the collected list of loops.\n\t */\n\tLinkedList<Loop> getCommonEnclosingLoops();\n}", "String branch();", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCYCLE() {\n CuteNetlibCase.doTest(\"CYCLE.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public interface IBranchFunctionDef {\n /**\n * Verifies that the branch function is valid\n * @return If the usage of the branch function is valid\n */\n boolean verify(@Nullable IBranchFunctionDef parent, ISkriptFunctionDef function, ICodeDef codeDef);\n\n /**\n * Gets the variables of the def\n * @return Def's variables\n */\n List<IVariableDef> getVariables();\n\n /**\n * Sets up the variables of the def\n * @param factory Variable factory\n */\n void setupVariables(IVariableFactory factory);\n}", "public void test6() {\n //$NON-NLS-1$\n deployBundles(\"test6\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "double getBranchProbability();", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test17() {\n //$NON-NLS-1$\n deployBundles(\"test17\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_STATIC_TO_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void solution() {\n\t\t\n\t}", "private static void dfsComponents() {\r\n\t\tprintThis(\"Standard DFS Demo (the input graph must be UNDIRECTED)\");\r\n\t\tfor (int i = 0; i < V; i++) { // for each vertex i in [0..V-1]\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) { // if that vertex is not visited yet\r\n\t\t\t\tSystem.out.printf(\"Component %d:\", ++numComp);\r\n\t\t\t\tdfs(i);\r\n\t\t\t\tSystem.out.printf(\"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.printf(\"There are %d connected components\\n\", numComp);\r\n\t}", "@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public void testGetComponent() {\n System.out.println(\"getComponent\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent comp = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(comp).getComponent();\n DesignComponent expResult = comp;\n \n assertEquals(expResult,result);\n }\n });\n \n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test2() {\n //$NON-NLS-1$\n deployBundles(\"test2\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private static void bellmanfordTest() {\n\t\t\n\t\tgraphs.objectorientedgraph.Graph<Integer> graph = new graphs.objectorientedgraph.Graph<Integer>();\n\t\t\n\t\tfor (int i = 0; i < 6; i++)\n\t\t\tgraph.addVertex(i, i);\n\t\t\n\t\tgraph.addDirectedEdge(0, 1, 0);\n\t\tgraph.addDirectedEdge(0, 2, 0);\n\t\tgraph.addDirectedEdge(0, 3, 0);\n\t\tgraph.addDirectedEdge(0, 4, 0);\n\t\tgraph.addDirectedEdge(0, 5, 0);\n\t\tgraph.addDirectedEdge(5, 1, -1);\n\t\tgraph.addDirectedEdge(5, 2, 1);\n\t\tgraph.addDirectedEdge(1, 4, 4);\n\t\tgraph.addDirectedEdge(1, 3, 5);\n\t\tgraph.addDirectedEdge(2, 1, 0);\n\t\tgraph.addDirectedEdge(3, 5, -3);\n\t\tgraph.addDirectedEdge(3, 4, -1);\n\t\tgraph.addDirectedEdge(4, 5, -3);\n\t\t\n\t\tBellmanFordAlgo<Integer> bellnBellmanFordAlgo = new BellmanFordAlgo(graph ,graph.vertexList.get(0));\n\t\t\n\t\tbellnBellmanFordAlgo.getSingleSourceShortestPath();\n\t\t\n\t\tbellnBellmanFordAlgo.printPath(graph.vertexList.get(3));\n\t\t\n\t}", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "public void test12() {\n //$NON-NLS-1$\n deployBundles(\"test12\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test3() {\n //$NON-NLS-1$\n deployBundles(\"test3\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "void depComponent(DepComponent depComponent);", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalculation = this.getRectanglesToConsiderForBranchingVarCalculation( );\r\n \r\n //collect 0 direction refcounts into this map\r\n Map<String, Integer> zeroVar_RefCountMap = new HashMap<String, Integer> () ;\r\n //and one diirection refconts into this map\r\n Map<String, Integer> oneVar_RefCountMap = new HashMap<String, Integer> () ;\r\n \r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle =null;\r\n for (Rectangle rect: rectanglesToConsiderForBranchingVarCalculation){\r\n variablesUsedForBranchingInThisRectangle = getVariablesUsedForBranchingInThisRectangle (rect);\r\n if (variablesUsedForBranchingInThisRectangle.size()>ZERO) {\r\n this.updateVariableRefCounts(zeroVar_RefCountMap, oneVar_RefCountMap, variablesUsedForBranchingInThisRectangle) ;\r\n }else {\r\n System.err.print(\"trying to branch a node which should have been marked infeasible\" );\r\n exit(ONE);\r\n }\r\n }\r\n \r\n \r\n //now find the highest refcount var, no matter its direction\r\n int highZeroFreq = zeroVar_RefCountMap.isEmpty()?ZERO:Collections.max( zeroVar_RefCountMap.values());\r\n int highOneFreq = oneVar_RefCountMap.isEmpty()? ZERO: Collections.max(oneVar_RefCountMap.values()) ;\r\n \r\n //we need to find the selected var's refcount on the other side\r\n int selectedVarRefCountOnOtherSide = ZERO;\r\n \r\n int totalRects = getNumberOfRects(this.myInfeasibleRectanglesList) ;\r\n \r\n if (highZeroFreq>highOneFreq) {\r\n result.varName=getHighestFreqVar (zeroVar_RefCountMap,highZeroFreq ) ;\r\n result.coeff=highZeroFreq;\r\n selectedVarRefCountOnOtherSide= oneVar_RefCountMap.get( result.varName)==null? ZERO : oneVar_RefCountMap.get( result.varName);\r\n //this is how many rects will survive on either side\r\n childRectCounts.zeroSideCount = totalRects - selectedVarRefCountOnOtherSide;\r\n childRectCounts.oneSideCount=totalRects -highZeroFreq ;\r\n \r\n } else {\r\n result.varName=getHighestFreqVar (oneVar_RefCountMap,highOneFreq ) ;\r\n result.coeff=highOneFreq;\r\n selectedVarRefCountOnOtherSide= zeroVar_RefCountMap.get( result.varName)==null? ZERO : zeroVar_RefCountMap.get( result.varName);\r\n \r\n childRectCounts.zeroSideCount = totalRects - highOneFreq;\r\n childRectCounts.oneSideCount=totalRects - selectedVarRefCountOnOtherSide;\r\n }\r\n \r\n return result;\r\n }", "@Test\n public void Test05() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n component.setDamage(10);\n double currentDamage = component.getDamage();\n assertTrue(currentDamage == 10);\n }", "@Override\n public void stateChanged(ChangeEvent e) {\n\n if (tree.isSelected()) {\n runTree(191 - (int) (fractalDepth.getValue() * 1.9));\n }\n if (triangle.isSelected()) {\n runTriangle(401 - 4 * fractalDepth.getValue());\n }\n if (original.isSelected()) {\n runOriginal(201 - 2 * fractalDepth.getValue());\n }\n if (carpet.isSelected()) {\n runCarpet((int) (361 - 3.6 * fractalDepth.getValue()));\n }\n }", "@Test\n public void testRun_DecisionWithEquals_IN_A1_D_A2_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow set to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow set to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dn = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, A1_ID);\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dn).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dn);\n\n // Initial node (id #1) creation and flow set to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A2_ID, wf.getContext().get(KEY));\n }", "public void test13() {\n //$NON-NLS-1$\n deployBundles(\"test13\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "public void testStep() {\n\n DT_TractographyImage crossing = Images.getCrossing();\n\n FACT_FibreTracker tracker = new FACT_FibreTracker(crossing);\n\n Vector3D[] pds = crossing.getPDs(1,1,1);\n\n Vector3D step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, true);\n\n assertEquals(1.0, pds[0].dot(step.normalized()), 1E-8);\n\n assertEquals(Images.xVoxelDim / 2.0, step.mod(), 0.05);\n \n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, false);\n\n assertEquals(-1.0, pds[0].dot(step.normalized()), 1E-8);\n\n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 1, true);\n\n assertEquals(1.0, pds[1].dot(step.normalized()), 1E-8);\n\n\n for (int i = 0; i < 2; i++) {\n\n step = tracker.getNextStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), new Vector3D(pds[i].x + 0.01, pds[i].y + 0.02, pds[i].z + 0.03).normalized());\n\n assertEquals(1.0, pds[i].dot(step.normalized()), 1E-8);\n\n }\n\n \n }", "public void test15() {\n //$NON-NLS-1$\n deployBundles(\"test15\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_NON_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test3() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n boolean boolean0 = defaultMenuItem0.isLeaf();\n assertEquals(true, boolean0);\n }", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Override\n public void dfs() {\n\n }", "@Test\r\n public void gallonsCauldronHolds() {\r\n \r\n System.out.println(\"gallonsCauldronHolds\");\r\n \r\n //Test #1\r\n System.out.println(\"Test case #1\"); \r\n \r\n double diameter = 50;\r\n double depth = 25;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 212.500;\r\n double result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #2\r\n System.out.println(\"Test case #2\");\r\n \r\n diameter = 15;\r\n depth = -12;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #3\r\n System.out.println(\"Test case #3\");\r\n \r\n diameter = -5;\r\n depth = 20;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #4\r\n System.out.println(\"Test case #4\");\r\n \r\n diameter = 0;\r\n depth = 30;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #5\r\n System.out.println(\"Test case #5\");\r\n \r\n diameter = 14;\r\n depth = 0;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #6\r\n System.out.println(\"Test case #6\");\r\n \r\n diameter = 1;\r\n depth = 12;\r\n \r\n expResult = .041;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #7\r\n System.out.println(\"Test case #7\");\r\n \r\n diameter = 20;\r\n depth = 1;\r\n \r\n expResult = 1.36;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n }", "@Test\n public void test81() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n CombinedDomainCategoryPlot combinedDomainCategoryPlot1 = new CombinedDomainCategoryPlot();\n combinedDomainCategoryPlot0.addChangeListener(combinedDomainCategoryPlot1);\n RectangleEdge rectangleEdge0 = combinedDomainCategoryPlot0.getRangeAxisEdge();\n JDBCCategoryDataset jDBCCategoryDataset0 = null;\n try {\n jDBCCategoryDataset0 = new JDBCCategoryDataset(\"\", \"Null 'seriesKey' argument.\", \"\", \"Null 'seriesKey' argument.\");\n } catch(ClassNotFoundException e) {\n }\n }", "public BSTTreeBlueJTest()\n {\n }", "public void testCreateComponentReference() {\n System.out.println(\"createComponentReference\"); // NOI18N\n \n final DesignDocument document = ModelTestUtil.createTestDesignDocument(\"TEST_PROJECT\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent expResult = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(expResult).getComponent();\n assertEquals(expResult,result);\n }\n });\n }", "boolean testDependence(DependenceVector dv);", "public RelocateBranch() {\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "public void test28() {\n //$NON-NLS-1$\n deployBundles(\"test28\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertTrue(\"No extend restrictions\", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void getBranchCommand() {\n\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void level7() {\n }", "public void clickNederlands(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Nederalnds link should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"lnkNederland\"));\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Nederalnds link is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Nederalnds link is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkNederland\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public void testGetComponentDef() throws Exception {\n ComponentDef component = Aura.getDefinitionService().getDefinition(\"auratest:testComponent1\",\n ComponentDef.class);\n\n Map<String, RegisterEventDef> red = component.getRegisterEventDefs();\n assertEquals(1, red.size());\n assertNotNull(red.get(\"testEvent\"));\n\n Collection<EventHandlerDef> ehd = component.getHandlerDefs();\n assertEquals(0, ehd.size());\n // assertEquals(\"testEvent\",ehd.iterator().next().getName());\n\n List<DefDescriptor<ModelDef>> mdd = component.getModelDefDescriptors();\n assertEquals(1, mdd.size());\n assertEquals(\"TestJavaModel\", mdd.get(0).getName());\n\n List<DefDescriptor<ControllerDef>> cds = component.getControllerDefDescriptors();\n assertEquals(1, cds.size());\n assertEquals(\"JavaTestController\", cds.get(0).getName());\n\n DefDescriptor<ModelDef> lmdd = component.getLocalModelDefDescriptor();\n assertEquals(\"TestJavaModel\", lmdd.getName());\n\n ModelDef model = component.getModelDef();\n assertEquals(\"TestJavaModel\", model.getName());\n\n ControllerDef controller = component.getControllerDef();\n assertEquals(\"testComponent1\", controller.getName());\n\n DefDescriptor<RendererDef> rd = component.getRendererDescriptor();\n assertEquals(\"testComponent1\", rd.getName());\n\n DefDescriptor<StyleDef> td = component.getStyleDescriptor();\n assertEquals(\"testComponent1\", td.getName());\n }", "private void level6() {\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private static void dfs(State curr) {\n curr.buildStack(curr.getSuccessors(curr));\r\n \r\n if(curr.isGoalState()) \r\n System.out.println(curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(curr.getOrderedPair());//initial\r\n \r\n curr.close.add(curr);\r\n while(!curr.open.isEmpty()&&!curr.isGoalState()) {\r\n curr.buildStack(curr.getSuccessors(curr));\r\n curr.printHelp(curr, 4);\r\n curr = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n }\r\n \r\n if(curr.isGoalState()) {\r\n System.out.println(curr.getOrderedPair() + \" Goal\");\r\n curr.printPath(curr);\r\n }\r\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test10() {\n //$NON-NLS-1$\n deployBundles(\"test10\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test18() {\n //$NON-NLS-1$\n deployBundles(\"test18\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TRANSIENT_TO_NON_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test5() {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"tt\", \"Can't add components to a component that is not an instance of IContainer.\");\n // Undeclared exception!\n try { \n checkbox0.dfn();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "void test02(){\n\t}", "private static void bfs(State curr) {\n curr.buildStack(curr.getSuccessors(curr));\r\n \r\n if(curr.isGoalState()) \r\n System.out.println(curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(curr.getOrderedPair());//initial\r\n \r\n curr.close.add(curr);\r\n while(!curr.open.isEmpty()&&!curr.isGoalState()) {\r\n curr.buildStack(curr.getSuccessors(curr));\r\n curr.printHelp(curr, 3);\r\n curr = curr.open.get(0);\r\n curr.close.add(curr.open.remove(0));\r\n }\r\n \r\n if(curr.isGoalState()) {\r\n System.out.println(curr.getOrderedPair() + \" Goal\");\r\n curr.printPath(curr);\r\n }\r\n }", "@Override\n public void func_104112_b() {\n \n }", "public static void main(String}] args) {\n Node root = new Node(7);\n root.left = new Node(3);\n root.right = new Node(15);\n \n root.left.left = new Node(1);\n root.left.right = new Node(4);\n \n root.right.left = new Node(9);\n root.right.right = new Node(20);\n\n System.out.println(root);\n \n coverToDoublyLL(root);\n \n \n }", "@Test\n public void Test14() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertEquals(54760, component.hashCode());\n }", "public UpdateandRemoveBranch() {\n initComponents();\n }", "public static void detectComponents(String f) {\n\t\t\n\t}", "@Override\n\tpublic void analyzing(DependencyFrame rFrame) {\n\t\t\n\t}", "public static void main(String[] args) {\n Node n[] = new Node[7];\n n[0] = null;\n n[1]=new Node(1);n[2] = new Node(2);n[3] = new Node(3);n[4] = new Node(4);\n n[5] = new Node(5);n[6] = new Node(6);\n n[1].next = new Node[1];n[2].next = new Node[1];\n n[3].next = new Node[1];n[4].next = new Node[2];\n n[1].next[0] = n[6];n[2].next[0]=n[6];n[3].next[0]=n[4];\n n[4].next[0]=n[1];n[4].next[1]=n[2];\n n[1].count=1; n[2].count=1;\n n[3].count=1; n[4].count=2;\n n[6].next = new Node[1];\n n[6].next[0]=n[1];\n n[6].count=1;\n chkDependency(n);\n \n \n }" ]
[ "0.59507895", "0.55991364", "0.55500627", "0.5540594", "0.5537281", "0.5526906", "0.55059576", "0.5502549", "0.54724693", "0.5417405", "0.54032904", "0.5374074", "0.53720206", "0.5362617", "0.5322056", "0.5302185", "0.5293076", "0.5286921", "0.52790266", "0.527499", "0.527051", "0.52608377", "0.5259811", "0.5255907", "0.5230357", "0.52265453", "0.52222496", "0.5221029", "0.5211816", "0.5206854", "0.52042377", "0.52027094", "0.52023053", "0.5185837", "0.5180107", "0.51796037", "0.51719666", "0.5170796", "0.5168064", "0.51609105", "0.51606226", "0.514977", "0.51212364", "0.5119832", "0.5119013", "0.5116886", "0.50866055", "0.50701505", "0.50689846", "0.50675523", "0.50558245", "0.5046438", "0.5045546", "0.5042662", "0.50316536", "0.50255376", "0.50131655", "0.5004901", "0.50010115", "0.4996942", "0.49952036", "0.4988238", "0.49877918", "0.49850535", "0.49810696", "0.49797204", "0.4977107", "0.49749509", "0.49743503", "0.49640873", "0.49572062", "0.49553862", "0.495493", "0.49498662", "0.4948926", "0.4944134", "0.49353722", "0.4933577", "0.49215686", "0.49195018", "0.49131748", "0.49103466", "0.49087346", "0.49075767", "0.48975402", "0.48962793", "0.48891827", "0.4885986", "0.48811567", "0.48739293", "0.48739228", "0.48728785", "0.4868915", "0.4867195", "0.4862794", "0.48576698", "0.48547733", "0.48541054", "0.4853145", "0.4852162", "0.48489058" ]
0.0
-1
Test case number: 6 / 1 covered goal: Goal 1. wheel.components.Component.map(Ljava/lang/String;)Lwheel/components/Component;: rootBranch
@Test public void test006() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Block block0 = (Block)errorPage0.map("sR4{Di`r].gBOzFC"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "public abstract String[] map() throws TooFewNocNodesException;", "public void testMapGet() {\r\n }", "public interface Mapper {\n /**\n * execute the mapping\n * @param owner owner object\n * @param map map to map to\n * @param packageIsKey if the package is to be the key for the map\n * @throws BuildException in case of emergency\n */\n void execute(ProjectComponent owner, HashMap map, boolean packageIsKey) throws BuildException;\n}", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }", "@Test\n public void testMap() {\n System.out.println(\"map\");\n String line = \"failed\";\n int expResult = 1;\n int result = Training.map(line);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testMapper() {\n\n\t\t/*\n\t\t * For this test, the mapper's input will be \"1 cat cat dog\" \n\t\t */\n\t\tmapDriver.withInput(new LongWritable(1), new Text(swedenHealth));\n\n\t\t/*\n\t\t * The expected output is \"cat 1\", \"cat 1\", and \"dog 1\".\n\t\t */\n\t\tmapDriver.withOutput(new Text(\"Sweden\"), new Text(\"1745.09564282 5218.86073424\"));\n\t\t/*\n\t\t * Run the test.\n\t\t */\n\t\tmapDriver.runTest();\n\t}", "private void processNode(BranchNode bn, Grid[][] map) {\n\t\tif (bn.leaf_alive) {\r\n\t\t\tfor (int i = 0; i < leaf_size; i++) {\r\n\t\t\t\tint l = bn.x + i - leaf_size / 2;\r\n\t\t\t\tif (l >= 0 && l < World.WORLD_WIDTH) {\r\n\t\t\t\t\thealth += map[l][bn.y].sunlight;\r\n\t\t\t\t\tmap[l][bn.y].sunlight -= World.LEAF_BLOCK;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Kill Leaf if the leaf is too old\r\n\t\t\tbn.leaf_age += 1;\r\n\t\t\tif (bn.leaf_age >= LEAF_LIFETIME) {\r\n\t\t\t\tbn.killLeaf(this, map);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// If I really want to be safe, I should put a check for if bn.children.size() > 0\r\n\t\t// But the for loop here checks it for me already.\r\n\t\tfor (int i = 0; i < bn.children.size(); i++) {\r\n\t\t\tprocessNode(bn.children.get(i), map);\r\n\t\t}\t\t\r\n\t}", "String branch();", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test\n public void test057() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Map<String, Component> map0 = errorPage0.getComponents();\n }", "public void map( Chunk bv ) { }", "public interface Mapper {\n\n\t/**\n\t * A {@link Mapper} is uniquely identified with a {@link String}. This\n\t * helps differentiating mapping XMLs produced with different mappers.\n\t * \n\t * @return the unique identifier of this mapper\n\t */\n\tpublic abstract String getMapperId();\n\t\n\t/**\n\t * Maps the cores from the APCG to the nodes from the NoC.\n\t * \n\t * @see MappingType\n\t * \n\t * @return a array of Strings containing the mappings (specially for multi-objective case) XML\n\t * \n\t * @throws TooFewNocNodesException\n\t */\n\tpublic abstract String[] map() throws TooFewNocNodesException;\n\n}", "private final java.lang.String B(java.util.Map<java.lang.String, ? extends java.lang.Object> r11) {\n /*\n r10 = this;\n r11 = r11.entrySet();\n r11 = (java.lang.Iterable) r11;\n r0 = new java.util.ArrayList;\n r0.<init>();\n r0 = (java.util.Collection) r0;\n r11 = r11.iterator();\n L_0x0011:\n r1 = r11.hasNext();\n if (r1 == 0) goto L_0x004e;\n L_0x0017:\n r1 = r11.next();\n r2 = r1;\n r2 = (java.util.Map.Entry) r2;\n r3 = r2.getKey();\n r3 = (java.lang.CharSequence) r3;\n r3 = r3.length();\n r4 = 1;\n r5 = 0;\n if (r3 <= 0) goto L_0x002e;\n L_0x002c:\n r3 = 1;\n goto L_0x002f;\n L_0x002e:\n r3 = 0;\n L_0x002f:\n if (r3 == 0) goto L_0x0047;\n L_0x0031:\n r2 = r2.getValue();\n r2 = r2.toString();\n r2 = (java.lang.CharSequence) r2;\n r2 = r2.length();\n if (r2 <= 0) goto L_0x0043;\n L_0x0041:\n r2 = 1;\n goto L_0x0044;\n L_0x0043:\n r2 = 0;\n L_0x0044:\n if (r2 == 0) goto L_0x0047;\n L_0x0046:\n goto L_0x0048;\n L_0x0047:\n r4 = 0;\n L_0x0048:\n if (r4 == 0) goto L_0x0011;\n L_0x004a:\n r0.add(r1);\n goto L_0x0011;\n L_0x004e:\n r0 = (java.util.List) r0;\n r1 = r0;\n r1 = (java.lang.Iterable) r1;\n r11 = \"&\";\n r2 = r11;\n r2 = (java.lang.CharSequence) r2;\n r3 = 0;\n r4 = 0;\n r5 = 0;\n r6 = 0;\n r11 = com.iqoption.core.connect.http.Http$urlEncode$2.baR;\n r7 = r11;\n r7 = (kotlin.jvm.a.b) r7;\n r8 = 30;\n r9 = 0;\n r11 = kotlin.collections.u.a(r1, r2, r3, r4, r5, r6, r7, r8, r9);\n r11 = r10.ft(r11);\n return r11;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.core.connect.http.c.B(java.util.Map):java.lang.String\");\n }", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.map((String) null);\n assertEquals(\"Block_1\", component0.getComponentId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test\n @Override\n public void testMapGet() {\n }", "Object visitMapOfReferences(MapOfReferencesNode node, Object state);", "public void map( Chunk c0, Chunk c1 ) { }", "@Test\n public void testMapCodeExamples() throws Exception {\n logger.info(\"Beginning testMapCodeExamples()...\");\n\n // Create an empty map\n Map<URL, Double> stocks = new Map<>();\n logger.info(\"Start with an empty map of stock prices: {}\", stocks);\n\n // Add some closing stock prices to it\n URL apple = new URL(\"http://apple.com\");\n stocks.setValue(apple, 112.40);\n URL google = new URL(\"http://google.com\");\n stocks.setValue(google, 526.98);\n URL amazon = new URL(\"http://amazon.com\");\n stocks.setValue(amazon, 306.64);\n logger.info(\"Add some closing stock prices: {}\", stocks);\n\n // Retrieve the closing price for Google\n double price = stocks.getValue(google);\n logger.info(\"Google's closing stock price is {}\", price);\n\n // Sort the stock prices by company URL\n stocks.sortElements();\n logger.info(\"The stock prices sorted by company web site: {}\", stocks);\n\n logger.info(\"Completed testMapCodeExamples().\\n\");\n }", "public BuildByPermitTile map(BuildByPermitTileDTO selectedActionDTO);", "Object visitMapOfObjects(MapOfObjectsNode node, Object state);", "private void buildMapArea(MapBuilderBase mapBuilder) {\n\t\tmap = new Tile[width][height];\n\n\t\tthis.name = mapBuilder.buildMap(map);\n\t\tupdateValues();\n\n\t\t// TODO: pathfinding precalculations?\n\n\t\t// Log.debug(\"Calculating path maps...\");\n\t\t// pointGraph = new PointGraph();\n\t\t// for (int x = 0; x < width; x++) {\n\t\t// for (int y = 0; y < height; y++) {\n\t\t// if (getTileAt(x, y).isPassable)\n\t\t// pointGraph.addVertex(new Vertex(new Point(x, y)));\n\t\t// }\n\t\t// }\n\t\t// pointGraph.calculateEdges();\n\t\t// Log.debug(\"done\");\n\t}", "@Override\n\tpublic List<Map<String, Object>> selectToTreeNocheckMap(Map param) {\n\t\treturn codeRegorgMapper.selectToTreeNocheckMap(param);\n\t}", "@Test\n public void flatMap() {\n\n }", "@Override\n\tpublic void apply(Roadmap roadmap, int index, ModuleString pred, ModuleString succ) {\n\t\t// get predecessor module\n\t\tRoadModule pModule = pred.get(index);\n\t\t// get successor modules\n\t\tRoadModule sModule1 = succ.get(index);\n\t\tRoadModule sModule2 = succ.get(index + 1);\n\t\tRoadModule sModule3 = succ.get(index + 2);\n\t\t// calculate normalized base vector, that is the vector from the\n\t\t// origin vertex of the predecessor to the current vertex\n\t\tVertex v1 = roadmap.getVertex(pModule.vertexId);\n\t\tVertex v2 = roadmap.getVertex(pModule.originVertexId);\n\t\tif(pModule.vertexId == pModule.originVertexId){\n\t\t\tlogger.error(\"vertexIndex == originIndex\");\n\t\t}\n\t\t// logger.debug(\"vId=\" +\n\t\t// pModule.vertexId+\", ovId=\"+pModule.originVertexId);\n\t\t// logger.debug(\"Basevec (\" + v2.x + \",\" + v2.y + \")-(\" + v1.x + \",\" +\n\t\t// v1.y + \")\");\n\t\tdouble x=v1.x - v2.x, y=v1.y - v2.y;\n\t\tVector2d basevec = new Vector2d(x, y);\n\t\tbasevec.normalize();\n\n\t\t// set direction vectors to values\n\t\t// Only apply to streets, or apply to roads if we are sensitive to\n\t\t// patterns.\n\t\tboolean sensitive = ctx.isRoadPatternSensitive();\n\t\t// default. Keep going straight.\n\t\tsModule1.direction = new Vector2d(basevec.x, basevec.y);\n\t\tsModule2.direction = new Vector2d(basevec.x, basevec.y);\n\t\tsModule3.direction = new Vector2d(basevec.x, basevec.y);\n\n\t\t// branching at 90-degree angles.\n\t\tif ((sModule1.roadType != RoadType.ROAD) || sensitive) {\n//\t\t\tlogger.debug(\"basevec = (\" + basevec.x + \",\" + basevec.y + \"). branching LEFT to \" + sModule1.roadType2 + \"(\" + basevec.y + \",\" + (-basevec.x) + \")\");\n\t\t\tlogger.debug(\"Branch left/right!\");\n\t\t\tsModule1.direction = new Vector2d(basevec.y, -basevec.x);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Holy Shit! sModule1 has no direction!\");\n\t\t}\n\t\tif ((sModule2.roadType != RoadType.ROAD) || sensitive) {\n//\t\t\tlogger.debug(\"basevec = (\" + basevec.x + \",\" + basevec.y + \"). branching STRAIGHT to \" + sModule2.roadType2 + \"(\" + basevec.x + \",\" + basevec.y + \")\");\n\t\t\tlogger.debug(\"Go straight!\");\n\t\t\tsModule2.direction = new Vector2d(basevec.x, basevec.y);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Holy Shit! sModule2 has no direction!\");\n\t\t}\n\t\tif ((sModule3.roadType != RoadType.ROAD) || sensitive) {\n//\t\t\tlogger.debug(\"basevec = (\" + basevec.x + \",\" + basevec.y + \"). branching RIGHT to \" + sModule3.roadType2 + \"(\" + (-basevec.y) + \",\" + basevec.x + \")\");\n\t\t\tlogger.debug(\"Branch right/left!\");\n\t\t\tsModule3.direction = new Vector2d(-basevec.y, basevec.x);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Holy Shit! sModule3 has no direction!\");\n\t\t}\n\t}", "public void map( Chunk cs[] ) { }", "private void buildLabelLocs() {\n this.labelLocs = new HashMap<String, Integer>();\n for (int n = 0; n < this.code.size(); n++) {\n TACOp op = this.code.get(n);\n if (op.getType() == TACOpType.LABEL) {\n this.labelLocs.put(op.getLabel(), n);\n }\n }\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "public void mapping() {\n\t\t\n\t}", "public void map( Chunk c ) { }", "protected void initBoatMap() {}", "@Test\n public void shouldDetectCycleWhenUpstreamLeavesAreAtDifferentLevels() {\n\n String g1 = \"g1\";\n String g2 = \"g2\";\n String p1 = \"p1\";\n String p2 = \"p2\";\n String p3 = \"p3\";\n String p4 = \"p4\";\n String p5 = \"p5\";\n String p6 = \"p6\";\n String current = \"current\";\n\n ValueStreamMap valueStreamMap = new ValueStreamMap(current, null);\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p4, p4), null, current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p3, p3), null, p4);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p2, p2), null, p3);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p1, p1), null, p2);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g1, g1, \"git\"), null, p1, new MaterialRevision(null));\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,2,\"2\"), current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p6, p6), new PipelineRevision(p6,1,\"1\"), p5);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,1,\"1\"), p6);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g2,g2,\"git\"), null, p5, new MaterialRevision(null));\n\n assertThat(valueStreamMap.hasCycle(), is(true));\n }", "public static void main(String[] args) {\n\t\tint[][] map = new int[8][7];\n\t\tmap[3][1] = 1;\n\t\tmap[3][2] = 1;\n\t\tfor (int i = 0; i < map.length; i++) {\n\t\t\tfor (int j = 0; j < map[i].length; j++) {\n\t\t\t\tmap[0][j] = 1;\n\t\t\t\tmap[i][0] = 1;\n\t\t\t\tmap[7][j] = 1;\n\t\t\t\tmap[i][6] = 1;\n\t\t\t\tSystem.out.print(map[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tsetWay(map,1,1);\n\t\tSystem.out.println(\"递归后的结果\");\n\t\tfor(int i=0;i<map.length;i++) {\n\t\t\tfor(int j=0;j<map[i].length;j++) {\n\t\t\t\tSystem.out.printf(map[i][j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void mapChosen(int map);", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(3046);\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"R$_Ff!sF,uE4P'wGFDy\";\n stringArray0[1] = \"s4#6U\";\n stringArray0[2] = \"81<U@W{b30+,bjYk\";\n stringArray0[3] = \")1Dc@`M-,v4\";\n stringArray0[4] = \"R$_Ff!sF,uE4P'wGFDy\";\n stringArray0[5] = \"s4#6U\";\n stringArray0[6] = \"R$_Ff!sF,uE4P'wGFDy\";\n stringArray0[7] = \"s4#6U\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-493), \"R$_Ff!sF,uE4P'wGFDy\", \"2m<}(%PX(!\", \"R$_Ff!sF,uE4P'wGFDy\", stringArray0, false, false);\n Label label0 = new Label();\n Label label1 = new Label();\n int[] intArray0 = new int[3];\n intArray0[0] = 187;\n intArray0[2] = 187;\n Label[] labelArray0 = new Label[1];\n labelArray0[0] = label1;\n methodWriter0.visitLookupSwitchInsn(label0, intArray0, labelArray0);\n assertEquals(1, labelArray0.length);\n }", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test219() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = new Label(errorPage0, errorPage0);\n label0.map(\"org.mvel.conversion.LongCH$1\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "public static void main(String[] args) {\n\t\tint[][] maps = \n\t\t\t{\n\t\t\t\t\t{1,0,1,1,1},\n\t\t\t\t\t{1,0,1,0,1},\n\t\t\t\t\t{1,0,1,1,1},\n\t\t\t\t\t{1,1,1,0,1},\n\t\t\t\t\t{0,0,0,0,1}\n\t\t\t};\n\t\tSystem.out.println(solution(maps));\n\t}", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "@Override\n\tpublic void VisitMapLiteralNode(BunMapNode Node) {\n\n\t}", "public a.d.c.l a(a.d.c.c r42, java.util.Map<a.d.c.e, ?> r43) {\n /*\n r41 = this;\n r0 = r43\n a.d.c.p.d.a r1 = new a.d.c.p.d.a\n a.d.c.r.b r2 = r42.a()\n r1.<init>(r2)\n r2 = 7\n r3 = 3\n r4 = 0\n r5 = -1\n r6 = 2\n r7 = 1\n a.d.c.r.k.a r8 = new a.d.c.r.k.a // Catch:{ i -> 0x0026 }\n a.d.c.r.b r9 = r1.f2900a // Catch:{ i -> 0x0026 }\n r8.<init>(r9) // Catch:{ i -> 0x0026 }\n a.d.c.n[] r8 = r8.b() // Catch:{ i -> 0x0026 }\n r9 = r8[r4] // Catch:{ i -> 0x0026 }\n r10 = r8[r7] // Catch:{ i -> 0x0026 }\n r11 = r8[r6] // Catch:{ i -> 0x0026 }\n r8 = r8[r3] // Catch:{ i -> 0x0026 }\n goto L_0x0139\n L_0x0026:\n a.d.c.r.b r8 = r1.f2900a\n int r9 = r8.f2966a\n int r9 = r9 / r6\n int r8 = r8.f2967b\n int r8 = r8 / r6\n int r10 = r9 + 7\n int r11 = r8 + -7\n int r10 = r10 + r7\n r13 = r10\n r12 = r11\n L_0x0035:\n int r12 = r12 + r5\n boolean r14 = r1.d(r13, r12)\n if (r14 == 0) goto L_0x0047\n a.d.c.r.b r14 = r1.f2900a\n boolean r14 = r14.a(r13, r12)\n if (r14 != 0) goto L_0x0047\n int r13 = r13 + 1\n goto L_0x0035\n L_0x0047:\n int r13 = r13 - r7\n int r12 = r12 + r7\n L_0x0049:\n boolean r14 = r1.d(r13, r12)\n if (r14 == 0) goto L_0x005a\n a.d.c.r.b r14 = r1.f2900a\n boolean r14 = r14.a(r13, r12)\n if (r14 != 0) goto L_0x005a\n int r13 = r13 + 1\n goto L_0x0049\n L_0x005a:\n int r13 = r13 - r7\n L_0x005b:\n boolean r14 = r1.d(r13, r12)\n if (r14 == 0) goto L_0x006c\n a.d.c.r.b r14 = r1.f2900a\n boolean r14 = r14.a(r13, r12)\n if (r14 != 0) goto L_0x006c\n int r12 = r12 + -1\n goto L_0x005b\n L_0x006c:\n int r12 = r12 + r7\n a.d.c.n r14 = new a.d.c.n\n float r13 = (float) r13\n float r12 = (float) r12\n r14.<init>(r13, r12)\n int r8 = r8 + r2\n r12 = r8\n L_0x0076:\n int r12 = r12 + r7\n boolean r13 = r1.d(r10, r12)\n if (r13 == 0) goto L_0x0088\n a.d.c.r.b r13 = r1.f2900a\n boolean r13 = r13.a(r10, r12)\n if (r13 != 0) goto L_0x0088\n int r10 = r10 + 1\n goto L_0x0076\n L_0x0088:\n int r10 = r10 - r7\n int r12 = r12 - r7\n L_0x008a:\n boolean r13 = r1.d(r10, r12)\n if (r13 == 0) goto L_0x009b\n a.d.c.r.b r13 = r1.f2900a\n boolean r13 = r13.a(r10, r12)\n if (r13 != 0) goto L_0x009b\n int r10 = r10 + 1\n goto L_0x008a\n L_0x009b:\n int r10 = r10 - r7\n L_0x009c:\n boolean r13 = r1.d(r10, r12)\n if (r13 == 0) goto L_0x00ad\n a.d.c.r.b r13 = r1.f2900a\n boolean r13 = r13.a(r10, r12)\n if (r13 != 0) goto L_0x00ad\n int r12 = r12 + 1\n goto L_0x009c\n L_0x00ad:\n int r12 = r12 - r7\n a.d.c.n r13 = new a.d.c.n\n float r10 = (float) r10\n float r12 = (float) r12\n r13.<init>(r10, r12)\n int r9 = r9 + -7\n int r10 = r9 + -1\n L_0x00b9:\n int r8 = r8 + r7\n boolean r12 = r1.d(r10, r8)\n if (r12 == 0) goto L_0x00cb\n a.d.c.r.b r12 = r1.f2900a\n boolean r12 = r12.a(r10, r8)\n if (r12 != 0) goto L_0x00cb\n int r10 = r10 + -1\n goto L_0x00b9\n L_0x00cb:\n int r10 = r10 + r7\n int r8 = r8 - r7\n L_0x00cd:\n boolean r12 = r1.d(r10, r8)\n if (r12 == 0) goto L_0x00de\n a.d.c.r.b r12 = r1.f2900a\n boolean r12 = r12.a(r10, r8)\n if (r12 != 0) goto L_0x00de\n int r10 = r10 + -1\n goto L_0x00cd\n L_0x00de:\n int r10 = r10 + r7\n L_0x00df:\n boolean r12 = r1.d(r10, r8)\n if (r12 == 0) goto L_0x00f0\n a.d.c.r.b r12 = r1.f2900a\n boolean r12 = r12.a(r10, r8)\n if (r12 != 0) goto L_0x00f0\n int r8 = r8 + 1\n goto L_0x00df\n L_0x00f0:\n int r8 = r8 - r7\n a.d.c.n r12 = new a.d.c.n\n float r10 = (float) r10\n float r8 = (float) r8\n r12.<init>(r10, r8)\n L_0x00f8:\n int r9 = r9 + r5\n int r11 = r11 + r5\n boolean r8 = r1.d(r9, r11)\n if (r8 == 0) goto L_0x0109\n a.d.c.r.b r8 = r1.f2900a\n boolean r8 = r8.a(r9, r11)\n if (r8 != 0) goto L_0x0109\n goto L_0x00f8\n L_0x0109:\n int r9 = r9 + r7\n int r11 = r11 + r7\n L_0x010b:\n boolean r8 = r1.d(r9, r11)\n if (r8 == 0) goto L_0x011c\n a.d.c.r.b r8 = r1.f2900a\n boolean r8 = r8.a(r9, r11)\n if (r8 != 0) goto L_0x011c\n int r9 = r9 + -1\n goto L_0x010b\n L_0x011c:\n int r9 = r9 + r7\n L_0x011d:\n boolean r8 = r1.d(r9, r11)\n if (r8 == 0) goto L_0x012e\n a.d.c.r.b r8 = r1.f2900a\n boolean r8 = r8.a(r9, r11)\n if (r8 != 0) goto L_0x012e\n int r11 = r11 + -1\n goto L_0x011d\n L_0x012e:\n int r11 = r11 + r7\n a.d.c.n r8 = new a.d.c.n\n float r9 = (float) r9\n float r10 = (float) r11\n r8.<init>(r9, r10)\n r11 = r12\n r10 = r13\n r9 = r14\n L_0x0139:\n float r12 = r9.f2885a\n float r13 = r8.f2885a\n float r12 = r12 + r13\n float r13 = r10.f2885a\n float r12 = r12 + r13\n float r13 = r11.f2885a\n float r12 = r12 + r13\n r13 = 1082130432(0x40800000, float:4.0)\n float r12 = r12 / r13\n int r12 = a.d.c.p.d.a.e(r12)\n float r9 = r9.f2886b\n float r8 = r8.f2886b\n float r9 = r9 + r8\n float r8 = r10.f2886b\n float r9 = r9 + r8\n float r8 = r11.f2886b\n float r9 = r9 + r8\n float r9 = r9 / r13\n int r8 = a.d.c.p.d.a.e(r9)\n r9 = 15\n a.d.c.r.k.a r10 = new a.d.c.r.k.a // Catch:{ i -> 0x0172 }\n a.d.c.r.b r11 = r1.f2900a // Catch:{ i -> 0x0172 }\n r10.<init>(r11, r9, r12, r8) // Catch:{ i -> 0x0172 }\n a.d.c.n[] r10 = r10.b() // Catch:{ i -> 0x0172 }\n r11 = r10[r4] // Catch:{ i -> 0x0172 }\n r14 = r10[r7] // Catch:{ i -> 0x0172 }\n r15 = r10[r6] // Catch:{ i -> 0x0172 }\n r8 = r10[r3] // Catch:{ i -> 0x0172 }\n goto L_0x0282\n L_0x0172:\n int r10 = r12 + 7\n int r11 = r8 + -7\n int r10 = r10 + r7\n r15 = r10\n r14 = r11\n L_0x0179:\n int r14 = r14 + r5\n boolean r16 = r1.d(r15, r14)\n if (r16 == 0) goto L_0x018d\n a.d.c.r.b r9 = r1.f2900a\n boolean r9 = r9.a(r15, r14)\n if (r9 != 0) goto L_0x018d\n int r15 = r15 + 1\n r9 = 15\n goto L_0x0179\n L_0x018d:\n int r15 = r15 - r7\n int r14 = r14 + r7\n L_0x018f:\n boolean r9 = r1.d(r15, r14)\n if (r9 == 0) goto L_0x01a0\n a.d.c.r.b r9 = r1.f2900a\n boolean r9 = r9.a(r15, r14)\n if (r9 != 0) goto L_0x01a0\n int r15 = r15 + 1\n goto L_0x018f\n L_0x01a0:\n int r15 = r15 - r7\n L_0x01a1:\n boolean r9 = r1.d(r15, r14)\n if (r9 == 0) goto L_0x01b2\n a.d.c.r.b r9 = r1.f2900a\n boolean r9 = r9.a(r15, r14)\n if (r9 != 0) goto L_0x01b2\n int r14 = r14 + -1\n goto L_0x01a1\n L_0x01b2:\n int r14 = r14 + r7\n a.d.c.n r9 = new a.d.c.n\n float r15 = (float) r15\n float r14 = (float) r14\n r9.<init>(r15, r14)\n int r8 = r8 + r2\n r14 = r8\n L_0x01bc:\n int r14 = r14 + r7\n boolean r15 = r1.d(r10, r14)\n if (r15 == 0) goto L_0x01ce\n a.d.c.r.b r15 = r1.f2900a\n boolean r15 = r15.a(r10, r14)\n if (r15 != 0) goto L_0x01ce\n int r10 = r10 + 1\n goto L_0x01bc\n L_0x01ce:\n int r10 = r10 - r7\n int r14 = r14 - r7\n L_0x01d0:\n boolean r15 = r1.d(r10, r14)\n if (r15 == 0) goto L_0x01e1\n a.d.c.r.b r15 = r1.f2900a\n boolean r15 = r15.a(r10, r14)\n if (r15 != 0) goto L_0x01e1\n int r10 = r10 + 1\n goto L_0x01d0\n L_0x01e1:\n int r10 = r10 - r7\n L_0x01e2:\n boolean r15 = r1.d(r10, r14)\n if (r15 == 0) goto L_0x01f3\n a.d.c.r.b r15 = r1.f2900a\n boolean r15 = r15.a(r10, r14)\n if (r15 != 0) goto L_0x01f3\n int r14 = r14 + 1\n goto L_0x01e2\n L_0x01f3:\n int r14 = r14 - r7\n a.d.c.n r15 = new a.d.c.n\n float r10 = (float) r10\n float r14 = (float) r14\n r15.<init>(r10, r14)\n int r12 = r12 + -7\n int r10 = r12 + -1\n L_0x01ff:\n int r8 = r8 + r7\n boolean r14 = r1.d(r10, r8)\n if (r14 == 0) goto L_0x0211\n a.d.c.r.b r14 = r1.f2900a\n boolean r14 = r14.a(r10, r8)\n if (r14 != 0) goto L_0x0211\n int r10 = r10 + -1\n goto L_0x01ff\n L_0x0211:\n int r10 = r10 + r7\n int r8 = r8 - r7\n L_0x0213:\n boolean r14 = r1.d(r10, r8)\n if (r14 == 0) goto L_0x0224\n a.d.c.r.b r14 = r1.f2900a\n boolean r14 = r14.a(r10, r8)\n if (r14 != 0) goto L_0x0224\n int r10 = r10 + -1\n goto L_0x0213\n L_0x0224:\n int r10 = r10 + r7\n L_0x0225:\n boolean r14 = r1.d(r10, r8)\n if (r14 == 0) goto L_0x0236\n a.d.c.r.b r14 = r1.f2900a\n boolean r14 = r14.a(r10, r8)\n if (r14 != 0) goto L_0x0236\n int r8 = r8 + 1\n goto L_0x0225\n L_0x0236:\n int r8 = r8 - r7\n a.d.c.n r14 = new a.d.c.n\n float r10 = (float) r10\n float r8 = (float) r8\n r14.<init>(r10, r8)\n L_0x023e:\n int r12 = r12 + r5\n int r11 = r11 + r5\n boolean r8 = r1.d(r12, r11)\n if (r8 == 0) goto L_0x024f\n a.d.c.r.b r8 = r1.f2900a\n boolean r8 = r8.a(r12, r11)\n if (r8 != 0) goto L_0x024f\n goto L_0x023e\n L_0x024f:\n int r12 = r12 + r7\n int r11 = r11 + r7\n L_0x0251:\n boolean r8 = r1.d(r12, r11)\n if (r8 == 0) goto L_0x0262\n a.d.c.r.b r8 = r1.f2900a\n boolean r8 = r8.a(r12, r11)\n if (r8 != 0) goto L_0x0262\n int r12 = r12 + -1\n goto L_0x0251\n L_0x0262:\n int r12 = r12 + r7\n L_0x0263:\n boolean r8 = r1.d(r12, r11)\n if (r8 == 0) goto L_0x0274\n a.d.c.r.b r8 = r1.f2900a\n boolean r8 = r8.a(r12, r11)\n if (r8 != 0) goto L_0x0274\n int r11 = r11 + -1\n goto L_0x0263\n L_0x0274:\n int r11 = r11 + r7\n a.d.c.n r8 = new a.d.c.n\n float r10 = (float) r12\n float r11 = (float) r11\n r8.<init>(r10, r11)\n r11 = r9\n r40 = r15\n r15 = r14\n r14 = r40\n L_0x0282:\n float r9 = r11.f2885a\n float r10 = r8.f2885a\n float r9 = r9 + r10\n float r10 = r14.f2885a\n float r9 = r9 + r10\n float r10 = r15.f2885a\n float r9 = r9 + r10\n float r9 = r9 / r13\n int r9 = a.d.c.p.d.a.e(r9)\n float r10 = r11.f2886b\n float r8 = r8.f2886b\n float r10 = r10 + r8\n float r8 = r14.f2886b\n float r10 = r10 + r8\n float r8 = r15.f2886b\n float r10 = r10 + r8\n float r10 = r10 / r13\n int r8 = a.d.c.p.d.a.e(r10)\n a.d.c.p.d.a$b r10 = new a.d.c.p.d.a$b\n r11 = 0\n r10.<init>(r9, r8, r11)\n r1.f2904e = r7\n r8 = r10\n r9 = r8\n r12 = r9\n r13 = 1\n L_0x02ae:\n int r14 = r1.f2904e\n r15 = 9\n if (r14 >= r15) goto L_0x035f\n a.d.c.p.d.a$b r14 = r1.c(r10, r13, r7, r5)\n a.d.c.p.d.a$b r15 = r1.c(r8, r13, r7, r7)\n a.d.c.p.d.a$b r4 = r1.c(r9, r13, r5, r7)\n a.d.c.p.d.a$b r2 = r1.c(r12, r13, r5, r5)\n int r5 = r1.f2904e\n if (r5 <= r6) goto L_0x0344\n float r5 = a.d.c.p.d.a.a(r2, r14)\n int r7 = r1.f2904e\n float r7 = (float) r7\n float r5 = r5 * r7\n float r7 = a.d.c.p.d.a.a(r12, r10)\n int r11 = r1.f2904e\n int r11 = r11 + r6\n float r11 = (float) r11\n float r7 = r7 * r11\n float r5 = r5 / r7\n double r6 = (double) r5\n r21 = 4604930618986332160(0x3fe8000000000000, double:0.75)\n int r5 = (r6 > r21 ? 1 : (r6 == r21 ? 0 : -1))\n if (r5 < 0) goto L_0x035f\n r21 = 4608308318706860032(0x3ff4000000000000, double:1.25)\n int r5 = (r6 > r21 ? 1 : (r6 == r21 ? 0 : -1))\n if (r5 > 0) goto L_0x035f\n a.d.c.p.d.a$b r5 = new a.d.c.p.d.a$b\n int r6 = r14.f2905a\n int r6 = r6 + -3\n int r7 = r14.f2906b\n int r7 = r7 + r3\n r11 = 0\n r5.<init>(r6, r7, r11)\n a.d.c.p.d.a$b r6 = new a.d.c.p.d.a$b\n int r7 = r15.f2905a\n int r7 = r7 + -3\n int r3 = r15.f2906b\n int r3 = r3 + -3\n r6.<init>(r7, r3, r11)\n a.d.c.p.d.a$b r3 = new a.d.c.p.d.a$b\n int r7 = r4.f2905a\n r20 = 3\n int r7 = r7 + 3\n r23 = r14\n int r14 = r4.f2906b\n int r14 = r14 + -3\n r3.<init>(r7, r14, r11)\n a.d.c.p.d.a$b r7 = new a.d.c.p.d.a$b\n int r14 = r2.f2905a\n int r14 = r14 + 3\n r24 = r4\n int r4 = r2.f2906b\n int r4 = r4 + 3\n r7.<init>(r14, r4, r11)\n int r4 = r1.b(r7, r5)\n if (r4 != 0) goto L_0x032a\n goto L_0x0340\n L_0x032a:\n int r5 = r1.b(r5, r6)\n if (r5 == r4) goto L_0x0331\n goto L_0x0340\n L_0x0331:\n int r5 = r1.b(r6, r3)\n if (r5 == r4) goto L_0x0338\n goto L_0x0340\n L_0x0338:\n int r3 = r1.b(r3, r7)\n if (r3 != r4) goto L_0x0340\n r3 = 1\n goto L_0x0341\n L_0x0340:\n r3 = 0\n L_0x0341:\n if (r3 != 0) goto L_0x0348\n goto L_0x035f\n L_0x0344:\n r24 = r4\n r23 = r14\n L_0x0348:\n r13 = r13 ^ 1\n int r3 = r1.f2904e\n r4 = 1\n int r3 = r3 + r4\n r1.f2904e = r3\n r12 = r2\n r8 = r15\n r10 = r23\n r9 = r24\n r2 = 7\n r3 = 3\n r4 = 0\n r5 = -1\n r6 = 2\n r7 = 1\n r11 = 0\n goto L_0x02ae\n L_0x035f:\n int r2 = r1.f2904e\n r3 = 5\n if (r2 == r3) goto L_0x036b\n r4 = 7\n if (r2 != r4) goto L_0x0368\n goto L_0x036b\n L_0x0368:\n a.d.c.i r0 = a.d.c.i.f2874a\n throw r0\n L_0x036b:\n int r2 = r1.f2904e\n if (r2 != r3) goto L_0x0371\n r2 = 1\n goto L_0x0372\n L_0x0371:\n r2 = 0\n L_0x0372:\n r1.f2901b = r2\n r2 = 1069547520(0x3fc00000, float:1.5)\n int r4 = r1.f2904e\n r5 = 2\n int r4 = r4 * 2\n r5 = 3\n int r4 = r4 - r5\n float r4 = (float) r4\n float r2 = r2 / r4\n int r4 = r10.f2905a\n int r5 = r9.f2905a\n int r4 = r4 - r5\n int r6 = r10.f2906b\n int r7 = r9.f2906b\n int r6 = r6 - r7\n float r5 = (float) r5\n float r4 = (float) r4\n float r4 = r4 * r2\n float r5 = r5 - r4\n int r5 = a.d.c.p.d.a.e(r5)\n int r7 = r9.f2906b\n float r7 = (float) r7\n float r6 = (float) r6\n float r6 = r6 * r2\n float r7 = r7 - r6\n int r7 = a.d.c.p.d.a.e(r7)\n int r9 = r10.f2905a\n float r9 = (float) r9\n float r9 = r9 + r4\n int r4 = a.d.c.p.d.a.e(r9)\n int r9 = r10.f2906b\n float r9 = (float) r9\n float r9 = r9 + r6\n int r6 = a.d.c.p.d.a.e(r9)\n int r9 = r8.f2905a\n int r10 = r12.f2905a\n int r9 = r9 - r10\n int r13 = r8.f2906b\n int r14 = r12.f2906b\n int r13 = r13 - r14\n float r10 = (float) r10\n float r9 = (float) r9\n float r9 = r9 * r2\n float r10 = r10 - r9\n int r10 = a.d.c.p.d.a.e(r10)\n int r12 = r12.f2906b\n float r12 = (float) r12\n float r13 = (float) r13\n float r2 = r2 * r13\n float r12 = r12 - r2\n int r12 = a.d.c.p.d.a.e(r12)\n int r13 = r8.f2905a\n float r13 = (float) r13\n float r13 = r13 + r9\n int r9 = a.d.c.p.d.a.e(r13)\n int r8 = r8.f2906b\n float r8 = (float) r8\n float r8 = r8 + r2\n int r2 = a.d.c.p.d.a.e(r8)\n boolean r8 = r1.d(r4, r6)\n if (r8 == 0) goto L_0x0785\n boolean r8 = r1.d(r9, r2)\n if (r8 == 0) goto L_0x0785\n boolean r8 = r1.d(r5, r7)\n if (r8 == 0) goto L_0x0785\n boolean r8 = r1.d(r10, r12)\n if (r8 == 0) goto L_0x0785\n a.d.c.p.d.a$b r8 = new a.d.c.p.d.a$b\n r13 = 0\n r8.<init>(r4, r6, r13)\n a.d.c.p.d.a$b r4 = new a.d.c.p.d.a$b\n r4.<init>(r9, r2, r13)\n a.d.c.p.d.a$b r2 = new a.d.c.p.d.a$b\n r2.<init>(r5, r7, r13)\n a.d.c.p.d.a$b r5 = new a.d.c.p.d.a$b\n r5.<init>(r10, r12, r13)\n r6 = 4\n a.d.c.p.d.a$b[] r7 = new a.d.c.p.d.a.b[r6]\n r9 = 0\n r7[r9] = r8\n r8 = 1\n r7[r8] = r4\n r11 = 2\n r7[r11] = r2\n r2 = 3\n r7[r2] = r5\n r2 = r7[r9]\n r4 = r7[r8]\n int r5 = r1.f2904e\n int r5 = r5 * 2\n int r5 = r5 + r8\n boolean[] r2 = r1.f(r2, r4, r5)\n r4 = r7[r8]\n r5 = r7[r11]\n int r9 = r1.f2904e\n int r9 = r9 * 2\n int r9 = r9 + r8\n boolean[] r4 = r1.f(r4, r5, r9)\n r5 = r7[r11]\n r9 = 3\n r10 = r7[r9]\n int r12 = r1.f2904e\n int r12 = r12 * 2\n int r12 = r12 + r8\n boolean[] r5 = r1.f(r5, r10, r12)\n r10 = r7[r9]\n r9 = 0\n r12 = r7[r9]\n int r13 = r1.f2904e\n int r13 = r13 * 2\n int r13 = r13 + r8\n boolean[] r8 = r1.f(r10, r12, r13)\n boolean r10 = r2[r9]\n if (r10 == 0) goto L_0x045c\n int r10 = r1.f2904e\n int r10 = r10 * 2\n boolean r10 = r2[r10]\n if (r10 == 0) goto L_0x045c\n L_0x0459:\n r1.f = r9\n goto L_0x0488\n L_0x045c:\n boolean r10 = r4[r9]\n if (r10 == 0) goto L_0x046c\n int r10 = r1.f2904e\n int r10 = r10 * 2\n boolean r10 = r4[r10]\n if (r10 == 0) goto L_0x046c\n r10 = 1\n r1.f = r10\n goto L_0x0488\n L_0x046c:\n boolean r10 = r5[r9]\n if (r10 == 0) goto L_0x047a\n int r10 = r1.f2904e\n int r10 = r10 * 2\n boolean r10 = r5[r10]\n if (r10 == 0) goto L_0x047a\n r9 = 2\n goto L_0x0459\n L_0x047a:\n boolean r10 = r8[r9]\n if (r10 == 0) goto L_0x0782\n int r9 = r1.f2904e\n int r9 = r9 * 2\n boolean r9 = r8[r9]\n if (r9 == 0) goto L_0x0782\n r9 = 3\n goto L_0x0459\n L_0x0488:\n boolean r9 = r1.f2901b\n r10 = 11\n r12 = 10\n if (r9 == 0) goto L_0x04ca\n r9 = 28\n boolean[] r13 = new boolean[r9]\n r14 = 0\n L_0x0495:\n r15 = 7\n if (r14 >= r15) goto L_0x04b3\n int r15 = r14 + 2\n boolean r20 = r2[r15]\n r13[r14] = r20\n int r20 = r14 + 7\n boolean r21 = r4[r15]\n r13[r20] = r21\n int r20 = r14 + 14\n boolean r21 = r5[r15]\n r13[r20] = r21\n int r20 = r14 + 21\n boolean r15 = r8[r15]\n r13[r20] = r15\n int r14 = r14 + 1\n goto L_0x0495\n L_0x04b3:\n boolean[] r2 = new boolean[r9]\n r4 = 0\n L_0x04b6:\n if (r4 >= r9) goto L_0x04c6\n int r5 = r1.f\n r14 = 7\n int r5 = r5 * 7\n int r5 = r5 + r4\n int r5 = r5 % r9\n boolean r5 = r13[r5]\n r2[r4] = r5\n int r4 = r4 + 1\n goto L_0x04b6\n L_0x04c6:\n r14 = 7\n r18 = -1\n goto L_0x052a\n L_0x04ca:\n r14 = 7\n r9 = 40\n boolean[] r13 = new boolean[r9]\n r15 = 0\n L_0x04d0:\n if (r15 >= r10) goto L_0x0516\n if (r15 >= r3) goto L_0x04ec\n int r17 = r15 + 2\n boolean r20 = r2[r17]\n r13[r15] = r20\n int r20 = r15 + 10\n boolean r21 = r4[r17]\n r13[r20] = r21\n int r20 = r15 + 20\n boolean r21 = r5[r17]\n r13[r20] = r21\n int r20 = r15 + 30\n boolean r17 = r8[r17]\n r13[r20] = r17\n L_0x04ec:\n if (r15 <= r3) goto L_0x0511\n int r17 = r15 + -1\n int r20 = r15 + 2\n boolean r21 = r2[r20]\n r13[r17] = r21\n int r17 = r15 + 10\n r18 = -1\n int r17 = r17 + -1\n boolean r21 = r4[r20]\n r13[r17] = r21\n int r17 = r15 + 20\n int r17 = r17 + -1\n boolean r21 = r5[r20]\n r13[r17] = r21\n int r17 = r15 + 30\n int r17 = r17 + -1\n boolean r20 = r8[r20]\n r13[r17] = r20\n goto L_0x0513\n L_0x0511:\n r18 = -1\n L_0x0513:\n int r15 = r15 + 1\n goto L_0x04d0\n L_0x0516:\n r18 = -1\n boolean[] r2 = new boolean[r9]\n r4 = 0\n L_0x051b:\n if (r4 >= r9) goto L_0x052a\n int r5 = r1.f\n int r5 = r5 * 10\n int r5 = r5 + r4\n int r5 = r5 % r9\n boolean r5 = r13[r5]\n r2[r4] = r5\n int r4 = r4 + 1\n goto L_0x051b\n L_0x052a:\n boolean r4 = r1.f2901b\n if (r4 == 0) goto L_0x0530\n r4 = 2\n goto L_0x0533\n L_0x0530:\n r4 = 4\n r14 = 10\n L_0x0533:\n int r5 = r14 - r4\n int[] r8 = new int[r14]\n r9 = 0\n L_0x0538:\n if (r9 >= r14) goto L_0x0553\n r12 = 1\n r13 = 1\n L_0x053c:\n if (r12 > r6) goto L_0x0550\n int r15 = r6 * r9\n int r15 = r15 + r6\n int r15 = r15 - r12\n boolean r15 = r2[r15]\n if (r15 == 0) goto L_0x054b\n r15 = r8[r9]\n int r15 = r15 + r13\n r8[r9] = r15\n L_0x054b:\n int r13 = r13 << 1\n int r12 = r12 + 1\n goto L_0x053c\n L_0x0550:\n int r9 = r9 + 1\n goto L_0x0538\n L_0x0553:\n a.d.c.r.l.c r9 = new a.d.c.r.l.c // Catch:{ d -> 0x077f }\n a.d.c.r.l.a r12 = a.d.c.r.l.a.k // Catch:{ d -> 0x077f }\n r9.<init>(r12) // Catch:{ d -> 0x077f }\n r9.a(r8, r5) // Catch:{ d -> 0x077f }\n r5 = 0\n L_0x055e:\n if (r5 >= r4) goto L_0x057a\n r9 = 1\n r12 = 1\n L_0x0562:\n if (r9 > r6) goto L_0x0577\n int r13 = r5 * 4\n int r13 = r13 + r6\n int r13 = r13 - r9\n r14 = r8[r5]\n r14 = r14 & r12\n if (r14 != r12) goto L_0x056f\n r14 = 1\n goto L_0x0570\n L_0x056f:\n r14 = 0\n L_0x0570:\n r2[r13] = r14\n int r12 = r12 << 1\n int r9 = r9 + 1\n goto L_0x0562\n L_0x0577:\n int r5 = r5 + 1\n goto L_0x055e\n L_0x057a:\n boolean r4 = r1.f2901b\n if (r4 == 0) goto L_0x0581\n r3 = 6\n r4 = 2\n goto L_0x0584\n L_0x0581:\n r3 = 11\n r4 = 5\n L_0x0584:\n r5 = 0\n L_0x0585:\n if (r5 >= r4) goto L_0x0598\n int r8 = r1.f2902c\n r9 = 1\n int r8 = r8 << r9\n r1.f2902c = r8\n boolean r9 = r2[r5]\n if (r9 == 0) goto L_0x0595\n int r8 = r8 + 1\n r1.f2902c = r8\n L_0x0595:\n int r5 = r5 + 1\n goto L_0x0585\n L_0x0598:\n r5 = r4\n L_0x0599:\n int r8 = r4 + r3\n if (r5 >= r8) goto L_0x05ae\n int r8 = r1.f2903d\n r9 = 1\n int r8 = r8 << r9\n r1.f2903d = r8\n boolean r9 = r2[r5]\n if (r9 == 0) goto L_0x05ab\n int r8 = r8 + 1\n r1.f2903d = r8\n L_0x05ab:\n int r5 = r5 + 1\n goto L_0x0599\n L_0x05ae:\n int r2 = r1.f2902c\n r3 = 1\n int r2 = r2 + r3\n r1.f2902c = r2\n int r4 = r1.f2903d\n int r4 = r4 + r3\n r1.f2903d = r4\n int r3 = r2 * 2\n if (r2 <= r6) goto L_0x05bf\n r2 = 1\n goto L_0x05c0\n L_0x05bf:\n r2 = 0\n L_0x05c0:\n int r3 = r3 + r2\n int r2 = r1.f2902c\n int r2 = r2 - r6\n int r2 = r2 / 8\n int r2 = r2 + r3\n float r2 = (float) r2\n r3 = 1073741824(0x40000000, float:2.0)\n int r4 = r1.f2904e\n float r4 = (float) r4\n float r4 = r4 * r3\n float r2 = r2 / r4\n r3 = 0\n r4 = r7[r3]\n int r4 = r4.f2905a\n r5 = 2\n r8 = r7[r5]\n int r8 = r8.f2905a\n int r4 = r4 - r8\n if (r4 <= 0) goto L_0x05df\n r8 = 1\n goto L_0x05e0\n L_0x05df:\n r8 = -1\n L_0x05e0:\n int r4 = r4 + r8\n r8 = r7[r3]\n int r3 = r8.f2906b\n r8 = r7[r5]\n int r8 = r8.f2906b\n int r3 = r3 - r8\n if (r3 <= 0) goto L_0x05ee\n r8 = 1\n goto L_0x05ef\n L_0x05ee:\n r8 = -1\n L_0x05ef:\n int r3 = r3 + r8\n r8 = r7[r5]\n int r8 = r8.f2905a\n float r8 = (float) r8\n float r4 = (float) r4\n float r4 = r4 * r2\n float r8 = r8 - r4\n int r8 = a.d.c.p.d.a.e(r8)\n r9 = r7[r5]\n int r5 = r9.f2906b\n float r5 = (float) r5\n float r3 = (float) r3\n float r3 = r3 * r2\n float r5 = r5 - r3\n int r5 = a.d.c.p.d.a.e(r5)\n r9 = 0\n r12 = r7[r9]\n int r12 = r12.f2905a\n float r12 = (float) r12\n float r12 = r12 + r4\n int r4 = a.d.c.p.d.a.e(r12)\n r12 = r7[r9]\n int r9 = r12.f2906b\n float r9 = (float) r9\n float r9 = r9 + r3\n int r3 = a.d.c.p.d.a.e(r9)\n r19 = 1\n r9 = r7[r19]\n int r9 = r9.f2905a\n r12 = 3\n r13 = r7[r12]\n int r13 = r13.f2905a\n int r9 = r9 - r13\n if (r9 <= 0) goto L_0x062f\n r13 = 1\n goto L_0x0630\n L_0x062f:\n r13 = -1\n L_0x0630:\n int r9 = r9 + r13\n r13 = r7[r19]\n int r13 = r13.f2906b\n r14 = r7[r12]\n int r14 = r14.f2906b\n int r13 = r13 - r14\n if (r13 <= 0) goto L_0x063e\n r18 = 1\n L_0x063e:\n int r13 = r13 + r18\n r14 = r7[r12]\n int r14 = r14.f2905a\n float r14 = (float) r14\n float r9 = (float) r9\n float r9 = r9 * r2\n float r14 = r14 - r9\n int r14 = a.d.c.p.d.a.e(r14)\n r15 = r7[r12]\n int r12 = r15.f2906b\n float r12 = (float) r12\n float r13 = (float) r13\n float r2 = r2 * r13\n float r12 = r12 - r2\n int r12 = a.d.c.p.d.a.e(r12)\n r13 = 1\n r15 = r7[r13]\n int r15 = r15.f2905a\n float r15 = (float) r15\n float r15 = r15 + r9\n int r9 = a.d.c.p.d.a.e(r15)\n r7 = r7[r13]\n int r7 = r7.f2906b\n float r7 = (float) r7\n float r7 = r7 + r2\n int r2 = a.d.c.p.d.a.e(r7)\n boolean r7 = r1.d(r4, r3)\n if (r7 == 0) goto L_0x077c\n boolean r7 = r1.d(r9, r2)\n if (r7 == 0) goto L_0x077c\n boolean r7 = r1.d(r8, r5)\n if (r7 == 0) goto L_0x077c\n boolean r7 = r1.d(r14, r12)\n if (r7 == 0) goto L_0x077c\n a.d.c.n[] r7 = new a.d.c.n[r6]\n a.d.c.n r13 = new a.d.c.n\n float r4 = (float) r4\n float r3 = (float) r3\n r13.<init>(r4, r3)\n r3 = 0\n r7[r3] = r13\n a.d.c.n r4 = new a.d.c.n\n float r9 = (float) r9\n float r2 = (float) r2\n r4.<init>(r9, r2)\n r2 = 1\n r7[r2] = r4\n a.d.c.n r2 = new a.d.c.n\n float r4 = (float) r8\n float r5 = (float) r5\n r2.<init>(r4, r5)\n r4 = 2\n r7[r4] = r2\n a.d.c.n r2 = new a.d.c.n\n float r4 = (float) r14\n float r5 = (float) r12\n r2.<init>(r4, r5)\n r4 = 3\n r7[r4] = r2\n a.d.c.r.b r2 = r1.f2900a\n int r4 = r1.f\n int r5 = r4 % 4\n r5 = r7[r5]\n int r8 = r4 + 3\n int r8 = r8 % r6\n r8 = r7[r8]\n int r9 = r4 + 2\n int r9 = r9 % r6\n r9 = r7[r9]\n r12 = 1\n int r4 = r4 + r12\n int r4 = r4 % r6\n r4 = r7[r4]\n boolean r12 = r1.f2901b\n if (r12 == 0) goto L_0x06d3\n int r11 = r1.f2902c\n int r11 = r11 * 4\n int r11 = r11 + r10\n r10 = r11\n goto L_0x06e8\n L_0x06d3:\n int r10 = r1.f2902c\n if (r10 > r6) goto L_0x06da\n int r10 = r10 * 4\n goto L_0x06e5\n L_0x06da:\n int r12 = r10 * 4\n int r10 = r10 - r6\n int r10 = r10 / 8\n r6 = 1\n int r10 = r10 + r6\n r6 = 2\n int r10 = r10 * 2\n int r10 = r10 + r12\n L_0x06e5:\n r6 = 15\n int r10 = r10 + r6\n L_0x06e8:\n a.d.c.r.f r20 = a.d.c.r.f.f2982a\n r24 = 1056964608(0x3f000000, float:0.5)\n r25 = 1056964608(0x3f000000, float:0.5)\n float r6 = (float) r10\n r11 = 1056964608(0x3f000000, float:0.5)\n float r29 = r6 - r11\n r26 = r29\n r31 = r29\n r28 = r29\n r27 = 1056964608(0x3f000000, float:0.5)\n r30 = 1056964608(0x3f000000, float:0.5)\n float r6 = r5.f2885a\n r32 = r6\n float r5 = r5.f2886b\n r33 = r5\n float r5 = r4.f2885a\n r34 = r5\n float r4 = r4.f2886b\n r35 = r4\n float r4 = r9.f2885a\n r36 = r4\n float r4 = r9.f2886b\n r37 = r4\n float r4 = r8.f2885a\n r38 = r4\n float r4 = r8.f2886b\n r39 = r4\n r21 = r2\n r22 = r10\n r23 = r10\n a.d.c.r.b r24 = r20.a(r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31, r32, r33, r34, r35, r36, r37, r38, r39)\n a.d.c.p.a r2 = new a.d.c.p.a\n boolean r4 = r1.f2901b\n int r5 = r1.f2903d\n int r1 = r1.f2902c\n r23 = r2\n r25 = r7\n r26 = r4\n r27 = r5\n r28 = r1\n r23.<init>(r24, r25, r26, r27, r28)\n a.d.c.n[] r1 = r2.f2984b\n if (r0 == 0) goto L_0x0755\n a.d.c.e r4 = a.d.c.e.NEED_RESULT_POINT_CALLBACK\n java.lang.Object r0 = r0.get(r4)\n a.d.c.o r0 = (a.d.c.o) r0\n if (r0 == 0) goto L_0x0755\n int r4 = r1.length\n L_0x074b:\n if (r3 >= r4) goto L_0x0755\n r5 = r1[r3]\n r0.a(r5)\n int r3 = r3 + 1\n goto L_0x074b\n L_0x0755:\n a.d.c.p.c.a r0 = new a.d.c.p.c.a\n r0.<init>()\n a.d.c.r.e r0 = r0.a(r2)\n a.d.c.l r2 = new a.d.c.l\n java.lang.String r3 = r0.f2979b\n byte[] r4 = r0.f2978a\n a.d.c.a r5 = a.d.c.a.AZTEC\n r2.<init>(r3, r4, r1, r5)\n java.util.List<byte[]> r1 = r0.f2980c\n if (r1 == 0) goto L_0x0772\n a.d.c.m r3 = a.d.c.m.BYTE_SEGMENTS\n r2.a(r3, r1)\n L_0x0772:\n java.lang.String r0 = r0.f2981d\n if (r0 == 0) goto L_0x077b\n a.d.c.m r1 = a.d.c.m.ERROR_CORRECTION_LEVEL\n r2.a(r1, r0)\n L_0x077b:\n return r2\n L_0x077c:\n a.d.c.i r0 = a.d.c.i.f2874a\n throw r0\n L_0x077f:\n a.d.c.i r0 = a.d.c.i.f2874a\n throw r0\n L_0x0782:\n a.d.c.i r0 = a.d.c.i.f2874a\n throw r0\n L_0x0785:\n a.d.c.i r0 = a.d.c.i.f2874a\n goto L_0x0789\n L_0x0788:\n throw r0\n L_0x0789:\n goto L_0x0788\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.d.c.p.b.a(a.d.c.c, java.util.Map):a.d.c.l\");\n }", "public void map( Chunk c0, Chunk c1, Chunk c2 ) { }", "Map<?,?> getComponents();", "public static void main(String[] args){\n\t\t\r\n\t\ttry {\r\n\t\t\tnew map().map7();\r\n\t\t\tSystem.out.println(\"ok\");\r\n\t\t} catch (SQLException | IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test_process_some_stage_operation()\n\t{\n\t}", "public BuildByKing map(BuildByKingDTO selectedActionDTO);", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public void careForPartOf(GUIMain guiMn, Map<Tissue, DefaultMutableTreeNode> ancestor) {\n CollToArrayList convert = new CollToArrayList();\n Tissue tiss = null;\n ArrayList<Tissue> tissArray = convert.treeToTissue(ancestor);\n Iterator<Tissue> iter2 = tissArray.iterator();\n while (iter2.hasNext()) {\n tiss = iter2.next();\n NodeLeaf leaf = new NodeLeaf(tiss, \"./data/images/iconTissue.gif\");\n if (tiss.partOf != null) {\n DefaultMutableTreeNode tissTree = null;\n\n // first add the tissue\n DefaultMutableTreeNode tree = ancestor.get(tiss);\n guiMn.simMain.st.removeObject(guiMn, tree, true);\n DefaultMutableTreeNode otherTissueTree = ancestor.get(tiss.partOf);\n DefaultMutableTreeNode newParent = (DefaultMutableTreeNode) otherTissueTree;\n tissTree = guiMn.simMain.st.addObject(guiMn, newParent, leaf, true);\n\n // now add compartments\n ArrayList<CompartmentSBML> listComps = tiss.getInternVolumes();\n // loop over compartments in this Tissues\n Iterator<CompartmentSBML> compIterator = listComps.iterator();\n while (compIterator.hasNext()) {\n CompartmentSBML comp = compIterator.next();\n if (comp == null) {\n System.out.println(\"error null compartment 2\");\n }\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName());\n leaf.setCompartment(comp);\n if (comp.outside == null) {\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(guiMn, tissTree, leaf, true);\n// System.out.println(\"add leaf (careForPartOf): \" + leaf.getName() + \" to tissue \" + tissTree);\n }\n }\n\n }\n }\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n Label label0 = new Label();\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", \"p@7pE4I\", 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"p@7pE4I\", \"p@7pE4I\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n labelArray0[0] = label0;\n label0.status = (-1274);\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n label0.info = (Object) null;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, (-2450), label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn((-2013884532), label0);\n methodWriter0.visitFieldInsn(1, \"oc[MfnZM[~MHOK iO\", \"p@7pE4I\", \"'@Cix/db]3YECoja=\");\n methodWriter0.visitTryCatchBlock(label0, label0, label0, (String) null);\n methodWriter0.visitJumpInsn(1198, label0);\n methodWriter0.visitMaxs((-1274), (-1460));\n methodWriter0.visitJumpInsn(1198, label0);\n ByteVector byteVector1 = byteVector0.putByte(177);\n methodWriter0.put(byteVector1);\n assertSame(byteVector0, byteVector1);\n }", "private void searchAndPlaceBranches(IMolecule molecule, IAtomContainer chain, AtomPlacer3D ap3d, AtomTetrahedralLigandPlacer3D atlp3d, AtomPlacer atomPlacer) throws Exception {\n\t\t//logger.debug(\"****** SEARCH AND PLACE ****** Chain length: \"+chain.getAtomCount());\n\t\tjava.util.List atoms = null;\n\t\tIAtomContainer branchAtoms = molecule.getBuilder().newAtomContainer();\n\t\tIAtomContainer connectedAtoms = molecule.getBuilder().newAtomContainer();\n\t\tfor (int i = 0; i < chain.getAtomCount(); i++) {\n\t\t\tatoms = molecule.getConnectedAtomsList(chain.getAtom(i));\n\t\t\tfor (int j = 0; j < atoms.size(); j++) {\n\t\t\t\tIAtom atom = (IAtom)atoms.get(j);\n\t\t\t\tif (!(atom.getSymbol()).equals(\"H\") & !(atom.getFlag(CDKConstants.ISPLACED)) & !(atom.getFlag(CDKConstants.ISINRING))) {\n\t\t\t\t\t//logger.debug(\"SEARCH PLACE AND FOUND Branch Atom \"+molecule.getAtomNumber(chain.getAtomAt(i))+\n\t\t\t\t\t//\t\t\t\" New Atom:\"+molecule.getAtomNumber(atoms[j])+\" -> STORE\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnectedAtoms.add(ap3d.getPlacedHeavyAtoms(molecule, chain.getAtom(i)));\n\t\t\t\t\t\t//logger.debug(\"Connected atom1:\"+molecule.getAtomNumber(connectedAtoms.getAtomAt(0))+\" atom2:\"+\n\t\t\t\t\t\t//molecule.getAtomNumber(connectedAtoms.getAtomAt(1))+ \" Length:\"+connectedAtoms.getAtomCount());\n\t\t\t\t\t} catch (Exception ex1) {\n\t\t\t\t\t\tlogger.error(\"SearchAndPlaceBranchERROR: Cannot find connected placed atoms due to\" + ex1.toString());\n\t\t\t\t\t\tthrow new IOException(\"SearchAndPlaceBranchERROR: Cannot find connected placed atoms\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsetBranchAtom(molecule, atom, chain.getAtom(i), connectedAtoms, ap3d, atlp3d);\n\t\t\t\t\t} catch (Exception ex2) {\n\t\t\t\t\t\tlogger.error(\"SearchAndPlaceBranchERROR: Cannot find enough neighbour atoms due to\" + ex2.toString());\n\t\t\t\t\t\tthrow new CDKException(\"SearchAndPlaceBranchERROR: Cannot find enough neighbour atoms: \" + ex2.getMessage(), ex2);\n\t\t\t\t\t}\n\t\t\t\t\tbranchAtoms.addAtom(atom);\n\t\t\t\t\tconnectedAtoms.removeAllElements();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}//for ac.getAtomCount\n\t\tplaceLinearChains3D(molecule, branchAtoms, ap3d, atlp3d, atomPlacer);\n\t}", "public RelocateBranch() {\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface TourBubblRoutePointMapper {\n\n @Mapping(source = \"tourBubbl.id\", target = \"tourBubblId\")\n TourBubblRoutePointDTO tourBubblRoutePointToTourBubblRoutePointDTO(TourBubblRoutePoint tourBubblRoutePoint);\n\n List<TourBubblRoutePointDTO> tourBubblRoutePointsToTourBubblRoutePointDTOs(List<TourBubblRoutePoint> tourBubblRoutePoints);\n\n @Mapping(source = \"tourBubblId\", target = \"tourBubbl\")\n TourBubblRoutePoint tourBubblRoutePointDTOToTourBubblRoutePoint(TourBubblRoutePointDTO tourBubblRoutePointDTO);\n\n List<TourBubblRoutePoint> tourBubblRoutePointDTOsToTourBubblRoutePoints(List<TourBubblRoutePointDTO> tourBubblRoutePointDTOs);\n\n default TourBubbl tourBubblFromId(Long id) {\n if (id == null) {\n return null;\n }\n TourBubbl tourBubbl = new TourBubbl();\n tourBubbl.setId(id);\n return tourBubbl;\n }\n}", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void mapGet() {\n check(MAPGET);\n query(MAPGET.args(MAPNEW.args(\"()\"), 1), \"\");\n query(MAPGET.args(MAPENTRY.args(1, 2), 1), 2);\n }", "@Test\n public void testShortestPathEstacoes() {\n completeMap = new Graph(false);\n incompleteMap = new Graph(false);\n\n completeMap.insertVertex(porto);\n Company.getParkRegistry().getParkMap().put(porto, portoL);\n completeMap.insertVertex(braga);\n Company.getParkRegistry().getParkMap().put(braga, bragaL);\n completeMap.insertVertex(vila);\n Company.getParkRegistry().getParkMap().put(vila, vilaL);\n completeMap.insertVertex(aveiro);\n Company.getParkRegistry().getParkMap().put(aveiro, aveiroL);\n completeMap.insertVertex(coimbra);\n Company.getParkRegistry().getParkMap().put(coimbra, coimbraL);\n completeMap.insertVertex(leiria);\n Company.getParkRegistry().getParkMap().put(leiria, leiriaL);\n\n completeMap.insertVertex(viseu);\n Company.getParkRegistry().getParkMap().put(viseu, viseuL);\n completeMap.insertVertex(guarda);\n Company.getParkRegistry().getParkMap().put(guarda, guardaL);\n completeMap.insertVertex(castelo);\n Company.getParkRegistry().getParkMap().put(castelo, casteloL);\n completeMap.insertVertex(lisboa);\n Company.getParkRegistry().getParkMap().put(lisboa, lisboaL);\n completeMap.insertVertex(faro);\n Company.getParkRegistry().getParkMap().put(faro, faroL);\n\n completeMap.insertEdge(porto, aveiro, c, 75);\n completeMap.insertEdge(porto, braga, c2, 60);\n completeMap.insertEdge(porto, vila, c3, 100);\n completeMap.insertEdge(viseu, guarda, c4, 75);\n completeMap.insertEdge(guarda, castelo, c5, 100);\n completeMap.insertEdge(aveiro, coimbra, c6, 60);\n completeMap.insertEdge(coimbra, lisboa, c7, 200);\n completeMap.insertEdge(coimbra, leiria, c8, 80);\n completeMap.insertEdge(aveiro, leiria, c9, 120);\n completeMap.insertEdge(leiria, lisboa, c10, 150);\n\n completeMap.insertEdge(aveiro, viseu, c11, 85);\n completeMap.insertEdge(leiria, castelo, c12, 170);\n completeMap.insertEdge(lisboa, faro, c13, 280);\n\n incompleteMap = completeMap.clone();\n\n incompleteMap.removeEdge(aveiro, viseu);\n incompleteMap.removeEdge(leiria, castelo);\n incompleteMap.removeEdge(lisboa, faro);\n\n System.out.println(\"Test of shortest path\");\n\n LinkedList<String> shortPath = new LinkedList<>();\n double lenpath = 0;\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(completeMap, porto, l, shortPath);\n assertTrue(\"Length path should be 0 if vertex does not exist\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(incompleteMap, porto, faro, shortPath);\n assertTrue(\"Length path should be 0 if there is no path\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPath(completeMap, porto, porto, shortPath);\n assertTrue(\"Number of nodes should be 1 if source and vertex are the same\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPath(incompleteMap, porto, lisboa, shortPath);\n assertTrue(\"Path between Porto and Lisboa should be 335 Km\", lenpath == 335);\n\n Iterator<String> it = shortPath.iterator();\n assertTrue(\"First in path should be Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Coimbra\", it.next().equals(coimbra));\n assertTrue(\"then Lisboa\", it.next().equals(lisboa));\n completeMap.insertEdge(porto, lisboa, c, 10);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(incompleteMap, braga, leiria, shortPath);\n assertEquals(\"Path between Braga and Leiria should be close to 152.89\", lenpath, 152, 1);\n\n it = shortPath.iterator();\n\n assertTrue(\"First in path should be Braga\", it.next().equals(braga));\n assertTrue(\"then Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Coimbra\", it.next().equals(coimbra));\n assertTrue(\"then Leiria\", it.next().equals(leiria));\n\n shortPath.clear();\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(completeMap, porto, castelo, shortPath);\n assertEquals(\"Path between Porto and Castelo Branco should be close to 202.86\", lenpath, 202, 1);\n assertTrue(\"N. cities between Porto and Castelo Branco should be 5 \", shortPath.size() == 5);\n\n it = shortPath.iterator();\n\n assertTrue(\"First in path should be Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Viseu\", it.next().equals(viseu));\n assertTrue(\"then Viseu\", it.next().equals(guarda));\n assertTrue(\"then Castelo Branco\", it.next().equals(castelo));\n\n //Changing Edge: aveiro-viseu with Edge: leiria-C.Branco \n //should change shortest path between porto and castelo Branco\n completeMap.removeEdge(aveiro, viseu);\n completeMap.insertEdge(leiria, castelo, c12, 170);\n shortPath.clear();\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPath(completeMap, porto, castelo, shortPath);\n assertTrue(\"Path between Porto and Castelo Branco should now be 330 Km\", lenpath == 330);\n assertTrue(\"Path between Porto and Castelo Branco should be 4 cities\", shortPath.size() == 4);\n\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n classWriter0.addType(\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\\\"\";\n stringArray0[1] = \"\\\"\";\n classWriter0.newLong(32L);\n stringArray0[2] = \"\";\n stringArray0[3] = \"\\\"\";\n classWriter0.newClass(\"\\\"\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \"\", \"<T'RwU+).UKJX>\", \"\", stringArray0, true, true);\n methodWriter0.visitAnnotation(\"\", true);\n methodWriter0.visitFieldInsn(1, \"\\\"\", \"char\", \"3<|siktz\");\n Label label0 = new Label();\n label0.toString();\n ByteVector byteVector0 = new ByteVector(1);\n byteVector0.putUTF8(\"Label offset position has not been resolved yet\");\n ByteVector byteVector1 = classWriter0.pool;\n byteVector1.putInt(1);\n methodWriter0.put(byteVector1);\n methodWriter0.signature = \"\";\n methodWriter0.getSize();\n methodWriter0.visitFieldInsn(102, \"char\", \"Code\", \"\");\n methodWriter0.visitTypeInsn(4, \"zaxCQe&RK=9\");\n }", "double getBranchProbability();", "@Override\n public void computeTileStack(Map<Band, Tile> targetTileMap, Rectangle targetRectangle, ProgressMonitor pm) throws OperatorException {\n try {\n\n int y0 = targetRectangle.y;\n int yN = y0 + targetRectangle.height - 1;\n int x0 = targetRectangle.x;\n int xN = targetRectangle.x + targetRectangle.width - 1;\n final Window tileWindow = new Window(y0, yN, x0, xN);\n\n Band topoPhaseBand;\n Band targetBand_I;\n Band targetBand_Q;\n\n // TODO: smarter extension of search space : foreshortening extension? can I calculate how bit tile I\n // need (extra space) for the coverage, taking into the consideration only height of the tile?\n for (String ifgKey : targetMap.keySet()) {\n\n ProductContainer product = targetMap.get(ifgKey);\n\n /// get dem of tile ///\n\n // compute tile geo-corners ~ work on ellipsoid\n GeoPoint[] geoCorners = GeoUtils.computeCorners(product.sourceMaster.metaData,\n product.sourceMaster.orbit,\n tileWindow);\n\n // get corners as DEM indices\n PixelPos[] pixelCorners = new PixelPos[2];\n pixelCorners[0] = dem.getIndex(new GeoPos((float) geoCorners[0].lat, (float) geoCorners[0].lon));\n pixelCorners[1] = dem.getIndex(new GeoPos((float) geoCorners[1].lat, (float) geoCorners[1].lon));\n\n // get max/min height of tile ~ uses 'fast' GCP based interpolation technique\n double[] tileHeights = computeMaxHeight(pixelCorners, targetRectangle);\n\n // compute extra lat/lon for dem tile\n GeoPoint geoExtent = GeoUtils.defineExtraPhiLam(tileHeights[0], tileHeights[1],\n tileWindow, product.sourceMaster.metaData, product.sourceMaster.orbit);\n\n // extend corners\n geoCorners = GeoUtils.extendCorners(geoExtent, geoCorners);\n\n // update corners\n pixelCorners[0] = dem.getIndex(new GeoPos((float) geoCorners[0].lat, (float) geoCorners[0].lon));\n pixelCorners[1] = dem.getIndex(new GeoPos((float) geoCorners[1].lat, (float) geoCorners[1].lon));\n\n pixelCorners[0] = new PixelPos((float) Math.ceil(pixelCorners[0].x), (float) Math.floor(pixelCorners[0].y));\n pixelCorners[1] = new PixelPos((float) Math.floor(pixelCorners[1].x), (float) Math.ceil(pixelCorners[1].y));\n\n GeoPos upperLeftGeo = dem.getGeoPos(pixelCorners[0]);\n\n int nLatPixels = (int) Math.abs(pixelCorners[1].y - pixelCorners[0].y);\n int nLonPixels = (int) Math.abs(pixelCorners[1].x - pixelCorners[0].x);\n\n int startX = (int) pixelCorners[0].x;\n int endX = startX + nLonPixels;\n int startY = (int) pixelCorners[0].y;\n int endY = startY + nLatPixels;\n\n double[][] elevation = new double[nLatPixels][nLonPixels];\n for (int y = startY, i = 0; y < endY; y++, i++) {\n for (int x = startX, j = 0; x < endX; x++, j++) {\n try {\n float elev = dem.getSample(x, y);\n if (Float.isNaN(elev))\n elev = demNoDataValue;\n elevation[i][j] = elev;\n } catch (Exception e) {\n elevation[i][j] = demNoDataValue;\n }\n }\n }\n\n DemTile demTile = new DemTile(upperLeftGeo.lat * Constants.DTOR, upperLeftGeo.lon * Constants.DTOR,\n nLatPixels, nLonPixels, Math.abs(demSamplingLat), Math.abs(demSamplingLon), (long) demNoDataValue);\n demTile.setData(elevation);\n\n final TopoPhase topoPhase = new TopoPhase(product.sourceMaster.metaData, product.sourceMaster.orbit,\n product.sourceSlave.metaData, product.sourceSlave.orbit, tileWindow, demTile);\n topoPhase.radarCode();\n topoPhase.gridData();\n\n /// check out results from source ///\n Tile tileReal = getSourceTile(product.sourceMaster.realBand, targetRectangle);\n Tile tileImag = getSourceTile(product.sourceMaster.imagBand, targetRectangle);\n ComplexDoubleMatrix complexIfg = TileUtilsDoris.pullComplexDoubleMatrix(tileReal, tileImag);\n\n final ComplexDoubleMatrix cplxTopoPhase = new ComplexDoubleMatrix(\n MatrixFunctions.cos(new DoubleMatrix(topoPhase.demPhase)),\n MatrixFunctions.sin(new DoubleMatrix(topoPhase.demPhase)));\n\n SarUtils.computeIfg_inplace(complexIfg, cplxTopoPhase.conji());\n\n /// commit to target ///\n targetBand_I = targetProduct.getBand(product.targetBandName_I);\n Tile tileOutReal = targetTileMap.get(targetBand_I);\n TileUtilsDoris.pushDoubleMatrix(complexIfg.real(), tileOutReal, targetRectangle);\n\n targetBand_Q = targetProduct.getBand(product.targetBandName_Q);\n Tile tileOutImag = targetTileMap.get(targetBand_Q);\n TileUtilsDoris.pushDoubleMatrix(complexIfg.imag(), tileOutImag, targetRectangle);\n\n topoPhaseBand = targetProduct.getBand(product.masterSubProduct.targetBandName_I);\n Tile tileOutTopoPhase = targetTileMap.get(topoPhaseBand);\n TileUtilsDoris.pushDoubleArray2D(topoPhase.demPhase, tileOutTopoPhase, targetRectangle);\n\n }\n\n } catch (Exception e) {\n throw new OperatorException(e);\n }\n }", "@Test\n\tpublic void testMapBarangEntityToBarang() {\n\t\t// Given\n\t\tBarangEntity barangEntity = new BarangEntity();\n\t\tbarangEntity.setNamaBarang(mockValues.nextString(100));\n\t\tbarangEntity.setHarga(mockValues.nextDouble());\n\t\t\n\t\t// When\n\t\tBarang barang = barangServiceMapper.mapBarangEntityToBarang(barangEntity);\n\t\t\n\t\t// Then\n\t\tassertEquals(barangEntity.getNamaBarang(), barang.getNamaBarang());\n\t\tassertEquals(barangEntity.getHarga(), barang.getHarga());\n\t}", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "private void assertBranched(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n // First, make sure the proper resources are tagged in the repo\n assertTagged(mapping, branch);\n // Now make sure the proper local files are tagged\n final Map remotes = getTaggedRemoteFilesByPath(mapping, branch);\n final Map locals = getTaggedLocalFilesByPath(mapping, branch);\n for (Iterator iter = remotes.keySet().iterator(); iter.hasNext();) {\n String key = (String)iter.next();\n ICVSRemoteFile remote = (ICVSRemoteFile)remotes.get(key);\n ICVSFile local = (ICVSFile)locals.get(key);\n assertNotNull(\"Remotely tagged resource was not tagged locally: \" + remote.getRepositoryRelativePath(), local);\n assertEquals(local.getIResource().getParent().getFullPath(), remote, local, false, false /* include tags */);\n assertEquals(\"Remotely tagged resource was not tagged locally: \" + remote.getRepositoryRelativePath(), branch, local.getSyncInfo().getTag());\n locals.remove(key);\n iter.remove();\n }\n // The remote map should be empty after traversal\n for (Iterator iter = remotes.keySet().iterator(); iter.hasNext();) {\n String path = (String) iter.next();\n fail(\"Remote file \" + path + \" was tagged remotely but not locally.\");\n }\n // The local map should be empty after traversal\n for (Iterator iter = locals.keySet().iterator(); iter.hasNext();) {\n String path = (String) iter.next();\n fail(\"Local file \" + path + \" was tagged locally but not remotely.\");\n }\n }", "@org.junit.Test\n public void mapGet100() {\n final XQuery query = new XQuery(\n \"fn:map(\\n\" +\n \" map{\\\"su\\\":=\\\"Sunday\\\",\\\"mo\\\":=\\\"Monday\\\",\\\"tu\\\":=\\\"Tuesday\\\",\\\"we\\\":=\\\"Wednesday\\\",\\\"th\\\":=\\\"Thursday\\\",\\\"fr\\\":=\\\"Friday\\\",\\\"sa\\\":=\\\"Saturday\\\"},\\n\" +\n \" (\\\"we\\\", \\\"th\\\"))\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n (\n assertCount(2)\n &&\n assertQuery(\"$result[1] eq \\\"Wednesday\\\"\")\n &&\n assertQuery(\"$result[2] eq \\\"Thursday\\\"\")\n )\n );\n }", "@Test\n public void t2() {\n List<StableCommit> stableCommitList = getStableCommits().stream().filter(commit ->\n commit.getFilePath().equals(\"src/java/org/apache/commons/lang/builder/HashCodeBuilder.java\") && commit.getLevel() == 1).collect(Collectors.toList());\n // it has been through 9 different refactorings\n List<RefactoringCommit> refactoringCommitList = getRefactoringCommits().stream().filter(commit ->\n commit.getFilePath().equals(\"src/java/org/apache/commons/lang/builder/HashCodeBuilder.java\")).collect(Collectors.toList());\n\n Assert.assertEquals(4, stableCommitList.size());\n Assert.assertEquals(8, refactoringCommitList.size());\n\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", stableCommitList.get(0).getCommit());\n\n // then, it was refactored two times (in commit 5c40090fecdacd9366bba7e3e29d94f213cf2633)\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", refactoringCommitList.get(0).getCommit());\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", refactoringCommitList.get(1).getCommit());\n\n // It appears 3 times\n Assert.assertEquals(\"379d1bcac32d75e6c7f32661b2203f930f9989df\", stableCommitList.get(1).getCommit());\n Assert.assertEquals(\"d3c425d6f1281d9387f5b80836ce855bc168453d\", stableCommitList.get(2).getCommit());\n Assert.assertEquals(\"3ed99652c84339375f1e6b99bd9c7f71d565e023\", stableCommitList.get(3).getCommit());\n }", "public void build(Cell[][] map, Action[][][] actions, int[] position ) {\n int[] destination=new int[2];\n TypeBlock typeBlock=null;\n for (int i = Math.max(0, position[0] - 1); (i <= Math.min(4, position[0] + 1)); i++) {\n for (int j = Math.max(0, position[1] - 1); j <= Math.min(4, position[1] + 1); j++) {\n if (!map[i][j].getBlock(map[i][j].getSize() - 1).getTypeBlock().equals(TypeBlock.WORKER)\n && !map[i][j].getBlock(map[i][j].getSize() - 1).getTypeBlock().equals(TypeBlock.DOME)) {\n switch (map[i][j].getBlock(map[i][j].getSize() - 1).getTypeBlock()) {\n case LEVEL1:\n typeBlock = TypeBlock.LEVEL2;\n destination[0] = i;\n destination[1] = j;\n ((Build) actions[i][j][1]).set(true, typeBlock, destination);\n break;\n case LEVEL2:\n typeBlock = TypeBlock.LEVEL3;\n destination[0] = i;\n destination[1] = j;\n ((Build) actions[i][j][1]).set(true, typeBlock, destination);\n break;\n case LEVEL3:\n typeBlock = TypeBlock.DOME;\n destination[0] = i;\n destination[1] = j;\n ((Build) actions[i][j][2]).set(true, typeBlock, destination);\n break;\n default:\n typeBlock = TypeBlock.LEVEL1;\n destination[0] = i;\n destination[1] = j;\n ((Build) actions[i][j][1]).set(true, typeBlock, destination);\n }\n }\n }\n\n }\n }", "@org.junit.Test\n public void mapGet906() {\n final XQuery query = new XQuery(\n \"map:get((map{}, map{\\\"a\\\":=\\\"b\\\"}), \\\"a\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n error(\"XPTY0004\")\n );\n }", "MapType map(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);", "public interface ActionMapperVisitor {\r\n\r\n\t/**\r\n\t * This method creates a new AcquirePermitTile action according to the AcquirePermitTileDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * return an AcquirePermitTile action with all the parameters set\r\n\t */\r\n\tpublic AcquirePermitTile map(AcquirePermitTileDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new BuildByKing action according to the BuildByKingDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * return a BuildByKing action with all the parameters set\r\n\t */\r\n\tpublic BuildByKing map(BuildByKingDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new BuildByPermitTile action according to the BuildByPermitTileDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an BuildByPermitTile action with all the parameters set\r\n\t */\r\n\tpublic BuildByPermitTile map(BuildByPermitTileDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ChangePermitTiles action according to the ChangePermitTilesDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ChangePermitTiles action with all the parameters set\r\n\t */\r\n\tpublic ChangePermitTiles map(ChangePermitTilesDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ElectCouncillor action according to the ElectCouncillorDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ElectCouncillor action with all the parameters set\r\n\t */\r\n\tpublic ElectCouncillor map(ElectCouncillorDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ElectCouncillorByAssistant action according to the ElectCouncillorByAssistantDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ElectCouncillorByAssistant action with all the parameters set\r\n\t */\r\n\tpublic ElectCouncillorByAssistant map(ElectCouncillorByAssistantDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new MakeAnOffer action according to the MakeAnOfferDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an MakeAnOffer action with all the parameters set\r\n\t */\r\n\tpublic MakeAnOffer map(MakeAnOfferDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new AcceptAnOffer action according to the AcceptAnOfferDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an AcceptAnOffer action with all the parameters set\r\n\t */\r\n\tpublic AcceptAnOffer map(AcceptAnOfferDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ChooseCityBonusAction action according to the ChooseCityBonusActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ChooseCityBonusAction action with all the parameters set\r\n\t */\r\n\tpublic ChooseCityBonusAction map(ChooseCityActionDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new PurchasedPermitTileAction action according to the PurchasedPermitTileActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an PurchasedPermitTileAction action with all the parameters set\r\n\t */\r\n\tpublic PurchasedPermitTileAction map(PurchasedPermitTileActionDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new PickPermitTileBonusAction action according to the PickPermitTileBonusActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an PickPermitTileBonusAction action with all the parameters set\r\n\t */\r\n\tpublic PickPermitTileBonusAction map(PickPermitTileActionDTO pickPermitTileActionDTO);\r\n\t\r\n}", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "public static void main(String[] args) throws Throwable {\n\n Main object = new Main();\n String target = \"4\";\n Map<String, List<String>> deps = new HashMap<>();\n List<String> a = new ArrayList<>();\n a.add(\"3\");\n a.add(\"2\");\n deps.put(\"4\", a);\n List<String> b = new ArrayList<>();\n b.add(\"1\");\n deps.put(\"3\",b);\n deps.put(\"2\",b);\n List<String> res = object.buildOrder(\"4\",deps);\n\n System.out.print(\"res\" + Arrays.toString(res.toArray()));\n\n }", "public ElectCouncillor map(ElectCouncillorDTO selectedActionDTO);", "@Test\n public void mapContains() {\n check(MAPCONT);\n query(MAPCONT.args(MAPNEW.args(), 1), false);\n query(MAPCONT.args(MAPENTRY.args(1, 2), 1), true);\n }", "public void testMapper1() throws Exception {\n\t\tModel model = BioPaxUtil.read(new FileInputStream(getClass().getResource(\"/biopax_sample1.owl\").getFile()));\n\t\tMapBioPaxToCytoscape mapper = new MapBioPaxToCytoscape();\n\t\tmapper.doMapping(model);\n\t\t\n\t\tCyNetwork cyNetwork = createNetwork(\"network1\", mapper);\n\t\t\n\t\tverifyNodeList(cyNetwork);\n\t\tverifyControlConversion(cyNetwork);\n\t\t//verifyCoFactors(cyNetwork);\n\t\t\n\t\tCytoscape.destroyNetwork(cyNetwork);\n\t}", "private void streamlinedGo(String[] argsList) {\n\t\tstates = alignment.getAminoAcidsAsFitchStates();\n\t\tbaseStates = phylogeny.getFitchStates(states).clone();\n\t\tambiguousAtRoot = 0;\n\t\tancestorAmbiguities = new boolean[baseStates.length];\n\t\t/* Establish how many ancestral states are ambiguous */\n\t\tfor(int i=0;i<baseStates.length;i++){\n\t\t\tHashSet<String> statesSet=baseStates[i];\n\t\t\tif(statesSet.size()>1){\n\t\t\t\tambiguousAtRoot++;\n\t\t\t\tancestorAmbiguities[i] = true;\n\t\t\t}\n\t\t}\n\t\t/* Attempt to resolve the rootnode states */\n\t\tphylogeny.resolveFitchStatesTopnode();\n\t\tphylogeny.resolveFitchStates(phylogeny.states);\n\t\t/* A new PR object used to hold reconstructions */\n\t\tpr = new ParsimonyReconstruction(states, phylogeny);\n\t\t/* Should now be resolved as far as possible.\n\t\t * Compare each taxon to tree root MRCA */\n\t\t//pr.printAncestralComparison();\n\n\t\t/*\n\t\t * Parse the args into lists\n\t\t * Then find the tips and MRCAs of each list. at this point print all branches below\n\t\t * Then walk through the MRCA / lists counting subs\n\t\t */\n\t\tint numberOfClades = argsList.length-2;\t// we'll assume the first two args are alignment and phylogeny respectively, and all the others (we've checked >2) are clades described by tips\n\t\t// Guessed the number of clades, initialise arrays\n\t\tcladeTips = new HashSet[numberOfClades];\n\t\tcladeTipsAsNodes = new HashSet[numberOfClades];\n\t\tMRCAnodes = new TreeNode[numberOfClades];\n\t\tMRCAcladesBranchTotals = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsInternal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotals = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsInternal = new int[numberOfClades];\n\t\tSystem.out.println(\"Assuming \"+numberOfClades+\" separate clades. Parsing clade descriptions...\");\n\t\t// Parse the clade lists\n\t\tfor(int i=2;i<argsList.length;i++){\n\t\t\tString[] taxaTokens = argsList[i].split(\":\");\n\t\t\tcladeTips[i-2] = new HashSet<String>();\n\t\t\tcladeTipsAsNodes[i-2] = new HashSet<TreeNode>();\n\t\t\tfor(String aTaxon:taxaTokens){\n\t\t\t\tcladeTips[i-2].add(aTaxon);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check we've parsed them correctly\n\t\tSystem.out.println(\"Read these taxon lists:\");\n\t\tfor(int i=0;i<cladeTips.length;i++){\n\t\t\tSystem.out.print(\"Clade \"+i);\n\t\t\tfor(String taxon:cladeTips[i]){\n\t\t\t\tSystem.out.print(\" \"+taxon);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t// Find the MRCA node of each clade, and also print all the branches beneath that MRCA node\n\t\tSystem.out.println(\"Searching the tree for the MRCAs of each clade...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\t// Find the tip nodes corresponding to extant taxa\n\t\t\tIterator<String> itr = cladeTips[i].iterator();\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tint nodeIDofTip = phylogeny.getTipNumber(itr.next());\n\t\t\t\tTreeNode tipNode = phylogeny.getNodeByNumberingID(nodeIDofTip);\n\t\t\t\tcladeTipsAsNodes[i].add(tipNode);\n\t\t\t}\n\t\t\t\t\n\t\t\t// Find the ID of the MRCA node\n\t\t\tint nodeIDofMRCA = phylogeny.getNodeNumberingIDContainingTaxa(cladeTips[i]);\n\t\t\tTreeNode cladeNodeMRCA = phylogeny.getNodeByNumberingID(nodeIDofMRCA);\n\t\t\tMRCAnodes[i] = cladeNodeMRCA;\n\n\t\t\t// Print all the branches below MRCA\n\t\t\tSystem.out.println(\"Found the MRCA of clade \"+i+\" (\"+nodeIDofMRCA+\"):\\n\"+cladeNodeMRCA.getContent()+\"\\nPrinting all branches below this node:\");\n\t\t\tMRCAcladesBranchTotals[i] = cladeNodeMRCA.howManyTips();\n\t\t\tfor(TreeBranch branch:cladeNodeMRCA.getBranches()){\n\t\t\t\tSystem.out.println(branch);\n\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(branch.getParentNode().states, branch.getDaughterNode().states, branch.getParentNode().getContent(), branch.getDaughterNode().getContent());\n\t\t\t\tMRCAcladesSubstitutionTotals[i] = substitutions.length;\n\t\t\t\tif(branch.isEndsInTerminalTaxon()){\n\t\t\t\t\tMRCAcladesBranchTotalsTerminal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsTerminal[i] = substitutions.length;\n\t\t\t\t}else{\n\t\t\t\t\tMRCAcladesBranchTotalsInternal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsInternal[i] = substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// For each MRCA node and clade tips combination, compare and print substitutions\n\t\tSystem.out.println(\"Comparing ancestral clade MRCA node sequences with extant sequences...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(\"Comparing ancestral MRCA sequence for CLADE \"+i+\" against *ALL* clades' terminal taxa...\");\n\t\t\tTreeNode thisMRCA = MRCAnodes[i];\n\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\tSystem.out.println(\"Clade MRCA: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[j]){\n\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(thisMRCA.states, someTip.states, \"MRCA_clade_\"+i, someTip.getContent());\n\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// All uncorrected pairwise comparisons\n\t\tSystem.out.println(\"Comparing extant sequences directly...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[i]){\n\t\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\t\tSystem.out.println(\"Basis clade: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\t\tfor(TreeNode someOtherTip:cladeTipsAsNodes[j]){\n\t\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(someTip.states, someOtherTip.states, someTip.getContent(), someOtherTip.getContent());\n\t\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t// Print a summary of each clade\n\t\tSystem.out.println(\"Summary of clade counts...\");\n\t\tSystem.out.println(\"Clade\\tbranches\\texternal\\tinternal\\t\\tsubstitutions\\texternal\\tinternal\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(i\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsInternal[i]+\"\\t\"\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsInternal[i]);\n\t\t}\n\t\tSystem.out.println(\"Done.\");\n\t}", "@Override\r\n\t\t\tpublic void map(Object arg0, Object arg1, OutputCollector arg2,\r\n\t\t\t\t\tReporter arg3) throws IOException {\n\t\t\t\t\r\n\t\t\t}", "Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);", "@Override\n public void bfs() {\n\n }", "public void solution() {\n\t\t\n\t}", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public static void main(String[] args) {\n Leaf1 L1 = new Leaf1();\r\n Leaf2 L2 = new Leaf2();\r\n method(L1);\r\n method(L2);\r\n\t}", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Test\n\tpublic void testMaps() throws Exception {\n\t\ttestWith(TestClassMap.getInstance());\n\t}", "public static void main(String[] args) {\n GridMap map = null;\n try {\n map = GridMap.fromFile(\"map.txt\");\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n\n if (map == null)\n throw new RuntimeException(\"Unable to obtain discretized map.\");\n\n // Prints map\n System.out.println(\"Map to analyze:\");\n System.out.println(map);\n\n // Executes search\n int[] rowColIni = map.getStart();\n int[] rowColFim = map.getGoal();\n Block initial = new Block(rowColIni[0], rowColIni[1], BlockType.FREE);\n Block target = new Block(rowColFim[0], rowColFim[1], BlockType.FREE);\n GreedySearch search = new GreedySearch(map, initial, target);\n RobotAction[] ans = search.solve();\n\n // Shows answer\n if (ans == null) {\n System.out.println(\"No answer found for this problem.\");\n } else {\n\n Block current = initial;\n System.out.print(\"Answer: \");\n for (RobotAction a : ans) {\n System.out.print(\", \" + a);\n Block next = map.nextBlock(current, a);\n map.setRoute(next.row, next.col);\n current = next;\n }\n\n // Shows map with the route found\n System.out.println();\n System.out.println(\"Route found:\");\n System.out.println(map);\n }\n }", "public void branchChainTo(Label label) {\n // do nothing by default\n }", "public static native void OpenMM_AmoebaMultipoleForce_getCovalentMaps(PointerByReference target, int index, PointerByReference covalentLists);", "protected void evalBranch(){\n List<Token> arguments = this.mainToken.getChilds();\n\n //Primer argumento es un string\n String stringExpression = arguments.get(0).getValue();\n //Removemos la referencia en la lista\n arguments.remove(0);\n\n String response = this.make(stringExpression, arguments);\n\n //Eliminar hojas\n this.setResponse(response);\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"Label offset position has not been resolved yet\";\n stringArray0[1] = \"'0\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"'0\", \"Label offset position has not been resolved yet\", \"'0\", stringArray0, false, false);\n Label label0 = new Label();\n Label label1 = label0.successor;\n Label[] labelArray0 = new Label[3];\n labelArray0[0] = null;\n label0.outputStackMax = 218;\n methodWriter0.visitMethodInsn(787, \"Ljava/lang/Synthetic;\", \"Label offset position has not been resolved yet\", \"'0\");\n int[] intArray0 = new int[9];\n intArray0[0] = 218;\n intArray0[1] = 2;\n intArray0[2] = 218;\n intArray0[3] = 787;\n intArray0[4] = 1;\n intArray0[5] = 218;\n intArray0[6] = 2;\n intArray0[7] = 218;\n intArray0[8] = 1;\n MethodWriter.getNewOffset(intArray0, intArray0, label0);\n int[] intArray1 = new int[4];\n intArray1[1] = 218;\n intArray1[2] = 218;\n intArray1[3] = 1;\n // Undeclared exception!\n try { \n methodWriter0.visitLookupSwitchInsn(label0, intArray1, labelArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "static boolean AnyMapTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AnyMapTest\")) return false;\n if (!nextTokenIs(b, K_MAP)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeTokens(b, 3, K_MAP, L_PAR, STAR_SIGN, R_PAR);\n p = r; // pin = 3\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "private void f(java.lang.String r8) {\n /*\n r7 = this;\n r6 = 1;\n r2 = F;\n r7.y = r8;\n r0 = r7.m;\n r0 = r0.entrySet();\n r3 = r0.iterator();\n L_0x000f:\n r0 = r3.hasNext();\n if (r0 == 0) goto L_0x004a;\n L_0x0015:\n r0 = r3.next();\n r0 = (java.util.Map.Entry) r0;\n r1 = r0.getValue();\n r1 = (java.util.List) r1;\n r4 = r1.size();\t Catch:{ RuntimeException -> 0x0077 }\n if (r4 != r6) goto L_0x0043;\n L_0x0027:\n r4 = J;\t Catch:{ RuntimeException -> 0x0079 }\n r5 = 28;\n r4 = r4[r5];\t Catch:{ RuntimeException -> 0x0079 }\n r5 = 0;\n r5 = r1.get(r5);\t Catch:{ RuntimeException -> 0x0079 }\n r4 = r4.equals(r5);\t Catch:{ RuntimeException -> 0x0079 }\n if (r4 == 0) goto L_0x0043;\n L_0x0038:\n r4 = r7.e;\t Catch:{ RuntimeException -> 0x007b }\n r0 = r0.getKey();\t Catch:{ RuntimeException -> 0x007b }\n r4.add(r0);\t Catch:{ RuntimeException -> 0x007b }\n if (r2 == 0) goto L_0x0048;\n L_0x0043:\n r0 = r7.x;\t Catch:{ RuntimeException -> 0x007b }\n r0.addAll(r1);\t Catch:{ RuntimeException -> 0x007b }\n L_0x0048:\n if (r2 == 0) goto L_0x000f;\n L_0x004a:\n r0 = r7.x;\t Catch:{ RuntimeException -> 0x007d }\n r1 = J;\t Catch:{ RuntimeException -> 0x007d }\n r2 = 29;\n r1 = r1[r2];\t Catch:{ RuntimeException -> 0x007d }\n r0 = r0.remove(r1);\t Catch:{ RuntimeException -> 0x007d }\n if (r0 == 0) goto L_0x0065;\n L_0x0058:\n r0 = B;\t Catch:{ RuntimeException -> 0x007d }\n r1 = java.util.logging.Level.WARNING;\t Catch:{ RuntimeException -> 0x007d }\n r2 = J;\t Catch:{ RuntimeException -> 0x007d }\n r3 = 30;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x007d }\n r0.log(r1, r2);\t Catch:{ RuntimeException -> 0x007d }\n L_0x0065:\n r1 = r7.G;\n r0 = r7.m;\n r2 = java.lang.Integer.valueOf(r6);\n r0 = r0.get(r2);\n r0 = (java.util.Collection) r0;\n r1.addAll(r0);\n return;\n L_0x0077:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0079 }\n L_0x0079:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x007b }\n L_0x007b:\n r0 = move-exception;\n throw r0;\n L_0x007d:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.f(java.lang.String):void\");\n }", "public static void main(String[] args) {\n FloorInBst tree = new FloorInBst();\n tree.root = new Node_2(8);\n tree.root.left = new Node_2(4);\n tree.root.right = new Node_2(12);\n tree.root.left.left = new Node_2(2);\n tree.root.left.right = new Node_2(6);\n tree.root.right.left = new Node_2(10);\n tree.root.right.right = new Node_2(14);\n\n /**\n * =========8==============// \n * =====4==========12======//\n * =2=====6===10=======14==//\n */\n for (int input = 0; input < 18; input++) {\n System.out.println(input + \" \" + tree.Floor(root, input));\n }\n }", "public abstract void mapJob(Job job, List sites);", "@org.junit.Test\n public void mapGet008() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(xs:untypedAtomic(\\\"12\\\"), \\\"bar\\\"), 12)\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public static void main(String[] args) {\n\n\t\tGitService gitService = new GitServiceImpl();\n\t\tGitHistoryRefactoringMiner miner = new GitHistoryRefactoringMinerImpl();\n\n\t\tRepository repo;\n\t\ttry {\n\t\t\trepo = gitService.cloneIfNotExists(\n\t\t\t\t\t\"/home/steve/Steve/git/commons-rng\",\n\t\t\t\t\t\"https://github.com/apache/commons-rng.git\");\n\t\t\t//\t\t\trepo = gitService.cloneIfNotExists(\n\t\t\t//\t\t\t\t\t\"tmp/refactoring-toy-example\",\n\t\t\t//\t\t\t\t\t\"https://github.com/danilofes/refactoring-toy-example.git\");\n\t\t\t// For all with sample\n\t\t\t//\t\t\tminer.detectAll(repo, \"master\", new RefactoringHandler() {\n\t\t\t//\t\t\t\t @Override\n\t\t\t//\t\t\t\t public void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t//\t\t\t\t System.out.println(\"Refactorings at \" + commitId);\n\t\t\t//\t\t\t\t for (Refactoring ref : refactorings) {\n\t\t\t//\t\t\t\t System.out.println(ref.toString());\n\t\t\t////\t\t\t\t System.out.println(ref.toJSON());\n\t\t\t//\t\t\t\t }\n\t\t\t//\t\t\t\t }\n\t\t\t//\t\t\t\t});\n\t\t\t// For between 2 commits with sample\n\t\t\t//\t\t\t// start commit: 819b202bfb09d4142dece04d4039f1708735019b\n\t\t\t//\t\t\t// end commit: d4bce13a443cf12da40a77c16c1e591f4f985b47\n\t\t\t//\t\t\tminer.detectBetweenCommits(repo, \n\t\t\t//\t\t\t\t\t\"819b202bfb09d4142dece04d4039f1708735019b\", \"d4bce13a443cf12da40a77c16c1e591f4f985b47\",\n\t\t\t//\t\t\t\t\tnew RefactoringHandler() {\n\t\t\t//\t\t\t\t@Override\n\t\t\t//\t\t\t\tpublic void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t//\t\t\t\t\tSystem.out.println(\"Refactorings at \" + commitId);\n\t\t\t//\t\t\t\t\tfor (Refactoring ref : refactorings) {\n\t\t\t//\t\t\t\t\t\t//\t\t\t System.out.println(ref.toString());\n\t\t\t//\t\t\t\t\t\tSystem.out.println(ref.toJSON());\n\t\t\t//\t\t\t\t\t}\n\t\t\t//\t\t\t\t}\n\t\t\t//\t\t\t});\n\n\t\t\t// start commit: 40fd7ad244b350d657ca4f1a9efe667c52697327\n\t\t\t// end commit: 3ca48892811538e911eb3c5bafd60b4d9ca92483\n\t\t\tminer.detectBetweenCommits(repo, \n\t\t\t\t\t\"40fd7ad244b350d657ca4f1a9efe667c52697327\", \"3ca48892811538e911eb3c5bafd60b4d9ca92483\",\n\t\t\t\t\tnew RefactoringHandler() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t\t\tSystem.out.println(\"***********************************************************************************\");\n\t\t\t\t\tSystem.out.println(\"Refactorings at \" + commitId);\n\t\t\t\t\tfor (Refactoring ref : refactorings) {\n\t\t\t\t\t\t// System.out.println(ref.toString());\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(ref.toJSON());\n\t\t\t\t\t\tif (ref instanceof ExtractOperationRefactoring) {\n\t\t\t\t\t\t\tExtractOperationRefactoring refactoring = (ExtractOperationRefactoring)ref;\n\t\t\t\t\t\t\tUMLOperationBodyMapper mapper = refactoring.getBodyMapper();\n\t\t\t\t\t\t\tList<StatementObject> newLeaves = mapper.getNonMappedLeavesT2(); //newly added leaf statements\n\t\t\t\t\t\t\tList<CompositeStatementObject> newComposites = mapper.getNonMappedInnerNodesT2(); //newly added composite statements\n\t\t\t\t\t\t\tList<StatementObject> deletedLeaves = mapper.getNonMappedLeavesT1(); //deleted leaf statements\n\t\t\t\t\t\t\tList<CompositeStatementObject> deletedComposites = mapper.getNonMappedInnerNodesT1(); //deleted composite statements\n\t\t\t\t\t\t\tSystem.out.println(\"newLeaves: \\n\" + newLeaves);\n\t\t\t\t\t\t\tSystem.out.println(\"newComposites: \\n\" + newComposites);\n\t\t\t\t\t\t\tSystem.out.println(\"deletedLeaves: \\n\" + deletedLeaves);\n\t\t\t\t\t\t\tSystem.out.println(\"deletedComposites: \\n\" + deletedComposites);\n\n\t\t\t\t\t\t\tfor(AbstractCodeMapping mapping : mapper.getMappings()) {\n\t\t\t\t\t\t\t\tAbstractCodeFragment fragment1 = mapping.getFragment1();\n\t\t\t\t\t\t\t\tAbstractCodeFragment fragment2 = mapping.getFragment2();\n\t\t\t\t\t\t\t\tSet<Replacement> replacements = mapping.getReplacements();\n\t\t\t\t\t\t\t\tSystem.out.println(\"**************** Replacements: ***********\\n\");\n\t\t\t\t\t\t\t\tfor(Replacement replacement : replacements) {\n\t\t\t\t\t\t\t\t\tString valueBefore = replacement.getBefore();\n\t\t\t\t\t\t\t\t\tString valueAfter = replacement.getAfter();\n\t\t\t\t\t\t\t\t\tReplacementType type = replacement.getType();\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"valueBefore: \" + valueBefore);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"valueAfter: \" + valueAfter);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"type: \" + type);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"***********************************************************************************\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n}", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n\tpublic void run(){\n\t\tbranch(0, sol,0);\t\n\t\tSystem.out.println(\"####### \" + counter + \" #######\");\n\t}", "@Test\n public void runTest()\n { // Pueblo start to finish 34.97s\n\n\n this.myMap = myReader.readMapFile(\"data/AlamosaNetwork.xml\");\n myMap.setupMapAsServer();\n this.testAgent001 = getTestAgent();\n\n //System.out.println(\"Intersections2: \"+myMap.getIntersections());\n\n testLW.log(Level.INFO, \"this is another nother test\");\n\n System.out.println(\"\\nStarting test. . .\");\n // Pueblo start to finish 34.97s\n // from.setId(\"1040921516\"); // from.setId(\"01\"); // 1040921516 // 2\n // to.setId(\"864162469\"); // to.setId(\"10\"); // 864162469 // 50\n Long startTime = System.nanoTime();\n\n //GRIDheapAlg greedy = new GRIDheapAlg();\n GRIDpathfinder theALG = new GRIDpathfinder(myMap, \"BPR\");\n //GRIDheapDynamicAlg dyna = new GRIDheapDynamicAlg(myMap); //\n //myPathGreedy = greedy.shortestPath(networkMap,\"1040921516\",\"864162469\");\n\n //GRIDselfishAlg test001 = new GRIDselfishAlg(testAgent001, networkMap, 0L); // GRIDpathrecalc GRIDselfishAlg\n //GRIDpathrecalc test001 = new GRIDpathrecalc(testAgent001, networkMap, 0L); // GRIDpathrecalc GRIDselfishAlg\n //GRIDroute outRoute = new GRIDroute();\n /*GRIDpathrecalc test001 = new GRIDpathrecalc(testAgent001, networkMap, 0L); // GRIDpathrecalc GRIDselfishAlg\n outRoute = test001.findPath();*/\n GRIDroute outRoute = theALG.findPath(testAgent001, 0L);\n\n //ListIterator<String> pathIterator = outRoute.Intersections.listIterator();\n\n /*assertNotNull(myMap);\n assertNotNull(outRoute);\n assertTrue(outRoute.Intersections.size() > 0);*/\n\n //System.out.println(\"\\nShortest path: \"+myPathGreedy);\n //System.out.println(\"\\nShortest path: \"+myPathDynamic);\n\n //System.out.print(\"\\nPath:\\n\");\n //for (String intrx : outRoute.getIntersections())\n //{\n // System.out.print(intrx);\n // if(!intrx.equals(testAgent001.getDestination()))\n // System.out.print(\",\");\n //}\n\n //ArrayList<String> tempPathList = myMap.getPathByRoad(outRoute.getIntersections());\n\n //System.out.print(\"\\n\\nPath by Link:\\n\");\n //for (String path : tempPathList)\n //{\n // System.out.print(path);\n // if(!tempPathList.isEmpty()\n // && !path.equals(tempPathList.get(tempPathList.size() - 1)))\n // System.out.print(\",\");\n // }\n\n if(outRoute.getAgent_ID() != \"Destination unreachable\"){\n logWriter.log(Level.INFO, \"Route is: \" + outRoute.toString());\n\n System.out.println(\"Route is: \" + testAgent001.getOrigin() + outRoute.toString()\n +\" \"+testAgent001.getDestination());\n\n System.out.println(\"\\n\\nCalculated Travel Time: \"+outRoute.getcalculatedTravelTime());\n }\n else{\n System.out.println(\"Destination Unreachable\");\n }\n\n long stopTime = System.nanoTime();\n long timeToRun = ((stopTime - startTime)/1000000);\n\n System.out.print(\"\\nTook \" + timeToRun/1000.0 + \" Seconds\");\n System.out.print(\"\\n\\nAnd we're done.\\n\");\n }", "public void buildInitialBand()\r\n\t{\n\t\r\n\tint bl = boundary.size();\r\n\tfor(int i=0; i<bl; i++) \r\n\t\t{\r\n\t\tInt2d bCur = boundary.get(i);\r\n\t\t//System.out.println(bCur.x + \", \" + bCur.y + \": size = \" + heap.size());\r\n\t\t\r\n\t\ttestPointsAround(bCur.x,bCur.y);\r\n\t\t}\r\n\t\r\n\t}", "public void onChangeMap(String arg0) {\n\t\t\r\n\t}", "@org.junit.Test\n public void mapGet009() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(12, \\\"bar\\\"), xs:untypedAtomic(\\\"12\\\"))\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }" ]
[ "0.5921952", "0.5622706", "0.55824834", "0.551017", "0.532621", "0.52590567", "0.5242009", "0.523687", "0.51915544", "0.51819676", "0.51570255", "0.51565796", "0.51461416", "0.5135572", "0.51158744", "0.510075", "0.50636667", "0.50502", "0.50392944", "0.50376874", "0.5019997", "0.49969295", "0.49948913", "0.49938902", "0.49917737", "0.49805728", "0.49719903", "0.49478", "0.49346963", "0.49081483", "0.48824668", "0.48572958", "0.48524886", "0.4848663", "0.48469156", "0.48401687", "0.48344827", "0.48334268", "0.48322988", "0.48285648", "0.47893292", "0.47889704", "0.47873262", "0.4774351", "0.4771428", "0.47708777", "0.476745", "0.47643438", "0.4762132", "0.4753464", "0.475141", "0.47435915", "0.47431284", "0.473813", "0.47170785", "0.47058126", "0.47049224", "0.46991962", "0.46939033", "0.46934804", "0.46911058", "0.46876216", "0.4687154", "0.46821252", "0.46806332", "0.4679872", "0.46754542", "0.46753094", "0.46751177", "0.4674308", "0.46715087", "0.46668988", "0.46616653", "0.46579668", "0.4654744", "0.4646663", "0.464372", "0.46398956", "0.46375772", "0.46333992", "0.46243766", "0.46240073", "0.46194717", "0.4618782", "0.4616244", "0.46106064", "0.46048206", "0.46028543", "0.46009076", "0.4597894", "0.4593655", "0.4593371", "0.4591678", "0.4591261", "0.45909762", "0.4589902", "0.45848933", "0.45832253", "0.4582671", "0.4581401" ]
0.5391885
4
Test case number: 7 / 1 covered goal: Goal 1. wheel.components.Component.kbd(Ljava/lang/Object;)Lwheel/components/Component;: rootBranch
@Test public void test007() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Label label0 = (Label)errorPage0.kbd((Object) errorPage0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"6F\\\"\", \"6F\\\"\");\n // Undeclared exception!\n try { \n checkbox0.kbd();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void upFocusCycle(Component paramComponent)\n/* */ {\n/* 1398 */ if (paramComponent != null) {\n/* 1399 */ paramComponent.transferFocusUpCycle();\n/* */ }\n/* */ }", "public void processKeyEvent(Component paramComponent, KeyEvent paramKeyEvent)\n/* */ {\n/* 1118 */ if (consumeProcessedKeyEvent(paramKeyEvent)) {\n/* 1119 */ return;\n/* */ }\n/* */ \n/* */ \n/* 1123 */ if (paramKeyEvent.getID() == 400) {\n/* 1124 */ return;\n/* */ }\n/* */ \n/* 1127 */ if ((paramComponent.getFocusTraversalKeysEnabled()) && \n/* 1128 */ (!paramKeyEvent.isConsumed()))\n/* */ {\n/* 1130 */ AWTKeyStroke localAWTKeyStroke1 = AWTKeyStroke.getAWTKeyStrokeForEvent(paramKeyEvent);\n/* 1131 */ AWTKeyStroke localAWTKeyStroke2 = AWTKeyStroke.getAWTKeyStroke(localAWTKeyStroke1.getKeyCode(), localAWTKeyStroke1\n/* 1132 */ .getModifiers(), \n/* 1133 */ !localAWTKeyStroke1.isOnKeyRelease());\n/* */ \n/* */ \n/* */ \n/* 1137 */ Set localSet = paramComponent.getFocusTraversalKeys(0);\n/* */ \n/* 1139 */ boolean bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1140 */ boolean bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1142 */ if ((bool1) || (bool2)) {\n/* 1143 */ consumeTraversalKey(paramKeyEvent);\n/* 1144 */ if (bool1) {\n/* 1145 */ focusNextComponent(paramComponent);\n/* */ }\n/* 1147 */ return; }\n/* 1148 */ if (paramKeyEvent.getID() == 401)\n/* */ {\n/* 1150 */ this.consumeNextKeyTyped = false;\n/* */ }\n/* */ \n/* 1153 */ localSet = paramComponent.getFocusTraversalKeys(1);\n/* */ \n/* 1155 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1156 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1158 */ if ((bool1) || (bool2)) {\n/* 1159 */ consumeTraversalKey(paramKeyEvent);\n/* 1160 */ if (bool1) {\n/* 1161 */ focusPreviousComponent(paramComponent);\n/* */ }\n/* 1163 */ return;\n/* */ }\n/* */ \n/* 1166 */ localSet = paramComponent.getFocusTraversalKeys(2);\n/* */ \n/* 1168 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1169 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1171 */ if ((bool1) || (bool2)) {\n/* 1172 */ consumeTraversalKey(paramKeyEvent);\n/* 1173 */ if (bool1) {\n/* 1174 */ upFocusCycle(paramComponent);\n/* */ }\n/* 1176 */ return;\n/* */ }\n/* */ \n/* 1179 */ if ((!(paramComponent instanceof Container)) || \n/* 1180 */ (!((Container)paramComponent).isFocusCycleRoot())) {\n/* 1181 */ return;\n/* */ }\n/* */ \n/* 1184 */ localSet = paramComponent.getFocusTraversalKeys(3);\n/* */ \n/* 1186 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1187 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1189 */ if ((bool1) || (bool2)) {\n/* 1190 */ consumeTraversalKey(paramKeyEvent);\n/* 1191 */ if (bool1) {\n/* 1192 */ downFocusCycle((Container)paramComponent);\n/* */ }\n/* */ }\n/* */ }\n/* */ }", "@Test\n public void TEST_GOTO_CHOOSING_UI() {\n GameData.mainMenuState = false;\n GameData.chooseDifficultyState = true;\n ChooseDifficultyUI testUI = new ChooseDifficultyUI();\n GameData.currentUI = testUI;\n\n assertFalse(GameData.currentUI.getClass() == ChoosingUI.class);\n assertFalse(GameData.chooseDifficultyState == false);\n assertFalse(GameData.choosingBoatState == true);\n //Create a click position at a point within the button's area (in this case, exactly central).\n Vector2 clickPosition = new Vector2(SCREEN_WIDTH/2, 100 + BUTTON_HEIGHT/2);\n testUI.getInput(SCREEN_WIDTH, clickPosition);\n //test that clickPosition is within area\n assertTrue(clickPosition.x < SCREEN_WIDTH / 2 - BUTTON_WIDTH / 2 + BUTTON_WIDTH);\n assertTrue(clickPosition.x > SCREEN_WIDTH / 2 - BUTTON_WIDTH / 2);\n assertTrue(clickPosition.y < 100 + BUTTON_HEIGHT);\n assertTrue(clickPosition.y > 100);\n //Check changes have been made.\n assertTrue(GameData.currentUI.getClass() == ChoosingUI.class);\n assertTrue(GameData.chooseDifficultyState == false);\n assertTrue(GameData.choosingBoatState == true);\n }", "@Test\n public void testKeyPressed() {\n System.out.println(\"keyPressed\");\n KeyEvent e = null; \n //instance.keyPressed(e);\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "public void keyPressed(KeyEvent event){\r\n\t\t\tchar input = event.getKeyChar();\r\n\t\t\tSystem.out.println(event.getExtendedKeyCode());\r\n\t\t\tif(event.getExtendedKeyCode()== 10){\r\n\t\t\t equals.doClick();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tswitch(input){\r\n\t\t\t\tcase '0': button0.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '1': button1.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '2': button2.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '3': button3.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '4': button4.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '5': button5.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '6': button6.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '7': button7.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '8': button8.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '9': button9.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '.': dot.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '+': plus.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '-': minus.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '/': divide.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '*': multiply.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '=': equals.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '\b': del.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '\u001b': clear.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'c': clear.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t}", "@Test\n \tpublic void testFocusHandling() throws FactoryException {\n \n \t\tMainUI ui = new MainUI();\n \t\tButtonPanel bp = new ButtonPanel();\n \t\tui.withModelInteractor(pi).withButtonPanel(bp);\n \t\tRobot robot = BasicRobot.robotWithCurrentAwtHierarchy();\n \n \t\tui.initialize();\n \t\tui.start();\n \t\tbp.start();\n \n \t\t// perform tab key press and wait until it took place\n \t\trobot.pressAndReleaseKey(KeyEvent.VK_TAB);\n \t\trobot.waitForIdle();\n \n \t\t// perform left key press and wait until it took place\n \t\trobot.pressAndReleaseKey(KeyEvent.VK_LEFT);\n \t\trobot.waitForIdle();\n \n \t\t// verify that the game registered the left key press and that it didn't\n \t\t// lose focus\n \t\tverify(pi).left();\n \t\tassertTrue(ui.isFocusOwner());\n \n \t}", "@Override\n\tpublic void keyPressed() {\n\t\t\n\t}", "@Test\r\n\tpublic void TC101() {\r\n\t\t\r\n\t\t// 1. User opens the JBrick application\r\n\t\t// => The Code Frame has one file open in the code frame (center) and a status pane (bottom)\r\n\t\t// (No file has been opened before hand, this is the equivalent to opening the application for the first time.)\r\n\t\t\r\n\t\tMainWindow jbricks = StartupFunctions.newJBricksInstance(\"JBricks - TC101\");\r\n\t\tComponent editorPane = ContainerFunctions.getEditorPane(jbricks);\r\n\t\tComponent statusPane = ContainerFunctions.getStatusPane(jbricks);\r\n\t\t\r\n\t\tassertTrue(editorPane.getLocationOnScreen().getY() < statusPane.getLocationOnScreen().getY());\r\n\t\t\r\n\t}", "@As( \"key $ is pressed on handle $\" )\n void keyPressed(int key, HandleDirections dir) {\n int mask = dir.dirMask;\n int i = dir.ordinal();\n Handle h = handles.get(i);\n Rectangle2D.Double rect = figure.getBounds();\n\n KeyEvent event1 = new KeyEvent(new Button(), 0, 0, 0, key, 'k');\n KeyEvent event2 = new KeyEvent(new Button(), 0, 0, 0, key, 'k');\n\n h.keyPressed(event1);\n Rectangle2D.Double actualBounds = figure.getBounds();\n figure.setBounds(rect);\n keyPressedHelper(event2, mask);\n Rectangle2D.Double expectedBounds = figure.getBounds();\n\n\n boundsPair = new Pair<>(actualBounds, expectedBounds);\n keyEventPair = new AbstractMap.SimpleEntry<>(event1, event2);\n }", "private void kk12() {\n\n\t}", "public void onKeyEvent(String ke) {\n if (ke.equals(\"b\")) {\n bfs = true;\n dfs = false;\n manual = false;\n reset();\n }\n else if (ke.equals(\"d\")) {\n bfs = false;\n dfs = true;\n manual = false;\n reset();\n }\n else if (ke.equals(\"p\")) {\n bfs = false;\n dfs = false;\n manual = true;\n reset();\n }\n else if (ke.equals(\"r\")) {\n boardSetup();\n }\n else if (manual) {\n if (p.hasNext()) {\n if (ke.equals(\"left\")) {\n p.moveLeft();\n }\n else if (ke.equals(\"up\")) {\n p.moveUp();\n }\n else if (ke.equals(\"right\")) {\n p.moveRight();\n }\n else if (ke.equals(\"down\")) {\n p.moveDown();\n }\n }\n }\n }", "public void hitKey() {\n }", "public void actionPerformed(ActionEvent a) {\n\n String command = a.getActionCommand();\n if (command.equals(\"e\")) {\n //Log toggle.\n if (consoleDisplayed = !consoleDisplayed) //Show\n splitter.setDividerLocation(defaultSliderPosition);\n else //Hide\n splitter.setDividerLocation(.999);\n } else if (command.equals(\"r\")) {\n //Gets the code into a string.\n String code = text.getText();\n\n //Marks certain areas as \"dirty\".\n //Dirty areas are places that shouldn't be considered for any keywords,\n //including \"import\", \"extend\", and so on.\n ArrayList<Integer> dirtyBounds = getDirty(code);\n\n //Not quite perfect all of the time.\n if (text.getText().contains(\"class\")) {\n //This is a bit more explicit\n //if(text.getText().trim().substring(0, text.getText().trim().indexOf(\"{\")).contains(\"class\")) {\n //This means we should try to compile this as normal.\n\n //Pulls out class name\n int firstPos = code.indexOf(\"class\");\n while(isDirty(dirtyBounds, firstPos)) \n firstPos = code.indexOf(\"class\", firstPos + 1);\n\n int secondPos = code.indexOf(\"{\"); //No checks here because who would possibly put a comment between \"class\" and \"{\"?\n String name = code.substring(firstPos + \"class\".length() + 1, secondPos).trim();\n\n //Just a safety check to make sure you don't try to modify this program while it's running.\n if (name.equals(\"Playground\")) {\n System.out.println(\"I know what you're doing and I don't approve. I won't even compile that.\");\n return;\n //println(\"Self-compiling. You were warned.\", warning); //Allowed users to bootstrap this program. October 26, 2014\n }\n\n compileAndRun(name, code);\n } else {\n //This means we should compile this as a playground.\n\n //TODO: Try to assign every line to a variable, and print it out if it's by itself. IE, saying \"int i = 0\" won't do anything,\n //but then just typing \"i\" or \"i;\" would print out \"0\". Add support for functions, too. So \"factorial(5)\" by itself would \n //print out \"120\" without any fluff.\n\n //TODO: Lazy typing. \"int i = 0\" should be equivilant to \"i = 0\"\n\n //TODO: Less need for casting. If \"int.toString()\" is called, modify in-place to \"(new Integer(int)).toString()\"\n //Similar for calls that need Strings but are passed primitives; \"promote\" them by prepending \"\"+ to them.\n\n //Common import statements built-in\n String importDump = new String();\n importDump+=(\"import java.util.*;\\n\" + \n \"import javax.swing.*;\\n\" + \n \"import javax.swing.event.*;\\n\" +\n \"import java.awt.*;\\n\" + \n \"import java.awt.event.*;\\n\" + \n \"import java.io.*;\\n\");\n\n //User-defined or auto-generated methods\n String methodDump = new String();\n\n //Pulls out any \"import\" statements and appends them to the import dump.\n int i = code.indexOf(\"import\");\n while(i >= 0) {\n //Ignores comments and string literals\n if (isDirty(dirtyBounds, i)) {\n i = code.indexOf(\"import\", i+1);\n continue;\n }\n\n String s = code.substring(i, code.indexOf(\";\", i) + 1); \n //System.out.println(\"Found import: \" + s);\n code = code.replaceFirst(s, \"\");\n importDump+=s+\"\\n\";\n i = code.indexOf(\"import\", i+1);\n }\n\n //Pulls out all methods\n i = code.indexOf(\"(\");\n while(i >= 0) {\n if (isDirty(dirtyBounds,i)) {\n i = code.indexOf(\"(\", i+1); continue;\n }\n\n //Move backwards first\n char temp = 0; int pos = i;\n boolean shouldSkip = false;\n while(--pos > 0) {\n temp = code.charAt(pos);\n if (temp == '.') {shouldSkip = true; break;} //This is a method call, ie String.charAt();\n if (temp == ';') {++pos; break;} //This is most likely a method declaration, since we had no errors\n //If we hit the start of the file, that's probable a method dec. too!\n }\n\n String sub = code.substring(pos, i);\n if (shouldSkip || isDirty(dirtyBounds, pos) || \n sub.contains(\"while\") || sub.contains(\"for\") || sub.contains(\"new\") || sub.contains(\"try\") || sub.contains(\"catch\")) \n {i=code.indexOf(\"(\", i+1); continue;} //If this def. isn't a method or it's in a comment\n\n int start = pos;\n temp = 0; pos = code.indexOf(\"{\", i+1);\n int count = 1; shouldSkip = false;\n if(pos != -1) {\n if (code.indexOf(\";\", i+1) > pos || code.indexOf(\";\", i+1) == -1) {\n while(++pos < code.length()) {\n if (count == 0) \n break;\n\n temp = code.charAt(pos);\n if (temp == '{') \n count++;\n if (temp == '}') \n count--;\n }\n } else {\n //If there's a semicolon between the opening paranthesis and opening curly brace, this isn't a method!\n i = code.indexOf(\"(\", i+1);\n continue;\n }\n } else {\n i = code.indexOf(\"(\", i+1);\n continue;\n }\n\n int end = pos;\n String s = code.substring(start,end);\n code = code.replace(s, \"\"); \n\n //Just to make it look nicer\n s = s.trim();\n\n //println(\"Found method: \" + s);\n\n //This makes using the method intuitive by effectively removing the need for static modifiers\n if (!s.substring(0,s.indexOf(\"(\")).contains(\"static\")) {\n s = \"static \" + s;\n //println(\"Silently adding 'static' modifier\", warning);\n }\n\n methodDump+=(s + \"\\n\");\n i = code.indexOf(\"(\", i+1);\n }\n\n //Inject the class header and main method, imports, and methods\n code = \"//User and auto-imports pre-defined\\n\"\n + importDump\n + \"//Autogenerated class\\n\"\n + \"public class Main {\\n\" \n + \"public static void main(String[] args) {\\n\"\n + code\n + \"\\n}\\n\"\n + methodDump \n + \"}\";\n\n //Run as normal\n compileAndRun(\"Main\", code);\n }\n } else if (command.equals(\"k\")) {\n kill(); \n } else if (command.equals(\"o\")) {\n of = new OptionFrame(frame);\n } else if (command.equals(\"/\")) {\n hf = new HelpFrame(frame);\n }\n }", "public static void main(String[] args) throws InterruptedException\n\t{\n\n\t\tRobot rbt;\n\t\ttry {\n\t\t\trbt = new Robot();\n\t\t\t//JavaRobotKeys jrb = new JavaRobotKeys();\n\t\t\tThread.sleep(10000);\n\t\t\t//rbt.keyPress(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_C);\n\t\t\trbt.keyRelease(KeyEvent.VK_C);\n\t\t\trbt.keyPress(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_SEMICOLON);\n\t\t\trbt.keyRelease(KeyEvent.VK_SEMICOLON);\n\t\t\trbt.keyRelease(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_BACK_SLASH);\n\t\t\trbt.keyRelease(KeyEvent.VK_BACK_SLASH);\n\t\t\t//rbt.keyRelease(KeyEvent.VK_SHIFT);\n\t\t\t//rbt.keyPress(KeyEvent.VK_SLASH);\n\t\t\t//rbt.keyPress(KeyEvent.VK_SLASH);\n\t\t\trbt.keyPress(KeyEvent.VK_K);\n\t\t\trbt.keyRelease(KeyEvent.VK_K);\n\t\t\trbt.keyPress(KeyEvent.VK_E);\n\t\t\trbt.keyRelease(KeyEvent.VK_E);\n\t\t\trbt.keyPress(KeyEvent.VK_Y);\n\t\t\trbt.keyRelease(KeyEvent.VK_Y);\n\t\t\trbt.keyPress(KeyEvent.VK_S);\n\t\t\trbt.keyRelease(KeyEvent.VK_S);\n\t\t\trbt.keyPress(KeyEvent.VK_BACK_SLASH);\n\t\t\trbt.keyRelease(KeyEvent.VK_BACK_SLASH);\n\t\t\trbt.keyPress(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_H);\n\t\t\trbt.keyRelease(KeyEvent.VK_H);\n\t\t\trbt.keyRelease(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_U);\n\t\t\trbt.keyRelease(KeyEvent.VK_U);\n\t\t\trbt.keyPress(KeyEvent.VK_R);\n\t\t\trbt.keyRelease(KeyEvent.VK_R);\n\t\t\trbt.keyPress(KeyEvent.VK_I);\n\t\t\trbt.keyRelease(KeyEvent.VK_I);\n\t\t\trbt.keyPress(KeyEvent.VK_X);\n\t\t\trbt.keyRelease(KeyEvent.VK_X);\n\t\t\trbt.keyPress(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_Q);\n\t\t\trbt.keyRelease(KeyEvent.VK_Q);\n\t\t\trbt.keyPress(KeyEvent.VK_A);\n\t\t\trbt.keyRelease(KeyEvent.VK_A);\n\t\t\trbt.keyRelease(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_0);\n\t\t\trbt.keyRelease(KeyEvent.VK_0);\n\t\t\trbt.keyPress(KeyEvent.VK_0);\n\t\t\trbt.keyRelease(KeyEvent.VK_0);\n\t\t\trbt.keyPress(KeyEvent.VK_1);\n\t\t\trbt.keyRelease(KeyEvent.VK_1);\n\t\t\trbt.keyPress(KeyEvent.VK_PERIOD);\n\t\t\trbt.keyRelease(KeyEvent.VK_PERIOD);\n\t\t\trbt.keyPress(KeyEvent.VK_P);\n\t\t\trbt.keyRelease(KeyEvent.VK_P);\n\t\t\trbt.keyPress(KeyEvent.VK_E);\n\t\t\trbt.keyRelease(KeyEvent.VK_E);\n\t\t\trbt.keyPress(KeyEvent.VK_M);\n\t\t\trbt.keyRelease(KeyEvent.VK_M);\n\t\t\trbt.keyPress(KeyEvent.VK_ENTER);\n\t\t\trbt.keyRelease(KeyEvent.VK_ENTER);\n\n\n\t\t} catch (AWTException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void key() {\n \n }", "private void level7() {\n }", "public static void main(String[] args) {\n int progressId = 1;\n Map<Integer, Set<Entity>> progressEntities = new HashMap<>();\n Set<Entity> map000entity = new HashSet<>();\n map000entity.add(new Entity(new LocationPair<>(9.5F, 12.5F), Entity.TOWARD_RIGHT, \"Cirno\") {\n int useRefresh = 10;\n int activeTime = 80;\n boolean acting = true;\n\n @Override\n public void onRegisiter() {\n this.setMovingWay(MOVING_FASTER);\n }\n\n @Override\n public void onUnRegisiter() {\n System.out.println(\"Entity was unregisitered.\");\n }\n\n @Override\n public void action() {\n if (acting) {\n if (activeTime >= 0) {\n this.setToward(Entity.TOWARD_RIGHT);\n this.setWonderMoving(Entity.GOTOWARD_RIGHT);\n } else {\n this.setToward(Entity.TOWARD_LEFT);\n this.setWonderMoving(Entity.GOTOWARD_LEFT);\n }\n }\n if (isLastMovingSucceed()) {\n if (++activeTime >= 160) {\n activeTime = -160;\n }\n }\n if (useRefresh > 0) {\n useRefresh--;\n }\n }\n\n @Override\n public void onUse() {\n if (useRefresh == 0) {\n Keyboard.setState(Keyboard.STATE_DIALOG);\n acting = false;\n int moving = this.getMoving();\n int wonderMoving = this.getWonderMoving();\n int toward = this.getToward();\n this.setMoving(Entity.NOTGO);\n this.setWonderMoving(Entity.NOTGO);\n this.facePlayer();\n System.out.println(\"Changed the state of Keyboard.\");\n Case progress = new Case(\"test.entity.prs\", 2, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n EventManager.getInstance().performedNp(this, 0);\n Resource.regisiterMisc(new Misc() {\n @Override\n public void invoke() {\n if (Resource.getMapId() == 1) {\n this.completed();\n Keyboard.setState(Keyboard.STATE_DIALOG);\n ArrayList<String> str = new ArrayList<>();\n str.add(Localization.query(\"test.misc\"));\n SimpleTalkingDialog std = new SimpleTalkingDialog(str, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n });\n std.init();\n GameFrame.getInstance().regisiterDialog(std);\n System.out.println(\"Invoked misc.\");\n }\n }\n });\n System.out.println(\"Progress ID is now 0.\");\n System.out.println(\"Changed the state of Keyboard.\");\n useRefresh = 40;\n });\n Case hello = new Case(\"test.entity.faq\", 3, () -> {\n ArrayList<String> str = new ArrayList<>();\n str.add(Localization.query(\"test.entity.hello1\"));\n str.add(Localization.query(\"test.entity.hello2\"));\n SimpleTalkingDialog std = new SimpleTalkingDialog(str, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n useRefresh = 40;\n });\n std.init();\n GameFrame.getInstance().regisiterDialog(std);\n System.out.println(\"Changed the state of Keyboard.\");\n });\n Case back = new Case(\"test.entity.buff\", 4, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n Resource.getPlayer().addBuff(new SpeedBuff(600, 1.5F));\n System.out.println(\"Changed the state of Keyboard.\");\n useRefresh = 40;\n });\n progress.setRelation(hello, null, hello);\n hello.setRelation(back, progress, back);\n back.setRelation(null, hello, null);\n progress.init();\n hello.init();\n back.init();\n List<Case> cases = new ArrayList<>();\n cases.add(progress);\n cases.add(hello);\n cases.add(back);\n ArrayList<String> strs = new ArrayList<>();\n strs.add(Localization.query(\"test.entity.title\"));\n\t\t\t\t\tTalkingDialog dialog = new TalkingDialog(strs, cases);\n\t\t\t\t\tdialog.init();\n GameFrame.getInstance().regisiterDialog(dialog);\n }\n useRefresh = 10;\n }\n });\n Set<Entity> map002entity = new HashSet<>();\n List<String> greet = new ArrayList<>();\n greet.add(\"test.entity.npc\");\n map002entity.add(new FriendlyNPC(new LocationPair<>(9.5F, 7.5F), Entity.TOWARD_DOWN, \"Sanae\", 3, greet));\n progressEntities.put(0, map000entity);\n progressEntities.put(2, map002entity);\n Map<Integer, Set<Item>> progressItems = new HashMap<>();\n boolean withDefaultProgress = true;\n //*/\n\n\n /*\n int progressId = 0;\n Map<Integer, Set<Entity>> progressEntities = new HashMap<>();\n Map<Integer, Set<Item>> progressItems = new HashMap<>();\n boolean withDefaultProgress = true;\n */\n\n\n try {\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File(\"resources/object/progress\", \"progress\" + String.format(\"%03d\", progressId) + \".prs\")));\n oos.writeObject(new Progress(progressId, progressEntities, progressItems, withDefaultProgress));\n oos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "protected abstract void pressedOKButton( );", "private void setupAssociatedBranchesAType(Map<Integer, Double> inputBranchWithJ)\r\n\t{\r\n\t\tgetOppositeParityEnergies(currentK);\r\n\t\tArrayList<Map<Integer, Double>> branches = new ArrayList<Map<Integer, Double>>();\r\n\t\tint jOffset = 0;\r\n\r\n\t\tif (IS_EVEN_SELECTION_RULES) {\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"Q\")) {\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\t\t\t\t\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -1, 1, 0, -1, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 1, -1, 1, 0, false, true);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"P-<-\", \"R-<-\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -1, 1, 0, -1, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 1, -1, 1, 0, true, false);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"P+<+\", \"R+<+\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"R\")) {\r\n\t\t\t\tjOffset = 1;\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, 1, -1, 1, 0, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 2, -1, 2, 0, true, true);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q+<-\", \"P+<+\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, 1, -1, 1, 0, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 2, -1, 2, 0, false, false);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q-<+\", \"P-<-\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"P\")) {\r\n\t\t\t\tjOffset = -1;\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, -1, 1, 0, -1, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -2, 1, 0, -2, true, true);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q+<-\", \"R+<+\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, -1, 1, 0, -1, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -2, 1, 0, -2, false, false);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q-<+\", \"R-<-\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"Q\")) {\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\t\t\t\t\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -1, 1, 0, -1, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 1, -1, 1, 0, false, true);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"P+<-\", \"R+<-\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -1, 1, 0, -1, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 1, -1, 1, 0, true, false);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"P-<+\", \"R-<+\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"R\")) {\r\n\t\t\t\tjOffset = 1;\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, 1, -1, 1, 0, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 2, -1, 2, 0, true, true);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q-<-\", \"P-<+\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, 1, -1, 1, 0, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 2, -1, 2, 0, false, false);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q+<+\", \"P+<-\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"P\")) {\r\n\t\t\t\tjOffset = -1;\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\t\t\t\t\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, -1, 1, 0, -1, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -2, 1, 0, -2, true, true);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q-<-\", \"R-<+\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, -1, 1, 0, -1, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -2, 1, 0, -2, false, false);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q+<+\", \"R+<-\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (TRANSITION_TYPE.equals(\"b-type\")) {\r\n\t\t\t//The 2 and -2 represent \"get lower energies with K +2 / -2 offset from the current K value, if it exists\"\r\n\t\t\tsetupTriangularTypes(2);\r\n\t\t\tsetupTriangularTypes(-2);\r\n\t\t}\r\n\t}", "private void KeyActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void getBranchCommand() {\n\n }", "private boolean testTraversalComponent(Component comp){\n \n if (parent == null){\n return false;\n }\n \n /* Build list of focus traversable components in the parent component\n * This is only done once, unless resetReport is called */\n if (!tabTraversalPerformed){\n getTraversableComponents(parent);\n }\n \n if (!comp.hasFocus()){\n // try{\n comp.requestFocus();\n // Hack for our Windowing system - it invokes IllegalStateException if requestFocus isn't called from AWT thread\n // }catch(IllegalStateException exc){\n // // LOG ONLY -/\n // if(debugLog) {\n // System.err.println(\"EXCEPTION \" + exc.getMessage());\n // System.err.println(\"TRY TO CALL IT FROM AWT THREAD\");\n // }\n // final Component comp_final = comp;\n // try{\n // SwingUtilities.invokeAndWait(\n // new Runnable() {\n // public void run() {\n // comp_final.requestFocus();\n // }\n // });\n // }catch(Exception ex){\n // if(debugLog) System.err.println(\"EXCEPTION \" + ex.getMessage());\n //\n // }\n // }\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - After request focus | comp=\"+comp.getClass().getName()+\" hasFocus()=\"+comp.hasFocus());\n }\n \n tabTraversalFinished = false;\n switchTabbed = false;\n \n \n /* Attach custom focus listeners */\n org.netbeans.a11y.AccessibilityTester.TraversalFocusListener listener = new org.netbeans.a11y.AccessibilityTester.TraversalFocusListener();\n \n Iterator i = traversableComponents.iterator();\n while(i.hasNext()){\n ((Component)(i.next())).addFocusListener(listener);\n }\n \n org.netbeans.a11y.AccessibilityTester.TabTraversalTimeOut timeout = new org.netbeans.a11y.AccessibilityTester.TabTraversalTimeOut();\n timeout.start();\n \n /* Tab through all components */\n try{\n Robot robot = getRobot();\n \n // - LOG ONLY\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - Robot=\"+robot.hashCode());\n Iterator it = traversableComponents.iterator();\n int ssl=0;\n while(it.hasNext()){\n ssl++;\n Component fcp = (Component)(it.next());\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - [\"+ssl+\"] \"+fcp);\n }\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - Traversable Components + end - =======\");\n } // LOG ONLY -/\n \n \n if (traversableComponents.size() > 0){\n Component lastFocused = null;\n \n while(!tabTraversalFinished){\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> TAB Last Focused component=\"+lastFocused);\n \n try{\n Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY);\n } catch(InterruptedException e){}\n \n Component focusedComponent = listener.getFocusedComponent();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> Focused component=\"+focusedComponent);\n \n Component reallyFocusedComponent = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> Really Focused component=\"+reallyFocusedComponent);\n \n if((focusedComponent instanceof JTabbedPane) && !testSettings.TT_showingOnly) {\n robot.keyPress(KeyEvent.VK_RIGHT);\n robot.keyRelease(KeyEvent.VK_RIGHT);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> VK_LEFT Focused component=\"+lastFocused);\n \n try{\n Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY);\n } catch(InterruptedException e){}\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> TAB Focused component=\"+lastFocused);\n \n switchTabbed = true;\n }else\n switchTabbed = false;\n \n if((focusedComponent==null && lastFocused==null) &&\n !( (reallyFocusedComponent instanceof JTextComponent) ||\n (reallyFocusedComponent instanceof JTabbedPane) ||\n (reallyFocusedComponent instanceof JTable)) ) {\n \n if(debugLog) System.err.println(LOG_CAPTION+\" - ERROR : It's impossible test Tab traversal. After TAB, CTRL + TAB or RIGHT hitting nothing happends.\");\n \n return false;\n }\n \n if (focusedComponent==lastFocused){\n // Component probably swallowed Tab keypress so try Ctrl-Tab\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> CONTROL_TAB Focused component=\"+focusedComponent);\n \n try{ Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY); } catch(InterruptedException e){}\n \n focusedComponent = listener.getFocusedComponent();\n \n if ((focusedComponent == lastFocused) && (!switchTabbed)){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - !!!!! LOCK !!!!! \"+focusedComponent + \"==\" + lastFocused);\n \n // Stuck or window lost focus, so give up\n break;\n }\n }\n lastFocused = focusedComponent;\n }\n }\n }catch(AWTException e){ e.printStackTrace();}\n \n timeout.cancel();\n \n /* Detach focus listeners */\n i = traversableComponents.iterator();\n while(i.hasNext()){\n ((Component)(i.next())).removeFocusListener(listener);\n }\n \n /* Set flag to show at least one tab traversal performed */\n tabTraversalPerformed = true;\n \n return true;\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void testGetButton() {\n\t\tassertEquals(this.myButton.getJComponent(),this.myButton.getButton());\n\t}", "@Test\n public void testKeyReleased() {\n System.out.println(\"keyReleased\");\n KeyEvent e = null; \n //instance.keyReleased(e);\n }", "public static void main(String[] args) {\nint score = 91;\nString grade;\nif (score >90)\n{\n\tgrade = \"A\";\n}\n\n\n\nelse if (score>=80)\n{\n\tgrade = \"B\";\n}\n//THis is to test Git\n//THis is to test Git\n//THis is to test Git2\n//This is to test the brach made by gitdemo\n//Change from GitX\nelse \n{\n\tgrade = \"C\";\n}\nSystem.out.println(grade);\n}", "@Test\n public void testKeyAction() {\n System.out.println(\"keyAction\");\n KeyEvent e = null;\n int Event = 0;\n WarPlane instance = new WarPlane();\n instance.keyAction(e, Event);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Test(timeout = 4000)\n public void test377() throws Throwable {\n Form form0 = new Form(\"\\r\");\n Checkbox checkbox0 = new Checkbox(form0, \"java.lang.String@0000000003\", \" `XrE7:\");\n // Undeclared exception!\n try { \n checkbox0.kbd();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\tint tecla=arg0.getKeyCode();\r\n\t\t\t\tswitch(tecla)\r\n\t\t\t\t{\r\n\t\t\t\tcase 10://enter\r\n\t\t\t\t\tpacman.getLaberinto().getJuego().comenzar();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 38:\r\n\t\t\t\t\tpacman.setEstrategia(new EstrategiaIrHaciaArriba(pacman));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 40:\r\n\t\t\t\t\tpacman.setEstrategia(new EstrategiaIrHaciaAbajo(pacman));\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 37:\r\n\t\t\t\t\tpacman.setEstrategia(new EstrategiaIrALaIzquierda(pacman));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 39:\r\n\t\t\t\t\tpacman.setEstrategia(new EstrategiaIrALaDerecha(pacman));\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "public abstract void keyPressed(int k);", "private void Button_SqaureRootActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_SqaureRootActionPerformed\n // TODO add your handling code here:\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n JYearChooser jYearChooser0 = new JYearChooser();\n JDayChooser jDayChooser0 = new JDayChooser(true);\n jDayChooser0.setEnabled(true);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n KeyEvent keyEvent0 = new KeyEvent(jDayChooser0, 3, (-1609L), 1359, 34, 'E');\n KeyEvent keyEvent1 = new KeyEvent(jYearChooser0, 34, 64, 3, 35, 'x');\n jDayChooser0.keyPressed(keyEvent1);\n jDayChooser0.setDay(34);\n JDayChooser.DecoratorButton jDayChooser_DecoratorButton0 = jDayChooser0.new DecoratorButton();\n Button button0 = null;\n try {\n button0 = new Button();\n fail(\"Expecting exception: HeadlessException\");\n \n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "private void BuildingCombo() {\n \n }", "@Test\r\n\tpublic final void testGetButton() {\n\t\tassertEquals(\"ON\",a.getButton());\r\n\t}", "default void interactWith(Key key) {\n\t}", "public boolean dispatchKeyEvent(KeyEvent paramKeyEvent)\n/* */ {\n/* 800 */ Component localComponent1 = paramKeyEvent.isPosted ? getFocusOwner() : paramKeyEvent.getComponent();\n/* */ \n/* 802 */ if ((localComponent1 != null) && (localComponent1.isShowing()) && (localComponent1.canBeFocusOwner()) && \n/* 803 */ (!paramKeyEvent.isConsumed())) {\n/* 804 */ Component localComponent2 = paramKeyEvent.getComponent();\n/* 805 */ if ((localComponent2 != null) && (localComponent2.isEnabled())) {\n/* 806 */ redispatchEvent(localComponent2, paramKeyEvent);\n/* */ }\n/* */ }\n/* */ \n/* 810 */ boolean bool = false;\n/* 811 */ List localList = getKeyEventPostProcessors();\n/* 812 */ if (localList != null) {\n/* 813 */ localObject = localList.iterator();\n/* 814 */ while ((!bool) && (((Iterator)localObject).hasNext()))\n/* */ {\n/* */ \n/* 817 */ bool = ((KeyEventPostProcessor)((Iterator)localObject).next()).postProcessKeyEvent(paramKeyEvent);\n/* */ }\n/* */ }\n/* 820 */ if (!bool) {\n/* 821 */ postProcessKeyEvent(paramKeyEvent);\n/* */ }\n/* */ \n/* */ \n/* 825 */ Object localObject = paramKeyEvent.getComponent();\n/* 826 */ ComponentPeer localComponentPeer = ((Component)localObject).getPeer();\n/* */ \n/* 828 */ if ((localComponentPeer == null) || ((localComponentPeer instanceof LightweightPeer)))\n/* */ {\n/* */ \n/* 831 */ Container localContainer = ((Component)localObject).getNativeContainer();\n/* 832 */ if (localContainer != null) {\n/* 833 */ localComponentPeer = localContainer.getPeer();\n/* */ }\n/* */ }\n/* 836 */ if (localComponentPeer != null) {\n/* 837 */ localComponentPeer.handleEvent(paramKeyEvent);\n/* */ }\n/* */ \n/* 840 */ return true;\n/* */ }", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\tswitch(arg0.getExtendedKeyCode()){\n\t\t\tcase KeyEvent.VK_DOWN:\n\t\t\t\tlast = new AgentAction(Maze.SOUTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_UP:\n\t\t\t\tlast = new AgentAction(Maze.NORTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_LEFT:\n\t\t\t\tlast = new AgentAction(Maze.WEST);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_RIGHT:\n\t\t\t\tlast = new AgentAction(Maze.EAST);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\t\t\n\t\t}\t\n\t\ttest.setText(Integer.toString(arg0.getExtendedKeyCode()));\n\t}", "@Test\n public void buttonOne_initiates_game_matching_shapes() {\n\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Test\n public void testKeyTyped() {\n System.out.println(\"keyTyped\");\n KeyEvent e = null; \n //instance.keyTyped(e);\n }", "@Test\n public void test0() throws Throwable {\n DrinkSellController drinkSellController0 = new DrinkSellController((Model) null, (IDrinkSellView) null);\n JSeparator jSeparator0 = new JSeparator();\n JToolTip jToolTip0 = jSeparator0.createToolTip();\n KeyEvent keyEvent0 = new KeyEvent((Component) jToolTip0, 0, 46L, 770, 1306, 'a');\n drinkSellController0.keyTyped(keyEvent0);\n assertEquals(0, keyEvent0.getID());\n }", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"/c[~rNl!Ma-\", \"kIh 4+,VlA$]12\");\n ElExpression elExpression0 = new ElExpression(\"J>w9x0K2Bs|BOY\");\n // Undeclared exception!\n try { \n submit0.eval(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n\t\t\t\tpublic void keyPressed(KeyEvent arg0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "public void clickMastercard(){\t\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Mastercard should be clicked\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\twaitforElementVisible(locator_split(\"imgMasterCard\"));\r\n\t\t\tclick(locator_split(\"imgMasterCard\"));\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Mastercard is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- imgMasterCard not clicked \"+elementProperties.getProperty(\"imgMasterCard\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgMasterCard\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "protected void okPressed() {\r\n \t\tArrayList resources= new ArrayList(10);\r\n \t\tfindCheckedResources(resources, (IContainer)fTree.getInput());\r\n \t\tif (fWorkingSet == null)\r\n \t\t\tfWorkingSet= new WorkingSet(getText().getText(), resources.toArray());\r\n \t\telse if (fWorkingSet instanceof WorkingSet) {\r\n \t\t\t// Add not accessible resources\r\n \t\t\tIResource[] oldResources= fWorkingSet.getResources();\r\n \t\t\tfor (int i= 0; i < oldResources.length; i++)\r\n \t\t\t\tif (!oldResources[i].isAccessible())\r\n \t\t\t\t\tresources.add(oldResources[i]);\r\n \r\n \t\t\t((WorkingSet)fWorkingSet).setName(getText().getText());\r\n \t\t\t((WorkingSet)fWorkingSet).setResources(resources.toArray());\r\n \t\t}\r\n \t\tsuper.okPressed();\r\n \t}", "@Test\n public void handleCompositeCommand1() {\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void key(){\n }", "@Override\n\tpublic void keyPressed(KeyEvent arg0)\n\t{\n\t\t\n\t}", "static void jump_when_carry(String passed){\n\t\tif(CS)\n\t\t\tcomplete_jump_req(passed.substring(3));\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\tif(arg0.getKeyCode()==KeyEvent.VK_SPACE) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The objective of the game is to answer as many questions as possible in a row. If you get a streak of 3 questions in a row, you win. You can press '+' to get a hint\");\n\t\t}\n\t\t//if(arg0.getKeyCode()==KeyEvent.VK_SHIFT&&currentState==QUESTION) {\n\t\t\t//needHint=true;\n\t\t//}\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent evt) {\n\t\t\n\t}", "@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tObject o = arg0.getSource();\n\t\tJButton b = null;\n\t\tString buttonText = \"\";\n\t\tString buttonID = \"\";\n\t\tif(o instanceof JButton)\n\t\t\tb = (JButton)o;\n\n\t\tif(b != null)\n\t\t{\n\t\t\tbuttonText = b.getText();\n\t\t\tswitch(buttonText)\n\t\t\t{\n\t\t\t\tcase \"4\":\n\t\t\t\t\tbuttonID = this.hkp.FOUR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"5\":\n\t\t\t\t\tbuttonID = this.hkp.FIVE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"6\":\n\t\t\t\t\tbuttonID = this.hkp.SIX;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"7\":\n\t\t\t\t\tbuttonID = this.hkp.SEVEN;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"8\":\n\t\t\t\t\tbuttonID = this.hkp.EIGHT;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"9\":\n\t\t\t\t\tbuttonID = this.hkp.NINE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tbuttonID = this.hkp.DOWN;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"+\":\n\t\t\t\t\tbuttonID = this.hkp.UP;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//lblTest.setText(buttonText);\n\t\t\tlblTest.setText(this.hkp.GetKey(buttonID));\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t}", "private void button1KeyPressed(KeyEvent e) {\n }", "@Test\r\n\t\tpublic void testCompilePuts() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tString a = \"the_best_cat = \\\"Noogie Cat\\\" \\nputs \\\"The best cat is: \\\" + the_best_cat\";\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(a);;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"putstring\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic String[] goPreviosBranch(String[] currentBranch) {\n\t\treturn null;\n\t}", "public void clickCheckoutButton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- CheckOut button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"btnCheckout\"));\r\n\t\t\tclick(locator_split(\"btnCheckout\")); \r\n\t\t\tsleep(1000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- CheckOut button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- CheckOut button is not clicked \"+elementProperties.getProperty(\"btnCheckout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnCheckout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t\tReporter.log(\"Clicked on Checkout button\");\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\r\n\t}", "private void goGuide() {\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test(timeout = 4000)\n public void test190() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"org.mvel.conversion.IntegerCH$10\");\n TextInput textInput0 = new TextInput(xmlEntityRef0, \"org.mvel.conversion.IntegerCH$10\", \"org.mvel.conversion.IntegerCH$10\");\n // Undeclared exception!\n try { \n textInput0._getTopLevelComponent(true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n JDayChooser jDayChooser0 = new JDayChooser();\n MenuElement[] menuElementArray0 = new MenuElement[1];\n MenuSelectionManager menuSelectionManager0 = MenuSelectionManager.defaultManager();\n MenuKeyEvent menuKeyEvent0 = new MenuKeyEvent(jDayChooser0, 499, 499, 38, 38, 'b', menuElementArray0, menuSelectionManager0);\n jDayChooser0.keyPressed(menuKeyEvent0);\n jDayChooser0.keyPressed(menuKeyEvent0);\n assertEquals(7, jDayChooser0.getDay());\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "private void setupKeyMaps() {\n JPanel c = (JPanel) ((JLayeredPane) ((JRootPane) this.getComponents()[0]).getComponents()[1]).getComponents()[0];\n for (Component com : c.getComponents()) {\n if (com.getClass() == JButton.class || com.getClass() == JCheckBox.class || com.getClass() == JToggleButton.class) {\n ((JComponent) com).getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"SPACE\"), \"none\");\n }\n if (com.getClass() == JTabbedPane.class) {\n for (Component com2 : ((JTabbedPane) com).getComponents()) {\n for (Component com3 : ((JPanel) com2).getComponents()) {\n if (com3.getClass() == JButton.class || com3.getClass() == JCheckBox.class || com3.getClass() == JToggleButton.class) {\n ((JComponent) com3).getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"SPACE\"), \"none\");\n }\n }\n }\n }\n }\n \n getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(\n KeyStroke.getKeyStroke(\"SPACE\"), \"spacePressed\");\n getRootPane().getActionMap().put(\"spacePressed\", new AbstractAction(){\n private static final long serialVersionUID = 1L;\n @Override\n public void actionPerformed(ActionEvent e) {\n changeButton.doClick();\n }\n });\n \n getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(\n KeyStroke.getKeyStroke(\"ESCAPE\"), \"escapePressed\");\n getRootPane().getActionMap().put(\"escapePressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n bodiesComboBox.setSelectedIndex(-1);\n }\n });\n \n sunRadioButton.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n sunRadioButton.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n sunRadioButton.setSelected(true);\n }\n });\n \n planetRadioButton.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n planetRadioButton.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n planetRadioButton.setSelected(true);\n }\n });\n \n addNewBodyButton.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n addNewBodyButton.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n addNewBodyButton.doClick();\n }\n });\n \n bodiesComboBox.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n bodiesComboBox.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n bodiesComboBox.setPopupVisible(!bodiesComboBox.isPopupVisible());\n }\n });\n \n colorComboBoxAdd.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n colorComboBoxAdd.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n colorComboBoxAdd.setPopupVisible(!colorComboBoxAdd.isPopupVisible());\n }\n });\n \n moveableCheckBoxEdit.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n moveableCheckBoxEdit.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n moveableCheckBoxEdit.setSelected(!moveableCheckBoxEdit.isSelected());\n }\n });\n \n moveableCheckBoxAdd.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n moveableCheckBoxAdd.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n moveableCheckBoxAdd.setSelected(!moveableCheckBoxAdd.isSelected());\n }\n });\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Override\r\n public void keyPressed(KeyEvent ke) {\n }", "@Override\r\n\tpublic void keyPressed(java.awt.event.KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\n \t\t\tpublic void keyReleased(KeyEvent arg0) {\n \t\t\t\t\n \t\t\t}", "public void keyPressed(KeyEvent event)\n\t{\n int keyCode = event.getKeyCode();\n \n int arrowUp = 38;\n int arrowDown = 40;\n \n int oldIndex = indexOfCurrentSelectedComponent;\n if (keyCode == arrowDown)\n {\n indexOfCurrentSelectedComponent++;\n }\n if (keyCode == arrowUp)\n {\n indexOfCurrentSelectedComponent--;\n }\n \n while (oldIndex != indexOfCurrentSelectedComponent)\n {\n if (indexOfCurrentSelectedComponent > components.size() - 1)\n {\n indexOfCurrentSelectedComponent = 0;\n }\n else if (indexOfCurrentSelectedComponent < 0)\n {\n indexOfCurrentSelectedComponent = components.size() - 1;\n }\n \n GlComponent component = components.get(indexOfCurrentSelectedComponent);\n if (component instanceof GlButton)\n {\n ((GlButton) component).setSelected(true);\n break;\n } \n else if (keyCode == arrowDown)\n {\n indexOfCurrentSelectedComponent++;\n } \n else if (keyCode == arrowUp)\n {\n indexOfCurrentSelectedComponent--;\n }\n \n }\n \n if (oldIndex != -1 && components.get(oldIndex) instanceof GlButton)\n {\n ((GlButton) components.get(oldIndex)).setSelected(false);\n }\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Test\n public void test3() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n boolean boolean0 = defaultMenuItem0.isLeaf();\n assertEquals(true, boolean0);\n }", "@Test\n public void whenTryExecuteAdditionShouldCheckThatIsWorkCorrect() {\n String[] answer = new String[]{\"1.0\", \"y\"};\n StubIO stubIO = new StubIO(answer);\n MenuCalculator menuCalculator = new MenuCalculator(new Calculator(), stubIO, actions);\n menuCalculator.fillActions();\n String expected = \"0.0 + 1.0 = 1.0\\n\";\n final int command = 0;\n\n menuCalculator.select(command);\n\n assertThat(stubIO.getOut(), is(expected));\n }", "@Override\n\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\n\t\t}", "public static void main (String[] args) {\n testchackAp();\n\n // Движение ctrl + shift вниз\n }", "public void clickSubmitInkAndTonnerSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "String branch();", "public abstract void bepaalGrootte();", "public void Goto() {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\n\t\t\t\t\t\t}" ]
[ "0.57729393", "0.5738192", "0.54289013", "0.5408749", "0.53356606", "0.5288901", "0.52886367", "0.52801293", "0.5230821", "0.5221939", "0.5204348", "0.5192142", "0.51906425", "0.5156684", "0.5151292", "0.51495725", "0.5145872", "0.5141918", "0.512957", "0.5127194", "0.5110326", "0.51097625", "0.5106169", "0.51033425", "0.5090681", "0.5074953", "0.5072434", "0.5068217", "0.50468844", "0.5039209", "0.502732", "0.5025752", "0.50073516", "0.50013083", "0.49880514", "0.49815977", "0.4972908", "0.49665472", "0.49645522", "0.49619374", "0.49617875", "0.4960974", "0.49609235", "0.49604592", "0.495681", "0.49554163", "0.49511948", "0.4943908", "0.49396974", "0.49391928", "0.4935407", "0.49290675", "0.49290675", "0.49290675", "0.49290675", "0.49246982", "0.49226156", "0.49204728", "0.49202096", "0.49161226", "0.49157062", "0.4912569", "0.4912114", "0.49116522", "0.49112374", "0.49106386", "0.4906997", "0.48859137", "0.48852843", "0.48791414", "0.4871778", "0.48713836", "0.48580027", "0.48573864", "0.48570687", "0.48568553", "0.4849729", "0.4849729", "0.4849729", "0.4849729", "0.48422796", "0.48397875", "0.48320943", "0.4829866", "0.48286554", "0.48263112", "0.48242265", "0.48242265", "0.48242265", "0.48242265", "0.48242265", "0.4820969", "0.48167855", "0.48152938", "0.481505", "0.48120373", "0.48100033", "0.48074365", "0.48068076", "0.48043096" ]
0.58948153
0
Test case number: 8 / 1 covered goal: Goal 1. wheel.components.Component.colgroup()Lwheel/components/Component;: rootBranch
@Test public void test008() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); // Undeclared exception! try { Component component0 = errorPage0.colgroup(); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Colgroup component can be added only to a Table. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test309() throws Throwable {\n Select select0 = new Select((Component) null, \"b^o1IoN.19~.aqo/\", \"'.\", \"'.\", (ISelectModel) null, true);\n // Undeclared exception!\n try { \n select0.colgroup();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Colgroup component can be added only to a Table.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n // Undeclared exception!\n try { \n checkbox0.multiSelect(\"fieldset\", stringSelectModel0, \"Col component can be added only to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "@Test\n public void test095() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.del((Object) errorPage0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n \n ErrorPage errorPage1 = (ErrorPage)errorPage0.remove((Component) label0);\n TableBlock tableBlock0 = new TableBlock(errorPage1);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try {\n Component component0 = any0.dfn();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test6() {\n //$NON-NLS-1$\n deployBundles(\"test6\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Test\n public void testGetFinalCol() {\n setUp();\n assertEquals(1, move.getFinalCol());\n tearDown();\n }", "protected void checkComponentList()\n {\n String lsLeft ;\n String lsDocComp ;\n int liDotIdx ;\n int liNumComps ;\n Hashtable loCompHash = new Hashtable( 5 ) ;\n\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n lsLeft = getData( \"AND_COND_LHS_\" + liCtr ).getString() ;\n if ( lsLeft != null )\n {\n liDotIdx = lsLeft.indexOf( '.' ) ;\n if ( liDotIdx >= 0 )\n {\n lsDocComp = lsLeft.substring( 0, liDotIdx ) ;\n } /* end if ( liDotIdx >= 0 ) */\n else\n {\n lsDocComp = lsLeft ;\n } /* end else */\n loCompHash.put( lsDocComp, lsDocComp ) ;\n } /* end if ( lsLeft != null ) */\n } /* end for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ ) */\n\n liNumComps = loCompHash.size() ;\n if ( liNumComps > 2 )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( liNumComps > 2 ) */\n else if ( liNumComps == 2 )\n {\n Enumeration leComps = loCompHash.elements() ;\n String lsComp1 = (String)leComps.nextElement() ;\n String lsComp2 = (String)leComps.nextElement() ;\n\n if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) &&\n ( !lsComp2.endsWith( \"_DOC_HDR\" ) ) )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) && . . . */\n } /* end else if ( liNumComps == 2 ) */\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void level6() {\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSortedChangeProperties() {\n\t\t// initialize one address book containing 4 entries\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"B\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"C\");\n\t\tRapidBean person3 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson3.setPropValue(\"lastname\", \"D\");\n\t\tRapidBean person4 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson4.setPropValue(\"lastname\", \"E\");\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person4);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person3);\n\t\tAssert.assertEquals(4,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\n\t\t// change one single property and check correct sorting\n\t\tperson2.setPropValue(\"lastname\", \"X\");\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\n\t\t// remove the links agains\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person3);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person4);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t}", "@Test\n public void testTRK1HasSubComponents() {\n assertThat( hasSubComponents( TRK1_WITH_SUB_COMP ), is( true ) );\n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test114() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"*f\");\n TableBlock tableBlock0 = table0.thead();\n Any any0 = tableBlock0.col();\n String[] stringArray0 = new String[8];\n // Undeclared exception!\n try {\n Component component0 = any0.area(stringArray0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test3() {\n //$NON-NLS-1$\n deployBundles(\"test3\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tvoid test4AddComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tvc.addComponent(comp3);\n\t\tassertEquals(comp3.hashCode(), vc.getComponentsList().get(vc.getComponentsList().size() - 1).hashCode());\n\t}", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void ClickClearAllSelection(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Clear All Selection Button should be clicked\");\r\n\t\ttry{ \r\n\t\t\tclick(locator_split(\"btnClearAllSelections\")); \r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Clear All Selection Button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Clear All Selection Button is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnClearAllSelections\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"tt\", \"Can't add components to a component that is not an instance of IContainer.\");\n // Undeclared exception!\n try { \n checkbox0.dfn();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testACFTHasSubComponents() {\n assertThat( hasSubComponents( ACFT ), is( true ) );\n }", "@Test\n public void testGroupComparator() throws Exception {\n assertEquals(-1, runGroupComparator(\"LembosGroupComparatorTest-testGroupComparator\", 1, 3));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"cannot bind to collection property: \", \"\");\n // Undeclared exception!\n try { \n checkbox0.q();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void testProjectsView() {\n ProjectsTabOperator.invoke();\n // needed for slower machines\n JemmyProperties.setCurrentTimeout(\"JTreeOperator.WaitNextNodeTimeout\", 30000); // NOI18N\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME);\n Node sampleClass1Node = new Node(sample1Node, SAMPLE1_FILE_NAME);\n // test pop-up menu actions\n // \"Copy\"\n CopyAction copyAction = new CopyAction();\n copyAction.perform(sampleClass1Node);\n // \"Paste\"\n PasteAction pasteAction = new PasteAction();\n // \"Refactor\"\n String refactorItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_Action\");\n // \"Copy...\"\n String copyItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_CopyAction\");\n new ActionNoBlock(null, pasteAction.getPopupPath() + \"|\" + refactorItem + \" \" + copyItem).perform(sample1Node);\n\n String copyClassTitle = Bundle.getString(\"org.netbeans.modules.refactoring.java.ui.Bundle\", \"LBL_CopyClass\");\n NbDialogOperator copyClassDialog = new NbDialogOperator(copyClassTitle);\n // \"Refactor\"\n String refactorLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"CTL_Finish\");\n new JButtonOperator(copyClassDialog, refactorLabel).push();\n // refactoring is done asynchronously => need to wait until dialog dismisses\n copyClassDialog.waitClosed();\n\n Node newClassNode = new Node(sample1Node, \"SampleClass11\"); // NOI18N\n // \"Cut\"\n CutAction cutAction = new CutAction();\n cutAction.perform(newClassNode);\n // package created by default when the sample project was created\n Node sampleProjectPackage = new Node(sourcePackagesNode, SAMPLE_PROJECT_NAME.toLowerCase());\n // \"Move...\"\n String moveItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_MoveAction\");\n new ActionNoBlock(null, pasteAction.getPopupPath() + \"|\" + refactorItem + \" \" + moveItem).perform(sampleProjectPackage);\n new EventTool().waitNoEvent(1000);\n // confirm refactoring\n // \"Move Class\"\n String moveClassTitle = Bundle.getString(\"org.netbeans.modules.refactoring.java.ui.Bundle\", \"LBL_MoveClass\");\n NbDialogOperator moveClassDialog = new NbDialogOperator(moveClassTitle);\n new JButtonOperator(moveClassDialog, refactorLabel).push();\n // refactoring is done asynchronously => need to wait until dialog dismisses\n try {\n moveClassDialog.waitClosed();\n } catch (TimeoutExpiredException e) {\n // try it once more\n moveClassDialog = new NbDialogOperator(moveClassTitle);\n new JButtonOperator(moveClassDialog, refactorLabel).push();\n }\n // \"Delete\"\n newClassNode = new Node(sampleProjectPackage, \"SampleClass11\"); // NOI18N\n new EventTool().waitNoEvent(2000);\n new DeleteAction().perform(newClassNode);\n DeleteAction.confirmDeletion();\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n StandaloneComponent standaloneComponent0 = dynamicSelectModel0.getTopLevelComponent();\n assertNull(standaloneComponent0);\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "@Override\n\tpublic void operation() {\n\t\tSystem.out.println(this.getClass().getSimpleName() + \" Ich bin ein Composite. Hier folgen meine Kinder:\");\n\t\tfor (Component children : _childComponents) {\n\t\t\t// Rekursiver Aufruf in den Leafs\n\t\t\tchildren.operation();\n\t\t}\n\n\t}", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void level7() {\n }", "@Test\n\tpublic void verifyCombosOnBoard() {\n\t\tBoard board = boardFactory.fromTextGenerateBoard(\"/boards/1LineOf3.txt\", mockGroup);\n\t\tassertFalse(board.outOfMoves());\n\n\t}", "@Test\n @NavigateTo(\"/group/dp/common-components\")\n public void testListingComponents() {\n // #action: Navigate to the common-components landing page.\n // #expects: There is at least one component listed.\n assertThat(driver.findElements(By.cssSelector(\".categories li\")).size()).isGreaterThan(0);\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testASSY2HasSubComponents() {\n assertThat( hasSubComponents( ASSY2_WITH_SUB_COMP ), is( true ) );\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void testLabelForSet(Component comp) {\n if (testSettings.AP_labelForSet && (comp instanceof JLabel)){\n // H1- hack for JLabels labels.add(comp);\n Component labelFor = ((JLabel)comp).getLabelFor();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testLabelForSet()> - labelFor=\"+labelFor);\n \n if (labelFor == null){\n noLabelFor.add(comp);\n }\n }\n \n if (testSettings.AP_noLabelFor) {\n if ((testSettings.AP_nlf_text && (comp instanceof JTextComponent)) ||\n (testSettings.AP_nlf_table && (comp instanceof JTable)) ||\n (testSettings.AP_nlf_list && (comp instanceof JList)) ||\n (testSettings.AP_nlf_tree && (comp instanceof JTree)) ||\n (testSettings.AP_nlf_tabbedPane && (comp instanceof JTabbedPane))){\n labelForPointingComponents.add(comp);\n }\n }\n \n }", "@Test\n public void buildNotDome() {\n nextWorkerCell.setLevel(1);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n }", "@Test\n public void test5() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getContained();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSorted() {\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"A\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"B\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\n\t\t// add person 2 before person 1\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// reset persons and add person 1 before person 2\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).setValue(null);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// remove the links again\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\t}", "private void BuildingCombo() {\n \n }", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "@Override\n public void testOneRequiredGroup() {\n }", "@Override\n public void testOneRequiredGroup() {\n }", "private void testGetCaseFolder(){\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n NodeRef caseFolder = getCaseFolder();\n assertNotNull(caseFolder);\n LOG.debug(\"Got case Folder NodeRef: \" + caseFolder);\n }", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test113() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.acronym((Object) \"Col component can e added onlG to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n public void handleCompositeCommand1() {\n }", "@Test\n\tpublic void testTargetsIntoRoomShortcut() \n\t{\n\t\tboard.calcTargets(9, 18, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(6, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(9, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(11, 18)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 18)));\n\t}", "@Test\n public void testIndexWithMiltiComponentItem() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/C.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"C.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement gElem = sm.findByNameAndType(\"C000\", GlobalElement.class);\n assertNotNull(gElem);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n GlobalComplexType gType = sm.findByNameAndType(\"C000\", GlobalComplexType.class);\n assertNotNull(gType);\n //\n GlobalAttribute gAttr = sm.findByNameAndType(\"C000\", GlobalAttribute.class);\n assertNotNull(gAttr);\n //\n GlobalAttributeGroup gAttrGroup =\n sm.findByNameAndType(\"C000\", GlobalAttributeGroup.class);\n assertNotNull(gAttrGroup);\n //\n GlobalGroup gGroup = sm.findByNameAndType(\"C000\", GlobalGroup.class);\n assertNotNull(gGroup);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexWithMiltiComponentItem \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "@Test\n\tpublic void testRoomExit()\n\t{\n\t\t// Take one step, essentially just the adj list\n\t\tboard.calcTargets(18, 21, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\t// Ensure doesn't exit through the wall\n\t\tassertEquals(1, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 21)));\n\t\t// Take two steps\n\t\tboard.calcTargets(18, 21, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 20)));\n\t}", "@Test\n public void buildDomeTrue() {\n nextWorkerCell.setLevel(3);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(4, nextWorkerCell.getLevel());\n assertTrue(nextWorkerCell.getIsOccupied());\n }", "public void test13() {\n //$NON-NLS-1$\n deployBundles(\"test13\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "@Test\n public void testDslServerAllPRAllowedBranchesActionsPipeline() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslServerAllPRAllowedBranchesActionsPipeline.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n WorkflowJob createdJob = (WorkflowJob) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n PipelineTriggersJobProperty pipelineTriggers = (PipelineTriggersJobProperty) createdJob.getProperty(PipelineTriggersJobProperty.class);\n Map<TriggerDescriptor, Trigger<?>> triggers = pipelineTriggers.getTriggersMap();\n /* Only one 'triggers{}' closure */\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n /* Six different triggers expected */\n assertEquals(6, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(1).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n\n tmpNname = tmp2.getTriggers().get(2).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n\n tmpNname = tmp2.getTriggers().get(3).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(4).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(5).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n }\n assertEquals(6, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestServerCreatedActionFilter\");\n assertEquals(dispNames.get(1), \"BitBucketPPRPullRequestServerUpdatedActionFilter\");\n assertEquals(dispNames.get(2), \"BitBucketPPRPullRequestServerSourceUpdatedActionFilter\");\n assertEquals(dispNames.get(3), \"BitBucketPPRPullRequestServerApprovedActionFilter\");\n assertEquals(dispNames.get(4), \"BitBucketPPRPullRequestServerMergedActionFilter\");\n assertEquals(dispNames.get(5), \"BitBucketPPRPullRequestServerDeclinedActionFilter\");\n }", "@Test\n\tpublic void testAddLinkOkComponentViaSet() {\n\t\tSubmenu root = new Submenu(\"root\");\n\t\tAssert.assertNull(root.getParentBean());\n\t\tAssert.assertEquals(\"root\", root.getName());\n\t\tAssert.assertNull(root.getMenuentrys());\n\n\t\tMenuItem item1 = new MenuItem(\"item1\");\n\t\tAssert.assertNull(item1.getParentBean());\n\t\tCollection<MenuEntry> col = new ArrayList<MenuEntry>();\n\t\tcol.add(item1);\n\t\troot.setMenuentrys(col);\n\n\t\tAssert.assertEquals(1, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, root.getMenuentrys().iterator().next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\n\t\tSubmenu submenu1 = new Submenu(\"submenu1\");\n\t\tcol = new ArrayList<MenuEntry>();\n\t\tcol.add(item1);\n\t\tcol.add(submenu1);\n\t\tAssert.assertNull(submenu1.getParentBean());\n\t\troot.setMenuentrys(col);\n\n\t\tIterator<?> iter = root.getMenuentrys().iterator();\n\t\tAssert.assertEquals(2, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, iter.next());\n\t\tAssert.assertSame(submenu1, iter.next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\t\tAssert.assertSame(root, submenu1.getParentBean());\n\t}", "@Test(priority=99, enabled = true)\n\t public void PhysicalLocationDropDown_ComponentGroups() throws IOException, InterruptedException {\n\t\t Thread.sleep(5000); \n\t\t // select the Properties set\t\n\t\t clickByXpath(\"//*[@id='content-wizard']/grouping-wizard/div/table/tbody/tr[1]/td[3]/div[1]/property-choice/div/div/a/div/b\");\n\t\t Thread.sleep(3000);\n\t\t \n\t\t //select the option\t \n\t\t clickByXpath(\"//*[@id='content-wizard']/grouping-wizard/div/table/tbody/tr[1]/td[3]/div[1]/property-choice/div/div/div/ul/li[2]\"); \n\t Thread.sleep(8000);\n\t \n\t // Click on Discard button\n\t clickByXpath(\"html/body/div[4]/div/div/div[2]/div/div/form/div[2]/a\");\n\t\t Thread.sleep(3000); \n\t \n\t\t //TestLink 440 - Testcase 5\n\t\t Thread.sleep(8000); \n\t\t// select the Properties set\t\n\t\t clickByXpath(\"//*[@id='content-wizard']/grouping-wizard/div/table/tbody/tr[1]/td[3]/div[1]/property-choice/div/div/a/div/b\");\n\t\t Thread.sleep(3000);\n\t\t \n\t\t //select the option\t \n\t\t clickByXpath(\"//*[@id='content-wizard']/grouping-wizard/div/table/tbody/tr[1]/td[3]/div[1]/property-choice/div/div/div/ul/li[2]\"); \n\t Thread.sleep(8000);\n\t \t\t \n\t //TestLink 434 - Testcase 2\n\t //Enter Abbreviation\n\t\t sendvaluebyxpath(\"html/body/div[4]/div/div/div[2]/div/div/form/div[1]/div/div/div/div/div[1]/div/input\", \"Edits\"); \n\t\t Thread.sleep(8000);\n\t\t \n\t\t //Enter Location\n\t\t sendvaluebyxpath(\"html/body/div[4]/div/div/div[2]/div/div/form/div[1]/div/div/div/div/div[2]/div/input\", \"Auto Locat\"); \n\t\t Thread.sleep(8000);\n\t\t \n\t\t // Click on Save button\n\t\t clickByXpath(\"//*[@id='submit-button']\");\n\t\t Thread.sleep(3000); \t \n\t\t \t\t \n\t }", "@Test\r\n\tpublic void testTargetsFourSteps() {\r\n\t\tboard.calcTargets(24, 0, 4);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 1)));\r\n\t\t\r\n\t\tboard.calcTargets(0, 20, 4);\r\n\t\ttargets = board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(1, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(2, 20)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(3, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\r\n\t\t\r\n\t\t// Includes a path that doesn't have enough length plus one door\r\n\t\tboard.calcTargets(9, 0, 4);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\t\r\n\t}", "@Test\r\n\tpublic void testTargetsIntoRoomShortcut() \r\n\t{\r\n\t\tboard.calcTargets(11, 24, 3);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\t//up and then left\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 22)));\r\n\t\t//up left down\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 23)));\r\n\t\t//left up right\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 24)));\r\n\t\t//left only\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 21)));\r\n\t\t// into the rooms\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 23)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 22)));\t\t\t\r\n\t}", "@Test\n\t\t\tpublic void testRoomExit()\n\t\t\t{\n\t\t\t\t// One step from room\n\t\t\t\tboard.calcTargets(13, 14, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 14)));\n\n\t\t\t\t// Take two steps\n\t\t\t\tboard.calcTargets(13, 14, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(11, 14)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 13)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 15)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Test\r\n\tpublic void testRoomExit()\r\n\t{\r\n\t\t// Take one step, essentially just the adj list\r\n\t\tboard.calcTargets(8, 2, 1);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\t// Ensure doesn't exit through the wall\r\n\t\tassertEquals(1, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\t// Take two steps\r\n\t\tboard.calcTargets(8, 2, 2);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(3, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 1)));\r\n\t}", "@Test \r\n\tpublic void testTargetsIntoRoom()\r\n\t{\r\n\t\t// One room is exactly 2 away\r\n\t\tboard.calcTargets(19, 8, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\t// directly left (can't go right 2 steps)\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 6)));\r\n\t\t// directly up and down\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 8)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 8)));\r\n\t\t// one up/down, one left/right\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 7)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 7)));\r\n\t}", "public UpdateandRemoveBranch() {\n initComponents();\n }", "protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }" ]
[ "0.5953806", "0.587541", "0.54870915", "0.5475021", "0.5472897", "0.5390604", "0.5379386", "0.53423965", "0.53226", "0.528588", "0.52841187", "0.527269", "0.52261686", "0.52088094", "0.5199626", "0.5172129", "0.5160771", "0.5151446", "0.5142429", "0.513587", "0.51334894", "0.51061124", "0.5096614", "0.5092024", "0.50897527", "0.50815177", "0.50749344", "0.5069709", "0.5066635", "0.505981", "0.50481343", "0.50481343", "0.5047251", "0.50437963", "0.5041607", "0.5039079", "0.5032167", "0.5021662", "0.5017767", "0.500966", "0.50092244", "0.50010014", "0.49873742", "0.49822605", "0.49807432", "0.49742466", "0.49682388", "0.4956535", "0.49527487", "0.49328429", "0.49272668", "0.49155656", "0.49132374", "0.49119127", "0.49110562", "0.4910371", "0.4907489", "0.4900917", "0.48893905", "0.48876548", "0.48845053", "0.48827323", "0.48776513", "0.48760402", "0.48688814", "0.48650998", "0.4864817", "0.4861328", "0.48580283", "0.4838181", "0.48292497", "0.482812", "0.4817789", "0.4817763", "0.4816636", "0.4816636", "0.48139825", "0.48108715", "0.4808888", "0.48045805", "0.48002988", "0.47993514", "0.47993153", "0.47983006", "0.47961167", "0.47942415", "0.47928366", "0.47925484", "0.47922435", "0.4791437", "0.4790839", "0.47838116", "0.4783565", "0.47703704", "0.47631395", "0.47628495", "0.4761903", "0.47607633", "0.47595143", "0.47585344" ]
0.5127293
21
Test case number: 9 / 1 covered goal: Goal 1. wheel.components.Component.numberInput(Ljava/lang/String;Ljava/lang/CharSequence;)Lwheel/components/FormElement;: rootBranch
@Test public void test009() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); // Undeclared exception! try { FormElement formElement0 = errorPage0.numberInput("2CVo`z1", (CharSequence) "2CVo`z1"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Form elements can be created only by compoents that are attached to a form component. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test110() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n List<RenderableComponent> list0 = errorPage0._getRenderableChildren();\n NumberInput numberInput0 = new NumberInput(errorPage0, \"$.{\", \"$.{\", \"$.{\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.h1();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n public void test098() throws Throwable {\n NumberInput numberInput0 = new NumberInput((Component) null, \"\", \"m\", \"m\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.param((CharSequence) \"m\", (CharSequence) \"\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test096() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ErrorPage errorPage1 = (ErrorPage)errorPage0.clasS((CharSequence) \"`ymkk& +k:vlY+SnG\");\n Block block0 = (Block)errorPage0.samp();\n NumberInput numberInput0 = new NumberInput(errorPage0, \"`ymkk& +k:vlY+SnG\", \"`ymkk& +k:vlY+SnG\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.meta();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.numberInput(\"3X{L(\", (CharSequence) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test338() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.numberInput(\"iW5kQK2`y/GM^W\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test\n public void MyTest() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n System.out.println(\"Expected Result is : \" + expectedResult);\n }", "@Test\n public void testGetNumberCheckedOut() {\n }", "@Test\n public void testDigits() {\n final String result = calc.type(\"1 + 2 - 3\")\n .press_equalBtn()\n .result();\n\n Assert.assertEquals(result, \"0\");\n }", "@Test\n public void shouldAbleToInputNumericCharactersInTradeInValueField() {\n\n//1. Enter 1 in the Trade-In Value field\n//2. Enter 12 in the Trade-In Value field\n//3. Enter 123 in the Trade-In Value field\n//4. Enter 1234 in the Trade-In Value field\n//5. Enter 12345 in the Trade-In Value field\n//6. Enter 123456 in the Trade-In Value field\n//7. Enter 1234567 in the Trade-In Value field\n//6. Enter 12345678 in the Trade-In Value field\n//6. Enter 12345678 in the Trade-In Value field\n\n }", "@Test\n public void shouldAbleToInputNumericCharactersInAmountOwedOnTradeField() {\n\n//1. Enter 1 in the Amount Owed on Trade field\n//2. Enter 12 in the Amount Owed on Trade field\n//3. Enter 123 in the Amount Owed on Trade field\n//4. Enter 1234 in the Amount Owed on Trade field\n//5. Enter 12345 in the Amount Owed on Trade field\n//6. Enter 123456 in the Amount Owed on Trade field\n//7. Enter 1234567 in the Amount Owed on Trade field\n//6. Enter 12345678 in the Amount Owed on Trade field\n//6. Enter 12345678 in the Amount Owed on Trade field\n\n }", "@Test\n public void testShouldString123WhenInputIsInteger123() {\n int given = 123;\n\n // When: Call numberToString method\n String actual = Kata.numberToString(given);\n\n // Then:\n assertEquals(\"123\", actual);\n }", "@Test(timeout = 4000)\n public void test204() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"x0\");\n NumberInput numberInput0 = new NumberInput(xmlEntityRef0, \"q\", \"q\");\n Component component0 = numberInput0.getParent();\n assertEquals(\"x0\", component0.getComponentId());\n }", "protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }", "@Test\n public void testFactorialValid()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"7\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"5040\"));\n //NKD: Would prefer for this to be calculated by some function, rather than a magic number\n //However, java.lang.Math doesn't have fibonacci or factorial functions AFAIK\n }", "@Test\n public void test071() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n NumberInput numberInput0 = new NumberInput(submit0, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.tt();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test019() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try {\n FormElement formElement0 = errorPage0.numberInput(\"$.{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "@Test(dependsOnMethods = {\"shouldBeAbleToClick72Months\"})\n public void shouldBeAbleToInputNumericCharactersInInterestRateField() {\n //1. Enter 6 in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"6\");\n //2. Enter 11 in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"11\");\n }", "@Test\n public void testFactorialInvalidInteger()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"0\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n }", "@Test\r\n\tpublic void testInput1() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"1299.99\"), 3, \"food\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"1591.58\"));\r\n\t}", "@Test\n public void testFactorialInvalidNonInteger()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"hello\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "@Test\n\tpublic void testInputWithMoreNumbers() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\tsb.append(i);\n\t\t\tif (i <100) {\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\tassertEquals(\"Many numbers in input string\", 5050L, calculator.calculeteSum(sb.toString()).longValue());\n\t}", "@Test(dependsOnMethods = {\"shouldNotBeAbleToInputSpecialCharactersInPriceField\"})\n public void shouldAbleToInputNumericCharactersInDownPaymentField() {\n //1. Enter 1 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1\");\n //2. Enter 12 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12\");\n //3. Enter 123 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"123\");\n //4. Enter 1234 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1234\");\n //5. Enter 12345 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12345\");\n //6. Enter 123456 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"123456\");\n //7. Enter 1234567 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1234567\");\n //6. Enter 12345678 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12345678\");\n\n }", "@Test(timeout = 4000)\n public void test190() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"org.mvel.conversion.IntegerCH$10\");\n TextInput textInput0 = new TextInput(xmlEntityRef0, \"org.mvel.conversion.IntegerCH$10\", \"org.mvel.conversion.IntegerCH$10\");\n // Undeclared exception!\n try { \n textInput0._getTopLevelComponent(true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }", "public static void main(String[] args) {\n\t\t TextInput input = new NumericInput();\n\t\t input.add('1');\n\t\t input.add('a');\n\t\t input.add('0');\n\t\t System.out.println(input.getValue());\n\n}", "@Test\r\n\tpublic void testInput2() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"5432.00\"), 1, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"6199.81\"));\r\n\t}", "@Test(dependsOnMethods = {\"shouldNotBeAbleToInputSpecialCharactersInInterestRateField\"})\n public void shouldAbleToInputNumericCharactersInPriceField() {\n //1. Enter 1 in the Price field\n calculatePaymentPage.setPriceInput(\"1\");\n //2. Enter 12 in the Price field\n calculatePaymentPage.setPriceInput(\"12\");\n //3. Enter 123 in the Price field\n calculatePaymentPage.setPriceInput(\"123\");\n //4. Enter 1234 in the Price field\n calculatePaymentPage.setPriceInput(\"1234\");\n //5. Enter 12345 in the Price field\n calculatePaymentPage.setPriceInput(\"12345\");\n //6. Enter 123456 in the Price field\n calculatePaymentPage.setPriceInput(\"123456\");\n //7. Enter 1234567 in the Price field\n calculatePaymentPage.setPriceInput(\"1234567\");\n //6. Enter 12345678 in the Price field\n calculatePaymentPage.setPriceInput(\"12345678\");\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void testShouldStringMinus123WhenInputIsIntegerMinus123() {\n int given = -123;\n\n // When: Call numberToString method\n String actual = Kata.numberToString(given);\n\n // Then:\n assertEquals(\"-123\", actual);\n }", "@Test\n public void test() {\n Assert.assertEquals(0.83648556F, Problem232.solve(/* change signature to provide required inputs */));\n }", "@Test\r\n\tpublic void testInput3() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"12456.95\"), 4, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"13707.63\"));\r\n\t}", "@Test\n public void testFibonacciInvalidInteger()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"0\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "@Test\n public void integral_isCorrect() {\n }", "@Test(timeout = 4000)\n public void test294() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.numberInput(\"org.apache.commons.io.filefilter.WildcardFilter\", (CharSequence) \"org.apache.commons.io.filefilter.WildcardFilter\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void EnterQuantityandAdditem(String itemnumber, String quantity){\r\n\t\tString ItemNumber = getValue(itemnumber);\r\n\t\tString Quantity = getValue(quantity);\r\n\t\tint ItemNumberint = Integer.parseInt(ItemNumber);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+ \"Click \" + ItemNumberint + \" Compare check box\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Quantity should be entered and item should be added\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtSearchQuantity\"));\r\n\t\t\tList<WebElement> ele1 = listofelements(locator_split(\"txtSearchAddtoCart\"));\r\n\t\t\tSystem.out.println(\"Total no of elements for Quantity \"+ ele.size());\r\n\t\t\tSystem.out.println(\"Total no of elements for Add to Cart buttons \"+ ele1.size());\r\n\t\t\tfor(int i=0; i<ItemNumberint+1; i++){\r\n\t\t\t\tif(ItemNumberint==i+1 && i==0){\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(ItemNumberint==i+1 && i==1){\r\n\t\t\t\t\tele.get(i+2).click();\r\n\t\t\t\t\tele.get(i-1).click();\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(ItemNumberint==i+1 && i>1){\r\n\t\t\t\t\tele.get(i+1).click();\r\n\t\t\t\t\tele.get(i-1).click();\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Itemsnumber/Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSearchQuantity\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSearchAddtoCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Both the Quantity elements and Add to Cart items are not equal\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test363() throws Throwable {\n Form form0 = new Form(\"\");\n Hidden hidden0 = new Hidden(form0, \"\", \"http://xmlpull.org/v1/doc/properties.html#serializer-indentation\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"m\", \"|vX5SVqPGwc\\\"A\");\n FileInput fileInput0 = new FileInput(checkbox0, \"t^1NqOG<Le$*VZ|gi\", \"|vX5SVqPGwc\\\"A\");\n NumberInput numberInput0 = new NumberInput(fileInput0, (String) null, \"uYP|23O>D{38I\", (CharSequence) null);\n // Undeclared exception!\n try { \n numberInput0.small();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void testFibonacciInvalidNonInteger()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"hello\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.numberInput(\"c0vJ@0?9*iT5S>\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public static void main(String[] args){\n int number = scn.nextInt();\n \n \n int a = num(number);\n System.out.println(a);\n \n \n }", "protected abstract int isValidInput();", "@Test\n public void test() {\n Assert.assertEquals(3L, Problem162.solve(/* change signature to provide required inputs */));\n }", "@Test\n\tpublic void test_doubleANumber() {\n\t\t\n\t}", "@Test\r\n public void testDigit() {\r\n System.out.println(\"Testing digits\");\r\n \r\n // Declare a sample test digit.\r\n String enterDigit = \"3\";\r\n \r\n // Instantiate the CalcBrain object.\r\n CalcBrain instance = new CalcBrain();\r\n \r\n String expectedResult = \"3\";\r\n \r\n // Call the CalcBrain method digit to insert \"3\"\r\n String result = instance.digit(enterDigit);\r\n \r\n // Check that the \"3\" is returned from CalcBrain's digit method.\r\n assertEquals(expectedResult, result); \r\n }", "@Test\n public void testCanReadNumber() throws Exception {\n MatcherAssert.assertThat(\n new TestJenkins().jobs().iterator().next().builds().iterator()\n .next().number(), new IsEqual<>(\"#1\")\n );\n }", "@Test\n public void testFactorialMin()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"1\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n //NKD: Would prefer for this to be calculated by some function, rather than a magic number\n //However, java.lang.Math doesn't have fibonacci or factorial functions AFAIK\n }", "@Test\n\tpublic void test_StringCalculator_WhenOneNumberIsGiven_Then_ReturnSameNumber() {\n\t\tAssert.assertEquals(1,calc.Add(\"1\"));\n\t}", "public abstract void inputChange( int value );", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "public abstract void input();", "public void SetCheckoutRegistrationBuildingnumber(String housenumber){\r\n\t\tString Hosuenumber = getValue(housenumber);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration Building number should be entered as \"+Hosuenumber);\r\n\t\ttry{\r\n\r\n\t\t\tsendKeys(locator_split(\"checkoutregistrationbuildingnumber\"),Hosuenumber);\r\n\t\t\tSystem.out.println(\"Registration Building number is entered as \"+Hosuenumber);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Building number is entered as \"+Hosuenumber);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration Building number is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutregistrationbuildingnumber\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void setGivenNum(double input) {\n givenNum = input;\n }", "public abstract void process(int input);", "@Test\n\tpublic void test_StringCalculator_WhenNumberMoreThanThousantUsed_Then_ReturnTheOtherNumber() {\n\t\tAssert.assertEquals(2 ,calc.Add(\"1002,2\"));\n\t}", "@Test\n\tpublic void convertTotest1() {\n\t\tMainPanel testConvertToInt = new MainPanel(9);\n\t\tint getNumNeighbors1Result = testConvertToInt.getNumNeighbors1(2,2);\n int getNumNeighbors0Result = testConvertToInt.getNumNeighbors0(2,2);\n assertEquals(getNumNeighbors1Result, getNumNeighbors0Result);\n\t}", "public void testInferNumber1a() throws Exception {\n assertType(\"10 \", 0, 2, \"java.lang.Integer\");\n }", "@Test\n\tpublic void testDigitTestReplacementInValid() {\n\t\tString input = \"0\";\n\t\tString actualOutput = GeneralUtility.digitHasReplacement(input);\n\t\tAssert.assertEquals(null, actualOutput);\n\t}", "public static void main(String[] args) {\n int num = 14;\n int output = 6;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 1 PASS\" : \"X CASE 1 FAIL\");\n\n // TEST CASE 2: Input: num = 8 Output: 4\n num = 8;\n output = 4;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 2 PASS\" : \"X CASE 2 FAIL\");\n\n // TEST CASE 3: Input: num = 123 Output: 12\n num = 123;\n output = 12;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 3 PASS\" : \"X CASE 3 FAIL\");\n }", "public static void main(String[] args) {\nAddNumbers a=new AddNumbers();\r\na.getInput();\r\na.addNumbers();\r\nint output=a.addNumbers();\r\nSystem.out.println(\"OUTPUT:\");\r\nSystem.out.println(\"The addition of n numbers is: \"+output);\r\n\t}", "public void InkAndTonnerSearchQty(String itemnum){ \r\n\t\tString searchitem = getValue(itemnum);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+searchitem);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Quantity should be entered in quantity box for the first item in searched result.\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\twaitforElementVisible(locator_split(\"txtInkSearchQty\"));\r\n\t\t\tclearWebEdit(locator_split(\"txtInkSearchQty\"));\r\n\t\t\tsendKeys(locator_split(\"txtInkSearchQty\"), searchitem);\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Quantity is entered in quantity box for the first item in searched result.\");\r\n\t\t\tSystem.out.println(\"Quantity is entered in quantity box for the first item in searched result. - \"+searchitem+\"\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Quantity is not entered in quantity box for the first item in searched result. \"+elementProperties.getProperty(\"txtInkSearchQty\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtInkSearchQty\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public ParamTest(String inputNumber, Boolean expectedResult) {\n this.inputNumber = inputNumber;\n this.expectedResult = expectedResult;\n }", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void outfromNumGradeTest2(){\r\n\t\tPointGrade.fromNumGrade(101);\r\n\t}", "@Test\r\n\t\tpublic void testCompileAddition() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"putobject\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "public void SetCheckoutRegistrationHousenumber(String hosuenumber){\r\n\t\tString Hosuenumber = getValue(hosuenumber);\r\n\t\tString countrygroup_houseno = \"Netherland\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Hosuenumber);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration House number should be entered as '\"+Hosuenumber+\"' \");\r\n\t\ttry{\r\n\t\t\tif((countrygroup_houseno).contains(countries.get(countrycount))){\r\n\t\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationhousenumber\"),Hosuenumber);\r\n\t\t\t\tSystem.out.println(\"Registration house number is entered as '\"+Hosuenumber+\"' \");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Registration house number is entered as '\"+Hosuenumber+\"' \");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{ \r\n\t\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationaddress\"),Hosuenumber);\r\n\t\t\t\tSystem.out.println(\"Registration Address is entered as \"+Hosuenumber);\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Address is entered as \"+Hosuenumber);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration house number is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtcheckoutregistrationhousenumber\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int no_cases = scanner.nextInt();\n for (int i = 0; i < no_cases; i++) {\n int n = scanner.nextInt();\n int[] input = new int[n];\n for(int j = 0; j < n; j++) {\n input[j] = scanner.nextInt();\n }\n System.out.printf(\"%.2f\\n\", getExpectedValue(input));\n }\n }", "@Override\n\tpublic void input() {\n\t\t\n\t}", "@Test\n public void isInputDataValidTest() {\n boolean invoke = Deencapsulation.invoke(modificationFibonacci, \"isInputDataValid\", \"1\");\n assertTrue(invoke);\n }", "public void setInputNum(Integer inputNum) {\r\n this.inputNum = inputNum;\r\n }", "@Test\n public void testcheckPalindromeNormal_1() {\n assertTrue(checkerNumber.checkPalindrome(12321));\n }", "@When(\"^User adds two integers and selects Enter$\")\r\n public void user_adds_two_integers_and_selects_enter() throws Throwable {\n \tdivideClass divideInts = new divideClass(); // declaring the object\r\n \tdivideInts.main(new String[]{\"divideSum\"});// calling the method. {\r\n \t}", "@Test\n\tvoid test() {\n\t\t\n\t\tuserInput ui = new userInput();\n\t\t\n\t\tboolean test0 = ui.isValidChildcareType(0);\n\t\tboolean test1 = ui.isValidChildcareType(1);\n\t\tboolean test2 = ui.isValidChildcareType(2);\n\t\tboolean test3 = ui.isValidChildcareType(3);\n\t\tboolean test4 = ui.isValidChildcareType(4);\n\t\tboolean test5 = ui.isValidChildcareType(5);\n\t\tboolean test6 = ui.isValidChildcareType(-1);\n\t\t\n\t\tassertEquals(test0, false);\n\t\tassertEquals(test1, true);\n\t\tassertEquals(test2, true);\n\t\tassertEquals(test3, true);\n\t\tassertEquals(test4, true);\n\t\tassertEquals(test5, false);\n\t\tassertEquals(test6, false);\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint result = 0;\n\t\tint number = scanner.nextInt();\n\t\t\n\t\tif(number <= 99) {\n\t\t\tSystem.out.print(number);\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif(number == 1000){\n\t\t\t\tnumber = 999;\n\t\t\t}\n\t\t\t\n\t\t\tresult = 99 + getResult(number);\n\t\t\t\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint tc = sc.nextInt();\n\n\t\tfor (int num = 1; num <= tc; num++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tString str = \"\";\n\t\t\tint arr[] = new int[n];\n\t\t\tboolean flag = false;\n\t\t\tboolean visit[]=new boolean[1001];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = sc.nextInt();\n\t\t\t\tif (!flag && arr[i] == 0)\n\t\t\t\t\tflag = true;\n\t\t\t\tstr += arr[i];\n\t\t\t}\n\t\t\tif (flag) {\n\t\t\t\tint ans = 0;\n\t\t\t\tboolean p=false;\n\t\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\t\tfor (int j = 0; j + i <= n; j++) {\n\t\t\t\t\t\t\tint tmp = Integer.parseInt(str.substring(j, j + i));\n\t\t\t\t\t\t\tvisit[tmp]=true;\n\t\t\t\t\t}\n\t\t\t\t\tint amount=(int)Math.pow(10, i);\n\t\t\t\t\tfor(int k=0;k<amount;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!visit[k])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tans=k;\n\t\t\t\t\t\t\tp=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(p)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"#\" + num + \" \" + ans);\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"#\" + num + \" \" + 0);\n\t\t}\n\t}", "com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();", "@Test(dependsOnMethods = {\"shouldBeAbleToInputNumericCharactersInInterestRateField\"})\n public void shouldNotBeAbleToInputAlphaCharactersInInterestRateField() {\n //1. Enter B in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"B\");\n //2. Enter z in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"z\");\n }", "@Test\n public void testFibonacciValid()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"7\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"13\"));\n }", "private void processNumber() {\r\n\t\tString number = extractNumber();\r\n\r\n\t\tif ((!number.equals(\"1\")) && (!number.equals(\"0\"))) {\r\n\t\t\tthrow new LexerException(String.format(\"Unexpected number: %s.\", number));\r\n\t\t}\r\n\r\n\t\ttoken = new Token(TokenType.CONSTANT, number.equals(\"1\"));\r\n\t}", "private int takeChangeInput() {\n\t\tSystem.out.println(\"Enter desired change amount\");\n\n\t\tString amount = scan.next();\n\t\twhile (!amount.matches(\"\\\\d+\")) {\n\t\t\tSystem.out.println(\"Invalid input, please try again.\");\n\t\t\tamount = scan.next();\n\t\t}\n\n\t\tint change = Integer.valueOf(amount);\n\n\t\treturn change;\n\t}", "public void solution() {\n\t\t\n\t}", "@Test\n public void test018() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextInput textInput0 = new TextInput(errorPage0, (String) null, (String) null);\n ElExpression elExpression0 = new ElExpression((String) null);\n // Undeclared exception!\n try {\n Component component0 = textInput0.p((Object) elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testBOEING1() {\n CuteNetlibCase.doTest(\"BOEING1.SIF\", \"-335.2135675071266\", \"286.9746573387996\", NumberContext.of(7, 4));\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test\n\tpublic void gcdOfFiboNumsTest() {\n\n\t\tAssert.assertTrue(ifn.gcdOfFiboNums(3, 12) == 2);\n\t}", "@org.junit.Test\r\n public void testPositiveScenario() {\n boolean result = Validation.validateSAPhoneNumber(\"+27712612199\");// function should return true\r\n assertEquals(true, result);\r\n\r\n }", "public void testShouldReturnSumOfTwoNumber() throws TriangleException {\n Addition ad=new Addition();\n Assert.assertEquals(Constant.ERROR001, ad.additionNumber(2, 3));\n }", "@Test\n public void whenTryExecuteAdditionShouldCheckThatIsWorkCorrect() {\n String[] answer = new String[]{\"1.0\", \"y\"};\n StubIO stubIO = new StubIO(answer);\n MenuCalculator menuCalculator = new MenuCalculator(new Calculator(), stubIO, actions);\n menuCalculator.fillActions();\n String expected = \"0.0 + 1.0 = 1.0\\n\";\n final int command = 0;\n\n menuCalculator.select(command);\n\n assertThat(stubIO.getOut(), is(expected));\n }", "@Test(timeout = 4000)\n public void test258() throws Throwable {\n Form form0 = new Form(\"E5TYvW\");\n DateInput dateInput0 = new DateInput(form0, \"E5TYvW\", \"? fOYd~2\", \"? fOYd~2\");\n dateInput0._setParent(form0);\n assertEquals(\"E5TYvW\", form0.getComponentId());\n }", "@Test\n\tpublic void testValidInput() {\n\t\t\n\t\tString normalInput = \"1357.459\";\n\t\tString germanInput = \"1357,459\";\n\t\tBigDecimal expectedOutput = new BigDecimal(normalInput);\n\t\t\n\t\t// normal input\n\t\tfor( final CellProcessor p : Arrays.asList(processor, processor2, processorChain, processorChain2) ) {\n\t\t\tassertExecution(p, normalInput, expectedOutput);\n\t\t}\n\t\t\n\t\t// german input (\",\" instead of \".\" as decimal symbol)\n\t\tfor( final CellProcessor p : Arrays.asList(processor3, processorChain3) ) {\n\t\t\tassertExecution(p, germanInput, expectedOutput);\n\t\t}\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testGROW22() {\n CuteNetlibCase.doTest(\"GROW22.SIF\", \"-1.608343364825636E8\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void testNumberType() throws Exception {\n\t\tassertThat(0, is(0));\n\t}", "public static void main(String[] args) {\n\t\tint a,b;\r\n\t\tSystem.out.println(\"to check den is zero\");\r\n\t\tScanner scanner =new Scanner(System.in);\r\n\t\ta = scanner.nextInt();\r\n\t\tb=scanner.nextInt();\r\n\t\tnumber(a,b);\r\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test165() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.buttonInput(\"XYD6eL5K7VD|_+{7`{$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint num = sc.nextInt();\r\n\t\tProblem3 pObj = new Problem3();\r\n\t\tint result = pObj.productDigits(num);\r\n\t\tSystem.out.println((result>-1)?result:\"Invalid Input\");\r\n\t}", "private int ProcessInstruction(String input) {\n\t\tif (InputFileChecks.isStringInteger(input)) {\n\t\t\tint inputVal = Integer.parseInt(input);\n\t\t\tif (inputVal >=0 && inputVal <= 6) {\n\t\t\t\treturn inputVal;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Please return a proper input. Input provided: \" + input + \". Please input a from 0-6\");\n\t\treturn -1;\n\t}", "@Test\n public void testProcessPhoneNumbers() {\n StdInputPhoneNumberProcessor processor = new StdInputPhoneNumberProcessor(scanner, matcher);\n processor.processPhoneNumbers();\n }", "@Test(dependsOnMethods = {\"shouldAbleToInputNumericCharactersInDownPaymentField\"})\n public void shouldNotBeAbleToInputAlphaCharactersInDownPaymentfield() {\n //1. Enter B in the Down Payment Field\n calculatePaymentPage.setDownPaymentInput(\"B\");\n //2. Enter z in the Down Payment Field\n calculatePaymentPage.setDownPaymentInput(\"z\");\n }", "public void VerifyCouponfieldsinCheckout(){\r\n\t\tString countriess1 = \"Denmark,France,PresselSwitzerland,Norway,Spain,BernardFrance,,BernardBelgium,PresselAustria,UK,PresselGermany\";\r\n\t\tString countriess2 = \"Germany,Spain\";\r\n\t\tString countriess3 = \"Netherland,Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cupon Input txt box and Apply button should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess1.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput3inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"3 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"3 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess2.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"1 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"1 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess3.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"2 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"2 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"incorret country is entered in method for -\"+countries.get(countrycount));\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Incorrect country is entered in method for -\"+countries.get(countrycount)+\" or\"\r\n\t\t\t\t\t+ \" Element not found\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t\tthrow new Error(\"Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testSolution() {\n assertSolution(\"425\", \"input-day01-2018.txt\");\n }", "@Test\n\tvoid givenOneStringAndOneInt_WhenSum_ThenInputCleared() {\n\t\tapplication.numberOneTextField.setText(\"asd\");\n\t\tapplication.numberTwoTextField.setText(\"2\");\n\t\tString expectedResultTextField1 = \"\";\n\t\tString expectedResultTextField2 = \"2\";\n\t\tString expectedResultTextField = \"\";\n\t\t// When operation is sum\n\t\tapplication.operationButton.doClick();\n\t\t\n\t\t// Then result is \"\"\n\t\tString actualResult = application.resultTextField.getText();\n\t\tassertEquals(expectedResultTextField, actualResult);\n\t\tString actualResultTextField1 = application.numberOneTextField.getText();\n\t\tassertEquals(expectedResultTextField1, actualResultTextField1);\n\t\tString actualResultTextField2 = application.numberTwoTextField.getText();\n\t\tassertEquals(expectedResultTextField2, actualResultTextField2);\n\t}", "@Test\n @Grade(4)\n public void testBinaryConversion_basicNumbers() {\n assertEquals(\"0\", decimalToBinary(0));\n assertEquals(\"1\", decimalToBinary(1));\n }", "@Test(timeout = 4000)\n public void test210() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"(Ljava/lang/String;)Lorg/mvel/integration/VariableResolver;\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"(Ljava/lang/String;)Lorg/mvel/integration/VariableResolver;\", \"W,eg{\", stringSelectModel0, elExpression0);\n Select select0 = new Select(checkboxGroup0, \"W,eg{\", \"http://xmlpull.org/v1/doc/properties.html#serializer-indentation\", stringSelectModel0, \"W,eg{\");\n FileInput fileInput0 = new FileInput(select0, \"]> fkF\\\".:8\", \"W,eg{\");\n // Undeclared exception!\n try { \n fileInput0.end(\"J]'z8)\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No corresponding component found for end expression 'J]'z8)'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }" ]
[ "0.6201472", "0.61555475", "0.6122163", "0.60831565", "0.6077084", "0.58102846", "0.5770536", "0.57536316", "0.5710539", "0.5703935", "0.56749254", "0.56664294", "0.56606954", "0.56394583", "0.56355065", "0.56206477", "0.560629", "0.5602146", "0.5548696", "0.5521151", "0.55204344", "0.5509628", "0.5501209", "0.54865074", "0.54755545", "0.54747355", "0.5442249", "0.5411711", "0.5404049", "0.54016113", "0.53771657", "0.53771204", "0.5359703", "0.53460884", "0.5340931", "0.53370893", "0.53342086", "0.53322", "0.53314906", "0.532594", "0.5308642", "0.5293629", "0.5284418", "0.5265244", "0.5264869", "0.52637243", "0.52364945", "0.5235199", "0.5232839", "0.5224711", "0.5223057", "0.52207875", "0.52201486", "0.5201485", "0.52011013", "0.5199833", "0.5184077", "0.51671773", "0.51452255", "0.51432306", "0.514066", "0.51396567", "0.51317245", "0.5130749", "0.5123397", "0.5104522", "0.51021653", "0.51015043", "0.50912124", "0.50788367", "0.50727814", "0.5071907", "0.50623125", "0.5057335", "0.50572103", "0.5052278", "0.5047702", "0.50462484", "0.504523", "0.50426763", "0.5042178", "0.5039167", "0.503462", "0.5025089", "0.5022745", "0.5021151", "0.5018685", "0.50184566", "0.50178045", "0.5011875", "0.50109375", "0.49943048", "0.49902627", "0.49900106", "0.49805662", "0.49800006", "0.4979632", "0.49795094", "0.49751586", "0.4968533" ]
0.56750685
10
Test case number: 10 / 1 covered goal: Goal 1. wheel.components.Component.code(Ljava/lang/Object;)Lwheel/components/Component;: rootBranch
@Test public void test010() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Label label0 = (Label)errorPage0.code((Object) errorPage0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "String branch();", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "@Test\n public void Test14() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertEquals(54760, component.hashCode());\n }", "boolean isBranchTaken();", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "public Branch() { }", "public RelocateBranch() {\n }", "public Classification codeOf(Object code) {\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }", "public void getBranchCommand() {\n\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", (String) null, 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2217), \"p@7pE4I\", \"TET-!0-b\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n labelArray0[0] = label0;\n label0.status = (-1274);\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, (-2450), label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn(183, label0);\n methodWriter0.visitFieldInsn(959, \"TET-!0-b\", \"),-a}=[<X(poa~{!\", \"TET-!0-b\");\n methodWriter0.visitTryCatchBlock(label0, label0, label0, \"p@7pE4I\");\n int[] intArray0 = new int[6];\n intArray0[0] = (-2450);\n intArray0[1] = 959;\n intArray0[2] = (-484);\n intArray0[3] = (-1274);\n intArray0[4] = 183;\n intArray0[5] = (-1274);\n MethodWriter.getNewOffset(intArray0, intArray0, label0);\n assertArrayEquals(new int[] {(-2450), 959, (-484), (-1274), 183, (-1274)}, intArray0);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.newConst(\"Code\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"Code\";\n stringArray0[2] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[6] = \"Code\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Code\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 3, \"\\\".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"\\\".3t\\\"0\", stringArray0, true, false);\n Label label1 = new Label();\n byte[] byteArray0 = new byte[0];\n label1.resolve(methodWriter0, 168, byteArray0);\n classWriter0.newNameTypeItem(\"Code\", \"Fj)3/|(;sZXz$\");\n Label label2 = new Label();\n methodWriter0.visitFieldInsn(3, \"oc[MfnZM[~MHOK iO\", \"oc[MfnZM[~MHOK iO\", \"*/TEiGBLds&\");\n methodWriter0.visitLdcInsn(\"java/lang/dyn/Dynamic\");\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e5AO^\");\n ClassWriter classWriter0 = new ClassWriter((-2463));\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e5AO^\");\n classWriter0.newConst(\"Cpd7(e\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"e5AO^\";\n stringArray0[2] = \"e5AO^\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"e5AO^\";\n stringArray0[6] = \"Cpd7(e\";\n stringArray0[7] = \"Cpd7(e\";\n stringArray0[8] = \"Cpd7(e\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"e5AO^\", \"~)yCTRxQ#s$y[Ly%\", \"e5AO^\", stringArray0, false, false);\n methodWriter0.visitJumpInsn(1, label0);\n classWriter0.newNameTypeItem(\"Cpd7(e\", \"Cpd7(e\");\n label0.successor = label0;\n Label label1 = new Label();\n methodWriter0.visitJumpInsn(1, label0);\n methodWriter0.visitJumpInsn(2, label0.successor);\n methodWriter0.visitInsn(1);\n classWriter0.index = 2330;\n methodWriter0.visitLdcInsn(\"e5AO^\");\n methodWriter0.visitFrame(3, 268435455, stringArray0, 3239, stringArray0);\n methodWriter0.visitTypeInsn(2330, \"~hm$aI6.7xL0\");\n int int0 = methodWriter0.getSize();\n assertEquals(85, int0);\n }", "@Test\n public void testGetOpcodeOnUpperBoundary() {\n ProgramArea pa = new ProgramArea();\n\n pa.setOpCode(99, 99, 'a');\n\n Assert.assertEquals('a', pa.getOpCode(99, 99));\n\n Assert.assertEquals((char) 0, pa.getOpCode(100, 100));\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n Label label0 = new Label();\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", \"p@7pE4I\", 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"p@7pE4I\", \"p@7pE4I\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n labelArray0[0] = label0;\n label0.status = (-1274);\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n label0.info = (Object) null;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, (-2450), label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn((-2013884532), label0);\n methodWriter0.visitFieldInsn(1, \"oc[MfnZM[~MHOK iO\", \"p@7pE4I\", \"'@Cix/db]3YECoja=\");\n methodWriter0.visitTryCatchBlock(label0, label0, label0, (String) null);\n methodWriter0.visitJumpInsn(1198, label0);\n methodWriter0.visitMaxs((-1274), (-1460));\n methodWriter0.visitJumpInsn(1198, label0);\n ByteVector byteVector1 = byteVector0.putByte(177);\n methodWriter0.put(byteVector1);\n assertSame(byteVector0, byteVector1);\n }", "double getBranchProbability();", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCYCLE() {\n CuteNetlibCase.doTest(\"CYCLE.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray0 = new int[5];\n intArray0[0] = 1;\n intArray0[1] = 2;\n intArray0[2] = 1;\n intArray0[3] = 0;\n intArray0[4] = 2;\n frame0.inputStack = intArray0;\n ClassWriter classWriter1 = new ClassWriter(0);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"&l{u&egzGn.@\";\n Item item0 = classWriter1.newFieldItem(\"w{X;JM;Dl')dQG\", \"5j#\", \"InnerClasses\");\n // Undeclared exception!\n try { \n frame0.execute(188, 840, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public abstract int code();", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void solution() {\n\t\t\n\t}", "HibBranch getBranch(InternalActionContext ac, HibProject project);", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", (String) null, 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2217), \"p@7pE4I\", \"TET-!0-b\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n label0.frame = null;\n labelArray0[0] = label0;\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, 512, label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn(183, label0);\n methodWriter0.visitFieldInsn(959, \"TET-!0-b\", \"),-a}=[<X(poa~{!\", \"TET-!0-b\");\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "public static void main(String[] args) {\nint score = 91;\nString grade;\nif (score >90)\n{\n\tgrade = \"A\";\n}\n\n\n\nelse if (score>=80)\n{\n\tgrade = \"B\";\n}\n//THis is to test Git\n//THis is to test Git\n//THis is to test Git2\n//This is to test the brach made by gitdemo\n//Change from GitX\nelse \n{\n\tgrade = \"C\";\n}\nSystem.out.println(grade);\n}", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-2458));\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2458), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"oc[MfnZM[~MHOK iO\", (String[]) null, true, false);\n Object object0 = new Object();\n methodWriter0.visitFrame((-631), (-1299), (Object[]) null, (-2458), (Object[]) null);\n int int0 = MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME;\n methodWriter0.visitTypeInsn((-1299), \"9~\\\"GM0+ ?&-(JmN[0f.\");\n Label label0 = new Label();\n methodWriter0.visitMultiANewArrayInsn(\"Fj)3/|(;sZXz$\", (-1299));\n methodWriter0.visitMethodInsn(188, \"Fj)3/|(;sZXz$\", \".class\", \"Fj)3/|(;sZXz$\");\n methodWriter0.visitFrame(63, (-3532), (Object[]) null, (-1483625616), (Object[]) null);\n methodWriter0.visitMaxs((-1483625616), 1);\n }", "public void testMethodInfo885() throws Exception {\n\t\tClassInfo var2769 = instantiateClassInfo424();\n\t\tLocalVariableInfo var2770 = instantiateLocalVariableInfo423();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2772 = new MethodInfo(var2769, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2772.isSetter();\n\t\tvar2772.isSetter();\n\t}", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n ClassWriter classWriter0 = new ClassWriter((-1312));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"value \";\n stringArray0[1] = \"\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"\";\n stringArray0[5] = \"Ac\";\n stringArray0[6] = \"Zu.y \";\n stringArray0[7] = \"MI{W%eu4Z\";\n classWriter0.visit((-1048), 179, \"MI{W%eu4Z\", \"\", \"i&b}d$\", stringArray0);\n classWriter0.newClassItem(\"3U02Wj$(Z>8\");\n Item item0 = classWriter0.newLong(0);\n Item item1 = new Item(2, item0);\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(196, (-1312), classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "protected void method_865(bcb var1) {\r\n label136: {\r\n boolean var2;\r\n boolean var3;\r\n label132: {\r\n label131: {\r\n label130: {\r\n label137: {\r\n label138: {\r\n label139: {\r\n label140: {\r\n label141: {\r\n var2 = method_1147();\r\n int var10000 = var1.field_450;\r\n if(var2) {\r\n switch(var1.field_450) {\r\n case 1:\r\n var10000 = class_687.field_2947;\r\n break;\r\n case 2:\r\n break label141;\r\n case 3:\r\n break label140;\r\n case 4:\r\n break label139;\r\n case 5:\r\n break label138;\r\n case 50:\r\n break label137;\r\n case 60:\r\n break label130;\r\n case 70:\r\n break label131;\r\n case 100:\r\n break label132;\r\n case 110:\r\n break label136;\r\n default:\r\n return;\r\n }\r\n }\r\n\r\n if(var2) {\r\n var10000 = var10000 == 0?1:0;\r\n }\r\n\r\n class_687.field_2947 = (boolean)var10000;\r\n this.field_972.field_449 = String.valueOf(class_687.field_2947);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2946;\r\n if(var2) {\r\n var3 = !class_687.field_2946;\r\n }\r\n\r\n class_687.field_2946 = var3;\r\n this.field_973.field_449 = String.valueOf(class_687.field_2946);\r\n this.field_984 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2948;\r\n if(var2) {\r\n var3 = !class_687.field_2948;\r\n }\r\n\r\n class_687.field_2948 = var3;\r\n this.field_974.field_449 = String.valueOf(class_687.field_2948);\r\n this.field_983 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2951;\r\n if(var2) {\r\n var3 = !class_687.field_2951;\r\n }\r\n\r\n class_687.field_2951 = var3;\r\n this.field_975.field_449 = String.valueOf(class_687.field_2951);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2952;\r\n if(var2) {\r\n var3 = !class_687.field_2952;\r\n }\r\n\r\n class_687.field_2952 = var3;\r\n this.field_976.field_449 = String.valueOf(class_687.field_2952);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2949 = this.field_979.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2950 = this.field_980.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2953 = (double)this.field_981.method_834();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n bao var6;\r\n label77: {\r\n class_207 var5;\r\n label142: {\r\n var3 = this.field_983;\r\n if(var2) {\r\n if(this.field_983) {\r\n bbv var4 = bao.method_5273().canLoseFocus4;\r\n bbv.SetHUDText(\"\");\r\n }\r\n\r\n var5 = this;\r\n if(!var2) {\r\n break label142;\r\n }\r\n\r\n var3 = this.field_984;\r\n }\r\n\r\n if(var3) {\r\n var6 = this.field_557;\r\n if(!var2) {\r\n break label77;\r\n }\r\n\r\n if(this.field_557.cursorCounter6 != null) {\r\n class_687.field_2954 = true;\r\n }\r\n }\r\n\r\n class_687.method_3712();\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n var5 = this;\r\n }\r\n\r\n var6 = var5.field_557;\r\n }\r\n\r\n var6.method_5236(this.field_971);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.method_3711();\r\n this.field_557.method_5236(this.field_971);\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n }", "@Override\n\tpublic void run(){\n\t\tbranch(0, sol,0);\t\n\t\tSystem.out.println(\"####### \" + counter + \" #######\");\n\t}", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "@Test\n public void test100() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.li();\n Label label0 = (Label)errorPage0.label((Object) null);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "@Test\n public void test108() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.ul();\n Label label0 = (Label)errorPage0.big((Object) errorPage0);\n ActionExpression actionExpression0 = errorPage0.action(\"~Dci\");\n Label label1 = (Label)errorPage0.small((Object) actionExpression0);\n Block block1 = (Block)errorPage0.b();\n List<ActionExpression> list0 = errorPage0._getActions();\n block1._clear();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(block1._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.br();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Any_1\", component0.getComponentId());\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void Test10() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertTrue(component.equals(another));\n }", "private BaleElement.Branch createOuterBranch(BaleAstNode sn)\n{\n switch (sn.getNodeType()) {\n case FILE :\n\t return new BaleElement.CompilationUnitNode(for_document,cur_parent);\n case CLASS :\n\t return new BaleElement.ClassNode(for_document,cur_parent);\n case METHOD :\n\t return new BaleElement.MethodNode(for_document,cur_parent);\n case FIELD :\n\t return new BaleElement.FieldNode(for_document,cur_parent);\n case ANNOTATION :\n\t return new BaleElement.AnnotationNode(for_document,cur_parent);\n case STATEMENT :\n\t return new BaleElement.SplitStatementNode(for_document,cur_parent);\n case EXPRESSION :\n\t return new BaleElement.SplitExpressionNode(for_document,cur_parent);\n case BLOCK :\n\t return new BaleElement.BlockNode(for_document,cur_parent);\n case SWITCH_BLOCK :\n\t return new BaleElement.SwitchBlockNode(for_document,cur_parent);\n case INITIALIZER :\n\t return new BaleElement.InitializerNode(for_document,cur_parent);\n case SET :\n\t // return new BaleElement.DeclSet(for_document,cur_parent);\n\t break;\n default:\n\t break;\n }\n return null;\n}", "@Test\n public void test105() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.strong((Object) errorPage0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "@Test\n public void oncoTreeVersionTest() {\n // TODO: test oncoTreeVersion\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test\n public void testGetOpcodeOnLowerBoundary() {\n ProgramArea pa = new ProgramArea();\n\n pa.setOpCode(0, 0, 'a');\n\n Assert.assertEquals('a', pa.getOpCode(0, 0));\n\n Assert.assertEquals((char) 0, pa.getOpCode(-1, -1));\n }", "public void testJavaClassRepository873() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(CyclomaticMethods.class.getCanonicalName());\n\t\tvar2730.getClass(LineNumbersForConditionals.class.getCanonicalName());\n\t\tvar2730.getClass(LoDMultipleSameInvocations.class.getCanonicalName());\n\t}", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void testMethodInfo886() throws Exception {\n\t\tClassInfo var2776 = instantiateClassInfo426();\n\t\tLocalField var2777 = instantiateLocalField425();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2778 = new MethodInfo(var2776, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tvar2777.getDescription();\n\t\tvar2777.getDescription();\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.getSetters();\n\t\tvar2778.isSetter();\n\t\tvar2778.isSetter();\n\t}", "private void level7() {\n }", "protected void evalBranch(){\n List<Token> arguments = this.mainToken.getChilds();\n\n //Primer argumento es un string\n String stringExpression = arguments.get(0).getValue();\n //Removemos la referencia en la lista\n arguments.remove(0);\n\n String response = this.make(stringExpression, arguments);\n\n //Eliminar hojas\n this.setResponse(response);\n }", "public interface IBranchFunctionDef {\n /**\n * Verifies that the branch function is valid\n * @return If the usage of the branch function is valid\n */\n boolean verify(@Nullable IBranchFunctionDef parent, ISkriptFunctionDef function, ICodeDef codeDef);\n\n /**\n * Gets the variables of the def\n * @return Def's variables\n */\n List<IVariableDef> getVariables();\n\n /**\n * Sets up the variables of the def\n * @param factory Variable factory\n */\n void setupVariables(IVariableFactory factory);\n}", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "public void testJavaClassRepository867() throws Exception {\n\t\tClassPath var2728 = new ClassPathFactory().createFromJVM();\n\t\tJavaClassRepository var2729 = new JavaClassRepository(var2728);\n\t\tvar2729.getClass(DeeplyNestedIfStatements.class.getCanonicalName());\n\t\tvar2729.getClass(DeeplyNestedIfStatements.class.getCanonicalName());\n\t}", "@Test\n public void testComp1()\n {\n System.out.println(\"comp\");\n String compString = \"A+1\";\n assertEquals(\"0110111\", N2TCode.comp(compString));\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-2450));\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"oc[MfnZM[~MHOK iO\", (String[]) null, true, false);\n Object object0 = new Object();\n int int0 = MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME;\n methodWriter0.visitTypeInsn((-1299), \"9~\\\"GM0+ ?&-(JmN[0f.\");\n methodWriter0.visitTypeInsn(188, \"Fj)3/|(;sZXz$\");\n Label label0 = new Label();\n Frame frame0 = label0.frame;\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n label0.frame = null;\n Label label1 = label0.successor;\n methodWriter0.visitIntInsn(188, 99);\n }", "@Test\n public void solve1() {\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(4096);\n ClassWriter classWriter1 = new ClassWriter((-2894));\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"ConstantValue\";\n stringArray0[1] = \"LocalVariableTable\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n stringArray0[2] = \"ConstantValue\";\n stringArray0[3] = \"ConstantValue\";\n stringArray0[4] = \"0T1MW_`O#}<L\";\n stringArray0[5] = \"h#w=z5(0SfaM)DKLY\";\n stringArray0[6] = \"Synthetic\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"ConstantValue\", \"h#w=z5(0SfaM)DKLY\", \"Synthetic\", stringArray0, true, false);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"LocalVariableTable\");\n Label label0 = new Label();\n Edge edge0 = label0.successors;\n // Undeclared exception!\n try { \n methodWriter0.visitMethodInsn((-2894), \"/#p[v!vM>^U#((tz?0\", \"0T1MW_`O#}<L\", \"Code\");\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "@Test\n public void testGetReferenceCodesByDomainWithSubCodes4() {\n final var refCodes =\n repository.getReferenceCodesByDomain(\"TASK_TYPE\", true, \"description\", Order.ASC, 0, 10);\n\n assertThat(refCodes).isNotNull();\n assertThat(refCodes.getItems()).isNotNull();\n assertThat(refCodes.getItems()).isNotEmpty();\n assertThat(refCodes.getItems()).hasSize(10);\n assertThat(refCodes.getTotalRecords()).isEqualTo(48);\n assertThat(refCodes.getPageOffset()).isEqualTo(0);\n assertThat(refCodes.getPageLimit()).isEqualTo(10);\n\n // Verify sorting of codes\n assertThat(refCodes.getItems().get(0).getCode()).isEqualTo(\"ACP\");\n assertThat(refCodes.getItems().get(0).getDescription()).isEqualTo(\"Accredited Programme\");\n assertThat(refCodes.getItems().get(9).getCode()).isEqualTo(\"COMMS\");\n assertThat(refCodes.getItems().get(9).getDescription()).isEqualTo(\"Communication\");\n\n // Verify sub-codes returned or not\n verifySubCodesPresent(refCodes.getItems());\n\n // Verify quantity of sub-codes returned\n assertThat(refCodes.getItems().get(0).getSubCodes()).hasSize(22);\n assertThat(refCodes.getItems().get(9).getSubCodes()).hasSize(2);\n\n // Verify sorting of sub-codes\n assertThat(refCodes.getItems().get(0).getSubCodes().get(0).getCode()).isEqualTo(\"CPS\");\n assertThat(refCodes.getItems().get(0).getSubCodes().get(0).getDescription()).isEqualTo(\"Core Programme Session\");\n assertThat(refCodes.getItems().get(0).getSubCodes().get(21).getCode()).isEqualTo(\"SOU\");\n assertThat(refCodes.getItems().get(0).getSubCodes().get(21).getDescription()).isEqualTo(\"Statement Of Understanding Signed\");\n assertThat(refCodes.getItems().get(9).getSubCodes().get(0).getCode()).isEqualTo(\"COM_IN\");\n assertThat(refCodes.getItems().get(9).getSubCodes().get(0).getDescription()).isEqualTo(\"Communication IN\");\n assertThat(refCodes.getItems().get(9).getSubCodes().get(1).getCode()).isEqualTo(\"COM_OUT\");\n assertThat(refCodes.getItems().get(9).getSubCodes().get(1).getDescription()).isEqualTo(\"Communication OUT\");\n\n // Verify correct sub-code relationship to parent code\n verifySubCodeParentCodeRelationship(refCodes.getItems());\n }", "@Test\n public void Test12() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n ManaEffectComponent another = new ManaEffectComponent(EffectEnum.MANA_BUFF, 3, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "public int getBranchCount() { return _brcnt; }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"M\", \"JU_kvUQ\");\n Image image0 = new Image(checkbox0, \"JU_kvUQ\", \"JU_kvUQ\");\n Component component0 = errorPage0.code((Object) image0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "public void test55() {\n //$NON-NLS-1$\n deployBundles(\"test55\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n String[] stringArray0 = null;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n methodWriter0.visitInsn(14);\n FieldWriter fieldWriter0 = classWriter0.firstField;\n classWriter0.firstField = null;\n methodWriter0.getSize();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"dVw2Z7M){e/Y(#j\");\n Label label0 = new Label();\n Edge edge0 = label0.successors;\n methodWriter0.visitLineNumber(1, label0);\n methodWriter0.getSize();\n classWriter0.visitInnerClass(\"/#p[v!vM>^U#((tz?0\", \"Us\", \"dVw2Z7M){e/Y(#j\", (-4015));\n int int0 = 73;\n methodWriter0.visitMethodInsn(73, \"dVw2Z7M){e/Y(#j\", \"Code\", \"/#p[v!vM>^U#((tz?0\");\n // Undeclared exception!\n try { \n methodWriter0.visitInsn(3926);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777287);\n Type type0 = Type.BYTE_TYPE;\n String string0 = \"\";\n Item item0 = classWriter0.newMethodItem(\"\", \"zO!>TX45 #n,N&W\", \"zO!>TX45 #n,N&W\", false);\n // Undeclared exception!\n try { \n frame0.execute(160, 171, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Override\n\tpublic String[] goNextBranch(String nextBranch) {\n\t\treturn null;\n\t}", "private Solution() { }", "private Solution() { }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte) (-17));\n Component component0 = errorPage0.sub((Object) byte0);\n Component component1 = component0.base(\"?B(F-\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Any_1\", component1.getComponentId());\n }", "boolean verify(@Nullable IBranchFunctionDef parent, ISkriptFunctionDef function, ICodeDef codeDef);", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type0 = Type.BYTE_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[8];\n intArray0[0] = 6;\n intArray0[1] = 7;\n intArray0[2] = 2;\n intArray0[3] = 1;\n intArray0[4] = 2;\n intArray0[5] = 4;\n intArray0[6] = 9;\n intArray0[7] = 4;\n frame0.inputStack = intArray0;\n Item item0 = new Item();\n item0.hashCode = 1687;\n // Undeclared exception!\n try { \n frame0.execute(111, 164, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private Solution() {\n /**.\n * { constructor }\n */\n }", "private void testWithBacktrackingInput(LcssAlgorithm algorithm) {\n\t}", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public final void buildNext() {\n branch++;\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n classWriter0.addType(\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\\\"\";\n stringArray0[1] = \"\\\"\";\n classWriter0.newLong(32L);\n stringArray0[2] = \"\";\n stringArray0[3] = \"\\\"\";\n classWriter0.newClass(\"\\\"\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \"\", \"<T'RwU+).UKJX>\", \"\", stringArray0, true, true);\n methodWriter0.visitAnnotation(\"\", true);\n methodWriter0.visitFieldInsn(1, \"\\\"\", \"char\", \"3<|siktz\");\n Label label0 = new Label();\n label0.toString();\n ByteVector byteVector0 = new ByteVector(1);\n byteVector0.putUTF8(\"Label offset position has not been resolved yet\");\n ByteVector byteVector1 = classWriter0.pool;\n byteVector1.putInt(1);\n methodWriter0.put(byteVector1);\n methodWriter0.signature = \"\";\n methodWriter0.getSize();\n methodWriter0.visitFieldInsn(102, \"char\", \"Code\", \"\");\n methodWriter0.visitTypeInsn(4, \"zaxCQe&RK=9\");\n }", "public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.newInteger(1);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.newConst(\"Label offset position has not been resolved yet\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"Label offset position has not been resolved yet\";\n stringArray0[2] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[6] = \"Label offset position has not been resolved yet\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Label offset position has not been resolved yet\";\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"/Irp@$6rwLOSG)14\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 4, \"\\\".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"\\\".3t\\\"0\", stringArray0, false, false);\n Label label1 = new Label();\n byte[] byteArray0 = new byte[0];\n label1.resolve(methodWriter0, 168, byteArray0);\n classWriter0.newClassItem(\"~)yCTRxQ#s$y[Ly%\");\n Label label2 = new Label();\n label1.inputStackTop = 217;\n // Undeclared exception!\n try { \n methodWriter0.visitParameterAnnotation(4, \"java/lang/dyn/Dynamic\", true);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 4\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }" ]
[ "0.6216869", "0.60109246", "0.5902312", "0.5722406", "0.5672649", "0.56619877", "0.5512667", "0.5512004", "0.5451257", "0.5419802", "0.54033995", "0.53838634", "0.5378206", "0.5360174", "0.5357581", "0.53383565", "0.5324602", "0.5316526", "0.530037", "0.52943635", "0.5251474", "0.5247468", "0.5243086", "0.52034026", "0.52022064", "0.51968783", "0.5188923", "0.51861465", "0.5183535", "0.5175134", "0.51571685", "0.51503456", "0.5149292", "0.5149181", "0.5143765", "0.51433325", "0.51366574", "0.51316965", "0.5120528", "0.51173514", "0.51156896", "0.51124454", "0.50979877", "0.5090813", "0.5079833", "0.5078244", "0.5077789", "0.50728464", "0.50712323", "0.50699013", "0.506765", "0.5065647", "0.5063302", "0.50603485", "0.5056263", "0.50533795", "0.5053198", "0.50530994", "0.50523883", "0.5051318", "0.5050337", "0.5048636", "0.50451005", "0.50404984", "0.50368637", "0.5036054", "0.5033237", "0.5027582", "0.50270694", "0.5026888", "0.50268185", "0.502299", "0.5019884", "0.5019851", "0.5018802", "0.5008308", "0.50069046", "0.50045943", "0.50029117", "0.5002307", "0.500162", "0.49974406", "0.4994162", "0.49879542", "0.498558", "0.4983368", "0.49780238", "0.4971395", "0.4971395", "0.4969059", "0.4964121", "0.4962737", "0.49624494", "0.4956063", "0.49513534", "0.49501908", "0.494834", "0.49476665", "0.49468926", "0.4946165" ]
0.53993297
11
Test case number: 11 / 3 covered goals: Goal 1. wheel.components.Component.id(Ljava/lang/String;)Lwheel/components/Component;: I27 Branch 47 IFEQ L1642 false Goal 2. wheel.components.Component.addChild(Lwheel/components/Component;Z)Lwheel/components/Component;: I227 Branch 83 IFEQ L1848 false Goal 3. wheel.components.Component.addChild(Lwheel/components/Component;Z)Lwheel/components/Component;: I236 Branch 84 IFNULL L1849 true
@Test public void test011() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); ActionExpression actionExpression0 = new ActionExpression("'tj#~9z"); Form form0 = new Form(errorPage0, "'tj#~9z", actionExpression0); Submit submit0 = (Submit)form0.submit("'tj#~9z"); Form form1 = form0.id("'tj#~9z"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test245() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(voO6y2\\\"Vht&{F{\", \"6]BLjc:]v<R9v#;0\");\n // Undeclared exception!\n try { \n hidden0.addFirst((Component) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tvoid test4AddComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tvc.addComponent(comp3);\n\t\tassertEquals(comp3.hashCode(), vc.getComponentsList().get(vc.getComponentsList().size() - 1).hashCode());\n\t}", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void Test14() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertEquals(54760, component.hashCode());\n }", "@Test(timeout = 4000)\n public void test374() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n Component component0 = xmlEntityRef0.clasS((CharSequence) null);\n assertEquals(\"wheel_components_XmlEntityRef\", component0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test185() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.label();\n component0._wrapComponentId(\"d1^!A21Y[^*?\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test225() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"java.lang.String@000000005\", \"]f '8Drr>Uj1==M2\");\n List<RenderableComponent> list0 = checkbox0._getRenderableChildren();\n assertEquals(\"]f '8Drr>Uj1==M2\", xmlEntityRef0.getComponentId());\n assertNotNull(list0);\n }", "@Test(expected = NullPointerException.class)\n public void Test02() {\n component = new DamageEffectComponent(null, 3, 20);\n }", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n MockDate mockDate0 = new MockDate((-800), (-800), (-707), 75, 43);\n Label label0 = new Label(errorPage0, mockDate0);\n Component component0 = label0.b();\n Submit submit0 = new Submit(component0, \"The list of names must not be null\", \"\\f\");\n Component component1 = label0.strike((Object) submit0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component1._isGeneratedId());\n }", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test291() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n // Undeclared exception!\n try { \n checkbox0.h3((Object) \"0G-VP2>k}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test(timeout = 4000)\n public void test202() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"9at6pHJD%Y(o2 (\", \"z:_i>EAQ.Bdq@CL&k?\\\"\");\n FileInput fileInput0 = new FileInput(checkbox0, \"9at6pHJD%Y(o2 (\", \"java.lang.String@0000000005\");\n fileInput0._isGeneratedId();\n assertEquals(\"4_R]T<#2)Q?]R7Ut\", xmlEntityRef0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test277() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.strike();\n Component component0 = errorPage0.legend();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(table0, \"input\", (String) null);\n // Undeclared exception!\n try { \n checkbox0.samp((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "@Test\n\tvoid test4AddNullComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tException e = assertThrows(IllegalArgumentException.class, () -> vc.addComponent(null));\n\t\tassertEquals(\"Null component cannot be added to a container\", e.getMessage());\n\t}", "@Test\n public void test113() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.acronym((Object) \"Col component can e added onlG to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test219() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = new Label(errorPage0, errorPage0);\n label0.map(\"org.mvel.conversion.LongCH$1\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test278() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"z:_i>EAQ.Bdq@CL&k?\\\"\", \"h3\");\n // Undeclared exception!\n try { \n checkbox0.h1((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test178() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.acronym();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void test642_smartLifting4() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl4Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl4_1 t = new Team642sl4_4();\\n\" +\n\t\t\t \" T642sl4_2 o = new T642sl4_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_4 extends Team642sl4_3 {\\n\" +\n\t\t\t \" public class Role642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_4.this.toString() + \\\".Role642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_3 extends Team642sl4_2 {\\n\" +\n\t\t\t \" public class Role642sl4_5 extends Role642sl4_3 playedBy T642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_3.this.toString() + \\\".Role642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_6 extends T642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl4_2 extends T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_3 extends T642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_1 {\\n\" +\n\t\t\t \" public class Role642sl4_1 extends T642sl4_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl4_2 extends Role642sl4_1 playedBy T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl4_3 extends Role642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl4_2 as Role642sl4_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_4 extends T642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_2 extends Team642sl4_1 {\\n\" +\n\t\t\t \" public class Role642sl4_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_2.this.toString() + \\\".Role642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl4_4 extends Role642sl4_3 playedBy T642sl4_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_2.this.toString() + \\\".Role642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_5 extends T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl4_4.Role642sl4_4\");\n }", "@Test(timeout = 4000)\n public void test208() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, \"N^H\", \"N^H\");\n // Undeclared exception!\n try { \n textArea0.add((Component) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test233() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.label();\n Component component1 = component0.code();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component1._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(3390);\n Node[] nodeArray0 = new Node[3];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n simpleNode0.id = 3390;\n nodeArray0[2] = (Node) simpleNode0;\n simpleNode0.children = nodeArray0;\n simpleNode0.jjtGetNumChildren();\n simpleNode0.jjtGetNumChildren();\n simpleNode0.parent = nodeArray0[0];\n simpleNode0.children = nodeArray0;\n int int0 = (-1836);\n String string0 = \"`n\\\\t\\\\w8u)p!WbK\";\n simpleNode0.setIdentifier(\"`n\\tw8u)p!WbK\");\n simpleNode0.id = (-1836);\n Node node0 = simpleNode0.jjtGetChild(2);\n simpleNode0.jjtGetParent();\n // Undeclared exception!\n try { \n node0.jjtAddChild(nodeArray0[1], (-1836));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1836\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.SimpleNode\", e);\n }\n }", "public void test642_smartLifting1() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl1Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl1_1 t = new Team642sl1_1();\\n\" +\n\t\t\t \" T642sl1_2 o = new T642sl1_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_4 extends Team642sl1_3 {\\n\" +\n\t\t\t \" public class Role642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_4.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_2 extends Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl1_4 extends Role642sl1_3 playedBy T642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_5 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_3 extends Team642sl1_2 {\\n\" +\n\t\t\t \" public class Role642sl1_5 extends Role642sl1_3 playedBy T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_3.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_6 extends T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl1_2 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_3 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_1 extends T642sl1_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl1_2 extends Role642sl1_1 playedBy T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl1_3 extends Role642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl1_2 as Role642sl1_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_4 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl1_1.Role642sl1_3\");\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test195() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"{\");\n Component component0 = xmlEntityRef0.attribute(\"{\", \"L1c$!db-nwBt?]asCH\");\n assertEquals(\"{\", component0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test203() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n xmlEntityRef0._setComponentId(\":8{<(E\\\"c#X[}eAfV9\");\n assertFalse(xmlEntityRef0._isGeneratedId());\n }", "@Test\n public void test083() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"5-J'lSE>txSf9R\\\"\", \"5-J'lSE>txSf9R\\\"\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.h4();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test public void test_4() throws Exception {\n yetihelper.Helper v76=new yetihelper.Helper(); // time:1355223203509\n int v77=-2147483647; // time:1355223203509\n java.lang.Integer v78=v76.dummyInteger((int)v77); // time:1355223203509\n material.Square v79=new material.Square((java.lang.Integer)v78,(java.lang.Integer)v78); // time:1355223203509\n java.lang.Integer v80=v79.getRow(); // time:1355223203509\n material.Square v286=new material.Square((java.lang.Integer)v80,(java.lang.Integer)null); // time:1355223203642\n int v2252=v286.hashCode();\n /**BUG FOUND: RUNTIME EXCEPTION**/ // time:1355223207190\n /**YETI EXCEPTION - START \n java.lang.NullPointerException\n \tat material.Square.hashCode(Square.java:49)\n YETI EXCEPTION - END**/ \n /** original locs: 4674 minimal locs: 7**/\n \n }", "@Test\n public void test105() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.strong((Object) errorPage0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test321() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"Y:b;O81\");\n String string0 = xmlEntityRef0.getComponentName();\n assertEquals(\"Y:b;O81\", xmlEntityRef0.getComponentId());\n assertEquals(\"XmlEntityRef\", string0);\n }", "public void test642_smartLifting2() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl2Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl2_1 t = new Team642sl2_2();\\n\" +\n\t\t\t \" T642sl2_2 o = new T642sl2_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_4 extends Team642sl2_3 {\\n\" +\n\t\t\t \" public class Role642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_4.this.toString() + \\\".Role642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_1 {\\n\" +\n\t\t\t \" public class Role642sl2_1 extends T642sl2_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl2_2 extends Role642sl2_1 playedBy T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl2_3 extends Role642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl2_2 as Role642sl2_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_4 extends T642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_2 extends Team642sl2_1 {\\n\" +\n\t\t\t \" public class Role642sl2_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_2.this.toString() + \\\".Role642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl2_4 extends Role642sl2_3 playedBy T642sl2_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_2.this.toString() + \\\".Role642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_5 extends T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_3 extends Team642sl2_2 {\\n\" +\n\t\t\t \" public class Role642sl2_5 extends Role642sl2_3 playedBy T642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_3.this.toString() + \\\".Role642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_6 extends T642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl2_2 extends T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_3 extends T642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl2_2.Role642sl2_4\");\n }", "public void add(Component c){}", "@Test(timeout = 4000)\n public void test334() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = new Label(errorPage0, errorPage0);\n Component component0 = errorPage0.legend((Object) label0);\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test302() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"D&J!^F2~~&lT'Lakt\");\n // Undeclared exception!\n try { \n xmlEntityRef0.entity(\"D&J!^F2~~&lT'Lakt\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test138() throws Throwable {\n Submit submit0 = new Submit((Component) null, \" (position:\", \"kIh 4+,VlA$]12\");\n Checkbox checkbox0 = new Checkbox(submit0, \"B\\\"M$C3CbFMp&xh\", \" (position:\");\n // Undeclared exception!\n try { \n checkbox0.h1((Object) null);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test231() throws Throwable {\n Form form0 = new Form(\"DUP\");\n Component component0 = form0.attributes((String[]) null);\n assertEquals(\"DUP\", component0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test213() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"wh\\\"vVQ `'HnBv\", \"~qV]vimZJQ;pcba\");\n // Undeclared exception!\n try { \n checkbox0.get(\"4_R]T<#2)Q?]R7Ut\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Could not find component with id '4_R]T<#2)Q?]R7Ut'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"M\", \"JU_kvUQ\");\n Image image0 = new Image(checkbox0, \"JU_kvUQ\", \"JU_kvUQ\");\n Component component0 = errorPage0.code((Object) image0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "private static void createNewClothing(int aArticle, int aSource, int aTarget, int... components) {\n/* 3446 */ AdvancedCreationEntry article = createAdvancedEntry(10016, aSource, aTarget, aArticle, false, false, 0.0F, true, false, 0, 10.0D, CreationCategories.CLOTHES);\n/* */ \n/* 3448 */ article.setColouringCreation(true);\n/* 3449 */ article.setFinalMaterial((byte)17);\n/* 3450 */ article.setUseTemplateWeight(true);\n/* 3451 */ int x = 1;\n/* 3452 */ for (int component : components)\n/* */ {\n/* 3454 */ article.addRequirement(new CreationRequirement(x++, component, 1, true));\n/* */ }\n/* */ }", "@Test(timeout = 4000)\n public void test228() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"unsupported feature \", \"unsupported feature \");\n String[] stringArray0 = new String[2];\n Component component0 = checkbox0.attributes(stringArray0);\n assertSame(component0, checkbox0);\n }", "@Test(timeout = 4000)\n public void test320() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n // Undeclared exception!\n try { \n xmlEntityRef0.nbsp();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test148() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"]1\", \"2D_ZO9FaJf0hL((#xC\");\n // Undeclared exception!\n try { \n checkbox0.em();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test337() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"Tfoot component can be added only to a Table.\");\n // Undeclared exception!\n try { \n xmlEntityRef0.img((String) null, \"wheel.components.Submit\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray0 = new int[5];\n intArray0[0] = 1;\n intArray0[1] = 2;\n intArray0[2] = 1;\n intArray0[3] = 0;\n intArray0[4] = 2;\n frame0.inputStack = intArray0;\n ClassWriter classWriter1 = new ClassWriter(0);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"&l{u&egzGn.@\";\n Item item0 = classWriter1.newFieldItem(\"w{X;JM;Dl')dQG\", \"5j#\", \"InnerClasses\");\n // Undeclared exception!\n try { \n frame0.execute(188, 840, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"sajp\", \"sajp\");\n // Undeclared exception!\n try { \n checkbox0.hr();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"null\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.strong();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test346() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.checkbox((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public void test642_smartLifting6() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl6Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl6_1 t = new Team642sl6_2();\\n\" +\n\t\t\t \" T642sl6_2 o = new T642sl6_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_4 extends Team642sl6_3 {\\n\" +\n\t\t\t \" public class Role642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_4.this.toString() + \\\".Role642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_1 {\\n\" +\n\t\t\t \" public class Role642sl6_1 extends T642sl6_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl6_2 extends Role642sl6_1 playedBy T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl6_3 extends Role642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl6_2 as Role642sl6_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_4 extends T642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_2 extends Team642sl6_1 {\\n\" +\n\t\t\t \" public class Role642sl6_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_2.this.toString() + \\\".Role642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl6_4 extends Role642sl6_3 playedBy T642sl6_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_2.this.toString() + \\\".Role642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_5 extends T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_3 extends Team642sl6_2 {\\n\" +\n\t\t\t \" public class Role642sl6_5 extends Role642sl6_3 playedBy T642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_3.this.toString() + \\\".Role642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_6 extends T642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl6_2 extends T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_3 extends T642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl6_2.Role642sl6_3\");\n }", "@Test(timeout = 4000)\n public void test282() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"Col component can be added only to a TableBlock.\", \"5]<!^oHS\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"5]<!^oHS\", \"Col component can be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.tt();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test313() throws Throwable {\n Submit submit0 = new Submit((Component) null, \" (position:\", \"6\");\n // Undeclared exception!\n try { \n submit0.remove((Component) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test331() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \";BpvU]Xh\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.imageSubmit(\"R,@pnK1{H\", \"java/lang/Throwable\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"!\", \"J]'z8)\");\n // Undeclared exception!\n try { \n hidden0.img(\"J]'z8)\", \"LhtX\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test238() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component can be added only to a TableBlock.\", \"Col component can be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.dfn();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void testCreateComponentReference() {\n System.out.println(\"createComponentReference\"); // NOI18N\n \n final DesignDocument document = ModelTestUtil.createTestDesignDocument(\"TEST_PROJECT\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent expResult = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(expResult).getComponent();\n assertEquals(expResult,result);\n }\n });\n }", "@Test(timeout = 4000)\n public void test286() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component can be added only to a TableBlock.\", \"Col component can be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.h2();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", (String) null, 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2217), \"p@7pE4I\", \"TET-!0-b\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n label0.frame = null;\n labelArray0[0] = label0;\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, 512, label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn(183, label0);\n methodWriter0.visitFieldInsn(959, \"TET-!0-b\", \"),-a}=[<X(poa~{!\", \"TET-!0-b\");\n }", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint((String) null, true, \"sXV\", \"sXV\");\n String string0 = SQLUtil.ownerDotComponent(dBCheckConstraint0);\n assertEquals(\"null\", string0);\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n String string0 = SQLUtil.ownerDotComponent(dBUniqueConstraint0);\n assertEquals(\"null.null\", string0);\n }", "@Test\n public void Test13_1() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_DEBUFF, 3, -40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "public void test642_smartLifting5() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl5Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl5_1 t = new Team642sl5_1();\\n\" +\n\t\t\t \" T642sl5_2 o = new T642sl5_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl5_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl5_4 extends Team642sl5_3 {\\n\" +\n\t\t\t \" public class Role642sl5_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_4.this.toString() + \\\".Role642sl5_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl5_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl5_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl5_2 extends Team642sl5_1 {\\n\" +\n\t\t\t \" public class Role642sl5_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_2.this.toString() + \\\".Role642sl5_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl5_4 extends Role642sl5_3 playedBy T642sl5_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_2.this.toString() + \\\".Role642sl5_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl5_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_5 extends T642sl5_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl5_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl5_3 extends Team642sl5_2 {\\n\" +\n\t\t\t \" public class Role642sl5_5 extends Role642sl5_3 playedBy T642sl5_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_3.this.toString() + \\\".Role642sl5_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl5_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_6 extends T642sl5_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl5_2 extends T642sl5_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_3 extends T642sl5_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl5_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl5_1 {\\n\" +\n\t\t\t \" public class Role642sl5_1 extends T642sl5_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_1.this.toString() + \\\".Role642sl5_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl5_2 extends Role642sl5_1 playedBy T642sl5_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_1.this.toString() + \\\".Role642sl5_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl5_3 extends Role642sl5_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_1.this.toString() + \\\".Role642sl5_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl5_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl5_2 as Role642sl5_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_4 extends T642sl5_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl5_1.Role642sl5_3\");\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"!\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n checkbox0.ins();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n Checkbox checkbox0 = new Checkbox(label0, \"\", \"\");\n Component component0 = checkbox0.renderHint(\"\");\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test public void test_3() throws Exception {\n yetihelper.Helper v76=new yetihelper.Helper(); // time:1355223203509\n int v77=-2147483647; // time:1355223203509\n java.lang.Integer v78=v76.dummyInteger((int)v77); // time:1355223203509\n material.Square v79=new material.Square((java.lang.Integer)v78,(java.lang.Integer)v78); // time:1355223203509\n java.lang.Integer v80=v79.getRow(); // time:1355223203509\n material.Square v286=new material.Square((java.lang.Integer)v80,(java.lang.Integer)null); // time:1355223203642\n material.Board v313=new material.Board(); // time:1355223203665\n material.Piece v321=v313.getSquare((material.Square)v286);\n /**BUG FOUND: RUNTIME EXCEPTION**/ // time:1355223203669\n /**YETI EXCEPTION - START \n java.lang.NullPointerException\n \tat material.Square.hashCode(Square.java:49)\n \tat java.util.HashMap.get(Unknown Source)\n \tat material.Board.getSquare(Board.java:64)\n YETI EXCEPTION - END**/ \n /** original locs: 1384 minimal locs: 8**/\n \n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n ElExpression elExpression0 = new ElExpression(\"aXLxLx]\");\n // Undeclared exception!\n try { \n checkbox0.s((Object) elExpression0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "Component duplicateComponentFound(Component component, String name, String type, String description, String technology);", "@Test(timeout = 4000)\n public void test366() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n Component component0 = label0.samp();\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Override\npublic void add(VirtualComponent comp, int pos) {\n\t\n}", "@Test(timeout = 4000)\n public void test179() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"!\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n checkbox0.a((Object) checkbox0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test094() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"\", \"\");\n Image image0 = new Image(hidden0, \"\", \"\");\n Label label0 = (Label)errorPage0.ins((Object) image0);\n Block block0 = (Block)errorPage0.h3();\n Label label1 = (Label)errorPage0.u((Object) errorPage0);\n assertTrue(label1._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(timeout = 4000)\n public void test221() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n MockDate mockDate0 = new MockDate((-800), (-800), (-707), 75, 43);\n Label label0 = new Label(errorPage0, mockDate0);\n Component component0 = label0.b();\n component0._getVisibleForm(false);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", (String) null, 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2217), \"p@7pE4I\", \"TET-!0-b\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n labelArray0[0] = label0;\n label0.status = (-1274);\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, (-2450), label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn(183, label0);\n methodWriter0.visitFieldInsn(959, \"TET-!0-b\", \"),-a}=[<X(poa~{!\", \"TET-!0-b\");\n methodWriter0.visitTryCatchBlock(label0, label0, label0, \"p@7pE4I\");\n int[] intArray0 = new int[6];\n intArray0[0] = (-2450);\n intArray0[1] = 959;\n intArray0[2] = (-484);\n intArray0[3] = (-1274);\n intArray0[4] = 183;\n intArray0[5] = (-1274);\n MethodWriter.getNewOffset(intArray0, intArray0, label0);\n assertArrayEquals(new int[] {(-2450), 959, (-484), (-1274), 183, (-1274)}, intArray0);\n }", "@Test(timeout = 4000)\n public void test243() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"6F\\\"\", \".}U.0/,SESI0vG=!];E\");\n // Undeclared exception!\n try { \n checkbox0.pre((Object) \"6F\\\"\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void test642_smartLifting3() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl3Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl3_1 t = new Team642sl3_3();\\n\" +\n\t\t\t \" T642sl3_2 o = new T642sl3_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_4 extends Team642sl3_3 {\\n\" +\n\t\t\t \" public class Role642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_4.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_3 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_1 extends T642sl3_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl3_2 extends Role642sl3_1 playedBy T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl3_3 extends Role642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl3_2 as Role642sl3_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_4 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_2 extends Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl3_4 extends Role642sl3_3 playedBy T642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_5 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_3 extends Team642sl3_2 {\\n\" +\n\t\t\t \" public class Role642sl3_5 extends Role642sl3_3 playedBy T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_3.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_6 extends T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl3_2 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl3_3.Role642sl3_4\");\n }", "@Test\n public void test133() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.dd((Object) errorPage0);\n assertTrue(label0._isGeneratedId());\n \n List<Component> list0 = errorPage0._getChildren();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(1, list0.size());\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n String string0 = \"\";\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(2);\n int int0 = Frame.INTEGER;\n Item item0 = classWriter2.newInteger(1);\n item0.set(2);\n item0.next = item0;\n item0.longVal = (long) 2;\n frame0.execute(49, 2006, classWriter1, item0);\n Frame frame1 = frame0.owner.frame;\n // Undeclared exception!\n try { \n frame0.merge(classWriter0, (Frame) null, 49);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e5AO^\");\n ClassWriter classWriter0 = new ClassWriter((-2463));\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e5AO^\");\n classWriter0.newConst(\"Cpd7(e\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"e5AO^\";\n stringArray0[2] = \"e5AO^\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"e5AO^\";\n stringArray0[6] = \"Cpd7(e\";\n stringArray0[7] = \"Cpd7(e\";\n stringArray0[8] = \"Cpd7(e\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"e5AO^\", \"~)yCTRxQ#s$y[Ly%\", \"e5AO^\", stringArray0, false, false);\n methodWriter0.visitJumpInsn(1, label0);\n classWriter0.newNameTypeItem(\"Cpd7(e\", \"Cpd7(e\");\n label0.successor = label0;\n Label label1 = new Label();\n methodWriter0.visitJumpInsn(1, label0);\n methodWriter0.visitJumpInsn(2, label0.successor);\n methodWriter0.visitInsn(1);\n classWriter0.index = 2330;\n methodWriter0.visitLdcInsn(\"e5AO^\");\n methodWriter0.visitFrame(3, 268435455, stringArray0, 3239, stringArray0);\n methodWriter0.visitTypeInsn(2330, \"~hm$aI6.7xL0\");\n int int0 = methodWriter0.getSize();\n assertEquals(85, int0);\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.acronym((Object) \"src\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(2);\n int int0 = Frame.INTEGER;\n Item item0 = classWriter2.newInteger(1);\n item0.set(2);\n item0.next = item0;\n item0.longVal = (long) 2;\n frame0.execute(49, 2012, classWriter1, item0);\n Item item1 = classWriter2.newDouble(2);\n frame0.execute(152, 166, classWriter1, item1);\n assertFalse(item1.equals((Object)item0));\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void Test10() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test189() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n LocalTime localTime0 = MockLocalTime.ofSecondOfDay(1816L);\n Component component0 = errorPage0.em((Object) localTime0);\n StandaloneComponent standaloneComponent0 = component0._getTopLevelComponent(true);\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.sup();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n Type type0 = Type.CHAR_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type1 = Type.CHAR_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type2 = Type.INT_TYPE;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter0.toByteArray();\n Label label0 = new Label();\n Label label1 = label0.next;\n Frame frame1 = label0.frame;\n ClassWriter classWriter1 = new ClassWriter(9);\n // Undeclared exception!\n try { \n frame0.execute(185, 1455, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "@Test(timeout = 4000)\n public void test329() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Float float0 = new Float((-632.18304F));\n Component component0 = errorPage0.s((Object) float0);\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }" ]
[ "0.63754106", "0.5996597", "0.5968549", "0.5961349", "0.5959176", "0.5822386", "0.58063906", "0.5793239", "0.57525814", "0.567844", "0.56781715", "0.563622", "0.5604906", "0.5593441", "0.5573529", "0.551234", "0.5498754", "0.5494243", "0.5481822", "0.5479608", "0.5478215", "0.54430485", "0.54301", "0.5428921", "0.54278624", "0.5413002", "0.53942823", "0.5393845", "0.53914505", "0.5388975", "0.538805", "0.53443563", "0.53386515", "0.5338156", "0.5333678", "0.53317654", "0.5326925", "0.53211623", "0.5318371", "0.53181976", "0.531365", "0.53058535", "0.5296968", "0.5293487", "0.52917826", "0.5281581", "0.5281338", "0.5281031", "0.5267084", "0.5261644", "0.52615005", "0.52608657", "0.5255977", "0.52509385", "0.52449715", "0.5241658", "0.52400714", "0.5239543", "0.5237145", "0.5234494", "0.5232695", "0.52286166", "0.522642", "0.52262884", "0.5220521", "0.5218168", "0.5216516", "0.52162004", "0.5212933", "0.5211822", "0.5208718", "0.52085245", "0.5205079", "0.52045643", "0.5193894", "0.51922816", "0.51918834", "0.5191709", "0.51908535", "0.5188485", "0.5188211", "0.5187626", "0.51855564", "0.5185338", "0.518095", "0.51793146", "0.51767534", "0.51747435", "0.517066", "0.5169827", "0.51661575", "0.5164884", "0.5154548", "0.51544875", "0.51541847", "0.51505226", "0.51470864", "0.5141578", "0.51398647", "0.51276207", "0.5126739" ]
0.0
-1
Test case number: 12 / 1 covered goal: Goal 1. wheel.components.Component.var(Ljava/lang/Object;)Lwheel/components/Component;: rootBranch
@Test public void test012() throws Throwable { Form form0 = new Form("XT0"); // Undeclared exception! try { Component component0 = form0.var((Object) form0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalculation = this.getRectanglesToConsiderForBranchingVarCalculation( );\r\n \r\n //collect 0 direction refcounts into this map\r\n Map<String, Integer> zeroVar_RefCountMap = new HashMap<String, Integer> () ;\r\n //and one diirection refconts into this map\r\n Map<String, Integer> oneVar_RefCountMap = new HashMap<String, Integer> () ;\r\n \r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle =null;\r\n for (Rectangle rect: rectanglesToConsiderForBranchingVarCalculation){\r\n variablesUsedForBranchingInThisRectangle = getVariablesUsedForBranchingInThisRectangle (rect);\r\n if (variablesUsedForBranchingInThisRectangle.size()>ZERO) {\r\n this.updateVariableRefCounts(zeroVar_RefCountMap, oneVar_RefCountMap, variablesUsedForBranchingInThisRectangle) ;\r\n }else {\r\n System.err.print(\"trying to branch a node which should have been marked infeasible\" );\r\n exit(ONE);\r\n }\r\n }\r\n \r\n \r\n //now find the highest refcount var, no matter its direction\r\n int highZeroFreq = zeroVar_RefCountMap.isEmpty()?ZERO:Collections.max( zeroVar_RefCountMap.values());\r\n int highOneFreq = oneVar_RefCountMap.isEmpty()? ZERO: Collections.max(oneVar_RefCountMap.values()) ;\r\n \r\n //we need to find the selected var's refcount on the other side\r\n int selectedVarRefCountOnOtherSide = ZERO;\r\n \r\n int totalRects = getNumberOfRects(this.myInfeasibleRectanglesList) ;\r\n \r\n if (highZeroFreq>highOneFreq) {\r\n result.varName=getHighestFreqVar (zeroVar_RefCountMap,highZeroFreq ) ;\r\n result.coeff=highZeroFreq;\r\n selectedVarRefCountOnOtherSide= oneVar_RefCountMap.get( result.varName)==null? ZERO : oneVar_RefCountMap.get( result.varName);\r\n //this is how many rects will survive on either side\r\n childRectCounts.zeroSideCount = totalRects - selectedVarRefCountOnOtherSide;\r\n childRectCounts.oneSideCount=totalRects -highZeroFreq ;\r\n \r\n } else {\r\n result.varName=getHighestFreqVar (oneVar_RefCountMap,highOneFreq ) ;\r\n result.coeff=highOneFreq;\r\n selectedVarRefCountOnOtherSide= zeroVar_RefCountMap.get( result.varName)==null? ZERO : zeroVar_RefCountMap.get( result.varName);\r\n \r\n childRectCounts.zeroSideCount = totalRects - highOneFreq;\r\n childRectCounts.oneSideCount=totalRects - selectedVarRefCountOnOtherSide;\r\n }\r\n \r\n return result;\r\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "public abstract void mo9245b(C0631bt btVar);", "@Override\n\tpublic List<Component> caseExprBinary(ExprBinary expr) {\n\t\tint sizeInBits = assignTarget.getVariable().getType().getSizeInBits();\n\t\t// Get the Variables\n\t\tVar e1 = ((ExprVar) expr.getE1()).getUse().getVariable();\n\t\tVar e2 = ((ExprVar) expr.getE2()).getUse().getVariable();\n\t\tList<Var> inVars = new ArrayList<Var>();\n\t\tinVars.add(e1);\n\t\tinVars.add(e2);\n\t\t// Component component = null;\n\t\tif (expr.getOp() == OpBinary.BITAND) {\n\t\t\tcurrentComponent = new AndOp();\n\t\t} else if (expr.getOp() == OpBinary.BITOR) {\n\t\t\tcurrentComponent = new OrOp();\n\t\t} else if (expr.getOp() == OpBinary.BITXOR) {\n\t\t\tcurrentComponent = new XorOp();\n\t\t} else if (expr.getOp() == OpBinary.DIV) {\n\t\t\tcurrentComponent = new DivideOp(sizeInBits);\n\t\t} else if (expr.getOp() == OpBinary.DIV_INT) {\n\t\t\tcurrentComponent = new DivideOp(sizeInBits);\n\t\t} else if (expr.getOp() == OpBinary.EQ) {\n\t\t\tcurrentComponent = new EqualsOp();\n\t\t} else if (expr.getOp() == OpBinary.GE) {\n\t\t\tcurrentComponent = new GreaterThanEqualToOp();\n\t\t} else if (expr.getOp() == OpBinary.GT) {\n\t\t\tcurrentComponent = new GreaterThanOp();\n\t\t} else if (expr.getOp() == OpBinary.LE) {\n\t\t\tcurrentComponent = new LessThanEqualToOp();\n\t\t} else if (expr.getOp() == OpBinary.LOGIC_AND) {\n\t\t\tcurrentComponent = new And(2);\n\t\t} else if (expr.getOp() == OpBinary.LOGIC_OR) {\n\t\t\tcurrentComponent = new Or(2);\n\t\t} else if (expr.getOp() == OpBinary.LT) {\n\t\t\tcurrentComponent = new LessThanOp();\n\t\t} else if (expr.getOp() == OpBinary.MINUS) {\n\t\t\tcurrentComponent = new SubtractOp();\n\t\t} else if (expr.getOp() == OpBinary.MOD) {\n\t\t\tcurrentComponent = new ModuloOp();\n\t\t} else if (expr.getOp() == OpBinary.NE) {\n\t\t\tcurrentComponent = new NotEqualsOp();\n\t\t} else if (expr.getOp() == OpBinary.PLUS) {\n\t\t\tcurrentComponent = new AddOp();\n\t\t} else if (expr.getOp() == OpBinary.SHIFT_LEFT) {\n\t\t\tint log2N = MathStuff.log2(sizeInBits);\n\t\t\tcurrentComponent = new LeftShiftOp(log2N);\n\t\t} else if (expr.getOp() == OpBinary.SHIFT_RIGHT) {\n\t\t\tint log2N = MathStuff.log2(sizeInBits);\n\t\t\tcurrentComponent = new RightShiftOp(log2N);\n\t\t} else if (expr.getOp() == OpBinary.TIMES) {\n\t\t\tcurrentComponent = new MultiplyOp(expr.getType().getSizeInBits());\n\t\t}\n\t\t// currentComponent.setNonRemovable();\n\t\tPortUtil.mapInDataPorts(currentComponent, inVars, portDependency,\n\t\t\t\tportGroupDependency);\n\t\treturn null;\n\t}", "public interface IBranchFunctionDef {\n /**\n * Verifies that the branch function is valid\n * @return If the usage of the branch function is valid\n */\n boolean verify(@Nullable IBranchFunctionDef parent, ISkriptFunctionDef function, ICodeDef codeDef);\n\n /**\n * Gets the variables of the def\n * @return Def's variables\n */\n List<IVariableDef> getVariables();\n\n /**\n * Sets up the variables of the def\n * @param factory Variable factory\n */\n void setupVariables(IVariableFactory factory);\n}", "protected void method_865(bcb var1) {\r\n label136: {\r\n boolean var2;\r\n boolean var3;\r\n label132: {\r\n label131: {\r\n label130: {\r\n label137: {\r\n label138: {\r\n label139: {\r\n label140: {\r\n label141: {\r\n var2 = method_1147();\r\n int var10000 = var1.field_450;\r\n if(var2) {\r\n switch(var1.field_450) {\r\n case 1:\r\n var10000 = class_687.field_2947;\r\n break;\r\n case 2:\r\n break label141;\r\n case 3:\r\n break label140;\r\n case 4:\r\n break label139;\r\n case 5:\r\n break label138;\r\n case 50:\r\n break label137;\r\n case 60:\r\n break label130;\r\n case 70:\r\n break label131;\r\n case 100:\r\n break label132;\r\n case 110:\r\n break label136;\r\n default:\r\n return;\r\n }\r\n }\r\n\r\n if(var2) {\r\n var10000 = var10000 == 0?1:0;\r\n }\r\n\r\n class_687.field_2947 = (boolean)var10000;\r\n this.field_972.field_449 = String.valueOf(class_687.field_2947);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2946;\r\n if(var2) {\r\n var3 = !class_687.field_2946;\r\n }\r\n\r\n class_687.field_2946 = var3;\r\n this.field_973.field_449 = String.valueOf(class_687.field_2946);\r\n this.field_984 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2948;\r\n if(var2) {\r\n var3 = !class_687.field_2948;\r\n }\r\n\r\n class_687.field_2948 = var3;\r\n this.field_974.field_449 = String.valueOf(class_687.field_2948);\r\n this.field_983 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2951;\r\n if(var2) {\r\n var3 = !class_687.field_2951;\r\n }\r\n\r\n class_687.field_2951 = var3;\r\n this.field_975.field_449 = String.valueOf(class_687.field_2951);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2952;\r\n if(var2) {\r\n var3 = !class_687.field_2952;\r\n }\r\n\r\n class_687.field_2952 = var3;\r\n this.field_976.field_449 = String.valueOf(class_687.field_2952);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2949 = this.field_979.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2950 = this.field_980.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2953 = (double)this.field_981.method_834();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n bao var6;\r\n label77: {\r\n class_207 var5;\r\n label142: {\r\n var3 = this.field_983;\r\n if(var2) {\r\n if(this.field_983) {\r\n bbv var4 = bao.method_5273().canLoseFocus4;\r\n bbv.SetHUDText(\"\");\r\n }\r\n\r\n var5 = this;\r\n if(!var2) {\r\n break label142;\r\n }\r\n\r\n var3 = this.field_984;\r\n }\r\n\r\n if(var3) {\r\n var6 = this.field_557;\r\n if(!var2) {\r\n break label77;\r\n }\r\n\r\n if(this.field_557.cursorCounter6 != null) {\r\n class_687.field_2954 = true;\r\n }\r\n }\r\n\r\n class_687.method_3712();\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n var5 = this;\r\n }\r\n\r\n var6 = var5.field_557;\r\n }\r\n\r\n var6.method_5236(this.field_971);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.method_3711();\r\n this.field_557.method_5236(this.field_971);\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n }", "private List<VariableCoefficientTuple> getVariablesUsedForBranchingInThisRectangle(Rectangle rect){\r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle = new ArrayList<VariableCoefficientTuple> ();\r\n \r\n for (String var : rect.zeroFixedVariables) {\r\n if (!treeNode_zeroFixedVariables.contains(var) ) \r\n variablesUsedForBranchingInThisRectangle.add(new VariableCoefficientTuple(var, ZERO) );\r\n }\r\n for (String var : rect.oneFixedVariables){ \r\n if ( !treeNode_oneFixedVariables.contains(var)) {\r\n variablesUsedForBranchingInThisRectangle.add(new VariableCoefficientTuple(var, ONE));\r\n } \r\n }\r\n \r\n return variablesUsedForBranchingInThisRectangle;\r\n }", "String branch();", "public abstract void mo56922b(@NonNull C4125a aVar);", "public void solution() {\n\t\t\n\t}", "public abstract void mo9812b(int i, C3635j jVar);", "public abstract void mo12694b(C1085v vVar, int i);", "@Override\n\tpublic void visit(UserVariable arg0) {\n\t\t\n\t}", "public void mo1327d(ac acVar) {\n }", "public /* synthetic */ void mo7209b(as asVar, bp bpVar) throws bv {\n m21417a(asVar, (bc) bpVar);\n }", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "private final <T> T m968r(C2170by<T> byVar) {\n try {\n mo33701a();\n return byVar.mo33699a();\n } finally {\n mo33702b();\n }\n }", "private void m3417d(C0933b bVar) {\n m3422v(bVar);\n }", "public void mo1554b(ac acVar) {\n }", "public abstract void mo56919a(@NonNull C4125a aVar);", "private void m3416c(C0933b bVar) {\n m3422v(bVar);\n }", "private void method_4318() {\r\n String[] var1;\r\n int var11;\r\n label68: {\r\n var1 = class_752.method_4253();\r\n class_758 var10000 = this;\r\n if(var1 != null) {\r\n if(this.field_3417 != null) {\r\n label71: {\r\n var11 = this.field_3417.field_3012;\r\n if(var1 != null) {\r\n if(this.field_3417.field_3012) {\r\n var10000 = this;\r\n if(var1 != null) {\r\n if(!this.field_2990.field_1832) {\r\n this.method_409(this.field_3404, class_1691.method_9334((class_1036)null), 10.0F);\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var10000.field_3417 = null;\r\n if(var1 != null) {\r\n break label71;\r\n }\r\n }\r\n\r\n var11 = this.field_3029 % 10;\r\n }\r\n\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 == 0) {\r\n float var13;\r\n var11 = (var13 = this.method_406() - this.method_405()) == 0.0F?0:(var13 < 0.0F?-1:1);\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 < 0) {\r\n this.method_4188(this.method_406() + 1.0F);\r\n }\r\n }\r\n }\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var11 = var10000.field_3028.nextInt(10);\r\n }\r\n\r\n if(var11 == 0) {\r\n float var2 = 32.0F;\r\n List var3 = this.field_2990.method_2157(class_705.class, this.field_3004.method_7097((double)var2, (double)var2, (double)var2));\r\n class_705 var4 = null;\r\n double var5 = Double.MAX_VALUE;\r\n Iterator var7 = var3.iterator();\r\n\r\n while(true) {\r\n if(var7.hasNext()) {\r\n class_705 var8 = (class_705)var7.next();\r\n double var9 = var8.method_3891(this);\r\n if(var1 == null) {\r\n break;\r\n }\r\n\r\n label43: {\r\n double var12 = var9;\r\n if(var1 != null) {\r\n if(var9 >= var5) {\r\n break label43;\r\n }\r\n\r\n var12 = var9;\r\n }\r\n\r\n var5 = var12;\r\n var4 = var8;\r\n }\r\n\r\n if(var1 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.field_3417 = var4;\r\n break;\r\n }\r\n }\r\n\r\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n Label label0 = new Label();\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.index = (-2450);\n classWriter0.newInteger(2);\n String[] stringArray0 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"oc[MfnZM[~MHOK iO\", \"/i%NB\", \"LocalVariableTable\", stringArray0, false, false);\n methodWriter0.visitLocalVariable(\"/i%NB\", \"LocalVariableTable\", \"LocalVariableTable\", label0, label0, (-2450));\n methodWriter0.visitLocalVariable(\"RuntimeVisibleAnnotations\", \"*/TEiGBLds&\", \"/i%NB\", label0, label0, (-2444));\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void mo23981a(C4321b bVar) {\n }", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test_process_some_stage_operation()\n\t{\n\t}", "private static boolean method_2689(aji var0, ahb var1, int var2, int var3, int var4, boolean var5) {\r\n boolean var10;\r\n label123: {\r\n String[] var6 = class_752.method_4253();\r\n aji var10000 = var0;\r\n aji var10001 = class_1192.field_6076;\r\n if(var6 != null) {\r\n if(var0 == class_1192.field_6076) {\r\n break label123;\r\n }\r\n\r\n var10000 = var0;\r\n var10001 = class_1192.field_6088;\r\n }\r\n\r\n label124: {\r\n if(var6 != null) {\r\n if(var10000 == var10001) {\r\n break label123;\r\n }\r\n\r\n var10000 = var0;\r\n if(var6 == null) {\r\n break label124;\r\n }\r\n\r\n var10001 = class_1192.field_6109;\r\n }\r\n\r\n if(var10000 == var10001) {\r\n break label123;\r\n }\r\n\r\n var10000 = var0;\r\n }\r\n\r\n String var9 = var10000.method_2510();\r\n String[] var11 = field_2148;\r\n var10 = var9.equals(\"tile.pumpkinStem\");\r\n if(var6 == null) {\r\n return var10;\r\n }\r\n\r\n if(!var10) {\r\n label126: {\r\n label127: {\r\n var10000 = var0;\r\n var10001 = class_1192.field_6128;\r\n if(var6 != null) {\r\n if(var0 == class_1192.field_6128) {\r\n break label126;\r\n }\r\n\r\n var10000 = var0;\r\n if(var6 == null) {\r\n break label127;\r\n }\r\n\r\n var10001 = class_1192.field_6112;\r\n }\r\n\r\n if(var10000 == var10001) {\r\n break label126;\r\n }\r\n\r\n var10000 = var0;\r\n }\r\n\r\n int var8;\r\n label88: {\r\n label129: {\r\n label130: {\r\n label85: {\r\n class_420 var12 = class_1192.field_6060;\r\n if(var6 != null) {\r\n if(var10000 == class_1192.field_6060) {\r\n break label85;\r\n }\r\n\r\n var10000 = var0;\r\n if(var6 == null) {\r\n break label130;\r\n }\r\n\r\n var12 = class_1192.field_6056;\r\n }\r\n\r\n if(var10000 != var12) {\r\n var10000 = var0;\r\n break label130;\r\n }\r\n }\r\n\r\n var8 = method_2687(var1.method_33(var2, var3, var4));\r\n if(var6 == null) {\r\n break label88;\r\n }\r\n\r\n if(var8 != 0) {\r\n return false;\r\n }\r\n break label129;\r\n }\r\n\r\n float var13;\r\n var8 = (var13 = var10000.method_2439(var1, var2, var3, var4) - -1.0F) == 0.0F?0:(var13 < 0.0F?-1:1);\r\n if(var6 != null) {\r\n if(var8 == 0) {\r\n return false;\r\n }\r\n\r\n var8 = var0.method_2514();\r\n }\r\n\r\n byte var7 = 2;\r\n if(var6 != null) {\r\n if(var8 == 2) {\r\n return false;\r\n }\r\n\r\n var8 = var0.method_2514();\r\n if(var6 == null) {\r\n break label88;\r\n }\r\n\r\n var7 = 1;\r\n }\r\n\r\n if(var8 == var7) {\r\n var10 = var5;\r\n if(var6 != null) {\r\n if(!var5) {\r\n return false;\r\n }\r\n\r\n var10 = true;\r\n }\r\n\r\n return var10;\r\n }\r\n }\r\n\r\n var8 = var0 instanceof class_28;\r\n }\r\n\r\n if(var6 != null) {\r\n var8 = var8 == 0?1:0;\r\n }\r\n\r\n return (boolean)var8;\r\n }\r\n }\r\n }\r\n\r\n var10 = false;\r\n return var10;\r\n }", "public static void main(String[] args) \r\n\t{\r\n\t\t\r\n\t\tFinal_Variable obj=new Final_Variable();\r\n\t\tSystem.out.println(\"Before change a value is --> \"+obj.a);\r\n\t\tobj.a=400;\r\n\t\tSystem.out.println(\"After change a value is --> \"+obj.a);\r\n\t\r\n\r\n\t}", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public void testMethodInfo885() throws Exception {\n\t\tClassInfo var2769 = instantiateClassInfo424();\n\t\tLocalVariableInfo var2770 = instantiateLocalVariableInfo423();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2772 = new MethodInfo(var2769, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2772.isSetter();\n\t\tvar2772.isSetter();\n\t}", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public void mo32543a(C6744b bVar) {\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public boolean method_2511(ahb var1, int var2, int var3, int var4, int var5, int var6) {\r\n String[] var7 = class_752.method_4253();\r\n int var10000 = var1.field_1832;\r\n if(var7 != null) {\r\n label157: {\r\n if(!var1.field_1832) {\r\n byte var8 = this.method_2685(var1, var2, var3, var4, var6);\r\n var10000 = var8;\r\n if(var7 != null) {\r\n label147: {\r\n if(var8 != 0) {\r\n var10000 = var5;\r\n if(var7 == null) {\r\n break label147;\r\n }\r\n\r\n if(var5 == 1) {\r\n var1.method_2055(var2, var3, var4, var6 | 8, 2);\r\n return false;\r\n }\r\n }\r\n\r\n var10000 = var8;\r\n }\r\n }\r\n\r\n if(var7 == null) {\r\n break label157;\r\n }\r\n\r\n if(var10000 == 0) {\r\n var10000 = var5;\r\n if(var7 == null) {\r\n break label157;\r\n }\r\n\r\n if(var5 == 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n var10000 = var5;\r\n }\r\n }\r\n\r\n label162: {\r\n double var10001;\r\n double var10002;\r\n double var10003;\r\n boolean var20;\r\n if(var7 != null) {\r\n if(var10000 == 0) {\r\n var20 = this.method_2691(var1, var2, var3, var4, var6);\r\n if(var7 != null) {\r\n if(!var20) {\r\n return false;\r\n }\r\n\r\n var1.method_2055(var2, var3, var4, var6 | 8, 2);\r\n }\r\n\r\n var10001 = (double)var2 + 0.5D;\r\n var10002 = (double)var3 + 0.5D;\r\n var10003 = (double)var4 + 0.5D;\r\n String[] var17 = field_2148;\r\n var1.method_2084(var10001, var10002, var10003, \"tile.piston.out\", 0.5F, var1.field_1819.nextFloat() * 0.25F + 0.6F);\r\n if(var7 != null) {\r\n break label162;\r\n }\r\n }\r\n\r\n var10000 = var5;\r\n }\r\n\r\n if(var7 == null) {\r\n return (boolean)var10000;\r\n }\r\n\r\n if(var10000 == 1) {\r\n class_580 var18 = var1.method_31(var2 + class_1707.field_8947[var6], var3 + class_1707.field_8948[var6], var4 + class_1707.field_8949[var6]);\r\n var20 = var18 instanceof class_598;\r\n if(var7 != null) {\r\n if(var20) {\r\n ((class_598)var18).method_3196();\r\n }\r\n\r\n var1.method_2054(var2, var3, var4, class_1192.field_6063, var6, 3);\r\n var1.method_2131(var2, var3, var4, class_474.method_2823(this, var6, var6, false, true));\r\n var20 = this.field_2143;\r\n }\r\n\r\n if(var7 != null) {\r\n label125: {\r\n if(var20) {\r\n int var9;\r\n int var10;\r\n int var11;\r\n aji var12;\r\n int var13;\r\n byte var14;\r\n label119: {\r\n var9 = var2 + class_1707.field_8947[var6] * 2;\r\n var10 = var3 + class_1707.field_8948[var6] * 2;\r\n var11 = var4 + class_1707.field_8949[var6] * 2;\r\n var12 = var1.getBlock(var9, var10, var11);\r\n var13 = var1.method_33(var9, var10, var11);\r\n var14 = 0;\r\n if(var12 == class_1192.field_6063) {\r\n class_580 var15 = var1.method_31(var9, var10, var11);\r\n var10000 = var15 instanceof class_598;\r\n if(var7 == null) {\r\n break label119;\r\n }\r\n\r\n if(var10000 != 0) {\r\n class_598 var16 = (class_598)var15;\r\n var10000 = var16.method_3189();\r\n if(var7 == null) {\r\n break label119;\r\n }\r\n\r\n if(var10000 == var6) {\r\n var10000 = var16.method_3188();\r\n if(var7 == null) {\r\n break label119;\r\n }\r\n\r\n if(var10000 != 0) {\r\n var16.method_3196();\r\n var12 = var16.method_3187();\r\n var13 = var16.getBlock96();\r\n var14 = 1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n var10000 = var14;\r\n }\r\n\r\n label165: {\r\n if(var7 != null) {\r\n label106: {\r\n if(var10000 == 0) {\r\n label166: {\r\n aji var21 = var12;\r\n if(var7 != null) {\r\n if(var12.method_2424() == awt.field_4170) {\r\n break label166;\r\n }\r\n\r\n var21 = var12;\r\n }\r\n\r\n var10000 = method_2689(var21, var1, var9, var10, var11, false);\r\n if(var7 == null) {\r\n break label106;\r\n }\r\n\r\n if(var10000 != 0) {\r\n label95: {\r\n var10000 = var12.method_2514();\r\n if(var7 != null) {\r\n if(var10000 != 0) {\r\n label91: {\r\n var21 = var12;\r\n class_420 var19 = class_1192.field_6060;\r\n if(var7 != null) {\r\n if(var12 == class_1192.field_6060) {\r\n break label91;\r\n }\r\n\r\n var21 = var12;\r\n var19 = class_1192.field_6056;\r\n }\r\n\r\n if(var21 != var19) {\r\n break label95;\r\n }\r\n }\r\n }\r\n\r\n var2 += class_1707.field_8947[var6];\r\n var3 += class_1707.field_8948[var6];\r\n var4 += class_1707.field_8949[var6];\r\n var1.method_2054(var2, var3, var4, class_1192.field_6063, var13, 3);\r\n var1.method_2131(var2, var3, var4, class_474.method_2823(var12, var13, var6, false, false));\r\n var1.method_2056(var9, var10, var11);\r\n }\r\n\r\n if(var7 != null) {\r\n break label165;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n var10000 = var14;\r\n }\r\n }\r\n\r\n if(var7 != null && var10000 == 0) {\r\n var1.method_2056(var2 + class_1707.field_8947[var6], var3 + class_1707.field_8948[var6], var4 + class_1707.field_8949[var6]);\r\n }\r\n }\r\n\r\n if(var7 != null) {\r\n break label125;\r\n }\r\n }\r\n\r\n var1.method_2056(var2 + class_1707.field_8947[var6], var3 + class_1707.field_8948[var6], var4 + class_1707.field_8949[var6]);\r\n }\r\n }\r\n\r\n var10001 = (double)var2 + 0.5D;\r\n var10002 = (double)var3 + 0.5D;\r\n var10003 = (double)var4 + 0.5D;\r\n String[] var10004 = field_2148;\r\n var1.method_2084(var10001, var10002, var10003, \"tile.piston.in\", 0.5F, var1.field_1819.nextFloat() * 0.15F + 0.6F);\r\n }\r\n }\r\n\r\n var10000 = 1;\r\n return (boolean)var10000;\r\n }", "public abstract void mo9246b(C0707b bVar);", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testSelfInstanceVarReflectionObjectCycle() {\n final SelfInstanceVarReflectionTestFixture test = new SelfInstanceVarReflectionTestFixture();\n assertEquals(this.toBaseString(test) + \"[typeIsSelf=\" + this.toBaseString(test) + \"]\", test.toString());\n }", "private void computeOutput(RefactoringStatus status) {\n FlowContext flowContext = new FlowContext(0, fMaxVariableId + 1);\n flowContext.setConsiderAccessMode(true);\n flowContext.setComputeMode(FlowContext.RETURN_VALUES);\n FlowInfo returnInfo = new InOutFlowAnalyzer(flowContext).perform(getSelectedNodes());\n IVariableBinding[] returnValues = returnInfo.get(flowContext, FlowInfo.WRITE | FlowInfo.WRITE_POTENTIAL | FlowInfo.UNKNOWN);\n // Compute a selection that exactly covers the selected nodes\n IRegion region = getSelectedNodeRange();\n Selection selection = Selection.createFromStartLength(region.getOffset(), region.getLength());\n List<IVariableBinding> localReads = new ArrayList();\n flowContext.setComputeMode(FlowContext.ARGUMENTS);\n FlowInfo argInfo = new InputFlowAnalyzer(flowContext, selection, true).perform(fEnclosingBodyDeclaration);\n IVariableBinding[] reads = argInfo.get(flowContext, FlowInfo.READ | FlowInfo.READ_POTENTIAL | FlowInfo.UNKNOWN);\n outer: for (int i = 0; i < returnValues.length && localReads.size() < returnValues.length; i++) {\n IVariableBinding binding = returnValues[i];\n for (int x = 0; x < reads.length; x++) {\n if (reads[x] == binding) {\n localReads.add(binding);\n fReturnValue = binding;\n continue outer;\n }\n }\n }\n switch(localReads.size()) {\n case 0:\n fReturnValue = null;\n break;\n case 1:\n break;\n default:\n fReturnValue = null;\n StringBuffer affectedLocals = new StringBuffer();\n for (int i = 0; i < localReads.size(); i++) {\n IVariableBinding binding = localReads.get(i);\n String bindingName = BindingLabelProvider.getBindingLabel(binding, BindingLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.F_PRE_TYPE_SIGNATURE);\n affectedLocals.append(bindingName);\n if (i != localReads.size() - 1) {\n affectedLocals.append('\\n');\n }\n }\n String message = MessageFormat.format(RefactoringCoreMessages.ExtractMethodAnalyzer_assignments_to_local, new Object[] { affectedLocals.toString() });\n status.addFatalError(message, JavaStatusContext.create(fCUnit, getSelection()));\n return;\n }\n List<IVariableBinding> callerLocals = new ArrayList(5);\n FlowInfo localInfo = new InputFlowAnalyzer(flowContext, selection, false).perform(fEnclosingBodyDeclaration);\n IVariableBinding[] writes = localInfo.get(flowContext, FlowInfo.WRITE | FlowInfo.WRITE_POTENTIAL | FlowInfo.UNKNOWN);\n for (int i = 0; i < writes.length; i++) {\n IVariableBinding write = writes[i];\n if (getSelection().covers(ASTNodes.findDeclaration(write, fEnclosingBodyDeclaration)))\n callerLocals.add(write);\n }\n fCallerLocals = callerLocals.toArray(new IVariableBinding[callerLocals.size()]);\n if (fReturnValue != null && getSelection().covers(ASTNodes.findDeclaration(fReturnValue, fEnclosingBodyDeclaration)))\n fReturnLocal = fReturnValue;\n }", "@Test(expected = NullPointerException.class)\n public void Test02() {\n component = new DamageEffectComponent(null, 3, 20);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.newInteger(1);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.newConst(\"Label offset position has not been resolved yet\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"Label offset position has not been resolved yet\";\n stringArray0[2] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[6] = \"Label offset position has not been resolved yet\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Label offset position has not been resolved yet\";\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"/Irp@$6rwLOSG)14\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 4, \"\\\".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"\\\".3t\\\"0\", stringArray0, false, false);\n Label label1 = new Label();\n byte[] byteArray0 = new byte[0];\n label1.resolve(methodWriter0, 168, byteArray0);\n classWriter0.newClassItem(\"~)yCTRxQ#s$y[Ly%\");\n Label label2 = new Label();\n label1.inputStackTop = 217;\n // Undeclared exception!\n try { \n methodWriter0.visitParameterAnnotation(4, \"java/lang/dyn/Dynamic\", true);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 4\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "C3454q mo12651a(Fragment fragment, C3676k kVar);", "public void mo9877a(C1495b bVar) {\n C6028f.this.compositeDisposable.mo9785e(bVar);\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "public abstract void mo53652a(PushCommand vVar);", "public RelocateBranch() {\n }", "private Solution() { }", "private Solution() { }", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "void mo7439b(C0933b bVar);", "public void mo9883a(C1495b bVar) {\n C6638d.this.compositeDisposable.mo9785e(bVar);\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(4096);\n ClassWriter classWriter1 = new ClassWriter((-2894));\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"ConstantValue\";\n stringArray0[1] = \"LocalVariableTable\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n stringArray0[2] = \"ConstantValue\";\n stringArray0[3] = \"ConstantValue\";\n stringArray0[4] = \"0T1MW_`O#}<L\";\n stringArray0[5] = \"h#w=z5(0SfaM)DKLY\";\n stringArray0[6] = \"Synthetic\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"ConstantValue\", \"h#w=z5(0SfaM)DKLY\", \"Synthetic\", stringArray0, true, false);\n methodWriter0.visitAnnotationDefault();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"LocalVariableTable\");\n methodWriter0.visitMaxs(1, (-160));\n Label label0 = new Label();\n Edge edge0 = label0.successors;\n Label[] labelArray0 = new Label[2];\n labelArray0[0] = label0;\n labelArray0[1] = label0;\n methodWriter0.visitTableSwitchInsn(1, 4096, label0, labelArray0);\n methodWriter0.visitMethodInsn((-2894), \"/#p[v!vM>^U#((tz?0\", \"0T1MW_`O#}<L\", \"Code\");\n }", "boolean isBranchTaken();", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "private void assign(DefinitionStmt stmt) {\n \n soot.Value rightOp = stmt.getRightOp();\n Value result;\n \n if (rightOp instanceof Immediate) {\n Immediate immediate = (Immediate) rightOp;\n result = immediate(stmt, immediate);\n } else if (rightOp instanceof ThisRef) {\n result = function.getParameterRef(1);\n } else if (rightOp instanceof ParameterRef) {\n ParameterRef ref = (ParameterRef) rightOp;\n int index = (sootMethod.isStatic() ? 1 : 2) + ref.getIndex();\n Value p = new VariableRef(\"p\" + index, getType(ref.getType()));\n result = widenToI32Value(p, isUnsigned(ref.getType()));\n } else if (rightOp instanceof CaughtExceptionRef) {\n result = call(BC_EXCEPTION_CLEAR, env);\n } else if (rightOp instanceof ArrayRef) {\n ArrayRef ref = (ArrayRef) rightOp;\n VariableRef base = (VariableRef) immediate(stmt, (Immediate) ref.getBase());\n if (ref.getType() instanceof NullType) {\n // The base value is always null. Do a null check which will\n // always throw NPE.\n checkNull(stmt, base);\n return;\n } else {\n Value index = immediate(stmt, (Immediate) ref.getIndex());\n checkNull(stmt, base);\n checkBounds(stmt, base, index);\n result = call(getArrayLoad(ref.getType()), base, index);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n }\n } else if (rightOp instanceof InstanceFieldRef) {\n InstanceFieldRef ref = (InstanceFieldRef) rightOp;\n Value base = immediate(stmt, (Immediate) ref.getBase());\n checkNull(stmt, base);\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_getter\", \n new FunctionType(getType(ref.getType()), ENV_PTR, OBJECT_PTR));\n } else {\n soot.Type runtimeType = ref.getBase().getType();\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n String runtimeClassName = runtimeType == NullType.v() ? targetClassName : getInternalName(runtimeType);\n Trampoline trampoline = new GetField(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()), runtimeClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n result = call(fn, env, base);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n } else if (rightOp instanceof StaticFieldRef) {\n StaticFieldRef ref = (StaticFieldRef) rightOp;\n FunctionRef fn = Intrinsics.getIntrinsic(sootMethod, stmt);\n if (fn == null) {\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_getter\", \n new FunctionType(getType(ref.getType()), ENV_PTR));\n } else {\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n Trampoline trampoline = new GetStatic(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()));\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n }\n result = call(fn, env);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n } else if (rightOp instanceof Expr) {\n if (rightOp instanceof BinopExpr) {\n BinopExpr expr = (BinopExpr) rightOp;\n Type rightType = getLocalType(expr.getType());\n Variable resultVar = function.newVariable(rightType);\n result = resultVar.ref();\n Value op1 = immediate(stmt, (Immediate) expr.getOp1());\n Value op2 = immediate(stmt, (Immediate) expr.getOp2());\n if (rightOp instanceof AddExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Add(resultVar, op1, op2));\n } else {\n function.add(new Fadd(resultVar, op1, op2));\n }\n } else if (rightOp instanceof AndExpr) {\n function.add(new And(resultVar, op1, op2));\n } else if (rightOp instanceof CmpExpr) {\n Variable t1 = function.newVariable(I1);\n Variable t2 = function.newVariable(I1);\n Variable t3 = function.newVariable(resultVar.getType());\n Variable t4 = function.newVariable(resultVar.getType());\n function.add(new Icmp(t1, Condition.slt, op1, op2));\n function.add(new Icmp(t2, Condition.sgt, op1, op2));\n function.add(new Zext(t3, new VariableRef(t1), resultVar.getType()));\n function.add(new Zext(t4, new VariableRef(t2), resultVar.getType()));\n function.add(new Sub(resultVar, new VariableRef(t4), new VariableRef(t3)));\n } else if (rightOp instanceof DivExpr) {\n if (rightType instanceof IntegerType) {\n FunctionRef f = rightType == I64 ? LDIV : IDIV;\n result = call(f, env, op1, op2);\n } else {\n // float or double\n function.add(new Fdiv(resultVar, op1, op2));\n }\n } else if (rightOp instanceof MulExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Mul(resultVar, op1, op2));\n } else {\n function.add(new Fmul(resultVar, op1, op2));\n }\n } else if (rightOp instanceof OrExpr) {\n function.add(new Or(resultVar, op1, op2));\n } else if (rightOp instanceof RemExpr) {\n if (rightType instanceof IntegerType) {\n FunctionRef f = rightType == I64 ? LREM : IREM;\n result = call(f, env, op1, op2);\n } else {\n FunctionRef f = rightType == DOUBLE ? DREM : FREM;\n result = call(f, env, op1, op2);\n }\n } else if (rightOp instanceof ShlExpr || rightOp instanceof ShrExpr || rightOp instanceof UshrExpr) {\n IntegerType type = (IntegerType) op1.getType();\n int bits = type.getBits();\n Variable t = function.newVariable(op2.getType());\n function.add(new And(t, op2, new IntegerConstant(bits - 1, (IntegerType) op2.getType())));\n Value shift = t.ref();\n if (((IntegerType) shift.getType()).getBits() < bits) {\n Variable tmp = function.newVariable(type);\n function.add(new Zext(tmp, shift, type));\n shift = tmp.ref();\n }\n if (rightOp instanceof ShlExpr) {\n function.add(new Shl(resultVar, op1, shift));\n } else if (rightOp instanceof ShrExpr) {\n function.add(new Ashr(resultVar, op1, shift));\n } else {\n function.add(new Lshr(resultVar, op1, shift));\n }\n } else if (rightOp instanceof SubExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Sub(resultVar, op1, op2));\n } else {\n function.add(new Fsub(resultVar, op1, op2));\n }\n } else if (rightOp instanceof XorExpr) {\n function.add(new Xor(resultVar, op1, op2));\n } else if (rightOp instanceof XorExpr) {\n function.add(new Xor(resultVar, op1, op2));\n } else if (rightOp instanceof CmplExpr) {\n FunctionRef f = op1.getType() == FLOAT ? FCMPL : DCMPL;\n function.add(new Call(resultVar, f, op1, op2));\n } else if (rightOp instanceof CmpgExpr) {\n FunctionRef f = op1.getType() == FLOAT ? FCMPG : DCMPG;\n function.add(new Call(resultVar, f, op1, op2));\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n } else if (rightOp instanceof CastExpr) {\n Value op = immediate(stmt, (Immediate) ((CastExpr) rightOp).getOp());\n soot.Type sootTargetType = ((CastExpr) rightOp).getCastType();\n soot.Type sootSourceType = ((CastExpr) rightOp).getOp().getType();\n if (sootTargetType instanceof PrimType) {\n Type targetType = getType(sootTargetType);\n Type sourceType = getType(sootSourceType);\n if (targetType instanceof IntegerType && sourceType instanceof IntegerType) {\n // op is at least I32 and has already been widened if source type had fewer bits then I32\n IntegerType toType = (IntegerType) targetType;\n IntegerType fromType = (IntegerType) op.getType();\n Variable v = function.newVariable(toType);\n if (fromType.getBits() < toType.getBits()) {\n // Widening\n if (isUnsigned(sootSourceType)) {\n function.add(new Zext(v, op, toType));\n } else {\n function.add(new Sext(v, op, toType));\n }\n } else if (fromType.getBits() == toType.getBits()) {\n function.add(new Bitcast(v, op, toType));\n } else {\n // Narrow\n function.add(new Trunc(v, op, toType));\n }\n result = widenToI32Value(v.ref(), isUnsigned(sootTargetType));\n } else if (targetType instanceof FloatingPointType && sourceType instanceof IntegerType) {\n // we always to a signed conversion since if op is char it has already been zero extended to I32\n Variable v = function.newVariable(targetType);\n function.add(new Sitofp(v, op, targetType));\n result = v.ref();\n } else if (targetType instanceof FloatingPointType && sourceType instanceof FloatingPointType) {\n Variable v = function.newVariable(targetType);\n if (targetType == FLOAT && sourceType == DOUBLE) {\n function.add(new Fptrunc(v, op, targetType));\n } else if (targetType == DOUBLE && sourceType == FLOAT) {\n function.add(new Fpext(v, op, targetType));\n } else {\n function.add(new Bitcast(v, op, targetType));\n }\n result = v.ref();\n } else {\n // F2I, F2L, D2I, D2L\n FunctionRef f = null;\n if (targetType == I32 && sourceType == FLOAT) {\n f = F2I;\n } else if (targetType == I64 && sourceType == FLOAT) {\n f = F2L;\n } else if (targetType == I32 && sourceType == DOUBLE) {\n f = D2I;\n } else if (targetType == I64 && sourceType == DOUBLE) {\n f = D2L;\n } else {\n throw new IllegalArgumentException();\n }\n Variable v = function.newVariable(targetType);\n function.add(new Call(v, f, op));\n result = v.ref();\n }\n } else {\n if (sootTargetType instanceof soot.ArrayType \n && ((soot.ArrayType) sootTargetType).getElementType() instanceof PrimType) {\n soot.Type primType = ((soot.ArrayType) sootTargetType).getElementType();\n GlobalRef arrayClassPtr = new GlobalRef(\"array_\" + getDescriptor(primType), CLASS_PTR);\n Variable arrayClass = function.newVariable(CLASS_PTR);\n function.add(new Load(arrayClass, arrayClassPtr));\n result = call(CHECKCAST_PRIM_ARRAY, env, arrayClass.ref(), op);\n } else {\n String targetClassName = getInternalName(sootTargetType);\n Trampoline trampoline = new Checkcast(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, op);\n }\n }\n } else if (rightOp instanceof InstanceOfExpr) {\n Value op = immediate(stmt, (Immediate) ((InstanceOfExpr) rightOp).getOp());\n soot.Type checkType = ((InstanceOfExpr) rightOp).getCheckType();\n if (checkType instanceof soot.ArrayType \n && ((soot.ArrayType) checkType).getElementType() instanceof PrimType) {\n soot.Type primType = ((soot.ArrayType) checkType).getElementType();\n GlobalRef arrayClassPtr = new GlobalRef(\"array_\" + getDescriptor(primType), CLASS_PTR);\n Variable arrayClass = function.newVariable(CLASS_PTR);\n function.add(new Load(arrayClass, arrayClassPtr));\n result = call(INSTANCEOF_PRIM_ARRAY, env, arrayClass.ref(), op);\n } else {\n String targetClassName = getInternalName(checkType);\n Trampoline trampoline = new Instanceof(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, op);\n }\n } else if (rightOp instanceof NewExpr) {\n String targetClassName = getInternalName(((NewExpr) rightOp).getBaseType());\n FunctionRef fn = null;\n if (targetClassName.equals(this.className)) {\n fn = FunctionBuilder.allocator(sootMethod.getDeclaringClass()).ref();\n } else {\n Trampoline trampoline = new New(this.className, targetClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n result = call(fn, env);\n } else if (rightOp instanceof NewArrayExpr) {\n NewArrayExpr expr = (NewArrayExpr) rightOp;\n Value size = immediate(stmt, (Immediate) expr.getSize());\n if (expr.getBaseType() instanceof PrimType) {\n result = call(getNewArray(expr.getBaseType()), env, size);\n } else {\n String targetClassName = getInternalName(expr.getType());\n Trampoline trampoline = new Anewarray(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, size);\n }\n } else if (rightOp instanceof NewMultiArrayExpr) {\n NewMultiArrayExpr expr = (NewMultiArrayExpr) rightOp;\n if (expr.getBaseType().numDimensions == 1 && expr.getBaseType().getElementType() instanceof PrimType) {\n Value size = immediate(stmt, (Immediate) expr.getSize(0));\n result = call(getNewArray(expr.getBaseType().getElementType()), env, size);\n } else {\n for (int i = 0; i < expr.getSizeCount(); i++) {\n Value size = immediate(stmt, (Immediate) expr.getSize(i));\n Variable ptr = function.newVariable(new PointerType(I32));\n function.add(new Getelementptr(ptr, dims.ref(), 0, i));\n function.add(new Store(size, ptr.ref()));\n }\n Variable dimsI32 = function.newVariable(new PointerType(I32));\n function.add(new Bitcast(dimsI32, dims.ref(), dimsI32.getType()));\n String targetClassName = getInternalName(expr.getType());\n Trampoline trampoline = new Multianewarray(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, new IntegerConstant(expr.getSizeCount()), dimsI32.ref());\n }\n } else if (rightOp instanceof InvokeExpr) {\n result = invokeExpr(stmt, (InvokeExpr) rightOp);\n } else if (rightOp instanceof LengthExpr) {\n Value op = immediate(stmt, (Immediate) ((LengthExpr) rightOp).getOp());\n checkNull(stmt, op);\n Variable v = function.newVariable(I32);\n function.add(new Call(v, ARRAY_LENGTH, op));\n result = v.ref();\n } else if (rightOp instanceof NegExpr) {\n NegExpr expr = (NegExpr) rightOp;\n Value op = immediate(stmt, (Immediate) expr.getOp());\n Type rightType = op.getType();\n Variable v = function.newVariable(op.getType());\n if (rightType instanceof IntegerType) {\n function.add(new Sub(v, new IntegerConstant(0, (IntegerType) rightType), op));\n } else {\n function.add(new Fmul(v, new FloatingPointConstant(-1.0, (FloatingPointType) rightType), op));\n }\n result = v.ref();\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n \n soot.Value leftOp = stmt.getLeftOp();\n \n if (leftOp instanceof Local) {\n Local local = (Local) leftOp;\n VariableRef v = new VariableRef(local.getName(), new PointerType(getLocalType(leftOp.getType())));\n function.add(new Store(result, v, !sootMethod.getActiveBody().getTraps().isEmpty()));\n } else {\n Type leftType = getType(leftOp.getType());\n Value narrowedResult = narrowFromI32Value(leftType, result);\n if (leftOp instanceof ArrayRef) {\n ArrayRef ref = (ArrayRef) leftOp;\n VariableRef base = (VariableRef) immediate(stmt, (Immediate) ref.getBase());\n Value index = immediate(stmt, (Immediate) ref.getIndex());\n checkNull(stmt, base);\n checkBounds(stmt, base, index);\n if (leftOp.getType() instanceof RefLikeType) {\n call(BC_SET_OBJECT_ARRAY_ELEMENT, env, base, index, narrowedResult);\n } else {\n call(getArrayStore(leftOp.getType()), base, index, narrowedResult);\n }\n } else if (leftOp instanceof InstanceFieldRef) {\n InstanceFieldRef ref = (InstanceFieldRef) leftOp;\n Value base = immediate(stmt, (Immediate) ref.getBase());\n checkNull(stmt, base);\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_setter\", \n new FunctionType(VOID, ENV_PTR, OBJECT_PTR, getType(ref.getType())));\n } else {\n soot.Type runtimeType = ref.getBase().getType();\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n String runtimeClassName = runtimeType == NullType.v() ? targetClassName : getInternalName(runtimeType);\n Trampoline trampoline = new PutField(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()), runtimeClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n call(fn, env, base, narrowedResult);\n } else if (leftOp instanceof StaticFieldRef) {\n StaticFieldRef ref = (StaticFieldRef) leftOp;\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_setter\", \n new FunctionType(VOID, ENV_PTR, getType(ref.getType())));\n } else {\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n Trampoline trampoline = new PutStatic(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()));\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n call(fn, env, narrowedResult);\n } else {\n throw new IllegalArgumentException(\"Unknown type for leftOp: \" + leftOp.getClass());\n }\n }\n }", "private boolean method_2685(ahb var1, int var2, int var3, int var4, int var5) {\r\n String[] var6 = class_752.method_4253();\r\n int var10000 = var5;\r\n boolean var7;\r\n if(var6 != null) {\r\n label148: {\r\n if(var5 != 0) {\r\n var10000 = var1.method_2170(var2, var3 - 1, var4, 0);\r\n if(var6 == null) {\r\n break label148;\r\n }\r\n\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n }\r\n\r\n var10000 = var5;\r\n }\r\n }\r\n\r\n byte var10001 = 1;\r\n if(var6 != null) {\r\n label138: {\r\n if(var10000 != 1) {\r\n var10000 = var1.method_2170(var2, var3 + 1, var4, 1);\r\n if(var6 == null) {\r\n break label138;\r\n }\r\n\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n }\r\n\r\n var10000 = var5;\r\n }\r\n\r\n var10001 = 2;\r\n }\r\n\r\n if(var6 != null) {\r\n label128: {\r\n if(var10000 != var10001) {\r\n var10000 = var1.method_2170(var2, var3, var4 - 1, 2);\r\n if(var6 == null) {\r\n break label128;\r\n }\r\n\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n }\r\n\r\n var10000 = var5;\r\n }\r\n\r\n var10001 = 3;\r\n }\r\n\r\n if(var6 != null) {\r\n label118: {\r\n if(var10000 != var10001) {\r\n var10000 = var1.method_2170(var2, var3, var4 + 1, 3);\r\n if(var6 == null) {\r\n break label118;\r\n }\r\n\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n }\r\n\r\n var10000 = var5;\r\n }\r\n\r\n var10001 = 5;\r\n }\r\n\r\n label153: {\r\n if(var6 != null) {\r\n label104: {\r\n if(var10000 != var10001) {\r\n var10000 = var1.method_2170(var2 + 1, var3, var4, 5);\r\n if(var6 == null) {\r\n break label104;\r\n }\r\n\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n }\r\n\r\n var10000 = var5;\r\n }\r\n\r\n if(var6 == null) {\r\n break label153;\r\n }\r\n\r\n var10001 = 4;\r\n }\r\n\r\n if(var10000 != var10001) {\r\n var10000 = var1.method_2170(var2 - 1, var3, var4, 4);\r\n if(var6 == null) {\r\n break label153;\r\n }\r\n\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n }\r\n\r\n var10000 = var1.method_2170(var2, var3, var4, 0);\r\n }\r\n\r\n if(var6 != null) {\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n\r\n var10000 = var1.method_2170(var2, var3 + 2, var4, 1);\r\n }\r\n\r\n if(var6 != null) {\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n\r\n var10000 = var1.method_2170(var2, var3 + 1, var4 - 1, 2);\r\n }\r\n\r\n if(var6 != null) {\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n\r\n var10000 = var1.method_2170(var2, var3 + 1, var4 + 1, 3);\r\n }\r\n\r\n int var8;\r\n ahb var9;\r\n int var10002;\r\n int var10003;\r\n byte var10004;\r\n label155: {\r\n if(var6 != null) {\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n\r\n var9 = var1;\r\n var8 = var2 - 1;\r\n var10002 = var3 + 1;\r\n var10003 = var4;\r\n var10004 = 4;\r\n if(var6 == null) {\r\n break label155;\r\n }\r\n\r\n var10000 = var1.method_2170(var8, var10002, var4, 4);\r\n }\r\n\r\n if(var10000 != 0) {\r\n var7 = true;\r\n return var7;\r\n }\r\n\r\n var9 = var1;\r\n var8 = var2 + 1;\r\n var10002 = var3 + 1;\r\n var10003 = var4;\r\n var10004 = 5;\r\n }\r\n\r\n var7 = var9.method_2170(var8, var10002, var10003, var10004);\r\n return var7;\r\n }", "public abstract void mo9803a(int i, C3635j jVar);", "private void method_2684(ahb var1, int var2, int var3, int var4) {\r\n String[] var10000 = class_752.method_4253();\r\n int var6 = var1.method_33(var2, var3, var4);\r\n int var7 = method_2686(var6);\r\n String[] var5 = var10000;\r\n int var9 = var7;\r\n if(var5 != null) {\r\n if(var7 == 7) {\r\n return;\r\n }\r\n\r\n var9 = this.method_2685(var1, var2, var3, var4, var7);\r\n }\r\n\r\n int var8 = var9;\r\n var9 = var8;\r\n if(var5 != null) {\r\n label45: {\r\n if(var8 != 0) {\r\n var9 = method_2687(var6);\r\n if(var5 == null) {\r\n break label45;\r\n }\r\n\r\n if(var9 == 0) {\r\n ahb var10 = var1;\r\n int var10001 = var2;\r\n int var10002 = var3;\r\n int var10003 = var4;\r\n if(var5 != null) {\r\n if(!method_2690(var1, var2, var3, var4, var7)) {\r\n return;\r\n }\r\n\r\n var10 = var1;\r\n var10001 = var2;\r\n var10002 = var3;\r\n var10003 = var4;\r\n }\r\n\r\n var10.method_2193(var10001, var10002, var10003, this, 0, var7);\r\n if(var5 != null) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n var9 = var8;\r\n }\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 != 0) {\r\n return;\r\n }\r\n\r\n var9 = method_2687(var6);\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 == 0) {\r\n return;\r\n }\r\n\r\n var1.method_2055(var2, var3, var4, var7, 2);\r\n }\r\n\r\n var1.method_2193(var2, var3, var4, this, 1, var7);\r\n }", "public void testMethodInfo886() throws Exception {\n\t\tClassInfo var2776 = instantiateClassInfo426();\n\t\tLocalField var2777 = instantiateLocalField425();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2778 = new MethodInfo(var2776, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tvar2777.getDescription();\n\t\tvar2777.getDescription();\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.getSetters();\n\t\tvar2778.isSetter();\n\t\tvar2778.isSetter();\n\t}", "public void mo21839c(C7009b bVar) {\n mo21792Q();\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "static Object a(bu var0, y.c.d var1_1) {\n block4 : {\n var8_2 = fj.z;\n var2_3 = 0;\n var3_4 = false;\n var4_5 = var0.l(var1_1).j();\n while (var4_5.f()) {\n var5_6 = var4_5.a();\n var6_7 = var5_6.c();\n var7_8 = var5_6.d();\n v0 = Math.abs(var6_7.a() - var7_8.a()) DCMPG 1.0E-12;\n if (var8_2) break block4;\n if (v0 >= 0) ** GOTO lbl-1000\n var3_4 = true;\n if (var8_2) lbl-1000: // 2 sources:\n {\n if (Math.abs(var6_7.b() - var7_8.b()) >= 1.0E-12) return hV.a;\n var2_3 = 1;\n if (var8_2) {\n return hV.a;\n }\n }\n var4_5.g();\n if (!var8_2) continue;\n }\n v0 = var2_3;\n }\n if (v0 != 0 && var3_4) {\n v1 = hV.b;\n return v1;\n }\n v1 = hV.c;\n return v1;\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test076() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.var();\n }", "@Override\n public void func_104112_b() {\n \n }", "void mo30271a(C11961o<T> oVar) throws Exception;", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "void mo7305b(C1070b bVar);", "void mo7303a(C1070b bVar);", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "public static void main(String[] args) {\nint score = 91;\nString grade;\nif (score >90)\n{\n\tgrade = \"A\";\n}\n\n\n\nelse if (score>=80)\n{\n\tgrade = \"B\";\n}\n//THis is to test Git\n//THis is to test Git\n//THis is to test Git2\n//This is to test the brach made by gitdemo\n//Change from GitX\nelse \n{\n\tgrade = \"C\";\n}\nSystem.out.println(grade);\n}", "void mo67922a(AbstractC32732ag agVar, Throwable th);", "public abstract boolean method_1028(class_44 var1);", "double getBranchProbability();", "@Test\n public void Test12() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n ManaEffectComponent another = new ManaEffectComponent(EffectEnum.MANA_BUFF, 3, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "void mo100442a(C40429b bVar);", "private void extractVarMethod(Scope root, List<ParseTree> children) {\n Feature feature = null;\n for (int j = 1; j < children.size(); j++) {\n if (children.get(j + 1).getText().equalsIgnoreCase(\")\")) break;\n if (children.get(j).getText().equalsIgnoreCase(\",\")\n || children.get(j).getText().equalsIgnoreCase(\"(\")) {\n if (children.get(j) instanceof CommonToken) {\n feature = new Feature(children.get(j + 1).getText(), ScopeType.VAR, \"\", ((CommonToken) children.get(j)).getLine());\n } else {\n feature = new Feature(children.get(j + 1).getText(), ScopeType.VAR, \"\", -1);// todo\n }\n if (children.get(j + 2) instanceof MoolaParser.MoolaTypeContext) {\n feature.setFieldType(((MoolaParser.MoolaTypeContext) children.get(5)).st.children.stream().map(ParseTree::getText).reduce((s, s2) -> s + s2));\n j++;\n }\n root.getInner_level().add(feature);\n j++;\n }\n }\n }", "public class_1069 method_104(int var1, int var2) {\r\n class_1069 var10000 = new class_1069;\r\n var10000.method_6013(this.field_5907, var1, var2);\r\n class_1069 var4 = var10000;\r\n String[] var15 = class_752.method_4253();\r\n int var5 = 0;\r\n String[] var3 = var15;\r\n\r\n int var7;\r\n label84:\r\n while(true) {\r\n int var16 = var5;\r\n\r\n label81:\r\n while(var16 < this.field_5909.length) {\r\n aji var6 = this.field_5909[var5];\r\n if(var3 == null) {\r\n break label84;\r\n }\r\n\r\n if(var6 != null) {\r\n var7 = var5 >> 4;\r\n class_1072 var8 = var4.method_6019()[var7];\r\n if(var8 == null) {\r\n class_1072 var17 = new class_1072;\r\n var17.method_6072(var5, !this.field_5907.field_1820.field_5736);\r\n var8 = var17;\r\n var4.method_6019()[var7] = var8;\r\n }\r\n\r\n int var9 = 0;\r\n\r\n while(var9 < 16) {\r\n var16 = 0;\r\n if(var3 == null) {\r\n continue label81;\r\n }\r\n\r\n int var10 = 0;\r\n\r\n while(true) {\r\n if(var10 < 16) {\r\n var8.method_6074(var9, var5 & 15, var10, var6);\r\n var8.method_6076(var9, var5 & 15, var10, this.field_5910[var5]);\r\n ++var10;\r\n if(var3 == null) {\r\n break;\r\n }\r\n\r\n if(var3 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n ++var9;\r\n break;\r\n }\r\n\r\n if(var3 == null) {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n ++var5;\r\n if(var3 != null) {\r\n continue label84;\r\n }\r\n break;\r\n }\r\n\r\n var4.method_6021();\r\n break;\r\n }\r\n\r\n class_985[] var11 = this.field_5907.method_2041().method_5541((class_985[])null, var1 * 16, var2 * 16, 16, 16);\r\n byte[] var12 = var4.method_6060();\r\n var7 = 0;\r\n\r\n while(var7 < var12.length) {\r\n var12[var7] = (byte)var11[var7].field_5050;\r\n ++var7;\r\n if(var3 == null) {\r\n break;\r\n }\r\n }\r\n\r\n Iterator var13 = this.field_5912.iterator();\r\n\r\n while(true) {\r\n if(var13.hasNext()) {\r\n class_1051 var14 = (class_1051)var13.next();\r\n var14.method_5961(this, this.field_5907, var1, var2, (aji[])null);\r\n if(var3 == null) {\r\n break;\r\n }\r\n\r\n if(var3 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n var4.method_6021();\r\n break;\r\n }\r\n\r\n return var4;\r\n }", "public void test12() {\n //$NON-NLS-1$\n deployBundles(\"test12\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public Branch() { }", "private void m146984b(C47008ac acVar) {\n if (this.f120643a == null) {\n this.f120643a = acVar;\n }\n if (this.f120644b == null) {\n this.f120644b = acVar;\n }\n }", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint((String) null, true, \"sXV\", \"sXV\");\n String string0 = SQLUtil.ownerDotComponent(dBCheckConstraint0);\n assertEquals(\"null\", string0);\n }", "@Test\n public void Test05() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n component.setDamage(10);\n double currentDamage = component.getDamage();\n assertTrue(currentDamage == 10);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.newConst(\"Code\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"Code\";\n stringArray0[2] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[6] = \"Code\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Code\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 3, \"\\\".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"\\\".3t\\\"0\", stringArray0, true, false);\n Label label1 = new Label();\n byte[] byteArray0 = new byte[0];\n label1.resolve(methodWriter0, 168, byteArray0);\n classWriter0.newNameTypeItem(\"Code\", \"Fj)3/|(;sZXz$\");\n Label label2 = new Label();\n methodWriter0.visitFieldInsn(3, \"oc[MfnZM[~MHOK iO\", \"oc[MfnZM[~MHOK iO\", \"*/TEiGBLds&\");\n methodWriter0.visitLdcInsn(\"java/lang/dyn/Dynamic\");\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n Label label0 = new Label();\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", \"p@7pE4I\", 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"p@7pE4I\", \"p@7pE4I\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n labelArray0[0] = label0;\n label0.status = (-1274);\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n label0.info = (Object) null;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, (-2450), label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn((-2013884532), label0);\n methodWriter0.visitFieldInsn(1, \"oc[MfnZM[~MHOK iO\", \"p@7pE4I\", \"'@Cix/db]3YECoja=\");\n methodWriter0.visitTryCatchBlock(label0, label0, label0, (String) null);\n methodWriter0.visitJumpInsn(1198, label0);\n methodWriter0.visitMaxs((-1274), (-1460));\n methodWriter0.visitJumpInsn(1198, label0);\n ByteVector byteVector1 = byteVector0.putByte(177);\n methodWriter0.put(byteVector1);\n assertSame(byteVector0, byteVector1);\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test3() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n boolean boolean0 = defaultMenuItem0.isLeaf();\n assertEquals(true, boolean0);\n }", "@Test\n public void testModuloExpectedUse() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(3);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(1, ps.pop());\n }", "@Test\n public void solve1() {\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.FLOAT_TYPE;\n typeArray0[6] = type6;\n Type type7 = Type.SHORT_TYPE;\n type2.toString();\n typeArray0[7] = type7;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Type[] typeArray1 = new Type[1];\n typeArray1[0] = type0;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Type.getMethodDescriptor(type1, typeArray1);\n ClassWriter classWriter0 = new ClassWriter(174);\n Item item0 = classWriter0.newConstItem(\"\");\n // Undeclared exception!\n try { \n frame0.execute(3, 2, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private void level7() {\n }", "public void getBranchCommand() {\n\n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test305() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Submit submit0 = new Submit(errorPage0, \"? fOYd~2\", \"sajp\");\n // Undeclared exception!\n try { \n submit0.var((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public static void main(String[] args) {\n System.out.println(variable);\n System.out.println(\"passed\");\n }", "public void mo21830b(C7009b bVar) {\n mo21791P();\n }" ]
[ "0.5976384", "0.573836", "0.5615003", "0.5614323", "0.5431393", "0.5347478", "0.5342731", "0.5315951", "0.5263781", "0.5246056", "0.5235554", "0.52243775", "0.520971", "0.51997125", "0.5183801", "0.5180355", "0.51791847", "0.51681787", "0.5164577", "0.5137061", "0.5127519", "0.51240474", "0.5119956", "0.5108719", "0.5098472", "0.50863314", "0.5085506", "0.5075303", "0.5065369", "0.5048173", "0.50414747", "0.5033598", "0.503293", "0.503093", "0.5024656", "0.5020468", "0.50107306", "0.5006703", "0.49995553", "0.49992248", "0.4996646", "0.4994279", "0.49873996", "0.49862742", "0.4978948", "0.49783248", "0.49779335", "0.49731922", "0.49709737", "0.49709737", "0.49699616", "0.49654853", "0.4955475", "0.49550474", "0.4953619", "0.49523234", "0.4939504", "0.49371934", "0.4929457", "0.49215555", "0.4918846", "0.49187768", "0.49138132", "0.49089852", "0.4908381", "0.4906984", "0.49067518", "0.4904312", "0.48981205", "0.4896131", "0.48842096", "0.48826963", "0.48807636", "0.4879597", "0.4877569", "0.48751155", "0.48751062", "0.48691106", "0.48636672", "0.4863304", "0.486278", "0.48616984", "0.4860203", "0.485799", "0.4855555", "0.48540357", "0.48538664", "0.4852053", "0.48519003", "0.48507717", "0.48447195", "0.48367321", "0.48340452", "0.4833639", "0.48335338", "0.48247707", "0.48221", "0.48220962", "0.48213944", "0.4818913", "0.4817452" ]
0.0
-1
Test case number: 13 / 1 covered goal: Goal 1. wheel.components.Component.textInput(Ljava/lang/String;)Lwheel/components/FormElement;: rootBranch
@Test public void test013() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); // Undeclared exception! try { FormElement formElement0 = errorPage0.textInput("V\"i%{rPYE$"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Form elements can be created only by compoents that are attached to a form component. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test165() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.buttonInput(\"XYD6eL5K7VD|_+{7`{$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test190() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"org.mvel.conversion.IntegerCH$10\");\n TextInput textInput0 = new TextInput(xmlEntityRef0, \"org.mvel.conversion.IntegerCH$10\", \"org.mvel.conversion.IntegerCH$10\");\n // Undeclared exception!\n try { \n textInput0._getTopLevelComponent(true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\r\n public void ensureTextChangesWork() {\n onView(withId(R.id.inputField))\r\n .perform(typeText(\"HELLO\"), closeSoftKeyboard());\r\n reportHelper.label(\"myTestStepLabel_1_1\");\r\n onView(withId(R.id.changeText)).perform(click());\r\n\r\n // Check that the text was changed.\r\n onView(withId(R.id.inputField)).check(matches(withText(\"Lalala\")));\r\n reportHelper.label(\"myTestStepLabel_1_2\");\r\n }", "@Test\n public void test063() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextInput textInput0 = new TextInput(errorPage0, \"E9ZWQsO;7#xLi'\", \"E9ZWQsO;7#xLi'\");\n // Undeclared exception!\n try {\n Component component0 = textInput0.q((Object) \"E9ZWQsO;7#xLi'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test301() throws Throwable {\n Form form0 = new Form(\"wheel.components.ActionExpression@0000000006\");\n // Undeclared exception!\n try { \n form0.buttonInput((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test087() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextInput textInput0 = new TextInput(errorPage0, (String) null, (String) null);\n // Undeclared exception!\n try {\n Component component0 = textInput0.u();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n public void test018() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextInput textInput0 = new TextInput(errorPage0, (String) null, (String) null);\n ElExpression elExpression0 = new ElExpression((String) null);\n // Undeclared exception!\n try {\n Component component0 = textInput0.p((Object) elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test262() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"iW5kQK2`y/GM^W\");\n // Undeclared exception!\n try { \n xmlEntityRef0.textarea(\"Zq15+;i?OIR_q+\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"u\");\n // Undeclared exception!\n try { \n xmlEntityRef0.textInput(\"u;R\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void test119() throws Throwable {\n Form form0 = new Form(\".\");\n TextInput textInput0 = new TextInput(form0, \".\", \".\");\n // Undeclared exception!\n try {\n FormElement formElement0 = textInput0.buttonInput(\".\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n\tpublic void input() {\n\t\t\n\t}", "public void ClickChecoutSubmitbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btncheckoutregistrationsubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutregistrationsubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.numberInput(\"3X{L(\", (CharSequence) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test338() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.numberInput(\"iW5kQK2`y/GM^W\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test\r\n\t\tpublic void testCompileAddition() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"putobject\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.id(\".?p5{ul\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void Checkouttaxsubmit(){\t\r\n\t\tString countryspecific_tax = \"Italy,Germany,Sweden,Spain\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Item should be searched in the search box\");\r\n\t\ttry{\r\n\t\t\tif((countryspecific_tax).contains(countries.get(countrycount))){\r\n\t\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\t\twaitforElementVisible(locator_split(\"checkouttaxsubmit\"));\r\n\t\t\t\tclick(locator_split(\"checkouttaxsubmit\"));\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Tax submit button is clicked\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Tax submit button is not applicable to \" +country);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Item is not entered in the search box \"+elementProperties.getProperty(\"checkoutFiscalCode\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutFiscalCode\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Test\n public void test088() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.code();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"-1Uj)9%67!\", \"-1Uj)9%67!\");\n ElExpression elExpression0 = checkbox0.el(\"-1Uj)9%67!\");\n // Undeclared exception!\n try {\n FormElement formElement0 = checkbox0.fileInput(\"-1Uj)9%67!\", elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"6F\\\"\", \"6F\\\"\");\n // Undeclared exception!\n try { \n checkbox0.kbd();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test\r\n public void changeText_FailedTest() {\n onView(withId(R.id.inputField)).perform(typeText(\"NewText\"),\r\n closeSoftKeyboard());\r\n reportHelper.label(\"myTestStepLabel_3_1\");\r\n onView(withId(R.id.switchActivity)).perform(click());\r\n\r\n reportHelper.label(\"myTestStepLabel_3_2\");\r\n // This view is in a different Activity, no need to tell Espresso.\r\n onView(withId(R.id.resultView)).check(matches(withText(\"errrrrrr\")));\r\n }", "@Test\n public void sendKeys() {\n page.textInput.sendKeys(\"coffee\");\n waiter.waitForElementAttributeEqualsString(page.textInput, \"value\", \"coffee\", driver);\n //type into a <textarea> element\n //before typing, the textarea element displays a hint, but not an actual text (in the 'placeholder' attribute)\n //therefore the getAttribute(\"value\") method call returns an empty String\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"\", driver);\n page.textarea.sendKeys(\"1234567890\");\n //after typing, the text in the field will be \"1234567890\"\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"1234567890\", driver);\n //type the same text again and the text in the field becomes \"12345678901234567890\"\n page.textarea.sendKeys(\"1234567890\");\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"12345678901234567890\", driver);\n }", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"/c[~rNl!Ma-\", \"kIh 4+,VlA$]12\");\n ElExpression elExpression0 = new ElExpression(\"J>w9x0K2Bs|BOY\");\n // Undeclared exception!\n try { \n submit0.eval(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void setcheckoutComment(String text){\r\n\t\tString comment = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Comment should be entered as \"+comment);\r\n\t\ttry{\r\n\r\n\t\t\tsendKeys(locator_split(\"txtComment\"),comment);\r\n\t\t\tSystem.out.println(\"Checkout Comment is entered as \"+comment);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Comment is entered as \"+comment);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Comment is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtComment\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void ClickMyAccountSubmitbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountSubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountSubmit\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "protected abstract void getInput();", "@Test(timeout = 4000)\n public void test140() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Submit submit0 = new Submit(errorPage0, \"+4lypJ[6^A\", \"+4lypJ[6^A\");\n // Undeclared exception!\n try { \n submit0.form(\"+4lypJ[6^A\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\r\n\t\tpublic void testCompilePuts() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tString a = \"the_best_cat = \\\"Noogie Cat\\\" \\nputs \\\"The best cat is: \\\" + the_best_cat\";\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(a);;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"putstring\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "public abstract void input();", "@Test(timeout = 4000)\n public void test210() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"(Ljava/lang/String;)Lorg/mvel/integration/VariableResolver;\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"(Ljava/lang/String;)Lorg/mvel/integration/VariableResolver;\", \"W,eg{\", stringSelectModel0, elExpression0);\n Select select0 = new Select(checkboxGroup0, \"W,eg{\", \"http://xmlpull.org/v1/doc/properties.html#serializer-indentation\", stringSelectModel0, \"W,eg{\");\n FileInput fileInput0 = new FileInput(select0, \"]> fkF\\\".:8\", \"W,eg{\");\n // Undeclared exception!\n try { \n fileInput0.end(\"J]'z8)\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No corresponding component found for end expression 'J]'z8)'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test342() throws Throwable {\n Form form0 = new Form(\"\\r\");\n Checkbox checkbox0 = new Checkbox(form0, \"\", \"4|f#eFc+8(g<V?*&\");\n // Undeclared exception!\n try { \n checkbox0.fileInput(\"\\r\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void clickSubmitInkAndTonnerSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "@Test\n public void test033() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"\", \"\");\n String string0 = checkbox0.defaultTagName();\n XmlEntityRef xmlEntityRef0 = (XmlEntityRef)errorPage0.entity(\"input\");\n }", "public void VerifyCouponfieldsinCheckout(){\r\n\t\tString countriess1 = \"Denmark,France,PresselSwitzerland,Norway,Spain,BernardFrance,,BernardBelgium,PresselAustria,UK,PresselGermany\";\r\n\t\tString countriess2 = \"Germany,Spain\";\r\n\t\tString countriess3 = \"Netherland,Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cupon Input txt box and Apply button should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess1.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput3inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"3 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"3 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess2.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"1 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"1 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess3.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"2 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"2 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"incorret country is entered in method for -\"+countries.get(countrycount));\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Incorrect country is entered in method for -\"+countries.get(countrycount)+\" or\"\r\n\t\t\t\t\t+ \" Element not found\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t\tthrow new Error(\"Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t}\r\n\r\n\t}", "String getInput();", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test258() throws Throwable {\n Form form0 = new Form(\"E5TYvW\");\n DateInput dateInput0 = new DateInput(form0, \"E5TYvW\", \"? fOYd~2\", \"? fOYd~2\");\n dateInput0._setParent(form0);\n assertEquals(\"E5TYvW\", form0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Override\n\tvoid input() {\n\t}", "public void submitorder( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- submit order link is clicked entered\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"submitorder\"));\r\n\t\t\tclick(locator_split(\"submitorder\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"submit link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-submit link clicked \");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- unable to click submit button\" );\r\n\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test331() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \";BpvU]Xh\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.imageSubmit(\"R,@pnK1{H\", \"java/lang/Throwable\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test\n\tvoid givenOneStringAndOneInt_WhenSum_ThenInputCleared() {\n\t\tapplication.numberOneTextField.setText(\"asd\");\n\t\tapplication.numberTwoTextField.setText(\"2\");\n\t\tString expectedResultTextField1 = \"\";\n\t\tString expectedResultTextField2 = \"2\";\n\t\tString expectedResultTextField = \"\";\n\t\t// When operation is sum\n\t\tapplication.operationButton.doClick();\n\t\t\n\t\t// Then result is \"\"\n\t\tString actualResult = application.resultTextField.getText();\n\t\tassertEquals(expectedResultTextField, actualResult);\n\t\tString actualResultTextField1 = application.numberOneTextField.getText();\n\t\tassertEquals(expectedResultTextField1, actualResultTextField1);\n\t\tString actualResultTextField2 = application.numberTwoTextField.getText();\n\t\tassertEquals(expectedResultTextField2, actualResultTextField2);\n\t}", "com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "@Test\n public void test109() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"-1Uj)9%67!\", \"-1Uj)9%67!\");\n // Undeclared exception!\n try {\n Component component0 = errorPage0.addFirst((Component) checkbox0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Cannot add a form element. No surrounding form found.\n //\n }\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(table0, \"input\", (String) null);\n // Undeclared exception!\n try { \n checkbox0.samp((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tvoid givenOneIntAndOneString_WhenSum_ThenInputCleared() {\n\t\tapplication.numberOneTextField.setText(\"1\");\n\t\tapplication.numberTwoTextField.setText(\"gfd\");\n\t\tString expectedResultTextField1 = \"1\";\n\t\tString expectedResultTextField2 = \"\";\n\t\tString expectedResultTextField = \"\";\n\t\t// When operation is sum\n\t\tapplication.operationButton.doClick();\n\t\t\n\t\t// Then result is \"\"\n\t\tString actualResult = application.resultTextField.getText();\n\t\tassertEquals(expectedResultTextField, actualResult);\n\t\tString actualResultTextField1 = application.numberOneTextField.getText();\n\t\tassertEquals(expectedResultTextField1, actualResultTextField1);\n\t\tString actualResultTextField2 = application.numberTwoTextField.getText();\n\t\tassertEquals(expectedResultTextField2, actualResultTextField2);\n\t}", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n Checkbox checkbox0 = new Checkbox(label0, \"\", \"\");\n Component component0 = checkbox0.renderHint(\"\");\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test197() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n checkbox0.renderHint(\"]1\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test\n public void test011() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ActionExpression actionExpression0 = new ActionExpression(\"'tj#~9z\");\n Form form0 = new Form(errorPage0, \"'tj#~9z\", actionExpression0);\n Submit submit0 = (Submit)form0.submit(\"'tj#~9z\");\n Form form1 = form0.id(\"'tj#~9z\");\n }", "public void AddAccount(String subtab){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\tclick(locator_split(\"Maintenencetab\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tswitchframe(\"PegaGadget1Ifr\");\r\n\t\t\tsleep(2000);\r\n\t\t\tclick(locator_split(subtab));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccountName\"), getValue(\"Accountname\"));\r\n\t\t\t//selectList(locator_split(\"LstLineofBusiness\"),1);\r\n\t\t\tselectListValue(locator_split(\"LstLineofBusiness\"), \"ENERGY AND ENGINEERED RISK\");\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"lstOccupancyType\"), getValue(\"Occupancytype\"));\r\n\t\t\tsendKeys(locator_split(\"txtlocationselect\"), getValue(\"BusinessAs\"));\r\n\t\t\tsendKeys(locator_split(\"LstaccountunderWriter\"), getValue(\"Underwriter\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"LstunderwriterRegion\"), getValue(\"UnderwriterRegion\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstUnderWriterCountry\"), getValue(\"UnderWriterCountry\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstUnderWriterBranch\"), getValue(\"UnderWriterBranch\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstAccountEngineerId\"), getValue(\"AccountEngineer\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tclearWebEdit(locator_split(\"LstAccountCurrency\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"LstAccountCurrency\"), getValue(\"Accountcurrency\"));\r\n\t\t\t\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtPolicyInceptionDate\"), getValue(\"PolicyInceptiondate\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyExpirationDate\"), getValue(\"PolicyExpirydate\"));\r\n\t\t\tsendKeys(locator_split(\"txtAccountPD\"), getValue(\"AccountPD\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccountBI\"), getValue(\"AccountBI\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccBI\"), getValue(\"AccountBI\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyLimit\"), getValue(\"PolicyLimit\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"txtPolicyNumber\"), getValue(\"PolicyNumber\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyLimit\"), getValue(\"PolicyLimit\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"LstPolicyStatus\"), getValue(\"Policystatus\"));\r\n\t\t\t//click(locator_split(\"txtlocationselect\"));\r\n\t\t\tsleep(2000);\r\n\t\t\t//click(locator_split(\"Lstlocationselect\"));\r\n\t\t\t\r\n\t\t\tclick(locator_split(\"btnAddAccount\"));\r\n\t\t\tsleep(3000);\r\n\t\t//\tclick(locator_split(\"btnAddLocations\"));\r\n\t\t/*\tclearWebEdit(locator_split(\"txtLoginNamegrasp\"));\r\n\t\t\t//sendKeys(locator_split(\"txtLoginNamegrasp\"), username);\r\n\t\t\t//sendKeys(locator_split(\"txtpasswordgrasp\"), password);\r\n\t\t\t\r\n\t\t\tsleep(3000);\r\n\t\t\tclick(locator_split(\"btn_privacyok\"));*/\r\n\t\t\tsleep(5000);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(getText(locator_split(\"txtAccountID\")));\r\n\t\t\tsleep(5000);\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Report tab is clicked and user is logged in\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Report tab is not clicked in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test291() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n // Undeclared exception!\n try { \n checkbox0.h3((Object) \"0G-VP2>k}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void clickSubmitSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnSearchSubmit\"));\r\n\t\t\tclick(locator_split(\"btnSearchSubmit\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Sarch icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnSearchSubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"9\\\"n-\");\n // Undeclared exception!\n try { \n xmlEntityRef0.submit(\"9\\\"n-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test360() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.dateInput((String) null, \"XYD6eL5K7VD|_+{7`{$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public void ClickMyAccountContinueShopping(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Registration continue shopping should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountContinueShopping\"));\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tSystem.out.println(\"My Account Registration continue shopping is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration continue shopping is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration continue shopping is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountContinueShopping\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test346() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.checkbox((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \" @\", \"@;3{-{.Zr,[&'oI\");\n Checkbox checkbox1 = new Checkbox(checkbox0, \"@;3{-{.Zr,[&'oI\", \"6F\\\"\");\n // Undeclared exception!\n try { \n checkbox1.script();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n Submit submit0 = new Submit((Component) null, \".\\\"=_m?KP<D\\\"\", \"style\");\n ActionExpression actionExpression0 = submit0.action(\"K]D$m.xC\");\n assertFalse(actionExpression0.isSubmissible());\n }", "@Test\n public void test021() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"pJ\", \"pJ\");\n // Undeclared exception!\n try {\n FormElement formElement0 = hidden0.textarea(\"pJ\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "@Test(timeout = 4000)\n public void test267() throws Throwable {\n Submit submit0 = new Submit((Component) null, \".\\\"=_m?KP<D\\\"\", \"I&{b+CI\");\n ActionExpression actionExpression0 = submit0.action(\"\");\n assertFalse(actionExpression0.isSubmissible());\n }", "public abstract Object getInput ();", "@Test\n public void test096() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ErrorPage errorPage1 = (ErrorPage)errorPage0.clasS((CharSequence) \"`ymkk& +k:vlY+SnG\");\n Block block0 = (Block)errorPage0.samp();\n NumberInput numberInput0 = new NumberInput(errorPage0, \"`ymkk& +k:vlY+SnG\", \"`ymkk& +k:vlY+SnG\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.meta();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n public void test022() throws Throwable {\n TextInput textInput0 = new TextInput((Component) null, (String) null, \"Failed to initialize SimpleDateFormat with pattern '\");\n // Undeclared exception!\n try {\n Component component0 = textInput0.kbd();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test138() throws Throwable {\n Submit submit0 = new Submit((Component) null, \" (position:\", \"kIh 4+,VlA$]12\");\n Checkbox checkbox0 = new Checkbox(submit0, \"B\\\"M$C3CbFMp&xh\", \" (position:\");\n // Undeclared exception!\n try { \n checkbox0.h1((Object) null);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n\tvoid givenTwoStrings_WhenSum_ThenInputCleared() {\n\t\tapplication.numberOneTextField.setText(\"asd\");\n\t\tapplication.numberTwoTextField.setText(\"gfd\");\n\t\tString expectedResultTextField1 = \"\";\n\t\tString expectedResultTextField2 = \"\";\n\t\tString expectedResultTextField = \"\";\n\t\t// When operation is sum\n\t\tapplication.operationButton.doClick();\n\t\t\n\t\t// Then result is \"\"\n\t\tString actualResult = application.resultTextField.getText();\n\t\tassertEquals(expectedResultTextField, actualResult);\n\t\tString actualResultTextField1 = application.numberOneTextField.getText();\n\t\tassertEquals(expectedResultTextField1, actualResultTextField1);\n\t\tString actualResultTextField2 = application.numberTwoTextField.getText();\n\t\tassertEquals(expectedResultTextField2, actualResultTextField2);\n\t}", "@Test\n\tvoid test() {\n\t\t\n\t\tuserInput ui = new userInput();\n\t\t\n\t\tboolean test0 = ui.isValidChildcareType(0);\n\t\tboolean test1 = ui.isValidChildcareType(1);\n\t\tboolean test2 = ui.isValidChildcareType(2);\n\t\tboolean test3 = ui.isValidChildcareType(3);\n\t\tboolean test4 = ui.isValidChildcareType(4);\n\t\tboolean test5 = ui.isValidChildcareType(5);\n\t\tboolean test6 = ui.isValidChildcareType(-1);\n\t\t\n\t\tassertEquals(test0, false);\n\t\tassertEquals(test1, true);\n\t\tassertEquals(test2, true);\n\t\tassertEquals(test3, true);\n\t\tassertEquals(test4, true);\n\t\tassertEquals(test5, false);\n\t\tassertEquals(test6, false);\n\t}", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"tt\", \"Can't add components to a component that is not an instance of IContainer.\");\n // Undeclared exception!\n try { \n checkbox0.dfn();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void underweightCategoryFirstRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"47\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"177\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Underweight\",\n \"actual text is not: Your category is Underweight\");\n }", "@Test(timeout = 4000)\n public void test290() throws Throwable {\n Form form0 = new Form(\"first character in input was UNICODE noncharacter (0xFFFE)- input requires int swapping\");\n // Undeclared exception!\n try { \n form0.bdo(\"first character in input was UNICODE noncharacter (0xFFFE)- input requires int swapping\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void cashondelivery_submit(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- shopping cart link should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"cashondelivery\"));\r\n\t\t\tclick(locator_split(\"cashondelivery\"));\r\n\t\t\twaitForPageToLoad(100);\r\n\t\t\twaitforElementVisible(locator_split(\"submitorder\"));\r\n\t\t\tclick(locator_split(\"submitorder\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"shopping cart link is clicked.\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- shopping cart link is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"submitorder\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testFibonacciValid()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"7\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"13\"));\n }", "public void clickSearchButton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- SearchButton should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\twaitforElementVisible(locator_split(\"BybtnSearch\"));\r\n\t\t\tclick(locator_split(\"BybtnSearch\"));\r\n\t\t\twaitForPageToLoad(100);\r\n\t\t\tSystem.out.println(\"SearchButton is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- SearchButton is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- SearchButton is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BybtnSearch\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void researchEditTextInputTest() {\n onView(withId(R.id.network_input_research))\n .perform(typeText(INPUT_TEXT))\n .check(matches(withText(INPUT_TEXT)));\n }", "public void PaymentSuccess(String text){\r\n\t\tString Text = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Payment success message - '\"+Text+\"' should be displayed\");\r\n\t\ttry{\r\n\t\t\tif(getText(locator_split(\"txtPaymentsuccess\")).equalsIgnoreCase(Text)){\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The Payment success message - '\"+Text+\"' is displayed\");\r\n\t\t\t\tSystem.out.println(\"Verified the Text -\"+Text);\r\n\t\t\t}else {\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The Payment success message - '\"+Text+\"' is not displayed\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- The Payment success message - '\"+Text+\"' is not displayed\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtPaymentsuccess\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public void beforeInput() {\n }", "public void beforeInput() {\n }", "public void LocationAssesment_COPE(){\r\n\t\tString Tradeoccupancy = getValue(\"TradeOccupancy\");\r\n\tString Account = getValue(\"Account\");\r\n\t boolean flag=false;\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/*driver.switchTo().defaultContent();\r\n\t\t\t\t\tsleep(3000);\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget2Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocationAssesment\"));\r\n\t\t\t click(locator_split(\"linkclickLocation\"));*/\r\n\t\t\t // driver.findElement(By.xpath(\"//*[@tabindex='4']/a/span\")).click();\r\n\t\t\t // driver.findElement(By.xpath(\"//a[@title='Click here to open Location Assessment']\")).click();\r\n\t\t\t driver.switchTo().defaultContent();\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget3Ifr\"));\r\n\t\t\t click(locator_split(\"tabcope\"));\r\n\t\t\t //driver.findElement(By.xpath(\"//li[@tabindex='0']/a/span\")).click();\r\n\t\t\t clearWebEdit(locator_split(\"txtStoreyscope\"));\r\n\t\t\t sleep(2000);\r\n\t\t\t sendKeys(locator_split(\"txtStoreyscope\"), getValue(\"Numberofstories\"));\r\n\t\t\t clearWebEdit(locator_split(\"txtbuildingheightcope\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtbuildingheightcope\"),getValue(\"Buildingheight\"));\r\n\t\t\t \r\n\t\t\t selectListValue(locator_split(\"listbasementcope\"), getValue(\"Basement\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t clearWebEdit(locator_split(\"txtyearbuildcope\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtyearbuildcope\"), getValue(\"YearBuild\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t clearWebEdit(locator_split(\"txtyearlastupgradecope\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtyearlastupgradecope\"), getValue(\"LastUpgradeyear\"));\r\n\t\t\t clearWebEdit(locator_split(\"txtbasementfloorelevationcope\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtbasementfloorelevationcope\"), getValue(\"FloorElevation\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t System.out.println(\"Account is\"+Account);\r\n\t\t\t if(Account.equals(\"EEA\"))\r\n\t\t\t {\r\n\t\t\t clearWebEdit(locator_split(\"txttotalareacope\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txttotalareacope\"), getValue(\"TotalAreaSqft\"));\r\n\t\t\t clearWebEdit(locator_split(\"txtfireareacope\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtfireareacope\"),getValue(\"FireArea\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t selectListValue(locator_split(\"listroofcondition\"),getValue(\"Roofcondition\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t if(Account.equals(\"CP\")){\r\n\t\t\t \tSystem.out.println(\"inside CP\");\r\n\t\t\t \tsleep(2000);\r\n\t\t\t \tselectListValue(locator_split(\"listpredominantcope\"), getValue(\"Predominantconstruction\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tclearWebEdit(locator_split(\"txtis06AA\"));\r\n\t\t\t\t sleep(5000);\r\n\t\t\t\t sendKeys(locator_split(\"txtis06AA\"),getValue(\"ClassAA\"));\r\n\t\t\t\t\tsleep(2000);\r\n\t\t\t\t\t System.out.println(\"Value entered in AA\");\r\n\t\t\t\t\t click(locator_split(\"txtis05A\"));\r\n\t\t\t\t\t sleep(10000);\r\n\t\t\t\t clearWebEdit(locator_split(\"txtis05A\"));\r\n\t\t\t\t sleep(5000);\r\n\t\t\t\t sendKeys(locator_split(\"txtis05A\"),getValue(\"ClassA\"));\r\n\t\t\t\t sleep(2000);\r\n\t\t\t\t click(locator_split(\"txtis04\"));\r\n\t\t\t\t sleep(10000);\r\n\t\t\t\t clearWebEdit(locator_split(\"txtis04\"));\r\n\t\t\t\t sleep(5000);\r\n\t\t\t\t sendKeys(locator_split(\"txtis04\"),getValue(\"ClassB\"));\r\n\t\t\t\t sleep(2000);\r\n\t\t\t\t click(locator_split(\"txtcmd04\"));\r\n\t\t\t\t sleep(10000);\r\n\t\t\t\t clearWebEdit(locator_split(\"txtcmd04\"));\r\n\t\t\t\t sleep(5000);\r\n\t\t\t\t sendKeys(locator_split(\"txtcmd04\"),getValue(\"ClassC\"));\r\n\t\t\t\t sleep(2000);\r\n\t\t\t\t click(locator_split(\"txtis03\"));\r\n\t\t\t\t sleep(10000);\r\n\t\t\t\t clearWebEdit(locator_split(\"txtis03\"));\r\n\t\t\t\t sleep(5000);\r\n\t\t\t\t sendKeys(locator_split(\"txtis03\"),getValue(\"IS03ClassB\"));\r\n\t\t\t\t sleep(2000);\r\n\t\t\t\t click(locator_split(\"txtcmd03\"));\r\n\t\t\t\t sleep(10000);\r\n\t\t\t\t clearWebEdit(locator_split(\"txtcmd03\"));\r\n\t\t\t\t sleep(5000);\r\n\t\t\t\t sendKeys(locator_split(\"txtcmd03\"),getValue(\"CMDISO3ClassC\"));\r\n\t\t\t\t sleep(2000);\r\n\t\t\t\t click(locator_split(\"txtis02\"));\r\n\t\t\t\t sleep(10000);\r\n\t\t\t\t clearWebEdit(locator_split(\"txtis02\"));\r\n\t\t\t\t sleep(5000);\r\n\t\t\t\t sendKeys(locator_split(\"txtis02\"),getValue(\"IS02ClassC\"));\r\n\t\t\t\t sleep(2000);\r\n\t\t\t\t click(locator_split(\"txtis01\"));\r\n\t\t\t\t sleep(10000);\r\n\t\t\t\t clearWebEdit(locator_split(\"txtis01\"));\r\n\t\t\t\t sleep(5000);\r\n\t\t\t\t sendKeys(locator_split(\"txtis01\"),getValue(\"IS01\"));\r\n\t\t\t \t\tsleep(5000);\t \r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t selectListValue(locator_split(\"listtradeoccupancy\"), getValue(\"TradeOccupancy\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t selectListValue(locator_split(\"listhazardgrade\"), getValue(\"Hazardgrade\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t \r\n\t\t\t if (Tradeoccupancy.equals(\"Oil & Chemical\")&& (Account.equals(\"EEA\")))\r\n\t\t\t {\r\n\t\t\t \t sleep(1000);\r\n\t\t\t selectListValue(locator_split(\"listfireindex\"), getValue(\"Fireindex\"));\r\n\t\t\t sleep(1000);\r\n\t\t\t selectListValue(locator_split(\"listexplosionindex\"),getValue(\"Explosionindex\"));\r\n\t\t\t \t\t\r\n\t\t\t sleep(1000);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t\tsleep(3000);\r\n\t\t\t clearWebEdit(locator_split(\"txtoperatinghours\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtoperatinghours\"), getValue(\"Operatinghours\"));\r\n\t\t\t sleep(1000);\r\n\t\t\t clearWebEdit(locator_split(\"txtoperatingdays\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtoperatingdays\"), getValue(\"Operatingdays\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t clearWebEdit(locator_split(\"txtautosprinkler\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtautosprinkler\"), getValue(\"Autosprinkler\"));\r\n\t\t\t\tsleep(3000);\r\n\t\t\t clearWebEdit(locator_split(\"txtadequate\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtadequate\"), getValue(\"Adequate\"));\r\n\t\t\t\tsleep(3000);\r\n\t\t\t clearWebEdit(locator_split(\"txtasn\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtasn\"), getValue(\"ASN\"));\r\n\t\t\t\tsleep(3000);\r\n\t\t\t clearWebEdit(locator_split(\"txtdeduction\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t sendKeys(locator_split(\"txtdeduction\"), getValue(\"Deduction\"));\r\n\t\t\t sleep(5000);\r\n\t\t\t click(locator_split(\"txtyearbuildcope\"));\r\n\t\t\t sleep(2000);\r\n\t\t\t \r\n/*WebElement checkbox=driver.findElement(By.xpath(\"//img[contains(@name,'SaveButtonsForCOPE_pyWorkPage')]\")).\r\nsleep(2000);\r\nhighlight(checkbox);*/\r\nSystem.out.println(\"Checkbox status\");\r\nsleep(2000);\r\n/*System.out.println(driver.findElement(By.xpath(\"//img[@src='webwb/lv_unchecked_12144257304.gif!!.gif']\")).isDisplayed());\r\nsleep(2000);\r\nif(driver.findElement(By.xpath(\"//img[@src='webwb/lv_unchecked_12144257304.gif!!.gif']\")).isDisplayed()== true)\r\n{\r\n\tsleep(2000);\r\n\tclick(locator_split(\"checkboxsavecope\"));\r\n\tsleep(2000);\r\n\t//driver.findElement(By.xpath(\"//img[@src='webwb/lv_unchecked_12144257304.gif!!.gif']\")).click();\r\n}else{\r\n\tSystem.out.println(\"Check box already checked\");\r\n}*/\r\n//System.out.println(checkbox.getAttribute(arg0)());\r\n\t\t\t // System.out.println(verifyCheckboxChecked(locator_split(\"checkboxsavecope\")));\r\n\t\t//\tflag=verifyCheckboxChecked(locator_split(\"xpath-//img[contains(@name,'SaveButtonsForCOPE_pyWorkPage')]\"));\r\n\t\t/*\t sleep(2000);\r\n\t\t\t if(!checkbox.isSelected()){\r\n\t\t\t\t System.out.println(\"inside if loop\");\r\n\t\t\t\t checkbox.click();\r\n\t\t\t\t sleep(2000);\r\n\t\t\t }\r\n\t\t\t else{\r\n\t\t\t\t checkbox.click();\r\n\t\t\t\t System.out.println(\"inside else loop\");\r\n\t\t\t\t sleep(2000);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t checkbox.click();\r\n\t\t\t\t sleep(2000);\r\n\t\t\t }*/\r\n\t\t\t \r\n\t\t\t /* driver.findElement(By.xpath(\"//label[contains(.,'Click here if the Screen is Completed')]\")).click();\r\n\t\t\t Robot r=new Robot();\r\n\t\t\t r.keyPress(java.awt.event.KeyEvent.VK_TAB);\r\n\t\t\t sleep(1000);\r\n\t\t\t r.keyPress(java.awt.event.KeyEvent.VK_ENTER);\r\n\t\t\t sleep(2000);*/\r\n\t\t/*if (flag==true){\r\n\t\t\t System.out.println(\"flag\"+flag);\r\n\t\t\t System.out.println(\"Checked Already\");\r\n\t\t\t sleep(2000);\r\n\t\t\t click(locator_split(\"checkboxsavecope\"));\r\n\t\t\t //sleep(2000);\r\n\t\t\t \t//\t\t click(locator_split(\"checkboxsavecope\"));\r\n\t\t click(locator_split(\"btncopesave\"));\r\n\t\t\t sleep(2000);\r\n\t\t\t }else{\r\n\t\t\t\t\r\n\t\t\t\t sleep(2000);\r\n\t\t\t\t click(locator_split(\"checkboxsavecope\"));\r\n\t\t\t\t sleep(3000);\r\n\t\t\t }\r\n\t\t\t */\r\n\t\t\t \r\n\t\t\t sleep(5000);\r\n\t\t\t if(getValue(\"BROWSER\").equalsIgnoreCase(\"InternetExplorer\")){\r\n\t\t\t System.out.println(\"inside iE loop\");\r\n\t\t\t \tclick(locator_split(\"btncopesave_ie\"));\t\r\n\t\t\t }else{\r\n\t\t\t \tclick(locator_split(\"btncopesave_ie\"));\r\n\t\t\t }\r\n\t\t\r\n\t\t\t sleep(5000);\r\n\t\t\t click(locator_split(\"txtLocationnext\"));\r\n\t\t\t sleep(3000);\r\n\t\t\t\t//clickbylinktext(\"No\");\r\n\t\t\t\r\n\t\t//switchframe(\"PegaGadget2Ifr\");\r\n\t\t//\tsleep(3000);\r\n\t\t//clickbylinktext(\"No\");\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Report tab is clicked and user is logged in\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Report tab is not clicked in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "@Test(timeout = 4000)\n public void test340() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n ElExpression elExpression0 = new ElExpression(\"4_R]T<#2)Q?]R7Ut\");\n // Undeclared exception!\n try { \n xmlEntityRef0.fileInput((String) null, elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public void ClickChecoutInsertBillingInfobutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout InsertBillingInfo submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btncheckoutInsertBillingInfo\"));\r\n\t\t\tSystem.out.println(\"Checkout InsertBillingInfo submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout InsertBillingInfo submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout InsertBillingInfo submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutInsertBillingInfo\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void clickCheckoutButton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- CheckOut button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"btnCheckout\"));\r\n\t\t\tclick(locator_split(\"btnCheckout\")); \r\n\t\t\tsleep(1000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- CheckOut button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- CheckOut button is not clicked \"+elementProperties.getProperty(\"btnCheckout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnCheckout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t\tReporter.log(\"Clicked on Checkout button\");\r\n\t}", "public void EnterQuantityandAdditem(String itemnumber, String quantity){\r\n\t\tString ItemNumber = getValue(itemnumber);\r\n\t\tString Quantity = getValue(quantity);\r\n\t\tint ItemNumberint = Integer.parseInt(ItemNumber);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+ \"Click \" + ItemNumberint + \" Compare check box\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Quantity should be entered and item should be added\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtSearchQuantity\"));\r\n\t\t\tList<WebElement> ele1 = listofelements(locator_split(\"txtSearchAddtoCart\"));\r\n\t\t\tSystem.out.println(\"Total no of elements for Quantity \"+ ele.size());\r\n\t\t\tSystem.out.println(\"Total no of elements for Add to Cart buttons \"+ ele1.size());\r\n\t\t\tfor(int i=0; i<ItemNumberint+1; i++){\r\n\t\t\t\tif(ItemNumberint==i+1 && i==0){\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(ItemNumberint==i+1 && i==1){\r\n\t\t\t\t\tele.get(i+2).click();\r\n\t\t\t\t\tele.get(i-1).click();\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(ItemNumberint==i+1 && i>1){\r\n\t\t\t\t\tele.get(i+1).click();\r\n\t\t\t\t\tele.get(i-1).click();\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Itemsnumber/Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSearchQuantity\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSearchAddtoCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Both the Quantity elements and Add to Cart items are not equal\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try {\n FormElement formElement0 = errorPage0.numberInput(\"2CVo`z1\", (CharSequence) \"2CVo`z1\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "@Test\n public void test090() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Vi_5aV\", \"Vi_5aV\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.br();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n public void test110() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n List<RenderableComponent> list0 = errorPage0._getRenderableChildren();\n NumberInput numberInput0 = new NumberInput(errorPage0, \"$.{\", \"$.{\", \"$.{\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.h1();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "public void InkandTonersearchbox(String searchitem){\r\n\t\tString inktonersearch = getValue(searchitem);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The search item '\"+inktonersearch+\"' should be entered in the search box\");\r\n\t\ttry{\r\n\r\n\t\t\tsendKeys(locator_split(\"InkandTonersearchbox\"), inktonersearch);\r\n\t\t\tclick(locator_split(\"InkandTonersearchboxgo\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"Search item \"+inktonersearch+\" is enterd\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Search item '\"+inktonersearch+\"' is enterd in search box\");\r\n\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Search item '\"+inktonersearch+\"' is not enterd in search box\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"InkandTonersearchbox\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+\" or \"+elementProperties.getProperty(\"InkandTonersearchboxgo\").toString().replace(\"By.\", \" \")+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "void add(String prompt, UIFormTest test);", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "public void solution() {\n\t\t\n\t}", "@When(\"^enter the value in the search selenuim text box$\")\n\tpublic void enter_the_value_in_the_search_selenuim_text_box() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@id='gsc-i-id1']\")).sendKeys(\"cucumber\");\n\t // throw new PendingException();\n\t}", "public void ClickChecoutsubmitcontinue(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Registration submit continue button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tif(isElementPresent(locator_split(\"btncheckoutregistrationsubmitcontinue\"))){\r\n\t\t\t\tclick(locator_split(\"btncheckoutregistrationsubmitcontinue\"));\r\n\t\t\t}else{\r\n\t\t\t\tclick(locator_split(\"chkcheckoutregistrationconfirmaddress\"));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Checkout Registration submit continue button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Registration submit continue button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Registration submit continue button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutregistrationsubmitcontinue\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n // Undeclared exception!\n try { \n checkbox0.multiSelect(\"fieldset\", stringSelectModel0, \"Col component can be added only to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n Checkbox checkbox0 = new Checkbox(textArea0, \"=P+hF^\", \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n checkbox0.q();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void LocationAssesment_Location(){\r\n\t\t//String RFSID = getValue(\"RFSName\");\r\n\t//\tString password = getValue(Password);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tdriver.switchTo().defaultContent();\r\n\t\t\t\t\tsleep(3000);\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget2Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocationAssesment\"));\r\n\t\t\t click(locator_split(\"linkclickLocation\"));\r\n\t\t\t // driver.findElement(By.xpath(\"//*[@tabindex='4']/a/span\")).click();\r\n\t\t\t // driver.findElement(By.xpath(\"//a[@title='Click here to open Location Assessment']\")).click();\r\n\t\t\t driver.switchTo().defaultContent();\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget3Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocation\"));\r\n\t\t\t //driver.findElement(By.xpath(\"//li[@tabindex='0']/a/span\")).click();\r\n\t\t\t System.out.println(\"verification\");\r\n\t\t\t sleep(1000);\r\n\t\t\t\t System.out.println(driver.findElement(By.id(\"GRASP_LOCATION_NM\")).getAttribute(\"value\"));\r\nsleep(2000);\r\n\t\t\t \r\n\t\t\t // verifyTextPresent(locator_split(\"txtLocation\"), getValue(\"Locationname\"),\"Location Name\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtLocation\"), getValue(\"Locationname\")) == false){\r\n\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtLocation\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtLocation\")), getValue(\"Locationname\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t // getAndVerifyTextvalue(locator_split(\"txtCity\"), getValue(\"CityName\"),\"city\");\r\n\t\t\t // System.out.println(driver.findElement(By.id(\"GRASP_LOCATION_NM\")).getText());\r\n\t\t\t \r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtCity\"), getValue(\"CityName\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtCity\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtCity\")), getValue(\"CityName\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"ListCountry\"), getValue(\"Country\"),\"Country\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"ListCountry\"), getValue(\"Country\"))==false){\r\n\t\t\t\t \r\n\t\t\t \t//clearWebEdit(locator_split(\"ListCountry\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tselectListValue((locator_split(\"ListCountry\")), getValue(\"Country\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBIvalue\"),getValue(\"BIValue\"),\"BI Value\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBIvalue\"), getValue(\"BIValue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBIvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBIvalue\")), getValue(\"BIValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBIindemnityperiod\"), getValue(\"BIIndemnityperiod\"),\"BI Indemnity period\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBIindemnityperiod\"), getValue(\"BIIndemnityperiod\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBIindemnityperiod\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBIindemnityperiod\")), getValue(\"BIIndemnityperiod\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBuildingValue\"), getValue(\"BuildingValue\"),\"Building\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBuildingValue\"), getValue(\"BuildingValue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBuildingValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBuildingValue\")), getValue(\"BuildingValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtMEvalue\"), getValue(\"MandEvalue\"),\"M+EValue\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtMEvalue\"), getValue(\"MandEvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtMEvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtMEvalue\")), getValue(\"MandEvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtcontentvalue\"), getValue(\"Contentvalue\"),\"Content value\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtcontentvalue\"), getValue(\"Contentvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtcontentvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtcontentvalue\")), getValue(\"Contentvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t //verifyTextPresent(locator_split(\"txtstockinventory\"), getValue(\"Stockvalue\"),\"Stock inventory\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtstockinventory\"), getValue(\"Stockvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtstockinventory\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtstockinventory\")), getValue(\"Stockvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtotherPD\"), getValue(\"OtherPD\"),\"Other PD\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtotherPD\"), getValue(\"OtherPD\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtotherPD\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtotherPD\")), getValue(\"OtherPD\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t //click(locator_split(\"txtLocationnext\"));\r\n\t\t\t\t//clickbylinktext(\"No\");\r\n\t\t\t\r\n\t\t//switchframe(\"PegaGadget2Ifr\");\r\n\t\tsleep(3000);\r\n\t\t//clickbylinktext(\"No\");*/\r\n\t\t\tif(driver.findElement(By.id(\"SectionCompleted\")).isSelected()==true)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Check Box alresy selected\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Check box is not selected\");\r\n\t\t\t\tdriver.findElement(By.id(\"SectionCompleted\")).click();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Report tab is clicked and user is logged in\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Report tab is not clicked in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public void ClickMyAccount( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Link clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"LoginLogout\"));\r\n\t\t\tclick(locator_split(\"LoginLogout\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Link is not clicked \"+elementProperties.getProperty(\"LoginLogout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}" ]
[ "0.6252807", "0.6147161", "0.604046", "0.5931247", "0.5923304", "0.59229034", "0.5871383", "0.58711106", "0.5763329", "0.57255834", "0.5651298", "0.56497294", "0.5647598", "0.55800074", "0.5555125", "0.55395895", "0.5534646", "0.5521614", "0.5513358", "0.550031", "0.5499562", "0.54932714", "0.5470762", "0.5464609", "0.5460198", "0.54594886", "0.54531884", "0.5449149", "0.5439026", "0.5435638", "0.54348636", "0.54249716", "0.54214215", "0.5416827", "0.54034096", "0.53924495", "0.5384264", "0.53757006", "0.537337", "0.53647816", "0.5352828", "0.5346377", "0.5334169", "0.53278744", "0.5318493", "0.53096735", "0.52814", "0.5279725", "0.52768546", "0.5274727", "0.52737767", "0.52601254", "0.5253896", "0.52491933", "0.5228216", "0.52170306", "0.5216784", "0.5216731", "0.52071494", "0.5205778", "0.5201801", "0.51971716", "0.51961124", "0.5191903", "0.51909363", "0.51882154", "0.51878905", "0.5185183", "0.5184738", "0.518055", "0.5178706", "0.5177478", "0.5175985", "0.5174497", "0.5173897", "0.5171581", "0.5147425", "0.51459605", "0.51455545", "0.5143026", "0.5143026", "0.51423955", "0.51359713", "0.51321757", "0.51318514", "0.513006", "0.51266307", "0.51231307", "0.5122937", "0.5122591", "0.51190853", "0.511632", "0.51132554", "0.51109606", "0.50999784", "0.5097058", "0.50966173", "0.50916773", "0.50914073", "0.5090502" ]
0.5551211
15
Test case number: 14 / 1 covered goal: Goal 1. wheel.components.Component.findAll(Lwheel/components/ElExpression;)Ljava/util/List;: I25 Branch 115 IFEQ L2029 true
@Test public void test014() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); ElExpression elExpression0 = errorPage0.el(" does not exist."); List<Component> list0 = errorPage0.findAll(elExpression0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test226() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n ElExpression elExpression0 = new ElExpression(\"\");\n List<Component> list0 = xmlEntityRef0.findAll(elExpression0);\n assertEquals(\"&!a0Q!<8UDk+%_*<Z'\", xmlEntityRef0.getComponentId());\n assertNotNull(list0);\n }", "@Test\n @NavigateTo(\"/group/dp/common-components\")\n public void testListingComponents() {\n // #action: Navigate to the common-components landing page.\n // #expects: There is at least one component listed.\n assertThat(driver.findElements(By.cssSelector(\".categories li\")).size()).isGreaterThan(0);\n }", "@Test\n void test014_testGetConnectedComponents() {\n try {\n christmasBuddENetwork.addFriendship(\"Harry\", \"Prancer\");\n\n christmasBuddENetwork.addFriendship(\"Santa\", \"Rudolph\");\n christmasBuddENetwork.addFriendship(\"Comet\", \"Santa\");\n christmasBuddENetwork.addFriendship(\"Rudolph\", \"Comet\");\n christmasBuddENetwork.addFriendship(\"Grinch\", \"Comet\");\n\n // There should be 2 connected components.\n Set<Graph> christmasComponents =\n christmasBuddENetwork.getConnectedComponents();\n int numComponents = christmasComponents.size();\n //\n if (numComponents != 2) {\n fail(\"\");\n }\n Iterator<Graph> christmasGraphIterator = christmasComponents.iterator();\n\n boolean firstCompFound = false;\n boolean secondCompFound = false;\n int componentsFound = 0;\n while (christmasGraphIterator.hasNext()) {\n Graph christmasGraph = christmasGraphIterator.next();\n componentsFound = componentsFound + 1;\n //\n if (christmasGraph.size() == 1) {\n if (firstCompFound == true) {\n fail(\"test014_testGetConnectedComponents(): FAILED! Duplicate \"\n + \"component (size 1) found! :(\");\n }\n Set<User> oneConnectedComponentVertices =\n christmasGraph.getAllVertices();\n ArrayList<String> componentUsersList = new ArrayList<String>();\n for (User userName : oneConnectedComponentVertices) {\n componentUsersList.add(userName.getName());\n System.out.println(userName.getName());\n }\n if ((!componentUsersList.contains(\"Harry\"))\n || (!componentUsersList.contains(\"Prancer\"))) {\n fail(\"test014_testGetConnectedComponents(): Failed! :( Did NOT \"\n + \"have Harry and Prancer\");\n } else {\n firstCompFound = true;\n\n }\n }\n\n if (christmasGraph.size() == 4) {\n if (secondCompFound == true) {\n fail(\"test014_testGetConnectedComponents: FAILED! Duplicate \"\n + \"component (size 4) found! :(\");\n }\n Set<User> secondConnectedComponentVertices =\n christmasGraph.getAllVertices();\n ArrayList<String> componentUsersList2 = new ArrayList<String>();\n for (User userName : secondConnectedComponentVertices) {\n componentUsersList2.add(userName.getName());\n }\n if ((!componentUsersList2.contains(\"santa\"))\n || (!componentUsersList2.contains(\"rudolph\"))\n || (!componentUsersList2.contains(\"comet\"))\n || (!componentUsersList2.contains(\"grinch\"))) {\n fail(\"test014_testGetConnectedComponents(): FAILED! Did NOT have \"\n + \"Santa, Rudolph, Comet, and Grinch!\");\n } else {\n secondCompFound = true;\n }\n }\n }\n\n if (componentsFound != 2) {\n fail(\"test014_testGetConnectedComponents(): Did NOT return 2 for the \"\n + \"connected components but instead returned: \" + componentsFound);\n }\n } catch (Exception e) {\n fail(\"test014_testGetConnectedComponents(): Failed! :(. Threw unexpected \"\n + \"exception\");\n }\n\n }", "protected void checkComponentList()\n {\n String lsLeft ;\n String lsDocComp ;\n int liDotIdx ;\n int liNumComps ;\n Hashtable loCompHash = new Hashtable( 5 ) ;\n\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n lsLeft = getData( \"AND_COND_LHS_\" + liCtr ).getString() ;\n if ( lsLeft != null )\n {\n liDotIdx = lsLeft.indexOf( '.' ) ;\n if ( liDotIdx >= 0 )\n {\n lsDocComp = lsLeft.substring( 0, liDotIdx ) ;\n } /* end if ( liDotIdx >= 0 ) */\n else\n {\n lsDocComp = lsLeft ;\n } /* end else */\n loCompHash.put( lsDocComp, lsDocComp ) ;\n } /* end if ( lsLeft != null ) */\n } /* end for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ ) */\n\n liNumComps = loCompHash.size() ;\n if ( liNumComps > 2 )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( liNumComps > 2 ) */\n else if ( liNumComps == 2 )\n {\n Enumeration leComps = loCompHash.elements() ;\n String lsComp1 = (String)leComps.nextElement() ;\n String lsComp2 = (String)leComps.nextElement() ;\n\n if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) &&\n ( !lsComp2.endsWith( \"_DOC_HDR\" ) ) )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) && . . . */\n } /* end else if ( liNumComps == 2 ) */\n }", "@Test\n public void should_find_as_many_test_units_as_features_and_examples_available_in_classpath() throws Exception {\n List<TestUnit> testUnits = finder.findTestUnits(HideFromJUnit.Concombre.class);\n\n // then\n assertThat(testUnits).hasSize(8);\n }", "@Test\n @NavigateTo(\"/group/dp/common-components/browse\")\n public void testBrowsingComponents() {\n // #action: Navigate to the common-components browse page.\n // #expects: There is at least one component listed.\n assertThat(driver.findElements(By.cssSelector(\".title-list li\")).size()).isGreaterThan(0);\n }", "public static void main(String... args) {\n SelfAdjustingList<Integer> xs = new SelfAdjustingList<>();\n for (int x = 1; x <= 10; x++)\n xs.add(x);\n for (int i = 0; i < xs.size(); i++)\n assert 10 - i == xs.get(i);\n for (int i = 0; i < xs.size(); i++) {\n int x = xs.get(i);\n assert x == xs.find(i);\n }\n for (int i = 0; i < xs.size(); i++) {\n int x = xs.find(i);\n assert x == xs.get(0);\n }\n System.out.println(\"All tests passed...\");\n }", "@Test\n public void testDAM30901001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30901001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n todoListPage.selectCompleteStatRadio();\n\n todoListPage = todoListPage.ifElementUsageSearch();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n\n // 1 and 3 todos are incomplete. hence not displayed\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000003\");\n assertThat(isTodoPresent, is(false));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(false));\n // 10 todo is complete. hence displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // default value of finished is now false.hence todos like 1,3 will be displayed\n // where as todo like 10 will not be displayed.\n todoListPage.selectInCompleteStatRadio();\n todoListPage = todoListPage.ifElementUsageSearch();\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000003\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n // 10 todo is complete. hence displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(false));\n\n // scenario when finished property of criteria is null.\n\n }", "public void testPegList() throws IOException {\n PegList testList = new PegList(new File(\"data\", \"testP.fa\"));\n Sequence found = testList.get(\"fig|1538.8.peg.30\");\n assertNull(found);\n found = testList.get(\"fig|1538.8.peg.12\");\n assertThat(found.getLabel(), equalTo(\"fig|1538.8.peg.12\"));\n Sequence found7 = testList.get(\"fig|1538.8.peg.7\");\n Sequence found2 = testList.get(\"fig|1538.8.peg.2\");\n Sequence found3 = testList.get(\"fig|1538.8.peg.3\");\n Sequence found10 = testList.get(\"fig|1538.8.peg.10\");\n ArrayList<Sequence> buffer = new ArrayList<Sequence>();\n testList.findClose(found, 1, buffer);\n assertThat(buffer, contains(found2));\n testList.suppress(found2);\n testList.suppress(found3);\n testList.findClose(found, 2, buffer);\n assertThat(buffer, contains(found2, found7, found10));\n Sequence found1 = testList.get(\"fig|1538.8.peg.1\");\n Sequence found4 = testList.get(\"fig|1538.8.peg.4\");\n Sequence found5 = testList.get(\"fig|1538.8.peg.5\");\n Sequence found6 = testList.get(\"fig|1538.8.peg.6\");\n Sequence found8 = testList.get(\"fig|1538.8.peg.8\");\n Sequence found9 = testList.get(\"fig|1538.8.peg.9\");\n Sequence found11 = testList.get(\"fig|1538.8.peg.11\");\n Sequence found13 = testList.get(\"fig|1538.8.peg.13\");\n Sequence found14 = testList.get(\"fig|1538.8.peg.14\");\n Sequence found15 = testList.get(\"fig|1538.8.peg.15\");\n testList.suppress(found1);\n testList.suppress(found4);\n testList.suppress(found5);\n testList.suppress(found6);\n testList.suppress(found7);\n testList.suppress(found8);\n testList.suppress(found9);\n testList.suppress(found10);\n testList.suppress(found11);\n testList.suppress(found14);\n testList.suppress(found15);\n testList.findClose(found, 4, buffer);\n assertThat(buffer, contains(found2, found7, found10, found13));\n }", "@Test\r\n public void testFindAll() throws Exception {\r\n }", "@Test(timeout = 4000)\n public void test225() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"java.lang.String@000000005\", \"]f '8Drr>Uj1==M2\");\n List<RenderableComponent> list0 = checkbox0._getRenderableChildren();\n assertEquals(\"]f '8Drr>Uj1==M2\", xmlEntityRef0.getComponentId());\n assertNotNull(list0);\n }", "@Test\n void buildWaredDrobeTest() {\n WaredDrobeBuilder waredDrobeBuilder = new WaredDrobeBuilder();\n WaredDrobe waredDrobe = waredDrobeBuilder.build();\n List<String>partlist=waredDrobe.getParts();\n\n List<String>steps = Arrays.asList(\"bottom\",\"side\",\"side\",\"back\",\"top\",\"shelf\",\"shelf\",\"shelf\",\"shelf\",\n \"shelf\",\"shelf\",\"shelf\",\"shelf\",\"door\",\"door\");\n assertEquals(steps,partlist);\n\n\n\n\n }", "@Test\n\tpublic void testfindHouseRoomWithBedsList(){\n\t\tSystem.out.println();\n\t}", "@Test\n\tpublic void testTargetsIntoRoomShortcut() \n\t{\n\t\tboard.calcTargets(9, 18, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(6, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(9, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(11, 18)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 18)));\n\t}", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "@Test\n\tpublic void ensureBug77IsSolved() {\n\t\tTag a = new Tag(A);\n\t\ttagService.create(a);\n\t\tTag b = tagService.create(new Tag(B));\n\t\tTag c = tagService.create(new Tag(C));\n\t\tIterable<Tag> values = tagService.find().matching(\n\t\t\t\tnew QueryBuilder<TagInformer>() {\n\n\t\t\t\t\tpublic QueryExpression createMatchingExpression(\n\t\t\t\t\t\t\tTagInformer object) {\n\t\t\t\t\t\treturn object.getText().equalsToIgnoreCase(\"a\");\n\t\t\t\t\t}\n\t\t\t\t}).getAll();\n\t\tassertThat(values, IsCollectionContaining.hasItems(a));\n\t\tassertThat(values, IsNot.not(IsCollectionContaining.hasItems(b, c)));\n\t}", "@Test\n public void test19() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1339,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test19\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n NodeListIterator nodeListIterator0 = IteratorUtils.nodeListIterator((NodeList) iIOMetadataNode0);\n assertEquals(false, nodeListIterator0.hasNext());\n }", "@Test\n public void findAll() throws Exception {\n }", "@Test\n\tpublic void findTypeList() {\n\t}", "@Test\n public void testFindComponentsLikeNombreAprobados() {\n System.out.println(\"findComponentsLikeNombreAprobados\");\n query = mock(Query.class);\n String namedQuery = \"Componente.findComponentsLikeNombreAprobados\";\n List<Componente> expected = new ArrayList<>();\n when(this.em.createNamedQuery(namedQuery)).thenReturn(query);\n when(cDao.findComponentsLikeNombreAprobados(anyString(), (Componente) any())).thenReturn(expected);\n List<Componente> result = cDao.findComponentsLikeNombreAprobados(anyString(), (Componente) any());\n assertThat(result, is(expected));\n }", "@Test(timeout = 4000)\n public void test136() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"cannot bind to collection property: \", \".*,r%\");\n // Undeclared exception!\n try { \n checkbox0.h2();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testDAM30503001() {\n\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30503001Click();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n\n assertThat(isTodoPresent, is(true));\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n todoListPage.setTodoCreationDate(\"2016-12-30\");\n\n todoListPage = todoListPage.searchByCriteriaBean();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // this todo does not meets the criteria.Hence not displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n assertThat(isTodoPresent, is(false));\n\n }", "@Test\n\tvoid test4AddComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tvc.addComponent(comp3);\n\t\tassertEquals(comp3.hashCode(), vc.getComponentsList().get(vc.getComponentsList().size() - 1).hashCode());\n\t}", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test public void shouldReturnAllToolsFromAGroupWhenSearchedByItsGroup(){\n given.imInTheMainPage();\n when.searchByToolsGroup(GROUPS.RADIOS.getGroupName());\n then.mySearchWillReturnTheTools(TOOLS.PLANETA_ATLANTIDA, TOOLS.POD_CASTING, TOOLS.RADIOS_ADMIN, TOOLS.RADIOS_PLAYLIST, TOOLS.RADIOS_SITE, TOOLS.RADIOS_E_TV);\n }", "@Test \n\tpublic void testTargetsIntoRoom()\n\t{\n\t\t// One room is exactly 2 away\n\t\tboard.calcTargets(5, 24, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(3, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(5, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(4, 23)));\n\t}", "@Test\n public void testAbstractScanner() throws Exception {\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"SimpleLinear\");\n job.setDefinition(new CpsFlowDefinition(\n \"sleep 2 \\n\" +\n \"echo 'donothing'\\n\" +\n \"echo 'doitagain'\",\n true));\n\n /* Flow structure (ID - type)\n 2 - FlowStartNode\n 3 - SleepStep\n 4 - EchoStep\n 5 - EchoStep\n 6 - FlowEndNode\n */\n\n WorkflowRun b = r.assertBuildStatusSuccess(job.scheduleBuild2(0));\n FlowExecution exec = b.getExecution();\n List<FlowNode> heads = exec.getCurrentHeads();\n FlowNode intermediateNode = exec.getNode(\"4\");\n AbstractFlowScanner linear = new LinearScanner();\n\n // ## Bunch of tests for convertToFastCheckable ##\n Assert.assertEquals(Collections.emptySet(), linear.convertToFastCheckable(null));\n Assert.assertEquals(Collections.emptySet(), linear.convertToFastCheckable(new ArrayList<>()));\n\n Collection<FlowNode> coll = linear.convertToFastCheckable(Collections.singletonList(intermediateNode));\n Assert.assertTrue(\"Singleton set used for one element\", coll instanceof AbstractSet);\n Assert.assertEquals(1, coll.size());\n\n Collection<FlowNode> multipleItems = Arrays.asList(exec.getNode(\"3\"), exec.getNode(\"2\"));\n coll = linear.convertToFastCheckable(multipleItems);\n Assert.assertTrue(\"Original used for short list\", coll instanceof List);\n Assert.assertEquals(2, coll.size());\n\n coll = linear.convertToFastCheckable(new LinkedHashSet<>(multipleItems));\n Assert.assertTrue(\"Original used where set\", coll instanceof LinkedHashSet);\n\n multipleItems = new ArrayList<>();\n for (int i=0; i < 3; i++) {\n multipleItems.add(intermediateNode);\n }\n coll = linear.convertToFastCheckable(multipleItems);\n Assert.assertTrue(\"Original used for short list\", coll instanceof List);\n Assert.assertEquals(3, coll.size());\n\n multipleItems = new ArrayList<>();\n for (int i=0; i < 10; i++) {\n multipleItems.add(intermediateNode);\n }\n coll = linear.convertToFastCheckable(multipleItems);\n Assert.assertTrue(\"Original used for short list\", coll instanceof HashSet);\n Assert.assertEquals(1, coll.size());\n\n\n // Setup, return false if no nodes to iterate, else true\n FlowNode lastNode = heads.get(0);\n FlowNode nullNode = null;\n Collection<FlowNode> nullColl = null;\n\n Assert.assertTrue(linear.setup(heads, null));\n Assert.assertTrue(linear.setup(heads, Collections.emptySet()));\n Assert.assertFalse(linear.setup(nullColl, heads));\n Assert.assertFalse(linear.setup(nullColl, null));\n Assert.assertFalse(linear.setup(heads, heads));\n Assert.assertTrue(linear.setup(heads));\n Assert.assertFalse(linear.setup(nullColl));\n Assert.assertFalse(linear.setup(Collections.emptySet()));\n Assert.assertTrue(linear.setup(lastNode));\n Assert.assertTrue(linear.setup(lastNode, nullColl));\n Assert.assertFalse(linear.setup(nullNode));\n Assert.assertFalse(linear.setup(nullNode, heads));\n Assert.assertFalse(linear.setup(nullNode, nullColl));\n Assert.assertTrue(linear.setup(Arrays.asList(intermediateNode, lastNode), Collections.singleton(intermediateNode)));\n Assert.assertEquals(lastNode, linear.myCurrent);\n\n // First match, with no blacklist\n int[] ids = {6, 5, 4, 3, 2};\n FlowNode firstEchoNode = exec.getNode(\"5\");\n FlowExecution nullExecution = null;\n\n Assert.assertEquals(firstEchoNode, linear.findFirstMatch(heads, Collections.emptySet(), FlowTestUtils.MATCH_ECHO_STEP));\n Assert.assertEquals(firstEchoNode, linear.findFirstMatch(heads, FlowTestUtils.MATCH_ECHO_STEP));\n Assert.assertEquals(firstEchoNode, linear.findFirstMatch(lastNode, FlowTestUtils.MATCH_ECHO_STEP));\n Assert.assertEquals(firstEchoNode, linear.findFirstMatch(exec, FlowTestUtils.MATCH_ECHO_STEP));\n Assert.assertNull(linear.findFirstMatch(nullColl, FlowTestUtils.MATCH_ECHO_STEP));\n Assert.assertNull(linear.findFirstMatch(Collections.emptySet(), FlowTestUtils.MATCH_ECHO_STEP));\n Assert.assertNull(linear.findFirstMatch(nullNode, FlowTestUtils.MATCH_ECHO_STEP));\n Assert.assertNull(linear.findFirstMatch(nullExecution, FlowTestUtils.MATCH_ECHO_STEP));\n\n\n // Filtered nodes\n FlowTestUtils.assertNodeOrder(\"Filtered echo nodes\", linear.filteredNodes(heads, FlowTestUtils.MATCH_ECHO_STEP), 5, 4);\n FlowTestUtils.assertNodeOrder(\"Filtered echo nodes\", linear.filteredNodes(heads, Collections.singleton(intermediateNode), FlowTestUtils.MATCH_ECHO_STEP), 5);\n Assert.assertEquals(0, linear.filteredNodes(heads, null, Predicates.alwaysFalse()).size());\n Assert.assertEquals(0, linear.filteredNodes(nullNode, FlowTestUtils.MATCH_ECHO_STEP).size());\n Assert.assertEquals(0, linear.filteredNodes(Collections.emptySet(), FlowTestUtils.MATCH_ECHO_STEP).size());\n\n // Same filter using the filterator\n linear.setup(heads);\n ArrayList<FlowNode> collected = new ArrayList<>();\n Filterator<FlowNode> filt = linear.filter(FlowTestUtils.MATCH_ECHO_STEP);\n while (filt.hasNext()) {\n collected.add(filt.next());\n }\n FlowTestUtils.assertNodeOrder(\"Filterator filtered echo nodes\", collected, 5, 4);\n\n\n // Visitor pattern tests\n FlowTestUtils.CollectingVisitor visitor = new FlowTestUtils.CollectingVisitor();\n linear.visitAll(Collections.emptySet(), visitor);\n Assert.assertEquals(0, visitor.getVisited().size());\n visitor.reset();\n\n linear.visitAll(heads, visitor);\n FlowTestUtils.assertNodeOrder(\"Visiting all nodes\", visitor.getVisited(), 6, 5, 4, 3, 2);\n\n // And visiting with blacklist\n visitor.reset();\n linear.visitAll(heads, Collections.singleton(intermediateNode), visitor);\n FlowTestUtils.assertNodeOrder(\"Visiting all nodes with blacklist\", visitor.getVisited(), 6, 5);\n\n // Tests for edge cases of the various basic APIs\n linear.myNext = null;\n Assert.assertFalse(linear.hasNext());\n try {\n linear.next();\n Assert.fail(\"Should throw NoSuchElement exception\");\n } catch (NoSuchElementException nsee) {\n // Passing case\n }\n Assert.assertSame(linear.iterator(), linear);\n try {\n linear.remove();\n Assert.fail(\"Should throw UnsupportedOperation exception\");\n } catch (UnsupportedOperationException usoe) {\n // Passing case\n }\n }", "@Override\n protected List<ElementSearch> fw_findElementsBy(String PropType, String PropValue)\n {\n List<ElementSearch> temp_lst = new ArrayList<>();\n if (PropValue.contains(\"|\"))\n {\n String[] valueList = PropValue.split(\"\\\\|\");\n for (String eachValue : valueList) {\n if ((eachValue != null) && (eachValue.length() > 0))\n {\n temp_lst.addAll(((WebElement)element).findElements(Utilities.getIdentifier(PropType, eachValue)).stream().map(ElementObject::new).collect(Collectors.toList()));\n }\n }\n }\n else\n {\n temp_lst.addAll(((WebElement)element).findElements(Utilities.getIdentifier(PropType, PropValue)).stream().map(ElementObject::new).collect(Collectors.toList()));\n }\n //END HERE\n return temp_lst;\n }", "@Test\r\n\tpublic void testTargetsIntoRoomShortcut() \r\n\t{\r\n\t\tboard.calcTargets(11, 24, 3);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\t//up and then left\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 22)));\r\n\t\t//up left down\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 23)));\r\n\t\t//left up right\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 24)));\r\n\t\t//left only\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 21)));\r\n\t\t// into the rooms\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 23)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 22)));\t\t\t\r\n\t}", "static void m11180a(List<Component<?>> list) {\n Set<C3246b> c = m11182c(list);\n Set<C3246b> b = m11181b(c);\n int i = 0;\n while (!b.isEmpty()) {\n C3246b next = b.iterator().next();\n b.remove(next);\n i++;\n for (C3246b next2 : next.mo20820d()) {\n next2.mo20823g(next);\n if (next2.mo20822f()) {\n b.add(next2);\n }\n }\n }\n if (i != list.size()) {\n ArrayList arrayList = new ArrayList();\n for (C3246b next3 : c) {\n if (!next3.mo20822f() && !next3.mo20821e()) {\n arrayList.add(next3.mo20819c());\n }\n }\n throw new DependencyCycleException(arrayList);\n }\n }", "@Test\n public void testSearch() throws Exception {\n LocalLandCharge localLandChargeOne = TestUtils.buildLocalLandCharge();\n localLandChargeOne.getItem().setChargeCreationDate(new Date(1));\n\n LocalLandCharge localLandChargeTwo = TestUtils.buildLocalLandCharge();\n localLandChargeTwo.getItem().setChargeCreationDate(new Date(3));\n\n LocalLandCharge localLandChargeThree = TestUtils.buildLocalLandCharge();\n localLandChargeThree.getItem().setChargeCreationDate(new Date(2));\n\n LocalLandCharge lightObstructionNotice = TestUtils.buildLONCharge();\n localLandChargeTwo.getItem().setChargeCreationDate(new Date(4));\n\n testGenerate(Lists.newArrayList(localLandChargeOne, localLandChargeTwo, localLandChargeThree,\n lightObstructionNotice));\n }", "@Test\n void searchProduct() {\n List<DummyProduct> L1= store.SearchProduct(\"computer\",null,-1,-1);\n assertTrue(L1.get(0).getProductName().equals(\"computer\"));\n\n List<DummyProduct> L2= store.SearchProduct(null,\"Technology\",-1,-1);\n assertTrue(L2.get(0).getCategory().equals(\"Technology\")&&L2.get(1).getCategory().equals(\"Technology\"));\n\n List<DummyProduct> L3= store.SearchProduct(null,null,0,50);\n assertTrue(L3.get(0).getProductName().equals(\"MakeUp\"));\n\n List<DummyProduct> L4= store.SearchProduct(null,\"Fun\",0,50);\n assertTrue(L4.isEmpty());\n }", "@Test\n public void testFindAll_Person_TimeSlot() {\n // more or less tested in testFindEntity_Person_TimeSlot()\n }", "@Test\n public void testHasAvailable2() {\n Pieces inv = new Pieces();\n boolean expResult = false;\n for (Color color : Color.values()) {\n for (Species species : Species.values()) {\n /*In next for, i is not increased, because the limit is reducing*/\n for (int i = 0; i < inv.getNbAnimals(color, species);) {\n inv.getAnimal(color, species);\n }\n }\n }\n boolean result = inv.hasAvailable();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test213() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"wh\\\"vVQ `'HnBv\", \"~qV]vimZJQ;pcba\");\n // Undeclared exception!\n try { \n checkbox0.get(\"4_R]T<#2)Q?]R7Ut\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Could not find component with id '4_R]T<#2)Q?]R7Ut'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\eclipse\\\\chromedriver.exe\");\n\t\tWebDriver driver=new ChromeDriver();\n\t\tdriver.get(\"https://rahulshettyacademy.com/seleniumPractise/#/offers\");\n\t\tdriver.findElement(By.xpath(\"//input[@id='search-field']\")).sendKeys(\"Rice\");\n\t\tList<WebElement> items = driver.findElements(By.xpath(\"//tr/td[1]\"));\n\t\t\n\tList<WebElement> veggies=items.stream().filter(veggie->veggie.getText().contains(\"Rice\")).collect(Collectors.toList());\nAssert.assertEquals(items.size(), veggies.size());\n\t}", "@Ignore\n\tpublic void searchForDriversByTALPlate_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, null, null, null, talPlate, false, null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, null, null, null, talPlate, false, null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test\n public void bmwFilter() {\n MainPage mainPage = new MainPage(driver);\n mainPage.getBWMFilter().click();\n assertTrue(mainPage.getSelectContainer().getText().contains(filterData), \"Filter does not contains \" + filterData);\n SeleniumUtils.waitUntilElementIsReload(driver, mainPage.getCarName());\n SeleniumUtils.waitForTextToAppear(driver, filterData, mainPage.getCarName());\n List<Car> cars = mainPage.getCarItems();\n for (int i=0; i<=cars.size()-1; i++){\n Car car = cars.get(i);\n assertTrue(!car.getCarNameData().getText().isEmpty(), \"Car \" + i + \" not contains \" + filterData);\n assertTrue(car.getCarNameData().getText().contains(filterData), \"Car \" + i + \" not contains \" + filterData);\n assertTrue(car.getCarImageData().isDisplayed(), \"Car \" + i + \" image is not displayed\");\n assertTrue(car.getCarImageData().getAttribute(\"src\").contains(\".jpeg\"), \"Car \" + i + \" image is not jpeg\");\n assertTrue(!car.getStockNumberData().getText().isEmpty(), \"Car \" + i + \" stock number is empty\");\n assertTrue(!car.getMileageData().getText().isEmpty(), \"Car \" + i + \" mileage is empty\");\n assertTrue(!car.getFirstRegistrationData().getText().isEmpty(), \"Car \" + i + \" first registration is empty\");\n assertTrue(!car.getHorsePowerData().getText().isEmpty(), \"Car \" + i + \" horsepower is empty\");\n assertTrue(!car.getBodyTypeData().getText().isEmpty(), \"Car \" + i + \" body type is empty\");\n assertTrue(!car.getFuelTypeData().getText().isEmpty(), \"Car \" + i + \" fuel type is empty\");\n assertTrue(!car.getGearBoxData().getText().isEmpty(), \"Car \" + i + \" gear box is empty\");\n }\n }", "public void xxtest_oh_01() {\n String NS = \"http://www.idi.ntnu.no/~herje/ja/\";\n Resource[] expected = new Resource[] {\n ResourceFactory.createResource( NS+\"reiseliv.owl#Reiseliv\" ),\n ResourceFactory.createResource( NS+\"hotell.owl#Hotell\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#Restaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteBadRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteDoRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#SkogRestaurant\" ),\n };\n \n test_oh_01scan( OntModelSpec.OWL_MEM, \"No inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MINI_RULE_INF, \"Mini rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_RULE_INF, \"Full rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MICRO_RULE_INF, \"Micro rule inf\", expected );\n }", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"tt\", \"Can't add components to a component that is not an instance of IContainer.\");\n // Undeclared exception!\n try { \n checkbox0.dfn();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void shouldListModulesWithInDirectCycles() throws Exception {\n initializeOSGiProjectWithIndirectCycle();\n resetOutput();\n queueInputLines(\"y\");\n getShell().execute(\"osgi cycles\");\n Assert.assertTrue(getOutput().contains(\"module1 =====\" + TestUtils.getNewLine() +\n \"module1,module2,module1\" + TestUtils.getNewLine() +\n \"module1,module2,module3,module1\"));\n\n Assert.assertTrue(getOutput().contains(\"module2 =====\" + TestUtils.getNewLine() +\n \"module2,module1,module2\" + TestUtils.getNewLine() +\n \"module2,module3,module1,module2\"));\n\n Assert.assertTrue(getOutput().contains(\"module3 =====\" + TestUtils.getNewLine() +\n \"module3,module1,module2,module3\"));\n\n }", "@Test\n public void testDAM31801002() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam31801002Click();\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n\n todoListPage.setTodoCreationDate(\"2016/12/30\");\n\n todoListPage = todoListPage.searchUsingOverwrittenTypeAliasName();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // this todo does not meets the criteria.Hence not displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n assertThat(isTodoPresent, is(false));\n }", "@Test\n public void test27() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1348,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test27\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n iIOMetadataNode0.getNodeValue();\n Iterator<?> iterator0 = IteratorUtils.getIterator((Object) null);\n assertEquals(false, iterator0.hasNext());\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Ignore @Test\n public void doCompletion() {\n controller.getCompletionList(INPUT,ONTOLOGY,FIELD,bean);\n List<CompletionTerm> compList = bean.getCompletionTermList();\n Assert.assertNotNull(compList);\n Assert.assertTrue(\"Should have >0 comp terms\",compList.size()>0);\n boolean containsInput = false;\n for (CompletionTerm t : compList)\n containsInput |= t.toString().contains(INPUT);\n Assert.assertTrue(\"Should contain \"+INPUT,containsInput);\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(table0, \"input\", (String) null);\n // Undeclared exception!\n try { \n checkbox0.samp((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test \r\n\tpublic void testTargetsIntoRoom()\r\n\t{\r\n\t\t// One room is exactly 2 away\r\n\t\tboard.calcTargets(19, 8, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\t// directly left (can't go right 2 steps)\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 6)));\r\n\t\t// directly up and down\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 8)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 8)));\r\n\t\t// one up/down, one left/right\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 7)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 7)));\r\n\t}", "@Test\n\tpublic void searchForDriversByWillowPlate_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, null, null, null, willowPlate, true,null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, null, null, null, willowPlate, true,null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}", "@Test\n public void testSelectAll() {\n }", "@Test\n public void testFindall() {\n\n System.out.println(\"findall\"); \n PrioridadRest rest = mokPrioridadRest;\n List<Prioridad> result = rest.findall();\n Prioridad prioridad = new Prioridad(1, \"1\");\n assertThat(result, CoreMatchers.hasItems(prioridad));\n }", "@Test\n public void testSelectAll() throws Exception {\n\n }", "@Test\n public void testDAM30503002() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n TodoListPage todoListPage = dam3IndexPage.dam30503002Click();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n\n assertThat(isTodoPresent, is(true));\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n todoListPage.setTodoCreationDate(\"2016-12-30\");\n\n todoListPage = todoListPage.searchByCriteriaBeanRetMap();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // this todo does not meets the criteria.Hence not displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n assertThat(isTodoPresent, is(false));\n }", "@Test\n public void testFindAll_Event_Job() {\n // more or less tested in testFindEntity_Event_Job()\n }", "@Test\n public void testDAM31801001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam31801001Click();\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n\n todoListPage.setTodoCreationDate(\"2016/12/30\");\n\n todoListPage = todoListPage.searchUsingClassTypeAlias();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // this todo does not meets the criteria.Hence not displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n assertThat(isTodoPresent, is(false));\n }", "private boolean foundChavrousse(ArrayList<Gelt> m_gelts, Gelt m_gelt) {\n\t\tplay.Logger.info(\"Found Chavrousee Algorithm Started\");\n\t\tboolean isUpdate = false;\n\t\tfor (Gelt currGelt : m_gelts) {\n\t\t\tif (!isUpdate) {\n\t\t\t\tif ((currGelt.getDebterID() == m_gelt.getDebterID())\n\t\t\t\t\t\t&& (currGelt.getEntitledID() == m_gelt.getEntitledID())\n\t\t\t\t\t\t&& (currGelt.getGroupID() == m_gelt.getGroupID())) {\n\t\t\t\t\tcurrGelt.setnAmount(currGelt.getAmount() + m_gelt.getAmount());\n\t\t\t\t\tisUpdate = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplay.Logger.info(\"Found Chavrousee Algorithm Finished with value : \" + isUpdate);\n\t\treturn isUpdate;\n\t}", "@Test\n\tpublic void searchForDriversByFleetRef_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, null, null, fleetRef, null, true,null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, null, null, fleetRef, null, true,null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}", "@Test(timeout = 4000)\n public void test291() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n // Undeclared exception!\n try { \n checkbox0.h3((Object) \"0G-VP2>k}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void searchForCourse(){\n UoMSearchPage page = new UoMSearchPage(driver);\n page.get();\n page.searchForStudies(\"Software Development\");\n assertTrue(page.isSoftwareDevelopmentComponentPresent());\n }", "public boolean enoughToFilter() {\n/* 468 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void ClickonFilterSearch(String filter1, String filter2)\r\n\t{\r\n\t\tString fil1 = getValue(filter1); \r\n\t\tString fil2 = getValue(filter2); \r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+fil1+\" \"+fil2);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Filtered value should be clicked \"+fil1+\" \"+fil2);\r\n\r\n\t\tList<WebElement> elements = listofelements(locator_split(\"lstFilterSearch\"));\r\n\t\tSystem.out.println(elements.size());\r\n\t\ttry{\r\n\t\t\tfor(int i=0; i<elements.size(); i++){\r\n\r\n\t\t\t\tSystem.out.println(\"Filter options \"+ elements.get(i).getText());\r\n\t\t\t\tif(elements.get(i).getText().contains(fil1)){\r\n\t\t\t\t\tsleep(1000);\r\n\t\t\t\t\telements.get(i).click();\r\n\t\t\t\t\tWebElement ele = elements.get(i);\r\n\t\t\t\t\tList<WebElement> element2 = ele.findElements(locator_split(\"chkFilterSearch\"));\r\n\t\t\t\t\tSystem.out.println(\"Size of filter option \"+element2.size());\r\n\t\t\t\t\tfor(int j=0; j<element2.size(); j++){\r\n\t\t\t\t\t\tSystem.out.println(element2.get(j).getText());\r\n\t\t\t\t\t\tif(element2.get(j).getText().contains(fil2)){\r\n\t\t\t\t\t\t\telement2.get(j).click();\r\n\t\t\t\t\t\t\tbreak; \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Filtered value is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Filtered value is not displayed and it dosent contain Text -\"+fil2);\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"verifyFilter\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t\tVerifyFilterTextSelected(fil1,fil2);\r\n\t}", "public boolean\nmatches( SoElement element)\n{\n//#ifdef DEBUG\n SoDebugError.post(\"SoLazyElement.matches\", \n \"Should never be called\\n\");\n//#endif\n return true;\n}", "public static void main(String[] args) {\n List<Car> cars = Arrays.asList(\n //Calling static Factories\n Car.withGasColorPassengers(6, \"Red\", \"Fred\", \"Jim\", \"Sheila\"),\n Car.withGasColorPassengers(3, \"Octarine\", \"Rincewind\", \"Ridcully\"),\n Car.withGasColorPassengers(9, \"Black\", \"Weatherwax\", \"Magrat\"),\n Car.withGasColorPassengers(7, \"Green\", \"Valentine\", \"Gillian\", \"Anne\", \"Dr. Mahmoud\"),\n Car.withGasColorPassengers(6, \"Red\", \"Ender\", \"Hyrum\", \"Locke\", \"Bonzo\")\n );\n\n //Calling Utility Method\n System.out.println(\"************ ALL CARS ************\");\n showAll(cars);\n\n System.out.println(\"************ getCarsByCriteria ************\");\n //The behaviour of decision making is passed as an argument.\n showAll(getCarsByCriteria(cars, new RedCarCriterion()));\n\n System.out.println(\"************ GasLevelCarCriterion ************\");\n showAll(getCarsByCriteria(cars, new GasLevelCarCriterion(7)));\n\n //Original List is not changed\n showAll(cars);\n }", "@Test\n public void testPartieContinue(){\n Joueur NORD = new Joueur(\"NORD\");\n Joueur SUD = new Joueur(\"SUD\");\n assertTrue(Regles.partieContinue(NORD.clone(), SUD.clone(), 0,false));\n // avec des bases injouables\n NORD.setAscendant(61);\n NORD.setDescendant(0);\n SUD.setAscendant(61);\n SUD.setDescendant(0);\n assertFalse(Regles.partieContinue(NORD.clone(), SUD.clone(), 0, false));\n // avec un jeu vide\n NORD.jeu.clear();\n assertFalse(Regles.partieContinue(NORD.clone(), SUD.clone(), 0, false));\n\n SUD.jeu.clear();\n NORD.jeu.add(0,59);\n NORD.jeu.add(1,58);\n NORD.setAscendant(57);\n NORD.setDescendant(2);\n SUD.setAscendant(1);\n SUD.setDescendant(60);\n assertTrue(Regles.partieContinue(NORD.clone(), SUD.clone(), 0,false));\n NORD.setAscendant(58);\n assertFalse(Regles.partieContinue(NORD.clone(), SUD.clone(), 0,false));\n //cas spécifique\n NORD.setAscendant(49);\n NORD.setDescendant(2);\n SUD.setAscendant(53);\n SUD.setDescendant(9);\n SUD.jeu.add(0,34);\n SUD.jeu.add(1,44);\n SUD.jeu.add(2,38);\n SUD.jeu.add(3,6);\n SUD.jeu.add(4,41);\n SUD.jeu.add(5,39);\n assertTrue(Regles.partieContinue(SUD.clone(), NORD.clone(), 0, false));\n\n\n }", "@Test(timeout = 4000)\n public void test173() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"1R^6@7]:\");\n ElExpression elExpression0 = new ElExpression(\"F|WX'\");\n // Undeclared exception!\n try { \n xmlEntityRef0.attribute(\"}mL>mNa\", elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void myNeighboursList_shouldNotBeEmpty() {\n // First scroll to the position that needs to be matched and click on it.\n onView(allOf(withId(R.id.list_neighbours),isDisplayed()))\n .check(matches(hasMinimumChildCount(1)));\n }", "@Override\n\tpublic void find() {\n\n\t}", "int countComponents() throws Exception;", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCYCLE() {\n CuteNetlibCase.doTest(\"CYCLE.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "public SNGTestCases CoinsCollection_TC1014() throws InterruptedException{\n \tString flavour = \"Electrical\";\n \t\n \tforDebugger();\n \twaitForElement(By.id(\"com.pointedsquares.gamy5.android:id/header_name\"),120);\n \ttry{\n \t\twaitForElement(By.xpath(\"//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]\") , 5);\n \t}catch(Exception ex){\n \t\tdriver.scrollTo(\"Academics\");\n \t}\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]\")).click();\n \twaitForElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\"), 10);\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\")).click();\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\")).sendKeys(flavour);\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]\")).click();\n \twaitForElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]\"),5);\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]\")).click();\n \twaitForElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]\"), 5);\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]\")).click();\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/positive_button\")).click();\n \twaitForVisibilityOf(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]\"));\n \tThread.sleep(5000);\n \ttry{\n \t\twaitForElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Still Waiting.....')]\") , 2);\n \t}catch(Exception ex){\n \t\t\n \t}\n \twaitForVisibilityOf(By.xpath(\"//android.widget.RelativeLayout[contains(@resource-id , 'topL')]\"));\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/pool_currency_layout\"));\n \tList<WebElement> playerList = driver.findElements(By.xpath(\"//android.widget.LinearLayout[contains(@resource-id , 'player_list')]/*\"));\n \tint playerCount = 1;\n \tfor(int i = 0; i < 5; i++){\n \t\ttry{\n \t\t\tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/player_name_\"+i));\n \t\t\tplayerCount++;\n \t\t}catch(Exception ex){\n \t\t\t\n \t\t}\n \t}\n \tSystem.out.println(playerCount);\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/pool_amount\"));\n \tThread.sleep(7000);\n \treturn new SNGTestCases(driver);\n }", "@Test\n\tpublic void testSearch_6()\n\t\tthrows Exception {\n\t\tDLLocalServiceImpl fixture = new DLLocalServiceImpl();\n\t\tfixture.groupLocalService = new GroupLocalServiceWrapper(new GroupLocalServiceImpl());\n\t\tfixture.hook = new CMISHook();\n\t\tfixture.dlFolderService = new DLFolderServiceWrapper(new DLFolderServiceImpl());\n\t\tlong companyId = 1L;\n\t\tString portletId = \"\";\n\t\tlong groupId = 0L;\n\t\tlong userId = 1L;\n\t\tlong[] repositoryIds = new long[] {};\n\t\tString keywords = \"\";\n\t\tint start = 1;\n\t\tint end = 1;\n\n\t\tHits result = fixture.search(companyId, portletId, groupId, userId, repositoryIds, keywords, start, end);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: com.liferay.documentlibrary.service.impl.DLLocalServiceImpl\n\t\t// at java.net.URLClassLoader.findClass(Unknown Source)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Unknown Source)\n\t\tassertNotNull(result);\n\t}", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n void getMandatoryDeepSuccessors () {\n\n }", "public void VerifylogosonCheckoutPage(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Vat Exclude button with WebElement \"+elementProperties.getProperty(\"Vatinclusion\")+\" should be clicked\");\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"imgStapleslogoonleft\"))& isElementPresent(locator_split(\"imgCheckoutLockicon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"imgCheckoutNortan\")) ){\r\n\t\t\t\tSystem.out.println(\"All the three logos are present\");\r\n\t\t\t\tPoint stapleslogo = getcoordinates(locator_split(\"imgStapleslogoonleft\"));\r\n\t\t\t\tSystem.out.println(stapleslogo);\r\n\t\t\t\tPoint lockicon = getcoordinates(locator_split(\"imgCheckoutLockicon\"));\r\n\t\t\t\tSystem.out.println(lockicon);\r\n\t\t\t\tPoint Nortonicon = getcoordinates(locator_split(\"imgCheckoutNortan\"));\r\n\t\t\t\tSystem.out.println(Nortonicon);\r\n\t\t\t\tif(stapleslogo.x<lockicon.x & lockicon.x<Nortonicon.x){\r\n\t\t\t\t\tSystem.out.println(\"Staples logo is on left side, Lock icon in middle and Norton img on right side\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"Logos are mis aligned\");\r\n\t\t\t\t\tthrow new Error(\"Logos are mis aligned\");\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"One or all the three logos are not present\");\r\n\t\t\t\tthrow new Error(\"One or all the three logos are not present\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Logo Elements are not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgStapleslogoonleft\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCheckoutLockicon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCheckoutNortan\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- One or all the three logos are not present/Logos are mis aligned\");\r\n\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test143() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"oi\");\n // Undeclared exception!\n try { \n xmlEntityRef0.find(\"oi\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tpublic void testSearch_5()\n\t\tthrows Exception {\n\t\tDLLocalServiceImpl fixture = new DLLocalServiceImpl();\n\t\tfixture.groupLocalService = new GroupLocalServiceWrapper(new GroupLocalServiceImpl());\n\t\tfixture.hook = new CMISHook();\n\t\tfixture.dlFolderService = new DLFolderServiceWrapper(new DLFolderServiceImpl());\n\t\tlong companyId = 1L;\n\t\tString portletId = \"\";\n\t\tlong groupId = 0L;\n\t\tlong userId = 1L;\n\t\tlong[] repositoryIds = new long[] {0L};\n\t\tString keywords = \"\";\n\t\tint start = 1;\n\t\tint end = 1;\n\n\t\tHits result = fixture.search(companyId, portletId, groupId, userId, repositoryIds, keywords, start, end);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: com.liferay.documentlibrary.service.impl.DLLocalServiceImpl\n\t\t// at java.net.URLClassLoader.findClass(Unknown Source)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Unknown Source)\n\t\tassertNotNull(result);\n\t}", "@Test\n void testAllLegalMoves() {\n \tplayer1 = new HumanPlayer(\"Arnold\");\n player2 = new HumanPlayer(\"Intelligent Twig\");\n gameState = new GameState(Arrays.asList(player1, player2));\n board = gameState.getBoard();\n \n Set<PlayableMove> moves = Move.allLegalMoves(gameState);\n\n assertTrue(moves.stream().allMatch(e -> e.isLegal()));\n assertEquals(44, moves.size());\n }", "private void checkNoCycles(List<JpsModule> component) {\n if (component.size() > 1) {\n StringBuilder message = new StringBuilder();\n message.append(\"Found circular module dependency: \")\n .append(component.size())\n .append(\" modules\");\n for (JpsModule module : component) {\n message.append(\" \").append(module.getName());\n }\n logger.error(message.toString());\n }\n }", "@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }", "@Test\r\n public void testSelectAll() {\r\n System.out.println(\"AbonentDAL selectAll\");\r\n AbonentDAL instance = new AbonentDAL();\r\n List<Abonent> result = instance.selectAll();\r\n assertTrue(result!=null && result.size()>0);\r\n }", "@Test(timeout = 4000)\n public void test210() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"(Ljava/lang/String;)Lorg/mvel/integration/VariableResolver;\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"(Ljava/lang/String;)Lorg/mvel/integration/VariableResolver;\", \"W,eg{\", stringSelectModel0, elExpression0);\n Select select0 = new Select(checkboxGroup0, \"W,eg{\", \"http://xmlpull.org/v1/doc/properties.html#serializer-indentation\", stringSelectModel0, \"W,eg{\");\n FileInput fileInput0 = new FileInput(select0, \"]> fkF\\\".:8\", \"W,eg{\");\n // Undeclared exception!\n try { \n fileInput0.end(\"J]'z8)\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No corresponding component found for end expression 'J]'z8)'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void ClickClearAllSelection(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Clear All Selection Button should be clicked\");\r\n\t\ttry{ \r\n\t\t\tclick(locator_split(\"btnClearAllSelections\")); \r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Clear All Selection Button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Clear All Selection Button is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnClearAllSelections\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\r\n\tpublic void testTargets11_2() {\r\n\t\tBoardCell cell = board.getCell(1, 1);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(3, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 0)));\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"sajp\", \"sajp\");\n // Undeclared exception!\n try { \n checkbox0.hr();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testGetCasesVoisinesOccupees() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test getCasesVoisinesOccupees ==============>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n instance.ajoutInsecte(reine, orig);\n\n System.out.println(\"test avec l'origine, haut et bas occupé :\");\n ArrayList<Case> expected = new ArrayList<>();\n expected.add(new Case(orig.voisinBas()));\n expected.add(new Case(orig.voisinHaut()));\n\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n\n ArrayList<Case> res = (ArrayList<Case>) instance.getCasesVoisinesOccupees(new Case(orig));\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec l'origine, tout est occupé :\");\n expected = new ArrayList<>();\n expected.add(new Case(orig.voisinBas()));\n expected.add(new Case(orig.voisinDroiteBas()));\n expected.add(new Case(orig.voisinDroiteHaut()));\n expected.add(new Case(orig.voisinGaucheBas()));\n expected.add(new Case(orig.voisinGaucheHaut()));\n expected.add(new Case(orig.voisinHaut()));\n\n instance.ajoutInsecte(reine, orig.voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut());\n\n res = (ArrayList<Case>) instance.getCasesVoisinesOccupees(new Case(orig));\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec l'origine, tout est libre :\");\n expected = new ArrayList<>();\n\n instance.deleteInsecte(reine, orig.voisinHaut());\n instance.deleteInsecte(reine, orig.voisinGaucheHaut());\n instance.deleteInsecte(reine, orig.voisinGaucheBas());\n instance.deleteInsecte(reine, orig.voisinDroiteHaut());\n instance.deleteInsecte(reine, orig.voisinDroiteBas());\n instance.deleteInsecte(reine, orig.voisinBas());\n\n res = (ArrayList<Case>) instance.getCasesVoisinesOccupees(new Case(orig));\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"\");\n }", "@Test\n public void testDAM30902001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30902001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n // add one sample todo which has some unique title from those of the\n // above\n // this is used to have some unique combination satisfying the choose\n // element other branch\n // Open todo registration page\n TodoRegisterPage registerTodoPage = todoListPage.registerTodo();\n\n // input todo details\n registerTodoPage.setTodoId(\"0000000025\");\n registerTodoPage.setTodoCategory(\"CA2\");\n registerTodoPage.setTodoTitle(\"sample todo\");\n\n registerTodoPage.addTodo();\n\n webDriverOperations.displayPage(getPackageRootUrl());\n\n dam3IndexPage = new DAM3IndexPage(driver);\n\n todoListPage = dam3IndexPage.dam30102002Click();\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n\n todoListPage.setTodoCreationDate(\"2016-12-30\");\n\n todoListPage = todoListPage.chooseElementUsageSearch();\n\n // Confirm the todos when title is specified from the choose element\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n webDriverOperations.displayPage(getPackageRootUrl());\n\n dam3IndexPage = new DAM3IndexPage(driver);\n\n todoListPage = dam3IndexPage.dam30102002Click();\n\n todoListPage.setTodoCreationDate(\"2016-12-30\");\n\n todoListPage = todoListPage.chooseElementUsageSearch();\n\n // Confirm the todos when title is not specified from the choose\n // element.\n // here it takes default value specified in otherwise tag of choose\n // (sample)\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"0\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"1\"));\n }", "public void checkAndSetStart() {\r\n\t\tSystem.out.println(\"\t\tcheckAndSetStart \"+this.id +\" size:\"+this.components.size());\r\n\t\tif(hasNoStart()) {\t\t\r\n\t\t\tList<ComponentConfig> longestVisitedComps = new ArrayList<ComponentConfig>();\r\n\t\t\tComponentConfig longestVisitedComp = null;\r\n\t\t\tint longestVisited = 0;\r\n\t\t\tfor(ComponentConfig comp: components) {\r\n\t\t\t\tint visited = traverseModel(0,comp);\r\n\t\t\t\tSystem.out.println(\"\t\t\ttraverse\"+comp.getId()+\" v:\"+visited);\r\n\t\t\t\tif(visited > longestVisited) {\r\n\t\t\t\t\tlongestVisited = visited;\r\n\t\t\t\t\tlongestVisitedComps.clear();\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t} else if(visited == longestVisited) {\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t}\r\n\t\t\t\t// catch deadloop, if all component are visisted\r\n\t\t\t\tif(longestVisited == components.size())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(ComponentConfig st: longestVisitedComps) {\r\n\t\t\t\tst.setIsstartcaller(true);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t// find other component that call to the same component that start component calls within model\r\n\t\tList<ComponentConfig> startComps = new ArrayList<ComponentConfig>();\r\n\t\tfor(ComponentConfig st: components) {\r\n\t\t\tif(st.isIsstartcaller())\r\n\t\t\t\tstartComps.add(st);\r\n\t\t}\r\n\t\tList<Integer> calls = new ArrayList<Integer>();\r\n\t\tfor(ComponentConfig st: startComps) {\r\n\t\t\tif(st.isIsstartcaller() && st.getCalls()!=null) {\r\n\t\t\t\tfor(int i: st.getCalls())\r\n\t\t\t\t\tfor(ComponentConfig eachComp: components) {\r\n\t\t\t\t\t\tSystem.out.println(\"\tfind comp that call \"+i+\" \"+eachComp.getCalls());\r\n\t\t\t\t\t\tif(eachComp.getCalls()!=null)\r\n\t\t\t\t\t\t\tfor(int callee: eachComp.getCalls()) {\r\n\t\t\t\t\t\t\t\t// found component that call to the same target\r\n\t\t\t\t\t\t\t\tif(callee == i)\r\n\t\t\t\t\t\t\t\t\teachComp.setIsstartcaller(true);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@Test\n public void find() {\n String command = \" \" + FindCommand.COMMAND_WORD + \" n/\" + KEYWORD_MATCHING_STATIONARY + \" \";\n Model expectedModel = getModel();\n assertCommandSuccess(command, expectedModel, 1);\n assertSelectedCardUnchanged();\n\n /* Case: repeat previous find command where expense list is displaying the expense we are finding\n * -> 1 expense found\n */\n command = FindCommand.COMMAND_WORD + \" t/\" + KEYWORD_MATCHING_DINNER;\n assertCommandSuccess(command, expectedModel, 1);\n assertSelectedCardUnchanged();\n\n /* Case: repeat previous find command where expense list is displaying the expense we are finding\n * -> 0 expense found\n */\n command = FindCommand.COMMAND_WORD + \" d/\" + \"7/4/2019\";\n assertCommandSuccess(command, expectedModel, 0);\n assertSelectedCardUnchanged();\n\n /* Case: repeat previous find command where expense list is displaying the expense we are finding\n * -> 0 expense found\n */\n command = FindCommand.COMMAND_WORD + \" d/\"\n + KEYWORD_MATCHING_START_DATE + \":\" + \"26/04/2019\";\n assertCommandSuccess(command, expectedModel, 0);\n assertSelectedCardUnchanged();\n\n /* Case: find expense where expense list is not displaying the expense we are finding -> 0 expense found */\n command = FindCommand.COMMAND_WORD + \" n/\" + \"Invalid name\";\n assertCommandSuccess(command, expectedModel, 0);\n assertSelectedCardUnchanged();\n // /* Case: find multiple persons in address book, 2 keywords -> 2 persons found */\n // command = FindCommand.COMMAND_WORD + \" Benson Daniel\";\n // ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find multiple persons in address book, 2 keywords in reversed order -> 2 persons found */\n // command = FindCommand.COMMAND_WORD + \" Daniel Benson\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find multiple persons in address book, 2 keywords with 1 repeat -> 2 persons found */\n // command = FindCommand.COMMAND_WORD + \" Daniel Benson Daniel\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find multiple persons in address book, 2 matching keywords and 1 non-matching keyword\n // * -> 2 persons found\n // */\n // command = FindCommand.COMMAND_WORD + \" Daniel Benson NonMatchingKeyWord\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: undo previous find command -> rejected */\n // command = UndoCommand.COMMAND_WORD;\n // String expectedResultMessage = UndoCommand.MESSAGE_FAILURE;\n // assertCommandFailure(command, expectedResultMessage);\n //\n // /* Case: redo previous find command -> rejected */\n // command = RedoCommand.COMMAND_WORD;\n // expectedResultMessage = RedoCommand.MESSAGE_FAILURE;\n // assertCommandFailure(command, expectedResultMessage);\n //\n // /* Case: find same persons in address book after deleting 1 of them -> 1 person found */\n // executeCommand(DeleteCommand.COMMAND_WORD + \" 1\");\n // assertFalse(getModel().getEPiggy().getPersonList().contains(BENSON));\n // command = FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;\n // expectedModel = getModel();\n // ModelHelper.setFilteredList(expectedModel, DANIEL);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n /* Case: find person in address book, keyword is same as name but of different case -> 1 person found */\n // command = FindCommand.COMMAND_WORD + \" MeIeR\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find person in address book, keyword is substring of name -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" Mei\";\n // ModelHelper.setFilteredList(expectedModel);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find person in address book, name is substring of keyword -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" Meiers\";\n // ModelHelper.setFilteredList(expectedModel);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find person not in address book -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" Mark\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find phone number of person in address book -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" \" + DANIEL.getPhone().value;\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find address of person in address book -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" \" + DANIEL.getAddress().value;\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find email of person in address book -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" \" + DANIEL.getEmail().value;\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find tags of person in address book -> 0 persons found */\n // List<Tag> tags = new ArrayList<>(DANIEL.getTags());\n // command = FindCommand.COMMAND_WORD + \" \" + tags.get(0).tagName;\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find while a person is selected -> selected card deselected */\n // showAllPersons();\n // //selectPerson(Index.fromOneBased(1));\n //assertFalse(getPersonListPanel().getHandleToSelectedCard().getName().equals(DANIEL.getName().fullName));\n // command = FindCommand.COMMAND_WORD + \" Daniel\";\n // ModelHelper.setFilteredList(expectedModel, DANIEL);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardDeselected();\n //\n // /* Case: find person in empty address book -> 0 persons found */\n // deleteAllPersons();\n // command = FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;\n // expectedModel = getModel();\n // ModelHelper.setFilteredList(expectedModel, DANIEL);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n\n /* Case: mixed case command word -> rejected */\n // command = \"FiNd Meier\";\n // assertCommandFailure(command, FindCommand.MESSAGE_USAGE);\n\n }", "public void selectAll() {\n/* 101 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n\tvoid searchTest() {\n\t}", "@Test\n public void test_6() {\n long expected = 35;\n List<List<Integer>> possibleRoads = List.of(\n List.of(1, 2),\n List.of(13, 14),\n List.of(3, 4),\n List.of(10, 11),\n List.of(1, 3),\n List.of(6, 7),\n List.of(9, 10),\n List.of(12, 10),\n List.of(5, 3),\n List.of(3, 13)\n );\n long result = roadsAndLibraries(15, 3, 2, possibleRoads);\n Assertions.assertEquals(expected, result);\n }", "@Test\n public void t2() {\n List<StableCommit> stableCommitList = getStableCommits().stream().filter(commit ->\n commit.getFilePath().equals(\"src/java/org/apache/commons/lang/builder/HashCodeBuilder.java\") && commit.getLevel() == 1).collect(Collectors.toList());\n // it has been through 9 different refactorings\n List<RefactoringCommit> refactoringCommitList = getRefactoringCommits().stream().filter(commit ->\n commit.getFilePath().equals(\"src/java/org/apache/commons/lang/builder/HashCodeBuilder.java\")).collect(Collectors.toList());\n\n Assert.assertEquals(4, stableCommitList.size());\n Assert.assertEquals(8, refactoringCommitList.size());\n\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", stableCommitList.get(0).getCommit());\n\n // then, it was refactored two times (in commit 5c40090fecdacd9366bba7e3e29d94f213cf2633)\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", refactoringCommitList.get(0).getCommit());\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", refactoringCommitList.get(1).getCommit());\n\n // It appears 3 times\n Assert.assertEquals(\"379d1bcac32d75e6c7f32661b2203f930f9989df\", stableCommitList.get(1).getCommit());\n Assert.assertEquals(\"d3c425d6f1281d9387f5b80836ce855bc168453d\", stableCommitList.get(2).getCommit());\n Assert.assertEquals(\"3ed99652c84339375f1e6b99bd9c7f71d565e023\", stableCommitList.get(3).getCommit());\n }", "static AnalysisResult analyseQueryComponents(ArrayList<String> components) {\n if (components != null && components.size() > 0) {\n for (int i = 0; i < components.size(); i++) {\n String component = components.get(i).toLowerCase();\n for (String attack : commonAttacks) {\n attack = attack.toLowerCase();\n if (trim(component).contains(trim(attack))) {\n return new AnalysisResult(true, i, attack, false);\n }\n }\n }\n }\n return new AnalysisResult(false, null, null, false);\n }", "@Test(timeout = 4000)\n public void test148() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"]1\", \"2D_ZO9FaJf0hL((#xC\");\n // Undeclared exception!\n try { \n checkbox0.em();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void myNeighboursList_shouldNotBeEmpty() {\n // First scroll to the position that needs to be matched and click on it.\n onView(ViewMatchers.withId(R.id.list_neighbours))\n .check(matches(hasMinimumChildCount(1)));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"cannot bind to collection property: \", \"\");\n // Undeclared exception!\n try { \n checkbox0.q();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }" ]
[ "0.6145437", "0.58690655", "0.56854534", "0.5648737", "0.552145", "0.5466813", "0.5307852", "0.5305054", "0.53028363", "0.5269953", "0.52209306", "0.52080333", "0.52078456", "0.5171528", "0.5169178", "0.51685447", "0.5165821", "0.5156639", "0.5155052", "0.51399857", "0.51245236", "0.5123586", "0.5122808", "0.5114681", "0.5114613", "0.5114242", "0.5093761", "0.508638", "0.5062485", "0.50419897", "0.50384927", "0.5019302", "0.50184035", "0.5015394", "0.50133467", "0.5013246", "0.5010827", "0.501047", "0.5010277", "0.5010141", "0.5009007", "0.49988014", "0.49986684", "0.49977443", "0.4989401", "0.49887288", "0.49831775", "0.49794376", "0.49760276", "0.49753517", "0.49750575", "0.49738556", "0.49717563", "0.49715227", "0.4956152", "0.4950829", "0.49506044", "0.49420598", "0.49388057", "0.4938738", "0.49382958", "0.49369276", "0.49361843", "0.49311453", "0.49279377", "0.49261922", "0.4925605", "0.49240053", "0.49221113", "0.4921762", "0.4921193", "0.49175847", "0.4916491", "0.49107134", "0.49042916", "0.4903258", "0.490124", "0.49008143", "0.48979118", "0.48931468", "0.48814481", "0.48785233", "0.4878253", "0.48762918", "0.48758477", "0.48715276", "0.48706797", "0.486684", "0.486463", "0.48620418", "0.48603955", "0.48588", "0.48580015", "0.48530942", "0.4851056", "0.48500484", "0.48492676", "0.48412383", "0.48319137", "0.48243064" ]
0.5477451
5
Test case number: 15 / 2 covered goals: Goal 1. wheel.components.Component._setParent(Lwheel/components/Component;)V: rootBranch Goal 2. wheel.components.Component.span()Lwheel/components/Component;: rootBranch
@Test public void test015() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Block block0 = (Block)errorPage0.span(); Hidden hidden0 = new Hidden(block0, "x_O/V", "x_O/V"); hidden0._setParent((Component) errorPage0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "protected Component getTestTarget(){\n return tester.parent;\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void testMoveAcrossContainers() {\n\t\tIComponentSet cs = model.getComponentSet();\r\n\t\tIComponent component = cs.lookupComponent(ROOT_COMPONENT_NAME);\r\n\t\tINode rootContainer = (INode) model.getRootContainers()[0];\r\n\t\tTestDataModelHelpers.assignUniqueName(model, rootContainer);\r\n\t\t\r\n\t\tINode child = (INode) model.createNewComponentInstance(component);\r\n\t\tCommand command = model.createAddNewComponentInstanceCommand(rootContainer, child, IDesignerDataModel.AT_END);\r\n\t\tassertTrue(command.canExecute());\r\n\t\tcommand.execute();\r\n\t\tTestDataModelHelpers.assignUniqueName(model, child);\r\n\r\n\t\tINode childContainer = (INode) model.createNewComponentInstance(component);\r\n\t\tcommand = model.createAddNewComponentInstanceCommand(rootContainer, childContainer, IDesignerDataModel.AT_END);\r\n\t\tassertTrue(command.canExecute());\r\n\t\tcommand.execute();\r\n\t\tTestDataModelHelpers.assignUniqueName(model, childContainer);\r\n\t\t\r\n\t\tassertTrue(rootContainer.getChildren().size() == 2);\r\n\r\n\t\tStringValue sv = child.getProperties().createLocalized(\"test\");\r\n\t\tchild.getProperties().set(\"testproperty\", sv);\r\n\t\t\r\n\t\tcommand = model.createMoveComponentInstanceCommand(child, childContainer, IDesignerDataModel.AT_END);\r\n\t\tassertTrue(command.canExecute());\r\n\t\tcommand.execute();\r\n\t\t\r\n\t\tassertTrue(rootContainer.getChildren().size() == 1);\r\n\t\tassertTrue(childContainer.getChildren().size() == 1);\r\n\t\tchild = (INode) childContainer.getChildren().get(0);\r\n\t\tObject opv = child.getProperties().getProperties().get(\"testproperty\");\r\n\t\tassertNotNull(opv);\r\n\t\tassertTrue(opv instanceof IPropertyValue);\r\n\t\tIPropertyValue pv = (IPropertyValue) opv;\r\n\t\tsv = pv.getStringValue();\r\n\t\tassertTrue(sv.getType() == StringValue.LOCALIZED);\r\n\t\t\r\n\t\tString localizedString = model.getDesignerData().getStringBundle().getLocalizedStringDefault(sv.getValue());\r\n\t\tassertEquals(localizedString, \"test\");\r\n\t}", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void testVerifyExpectedParentStructure()\n throws CycleDetectedException, DuplicateProjectException\n {\n ProjectDependencyGraph graph = threeProjectsDependingOnASingle();\n final List<MavenProject> sortedProjects = graph.getSortedProjects();\n assertEquals( aProject, sortedProjects.get( 0 ) );\n assertEquals( depender1, sortedProjects.get( 1 ) );\n assertEquals( depender2, sortedProjects.get( 2 ) );\n assertEquals( depender3, sortedProjects.get( 3 ) );\n }", "@Test\n public void test2() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setParent(object0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "public void careForPartOf(GUIMain guiMn, Map<Tissue, DefaultMutableTreeNode> ancestor) {\n CollToArrayList convert = new CollToArrayList();\n Tissue tiss = null;\n ArrayList<Tissue> tissArray = convert.treeToTissue(ancestor);\n Iterator<Tissue> iter2 = tissArray.iterator();\n while (iter2.hasNext()) {\n tiss = iter2.next();\n NodeLeaf leaf = new NodeLeaf(tiss, \"./data/images/iconTissue.gif\");\n if (tiss.partOf != null) {\n DefaultMutableTreeNode tissTree = null;\n\n // first add the tissue\n DefaultMutableTreeNode tree = ancestor.get(tiss);\n guiMn.simMain.st.removeObject(guiMn, tree, true);\n DefaultMutableTreeNode otherTissueTree = ancestor.get(tiss.partOf);\n DefaultMutableTreeNode newParent = (DefaultMutableTreeNode) otherTissueTree;\n tissTree = guiMn.simMain.st.addObject(guiMn, newParent, leaf, true);\n\n // now add compartments\n ArrayList<CompartmentSBML> listComps = tiss.getInternVolumes();\n // loop over compartments in this Tissues\n Iterator<CompartmentSBML> compIterator = listComps.iterator();\n while (compIterator.hasNext()) {\n CompartmentSBML comp = compIterator.next();\n if (comp == null) {\n System.out.println(\"error null compartment 2\");\n }\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName());\n leaf.setCompartment(comp);\n if (comp.outside == null) {\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(guiMn, tissTree, leaf, true);\n// System.out.println(\"add leaf (careForPartOf): \" + leaf.getName() + \" to tissue \" + tissTree);\n }\n }\n\n }\n }\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test13() {\n //$NON-NLS-1$\n deployBundles(\"test13\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public void test3() {\n //$NON-NLS-1$\n deployBundles(\"test3\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test28() {\n //$NON-NLS-1$\n deployBundles(\"test28\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertTrue(\"No extend restrictions\", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test15() {\n //$NON-NLS-1$\n deployBundles(\"test15\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_NON_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testTRK1HasSubComponents() {\n assertThat( hasSubComponents( TRK1_WITH_SUB_COMP ), is( true ) );\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public int getChildCount() {\n/* 179 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\r\n public void testINFR1184() throws Exception {\r\n // create OU A\r\n Document ouAdoc = getDocument(createSuccessfully(\"escidoc_ou_create.xml\"));\r\n String ouAid = getObjidValue(ouAdoc);\r\n\r\n // create OU B\r\n Document ouBdoc = getDocument(createSuccessfully(\"escidoc_ou_create.xml\"));\r\n String ouBid = getObjidValue(ouBdoc);\r\n\r\n // create OU C\r\n Document ouCdoc = getDocument(createSuccessfully(\"escidoc_ou_create.xml\"));\r\n String ouCid = getObjidValue(ouCdoc);\r\n\r\n // A parentOf B\r\n String srelPrefix = determineSrelNamespacePrefix(ouBdoc);\r\n String xlinkPrefix = determineXlinkNamespacePrefix(ouBdoc);\r\n Node parents = selectSingleNode(ouBdoc, XPATH_ORGANIZATIONAL_UNIT_PARENTS);\r\n Element parent =\r\n ouBdoc.createElementNS(\"http://escidoc.de/core/01/structural-relations/\", srelPrefix + \":parent\");\r\n parent.setAttribute(xlinkPrefix + \":href\", \"/oum/organizational-unit/\" + ouAid);\r\n parents.appendChild(parent);\r\n ouBdoc = getDocument(update(ouBid, toString(ouBdoc, true)));\r\n\r\n // B parentOf C\r\n srelPrefix = determineSrelNamespacePrefix(ouCdoc);\r\n xlinkPrefix = determineXlinkNamespacePrefix(ouCdoc);\r\n parents = selectSingleNode(ouCdoc, XPATH_ORGANIZATIONAL_UNIT_PARENTS);\r\n parent = ouCdoc.createElementNS(\"http://escidoc.de/core/01/structural-relations/\", srelPrefix + \":parent\");\r\n parent.setAttribute(xlinkPrefix + \":href\", \"/oum/organizational-unit/\" + ouBid);\r\n parents.appendChild(parent);\r\n ouCdoc = getDocument(update(ouCid, toString(ouCdoc, true)));\r\n\r\n // A parentOf C\r\n srelPrefix = determineSrelNamespacePrefix(ouCdoc);\r\n xlinkPrefix = determineXlinkNamespacePrefix(ouCdoc);\r\n parents = selectSingleNode(ouCdoc, XPATH_ORGANIZATIONAL_UNIT_PARENTS);\r\n parent = (Element) selectSingleNode(parents, XPATH_ORGANIZATIONAL_UNIT_PARENT);\r\n parent.setAttribute(xlinkPrefix + \":href\", \"/oum/organizational-unit/\" + ouAid);\r\n ouCdoc = getDocument(update(ouCid, toString(ouCdoc, true)));\r\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\r\n public void testSelectionStateOnRemoveLastChildOfBranch_38341() {\r\n TreeItem branch = createBranch(\"branch\", true);\r\n int insert = 1;\r\n getRoot().getChildren().add(insert , branch);\r\n int lastBranchIndex = branch.getChildren().size() -1;\r\n Object item = branch.getChildren().get(lastBranchIndex);\r\n // index in model is insert in root children + child index in branch + the inserted \r\n // node itself\r\n int select = insert + lastBranchIndex + 1;\r\n getSelectionModel().select(select);\r\n assertEquals(\"sanity: selected the expected child \", item, getSelectedItem());\r\n ListChangeReport indicesReport = new ListChangeReport(getSelectedIndices());\r\n ListChangeReport itemsReport = new ListChangeReport(getSelectedItems());\r\n branch.getChildren().remove(lastBranchIndex);\r\n if (getSelectedIndex() == select) {\r\n // this would be the default implementation for all SimpleXX: keep \r\n // selectedIndex unchanged, effectly selecting the next item\r\n // which here would be the next sibling of the removed child's parent\r\n assertEquals(\"selectedIndex unchanged\", select, getSelectedIndex());\r\n assertEquals(getView().getTreeItem(select), getSelectedItem());\r\n assertEquals(0, indicesReport.getEventCount());\r\n assertEquals(1, itemsReport.getEventCount());\r\n \r\n } else { // index was changed\r\n assertEquals(\"selected decremented\", select -1, getSelectedIndex());\r\n assertEquals(\"selectedItem\", getView().getTreeItem(select - 1), getSelectedItem());\r\n // fails .. we fire more than one event, reselect issue again?\r\n assertEquals(\"items changes fired\", 1, itemsReport.getEventCount());\r\n assertEquals(\"indices changes fired \", 1, indicesReport.getEventCount());\r\n }\r\n fail(\"TBD: spec and implement removal of last child in a branch\");\r\n }", "abstract void addChild(SpanBranch span, int position);", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void shouldDetectCycleWhenUpstreamLeavesAreAtDifferentLevels() {\n\n String g1 = \"g1\";\n String g2 = \"g2\";\n String p1 = \"p1\";\n String p2 = \"p2\";\n String p3 = \"p3\";\n String p4 = \"p4\";\n String p5 = \"p5\";\n String p6 = \"p6\";\n String current = \"current\";\n\n ValueStreamMap valueStreamMap = new ValueStreamMap(current, null);\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p4, p4), null, current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p3, p3), null, p4);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p2, p2), null, p3);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p1, p1), null, p2);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g1, g1, \"git\"), null, p1, new MaterialRevision(null));\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,2,\"2\"), current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p6, p6), new PipelineRevision(p6,1,\"1\"), p5);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,1,\"1\"), p6);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g2,g2,\"git\"), null, p5, new MaterialRevision(null));\n\n assertThat(valueStreamMap.hasCycle(), is(true));\n }", "@Test\n public void testCreateDependencyTree4() {\n Map<String, Integer> expected = new HashMap<>() {{\n put(\"github.com/test/subproject:0.0.0-00010101000000-000000000000\", 1);\n }};\n try {\n Path projectDir = GO_ROOT.resolve(\"project4\");\n GoTreeBuilder treeBuilder = new GoTreeBuilder(null, projectDir, projectDir.resolve(\"go.mod\").toString(), null, log);\n DepTree dt = treeBuilder.buildTree();\n validateDependencyTreeResults(expected, dt);\n } catch (IOException ex) {\n fail(ExceptionUtils.getStackTrace(ex));\n }\n }", "@Test(timeout = 4000)\n public void test271() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"!x\");\n // Undeclared exception!\n try { \n xmlEntityRef0.wrapSelf();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test24() {\n //$NON-NLS-1$\n deployBundles(\"test24\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testCreateDependencyTree3() {\n Map<String, Integer> expected = new HashMap<>() {{\n put(\"github.com/test/subproject:0.0.0-00010101000000-000000000000\", 1);\n }};\n try {\n Path projectDir = GO_ROOT.resolve(\"project3\");\n GoTreeBuilder treeBuilder = new GoTreeBuilder(null, projectDir, projectDir.resolve(\"go.mod\").toString(), null, log);\n DepTree dt = treeBuilder.buildTree();\n validateDependencyTreeResults(expected, dt);\n } catch (IOException ex) {\n fail(ExceptionUtils.getStackTrace(ex));\n }\n }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(101);\n SystemInUtil.addInputLine(\"G!I\");\n simpleNode0.jjtGetParent();\n simpleNode0.jjtAddChild((Node) null, 89);\n StringWriter stringWriter0 = new StringWriter();\n simpleNode0.jjtAddChild((Node) null, 101);\n simpleNode0.jjtGetChild(101);\n assertEquals(102, simpleNode0.jjtGetNumChildren());\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "public void test18() {\n //$NON-NLS-1$\n deployBundles(\"test18\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TRANSIENT_TO_NON_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\npublic void childComponentsAdditionStarted() {\n\t\n}", "@Test\n public void testCase1() {\n File base = new File(DIR, \"case1\");\n File pl0 = new File(base, \"pl0/EASy\");\n File pl1 = new File(base, \"pl1/EASy\");\n try {\n Location pl0Loc = VarModel.INSTANCE.locations().addLocation(pl0, OBSERVER);\n Location pl1Loc = VarModel.INSTANCE.locations().addLocation(pl1, OBSERVER);\n // add Parent\n pl1Loc.addDependentLocation(pl0Loc);\n \n VarModel.INSTANCE.loaders().registerLoader(ModelUtility.INSTANCE, OBSERVER);\n \n List<ModelInfo<Project>> infos = VarModel.INSTANCE.availableModels().getModelInfo(\"pl1\");\n Assert.assertNotNull(infos);\n Assert.assertTrue(1 == infos.size());\n Project project = VarModel.INSTANCE.load(infos.get(0));\n Assert.assertNotNull(project);\n \n VarModel.INSTANCE.locations().removeLocation(pl1Loc, OBSERVER);\n VarModel.INSTANCE.locations().removeLocation(pl0Loc, OBSERVER);\n VarModel.INSTANCE.loaders().unregisterLoader(ModelUtility.INSTANCE, OBSERVER);\n } catch (ModelManagementException e) {\n Assert.fail(\"unexpected exception \" + e);\n }\n }", "public void test19() {\n //$NON-NLS-1$\n deployBundles(\"test19\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_TRANSIENT_TO_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test029() throws Throwable {\n Radio radio0 = new Radio((Component) null, \"usePrevSequences\", \"usePrevSequences\");\n // Undeclared exception!\n try {\n Block block0 = radio0.placeholder(\"usePrevSequences\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n }\n }", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test17() {\n //$NON-NLS-1$\n deployBundles(\"test17\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_STATIC_TO_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void fixInnerParent(BaleElement be)\n{\n BaleAstNode sn = getAstChild(be);\n while (cur_parent != cur_line && sn == null) {\n cur_parent = cur_parent.getBaleParent();\n cur_ast = cur_parent.getAstNode();\n sn = getAstChild(be);\n }\n\n // now see if there are any internal elements that should be used\n while (sn != null && sn != cur_ast && sn.getLineLength() == 0) {\n BaleElement.Branch nbe = createInnerBranch(sn);\n if (nbe == null) break;\n addElementNode(nbe,0);\n nbe.setAstNode(sn);\n cur_parent = nbe;\n cur_ast = sn;\n sn = getAstChild(be);\n }\n}", "@Test(timeout = 4000)\n public void test148() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"]1\", \"2D_ZO9FaJf0hL((#xC\");\n // Undeclared exception!\n try { \n checkbox0.em();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testInMemoryParentCleanup()\n throws IOException, InterruptedException, ExecutionException {\n HMaster master = TEST_UTIL.getHBaseCluster().getMaster();\n final AssignmentManager am = master.getAssignmentManager();\n final ServerManager sm = master.getServerManager();\n\n Admin admin = TEST_UTIL.getAdmin();\n admin.catalogJanitorSwitch(false);\n\n final TableName tableName = name.getTableName();\n Table t = TEST_UTIL.createTable(tableName, FAMILY);\n TEST_UTIL.loadTable(t, FAMILY, false);\n\n RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);\n List<HRegionLocation> allRegionLocations = locator.getAllRegionLocations();\n\n // We need to create a valid split with daughter regions\n HRegionLocation parent = allRegionLocations.get(0);\n List<HRegionLocation> daughters = splitRegion(parent.getRegion());\n LOG.info(\"Parent region: \" + parent);\n LOG.info(\"Daughter regions: \" + daughters);\n assertNotNull(\"Should have found daughter regions for \" + parent, daughters);\n\n assertTrue(\"Parent region should exist in RegionStates\",\n am.getRegionStates().isRegionInRegionStates(parent.getRegion()));\n assertTrue(\"Parent region should exist in ServerManager\",\n sm.isRegionInServerManagerStates(parent.getRegion()));\n\n // clean the parent\n Result r = MetaMockingUtil.getMetaTableRowResult(parent.getRegion(), null,\n daughters.get(0).getRegion(), daughters.get(1).getRegion());\n CatalogJanitor.cleanParent(master, parent.getRegion(), r);\n\n // wait for procedures to complete\n Waiter.waitFor(TEST_UTIL.getConfiguration(), 10 * 1000, new Waiter.Predicate<Exception>() {\n @Override\n public boolean evaluate() throws Exception {\n ProcedureExecutor<MasterProcedureEnv> pe = master.getMasterProcedureExecutor();\n for (Procedure<MasterProcedureEnv> proc : pe.getProcedures()) {\n if (proc.getClass().isAssignableFrom(GCRegionProcedure.class) && proc.isFinished()) {\n return true;\n }\n }\n return false;\n }\n });\n\n assertFalse(\"Parent region should have been removed from RegionStates\",\n am.getRegionStates().isRegionInRegionStates(parent.getRegion()));\n assertFalse(\"Parent region should have been removed from ServerManager\",\n sm.isRegionInServerManagerStates(parent.getRegion()));\n\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private boolean testTraversalComponent(Component comp){\n \n if (parent == null){\n return false;\n }\n \n /* Build list of focus traversable components in the parent component\n * This is only done once, unless resetReport is called */\n if (!tabTraversalPerformed){\n getTraversableComponents(parent);\n }\n \n if (!comp.hasFocus()){\n // try{\n comp.requestFocus();\n // Hack for our Windowing system - it invokes IllegalStateException if requestFocus isn't called from AWT thread\n // }catch(IllegalStateException exc){\n // // LOG ONLY -/\n // if(debugLog) {\n // System.err.println(\"EXCEPTION \" + exc.getMessage());\n // System.err.println(\"TRY TO CALL IT FROM AWT THREAD\");\n // }\n // final Component comp_final = comp;\n // try{\n // SwingUtilities.invokeAndWait(\n // new Runnable() {\n // public void run() {\n // comp_final.requestFocus();\n // }\n // });\n // }catch(Exception ex){\n // if(debugLog) System.err.println(\"EXCEPTION \" + ex.getMessage());\n //\n // }\n // }\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - After request focus | comp=\"+comp.getClass().getName()+\" hasFocus()=\"+comp.hasFocus());\n }\n \n tabTraversalFinished = false;\n switchTabbed = false;\n \n \n /* Attach custom focus listeners */\n org.netbeans.a11y.AccessibilityTester.TraversalFocusListener listener = new org.netbeans.a11y.AccessibilityTester.TraversalFocusListener();\n \n Iterator i = traversableComponents.iterator();\n while(i.hasNext()){\n ((Component)(i.next())).addFocusListener(listener);\n }\n \n org.netbeans.a11y.AccessibilityTester.TabTraversalTimeOut timeout = new org.netbeans.a11y.AccessibilityTester.TabTraversalTimeOut();\n timeout.start();\n \n /* Tab through all components */\n try{\n Robot robot = getRobot();\n \n // - LOG ONLY\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - Robot=\"+robot.hashCode());\n Iterator it = traversableComponents.iterator();\n int ssl=0;\n while(it.hasNext()){\n ssl++;\n Component fcp = (Component)(it.next());\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - [\"+ssl+\"] \"+fcp);\n }\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - Traversable Components + end - =======\");\n } // LOG ONLY -/\n \n \n if (traversableComponents.size() > 0){\n Component lastFocused = null;\n \n while(!tabTraversalFinished){\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> TAB Last Focused component=\"+lastFocused);\n \n try{\n Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY);\n } catch(InterruptedException e){}\n \n Component focusedComponent = listener.getFocusedComponent();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> Focused component=\"+focusedComponent);\n \n Component reallyFocusedComponent = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> Really Focused component=\"+reallyFocusedComponent);\n \n if((focusedComponent instanceof JTabbedPane) && !testSettings.TT_showingOnly) {\n robot.keyPress(KeyEvent.VK_RIGHT);\n robot.keyRelease(KeyEvent.VK_RIGHT);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> VK_LEFT Focused component=\"+lastFocused);\n \n try{\n Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY);\n } catch(InterruptedException e){}\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> TAB Focused component=\"+lastFocused);\n \n switchTabbed = true;\n }else\n switchTabbed = false;\n \n if((focusedComponent==null && lastFocused==null) &&\n !( (reallyFocusedComponent instanceof JTextComponent) ||\n (reallyFocusedComponent instanceof JTabbedPane) ||\n (reallyFocusedComponent instanceof JTable)) ) {\n \n if(debugLog) System.err.println(LOG_CAPTION+\" - ERROR : It's impossible test Tab traversal. After TAB, CTRL + TAB or RIGHT hitting nothing happends.\");\n \n return false;\n }\n \n if (focusedComponent==lastFocused){\n // Component probably swallowed Tab keypress so try Ctrl-Tab\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> CONTROL_TAB Focused component=\"+focusedComponent);\n \n try{ Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY); } catch(InterruptedException e){}\n \n focusedComponent = listener.getFocusedComponent();\n \n if ((focusedComponent == lastFocused) && (!switchTabbed)){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - !!!!! LOCK !!!!! \"+focusedComponent + \"==\" + lastFocused);\n \n // Stuck or window lost focus, so give up\n break;\n }\n }\n lastFocused = focusedComponent;\n }\n }\n }catch(AWTException e){ e.printStackTrace();}\n \n timeout.cancel();\n \n /* Detach focus listeners */\n i = traversableComponents.iterator();\n while(i.hasNext()){\n ((Component)(i.next())).removeFocusListener(listener);\n }\n \n /* Set flag to show at least one tab traversal performed */\n tabTraversalPerformed = true;\n \n return true;\n }", "@Test\n public void buildNotDome() {\n nextWorkerCell.setLevel(1);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n }", "@Test\r\n public void testSetParent_getParent() {\r\n System.out.println(\"setParent\");\r\n ConfigNode configNode = new ConfigNode(testLine);\r\n ConfigNode childNode1 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode1);\r\n assertEquals(configNode, childNode1.getParent());\r\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public RelocateBranch() {\n }", "@Override\r\n\tprotected Component[] createToggledComponents() throws ThinklabException {\r\n\t\tHbox classel = new Hbox();\r\n\r\n\t\tclassel.setWidth(\"100%\");\r\n\t\t\r\n\t\tWindow wc = new Window();\r\n\t\twc.setWidth(\"100%\");\r\n\t\twc.setBorder(\"normal\");\r\n\t\t\r\n\t\tclassel.appendChild(new Label(\"restrict type to \"));\r\n\t\tclassel.appendChild(new ObjectClassSelector(conceptID, indentLevel));\r\n\t\t\r\n\t\t/* TODO we must track the recursion level and insert an \"indent\" component if > 0 */\r\n\t\t\r\n\t\tInstanceSelector subc = new InstanceSelector(indentLevel);\r\n\t\tsubc.setConcept(conceptID);\r\n\t\tsubc.setWidth(\"100%\");\r\n\t\tobjComponent = subc;\r\n\t\t\r\n\t\tVbox amo = new Vbox(); amo.setWidth(\"100%\");\r\n\t\tHbox uff = new Hbox(); uff.setWidth(\"100%\");\r\n\t\r\n\t\tamo.appendChild(classel);\r\n\t\tamo.appendChild(subc);\r\n\t\twc.appendChild(amo);\r\n\t\t\r\n\t\tif (indentLevel > 0) {\r\n\t\t\tSeparator sep = new Separator(\"vertical\");\r\n\t\t\tsep.setWidth((30*indentLevel) + \"px\");\r\n\t\t\tuff.appendChild(sep);\r\n\t\t}\r\n\t\tuff.appendChild(wc);\r\n\t\t\r\n\t\tComponent[] c = new Component[1];\r\n\t\tc[0] = uff;\r\n\t\t\r\n\t\treturn c;\r\n\t\t\r\n\t}", "@Test\n public void testTRK3HasNoSubComponents() {\n assertThat( hasSubComponents( TRK3_WITHOT_SUB_COMP ), is( false ) );\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test291() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n // Undeclared exception!\n try { \n checkbox0.h3((Object) \"0G-VP2>k}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n FileInput fileInput0 = new FileInput(errorPage0, \"http://xmlpull.org/v1/doc/properties.html#serializer-indentation\", \"trying to write past already finished output\");\n // Undeclared exception!\n try { \n fileInput0.wBlock(\"trying to write past already finished output\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void testSetParent_fixture8_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture8();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "@Override\n\tpublic void levelUp() {\n\n\t}", "public void testSetParent_fixture25_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture25();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.q();\n Component component1 = component0.span();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Block_2\", component1.getComponentId());\n }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test\n\tpublic void componentToString()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent comp = new Component();\n\t\t\tcomp.setName(compName);\n\t\t\tcomp.setGroup(compGroup);\n\t\t\tcomp.setVersion(compVersion);\n\t\t\tcomp.setType(compType);\n\t\t\t\n\t\t\tString expectedStringWithoutTabs = \"Name:newComponent\\n\" +\n\t\t\t\t\t\"Group: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"Version: 1.5.1\\n\";\n\t\t\tString actualStringWithoutTabs = ComponentUtilities.toString(comp);\n\t\t\t\n\t\t\tif (expectedStringWithoutTabs.equals(actualStringWithoutTabs))\n\t\t\t\twatcher.getLogger()\n\t\t\t\t\t\t.info(\"Got Expected String from ComponentUtilities.toString(comp)!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithoutTabs,\n\t\t\t\t\t\tactualStringWithoutTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithoutTabs.equals(actualStringWithoutTabs));\n\t\t\t\n\t\t\tString expectedStringWithTabs = \"\tName:newComponent\\n\" +\n\t\t\t\t\t\"\tGroup: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"\tVersion: 1.5.1\\n\";\n\t\t\t\n\t\t\tString actualStringWithTabs = ComponentUtilities.toString(comp, \"\t\");\n\t\t\t\n\t\t\tif (actualStringWithTabs.equals(expectedStringWithTabs))\n\t\t\t\twatcher.getLogger().info(\"Got Expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\")!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithTabs,\n\t\t\t\t\t\tactualStringWithTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\"): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithTabs.equals(actualStringWithTabs));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting ComponentUtilities.toString.\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void testSetParent_fixture18_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture18();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void shouldThrowCyclicDependencyExceptionIfACycleIsDetected_DownstreamOfCurrentWasUpstreamOfCurrentAtSomePoint() {\n String grandParent = \"grandParent\";\n String parent = \"parent\";\n String child = \"child\";\n String currentPipeline = \"current\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n graph.addDownstreamNode(new PipelineDependencyNode(child, child), currentPipeline);\n graph.addDownstreamNode(new PipelineDependencyNode(grandParent, grandParent), child);\n graph.addUpstreamNode(new PipelineDependencyNode(parent, parent), null, currentPipeline);\n graph.addUpstreamNode(new PipelineDependencyNode(grandParent, grandParent), null, parent);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"g\",\"g\",\"git\") , null, grandParent, new MaterialRevision(null));\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"g\",\"g\",\"git\") , null, parent, new MaterialRevision(null));\n\n assertThat(graph.hasCycle(), is(true));\n }", "@Test(timeout = 4000)\n public void test225() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"java.lang.String@000000005\", \"]f '8Drr>Uj1==M2\");\n List<RenderableComponent> list0 = checkbox0._getRenderableChildren();\n assertEquals(\"]f '8Drr>Uj1==M2\", xmlEntityRef0.getComponentId());\n assertNotNull(list0);\n }", "@Test\n public void childrenTest() {\n // TODO: test children\n }", "@Test\n public void test113() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.acronym((Object) \"Col component can e added onlG to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(table0, \"input\", (String) null);\n // Undeclared exception!\n try { \n checkbox0.samp((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "public void testSetParent_fixture22_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture22();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test13() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setDepth(0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n assertEquals(0, defaultMenuItem0.getDepth());\n }", "public void testSetParent_fixture23_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture23();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testGetContainerForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertEquals(\"1.0\", root, root.getContainerForLocation(root.getLocation()));\n \n \t}", "public void setParent(View root, int virtualDescendantId) {\n/* 684 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSorted() {\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"A\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"B\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\n\t\t// add person 2 before person 1\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// reset persons and add person 1 before person 2\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).setValue(null);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// remove the links again\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\t}", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"sajp\", \"sajp\");\n // Undeclared exception!\n try { \n checkbox0.hr();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void testSetParent_fixture24_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture24();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "private BranchGroup getScene(){\n BranchGroup scene = new BranchGroup();\r\n\r\n // transformgroup zawierający robota oraz podłoże\r\n world = new TransformGroup();\r\n world.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_READ);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);\r\n TransformGroup robotTg;\r\n\r\n // nasz robot pobrany z klasy Robot\r\n robotTg = robot.getGroup();\r\n robotTg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n world.addChild(robotTg);\r\n\r\n // tworzenie scian\r\n float szerokoscScian = 10f;\r\n makeWalls(szerokoscScian);\r\n\r\n // tworzenie podłoża\r\n TransformGroup ground = new TransformGroup();\r\n Shape3D gr = new MyShapes().makeGround(new Point3f(szerokoscScian, 0f, szerokoscScian),\r\n new Point3f(szerokoscScian, 0f, -szerokoscScian), new Point3f(-szerokoscScian, 0f, -szerokoscScian),\r\n new Point3f(-szerokoscScian, 0f, szerokoscScian));\r\n gr.setUserData(new String(\"ground\"));\r\n Appearance appGround = new Appearance();\r\n appGround.setTexture(createTexture(\"grafika/floor.jpg\"));\r\n gr.setAppearance(appGround);\r\n\r\n // detekcja kolizji dla ziemi\r\n CollisionDetector collisionGround = new CollisionDetector(gr, new BoundingSphere(), this, robot);\r\n ground.addChild(gr);\r\n world.addChild(collisionGround);\r\n world.addChild(ground);\r\n\r\n // światła\r\n Color3f light1Color = new Color3f(1.0f, 1.0f, 1.0f);\r\n Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);\r\n BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);\r\n\r\n DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);\r\n light1.setInfluencingBounds(bounds);\r\n scene.addChild(light1);\r\n\r\n // obiekt do podnoszenia\r\n object = new Sphere(0.15f, robot.createAppearance(new Color3f(Color.ORANGE)));\r\n object.getShape().setUserData(new String(\"object\"));\r\n objectTransform = new Transform3D();\r\n objectTransform.setTranslation(objPos);\r\n objectTg = new TransformGroup(objectTransform);\r\n objectTg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n objectTg.addChild(object);\r\n objectGroup = new BranchGroup();\r\n objectGroup.setCapability(BranchGroup.ALLOW_DETACH);\r\n objectGroup.addChild(objectTg);\r\n world.addChild(objectGroup);\r\n\r\n // klasa behavior która służy do obsługiwania klawiatury\r\n Moving moving = new Moving(robot);\r\n moving.setSchedulingBounds(bounds);\r\n world.addChild(moving);\r\n\r\n // klasa behavior która odświeża się 60 razy na sekundę i odpowiada ona np. za nagrywanie, odtworzenie nagrania\r\n // symulowanie grawitacji\r\n loop = new GameLoop(this, robot);\r\n loop.setSchedulingBounds(bounds);\r\n world.addChild(loop);\r\n\r\n // detekcja kolizji dla obiektu\r\n CollisionDetector collisionObject = new CollisionDetector(object.getShape(), new BoundingSphere(new Point3d(), 0.15), this, robot);\r\n world.addChild(collisionObject);\r\n\r\n scene.addChild(world);\r\n\r\n scene.compile();\r\n return scene;\r\n }", "public void testSetParent_fixture17_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture17();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }" ]
[ "0.6306612", "0.62478787", "0.6189558", "0.5992853", "0.57631207", "0.57493865", "0.56158227", "0.55814946", "0.55555063", "0.55477095", "0.5518211", "0.5501021", "0.54533356", "0.5447029", "0.5415803", "0.54061675", "0.54014593", "0.53943616", "0.53929603", "0.5380932", "0.53622484", "0.5358909", "0.53408074", "0.5336292", "0.5329398", "0.5321057", "0.53100246", "0.53087485", "0.53011423", "0.5295637", "0.5291454", "0.52825636", "0.5282283", "0.5277487", "0.5258484", "0.5252929", "0.52525574", "0.52443814", "0.52437586", "0.5243602", "0.5241751", "0.52361685", "0.52334666", "0.5231043", "0.522346", "0.5221831", "0.5219072", "0.52120054", "0.5200939", "0.51922905", "0.51895565", "0.51811004", "0.51789826", "0.51777947", "0.5174826", "0.5168926", "0.5164684", "0.51576877", "0.5156398", "0.5155467", "0.514655", "0.51446104", "0.5140659", "0.5135696", "0.5125583", "0.5124536", "0.51095945", "0.51061326", "0.51014537", "0.50938815", "0.50849324", "0.50822806", "0.5078102", "0.5074288", "0.5070255", "0.5053021", "0.5052925", "0.5044812", "0.504148", "0.5041174", "0.50343585", "0.50329643", "0.50328255", "0.5028124", "0.50263274", "0.50253195", "0.50245863", "0.5024302", "0.50204927", "0.5018964", "0.5018708", "0.50184715", "0.5013758", "0.50130355", "0.50123644", "0.5007832", "0.5007295", "0.50003594", "0.4990433", "0.49898925" ]
0.52747035
34
Test case number: 16 / 1 covered goal: Goal 1. wheel.components.Component.attributes([Ljava/lang/String;)Lwheel/components/Component;: I26 Branch 25 IFLE L192 false
@Test public void test016() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); String[] stringArray0 = new String[5]; // Undeclared exception! try { Component component0 = errorPage0.area(stringArray0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Attributes must be given in name, value pairs. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test228() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"unsupported feature \", \"unsupported feature \");\n String[] stringArray0 = new String[2];\n Component component0 = checkbox0.attributes(stringArray0);\n assertSame(component0, checkbox0);\n }", "@Test(timeout = 4000)\n public void test229() throws Throwable {\n Form form0 = new Form(\"z=OF5Ty4t\");\n String[] stringArray0 = new String[7];\n // Undeclared exception!\n try { \n form0.attributes(stringArray0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Attributes must be given in name, value pairs.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test173() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"1R^6@7]:\");\n ElExpression elExpression0 = new ElExpression(\"F|WX'\");\n // Undeclared exception!\n try { \n xmlEntityRef0.attribute(\"}mL>mNa\", elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test196() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Hidden hidden1 = (Hidden)hidden0.attribute(\"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n assertTrue(hidden1.isValid());\n }", "@Test(timeout = 4000)\n public void test195() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"{\");\n Component component0 = xmlEntityRef0.attribute(\"{\", \"L1c$!db-nwBt?]asCH\");\n assertEquals(\"{\", component0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n Form form0 = new Form(\"z=OF5Ty4t\");\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"java.lang.String@0000000005\";\n Component component0 = form0.attributes(stringArray0);\n assertEquals(\"z=OF5Ty4t\", component0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test231() throws Throwable {\n Form form0 = new Form(\"DUP\");\n Component component0 = form0.attributes((String[]) null);\n assertEquals(\"DUP\", component0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test344() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Map<String, String> map0 = hidden0.getAttributes();\n assertEquals(1, map0.size());\n }", "@Test\n public void test085() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \">}\\\"_\", \">}\\\"_\");\n String[] stringArray0 = new String[6];\n Checkbox checkbox1 = (Checkbox)checkbox0.attributes(stringArray0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertFalse(checkbox1._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test230() throws Throwable {\n Form form0 = new Form(\"println\");\n String[] stringArray0 = new String[0];\n Component component0 = form0.attributes(stringArray0);\n assertEquals(\"println\", component0.getComponentId());\n }", "@Test\n public void test_TCC() {\n final Attribute attribute = new Attribute(){\n \t\tprivate static final long serialVersionUID = 200L;\n };\n assertTrue(null == attribute.getName());\n assertTrue(attribute.isSpecified());\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2472);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2472, \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\");\n Attribute attribute0 = new Attribute(\"jyY)^e *Uz#>@n8v((\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test\n public void Test05() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n component.setDamage(10);\n double currentDamage = component.getDamage();\n assertTrue(currentDamage == 10);\n }", "public ComponentTypeMock(){\n\t\tattributes = \"component\";\n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-984));\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (-984), \"\", \"\", \"\", \"\");\n Attribute attribute0 = new Attribute(\"\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-3081));\n ByteVector byteVector0 = new ByteVector(4);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2, \"/<pZ'q@6=nfTa}5<G9U\", \"7(I\\\"*\", \"/<pZ'q@6=nfTa}5<G9U\", \"7(I\\\"*\");\n Attribute attribute0 = new Attribute(\"`/5h{! 0@J?JAf\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "public void test_040() {\n\t\ttry {\n\t\t\tUpdatableChronicle e = db.getTopChronicle().edit().createChronicle(SIMPLENAME, false, \"junit test 001\", null, null);\n\t\t\tAttribute<?> a = e.getAttribute(\"foo\", false);\n\t\t\tassertNull(a);\n\t\t\ta = e.getAttribute(\"bar\", true);\n\t\t\texpectException();\n\t\t} catch (Exception e) {\n\t\t\tassertException(e, D.D40114);\n\t\t}\n\t}", "@Test\n public void Test07() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n component.setTurnDuration(5);\n int currentDuration = component.getTurnDuration();\n assertTrue(currentDuration == 5);\n }", "@Test\n public void test129() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"convert\");\n Map<String, String> map0 = xmlEntityRef0.getAttributes();\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.dl();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void Test13_1() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_DEBUFF, 3, -40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(441);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 441, \"N}o.<G8IO,,S#lU9s2Q\", \"N}o.<G8IO,,S#lU9s2Q\", \"N}o.<G8IO,,S#lU9s2Q\", \"N}o.<G8IO,,S#lU9s2Q\");\n Attribute attribute0 = new Attribute(\"N}o.<G8IO,,S#lU9s2Q\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "public void checkAttribute(String arg1) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"Label offset position has not been resolved yet\";\n stringArray0[1] = \"'0\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"'0\", \"Label offset position has not been resolved yet\", \"'0\", stringArray0, false, false);\n Label label0 = new Label();\n Label label1 = label0.successor;\n Label[] labelArray0 = new Label[3];\n labelArray0[0] = null;\n methodWriter0.visitMaxs(3281, 6);\n methodWriter0.visitFieldInsn(90, \"Label offset position has not been resolved yet\", \"'0\", \"ZWx\\\"3;rcoG`-\");\n int int0 = 188;\n methodWriter0.visitMultiANewArrayInsn(\"\", 188);\n methodWriter0.visitEnd();\n Attribute attribute0 = new Attribute(\"'0\");\n byte[] byteArray0 = new byte[0];\n // Undeclared exception!\n try { \n attribute0.write(classWriter0, byteArray0, 90, 3281, 188);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.Attribute\", e);\n }\n }", "public static void main(String[] args){\n\t\tString[] BaseVoltageAttribute = {\"cim:BaseVoltage.nominalVoltage\"};\n\t\tString[] SubstationAttribute = {\"cim:IdentifiedObject.name\",\"cim:Substation.Region\"};\n\t\tString[] VolatgeLevelAttribute = {\"cim:IdentifiedObject.name\",\"cim:VoltageLevel.Substation\",\"cim:VoltageLevel.BaseVoltage\"};\n\t\tString[] GeneratingUnitAttribute = {\"cim:IdentifiedObject.name\",\"cim:GeneratingUnit.maxOperatingP\",\"cim:GeneratingUnit.minOperatingP\",\"cim:Equipment.EquipmentContainer\"};\n\t\tString[] SynchronousMachineAttribute = {\"cim:IdentifiedObject.name\",\"cim:RotatingMachine.ratedS\",\"cim:RotatingMachine.p\",\"cim:RotatingMachine.q\",\"cim:RotatingMachine.GeneratingUnit\",\n\t\t\t\t\"cim:RegulatingCondEq.RegulatingControl\", \"cim:Equipment.EquipmentContainer\",\"baseVoltage\"};\n\t\tString[] RegulatingControlAttribute = {\"cim:IdentifiedObject.name\",\"cim:RegulatingControl.targetValue\"};\n\t\tString[] PowerTransformerAttribute = {\"cim:IdentifiedObject.name\",\"cim:Equipment.EquipmentContainer\"};\n\t\tString[] EnergyConsumerAttribute = {\"cim:IdentifiedObject.name\",\"cim:EnergyConsumer.p\",\"cim:EnergyConsumer.q\",\"cim:Equipment.EquipmentContainer\",\"baseVoltage\"};\n\t\tString[] PowerTransformerEndAttribute = {\"cim:IdentifiedObject.name\",\"cim:PowerTransformerEnd.r\",\"cim:PowerTransformerEnd.x\",\n\t\t\t\t\"cim:PowerTransformerEnd.PowerTransformer\",\"cim:TransformerEnd.BaseVoltage\"};\n\t\tString[] BreakerAttribute = {\"cim:IdentifiedObject.name\",\"cim:Switch.open\",\"cim:Equipment.EquipmentContainer\",\"baseVoltage\"};\n\t\tString[] RatioTapChangerAttribute = {\"cim:IdentifiedObject.name\",\"cim:TapChanger.step\"};\n\t\t\n\t\t// Create an array list with all the attributes\n\t\tArrayList<String[]> AttList = new ArrayList<String[]>();\n\t\tAttList.add(BaseVoltageAttribute);\n\t\tAttList.add(SubstationAttribute);\n\t\tAttList.add(VolatgeLevelAttribute);\n\t\tAttList.add(GeneratingUnitAttribute);\n\t\tAttList.add(SynchronousMachineAttribute);\n\t\tAttList.add(RegulatingControlAttribute);\n\t\tAttList.add(PowerTransformerAttribute);\n\t\tAttList.add(EnergyConsumerAttribute);\n\t\tAttList.add(PowerTransformerEndAttribute);\n\t\tAttList.add(BreakerAttribute);\n\t\tAttList.add(RatioTapChangerAttribute);\n\t\t\t\t\n\t\ttry{\n\t\t\t\n\t\t\t// Read XML file EQ\n\t\t\tFile XmlFileEQ = new File (\"C:\\\\Users\\\\Matteo\\\\Documents\\\\Kic InnoEnergy\\\\KTH\\\\Computer application\\\\Assignment 1\\\\MicroGridTestConfiguration_T1_BE_EQ_V2.xml\");\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc_eq = dBuilder.parse(XmlFileEQ);\n\t\t\t\n\t\t\t// Read XML file SSH\n\t\t\tFile XmlFileSSH = new File (\"C:\\\\Users\\\\Matteo\\\\Documents\\\\Kic InnoEnergy\\\\KTH\\\\Computer application\\\\Assignment 1\\\\MicroGridTestConfiguration_T1_BE_SSH_V2.xml\");\n\t\t\tDocument doc_SSH = dBuilder.parse(XmlFileSSH);\n\t\t\t\n\t\t\t// normalize CIM XML file\n\t\t\tdoc_eq.getDocumentElement().normalize();\n\t\t\tdoc_SSH.getDocumentElement().normalize();\n\t\t\t\n\t\t\tArrayList<NodeList> NodeListList = new ArrayList<NodeList>();\n//\t\t\tString[] nodeListNames = {\"bvList\",\"subList\",\"volList\",\"guList\",\"genList\",\"rcList\",\"ptList\",\"ecList\",\"pteList\",\"bList\",\"rtcList\"};\n\t\t\t// Array with all the CIM objects tags\n\t\t\tString[] tagList = {\"cim:BaseVoltage\",\"cim:Substation\",\"cim:VoltageLevel\",\"cim:GeneratingUnit\",\"cim:SynchronousMachine\",\n\t\t\t\t\t\"cim:RegulatingControl\",\"cim:PowerTransformer\", \"cim:EnergyConsumer\",\"cim:PowerTransformerEnd\",\"cim:Breaker\",\"cim:RatioTapChanger\"};\n\t\t\t// It fill out the ArrayList \"NodeListList\", where each object is a list of nodes characterized by the same tag, i.e. newNodeList\n\t\t\tfor(int i=0; i<tagList.length; i++){\n\t\t\t\t// Node list obtained looking for tags in EQ document\n\t\t\t\tNodeList newNodeList1 = doc_eq.getElementsByTagName(tagList[i]);\n\t\t\t\t// Node list obtained looking for tags in SSH document\n\t\t\t\tNodeList newNodeList2 = doc_SSH.getElementsByTagName(tagList[i]);\n\t\t\t\t// Some tags are not present in the SSH file, hence, we fill that list we the same not of list1, just to avoid handling an empty list\n\t\t\t\tif(newNodeList2 == null || newNodeList2.getLength() == 0 ){\n\t\t\t\t\tnewNodeList2 = newNodeList1;\n\t\t\t\t}\n\t\t\t\t// both lists are added to the same ArrayList\n\t\t\t\t// even position are then relative to NodeList1\n\t\t\t\t// odd positions are relative to NodeList2\n\t\t\t\tNodeListList.add(newNodeList1);\n\t\t\t\tNodeListList.add(newNodeList2);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// … cycle through each list to extract required data\n\t\t\tfor(int k = 0; k < NodeListList.size(); k +=2){\n\t\t\t\t// It extracts each element of NodeListList, called newNodeList, which is a list of nodes having the same tag \n\t\t\t\tSystem.out.println(\"\\n\" + \"---------------------------------------\" + \"\\n\" + tagList[k/2] + \"\\n\" + \"---------------------------------------\" + \"\\n\");\n\t\t\t\tNodeList newNodeList1 = NodeListList.get(k);\n\t\t\t\tNodeList newNodeList2 = NodeListList.get(k+1);\n\t\t\t\n\t\t\t\tfor (int i = 0; i < newNodeList1.getLength(); i++) {\n\t\t\t\t\t// From the node list newNodeList, it extracts each node and invokes extractNode method\n\t\t\t\t\t// newNodeList1 and newNodeList2 have the same length, because they are referred to the same CIM objects.\n\t\t\t\t\tNode node1 = newNodeList1.item(i); \n\t\t\t\t\tNode node2 = newNodeList2.item(i);\n\t\t\t\t\textractNode(node1,node2,k,i,AttList,doc_eq);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Test\n public void Test14() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertEquals(54760, component.hashCode());\n }", "@Test(expected = IllegalArgumentException.class)\n public void Test08() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n component.setTurnDuration(-3);\n }", "@Test(expected = IllegalArgumentException.class)\n public void Test04() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, -3, 20);\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 0, \"O8\", \"\", \"O8\", \"O8\");\n Attribute attribute0 = new Attribute(\"O8\");\n fieldWriter0.visitAttribute(attribute0);\n ByteVector byteVector0 = classWriter0.pool;\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test\n public void Test13_3() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 50);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(131072);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(2, \"\", \"\", (String) null, \"\");\n Attribute attribute0 = new Attribute(\"\");\n fieldWriter0.visitAttribute(attribute0);\n ByteVector byteVector0 = classWriter0.pool;\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "void method0() {\nprivate static final String ELEMENT_N = \"element_n\";\nprivate static final String ELEMENT_R = \"element_r\";\nprivate static final String ATTRIBUTE_N = \"attribute_n\";\nprivate static final String ATTRIBUTE_R = \"attribute_r\";\nprivate static int ATTIDX_COUNT = 0;\npublic static final int ATTIDX_ABSTRACT = ATTIDX_COUNT++;\npublic static final int ATTIDX_AFORMDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_BASE = ATTIDX_COUNT++;\npublic static final int ATTIDX_BLOCK = ATTIDX_COUNT++;\npublic static final int ATTIDX_BLOCKDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_DEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_EFORMDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_FINAL = ATTIDX_COUNT++;\npublic static final int ATTIDX_FINALDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_FIXED = ATTIDX_COUNT++;\npublic static final int ATTIDX_FORM = ATTIDX_COUNT++;\npublic static final int ATTIDX_ID = ATTIDX_COUNT++;\npublic static final int ATTIDX_ITEMTYPE = ATTIDX_COUNT++;\npublic static final int ATTIDX_MAXOCCURS = ATTIDX_COUNT++;\npublic static final int ATTIDX_MEMBERTYPES = ATTIDX_COUNT++;\npublic static final int ATTIDX_MINOCCURS = ATTIDX_COUNT++;\npublic static final int ATTIDX_MIXED = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAME = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAMESPACE = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAMESPACE_LIST = ATTIDX_COUNT++;\npublic static final int ATTIDX_NILLABLE = ATTIDX_COUNT++;\npublic static final int ATTIDX_NONSCHEMA = ATTIDX_COUNT++;\npublic static final int ATTIDX_PROCESSCONTENTS = ATTIDX_COUNT++;\npublic static final int ATTIDX_PUBLIC = ATTIDX_COUNT++;\npublic static final int ATTIDX_REF = ATTIDX_COUNT++;\npublic static final int ATTIDX_REFER = ATTIDX_COUNT++;\npublic static final int ATTIDX_SCHEMALOCATION = ATTIDX_COUNT++;\npublic static final int ATTIDX_SOURCE = ATTIDX_COUNT++;\npublic static final int ATTIDX_SUBSGROUP = ATTIDX_COUNT++;\npublic static final int ATTIDX_SYSTEM = ATTIDX_COUNT++;\npublic static final int ATTIDX_TARGETNAMESPACE = ATTIDX_COUNT++;\npublic static final int ATTIDX_TYPE = ATTIDX_COUNT++;\npublic static final int ATTIDX_USE = ATTIDX_COUNT++;\npublic static final int ATTIDX_VALUE = ATTIDX_COUNT++;\npublic static final int ATTIDX_ENUMNSDECLS = ATTIDX_COUNT++;\npublic static final int ATTIDX_VERSION = ATTIDX_COUNT++;\npublic static final int ATTIDX_XML_LANG = ATTIDX_COUNT++;\npublic static final int ATTIDX_XPATH = ATTIDX_COUNT++;\npublic static final int ATTIDX_FROMDEFAULT = ATTIDX_COUNT++;\n//public static final int ATTIDX_OTHERVALUES = ATTIDX_COUNT++; \npublic static final int ATTIDX_ISRETURNED = ATTIDX_COUNT++;\nprivate static final XIntPool fXIntPool = new XIntPool();\n// constants to return \nprivate static final XInt INT_QUALIFIED = fXIntPool.getXInt(SchemaSymbols.FORM_QUALIFIED);\nprivate static final XInt INT_UNQUALIFIED = fXIntPool.getXInt(SchemaSymbols.FORM_UNQUALIFIED);\nprivate static final XInt INT_EMPTY_SET = fXIntPool.getXInt(XSConstants.DERIVATION_NONE);\nprivate static final XInt INT_ANY_STRICT = fXIntPool.getXInt(XSWildcardDecl.PC_STRICT);\nprivate static final XInt INT_ANY_LAX = fXIntPool.getXInt(XSWildcardDecl.PC_LAX);\nprivate static final XInt INT_ANY_SKIP = fXIntPool.getXInt(XSWildcardDecl.PC_SKIP);\nprivate static final XInt INT_ANY_ANY = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_ANY);\nprivate static final XInt INT_ANY_LIST = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_LIST);\nprivate static final XInt INT_ANY_NOT = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_NOT);\nprivate static final XInt INT_USE_OPTIONAL = fXIntPool.getXInt(SchemaSymbols.USE_OPTIONAL);\nprivate static final XInt INT_USE_REQUIRED = fXIntPool.getXInt(SchemaSymbols.USE_REQUIRED);\nprivate static final XInt INT_USE_PROHIBITED = fXIntPool.getXInt(SchemaSymbols.USE_PROHIBITED);\nprivate static final XInt INT_WS_PRESERVE = fXIntPool.getXInt(XSSimpleType.WS_PRESERVE);\nprivate static final XInt INT_WS_REPLACE = fXIntPool.getXInt(XSSimpleType.WS_REPLACE);\nprivate static final XInt INT_WS_COLLAPSE = fXIntPool.getXInt(XSSimpleType.WS_COLLAPSE);\nprivate static final XInt INT_UNBOUNDED = fXIntPool.getXInt(SchemaSymbols.OCCURRENCE_UNBOUNDED);\n// used to store the map from element name to attribute list \n// for 14 global elements \nprivate static final Hashtable fEleAttrsMapG = new Hashtable(29);\n// for 39 local elememnts \nprivate static final Hashtable fEleAttrsMapL = new Hashtable(79);\n// used to initialize fEleAttrsMap \n// step 1: all possible data types \n// DT_??? >= 0 : validate using a validator, which is initialized staticly \n// DT_??? < 0 : validate directly, which is done in \"validate()\" \nprotected static final int DT_ANYURI = 0;\nprotected static final int DT_ID = 1;\nprotected static final int DT_QNAME = 2;\nprotected static final int DT_STRING = 3;\nprotected static final int DT_TOKEN = 4;\nprotected static final int DT_NCNAME = 5;\nprotected static final int DT_XPATH = 6;\nprotected static final int DT_XPATH1 = 7;\nprotected static final int DT_LANGUAGE = 8;\n// used to store extra datatype validators \nprotected static final int DT_COUNT = DT_LANGUAGE + 1;\nprivate static final XSSimpleType[] fExtraDVs = new XSSimpleType[DT_COUNT];\nprotected static final int DT_BLOCK = -1;\nprotected static final int DT_BLOCK1 = -2;\nprotected static final int DT_FINAL = -3;\nprotected static final int DT_FINAL1 = -4;\nprotected static final int DT_FINAL2 = -5;\nprotected static final int DT_FORM = -6;\nprotected static final int DT_MAXOCCURS = -7;\nprotected static final int DT_MAXOCCURS1 = -8;\nprotected static final int DT_MEMBERTYPES = -9;\nprotected static final int DT_MINOCCURS1 = -10;\nprotected static final int DT_NAMESPACE = -11;\nprotected static final int DT_PROCESSCONTENTS = -12;\nprotected static final int DT_USE = -13;\nprotected static final int DT_WHITESPACE = -14;\nprotected static final int DT_BOOLEAN = -15;\nprotected static final int DT_NONNEGINT = -16;\nprotected static final int DT_POSINT = -17;\n// used to resolver namespace prefixes \nprotected XSDHandler fSchemaHandler = null;\n// used to store symbols. \nprotected SymbolTable fSymbolTable = null;\n// used to store the mapping from processed element to attributes \nprotected Hashtable fNonSchemaAttrs = new Hashtable();\n// temprory vector, used to hold the namespace list \nprotected Vector fNamespaceList = new Vector();\n// whether this attribute appeared in the current element \nprotected boolean[] fSeen = new boolean[ATTIDX_COUNT];\nprivate static boolean[] fSeenTemp = new boolean[ATTIDX_COUNT];\n// the following part implements an attribute-value-array pool. \n// when checkAttribute is called, it calls getAvailableArray to get \n// an array from the pool; when the caller is done with the array, \n// it calls returnAttrArray to return that array to the pool. \n// initial size of the array pool. 10 is big enough \nstatic final int INIT_POOL_SIZE = 10;\n// the incremental size of the array pool \nstatic final int INC_POOL_SIZE = 10;\n// the array pool \nObject[][] fArrayPool = new Object[INIT_POOL_SIZE][ATTIDX_COUNT];\n// used to clear the returned array \n// I think System.arrayCopy is more efficient than setting 35 fields to null \nprivate static Object[] fTempArray = new Object[ATTIDX_COUNT];\n// current position of the array pool (# of arrays not returned) \nint fPoolPos = 0;\n}", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(32767);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"tE\";\n stringArray0[1] = \"tE\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 32767, \"&h'pH__a\", \"tE\", \"org.objectweb.asm.jip.Attribute\", stringArray0, false, false);\n MethodWriter methodWriter1 = methodWriter0.next;\n Label label0 = new Label();\n Label[] labelArray0 = new Label[6];\n Label label1 = label0.getFirst();\n label0.info = (Object) label1;\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n labelArray0[4] = label0;\n label1.successor = label0;\n methodWriter0.visitLocalVariable(\"Label offset position has not been resolved yet\", \"w4v?Hl$.LGym,,F\", \"org.objectweb.asm.jip.Attribute\", label0, label1, 12);\n methodWriter0.visitLabel(label0);\n assertSame(label0, label1);\n }", "protected void validateAttribute(FactAttribute[] param) {\r\n\r\n }", "@Test\n\tpublic void should_weapon_with_two_different_attributes_and_start_one_by_one(){\n\t\twhen(random.nextInt(ATTRIBUTE_RANGE))\n\t\t.thenReturn(0)\n\t\t.thenReturn(2)\n\t\t.thenReturn(3)\n\t\t.thenReturn(1)\n\t\t.thenReturn(2)\n\t\t.thenReturn(3)\n\t\t.thenReturn(4);\n\t\tAttribute freeze = new Freeze(\"冰冻\", 2);\n\t\tAttribute fire = new Fire(\"烧伤\", 3);\n\t\tWeapon firePlusFreezeWeapon = new Weapon(\"烈焰寒冰剑\", 5, fire, random);\n\t\tfirePlusFreezeWeapon.addAttribute(freeze);\n\t\tSoldier playerA = new Soldier(\"李四\",5,100,firePlusFreezeWeapon,10);\n\t\tPlayer playerB = new Player(\"张三\", 20, 100);\n\t\tGame game = new Game(playerA, playerB, out);\n\t\tgame.start();\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三烧伤了,张三剩余生命:90\");\n\t\tinorder.verify(out).println(\"张三受到2点烧伤伤害,张三剩余生命:88\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:90\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:78\");\n\t\tinorder.verify(out).println(\"张三受到2点烧伤伤害,张三剩余生命:76\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:80\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:66\");\t\t\n\t\tinorder.verify(out).println(\"张三受到2点烧伤伤害,张三剩余生命:64\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:70\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三冻僵了,张三剩余生命:54\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:60\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:44\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:50\");\t\t\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:34\");\t\t\n\t\tinorder.verify(out).println(\"张三冻得直哆嗦,没有击中李四\");\t\t\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:24\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:40\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:14\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:30\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:4\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:20\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:-6\");\n\t\tinorder.verify(out).println(\"张三被打败了\");\n\t}", "public void testGetComponent() throws Exception {\n Component component = Aura.getInstanceService()\n .getInstance(\"auratest:testComponent1\", ComponentDef.class, null);\n assertEquals(\"Default String\", component.getAttributes().getExpression(\"myString\")); // from\n // the\n // component\n assertEquals(true, component.getAttributes().getExpression(\"myBoolean\")); // from\n // the\n // parent\n // component\n assertEquals(\"Interface String\", component.getAttributes().getExpression(\"interfaceString\")); // from\n // the\n // interface\n assertEquals(\"1\", component.getGlobalId());\n }", "boolean isAttribute();", "static public void main(String[] args){\n IA ia = new UberComponent(); IA ia2 = (IA) ia; ia2.SayHello(\",\");\n //--------------------- Check For Symmetry\n IB ia3 = (IB) ia; ia2 = (IA) ia3; ia2.SayHello(\",\"); ia3.SayHello2(\",\");\n //----------- Check For Transitivity\n IC ia4 = (IC) ia3; IA ia5 = (IA) ia4; ia5.SayHello(\",\"); a4.SayHello3(\"m\");\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(8);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 8, \"\", \"\", \"\", \"\");\n Attribute attribute0 = new Attribute(\"Signature\");\n fieldWriter0.visitAttribute(attribute0);\n ByteVector byteVector0 = classWriter0.pool;\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "private boolean checkAttributes(ExportPkg ep, ImportPkg ip) {\n /* Mandatory attributes */\n if (!ip.checkMandatory(ep.mandatory)) {\n return false;\n }\n /* Predefined attributes */\n if (!ip.okPackageVersion(ep.version) ||\n (ip.bundleSymbolicName != null &&\n !ip.bundleSymbolicName.equals(ep.bpkgs.bundle.symbolicName)) ||\n !ip.bundleRange.withinRange(ep.bpkgs.bundle.version)) {\n return false;\n }\n /* Other attributes */\n for (Iterator i = ip.attributes.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry)i.next();\n String a = (String)ep.attributes.get(e.getKey());\n if (a == null || !a.equals(e.getValue())) {\n return false;\n }\n }\n return true;\n }", "@Test(expected = IllegalArgumentException.class)\n public void Test06_1() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n component.setDamage(-3);\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n Attribute attribute0 = new Attribute((String) null, (String) null);\n LinkedList<Attribute> linkedList0 = new LinkedList<Attribute>();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>(linkedList0);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"date\", arrayList0, 0);\n Instances instances1 = new Instances(instances0);\n double[] doubleArray0 = new double[1];\n SparseInstance sparseInstance0 = new SparseInstance(1, doubleArray0);\n SparseInstance sparseInstance1 = new SparseInstance((Instance) sparseInstance0);\n instances0.add((Instance) sparseInstance1);\n Discretize discretize0 = new Discretize(\"@attribute\");\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.setMakeBinary(true);\n assertTrue(discretize0.getMakeBinary());\n \n Discretize discretize1 = new Discretize();\n boolean boolean0 = discretize1.setInputFormat(instances1);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(4096);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 4096, \"v~t_e\", \"v~t_e\", \"v~t_e\", \"v~t_e\");\n Attribute attribute0 = new Attribute(\"v~t_e\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void Test03_1() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, -20);\n }", "private void checkAttributes() throws JellyTagException\n {\n if (getField() == null)\n {\n throw new MissingAttributeException(\"field\");\n }\n if (getVar() == null)\n {\n if (!(getParent() instanceof ValueSupport))\n {\n throw new JellyTagException(\n \"No target for the resolved value: \"\n + \"Specify the var attribute or place the tag \"\n + \"in the body of a ValueSupport tag.\");\n }\n }\n }", "public static void main(String[] args) {\n\t\tList<String> attributeList = new ArrayList<>();\n\t\tattributeList.add(\"srvac/v-pen/c04-ch02inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch05-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch07-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch09-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch13-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch14-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch16inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-sept-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch02inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch04inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch05-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch06-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch07-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch07-2/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch08-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch09-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch09-2/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch12-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch13-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch14-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch15inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch16inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch22inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-sept-1/pressure\");\n\n\t\tList<String> selectionList = new ItemSelectionDialog(\n\t\t\t\t(JFrame) null, \"Attribute Selection\", attributeList, true).showDialog();\n\t\tif (selectionList.isEmpty())\n\t\t\tSystem.out.println(\"No Selection\");\n\t\telse {\n\t\t\tfor (String selection : selectionList)\n\t\t\t\tSystem.out.println(selection);\n\t\t}\n\t}", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test\n public void Test13_2() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 4, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test(expected = IllegalArgumentException.class)\n public void Test06_2() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_DEBUFF, 3, -40);\n component.setDamage(3);\n }", "@Test(expected = NullPointerException.class)\n public void Test02() {\n component = new DamageEffectComponent(null, 3, 20);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(9);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 1596, \"ConstantVlue\", \"xWJwacYp%f=Qk\", \"eprF6eZaPtd\", (Object) null);\n // Undeclared exception!\n try { \n fieldWriter0.visitAttribute((Attribute) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.FieldWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(3046);\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"SourceDebugExtension\";\n stringArray0[1] = \")1Dc@`M-,v4\";\n stringArray0[2] = \"R$_Ff!sF,uE4P'wGFDy\";\n stringArray0[3] = \"R$_Ff!sF,uE4P'wGFDy\";\n stringArray0[4] = \"s4#6U\";\n stringArray0[5] = \"81<U@W{b30+,bjYk\";\n stringArray0[6] = \"R$_Ff!sF,uE4P'wGFDy\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \")1Dc@`M-,v4\", \"81<U@W{b30+,bjYk\", \"81<U@W{b30+,bjYk\", stringArray0, false, false);\n MethodWriter methodWriter1 = classWriter0.firstMethod;\n methodWriter1.visitInsn(1);\n methodWriter1.visitFrame(11, (-764), stringArray0, 2048, stringArray0);\n methodWriter0.getSize();\n methodWriter0.visitFrame(3, 2048, stringArray0, (-1551), stringArray0);\n Attribute attribute0 = new Attribute(\"iL9-M\");\n // Undeclared exception!\n try { \n attribute0.write(classWriter0, (byte[]) null, 3378, 3407, (-28));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void Test12() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n ManaEffectComponent another = new ManaEffectComponent(EffectEnum.MANA_BUFF, 3, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "@Test(timeout = 4000)\n public void test178() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.acronym();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "protected abstract int compareOnAttribute( U obj );", "public boolean method_4110(AttributeKey var1) {\n return false;\n }", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "private void checkForSuperfluousAttributes(SyntaxTreeNode node,\n Attributes attrs)\n {\n QName qname = node.getQName();\n boolean isStylesheet = (node instanceof Stylesheet);\n String[] legal = _instructionAttrs.get(qname.getStringRep());\n if (versionIsOne && legal != null) {\n int j;\n final int n = attrs.getLength();\n\n for (int i = 0; i < n; i++) {\n final String attrQName = attrs.getQName(i);\n\n if (isStylesheet && attrQName.equals(\"version\")) {\n versionIsOne = attrs.getValue(i).equals(\"1.0\");\n }\n\n // Ignore if special or if it has a prefix\n if (attrQName.startsWith(\"xml\") ||\n attrQName.indexOf(':') > 0) continue;\n\n for (j = 0; j < legal.length; j++) {\n if (attrQName.equalsIgnoreCase(legal[j])) {\n break;\n }\n }\n if (j == legal.length) {\n final ErrorMsg err =\n new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR,\n attrQName, node);\n // Workaround for the TCK failure ErrorListener.errorTests.error001..\n err.setWarningError(true);\n reportError(WARNING, err);\n }\n }\n }\n }", "public void test55() {\n //$NON-NLS-1$\n deployBundles(\"test55\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "protected void _updateG2AttributesFromLocal(Structure atts)\n {\n }", "@Test\n\tpublic void test_TCC___String_String_int() {\n {\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", AttributeType.ID.ordinal());\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(Namespace.NO_NAMESPACE));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t}", "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void Test03_2() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_DEBUFF, 3, 20);\n }", "@Test(timeout = 4000)\n public void test374() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n Component component0 = xmlEntityRef0.clasS((CharSequence) null);\n assertEquals(\"wheel_components_XmlEntityRef\", component0.getComponentId());\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.attributeIndicesTipText();\n assertEquals(\"Specify range of attributes to act on. This is a comma separated list of attribute indices, with \\\"first\\\" and \\\"last\\\" valid values. Specify an inclusive range with \\\"-\\\". E.g: \\\"first-3,5,6-10,last\\\".\", string0);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public final void testParseWhereExtraValue() throws Exception {\n\n try (InputStream is = this.getClass()\n .getResourceAsStream( \"/data/loader/expression/experimentalDesignTestExtra.txt\" )) {\n\n experimentalDesignImporter.importDesign( ee, is );\n }\n\n ee = this.eeService.thawLite( ee );\n\n Collection<BioMaterial> bms = new HashSet<>();\n for ( BioAssay ba : ee.getBioAssays() ) {\n BioMaterial bm = ba.getSampleUsed();\n bms.add( bm );\n }\n this.aclTestUtils.checkEEAcls( ee );\n\n this.checkResults( bms );\n }", "public boolean hasAttribute(String name)\n/* */ {\n/* 1234 */ return findAttribute(name) != null;\n/* */ }", "public void test435917b() throws Exception\n {\n // line 11 column 1 - Warning: <input> attribute with missing trailing quote mark\n\n // should not report:\n // line 11 column 2 - Warning: <input> unknown attribute value \"null\"\n\n executeTidyTest(\"435917.html\");\n assertLogDoesntContains(\"null\");\n }", "@Override\npublic void processAttributes() {\n\t\n}", "@Test\n public void testAttributeManagement() {\n Tag tag = new BaseTag(\"testtag\");\n String attributeName = \"testAttr\";\n String attributeValue = \"testValue\";\n tag.addAttribute(attributeName, attributeValue);\n assertEquals(\"Wrong attribute value returned\", attributeValue, tag.getAttribute(attributeName));\n assertNotNull(\"No attribute map\", tag.getAttributes());\n assertEquals(\"Wrong attribute map size\", 1, tag.getAttributes().size());\n assertEquals(\"Wrong attribute in map\", attributeValue, tag.getAttributes().get(attributeName));\n tag.removeAttribute(attributeName);\n assertNull(\"Attribute was not removed\", tag.getAttribute(attributeName));\n }", "@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}", "public SolutionAttributes(String name, String type, double lbound,double ubound, \n\t\t\tdouble granularity, double rateOfEvolution, double value, String dfault, String flag, String unit){\n\t\tthis.name = name;\n\t\tthis.type = type;\n\t\tthis.lbound = lbound;\n\t\tthis.ubound = ubound;\n\t\tthis.granularity = granularity;\n\t\tthis.rateOfEvolution = rateOfEvolution;\n\t\tthis.value = value;\n\t\tthis.dfault = dfault;\n\t\tthis.flag = flag;\n\t\tthis.unit = unit;\n\t}", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test310() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"Attributes must be given in name, value pairs.\");\n // Undeclared exception!\n try { \n xmlEntityRef0.acronym();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void testGetAttribute() {\n String attr = \"attribute\";\n Object result = new Object();\n \n sessionControl.expectAndReturn(session.getAttribute(attr), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getAttribute(attr), result);\n }", "private void CheckForMutuallyExclusiveAttribute() throws BuildException\n {\n if(webAppBaseDir!=null && srcDir!=null) {\n final String msg = lsm.getString(\"MutuallyExclusivelyAttribute\",\n new Object[] {\"srcdir\",\n \"webapp\"});\n throw new BuildException(msg, getLocation());\n }\n }", "@Test\n public void Test10() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Override\n public void visitAttribute(Attribute attribute) {\n }", "@Test(timeout = 4000)\n public void test320() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n // Undeclared exception!\n try { \n xmlEntityRef0.nbsp();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 0, \"O8\", \"\", \"O8\", \"O8\");\n // Undeclared exception!\n try { \n fieldWriter0.visitAttribute((Attribute) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.FieldWriter\", e);\n }\n }", "@Test\n public void testGetAtt_name() {\n VirusAttribute virusAttribute = new VirusAttribute(\"att\", \"desc\", 30);\n String result = virusAttribute.getAtt_name();\n assertEquals(\"att\", result);\n }", "@Test\n public void testConfigurationDeclarationIsReservedOptional()\n {\n checkOldReservedAttribute(\"optional\");\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-946));\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 859, \"dxwb%3tF<\", \"EE}s|u6S|Mp~SkA}y\", \"Invalid IOCase name: \", \"RuntimeVisibleAnnotations\");\n fieldWriter0.visitEnd();\n }", "@SuppressWarnings(\"deprecation\")\n\t@Test\n public void test_TCM__Attribute_setAttributeType_int() {\n final Attribute attribute = new Attribute(\"test\", \"value\");\n\n for(int attributeType = -10; attributeType < 15; attributeType++) {\n if (\n Attribute.UNDECLARED_TYPE.ordinal() <= attributeType &&\n attributeType <= Attribute.ENUMERATED_TYPE.ordinal()\n ) {\n \tattribute.setAttributeType(attributeType);\n \tassertTrue(attribute.getAttributeType().ordinal() == attributeType);\n continue;\n }\n try {\n attribute.setAttributeType(attributeType);\n fail(\"set unvalid attribute type: \"+ attributeType);\n }\n catch(final IllegalDataException ignore) {\n // is expected\n }\n catch(final Exception exception) {\n \texception.printStackTrace();\n fail(\"unknown exception throws: \"+ exception);\n }\n }\n }", "@Ignore // FIXME: park waiting for https://github.com/DICE-UNC/jargon/issues/265\n\t// old form rule marked as iRODS seems to run in the Python rule engine #265,\n\t// also\n\t// filed in https://github.com/irods/irods/issues/3692\n\tpublic void testRuleContainsConditionWithEqualsInAttrib() throws Exception {\n\t\tString testFileName = \"testRuleChecksum1.txt\";\n\t\tString absPath = scratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH);\n\t\tFileGenerator.generateFileOfFixedLengthGivenName(absPath, testFileName, 100);\n\n\t\tString targetIrodsCollection = testingPropertiesHelper\n\t\t\t\t.buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH);\n\n\t\tIRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties);\n\t\tIRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory();\n\n\t\tStringBuilder fileNameAndPath = new StringBuilder();\n\t\tfileNameAndPath.append(absPath);\n\n\t\tfileNameAndPath.append(testFileName);\n\n\t\tIRODSFile targetCollectionFile = accessObjectFactory.getIRODSFileFactory(irodsAccount)\n\t\t\t\t.instanceIRODSFile(targetIrodsCollection);\n\t\ttargetCollectionFile.mkdirs();\n\t\tFile sourceFile = new File(fileNameAndPath.toString());\n\n\t\tDataTransferOperations dto = accessObjectFactory.getDataTransferOperations(irodsAccount);\n\t\tdto.putOperation(sourceFile, targetCollectionFile, null, null);\n\n\t\tStringBuilder ruleBuilder = new StringBuilder();\n\t\truleBuilder.append(\n\t\t\t\t\"myTestRule||acGetIcatResults(*Action,*Condition,*B)##forEachExec(*B,msiGetValByKey(*B,RESC_LOC,*R)##remoteExec(*R,null,msiDataObjChksum(*B,*Operation,*C),nop)##msiGetValByKey(*B,DATA_NAME,*D)##msiGetValByKey(*B,COLL_NAME,*E)##writeLine(stdout,CheckSum of *E/*D at *R is *C),nop)|nop##nop\\n\");\n\t\truleBuilder.append(\"*Action=chksumRescLoc%*Condition=COLL_NAME = '\");\n\n\t\truleBuilder.append(targetIrodsCollection);\n\t\truleBuilder.append(\"'%*Operation=ChksumAll\\n\");\n\t\truleBuilder.append(\"*Action%*Condition%*Operation%*C%ruleExecOut\");\n\t\tString ruleString = ruleBuilder.toString();\n\n\t\tRuleProcessingAO ruleProcessingAO = accessObjectFactory.getRuleProcessingAO(irodsAccount);\n\t\tRuleInvocationConfiguration context = new RuleInvocationConfiguration();\n\t\tcontext.setIrodsRuleInvocationTypeEnum(IrodsRuleInvocationTypeEnum.IRODS);\n\t\tcontext.setEncodeRuleEngineInstance(true);\n\n\t\tIRODSRuleExecResult result = ruleProcessingAO.executeRule(ruleString, null, context);\n\n\t\tAssert.assertNotNull(\"did not get a response\", result);\n\n\t\tAssert.assertEquals(\"did not get results for each output parameter\", 6,\n\t\t\t\tresult.getOutputParameterResults().size());\n\n\t\tString conditionValue = (String) result.getOutputParameterResults().get(\"*Condition\").getResultObject();\n\n\t\tString expectedCondition = \"COLL_NAME = '\" + targetIrodsCollection + \"'\";\n\t\tAssert.assertEquals(\"condition not found\", expectedCondition, conditionValue);\n\n\t}", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \" @\", \"@;3{-{.Zr,[&'oI\");\n Checkbox checkbox1 = new Checkbox(checkbox0, \"@;3{-{.Zr,[&'oI\", \"6F\\\"\");\n // Undeclared exception!\n try { \n checkbox1.script();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testGREENBEA() {\n CuteNetlibCase.doTest(\"GREENBEA.SIF\", \"-1.74990012991E+03\", \"-1.74990012991E+03\", NumberContext.of(7, 4));\n }", "@org.junit.Test(timeout = 10000)\n public void annotated_cf83_failAssert19() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n com.squareup.javapoet.TypeName simpleString = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n // MethodAssertGenerator build local variable\n Object o_3_0 = simpleString.isAnnotated();\n // MethodAssertGenerator build local variable\n Object o_5_0 = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n com.squareup.javapoet.TypeName annotated = simpleString.annotated(NEVER_NULL);\n // MethodAssertGenerator build local variable\n Object o_9_0 = annotated.isAnnotated();\n // StatementAdderMethod cloned existing statement\n annotated.unbox();\n // MethodAssertGenerator build local variable\n Object o_13_0 = annotated.annotated();\n org.junit.Assert.fail(\"annotated_cf83 should have thrown UnsupportedOperationException\");\n } catch (java.lang.UnsupportedOperationException eee) {\n }\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"p\", \"f&vrQc[JH/5XdO5p=S\");\n Map<String, String> map0 = submit0._getXhtmlAttributes();\n assertEquals(1, map0.size());\n }", "public final PythonParser.attr_return attr() throws RecognitionException {\n PythonParser.attr_return retval = new PythonParser.attr_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token set18=null;\n\n PythonTree set18_tree=null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:377:5: ( NAME | AND | AS | ASSERT | BREAK | CLASS | CONTINUE | DEF | DELETE | ELIF | EXCEPT | EXEC | FINALLY | FROM | FOR | GLOBAL | IF | IMPORT | IN | IS | LAMBDA | NOT | OR | ORELSE | PASS | PRINT | RAISE | RETURN | TRY | WHILE | WITH | YIELD )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:\n {\n root_0 = (PythonTree)adaptor.nil();\n\n set18=(Token)input.LT(1);\n if ( input.LA(1)==NAME||(input.LA(1)>=AND && input.LA(1)<=YIELD) ) {\n input.consume();\n if ( state.backtracking==0 ) adaptor.addChild(root_0, (PythonTree)adaptor.create(set18));\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public void test17() {\n //$NON-NLS-1$\n deployBundles(\"test17\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_STATIC_TO_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public static boolean AttributeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AttributeTest\")) return false;\n if (!nextTokenIs(b, K_ATTRIBUTE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, ATTRIBUTE_TEST, null);\n r = consumeTokens(b, 2, K_ATTRIBUTE, L_PAR);\n p = r; // pin = 2\n r = r && report_error_(b, AttributeTest_2(b, l + 1));\n r = p && consumeToken(b, R_PAR) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@Test(timeout = 4000)\n public void test225() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"java.lang.String@000000005\", \"]f '8Drr>Uj1==M2\");\n List<RenderableComponent> list0 = checkbox0._getRenderableChildren();\n assertEquals(\"]f '8Drr>Uj1==M2\", xmlEntityRef0.getComponentId());\n assertNotNull(list0);\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testConfigurationDeclarationIsReservedAt()\n {\n checkOldReservedAttribute(\"at\");\n }" ]
[ "0.6712613", "0.62370354", "0.6219595", "0.6165154", "0.60995674", "0.6029331", "0.59642315", "0.58807003", "0.57574064", "0.5668193", "0.56223226", "0.5581916", "0.5504202", "0.54986465", "0.5486771", "0.54689825", "0.54642344", "0.5453359", "0.5409264", "0.538719", "0.53510153", "0.5346943", "0.53427476", "0.5330843", "0.5323906", "0.5317938", "0.5315097", "0.5287159", "0.528474", "0.52761924", "0.52548295", "0.52482873", "0.5236223", "0.5224269", "0.52175546", "0.51950616", "0.51893514", "0.5188066", "0.51837116", "0.51828426", "0.5180312", "0.51779413", "0.5163442", "0.5162519", "0.5156236", "0.5147275", "0.5129082", "0.512843", "0.510871", "0.5107027", "0.5097501", "0.50967467", "0.50886774", "0.5088256", "0.50851524", "0.5080735", "0.5077711", "0.50699884", "0.5062977", "0.5049393", "0.5040497", "0.5035945", "0.50345564", "0.50329757", "0.50193244", "0.50171447", "0.49977928", "0.49935326", "0.4992909", "0.49853158", "0.497817", "0.49769983", "0.49705958", "0.4970526", "0.49596447", "0.4959365", "0.495218", "0.4950281", "0.49470657", "0.49383187", "0.49353746", "0.49310184", "0.492914", "0.49149725", "0.4914649", "0.49111998", "0.49092662", "0.4908796", "0.49077567", "0.49047297", "0.49005514", "0.48995113", "0.48973697", "0.48957607", "0.48911816", "0.4887697", "0.48873723", "0.48850927", "0.48834667", "0.48757005" ]
0.5266859
30
Test case number: 17 / 1 covered goal: Goal 1. wheel.components.Component.h6()Lwheel/components/Component;: rootBranch
@Test public void test017() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Block block0 = (Block)errorPage0.h6(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "String branch();", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "boolean isBranchTaken();", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "HibBranch getBranch(InternalActionContext ac, HibProject project);", "protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "public void test6() {\n //$NON-NLS-1$\n deployBundles(\"test6\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test\n\tpublic void testBuild() {\n\n\t\tSystem.out.println(\"End\");\n\t}", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void oncoTreeVersionTest() {\n // TODO: test oncoTreeVersion\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "double getBranchProbability();", "private void level6() {\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public RelocateBranch() {\n }", "public Branch() { }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "private void level7() {\n }", "public void getBranchCommand() {\n\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void buildDomeTrue() {\n nextWorkerCell.setLevel(3);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(4, nextWorkerCell.getLevel());\n assertTrue(nextWorkerCell.getIsOccupied());\n }", "@Test\n public void testCreateDependencyTree4() {\n Map<String, Integer> expected = new HashMap<>() {{\n put(\"github.com/test/subproject:0.0.0-00010101000000-000000000000\", 1);\n }};\n try {\n Path projectDir = GO_ROOT.resolve(\"project4\");\n GoTreeBuilder treeBuilder = new GoTreeBuilder(null, projectDir, projectDir.resolve(\"go.mod\").toString(), null, log);\n DepTree dt = treeBuilder.buildTree();\n validateDependencyTreeResults(expected, dt);\n } catch (IOException ex) {\n fail(ExceptionUtils.getStackTrace(ex));\n }\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testUnstableOnlyStableTrue() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(true).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogNotContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Skipping Cobertura coverage report as build was not SUCCESS or better\", run);\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test5() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getContained();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "public static void main(String[] args) {\n\n Building building1 = new Building(\"Building_A\");\n building1.addRoom(new Room(\"Kitchen\", 256, 2));\n try {\n building1.getRoom(\"Kitchen\")\n .addLightBulb(new LightBulbs(25))\n .addFurniture(new Armchair(\"Armchair_1\", 25, 45))\n .addLightBulb(new LightBulbs(58));\n } catch (RoomNotFoundException e) {\n System.out.println(e.getMessage());\n }\n building1.addRoom(new Room(\"Bedroom\", 258, 4));\n try {\n building1.getRoom(\"Bedroom\")\n .addLightBulb(new LightBulbs(684))\n .addLightBulb(new LightBulbs(158))\n .addFurniture(new Table(\"Table\", 45))\n .addFurniture(new Armchair(\"Armchair_2\", 12, 15));\n } catch (RoomNotFoundException e) {\n System.out.println(e.getMessage());\n }\n\n building1.addRoom(new Room(\"Bathroom\", 25, 1));\n if (building1.verifyBuilding() == false) {\n return;\n }\n System.out.println(building1.describe());\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public static void main(String[] args) {\n\n\t\tGitService gitService = new GitServiceImpl();\n\t\tGitHistoryRefactoringMiner miner = new GitHistoryRefactoringMinerImpl();\n\n\t\tRepository repo;\n\t\ttry {\n\t\t\trepo = gitService.cloneIfNotExists(\n\t\t\t\t\t\"/home/steve/Steve/git/commons-rng\",\n\t\t\t\t\t\"https://github.com/apache/commons-rng.git\");\n\t\t\t//\t\t\trepo = gitService.cloneIfNotExists(\n\t\t\t//\t\t\t\t\t\"tmp/refactoring-toy-example\",\n\t\t\t//\t\t\t\t\t\"https://github.com/danilofes/refactoring-toy-example.git\");\n\t\t\t// For all with sample\n\t\t\t//\t\t\tminer.detectAll(repo, \"master\", new RefactoringHandler() {\n\t\t\t//\t\t\t\t @Override\n\t\t\t//\t\t\t\t public void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t//\t\t\t\t System.out.println(\"Refactorings at \" + commitId);\n\t\t\t//\t\t\t\t for (Refactoring ref : refactorings) {\n\t\t\t//\t\t\t\t System.out.println(ref.toString());\n\t\t\t////\t\t\t\t System.out.println(ref.toJSON());\n\t\t\t//\t\t\t\t }\n\t\t\t//\t\t\t\t }\n\t\t\t//\t\t\t\t});\n\t\t\t// For between 2 commits with sample\n\t\t\t//\t\t\t// start commit: 819b202bfb09d4142dece04d4039f1708735019b\n\t\t\t//\t\t\t// end commit: d4bce13a443cf12da40a77c16c1e591f4f985b47\n\t\t\t//\t\t\tminer.detectBetweenCommits(repo, \n\t\t\t//\t\t\t\t\t\"819b202bfb09d4142dece04d4039f1708735019b\", \"d4bce13a443cf12da40a77c16c1e591f4f985b47\",\n\t\t\t//\t\t\t\t\tnew RefactoringHandler() {\n\t\t\t//\t\t\t\t@Override\n\t\t\t//\t\t\t\tpublic void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t//\t\t\t\t\tSystem.out.println(\"Refactorings at \" + commitId);\n\t\t\t//\t\t\t\t\tfor (Refactoring ref : refactorings) {\n\t\t\t//\t\t\t\t\t\t//\t\t\t System.out.println(ref.toString());\n\t\t\t//\t\t\t\t\t\tSystem.out.println(ref.toJSON());\n\t\t\t//\t\t\t\t\t}\n\t\t\t//\t\t\t\t}\n\t\t\t//\t\t\t});\n\n\t\t\t// start commit: 40fd7ad244b350d657ca4f1a9efe667c52697327\n\t\t\t// end commit: 3ca48892811538e911eb3c5bafd60b4d9ca92483\n\t\t\tminer.detectBetweenCommits(repo, \n\t\t\t\t\t\"40fd7ad244b350d657ca4f1a9efe667c52697327\", \"3ca48892811538e911eb3c5bafd60b4d9ca92483\",\n\t\t\t\t\tnew RefactoringHandler() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t\t\tSystem.out.println(\"***********************************************************************************\");\n\t\t\t\t\tSystem.out.println(\"Refactorings at \" + commitId);\n\t\t\t\t\tfor (Refactoring ref : refactorings) {\n\t\t\t\t\t\t// System.out.println(ref.toString());\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(ref.toJSON());\n\t\t\t\t\t\tif (ref instanceof ExtractOperationRefactoring) {\n\t\t\t\t\t\t\tExtractOperationRefactoring refactoring = (ExtractOperationRefactoring)ref;\n\t\t\t\t\t\t\tUMLOperationBodyMapper mapper = refactoring.getBodyMapper();\n\t\t\t\t\t\t\tList<StatementObject> newLeaves = mapper.getNonMappedLeavesT2(); //newly added leaf statements\n\t\t\t\t\t\t\tList<CompositeStatementObject> newComposites = mapper.getNonMappedInnerNodesT2(); //newly added composite statements\n\t\t\t\t\t\t\tList<StatementObject> deletedLeaves = mapper.getNonMappedLeavesT1(); //deleted leaf statements\n\t\t\t\t\t\t\tList<CompositeStatementObject> deletedComposites = mapper.getNonMappedInnerNodesT1(); //deleted composite statements\n\t\t\t\t\t\t\tSystem.out.println(\"newLeaves: \\n\" + newLeaves);\n\t\t\t\t\t\t\tSystem.out.println(\"newComposites: \\n\" + newComposites);\n\t\t\t\t\t\t\tSystem.out.println(\"deletedLeaves: \\n\" + deletedLeaves);\n\t\t\t\t\t\t\tSystem.out.println(\"deletedComposites: \\n\" + deletedComposites);\n\n\t\t\t\t\t\t\tfor(AbstractCodeMapping mapping : mapper.getMappings()) {\n\t\t\t\t\t\t\t\tAbstractCodeFragment fragment1 = mapping.getFragment1();\n\t\t\t\t\t\t\t\tAbstractCodeFragment fragment2 = mapping.getFragment2();\n\t\t\t\t\t\t\t\tSet<Replacement> replacements = mapping.getReplacements();\n\t\t\t\t\t\t\t\tSystem.out.println(\"**************** Replacements: ***********\\n\");\n\t\t\t\t\t\t\t\tfor(Replacement replacement : replacements) {\n\t\t\t\t\t\t\t\t\tString valueBefore = replacement.getBefore();\n\t\t\t\t\t\t\t\t\tString valueAfter = replacement.getAfter();\n\t\t\t\t\t\t\t\t\tReplacementType type = replacement.getType();\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"valueBefore: \" + valueBefore);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"valueAfter: \" + valueAfter);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"type: \" + type);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"***********************************************************************************\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n}", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test55() {\n //$NON-NLS-1$\n deployBundles(\"test55\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "void update(IBranchSpec branch) throws P4JavaException;", "@Test\n public void test3() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n boolean boolean0 = defaultMenuItem0.isLeaf();\n assertEquals(true, boolean0);\n }", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void testAddLinkOkComponent() {\n\t\tSubmenu root = new Submenu(\"root\");\n\t\tAssert.assertNull(root.getParentBean());\n\t\tAssert.assertEquals(\"root\", root.getName());\n\t\tAssert.assertNull(root.getMenuentrys());\n\n\t\tMenuItem item1 = new MenuItem(\"item1\");\n\t\tAssert.assertNull(item1.getParentBean());\n\t\troot.addMenuentry(item1);\n\t\tAssert.assertEquals(1, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, root.getMenuentrys().iterator().next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\n\t\tSubmenu submenu1 = new Submenu(\"submenu1\");\n\t\tAssert.assertNull(submenu1.getParentBean());\n\t\troot.addMenuentry(submenu1);\n\n\t\tIterator<?> iter = root.getMenuentrys().iterator();\n\t\tAssert.assertEquals(2, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, iter.next());\n\t\tAssert.assertSame(submenu1, iter.next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\t\tAssert.assertSame(root, submenu1.getParentBean());\n\t}", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void buildNotDome() {\n nextWorkerCell.setLevel(1);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public UpdateandRemoveBranch() {\n initComponents();\n }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "private void selectBranch () {\n \n TagsNode node = (TagsNode)tagsTree.getLastSelectedPathComponent();\n \n if (node == null) {\n // nothing selected\n }\n else\n if (node == position.getTagsNode()) {\n // If we're already positioned on the selected node, then no\n // need to do anything else (especially since it might set off\n // an endless loop).\n }\n else\n if (node.getNodeType() == TagsNode.ITEM) {\n // System.out.println (\"selectBranch selected item = \" + node.toString());\n boolean modOK = modIfChanged();\n if (modOK) {\n ClubEvent branch = (ClubEvent)node.getTaggable();\n int branchIndex = clubEventList.findByUniqueKey (branch);\n if (branchIndex >= 0) {\n position = clubEventList.positionUsingListIndex (branchIndex);\n position.setTagsNode (node);\n positionAndDisplay();\n } else {\n System.out.println (\"ClubPlanner.selectBranch\");\n System.out.println \n (\"-- Selected a branch from the tree that couldn't be found in the list\");\n System.out.println (\"-- node = \" + node.toString());\n System.out.println (\"-- event = \" + branch.getWhat());\n System.out.println (\"-- branch index = \" + String.valueOf(branchIndex));\n }\n }\n }\n else {\n // Do nothing until an item is selected\n // System.out.println (\"selectBranch selected node = \" + node.toString());\n }\n }", "public static void main(String[] args) {\nint score = 91;\nString grade;\nif (score >90)\n{\n\tgrade = \"A\";\n}\n\n\n\nelse if (score>=80)\n{\n\tgrade = \"B\";\n}\n//THis is to test Git\n//THis is to test Git\n//THis is to test Git2\n//This is to test the brach made by gitdemo\n//Change from GitX\nelse \n{\n\tgrade = \"C\";\n}\nSystem.out.println(grade);\n}", "@Test\n public void test7() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getParent();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testUnstableOnlyStableFalse() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(false).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Cobertura coverage report found.\", run);\n }", "public void test13() {\n //$NON-NLS-1$\n deployBundles(\"test13\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public static Goal[] createEverythingGoals() {\n\t\t// [ & ] <--- rootGoal1\n\t\t// / / \\ \\\n\t\t// P T E M\n\t\t//\n\t\tCompositeGoal rootGoal1 = new CompositeGoal(CompositeGoal.and);\n\t\trootGoal1.addChild(new PuzzleGoal());\n\t\trootGoal1.addChild(new TreasureGoal());\n\t\trootGoal1.addChild(new EnemiesGoal());\n\t\trootGoal1.addChild(new MazeGoal());\n\t\t\n\t\t\n\t\tCompositeGoal subGoal1 = new CompositeGoal(CompositeGoal.and);\n\t\tsubGoal1.addChild(new EnemiesGoal());\n\t\tsubGoal1.addChild(new TreasureGoal());\n\t\tsubGoal1.addChild(new MazeGoal());\n\t\t\n\t\tCompositeGoal subGoal2 = new CompositeGoal(CompositeGoal.and);\n\t\tsubGoal2.addChild(new PuzzleGoal());\n\t\tsubGoal2.addChild(new TreasureGoal());\n\t\tsubGoal2.addChild(subGoal1);\n\t\t\n\t\t// [ | ] <--- rootGoal2\n\t\t// / \\\n\t\t// I [ & ] <---- subGoal2\n\t\t// / | \\\n\t\t// P T [ & ] <---- subGoal1\n\t\t// /|\\\n\t\t// E T M\n\t\tCompositeGoal rootGoal2 = new CompositeGoal(CompositeGoal.or);\n\t\trootGoal2.addChild(new ImpossibleGoal());\n\t\trootGoal2.addChild(subGoal2);\n\n\t\t\n\t\tString goalString = \"\"\n\t\t\t+ \" { \\\"goal\\\": \\\"AND\\\", \\\"subgoals\\\":\\n\"\n\t\t\t+ \" [ { \\\"goal\\\": \\\"exit\\\" },\\n\"\n\t\t\t+ \" { \\\"goal\\\": \\\"AND\\\", \\\"subgoals\\\":\\n\"\n\t\t\t+ \" [ {\\\"goal\\\": \\\"treasure\\\" },\\n\"\n\t\t\t+ \" { \\\"goal\\\": \\\"AND\\\", \\\"subgoals\\\":\\n\"\n\t\t\t+ \" [ {\\\"goal\\\": \\\"enemies\\\" },\\n\"\n\t\t\t+ \" {\\\"goal\\\": \\\"boulders\\\" }\\n\"\n\t\t\t+ \" ]\\n\"\n\t\t\t+ \" }\\n\"\n\t\t\t+ \" ]\\n\"\n\t\t\t+ \" }\\n\"\n\t\t\t+ \" ]\\n\"\n\t\t\t+ \" }\\n\";\n\t\t\n\t\tJSONObject json = new JSONObject(new JSONTokener(goalString));\n\t\tGoal goal3 = Goal.createGoal(json);\n\t\t\n\t\treturn new Goal[]{ rootGoal1, rootGoal2, goal3 };\n\t}", "public void test6() throws Exception {\n //$NON-NLS-1$\n IFolder buildFolder = newTest(\"test6\");\n //$NON-NLS-1$\n String buildXMLPath = buildFolder.getFile(\"build.xml\").getLocation().toOSString();\n Properties properties = new Properties();\n //$NON-NLS-1$ //$NON-NLS-2$\n properties.put(\"reference_location\", buildFolder.getFile(\"before\").getLocation().toOSString());\n //$NON-NLS-1$ //$NON-NLS-2$\n properties.put(\"current_location\", buildFolder.getFile(\"after\").getLocation().toOSString());\n //$NON-NLS-1$\n properties.put(\"report_location\", buildFolder.getLocation().toOSString());\n //$NON-NLS-1$\n runAntScript(buildXMLPath, new String[] { \"run\" }, buildFolder.getLocation().toOSString(), properties);\n //$NON-NLS-1$ //$NON-NLS-2$\n assertFalse(\"allNonApiBundles must not exist\", buildFolder.getFolder(\"allNonApiBundles\").exists());\n //$NON-NLS-1$\n IFolder folder = buildFolder.getFolder(\"deltatest2\");\n //$NON-NLS-1$\n assertTrue(\"deltatest2 folder must exist\", folder.exists());\n //$NON-NLS-1$ //$NON-NLS-2$\n assertTrue(\"report.xml file must be there\", folder.getFile(\"report.xml\").exists());\n }", "@Test\n public void testACFTHasSubComponents() {\n assertThat( hasSubComponents( ACFT ), is( true ) );\n }", "@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"Submitted Fourth project -branch 2 shelve\");\r\n\t}", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "@Test\n public void test090() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Vi_5aV\", \"Vi_5aV\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.br();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void test13() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setDepth(0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n assertEquals(0, defaultMenuItem0.getDepth());\n }", "@Test\n public void testDependencyEvolutionOnJavaComplete() {\n Depinder depinder = new Depinder(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\testFingerprints.json\");\n\n DepinderConfiguration.getInstance().setProperty(DepinderConstants.ROOT_FOLDER, ROOT_FOLDER);\n depinder.analyzeProject(ROOT_FOLDER, \"master\", false);\n\n DependencyRegistry dependencyRegistry = depinder.getDependencyRegistry();\n\n String dependencyID = \"Java Util, External Libraries\";\n Dependency dependency = dependencyRegistry.getById(dependencyID)\n .orElseThrow(() -> new IllegalArgumentException(dependencyID));\n\n// Set<TechnologySnapshot> snapshots = dependencyEvolutionAnalyzer.dependencyValueForCommits(dependency);\n//\n// Path filePath = Paths.get(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\test_results.json\");\n// try {\n// writeSnapshotsToFile(snapshots, filePath);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n }", "@Override\n public void bfs() {\n\n }", "@Test\n public void testParallelScan() throws Exception {\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"Convoluted\");\n job.setDefinition(new CpsFlowDefinition(\n \"echo 'first'\\n\" +\n \"def steps = [:]\\n\" +\n \"steps['1'] = {\\n\" +\n \" echo 'do 1 stuff'\\n\" +\n \"}\\n\" +\n \"steps['2'] = {\\n\" +\n \" echo '2a'\\n\" +\n \" echo '2b'\\n\" +\n \"}\\n\" +\n \"parallel steps\\n\" +\n \"echo 'final'\",\n true));\n\n /* Flow structure (ID - type)\n 2 - FlowStartNode (BlockStartNode)\n 3 - Echostep\n 4 - ParallelStep (StepStartNode) (start branches)\n 6 - ParallelStep (StepStartNode) (start branch 1), ParallelLabelAction with branchname=1\n 7 - ParallelStep (StepStartNode) (start branch 2), ParallelLabelAction with branchname=2\n 8 - EchoStep, (branch 1) parent=6\n 9 - StepEndNode, (end branch 1) startId=6, parentId=8\n 10 - EchoStep, (branch 2) parentId=7\n 11 - EchoStep, (branch 2) parentId = 10\n 12 - StepEndNode (end branch 2) startId=7 parentId=11,\n 13 - StepEndNode (close branches), parentIds = 9,12, startId=4\n 14 - EchoStep\n 15 - FlowEndNode (BlockEndNode)\n */\n\n WorkflowRun b = r.assertBuildStatusSuccess(job.scheduleBuild2(0));\n FlowExecution exec = b.getExecution();\n Collection<FlowNode> heads = b.getExecution().getCurrentHeads();\n\n AbstractFlowScanner scanner = new LinearScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 9, 8, 6, 4, 3, 2);\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n\n // Depth first scanner and with blacklist\n scanner = new DepthFirstScanner();\n scanner.setup(heads);\n\n // Compatibility test for ordering\n FlowTestUtils.assertNodeOrder(\"FlowGraphWalker\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n FlowTestUtils.assertNodeOrder(\"Depth first\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n scanner.setup(Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\")));\n FlowTestUtils.assertNodeOrder(\"Depth-first scanner from inside parallels\", scanner, 9, 8, 6, 4, 3, 2, 12, 11, 10, 7);\n\n // We're going to test the ForkScanner in more depth since this is its natural use\n scanner = new ForkScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13,\n 12, 11, 10, 7,// One parallel\n 9, 8, 6, // other parallel\n 4, 3, 2); // end bit\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n // Test forkscanner midflow\n scanner.setup(exec.getNode(\"14\"));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 14, 13,\n 12, 11, 10, 7, // Last parallel\n 9, 8, 6, // First parallel\n 4, 3, 2); // end bit\n\n // Test forkscanner inside a parallel\n List<FlowNode> startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 12, 11, 10, 7, 4, 3, 2);\n\n startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"11\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 11, 10, 7, 4, 3, 2);\n\n\n // Filtering at different points within branches\n List<FlowNode> blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"7\"));\n Assert.assertEquals(4, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n Assert.assertEquals(4, scanner.filteredNodes(heads, Collections.singletonList(exec.getNode(\"4\")), FlowTestUtils.MATCH_ECHO_STEP).size());\n blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"10\"));\n Assert.assertEquals(3, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n }", "@Test\n public void testTRK1HasSubComponents() {\n assertThat( hasSubComponents( TRK1_WITH_SUB_COMP ), is( true ) );\n }", "public void test17() {\n //$NON-NLS-1$\n deployBundles(\"test17\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_STATIC_TO_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n void getMandatoryDeepSuccessors () {\n\n }", "@Test\n public void buildAgainTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n workerHephaestus.specialPower(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n\n }", "@Test\n public void testASSY2HasSubComponents() {\n assertThat( hasSubComponents( ASSY2_WITH_SUB_COMP ), is( true ) );\n }", "private void editPipelineDefAddBranchNode(PipelineDefinition pipelineDef) {\n PipelineDefinitionNode newPipelineNode = new PipelineDefinitionNode(\n expectedModuleDef3.getName());\n pipelineDef.getRootNodes()\n .get(0)\n .getNextNodes()\n .add(newPipelineNode);\n newPipelineNode.setUnitOfWork(new ClassWrapper<UnitOfWorkTaskGenerator>(\n new TestUowTaskGenerator()));\n newPipelineNode.setStartNewUow(false);\n }", "@Test\n public void testCreateDependencyTree3() {\n Map<String, Integer> expected = new HashMap<>() {{\n put(\"github.com/test/subproject:0.0.0-00010101000000-000000000000\", 1);\n }};\n try {\n Path projectDir = GO_ROOT.resolve(\"project3\");\n GoTreeBuilder treeBuilder = new GoTreeBuilder(null, projectDir, projectDir.resolve(\"go.mod\").toString(), null, log);\n DepTree dt = treeBuilder.buildTree();\n validateDependencyTreeResults(expected, dt);\n } catch (IOException ex) {\n fail(ExceptionUtils.getStackTrace(ex));\n }\n }", "@Test\n public void Test14() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertEquals(54760, component.hashCode());\n }", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "public abstract void bepaalGrootte();" ]
[ "0.6450329", "0.5779702", "0.5713845", "0.56315804", "0.55707985", "0.5543466", "0.55136204", "0.5489952", "0.54854804", "0.544328", "0.54121333", "0.5386154", "0.5371486", "0.53707", "0.5369555", "0.5350874", "0.5343873", "0.5336944", "0.5332336", "0.5330052", "0.5303282", "0.52987856", "0.529018", "0.52794445", "0.5241123", "0.52404517", "0.52381897", "0.5236062", "0.5235687", "0.52340597", "0.52310693", "0.52267814", "0.52216375", "0.52188206", "0.5214186", "0.52045244", "0.5194491", "0.5192035", "0.5188961", "0.51885664", "0.5180166", "0.51633674", "0.51449424", "0.51426935", "0.5141805", "0.51213914", "0.5116132", "0.5110672", "0.5092779", "0.508544", "0.5084826", "0.5083597", "0.5082807", "0.50780064", "0.507714", "0.50762326", "0.50618476", "0.50606376", "0.50560176", "0.5052983", "0.5051912", "0.504954", "0.50478536", "0.50460464", "0.50436956", "0.50389487", "0.503116", "0.50306904", "0.50253725", "0.5024688", "0.5011719", "0.50115335", "0.5008521", "0.5006215", "0.5006065", "0.49986258", "0.4998321", "0.49930757", "0.49877885", "0.49848086", "0.49812937", "0.49762297", "0.4973444", "0.4973205", "0.4965171", "0.49627993", "0.49620667", "0.49608704", "0.4960809", "0.49593878", "0.49573737", "0.49545586", "0.49503008", "0.4944585", "0.4944469", "0.49378303", "0.49367443", "0.49360612", "0.4932838", "0.4929742", "0.49203315" ]
0.0
-1
Test case number: 18 / 1 covered goal: Goal 1. wheel.components.Component.p(Ljava/lang/Object;)Lwheel/components/Component;: rootBranch
@Test public void test018() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); TextInput textInput0 = new TextInput(errorPage0, (String) null, (String) null); ElExpression elExpression0 = new ElExpression((String) null); // Undeclared exception! try { Component component0 = textInput0.p((Object) elExpression0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Can't add components to a component that is not an instance of IContainer. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "String branch();", "double getBranchProbability();", "public Branch() { }", "public RelocateBranch() {\n }", "boolean isBranchTaken();", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public void getBranchCommand() {\n\n }", "HibBranch getBranch(InternalActionContext ac, HibProject project);", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalculation = this.getRectanglesToConsiderForBranchingVarCalculation( );\r\n \r\n //collect 0 direction refcounts into this map\r\n Map<String, Integer> zeroVar_RefCountMap = new HashMap<String, Integer> () ;\r\n //and one diirection refconts into this map\r\n Map<String, Integer> oneVar_RefCountMap = new HashMap<String, Integer> () ;\r\n \r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle =null;\r\n for (Rectangle rect: rectanglesToConsiderForBranchingVarCalculation){\r\n variablesUsedForBranchingInThisRectangle = getVariablesUsedForBranchingInThisRectangle (rect);\r\n if (variablesUsedForBranchingInThisRectangle.size()>ZERO) {\r\n this.updateVariableRefCounts(zeroVar_RefCountMap, oneVar_RefCountMap, variablesUsedForBranchingInThisRectangle) ;\r\n }else {\r\n System.err.print(\"trying to branch a node which should have been marked infeasible\" );\r\n exit(ONE);\r\n }\r\n }\r\n \r\n \r\n //now find the highest refcount var, no matter its direction\r\n int highZeroFreq = zeroVar_RefCountMap.isEmpty()?ZERO:Collections.max( zeroVar_RefCountMap.values());\r\n int highOneFreq = oneVar_RefCountMap.isEmpty()? ZERO: Collections.max(oneVar_RefCountMap.values()) ;\r\n \r\n //we need to find the selected var's refcount on the other side\r\n int selectedVarRefCountOnOtherSide = ZERO;\r\n \r\n int totalRects = getNumberOfRects(this.myInfeasibleRectanglesList) ;\r\n \r\n if (highZeroFreq>highOneFreq) {\r\n result.varName=getHighestFreqVar (zeroVar_RefCountMap,highZeroFreq ) ;\r\n result.coeff=highZeroFreq;\r\n selectedVarRefCountOnOtherSide= oneVar_RefCountMap.get( result.varName)==null? ZERO : oneVar_RefCountMap.get( result.varName);\r\n //this is how many rects will survive on either side\r\n childRectCounts.zeroSideCount = totalRects - selectedVarRefCountOnOtherSide;\r\n childRectCounts.oneSideCount=totalRects -highZeroFreq ;\r\n \r\n } else {\r\n result.varName=getHighestFreqVar (oneVar_RefCountMap,highOneFreq ) ;\r\n result.coeff=highOneFreq;\r\n selectedVarRefCountOnOtherSide= zeroVar_RefCountMap.get( result.varName)==null? ZERO : zeroVar_RefCountMap.get( result.varName);\r\n \r\n childRectCounts.zeroSideCount = totalRects - highOneFreq;\r\n childRectCounts.oneSideCount=totalRects - selectedVarRefCountOnOtherSide;\r\n }\r\n \r\n return result;\r\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "abstract void depComponent(DepComponent depComponent);", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "public abstract void bepaalGrootte();", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void solution() {\n\t\t\n\t}", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "protected abstract void mo3471b(ProgressBar progressBar);", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "private void level7() {\n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "void update(IBranchSpec branch) throws P4JavaException;", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public GitBranch(String aName) { _name = aName; }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\r\n protected int compareTo (BasicComponent o)\r\n {\n return 0;\r\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public Branch(E e) {\n\t\tinfo = e;\n\t\tisLeaf = true;\n\t}", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public interface IBranchFunctionDef {\n /**\n * Verifies that the branch function is valid\n * @return If the usage of the branch function is valid\n */\n boolean verify(@Nullable IBranchFunctionDef parent, ISkriptFunctionDef function, ICodeDef codeDef);\n\n /**\n * Gets the variables of the def\n * @return Def's variables\n */\n List<IVariableDef> getVariables();\n\n /**\n * Sets up the variables of the def\n * @param factory Variable factory\n */\n void setupVariables(IVariableFactory factory);\n}", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public final void a() {\n /*\n r25 = this;\n r1 = r25\n int r0 = r25.getAndIncrement()\n if (r0 == 0) goto L_0x0009\n return\n L_0x0009:\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.flowable.cq$b<T>[]> r2 = r1.e\n java.lang.Object r0 = r2.get()\n io.reactivex.internal.operators.flowable.cq$b[] r0 = (io.reactivex.internal.operators.flowable.cq.b[]) r0\n r3 = 1\n r4 = r0\n r5 = 1\n L_0x0014:\n java.lang.Object r0 = r1.h\n io.reactivex.internal.b.j<T> r6 = r1.j\n if (r6 == 0) goto L_0x0023\n boolean r8 = r6.isEmpty()\n if (r8 == 0) goto L_0x0021\n goto L_0x0023\n L_0x0021:\n r8 = 0\n goto L_0x0024\n L_0x0023:\n r8 = 1\n L_0x0024:\n boolean r0 = r1.a(r0, r8)\n if (r0 == 0) goto L_0x002b\n return\n L_0x002b:\n if (r8 != 0) goto L_0x0156\n int r0 = r4.length\n int r9 = r4.length\n r12 = 0\n r13 = 0\n r14 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n L_0x0036:\n r16 = -9223372036854775808\n if (r12 >= r9) goto L_0x0053\n r7 = r4[r12]\n long r18 = r7.get()\n int r20 = (r18 > r16 ? 1 : (r18 == r16 ? 0 : -1))\n if (r20 == 0) goto L_0x004e\n long r10 = r7.c\n long r10 = r18 - r10\n long r10 = java.lang.Math.min(r14, r10)\n r14 = r10\n goto L_0x0050\n L_0x004e:\n int r13 = r13 + 1\n L_0x0050:\n int r12 = r12 + 1\n goto L_0x0036\n L_0x0053:\n r9 = 1\n if (r0 != r13) goto L_0x0093\n java.lang.Object r0 = r1.h\n java.lang.Object r7 = r6.poll() // Catch:{ all -> 0x005e }\n goto L_0x0075\n L_0x005e:\n r0 = move-exception\n r6 = r0\n io.reactivex.c.b.throwIfFatal(r6)\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.cancel()\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.error(r6)\n r1.h = r0\n r7 = 0\n L_0x0075:\n if (r7 != 0) goto L_0x0079\n r6 = 1\n goto L_0x007a\n L_0x0079:\n r6 = 0\n L_0x007a:\n boolean r0 = r1.a(r0, r6)\n if (r0 == 0) goto L_0x0081\n return\n L_0x0081:\n int r0 = r1.i\n if (r0 == r3) goto L_0x0090\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.request(r9)\n L_0x0090:\n r6 = 1\n goto L_0x0165\n L_0x0093:\n r0 = r8\n r8 = 0\n L_0x0095:\n long r11 = (long) r8\n int r13 = (r11 > r14 ? 1 : (r11 == r14 ? 0 : -1))\n if (r13 >= 0) goto L_0x0139\n java.lang.Object r0 = r1.h\n java.lang.Object r13 = r6.poll() // Catch:{ all -> 0x00a1 }\n goto L_0x00b8\n L_0x00a1:\n r0 = move-exception\n r13 = r0\n io.reactivex.c.b.throwIfFatal(r13)\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.cancel()\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.error(r13)\n r1.h = r0\n r13 = 0\n L_0x00b8:\n if (r13 != 0) goto L_0x00bc\n r7 = 1\n goto L_0x00bd\n L_0x00bc:\n r7 = 0\n L_0x00bd:\n boolean r0 = r1.a(r0, r7)\n if (r0 == 0) goto L_0x00c4\n return\n L_0x00c4:\n if (r7 != 0) goto L_0x0135\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.getValue(r13)\n int r11 = r4.length\n r12 = 0\n r13 = 0\n L_0x00cd:\n if (r12 >= r11) goto L_0x0103\n r3 = r4[r12]\n long r22 = r3.get()\n int r24 = (r22 > r16 ? 1 : (r22 == r16 ? 0 : -1))\n if (r24 == 0) goto L_0x00f1\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n int r24 = (r22 > r20 ? 1 : (r22 == r20 ? 0 : -1))\n r22 = r6\n r23 = r7\n if (r24 == 0) goto L_0x00eb\n long r6 = r3.c\n long r6 = r6 + r9\n r3.c = r6\n L_0x00eb:\n org.b.c<? super T> r3 = r3.f8109a\n r3.onNext(r0)\n goto L_0x00fb\n L_0x00f1:\n r22 = r6\n r23 = r7\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n r13 = 1\n L_0x00fb:\n int r12 = r12 + 1\n r6 = r22\n r7 = r23\n r3 = 1\n goto L_0x00cd\n L_0x0103:\n r22 = r6\n r23 = r7\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n int r8 = r8 + 1\n java.lang.Object r0 = r2.get()\n io.reactivex.internal.operators.flowable.cq$b[] r0 = (io.reactivex.internal.operators.flowable.cq.b[]) r0\n if (r13 != 0) goto L_0x0120\n if (r0 == r4) goto L_0x0119\n goto L_0x0120\n L_0x0119:\n r6 = r22\n r0 = r23\n r3 = 1\n goto L_0x0095\n L_0x0120:\n if (r8 == 0) goto L_0x0133\n int r3 = r1.i\n r4 = 1\n if (r3 == r4) goto L_0x0133\n java.util.concurrent.atomic.AtomicReference<org.b.d> r3 = r1.g\n java.lang.Object r3 = r3.get()\n org.b.d r3 = (org.b.d) r3\n long r6 = (long) r8\n r3.request(r6)\n L_0x0133:\n r4 = r0\n goto L_0x0165\n L_0x0135:\n r23 = r7\n r0 = r23\n L_0x0139:\n if (r8 == 0) goto L_0x014c\n int r3 = r1.i\n r6 = 1\n if (r3 == r6) goto L_0x014d\n java.util.concurrent.atomic.AtomicReference<org.b.d> r3 = r1.g\n java.lang.Object r3 = r3.get()\n org.b.d r3 = (org.b.d) r3\n r3.request(r11)\n goto L_0x014d\n L_0x014c:\n r6 = 1\n L_0x014d:\n r7 = 0\n int r3 = (r14 > r7 ? 1 : (r14 == r7 ? 0 : -1))\n if (r3 == 0) goto L_0x0157\n if (r0 == 0) goto L_0x0165\n goto L_0x0157\n L_0x0156:\n r6 = 1\n L_0x0157:\n int r0 = -r5\n int r5 = r1.addAndGet(r0)\n if (r5 == 0) goto L_0x0168\n java.lang.Object r0 = r2.get()\n r4 = r0\n io.reactivex.internal.operators.flowable.cq$b[] r4 = (io.reactivex.internal.operators.flowable.cq.b[]) r4\n L_0x0165:\n r3 = 1\n goto L_0x0014\n L_0x0168:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.reactivex.internal.operators.flowable.cq.c.a():void\");\n }", "@Override\n\tpublic String[] goPreviosBranch(String[] currentBranch) {\n\t\treturn null;\n\t}", "@Test\n public void testTripleParallel() throws Exception {\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"TripleParallel\");\n job.setDefinition(new CpsFlowDefinition(\n \"echo 'test stage'\\n\"+ // Id 3, Id 2 before that has the FlowStartNode\n \"parallel 'unit':{\\n\" + // Id 4 starts parallel, Id 7 is the block start for the unit branch\n \" echo \\\"Unit testing...\\\"\\n\" + // Id 10\n \"},'integration':{\\n\" + // Id 11 is unit branch end, Id 8 is the branch start for integration branch\n \" echo \\\"Integration testing...\\\"\\n\" + // Id 12\n \"}, 'ui':{\\n\" + // Id 13 in integration branch end, Id 9 is branch start for UI branch\n \" echo \\\"UI testing...\\\"\\n\" + // Id 14\n \"}\", // Node 15 is UI branch end node, Node 16 is Parallel End node, Node 17 is FlowEndNode\n true));\n WorkflowRun b = r.assertBuildStatusSuccess(job.scheduleBuild2(0));\n FlowExecution exec = b.getExecution();\n ForkScanner f = new ForkScanner();\n List<FlowNode> heads = exec.getCurrentHeads();\n f.setup(heads);\n TestVisitor visitor = new TestVisitor();\n f.visitSimpleChunks(visitor, new BlockChunkFinder());\n sanityTestIterationAndVisiter(heads);\n\n List<TestVisitor.CallEntry> parallels = visitor.calls.stream()\n .filter(\n predicateForCallEntryType(TestVisitor.CallType.PARALLEL_BRANCH_START)\n .or(\n predicateForCallEntryType(TestVisitor.CallType.PARALLEL_BRANCH_END)))\n .collect(Collectors.toList());\n Assert.assertEquals(6, parallels.size());\n\n // Visiting from partially completed branches\n // Verify we still get appropriate parallels callbacks for a branch end\n // even if in-progress and no explicit end node\n ArrayList<FlowNode> ends = new ArrayList<>();\n ends.add(exec.getNode(\"11\"));\n ends.add(exec.getNode(\"12\"));\n ends.add(exec.getNode(\"14\"));\n Assert.assertEquals(new DepthFirstScanner().allNodes(ends).size(),\n new ForkScanner().allNodes(ends).size());\n visitor = new TestVisitor();\n f.setup(ends);\n f.visitSimpleChunks(visitor, new BlockChunkFinder());\n sanityTestIterationAndVisiter(ends);\n\n // Specifically test parallel structures\n parallels = visitor.calls.stream()\n .filter(\n predicateForCallEntryType(TestVisitor.CallType.PARALLEL_BRANCH_START)\n .or(\n predicateForCallEntryType(TestVisitor.CallType.PARALLEL_BRANCH_END)))\n .collect(Collectors.toList());\n Assert.assertEquals(6, parallels.size());\n Assert.assertEquals(18, visitor.calls.size());\n\n // Test the least common ancestor implementation with triplicate\n FlowNode[] branchHeads = {exec.getNode(\"7\"), exec.getNode(\"8\"), exec.getNode(\"9\")};\n ArrayDeque<ForkScanner.ParallelBlockStart> starts = f.leastCommonAncestor(new HashSet<>(Arrays.asList(branchHeads)));\n Assert.assertEquals(1, starts.size());\n ForkScanner.ParallelBlockStart pbs = starts.pop();\n Assert.assertEquals(exec.getNode(\"4\"), pbs.forkStart);\n Assert.assertEquals(3, pbs.unvisited.size());\n Assert.assertTrue(pbs.unvisited.contains(exec.getNode(\"7\")));\n Assert.assertTrue(pbs.unvisited.contains(exec.getNode(\"8\")));\n Assert.assertTrue(pbs.unvisited.contains(exec.getNode(\"9\")));\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "private Solution() { }", "private Solution() { }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "@Test\n public void test3() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n boolean boolean0 = defaultMenuItem0.isLeaf();\n assertEquals(true, boolean0);\n }", "@Test\n public void testParallelScan() throws Exception {\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"Convoluted\");\n job.setDefinition(new CpsFlowDefinition(\n \"echo 'first'\\n\" +\n \"def steps = [:]\\n\" +\n \"steps['1'] = {\\n\" +\n \" echo 'do 1 stuff'\\n\" +\n \"}\\n\" +\n \"steps['2'] = {\\n\" +\n \" echo '2a'\\n\" +\n \" echo '2b'\\n\" +\n \"}\\n\" +\n \"parallel steps\\n\" +\n \"echo 'final'\",\n true));\n\n /* Flow structure (ID - type)\n 2 - FlowStartNode (BlockStartNode)\n 3 - Echostep\n 4 - ParallelStep (StepStartNode) (start branches)\n 6 - ParallelStep (StepStartNode) (start branch 1), ParallelLabelAction with branchname=1\n 7 - ParallelStep (StepStartNode) (start branch 2), ParallelLabelAction with branchname=2\n 8 - EchoStep, (branch 1) parent=6\n 9 - StepEndNode, (end branch 1) startId=6, parentId=8\n 10 - EchoStep, (branch 2) parentId=7\n 11 - EchoStep, (branch 2) parentId = 10\n 12 - StepEndNode (end branch 2) startId=7 parentId=11,\n 13 - StepEndNode (close branches), parentIds = 9,12, startId=4\n 14 - EchoStep\n 15 - FlowEndNode (BlockEndNode)\n */\n\n WorkflowRun b = r.assertBuildStatusSuccess(job.scheduleBuild2(0));\n FlowExecution exec = b.getExecution();\n Collection<FlowNode> heads = b.getExecution().getCurrentHeads();\n\n AbstractFlowScanner scanner = new LinearScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 9, 8, 6, 4, 3, 2);\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n\n // Depth first scanner and with blacklist\n scanner = new DepthFirstScanner();\n scanner.setup(heads);\n\n // Compatibility test for ordering\n FlowTestUtils.assertNodeOrder(\"FlowGraphWalker\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n FlowTestUtils.assertNodeOrder(\"Depth first\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n scanner.setup(Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\")));\n FlowTestUtils.assertNodeOrder(\"Depth-first scanner from inside parallels\", scanner, 9, 8, 6, 4, 3, 2, 12, 11, 10, 7);\n\n // We're going to test the ForkScanner in more depth since this is its natural use\n scanner = new ForkScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13,\n 12, 11, 10, 7,// One parallel\n 9, 8, 6, // other parallel\n 4, 3, 2); // end bit\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n // Test forkscanner midflow\n scanner.setup(exec.getNode(\"14\"));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 14, 13,\n 12, 11, 10, 7, // Last parallel\n 9, 8, 6, // First parallel\n 4, 3, 2); // end bit\n\n // Test forkscanner inside a parallel\n List<FlowNode> startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 12, 11, 10, 7, 4, 3, 2);\n\n startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"11\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 11, 10, 7, 4, 3, 2);\n\n\n // Filtering at different points within branches\n List<FlowNode> blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"7\"));\n Assert.assertEquals(4, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n Assert.assertEquals(4, scanner.filteredNodes(heads, Collections.singletonList(exec.getNode(\"4\")), FlowTestUtils.MATCH_ECHO_STEP).size());\n blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"10\"));\n Assert.assertEquals(3, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n }", "Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(expected = NullPointerException.class)\n public void Test02() {\n component = new DamageEffectComponent(null, 3, 20);\n }", "protected abstract void mo3469a(ProgressBar progressBar);", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public ArrayList <Branch> createBranch(){\n\t\tPVector dir1 =PVector.sub(loc_end,loc_begin);\n\t\tPVector dir2 =PVector.sub(loc_end,loc_begin);\n\t\t//println(\"loc_newEnd1: \"+loc_end.x+\" : \"+loc_end.y);\n\t\t//println(\"loc_newEnd1: \"+dir1.x+\" : \"+dir1.y);\n\t\tdir1.rotate(random(PI/4,PI/5));\n\t\tdir1.mult(0.67f);\n\t\tPVector loc_newEnd1 = PVector.add(loc_end,dir1);\n\t\tBranch branch_a = new Branch(this.loc_end,loc_newEnd1);\n\t\t\n\t\tdir2.rotate(random(-PI/4,-PI/5));\n\t\tdir2.mult(0.67f);\n\t\tPVector loc_newEnd2 = PVector.add(loc_end,dir2);\n\t\tBranch branch_b = new Branch(this.loc_end,loc_newEnd2);\n\n\t\tArrayList<Branch> bs = new ArrayList<Branch>() ;\n\t\tbs.add(branch_a);\n\t\tbs.add(branch_b);\n\t\tcomplete=true;\n\n\t\t\n\t\t//println(\"loc_newEnd2: \"+loc_newEnd2.x+\" : \"+loc_newEnd2.y);\n\t\t\n\t\treturn bs;\n\n\t}", "@Override\n public void bfs() {\n\n }", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "@Test\n public void test090() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Vi_5aV\", \"Vi_5aV\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.br();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "public interface ComponentProcessor {\n\n /**\n * Starts processing components for the rootnode, this shall call {@link #processNode(Node, float)} on all of the\n * nodes\n * that shall be processed.\n * Perform init if needed in this method\n * \n * @param root\n * @param delta\n */\n public void processRoot(RootNode root, float delta);\n\n /**\n * Processes the non-culled logic nodes\n * \n * @param node\n * @param delta\n */\n public void processNode(Node node, float delta);\n}", "@Override\n public void func_104112_b() {\n \n }", "public void branchChainTo(Label label) {\n // do nothing by default\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "protected Component getTestTarget(){\n return tester.parent;\n }", "@Test\n public void oncoTreeVersionTest() {\n // TODO: test oncoTreeVersion\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test\r\n\tpublic void test()\r\n\t{\n\t\t\r\n\t\tCreatePlungeStrategy frame = new CreatePlungeStrategy(path1, retractPlane); //manda os parametros path e retractplane pra execucao\r\n\r\n\t\tfor(;;);\r\n\t}", "public static void main(String[] args) {\n\n Boom myBoom = new Boom();\n Boom.Tree myTree = myBoom.new Tree();\n myTree.hasIdeas();\n }", "public interface PathComponent\n{\n /** \n * Get the analysis bits for this path component, as defined in the WalkerFactory.\n * @return One of WalkerFactory#BIT_DESCENDANT, etc.\n */\n public int getAnalysisBits();\n\n}", "@Test\n public void youCanCreateALoopFromPlatesFromACount() {\n // inputs\n VertexLabel runningTotalLabel = new VertexLabel(\"runningTotal\");\n VertexLabel stillLoopingLabel = new VertexLabel(\"stillLooping\");\n VertexLabel valueInLabel = new VertexLabel(\"valueIn\");\n\n // intermediate\n VertexLabel oneLabel = new VertexLabel(\"one\");\n VertexLabel conditionLabel = new VertexLabel(\"condition\");\n\n // outputs\n VertexLabel plusLabel = new VertexLabel(\"plus\");\n VertexLabel loopLabel = new VertexLabel(\"loop\");\n VertexLabel valueOutLabel = new VertexLabel(\"valueOut\");\n\n // base case\n DoubleVertex initialSum = ConstantVertex.of(0.);\n BooleanVertex tru = ConstantVertex.of(true);\n DoubleVertex initialValue = ConstantVertex.of(0.);\n\n int maximumLoopLength = 100;\n\n Plates plates = new PlateBuilder<Integer>()\n .withInitialState(SimpleVertexDictionary.backedBy(ImmutableMap.of(\n plusLabel, initialSum,\n loopLabel, tru,\n valueOutLabel, initialValue)))\n .withTransitionMapping(ImmutableMap.of(\n runningTotalLabel, plusLabel,\n stillLoopingLabel, loopLabel,\n valueInLabel, valueOutLabel\n ))\n .count(maximumLoopLength)\n .withFactory((plate) -> {\n // inputs\n DoubleVertex runningTotal = new DoubleProxyVertex(runningTotalLabel);\n BooleanVertex stillLooping = new BooleanProxyVertex(stillLoopingLabel);\n DoubleVertex valueIn = new DoubleProxyVertex(valueInLabel);\n plate.addAll(ImmutableSet.of(runningTotal, stillLooping, valueIn));\n\n // intermediate\n DoubleVertex one = ConstantVertex.of(1.);\n BooleanVertex condition = new BernoulliVertex(0.5);\n plate.add(oneLabel, one);\n plate.add(conditionLabel, condition);\n\n // outputs\n DoubleVertex plus = runningTotal.plus(one);\n BooleanVertex loopAgain = stillLooping.and(condition);\n DoubleVertex result = If.isTrue(loopAgain).then(plus).orElse(valueIn);\n plate.add(plusLabel, plus);\n plate.add(loopLabel, loopAgain);\n plate.add(valueOutLabel, result);\n })\n .build();\n\n\n DoubleVertex previousPlus = initialSum;\n BooleanVertex previousLoop = tru;\n DoubleVertex previousValueOut = initialValue;\n\n for (Plate plate : plates) {\n DoubleVertex runningTotal = plate.get(runningTotalLabel);\n BooleanVertex stillLooping = plate.get(stillLoopingLabel);\n DoubleVertex valueIn = plate.get(valueInLabel);\n\n DoubleVertex one = plate.get(oneLabel);\n BooleanVertex condition = plate.get(conditionLabel);\n\n DoubleVertex plus = plate.get(plusLabel);\n BooleanVertex loop = plate.get(loopLabel);\n DoubleVertex valueOut = plate.get(valueOutLabel);\n\n assertThat(runningTotal.getParents(), contains(previousPlus));\n assertThat(stillLooping.getParents(), contains(previousLoop));\n assertThat(valueIn.getParents(), contains(previousValueOut));\n\n assertThat(one.getParents(), is(empty()));\n assertThat(condition, hasParents(contains(allOf(\n hasNoLabel(),\n instanceOf(ConstantDoubleVertex.class)\n ))));\n\n assertThat(plus.getParents(), containsInAnyOrder(runningTotal, one));\n assertThat(loop.getParents(), containsInAnyOrder(condition, stillLooping));\n assertThat(valueOut.getParents(), containsInAnyOrder(loop, valueIn, plus));\n\n previousPlus = plus;\n previousLoop = loop;\n previousValueOut = valueOut;\n }\n\n\n DoubleVertex output = plates.asList().get(maximumLoopLength - 1).get(valueOutLabel);\n\n for (int firstFailure : new int[]{0, 1, 2, 10, 99}) {\n for (Plate plate : plates) {\n BooleanVertex condition = plate.get(conditionLabel);\n condition.setAndCascade(true);\n }\n BooleanVertex condition = plates.asList().get(firstFailure).get(conditionLabel);\n condition.setAndCascade(false);\n Double expectedOutput = new Double(firstFailure);\n assertThat(output, VertexMatchers.hasValue(expectedOutput));\n }\n }", "public synchronized BDD behaviourBDD(BIPComponent component) throws BIPEngineException {\n\n\t\tBDD componentBehaviourBDD = engine.getBDDManager().zero();\n\t\tBehaviour behaviour = wrapper.getBehaviourByComponent(component);\n\t\tif (behaviour == null) {\n\t\t\ttry {\n\t\t\t\tlogger.error(\"Behaviour of component {} is null\", component.getId());\n\t\t\t\tthrow new BIPEngineException(\"Behaviour of component \" + component.getId() + \" is null.\");\n\t\t\t} catch (BIPEngineException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t\tList<Port> componentPorts = behaviour.getEnforceablePorts();\n\t\tList<String> componentStates = new ArrayList<String>(behaviour.getStates());\n\t\tHashtable<String, BDD> portToBDD = componentToPortToBDD.get(component);\n\t\tHashtable<String, BDD> stateToBDD = componentToStateToBDD.get(component);\n\n\t\tBDD tmp;\n\t\tfor (String componentState : componentStates) {\n\t\t\tlogger.trace(\"BE: Component State: \" + componentState);\n\n\t\t\tBDD onlyState = engine.getBDDManager().one().and(stateToBDD.get(componentState));\n\n\t\t\tfor (String otherState : componentStates) {\n\t\t\t\tif (!componentState.equals(otherState)) {\n\t\t\t\t\tlogger.trace(\"BE: Negated State: \" + otherState);\n\t\t\t\t\ttmp = onlyState.and(stateToBDD.get(otherState).not());\n\t\t\t\t\tonlyState.free();\n\t\t\t\t\tonlyState = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSet<Port> statePorts = behaviour.getStateToPorts().get(componentState);\n\t\t\tif (!statePorts.isEmpty()) {\n\t\t\t\tfor (Port port : statePorts) {\n\t\t\t\t\tlogger.trace(\"BE: Component state port: \" + port);\n\t\t\t\t\tBDD ports = engine.getBDDManager().one().and(onlyState);\n\t\t\t\t\ttmp = ports.and(portToBDD.get(port.getId()));\n\t\t\t\t\tports.free();\n\t\t\t\t\tports = tmp;\n\t\t\t\t\tfor (Port otherPort : componentPorts) {\n\t\t\t\t\t\tif (!port.getId().equals(otherPort.getId())) {\n\t\t\t\t\t\t\tlogger.trace(\"BE: Negated ports: \" + otherPort);\n\t\t\t\t\t\t\tports.andWith(portToBDD.get(otherPort.getId()).not());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcomponentBehaviourBDD.orWith(ports);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (Port otherPort : componentPorts) {\n\t\t\t\t\tlogger.trace(\"BE: All negated ports: \" + otherPort);\n\t\t\t\t\tonlyState.andWith(portToBDD.get(otherPort.getId()).not());\n\t\t\t\t}\n\t\t\t\tcomponentBehaviourBDD.orWith(onlyState);\n\t\t\t}\n\t\t}\n\n\t\tBDD allNegatedPortsBDD = engine.getBDDManager().one();\n\t\tfor (Port port : componentPorts) {\n\t\t\tallNegatedPortsBDD.andWith(portToBDD.get(port.getId()).not());\n\t\t}\n\t\treturn componentBehaviourBDD.orWith(allNegatedPortsBDD);\n\n\t}", "@Test\n public void testModuloExpectedUse() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(3);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(1, ps.pop());\n }", "public StructureVillagePieces.Village buildComponent(StructureVillagePieces.PieceWeight parPieceWeight, StructureVillagePieces.Start parStart, List<StructureComponent> parPiecesList, Random parRand, int parMinX, int parMinY, int parMinZ, EnumFacing parFacing, int parType) {\n/* 50 */ System.out.println(\"TekHouse6 buildComponent() at \" + parMinX + \", \" + parMinY + \", \" + parMinZ);\n/* */ \n/* 52 */ StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(parMinX, parMinY, parMinZ, 0, 0, 0, 9, 7, 12, parFacing);\n/* 53 */ return (canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(parPiecesList, structureboundingbox) == null) ? (StructureVillagePieces.Village)new TekHouse6(parStart, parType, parRand, structureboundingbox, parFacing) : null;\n/* */ }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "private void selectBranch () {\n \n TagsNode node = (TagsNode)tagsTree.getLastSelectedPathComponent();\n \n if (node == null) {\n // nothing selected\n }\n else\n if (node == position.getTagsNode()) {\n // If we're already positioned on the selected node, then no\n // need to do anything else (especially since it might set off\n // an endless loop).\n }\n else\n if (node.getNodeType() == TagsNode.ITEM) {\n // System.out.println (\"selectBranch selected item = \" + node.toString());\n boolean modOK = modIfChanged();\n if (modOK) {\n ClubEvent branch = (ClubEvent)node.getTaggable();\n int branchIndex = clubEventList.findByUniqueKey (branch);\n if (branchIndex >= 0) {\n position = clubEventList.positionUsingListIndex (branchIndex);\n position.setTagsNode (node);\n positionAndDisplay();\n } else {\n System.out.println (\"ClubPlanner.selectBranch\");\n System.out.println \n (\"-- Selected a branch from the tree that couldn't be found in the list\");\n System.out.println (\"-- node = \" + node.toString());\n System.out.println (\"-- event = \" + branch.getWhat());\n System.out.println (\"-- branch index = \" + String.valueOf(branchIndex));\n }\n }\n }\n else {\n // Do nothing until an item is selected\n // System.out.println (\"selectBranch selected node = \" + node.toString());\n }\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "@Override\n\tpublic void testVehicle() {\n\t\t\n\t}", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "void z_piracy()\n {\n //branch (!f_setup.piracy);\n\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.br();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Any_1\", component0.getComponentId());\n }", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"/c[~rNl!Ma-\", \"kIh 4+,VlA$]12\");\n ElExpression elExpression0 = new ElExpression(\"J>w9x0K2Bs|BOY\");\n // Undeclared exception!\n try { \n submit0.eval(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testDependencyEvolutionOnJavaComplete() {\n Depinder depinder = new Depinder(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\testFingerprints.json\");\n\n DepinderConfiguration.getInstance().setProperty(DepinderConstants.ROOT_FOLDER, ROOT_FOLDER);\n depinder.analyzeProject(ROOT_FOLDER, \"master\", false);\n\n DependencyRegistry dependencyRegistry = depinder.getDependencyRegistry();\n\n String dependencyID = \"Java Util, External Libraries\";\n Dependency dependency = dependencyRegistry.getById(dependencyID)\n .orElseThrow(() -> new IllegalArgumentException(dependencyID));\n\n// Set<TechnologySnapshot> snapshots = dependencyEvolutionAnalyzer.dependencyValueForCommits(dependency);\n//\n// Path filePath = Paths.get(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\test_results.json\");\n// try {\n// writeSnapshotsToFile(snapshots, filePath);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n }" ]
[ "0.61772215", "0.5906793", "0.57654417", "0.5711881", "0.5640435", "0.5557887", "0.55438787", "0.5455628", "0.5447079", "0.5355605", "0.5344369", "0.53416693", "0.53356665", "0.5304454", "0.5295998", "0.52842414", "0.5233004", "0.5206519", "0.5187106", "0.5173265", "0.5169232", "0.5164667", "0.51598024", "0.51520467", "0.5103239", "0.5096133", "0.5091554", "0.5079046", "0.5047997", "0.5044493", "0.5028837", "0.5027099", "0.50252527", "0.50133944", "0.50128645", "0.50112116", "0.5008545", "0.4994826", "0.49775374", "0.49759832", "0.49747142", "0.49713174", "0.49672666", "0.4967062", "0.4965539", "0.49644873", "0.49644768", "0.49640635", "0.49631768", "0.4963139", "0.4961327", "0.49561992", "0.49527854", "0.49509606", "0.4941679", "0.4939251", "0.49388584", "0.49294916", "0.49294916", "0.4927345", "0.49231228", "0.4921238", "0.49191186", "0.49161625", "0.49156317", "0.4912228", "0.49099612", "0.49061403", "0.4899378", "0.48979643", "0.48897532", "0.48889932", "0.4886759", "0.48855257", "0.48834068", "0.48797113", "0.48696363", "0.48660266", "0.48647508", "0.48624474", "0.48621866", "0.48616758", "0.48466355", "0.4839169", "0.48359483", "0.48326972", "0.4829034", "0.482731", "0.48238212", "0.481993", "0.48197302", "0.48188743", "0.48182407", "0.48174113", "0.48160577", "0.4813573", "0.4812426", "0.48117915", "0.48036894", "0.48020416", "0.47988844" ]
0.0
-1
Test case number: 19 / 1 covered goal: Goal 1. wheel.components.Component.numberInput(Ljava/lang/String;)Lwheel/components/FormElement;: rootBranch
@Test public void test019() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); // Undeclared exception! try { FormElement formElement0 = errorPage0.numberInput("$.{"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Form elements can be created only by compoents that are attached to a form component. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test110() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n List<RenderableComponent> list0 = errorPage0._getRenderableChildren();\n NumberInput numberInput0 = new NumberInput(errorPage0, \"$.{\", \"$.{\", \"$.{\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.h1();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test338() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.numberInput(\"iW5kQK2`y/GM^W\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test\n public void test098() throws Throwable {\n NumberInput numberInput0 = new NumberInput((Component) null, \"\", \"m\", \"m\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.param((CharSequence) \"m\", (CharSequence) \"\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test096() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ErrorPage errorPage1 = (ErrorPage)errorPage0.clasS((CharSequence) \"`ymkk& +k:vlY+SnG\");\n Block block0 = (Block)errorPage0.samp();\n NumberInput numberInput0 = new NumberInput(errorPage0, \"`ymkk& +k:vlY+SnG\", \"`ymkk& +k:vlY+SnG\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.meta();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.numberInput(\"3X{L(\", (CharSequence) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test\n public void testGetNumberCheckedOut() {\n }", "@Test(timeout = 4000)\n public void test204() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"x0\");\n NumberInput numberInput0 = new NumberInput(xmlEntityRef0, \"q\", \"q\");\n Component component0 = numberInput0.getParent();\n assertEquals(\"x0\", component0.getComponentId());\n }", "@Test\n public void MyTest() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n System.out.println(\"Expected Result is : \" + expectedResult);\n }", "protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }", "@Test\n public void testFactorialValid()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"7\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"5040\"));\n //NKD: Would prefer for this to be calculated by some function, rather than a magic number\n //However, java.lang.Math doesn't have fibonacci or factorial functions AFAIK\n }", "@Test\n public void testShouldString123WhenInputIsInteger123() {\n int given = 123;\n\n // When: Call numberToString method\n String actual = Kata.numberToString(given);\n\n // Then:\n assertEquals(\"123\", actual);\n }", "@Test\n public void shouldAbleToInputNumericCharactersInAmountOwedOnTradeField() {\n\n//1. Enter 1 in the Amount Owed on Trade field\n//2. Enter 12 in the Amount Owed on Trade field\n//3. Enter 123 in the Amount Owed on Trade field\n//4. Enter 1234 in the Amount Owed on Trade field\n//5. Enter 12345 in the Amount Owed on Trade field\n//6. Enter 123456 in the Amount Owed on Trade field\n//7. Enter 1234567 in the Amount Owed on Trade field\n//6. Enter 12345678 in the Amount Owed on Trade field\n//6. Enter 12345678 in the Amount Owed on Trade field\n\n }", "@Test\n public void testDigits() {\n final String result = calc.type(\"1 + 2 - 3\")\n .press_equalBtn()\n .result();\n\n Assert.assertEquals(result, \"0\");\n }", "@Test\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try {\n FormElement formElement0 = errorPage0.numberInput(\"2CVo`z1\", (CharSequence) \"2CVo`z1\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "@Test\n public void shouldAbleToInputNumericCharactersInTradeInValueField() {\n\n//1. Enter 1 in the Trade-In Value field\n//2. Enter 12 in the Trade-In Value field\n//3. Enter 123 in the Trade-In Value field\n//4. Enter 1234 in the Trade-In Value field\n//5. Enter 12345 in the Trade-In Value field\n//6. Enter 123456 in the Trade-In Value field\n//7. Enter 1234567 in the Trade-In Value field\n//6. Enter 12345678 in the Trade-In Value field\n//6. Enter 12345678 in the Trade-In Value field\n\n }", "@Test\r\n\tpublic void testInput1() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"1299.99\"), 3, \"food\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"1591.58\"));\r\n\t}", "@Test\n public void test071() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n NumberInput numberInput0 = new NumberInput(submit0, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.tt();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void testFactorialInvalidInteger()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"0\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n }", "@Test\r\n\tpublic void testInput2() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"5432.00\"), 1, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"6199.81\"));\r\n\t}", "@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }", "@Test(timeout = 4000)\n public void test190() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"org.mvel.conversion.IntegerCH$10\");\n TextInput textInput0 = new TextInput(xmlEntityRef0, \"org.mvel.conversion.IntegerCH$10\", \"org.mvel.conversion.IntegerCH$10\");\n // Undeclared exception!\n try { \n textInput0._getTopLevelComponent(true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tpublic void testInputWithMoreNumbers() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\tsb.append(i);\n\t\t\tif (i <100) {\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\tassertEquals(\"Many numbers in input string\", 5050L, calculator.calculeteSum(sb.toString()).longValue());\n\t}", "@Test(dependsOnMethods = {\"shouldBeAbleToClick72Months\"})\n public void shouldBeAbleToInputNumericCharactersInInterestRateField() {\n //1. Enter 6 in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"6\");\n //2. Enter 11 in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"11\");\n }", "public void setGivenNum(double input) {\n givenNum = input;\n }", "public static void main(String[] args) {\n\t\t TextInput input = new NumericInput();\n\t\t input.add('1');\n\t\t input.add('a');\n\t\t input.add('0');\n\t\t System.out.println(input.getValue());\n\n}", "@Test\n public void testFactorialInvalidNonInteger()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"hello\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "public void SetCheckoutRegistrationBuildingnumber(String housenumber){\r\n\t\tString Hosuenumber = getValue(housenumber);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration Building number should be entered as \"+Hosuenumber);\r\n\t\ttry{\r\n\r\n\t\t\tsendKeys(locator_split(\"checkoutregistrationbuildingnumber\"),Hosuenumber);\r\n\t\t\tSystem.out.println(\"Registration Building number is entered as \"+Hosuenumber);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Building number is entered as \"+Hosuenumber);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration Building number is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutregistrationbuildingnumber\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test\r\n\tpublic void testInput3() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"12456.95\"), 4, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"13707.63\"));\r\n\t}", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public static void main(String[] args){\n int number = scn.nextInt();\n \n \n int a = num(number);\n System.out.println(a);\n \n \n }", "@Test\n public void testCanReadNumber() throws Exception {\n MatcherAssert.assertThat(\n new TestJenkins().jobs().iterator().next().builds().iterator()\n .next().number(), new IsEqual<>(\"#1\")\n );\n }", "@Test(dependsOnMethods = {\"shouldNotBeAbleToInputSpecialCharactersInPriceField\"})\n public void shouldAbleToInputNumericCharactersInDownPaymentField() {\n //1. Enter 1 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1\");\n //2. Enter 12 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12\");\n //3. Enter 123 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"123\");\n //4. Enter 1234 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1234\");\n //5. Enter 12345 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12345\");\n //6. Enter 123456 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"123456\");\n //7. Enter 1234567 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1234567\");\n //6. Enter 12345678 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12345678\");\n\n }", "public void EnterQuantityandAdditem(String itemnumber, String quantity){\r\n\t\tString ItemNumber = getValue(itemnumber);\r\n\t\tString Quantity = getValue(quantity);\r\n\t\tint ItemNumberint = Integer.parseInt(ItemNumber);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+ \"Click \" + ItemNumberint + \" Compare check box\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Quantity should be entered and item should be added\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtSearchQuantity\"));\r\n\t\t\tList<WebElement> ele1 = listofelements(locator_split(\"txtSearchAddtoCart\"));\r\n\t\t\tSystem.out.println(\"Total no of elements for Quantity \"+ ele.size());\r\n\t\t\tSystem.out.println(\"Total no of elements for Add to Cart buttons \"+ ele1.size());\r\n\t\t\tfor(int i=0; i<ItemNumberint+1; i++){\r\n\t\t\t\tif(ItemNumberint==i+1 && i==0){\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(ItemNumberint==i+1 && i==1){\r\n\t\t\t\t\tele.get(i+2).click();\r\n\t\t\t\t\tele.get(i-1).click();\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(ItemNumberint==i+1 && i>1){\r\n\t\t\t\t\tele.get(i+1).click();\r\n\t\t\t\t\tele.get(i-1).click();\r\n\t\t\t\t\tele.get(i).click();\r\n\t\t\t\t\tele.get(i).clear();\r\n\t\t\t\t\tele.get(i).sendKeys(Quantity);\r\n\t\t\t\t\tele1.get(i).click();\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tSystem.out.println(\"Enterd Quantity \"+Quantity+\" for the item No \"+ItemNumber);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Itemsnumber/Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSearchQuantity\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSearchAddtoCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Both the Quantity elements and Add to Cart items are not equal\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void integral_isCorrect() {\n }", "@Test\n public void testShouldStringMinus123WhenInputIsIntegerMinus123() {\n int given = -123;\n\n // When: Call numberToString method\n String actual = Kata.numberToString(given);\n\n // Then:\n assertEquals(\"-123\", actual);\n }", "@Test(timeout = 4000)\n public void test363() throws Throwable {\n Form form0 = new Form(\"\");\n Hidden hidden0 = new Hidden(form0, \"\", \"http://xmlpull.org/v1/doc/properties.html#serializer-indentation\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"m\", \"|vX5SVqPGwc\\\"A\");\n FileInput fileInput0 = new FileInput(checkbox0, \"t^1NqOG<Le$*VZ|gi\", \"|vX5SVqPGwc\\\"A\");\n NumberInput numberInput0 = new NumberInput(fileInput0, (String) null, \"uYP|23O>D{38I\", (CharSequence) null);\n // Undeclared exception!\n try { \n numberInput0.small();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void testFibonacciInvalidInteger()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"0\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "@Test\n public void test() {\n Assert.assertEquals(0.83648556F, Problem232.solve(/* change signature to provide required inputs */));\n }", "@Test(dependsOnMethods = {\"shouldNotBeAbleToInputSpecialCharactersInInterestRateField\"})\n public void shouldAbleToInputNumericCharactersInPriceField() {\n //1. Enter 1 in the Price field\n calculatePaymentPage.setPriceInput(\"1\");\n //2. Enter 12 in the Price field\n calculatePaymentPage.setPriceInput(\"12\");\n //3. Enter 123 in the Price field\n calculatePaymentPage.setPriceInput(\"123\");\n //4. Enter 1234 in the Price field\n calculatePaymentPage.setPriceInput(\"1234\");\n //5. Enter 12345 in the Price field\n calculatePaymentPage.setPriceInput(\"12345\");\n //6. Enter 123456 in the Price field\n calculatePaymentPage.setPriceInput(\"123456\");\n //7. Enter 1234567 in the Price field\n calculatePaymentPage.setPriceInput(\"1234567\");\n //6. Enter 12345678 in the Price field\n calculatePaymentPage.setPriceInput(\"12345678\");\n }", "public abstract void inputChange( int value );", "@Test\n public void testFactorialMin()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"1\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n //NKD: Would prefer for this to be calculated by some function, rather than a magic number\n //However, java.lang.Math doesn't have fibonacci or factorial functions AFAIK\n }", "public void SetCheckoutRegistrationHousenumber(String hosuenumber){\r\n\t\tString Hosuenumber = getValue(hosuenumber);\r\n\t\tString countrygroup_houseno = \"Netherland\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Hosuenumber);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration House number should be entered as '\"+Hosuenumber+\"' \");\r\n\t\ttry{\r\n\t\t\tif((countrygroup_houseno).contains(countries.get(countrycount))){\r\n\t\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationhousenumber\"),Hosuenumber);\r\n\t\t\t\tSystem.out.println(\"Registration house number is entered as '\"+Hosuenumber+\"' \");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Registration house number is entered as '\"+Hosuenumber+\"' \");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{ \r\n\t\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationaddress\"),Hosuenumber);\r\n\t\t\t\tSystem.out.println(\"Registration Address is entered as \"+Hosuenumber);\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Address is entered as \"+Hosuenumber);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration house number is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtcheckoutregistrationhousenumber\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testFibonacciInvalidNonInteger()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"hello\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "public static void main(String[] args) {\nAddNumbers a=new AddNumbers();\r\na.getInput();\r\na.addNumbers();\r\nint output=a.addNumbers();\r\nSystem.out.println(\"OUTPUT:\");\r\nSystem.out.println(\"The addition of n numbers is: \"+output);\r\n\t}", "public void setInputNum(Integer inputNum) {\r\n this.inputNum = inputNum;\r\n }", "@Test(timeout = 4000)\n public void test294() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.numberInput(\"org.apache.commons.io.filefilter.WildcardFilter\", (CharSequence) \"org.apache.commons.io.filefilter.WildcardFilter\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public abstract void process(int input);", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void test_doubleANumber() {\n\t\t\n\t}", "public abstract void input();", "@Test\n public void test() {\n Assert.assertEquals(3L, Problem162.solve(/* change signature to provide required inputs */));\n }", "protected abstract int isValidInput();", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.numberInput(\"c0vJ@0?9*iT5S>\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public static void main(String[] args) {\n int num = 14;\n int output = 6;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 1 PASS\" : \"X CASE 1 FAIL\");\n\n // TEST CASE 2: Input: num = 8 Output: 4\n num = 8;\n output = 4;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 2 PASS\" : \"X CASE 2 FAIL\");\n\n // TEST CASE 3: Input: num = 123 Output: 12\n num = 123;\n output = 12;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 3 PASS\" : \"X CASE 3 FAIL\");\n }", "public void InkAndTonnerSearchQty(String itemnum){ \r\n\t\tString searchitem = getValue(itemnum);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+searchitem);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Quantity should be entered in quantity box for the first item in searched result.\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\twaitforElementVisible(locator_split(\"txtInkSearchQty\"));\r\n\t\t\tclearWebEdit(locator_split(\"txtInkSearchQty\"));\r\n\t\t\tsendKeys(locator_split(\"txtInkSearchQty\"), searchitem);\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Quantity is entered in quantity box for the first item in searched result.\");\r\n\t\t\tSystem.out.println(\"Quantity is entered in quantity box for the first item in searched result. - \"+searchitem+\"\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Quantity is not entered in quantity box for the first item in searched result. \"+elementProperties.getProperty(\"txtInkSearchQty\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtInkSearchQty\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Test\n\tpublic void test_StringCalculator_WhenOneNumberIsGiven_Then_ReturnSameNumber() {\n\t\tAssert.assertEquals(1,calc.Add(\"1\"));\n\t}", "@Test\n\tpublic void convertTotest1() {\n\t\tMainPanel testConvertToInt = new MainPanel(9);\n\t\tint getNumNeighbors1Result = testConvertToInt.getNumNeighbors1(2,2);\n int getNumNeighbors0Result = testConvertToInt.getNumNeighbors0(2,2);\n assertEquals(getNumNeighbors1Result, getNumNeighbors0Result);\n\t}", "@When(\"^User adds two integers and selects Enter$\")\r\n public void user_adds_two_integers_and_selects_enter() throws Throwable {\n \tdivideClass divideInts = new divideClass(); // declaring the object\r\n \tdivideInts.main(new String[]{\"divideSum\"});// calling the method. {\r\n \t}", "@Override\n\tpublic void input() {\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int no_cases = scanner.nextInt();\n for (int i = 0; i < no_cases; i++) {\n int n = scanner.nextInt();\n int[] input = new int[n];\n for(int j = 0; j < n; j++) {\n input[j] = scanner.nextInt();\n }\n System.out.printf(\"%.2f\\n\", getExpectedValue(input));\n }\n }", "com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();", "@Test\r\n public void testDigit() {\r\n System.out.println(\"Testing digits\");\r\n \r\n // Declare a sample test digit.\r\n String enterDigit = \"3\";\r\n \r\n // Instantiate the CalcBrain object.\r\n CalcBrain instance = new CalcBrain();\r\n \r\n String expectedResult = \"3\";\r\n \r\n // Call the CalcBrain method digit to insert \"3\"\r\n String result = instance.digit(enterDigit);\r\n \r\n // Check that the \"3\" is returned from CalcBrain's digit method.\r\n assertEquals(expectedResult, result); \r\n }", "@Test\r\n\t\tpublic void testCompileAddition() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"putobject\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint result = 0;\n\t\tint number = scanner.nextInt();\n\t\t\n\t\tif(number <= 99) {\n\t\t\tSystem.out.print(number);\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif(number == 1000){\n\t\t\t\tnumber = 999;\n\t\t\t}\n\t\t\t\n\t\t\tresult = 99 + getResult(number);\n\t\t\t\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "@Test\n\tpublic void test_StringCalculator_WhenNumberMoreThanThousantUsed_Then_ReturnTheOtherNumber() {\n\t\tAssert.assertEquals(2 ,calc.Add(\"1002,2\"));\n\t}", "public static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint tc = sc.nextInt();\n\n\t\tfor (int num = 1; num <= tc; num++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tString str = \"\";\n\t\t\tint arr[] = new int[n];\n\t\t\tboolean flag = false;\n\t\t\tboolean visit[]=new boolean[1001];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = sc.nextInt();\n\t\t\t\tif (!flag && arr[i] == 0)\n\t\t\t\t\tflag = true;\n\t\t\t\tstr += arr[i];\n\t\t\t}\n\t\t\tif (flag) {\n\t\t\t\tint ans = 0;\n\t\t\t\tboolean p=false;\n\t\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\t\tfor (int j = 0; j + i <= n; j++) {\n\t\t\t\t\t\t\tint tmp = Integer.parseInt(str.substring(j, j + i));\n\t\t\t\t\t\t\tvisit[tmp]=true;\n\t\t\t\t\t}\n\t\t\t\t\tint amount=(int)Math.pow(10, i);\n\t\t\t\t\tfor(int k=0;k<amount;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!visit[k])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tans=k;\n\t\t\t\t\t\t\tp=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(p)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"#\" + num + \" \" + ans);\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"#\" + num + \" \" + 0);\n\t\t}\n\t}", "public ParamTest(String inputNumber, Boolean expectedResult) {\n this.inputNumber = inputNumber;\n this.expectedResult = expectedResult;\n }", "private int takeChangeInput() {\n\t\tSystem.out.println(\"Enter desired change amount\");\n\n\t\tString amount = scan.next();\n\t\twhile (!amount.matches(\"\\\\d+\")) {\n\t\t\tSystem.out.println(\"Invalid input, please try again.\");\n\t\t\tamount = scan.next();\n\t\t}\n\n\t\tint change = Integer.valueOf(amount);\n\n\t\treturn change;\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testBOEING1() {\n CuteNetlibCase.doTest(\"BOEING1.SIF\", \"-335.2135675071266\", \"286.9746573387996\", NumberContext.of(7, 4));\n }", "public static void main(String[] args) {\n\t\tint a,b;\r\n\t\tSystem.out.println(\"to check den is zero\");\r\n\t\tScanner scanner =new Scanner(System.in);\r\n\t\ta = scanner.nextInt();\r\n\t\tb=scanner.nextInt();\r\n\t\tnumber(a,b);\r\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test258() throws Throwable {\n Form form0 = new Form(\"E5TYvW\");\n DateInput dateInput0 = new DateInput(form0, \"E5TYvW\", \"? fOYd~2\", \"? fOYd~2\");\n dateInput0._setParent(form0);\n assertEquals(\"E5TYvW\", form0.getComponentId());\n }", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void outfromNumGradeTest2(){\r\n\t\tPointGrade.fromNumGrade(101);\r\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testGROW22() {\n CuteNetlibCase.doTest(\"GROW22.SIF\", \"-1.608343364825636E8\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void isInputDataValidTest() {\n boolean invoke = Deencapsulation.invoke(modificationFibonacci, \"isInputDataValid\", \"1\");\n assertTrue(invoke);\n }", "@Test\n\tpublic void gcdOfFiboNumsTest() {\n\n\t\tAssert.assertTrue(ifn.gcdOfFiboNums(3, 12) == 2);\n\t}", "public void OrderByitemNumber(String item){\r\n\t\tString orderbyitemnumber = getValue(item);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+orderbyitemnumber);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- OrderByitemnumber should be Added\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"txtItemno\"));\r\n\t\t\tsendKeys(locator_split(\"txtItemno\"), orderbyitemnumber);\r\n\t\t\tsleep(2000);\r\n\t\t\tclick(locator_split(\"btnAddtoList\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tclick(locator_split(\"btnAdditemtocart\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"orderByitemnumber is added.\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- OrderByitemnumber is added\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- orderByitemnumber is not added\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtItemno\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnAdditemtocart\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\r\n\t\t}\r\n\r\n\t}", "private void processNumber() {\r\n\t\tString number = extractNumber();\r\n\r\n\t\tif ((!number.equals(\"1\")) && (!number.equals(\"0\"))) {\r\n\t\t\tthrow new LexerException(String.format(\"Unexpected number: %s.\", number));\r\n\t\t}\r\n\r\n\t\ttoken = new Token(TokenType.CONSTANT, number.equals(\"1\"));\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint root[]=new int[n+1];\n\t\tfor(int i=2;i<=n;i++)\n\t\t\troot[i]=sc.nextInt();\n\t\tnode tree[]=new node[n+1];\n\t\tfor(int i=0;i<=n;i++)\n\t\t\ttree[i]=new node();\n\t\tfor(int i=2;i<=n;i++)\n\t\t\ttree[root[i]].child.add(i);\n\t\tint q=sc.nextInt();\n\t\twhile(q-->0)\n\t\t{\n\t\t\tint u=sc.nextInt();\n\t\t\tint v=sc.nextInt();\n\t\t\tLinkedList<Integer> list=turnOn(tree, v);\n\t\t\tlong sum=0;\n\t\t\tfor(int i=0,s=list.size();i<s;i++)\n\t\t\t{\n\t\t\t\tint d=distance(root, u, list.get(i));\n\t\t\t\tsum=sum+d*d;\n\t\t\t}\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t\t\n\t}", "public void solution() {\n\t\t\n\t}", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.print(\"Enter a binary number:\");\r\n\t\tString input = GetInput();\r\n\r\n\t\t// if CheckInputCorrect(input) is false then the user is asked to re\r\n\t\t// input a number\r\n\r\n\t\twhile (!CheckInputCorrect(input)) {\r\n\t\t\tSystem.out.println(input + \" is not a binary number\");\r\n\t\t\tSystem.out.print(\"Enter a binary number:\");\r\n\t\t\tinput = GetInput();\r\n\t\t}\r\n\r\n\t\t// Once it is verified that the number that was input was binary the\r\n\t\t// input is stored in the variable numberInput. Then BinaryToNumber() is\r\n\t\t// called.\r\n\t\tString numberInput = input;\r\n\t\t// BinaryToNumber(numberInput);\r\n\t\tSystem.out.println(\"The base ten form of \" + input + \" is \"\r\n\t\t\t\t+ BinaryToNumber(numberInput));\r\n\r\n\t}", "@Test\n\tpublic void testDigitTestReplacementInValid() {\n\t\tString input = \"0\";\n\t\tString actualOutput = GeneralUtility.digitHasReplacement(input);\n\t\tAssert.assertEquals(null, actualOutput);\n\t}", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Test\n public void testFibonacciValid()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"7\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"13\"));\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter Number to check is number Armstrong\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tint input = scan.nextInt();\r\n\t\tint temp = input;\r\n\r\n\t\tString_Assignment_Ex5 ex5 = new String_Assignment_Ex5();\r\n\t\tex5.checkArmStrongNumber(temp, input);\r\n\r\n\t\tSystem.out.println(\"Enter number to find all Armstrong number in that range\");\r\n\t\tint range = scan.nextInt();\r\n\t\tfor (int i = 0; i <= range; i++) {\r\n\t\t\ttemp = i;\r\n\t\t\tex5.findArmStrongNumber(temp, i);\r\n\t\t}\r\n\t\tscan.close();\r\n\t}", "public void VerifyCouponfieldsinCheckout(){\r\n\t\tString countriess1 = \"Denmark,France,PresselSwitzerland,Norway,Spain,BernardFrance,,BernardBelgium,PresselAustria,UK,PresselGermany\";\r\n\t\tString countriess2 = \"Germany,Spain\";\r\n\t\tString countriess3 = \"Netherland,Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cupon Input txt box and Apply button should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess1.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput3inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"3 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"3 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess2.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"1 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"1 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess3.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"2 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"2 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"incorret country is entered in method for -\"+countries.get(countrycount));\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Incorrect country is entered in method for -\"+countries.get(countrycount)+\" or\"\r\n\t\t\t\t\t+ \" Element not found\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t\tthrow new Error(\"Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t}\r\n\r\n\t}", "public void testInferNumber1a() throws Exception {\n assertType(\"10 \", 0, 2, \"java.lang.Integer\");\n }", "@Test\n\tpublic void testNumberType() throws Exception {\n\t\tassertThat(0, is(0));\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testGROW15() {\n CuteNetlibCase.doTest(\"GROW15.SIF\", \"-1.068709412935753E8\", \"0.0\", NumberContext.of(7, 4));\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint num = sc.nextInt();\r\n\t\tProblem3 pObj = new Problem3();\r\n\t\tint result = pObj.productDigits(num);\r\n\t\tSystem.out.println((result>-1)?result:\"Invalid Input\");\r\n\t}", "public void testShouldReturnSumOfTwoNumber() throws TriangleException {\n Addition ad=new Addition();\n Assert.assertEquals(Constant.ERROR001, ad.additionNumber(2, 3));\n }", "@Test\n @Grade(4)\n public void testBinaryConversion_basicNumbers() {\n assertEquals(\"0\", decimalToBinary(0));\n assertEquals(\"1\", decimalToBinary(1));\n }", "@Test(timeout = 4000)\n public void test165() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.buttonInput(\"XYD6eL5K7VD|_+{7`{$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public void EnterQtyInSku(String itemnum){ \r\n\t\tString searchitem = getValue(itemnum);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+searchitem);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Quantity should be entered in the quantity box\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\twaitforElementVisible(locator_split(\"txtSkuPageQty\"));\r\n\t\t\tclearWebEdit(locator_split(\"txtSkuPageQty\"));\r\n\t\t\tsendKeys(locator_split(\"txtSkuPageQty\"), searchitem);\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Quantity is entered in the quantity box\");\r\n\t\t\tSystem.out.println(\"Quantity is entered in the quantity box - \"+searchitem+\" is entered\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Quantity is not entered in the quantity box \"+elementProperties.getProperty(\"txtSkuPageQty\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSkuPageQty\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testValidInput() {\n\t\t\n\t\tString normalInput = \"1357.459\";\n\t\tString germanInput = \"1357,459\";\n\t\tBigDecimal expectedOutput = new BigDecimal(normalInput);\n\t\t\n\t\t// normal input\n\t\tfor( final CellProcessor p : Arrays.asList(processor, processor2, processorChain, processorChain2) ) {\n\t\t\tassertExecution(p, normalInput, expectedOutput);\n\t\t}\n\t\t\n\t\t// german input (\",\" instead of \".\" as decimal symbol)\n\t\tfor( final CellProcessor p : Arrays.asList(processor3, processorChain3) ) {\n\t\t\tassertExecution(p, germanInput, expectedOutput);\n\t\t}\n\t}", "public void VerifyNoofItemsSelectedandPrice(String price, String noitems){\r\n\t\tString Price = getValue(price);\r\n\t\tString items[]= getValue(noitems).split(\",\",2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- price should be updated\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtTotalItems\"));\r\n\t\t\tString noofitems= getText(ele.get(Integer.valueOf(items[0])-1));\r\n\t\t\tString Pr= getText(locator_split(\"txtpriceinFrequentlybrought\"));\r\n\t\t\tif(Pr.contains(Price)&items[1].equalsIgnoreCase(noofitems)){\r\n\t\t\t\tSystem.out.println(\"Number of items selected are \"+noofitems+\" and price is \"+Price);\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Number of items selected are \"+noofitems+\" and price is \"+Price);\r\n\t\t\t}else{ \r\n\t\t\t\tthrow new Error(\"Price is not updated to \"+Price);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtpriceinFrequentlybrought\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtpriceinFrequentlybrought\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Price is not updated to \"+Price);\r\n\t\t\tthrow new Error(\"Price is not updated to \"+Price);\r\n\t\t}\r\n\r\n\t}", "public static void main(String [] args){\n String userInput;\n userInput = JOptionPane.showInputDialog(null, \"Enter an integer number\", \"I'm going to turn into dollars\");\n int intUI = Integer.parseInt(userInput);\n \n //at this point im unsure what im supposed to do\n //does the textbook want me to tell the user how many\n //20s represent the inputed #? (And then same thing\n //for 10s, 5s, 1s) Or does it want me to display the input\n //# in the least number of bills possible?\n \n //intialize int vars \n int twenties = 0;\n int tens = 0;\n int fives = 0;\n int ones = 0;\n \n //logic chain to get the right bill numbers\n twenties = intUI / 20;\n if(intUI%20 > 0){\n intUI = intUI - twenties * 20;\n tens = intUI / 10;\n if(intUI%10 > 0){\n intUI = intUI - tens * 10;\n fives = intUI / 5;\n if(intUI%5 > 0){\n intUI = intUI - fives * 5;\n ones = intUI / 1;\n }//close if\n }//close if\n }//close if chain\n \n //show the bill numbers to user\n JOptionPane.showConfirmDialog(null, twenties + \" 20s, \"\n + tens + \" 10s, \"\n + fives + \" 5s, \"\n + ones + \" 1s, \",\n \"This is your number in the least amount of bills\",\n JOptionPane.YES_OPTION,\n JOptionPane.INFORMATION_MESSAGE);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void testcheckPalindromeNormal_1() {\n assertTrue(checkerNumber.checkPalindrome(12321));\n }", "@Test\n public void whenTryExecuteAdditionShouldCheckThatIsWorkCorrect() {\n String[] answer = new String[]{\"1.0\", \"y\"};\n StubIO stubIO = new StubIO(answer);\n MenuCalculator menuCalculator = new MenuCalculator(new Calculator(), stubIO, actions);\n menuCalculator.fillActions();\n String expected = \"0.0 + 1.0 = 1.0\\n\";\n final int command = 0;\n\n menuCalculator.select(command);\n\n assertThat(stubIO.getOut(), is(expected));\n }" ]
[ "0.61166334", "0.6037756", "0.60343796", "0.6008111", "0.59540445", "0.57936627", "0.57785606", "0.57014805", "0.5619897", "0.55580777", "0.5553594", "0.553719", "0.55315685", "0.55300266", "0.55225974", "0.55199075", "0.5512988", "0.5478294", "0.5461988", "0.5438583", "0.54338807", "0.54225725", "0.54087174", "0.5400217", "0.5399448", "0.53896135", "0.5383675", "0.5376226", "0.5356127", "0.53435206", "0.534035", "0.53396666", "0.5320172", "0.5317687", "0.5314096", "0.5300707", "0.5281706", "0.5263605", "0.52624035", "0.5258178", "0.52422583", "0.5235616", "0.5216241", "0.5204671", "0.51953083", "0.5191407", "0.5189364", "0.51850945", "0.5184882", "0.5176567", "0.5174029", "0.5163441", "0.5153622", "0.5108157", "0.51072687", "0.5107256", "0.5097903", "0.50889266", "0.50802976", "0.5068994", "0.5068046", "0.5061344", "0.5058004", "0.50495565", "0.50491476", "0.5042217", "0.50372016", "0.5032904", "0.50305516", "0.50247747", "0.5024331", "0.50203717", "0.50182134", "0.50110245", "0.50082624", "0.49828818", "0.4981752", "0.49803352", "0.49797913", "0.49730286", "0.496661", "0.49605042", "0.49590567", "0.49516785", "0.49458212", "0.49384227", "0.49293125", "0.4926362", "0.49245325", "0.49132833", "0.49107376", "0.49075326", "0.49041292", "0.4903101", "0.4902406", "0.4897133", "0.489495", "0.48918417", "0.48889616", "0.48889184" ]
0.5594862
9
Test case number: 20 / 1 covered goal: Goal 1. wheel.components.Component.frame(Ljava/lang/CharSequence;)Lwheel/components/Component;: rootBranch
@Test public void test020() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Checkbox checkbox0 = new Checkbox(errorPage0, "LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,", "LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,"); // Undeclared exception! try { Component component0 = checkbox0.frame((CharSequence) "LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,"); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test051() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray0 = new int[5];\n intArray0[0] = 1;\n intArray0[1] = 2;\n intArray0[2] = 1;\n intArray0[3] = 0;\n intArray0[4] = 2;\n frame0.inputStack = intArray0;\n ClassWriter classWriter1 = new ClassWriter(0);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"&l{u&egzGn.@\";\n stringArray0[1] = \"w{X;JM;Dl')dQG\";\n stringArray0[2] = \"&l{u&egzGn.@\";\n classWriter1.visit((-821), 441, \"5j#\", \"5j#\", \"w{X;JM;Dl')dQG\", stringArray0);\n ClassWriter classWriter2 = new ClassWriter(1);\n classWriter1.newClassItem(\"&l{u&egzGn.@\");\n classWriter1.newLong(2);\n ClassWriter classWriter3 = new ClassWriter(1);\n Item item0 = classWriter3.key2;\n Item item1 = new Item(2);\n Frame frame1 = new Frame();\n // Undeclared exception!\n try { \n frame1.execute(171, (-821), classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n String string0 = \"\";\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(2);\n int int0 = Frame.INTEGER;\n Item item0 = classWriter2.newInteger(1);\n item0.set(2);\n item0.next = item0;\n item0.longVal = (long) 2;\n frame0.execute(49, 2006, classWriter1, item0);\n Frame frame1 = frame0.owner.frame;\n // Undeclared exception!\n try { \n frame0.merge(classWriter0, (Frame) null, 49);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray0 = new int[5];\n intArray0[0] = 1;\n intArray0[1] = 2;\n intArray0[2] = 1;\n intArray0[3] = 0;\n intArray0[4] = 2;\n frame0.inputStack = intArray0;\n ClassWriter classWriter1 = new ClassWriter(0);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"&l{u&egzGn.@\";\n Item item0 = classWriter1.newFieldItem(\"w{X;JM;Dl')dQG\", \"5j#\", \"InnerClasses\");\n // Undeclared exception!\n try { \n frame0.execute(188, 840, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Test\n\tpublic void testGetFrame() {\n\t}", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n byte[] byteArray0 = new byte[0];\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n Item item0 = classWriter0.newClassItem(\"java/lang/String\");\n classWriter0.newLong((byte) (-51));\n // Undeclared exception!\n try { \n frame0.execute((byte) (-99), (byte) (-51), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777287);\n Type type0 = Type.BYTE_TYPE;\n String string0 = \"\";\n Item item0 = classWriter0.newMethodItem(\"\", \"zO!>TX45 #n,N&W\", \"zO!>TX45 #n,N&W\", false);\n // Undeclared exception!\n try { \n frame0.execute(160, 171, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.visitSource(\"JSR/RET are not supported with computeFrames option\", (String) null);\n ClassWriter classWriter1 = new ClassWriter(966);\n Item item0 = classWriter1.newLong(2);\n Item item1 = new Item((-3501), item0);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"LineNumberTable\");\n // Undeclared exception!\n try { \n frame0.execute(169, (-2746), classWriter1, item1);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSR/RET are not supported with computeFrames option\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n Label label0 = new Label();\n Label label1 = new Label();\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(162);\n classWriter1.toByteArray();\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BOOLEAN_TYPE;\n Type type2 = Type.FLOAT_TYPE;\n Type type3 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(40);\n Item item0 = classWriter0.key2;\n Item item1 = new Item(2);\n Frame frame0 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute(26, (-345), classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test079() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n ClassWriter classWriter1 = new ClassWriter((-2425));\n Item item0 = classWriter1.newLong(1);\n int int0 = (-1981);\n Item item1 = new Item((-1981), item0);\n item1.next = item0;\n // Undeclared exception!\n try { \n frame0.execute(175, (-1981), classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.INT_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type[] typeArray0 = new Type[2];\n typeArray0[0] = type4;\n typeArray0[1] = type0;\n frame0.initInputFrame(classWriter1, 10, typeArray0, 1431);\n classWriter1.newLong((-1L));\n ClassWriter classWriter2 = new ClassWriter(4);\n Edge edge0 = new Edge();\n Label label0 = edge0.successor;\n // Undeclared exception!\n try { \n frame0.merge(classWriter0, frame0, 5);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e}\");\n Frame frame0 = new Frame();\n int[] intArray0 = new int[3];\n frame0.inputStack = intArray0;\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray1 = new int[1];\n intArray1[0] = 2;\n frame0.inputLocals = intArray1;\n classWriter0.newClassItem(\"JSR/RET are not supported with computeFrames option\");\n Item item0 = classWriter0.newLong(0);\n // Undeclared exception!\n try { \n frame0.execute(165, (-4949), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(1048575);\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n ClassWriter classWriter1 = new ClassWriter((-2425));\n Item item0 = classWriter1.newLong(1);\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte)99;\n byteArray0[1] = (byte)99;\n byteArray0[2] = (byte)99;\n byteArray0[3] = (byte)99;\n byteArray0[4] = (byte)99;\n byteArray0[5] = (byte)99;\n byteArray0[6] = (byte)99;\n byteArray0[7] = (byte) (-51);\n byteArray0[8] = (byte)99;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n String string0 = \"nX,?6XHa$%9YoG<\";\n // Undeclared exception!\n try { \n frame0.execute((byte)99, 50331648, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type0 = Type.BYTE_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[8];\n intArray0[0] = 6;\n intArray0[1] = 7;\n intArray0[2] = 2;\n intArray0[3] = 1;\n intArray0[4] = 2;\n intArray0[5] = 4;\n intArray0[6] = 9;\n intArray0[7] = 4;\n frame0.inputStack = intArray0;\n Item item0 = new Item();\n item0.hashCode = 1687;\n // Undeclared exception!\n try { \n frame0.execute(111, 164, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n ClassWriter classWriter0 = new ClassWriter(3002);\n frame0.owner = label1;\n classWriter0.visitSource(\"JSR/RET are not supported with computeFrames option\", (String) null);\n Item item0 = classWriter0.key2;\n classWriter0.toByteArray();\n frame0.execute(162, 630, classWriter0, item0);\n // Undeclared exception!\n try { \n frame0.execute(3786, 630, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n Label label0 = new Label();\n label0.getFirst();\n ClassWriter classWriter0 = new ClassWriter(3002);\n Item item0 = classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(1);\n ClassWriter classWriter2 = new ClassWriter((-201));\n int int0 = Frame.INTEGER;\n classWriter1.newInteger(172);\n Frame frame0 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute(12, (-1108), classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(0);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \".`\");\n classWriter1.visitSource(\".`\", \"0MqS.y`\\\"3$\");\n ClassWriter classWriter2 = new ClassWriter(2);\n ClassWriter classWriter3 = new ClassWriter(1);\n int[] intArray0 = new int[4];\n intArray0[0] = 1;\n intArray0[1] = 1;\n intArray0[2] = 2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n intArray0[3] = 1;\n frame0.inputLocals = intArray0;\n classWriter2.newClassItem(\"\");\n Item item0 = classWriter3.newLong(0L);\n Item item1 = new Item((-4143), item0);\n // Undeclared exception!\n try { \n frame0.execute(161, 1, classWriter3, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(82);\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"wheel.asm.Frame\";\n stringArray0[1] = \"wheel.asm.Frame\";\n stringArray0[2] = \"wheel.asm.Frame\";\n int[] intArray0 = new int[8];\n intArray0[0] = 82;\n intArray0[1] = 1;\n intArray0[2] = (-2095);\n intArray0[3] = 82;\n intArray0[4] = 82;\n intArray0[5] = 82;\n intArray0[6] = (-268435456);\n intArray0[7] = (-106);\n frame0.inputLocals = intArray0;\n stringArray0[3] = \"wheel.asm.Frame\";\n stringArray0[4] = \"wheel.asm.Frame\";\n classWriter0.visit(82, (-106), \"wheel.asm.Frame\", \"wheel.asm.Frame\", \"wheel.asm.Frame\", stringArray0);\n // Undeclared exception!\n try { \n frame0.execute(170, 82, classWriter0, (Item) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n ClassWriter classWriter0 = new ClassWriter((-1312));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"value \";\n stringArray0[1] = \"\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"\";\n stringArray0[5] = \"Ac\";\n stringArray0[6] = \"Zu.y \";\n stringArray0[7] = \"MI{W%eu4Z\";\n classWriter0.visit((-1048), 179, \"MI{W%eu4Z\", \"\", \"i&b}d$\", stringArray0);\n classWriter0.newClassItem(\"3U02Wj$(Z>8\");\n Item item0 = classWriter0.newLong(0);\n Item item1 = new Item(2, item0);\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(196, (-1312), classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(3002);\n Item item0 = classWriter0.newFieldItem(\"G,<PTBh\", \"\", \"\");\n ClassWriter classWriter2 = new ClassWriter(1);\n classWriter1.toByteArray();\n ClassWriter classWriter3 = new ClassWriter(191);\n Frame frame1 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute((-860), 0, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(162);\n classWriter0.toByteArray();\n Type type0 = Type.CHAR_TYPE;\n type0.toString();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[3];\n typeArray0[0] = type0;\n typeArray0[1] = type0;\n typeArray0[2] = type0;\n frame0.initInputFrame(classWriter0, 157, typeArray0, 4);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"zOfq\");\n ClassWriter classWriter1 = new ClassWriter(7);\n Frame frame1 = new Frame();\n frame0.merge(classWriter1, frame1, 3002);\n // Undeclared exception!\n try { \n frame1.merge(classWriter1, frame0, 0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n Frame frame0 = new Frame();\n EvoSuiteFile evoSuiteFile0 = null;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.toByteArray();\n ClassWriter classWriter1 = new ClassWriter(1048575);\n Frame frame1 = new Frame();\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n Item item0 = classWriter0.newDouble((-1514));\n // Undeclared exception!\n try { \n frame1.execute((-181), 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test\r\n\tpublic void TC101() {\r\n\t\t\r\n\t\t// 1. User opens the JBrick application\r\n\t\t// => The Code Frame has one file open in the code frame (center) and a status pane (bottom)\r\n\t\t// (No file has been opened before hand, this is the equivalent to opening the application for the first time.)\r\n\t\t\r\n\t\tMainWindow jbricks = StartupFunctions.newJBricksInstance(\"JBricks - TC101\");\r\n\t\tComponent editorPane = ContainerFunctions.getEditorPane(jbricks);\r\n\t\tComponent statusPane = ContainerFunctions.getStatusPane(jbricks);\r\n\t\t\r\n\t\tassertTrue(editorPane.getLocationOnScreen().getY() < statusPane.getLocationOnScreen().getY());\r\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.CHAR_TYPE;\n Class<Integer> class0 = Integer.class;\n Class<Object> class1 = Object.class;\n Type.getType(class1);\n Type.getType(class0);\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[6];\n intArray0[0] = 4;\n type1.getDescriptor();\n intArray0[1] = 2;\n intArray0[2] = 7;\n intArray0[3] = 4;\n intArray0[4] = 1;\n intArray0[5] = 0;\n frame0.inputStack = intArray0;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n // Undeclared exception!\n try { \n frame0.execute(192, 4, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n Item item0 = classWriter0.newClassItem(\"*6@#GSZr~Dvz\");\n item0.longVal = (long) 1048575;\n Item item1 = new Item(91, item0);\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(86, 2, classWriter0, (Item) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.visitSource(\"JSR/RET are not supported with computeFrames option\", (String) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n Item item0 = classWriter0.newClassItem(\"uzihbCBH\");\n classWriter0.newLong(966);\n frame0.execute(2656, 33554432, classWriter0, item0);\n assertEquals(2, ClassWriter.COMPUTE_FRAMES);\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n ClassWriter classWriter1 = new ClassWriter((-2425));\n Item item0 = classWriter1.newLong(1);\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte) (-80);\n byteArray0[1] = (byte) (-14);\n byteArray0[2] = (byte) (-80);\n byteArray0[3] = (byte)99;\n byteArray0[4] = (byte) (-80);\n byteArray0[5] = (byte)99;\n byteArray0[6] = (byte) (-80);\n byteArray0[7] = (byte) (-51);\n byteArray0[8] = (byte) (-80);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n classWriter1.newClassItem(\"nX,?6XHa$%9YoG<\");\n classWriter0.newLong(4672L);\n // Undeclared exception!\n try { \n frame0.execute(69, 78, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test131() throws Throwable {\n Frame frame0 = new Frame();\n int int0 = 16777287;\n ClassWriter classWriter0 = new ClassWriter(16777287);\n ClassWriter classWriter1 = new ClassWriter(110);\n Item item0 = classWriter1.newClassItem(\"OpVolEsG~uZ'SU\");\n // Undeclared exception!\n try { \n frame0.execute(2, 1, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Override\n\tpublic void analyzing(DependencyFrame rFrame) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(1);\n Type type0 = Type.SHORT_TYPE;\n String string0 = \"6aRv\";\n Item item0 = classWriter0.newClassItem(\"6aRv\");\n // Undeclared exception!\n try { \n frame0.execute(190, 5, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"k58&{\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"org.apache.commons.io.filefilter.NameFileFilter\";\n stringArray0[5] = \"k58&{\";\n stringArray0[5] = \"i&b}d$\";\n stringArray0[7] = \"k58&{\";\n stringArray0[8] = \"i&b}d$\";\n Item item0 = classWriter0.newLong(16777221);\n int int0 = 189;\n int int1 = 70;\n // Undeclared exception!\n try { \n frame0.execute(189, 70, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n int int0 = Frame.INTEGER;\n Item item0 = classWriter0.newInteger((-1786));\n int int1 = 187;\n // Undeclared exception!\n try { \n frame0.execute(187, 49, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(285212648);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"\";\n stringArray0[1] = \"{uh\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"{uh\";\n classWriter0.visit(285212648, 184, \"{uh\", \"i&b}d$\", \"\", stringArray0);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n classWriter0.newClassItem(\"The size must be non-negative\");\n Item item0 = classWriter0.newLong(1048575);\n int int0 = 159;\n Item item1 = new Item(159, item0);\n classWriter1.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(21, 21, classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void buildFrame();", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(0);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \".`\");\n ClassWriter classWriter2 = new ClassWriter(2);\n ClassWriter classWriter3 = new ClassWriter(1);\n int[] intArray0 = new int[4];\n intArray0[0] = 1;\n intArray0[2] = 2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n intArray0[3] = 1;\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte) (-78);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n Item item0 = classWriter0.newClassItem(\"v!:Z}rLQ%d\\\"\\\"]mu;m;\");\n classWriter3.newLong(1);\n // Undeclared exception!\n try { \n frame0.execute(8, 1, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(260);\n classWriter0.toByteArray();\n ClassWriter classWriter1 = new ClassWriter((-278));\n Frame frame1 = new Frame();\n Item item0 = classWriter1.key2;\n // Undeclared exception!\n try { \n frame0.execute(193, 980, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.INT_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n type0.getDescriptor();\n Type.getType(class0);\n Type[] typeArray0 = new Type[2];\n typeArray0[0] = type4;\n typeArray0[1] = type0;\n frame0.initInputFrame(classWriter1, 10, typeArray0, 8);\n Type.getInternalName(class0);\n Frame frame1 = new Frame();\n Item item0 = new Item(6);\n // Undeclared exception!\n try { \n frame0.execute(115, (-1587), classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "String branch();", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type0;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[2] = type5;\n Type type6 = Type.SHORT_TYPE;\n typeArray0[7] = type6;\n ClassWriter classWriter0 = new ClassWriter(6);\n Item item0 = classWriter0.newLong(6);\n // Undeclared exception!\n try { \n frame0.execute(7, 5, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n Frame frame0 = new Frame();\n int int0 = 2196;\n ClassWriter classWriter0 = new ClassWriter(2196);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n int int1 = (-821);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\";\n stringArray0[1] = \"w{X;JM;Dl')dQG\";\n classWriter0.visit(1899, 496, \"5j#\", \"&l{u&egzGn.@\", \"\", stringArray0);\n ClassWriter classWriter2 = new ClassWriter(1);\n Item item0 = classWriter0.newClassItem(\"&l{u&egzGn.@\");\n Item item1 = classWriter1.newLong(1);\n Item item2 = new Item(158, item1);\n classWriter0.toByteArray();\n int int2 = 194;\n ClassWriter classWriter3 = new ClassWriter(194);\n // Undeclared exception!\n try { \n frame0.execute(64, 158, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(2);\n int int0 = Frame.INTEGER;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Item item0 = classWriter0.newDouble(0.0);\n frame0.execute(1, 2, classWriter1, item0);\n assertFalse(classWriter1.equals((Object)classWriter2));\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n Item item0 = classWriter0.newFieldItem(\"The FileFilter must not be null\", \"\", \"Insensitive\");\n ClassWriter classWriter1 = new ClassWriter(182);\n classWriter1.toByteArray();\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BOOLEAN_TYPE;\n Type type2 = Type.FLOAT_TYPE;\n Type type3 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(3034);\n ClassWriter classWriter3 = new ClassWriter(2);\n Item item1 = classWriter3.key2;\n Item item2 = new Item(6);\n Frame frame1 = new Frame();\n // Undeclared exception!\n try { \n frame1.execute(173, 6, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(3002);\n Item item0 = classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(162);\n classWriter1.toByteArray();\n ClassWriter classWriter2 = new ClassWriter((-1514));\n Frame frame0 = new Frame();\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n // Undeclared exception!\n try { \n frame0.execute(1716, (-406), classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n Frame frame0 = new Frame();\n Type type0 = Type.BYTE_TYPE;\n ClassWriter classWriter0 = new ClassWriter(5);\n Item item0 = classWriter0.newClassItem(\"=\");\n Item item1 = new Item(10, item0);\n classWriter0.toByteArray();\n Item item2 = null;\n // Undeclared exception!\n try { \n frame0.execute(37, 187, classWriter0, (Item) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(82);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"8oFH#X_'UA\");\n int int0 = 174;\n Item item0 = classWriter0.newMethodItem(\"AnnotationDefault\", \"5\", \"AnnotationDefault\", false);\n // Undeclared exception!\n try { \n frame0.execute(174, 1199, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777287);\n Type type0 = Type.BYTE_TYPE;\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"zO!>TX45#n,N&W\";\n Item item0 = classWriter0.newClassItem(\"zO!>TX45#n,N&W\");\n Item item1 = new Item(91, item0);\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(53, 186, classWriter0, (Item) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n Type type0 = Type.CHAR_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type1 = Type.CHAR_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type2 = Type.INT_TYPE;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter0.toByteArray();\n Label label0 = new Label();\n Label label1 = label0.next;\n Frame frame1 = label0.frame;\n ClassWriter classWriter1 = new ClassWriter(9);\n // Undeclared exception!\n try { \n frame0.execute(185, 1455, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Item item0 = classWriter1.newDouble((-1.0));\n ClassWriter classWriter2 = new ClassWriter(191);\n // Undeclared exception!\n try { \n frame0.execute(150, 22, classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test081() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n int int0 = 251658240;\n ClassWriter classWriter1 = new ClassWriter(251658240);\n ClassWriter classWriter2 = new ClassWriter(1);\n Type type0 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Item item0 = classWriter0.key;\n // Undeclared exception!\n try { \n frame0.execute(172, 168, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n Item item0 = classWriter0.newFieldItem(\"\", \"\", \"T~1S2uS7<aMtHqcUL\");\n Frame frame1 = new Frame();\n // Undeclared exception!\n try { \n frame1.execute(154, 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"'0\";\n stringArray0[1] = \"Label offset position has not been resolved yet\";\n stringArray0[2] = \"Class not found\";\n stringArray0[3] = \"Af\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"Label offset position has not been resolved yet\", \"Af\", \"Af\", stringArray0, false, false);\n Object object0 = new Object();\n methodWriter0.visitFrame(2, (-2077), stringArray0, (-1996), stringArray0);\n assertEquals(4, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n ClassWriter classWriter0 = new ClassWriter((-1312));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"value \";\n stringArray0[1] = \"\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"i&b}d$\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.thisName = null;\n stringArray0[4] = \"\";\n stringArray0[5] = \"Ac\";\n classWriter0.newClassItem(\"value \");\n Item item0 = classWriter0.newLong(0L);\n classWriter0.newFieldItem(\"\", \"\\\"}422X3^Z.n4y5<z!\", \"\");\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(76, 0, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type0 = Type.BYTE_TYPE;\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"xzO!>TX45 #n,Nt&W\";\n classWriter0.visit(10, 3042, \"xzO!>TX45 #n,Nt&W\", \"xzO!>TX45 #n,Nt&W\", \"\", stringArray0);\n Item item0 = classWriter0.newLong(10);\n Item item1 = new Item(158, item0);\n Type type1 = Type.SHORT_TYPE;\n Class<String> class1 = String.class;\n Type.getType(class1);\n Class<Object> class2 = Object.class;\n Type.getType(class2);\n ClassWriter classWriter1 = new ClassWriter(158);\n Item item2 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(166, 8, classWriter1, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048576);\n ClassWriter classWriter1 = new ClassWriter(285212630);\n Item item0 = classWriter1.newFieldItem(\"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Frame frame1 = new Frame();\n classWriter0.visitField(1048576, \"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\", \"u1;`1Jz{4~0\", (Object) null);\n // Undeclared exception!\n try { \n frame1.execute(191, 1, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(2);\n Item item0 = classWriter2.newLong(2);\n classWriter1.newLong(2178L);\n classWriter2.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(197, (-5054), classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test017() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1432);\n Type type0 = Type.BYTE_TYPE;\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(24, (-338), classWriter0, (Item) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n Label label0 = new Label();\n label0.getFirst();\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(162);\n classWriter1.visitOuterClass(\"LNXn*Z.`tGd\\\"dR\", \"8}kxRrNjQ;\\\"/a\", (String) null);\n classWriter1.toByteArray();\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BOOLEAN_TYPE;\n Type type2 = Type.FLOAT_TYPE;\n Type type3 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(40);\n Item item0 = classWriter0.key2;\n Item item1 = new Item(2);\n Frame frame0 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute(60, (-345), classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e}\");\n Frame frame0 = new Frame();\n int[] intArray0 = new int[5];\n frame0.inputStack = intArray0;\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray1 = new int[1];\n intArray1[0] = 2;\n frame0.inputLocals = intArray1;\n Item item0 = classWriter0.key3;\n // Undeclared exception!\n try { \n frame0.execute(41, 41, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(285212648);\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"\";\n stringArray0[1] = \"{uh\";\n stringArray0[2] = \"\";\n classWriter1.visitOuterClass(\"pUA>[s%>wi5%'noId\", \"\", \"{uh\");\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"{uh\";\n classWriter0.visit(285212648, 184, \"{uh\", \"i&b}d$\", \"\", stringArray0);\n Item item0 = classWriter0.newClassItem(\"The size must be non-negative\");\n Item item1 = classWriter1.key2;\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(183, 191, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(285212630);\n Type type0 = Type.CHAR_TYPE;\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n type0.toString();\n ClassWriter classWriter1 = new ClassWriter((-1445));\n classWriter1.toByteArray();\n classWriter1.newClassItem(\"C\");\n Item item0 = classWriter1.newLong(0L);\n classWriter0.newLong(3671L);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n classWriter1.newConst(\"C\");\n classWriter0.newLong(3671L);\n // Undeclared exception!\n try { \n frame0.execute(122, (-4474), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048576);\n ClassWriter classWriter1 = new ClassWriter(285212648);\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n Item item0 = classWriter1.newFieldItem(\"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n MethodWriter methodWriter0 = classWriter1.lastMethod;\n classWriter1.lastMethod = null;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"QllX9_#%O~uxqo\");\n item0.strVal3 = \"qld m+eDWv\";\n // Undeclared exception!\n try { \n frame0.execute((-1044), (-3128), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Item item0 = classWriter1.newDouble((-1.0));\n ClassWriter classWriter2 = new ClassWriter(191);\n // Undeclared exception!\n try { \n frame0.execute(157, 22, classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray0 = new int[5];\n intArray0[0] = 1;\n intArray0[1] = 2;\n intArray0[2] = 1;\n intArray0[3] = 0;\n intArray0[4] = 2;\n frame0.inputStack = intArray0;\n ClassWriter classWriter1 = new ClassWriter(0);\n ClassWriter classWriter2 = new ClassWriter(1);\n classWriter2.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n Item item0 = classWriter2.newLong(0);\n Item item1 = new Item(1, item0);\n ClassWriter classWriter3 = new ClassWriter(1);\n Item item2 = classWriter3.key3;\n // Undeclared exception!\n try { \n frame0.execute(155, 16777228, classWriter2, item2);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test069() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n ClassWriter classWriter1 = new ClassWriter((-2425));\n Item item0 = classWriter1.newLong(1);\n Item item1 = new Item((-1981), item0);\n item1.next = item0;\n // Undeclared exception!\n try { \n frame0.execute(156, 156, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(285212648);\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"\";\n stringArray0[1] = \"{uh\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"{uh\";\n classWriter0.visit(285212648, 184, \"{uh\", \"i&b}d$\", \"\", stringArray0);\n classWriter0.newClassItem(\"The size must be non-negative\");\n Item item0 = classWriter0.newLong(1048575);\n Item item1 = new Item(159, item0);\n classWriter1.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(14, 14, classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "boolean isBranchTaken();", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type0 = Type.BYTE_TYPE;\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"xzO!>TX45 #n,Nt&W\";\n classWriter0.visit(10, 3042, \"xzO!>TX45 #n,Nt&W\", \"xzO!>TX45 #n,Nt&W\", \"\", stringArray0);\n Item item0 = classWriter0.newLong(10);\n Item item1 = new Item(158, item0);\n Type type1 = Type.SHORT_TYPE;\n Class<String> class1 = String.class;\n Type type2 = Type.getType(class1);\n Type type3 = Type.BYTE_TYPE;\n Type[] typeArray0 = new Type[5];\n typeArray0[0] = type3;\n typeArray0[1] = type1;\n typeArray0[4] = type1;\n typeArray0[4] = type2;\n // Undeclared exception!\n try { \n frame0.initInputFrame(classWriter0, 196, typeArray0, 1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-2450));\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"oc[MfnZM[~MHOK iO\", (String[]) null, true, false);\n Object object0 = new Object();\n int int0 = MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME;\n methodWriter0.visitTypeInsn((-1299), \"9~\\\"GM0+ ?&-(JmN[0f.\");\n methodWriter0.visitTypeInsn(188, \"Fj)3/|(;sZXz$\");\n Label label0 = new Label();\n Frame frame0 = label0.frame;\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n label0.frame = null;\n Label label1 = label0.successor;\n methodWriter0.visitIntInsn(188, 99);\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(0);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \".`\");\n ClassWriter classWriter2 = new ClassWriter(2);\n ClassWriter classWriter3 = new ClassWriter(1);\n int[] intArray0 = new int[4];\n intArray0[0] = 1;\n intArray0[2] = 2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n intArray0[3] = 1;\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte) (-78);\n byteArray0[1] = (byte) (-101);\n byteArray0[2] = (byte) (-80);\n byteArray0[3] = (byte) (-99);\n byteArray0[4] = (byte)7;\n byteArray0[5] = (byte)9;\n byteArray0[6] = (byte)99;\n byteArray0[7] = (byte) (-80);\n byteArray0[8] = (byte) (-51);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n frame0.inputLocals = intArray0;\n Item item0 = classWriter2.newClassItem(\"\");\n classWriter3.newLong(1);\n // Undeclared exception!\n try { \n frame0.execute(63, 2338, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n Type type0 = Type.CHAR_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type1 = Type.CHAR_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type2 = Type.INT_TYPE;\n classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n byte[] byteArray0 = classWriter0.toByteArray();\n Label label0 = new Label();\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n Item item0 = classWriter0.newClassItem(\"RuntimeVisibleParameterAnnotations\");\n classWriter0.newLong(9);\n // Undeclared exception!\n try { \n frame0.execute((byte) (-80), (-1802), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.VOID_TYPE;\n Type type5 = Type.BOOLEAN_TYPE;\n int[] intArray0 = new int[5];\n intArray0[0] = 7;\n intArray0[1] = 8;\n intArray0[2] = 4;\n intArray0[3] = 4;\n intArray0[4] = 6;\n frame0.inputStack = intArray0;\n Type type6 = Type.FLOAT_TYPE;\n Type type7 = Type.SHORT_TYPE;\n ClassWriter classWriter0 = new ClassWriter(3);\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(84, (-990), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[4] = type0;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[2] = type5;\n Type type6 = Type.SHORT_TYPE;\n typeArray0[7] = type6;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Frame frame1 = new Frame();\n type5.toString();\n Type.getObjectType(\"F\");\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame1.execute(46, 0, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test090() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"k58&{\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"org.apache.commons.io.filefilter.NameFileFilter\";\n stringArray0[5] = \"k58&{\";\n stringArray0[5] = \"i&b}d$\";\n stringArray0[7] = \"k58&{\";\n stringArray0[8] = \"i&b}d$\";\n Item item0 = classWriter0.newLong(16777221);\n Item item1 = new Item(184, item0);\n Item item2 = classWriter0.key3;\n // Undeclared exception!\n try { \n frame0.execute(178, 1, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test054() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(1);\n ClassWriter classWriter2 = new ClassWriter((-719));\n Item item0 = classWriter2.newClassItem(\"n0*\");\n Item item1 = new Item(2, item0);\n Item item2 = new Item(184, item0);\n classWriter2.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(179, 1048575, classWriter2, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray0 = new int[5];\n intArray0[0] = 1;\n intArray0[1] = 2;\n intArray0[2] = 1;\n intArray0[3] = 0;\n intArray0[4] = 2;\n ClassWriter classWriter1 = new ClassWriter(0);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n ClassWriter classWriter2 = new ClassWriter(199);\n Item item0 = classWriter1.newLong(2);\n Type type0 = Type.VOID_TYPE;\n type0.getClassName();\n // Undeclared exception!\n try { \n frame0.execute(61, 184, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter((-2826));\n classWriter0.visit(1872, 1048575, \"Sensitive\", \"\", \"\", (String[]) null);\n ClassWriter classWriter1 = new ClassWriter((-2077));\n MethodWriter methodWriter0 = classWriter1.firstMethod;\n classWriter0.lastMethod = null;\n classWriter0.newClassItem(\"\");\n Item item0 = classWriter0.newLong(0L);\n Item item1 = new Item(2, item0);\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte)126;\n byteArray0[1] = (byte) (-85);\n byteArray0[2] = (byte) (-99);\n byteArray0[3] = (byte)11;\n byteArray0[4] = (byte)91;\n byteArray0[5] = (byte)91;\n byteArray0[6] = (byte) (-33);\n byteArray0[7] = (byte)74;\n byteArray0[8] = (byte)69;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"u;T>z)bm]K%a}Ta\");\n classWriter1.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(23, 1872, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }" ]
[ "0.5931353", "0.5886192", "0.587777", "0.5865047", "0.5830374", "0.58251023", "0.57955813", "0.57853514", "0.57845926", "0.57833433", "0.5781844", "0.577848", "0.5767922", "0.57388693", "0.5738667", "0.57366174", "0.5708524", "0.5699014", "0.56873", "0.5680674", "0.56719345", "0.5669712", "0.56395054", "0.56368315", "0.5636755", "0.56326514", "0.56282425", "0.5624866", "0.5619966", "0.5617177", "0.5608298", "0.5602196", "0.5596959", "0.5596696", "0.5590189", "0.5579656", "0.55754423", "0.5571534", "0.55695486", "0.55621016", "0.5561554", "0.55608135", "0.5554172", "0.5548599", "0.5547425", "0.5541885", "0.55412364", "0.5537206", "0.5532284", "0.5530143", "0.5525876", "0.55233926", "0.5522413", "0.5516952", "0.55159765", "0.5501982", "0.54991895", "0.5480191", "0.54738426", "0.54668164", "0.5461202", "0.54597074", "0.5459518", "0.5456453", "0.5455578", "0.54547065", "0.5454645", "0.5453578", "0.54522306", "0.5450795", "0.5448069", "0.5445703", "0.54434663", "0.54315466", "0.5428792", "0.5427101", "0.5426108", "0.54189324", "0.5417808", "0.5416993", "0.5416213", "0.54113805", "0.5398684", "0.5392795", "0.53874457", "0.5382959", "0.5382457", "0.5374852", "0.5374484", "0.53683424", "0.53673214", "0.5362829", "0.53538054", "0.53511786", "0.5342369", "0.53372407", "0.53330874", "0.5328685", "0.53263515", "0.53237367" ]
0.54010993
82
Test case number: 21 / 1 covered goal: Goal 1. wheel.components.Component.textarea(Ljava/lang/String;)Lwheel/components/FormElement;: rootBranch
@Test public void test021() throws Throwable { Hidden hidden0 = new Hidden((Component) null, "pJ", "pJ"); // Undeclared exception! try { FormElement formElement0 = hidden0.textarea("pJ"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Form elements can be created only by compoents that are attached to a form component. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test165() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.buttonInput(\"XYD6eL5K7VD|_+{7`{$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test262() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"iW5kQK2`y/GM^W\");\n // Undeclared exception!\n try { \n xmlEntityRef0.textarea(\"Zq15+;i?OIR_q+\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n Form form0 = new Form(\"g+0=\");\n // Undeclared exception!\n try { \n form0.textarea(\"g+0=\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test279() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, \"N2}mQjM@Rjzvl\", \"N2}mQjM@Rjzvl\");\n Submit submit0 = new Submit(textArea0, \"N2}mQjM@Rjzvl\", \"N2}mQjM@Rjzvl\");\n // Undeclared exception!\n try { \n submit0.noframes();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextArea textArea0 = new TextArea(errorPage0, \"+=\", \"&``$\");\n // Undeclared exception!\n try { \n textArea0.sub();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test149() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.em();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n Checkbox checkbox0 = new Checkbox(textArea0, \"=P+hF^\", \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n checkbox0.q();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test298() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n TextArea textArea0 = new TextArea(xmlEntityRef0, \"Component with id \", \"Component with id \");\n // Undeclared exception!\n try { \n textArea0.h4();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test270() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.sub();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void setcheckoutComment(String text){\r\n\t\tString comment = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Comment should be entered as \"+comment);\r\n\t\ttry{\r\n\r\n\t\t\tsendKeys(locator_split(\"txtComment\"),comment);\r\n\t\t\tSystem.out.println(\"Checkout Comment is entered as \"+comment);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Comment is entered as \"+comment);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Comment is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtComment\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.strong((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test129() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TableBlock tableBlock0 = new TableBlock(errorPage0, \"W$(',\");\n TextArea textArea0 = new TextArea(tableBlock0, \"W$(',\", \"W$(',\");\n // Undeclared exception!\n try { \n textArea0.h4();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n Form form0 = new Form(\"g+0=\");\n TextArea textArea0 = new TextArea(form0, \"g+0=\", \"asset/wheel/components/jquery.js?expires=88\");\n // Undeclared exception!\n try { \n textArea0.sub();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void getText() {\n page.getTextTextarea.clear();\n waiter.waitForElementTextEqualsString(page.getTextTextarea, \"Predefined text\", driver);\n waiter.waitForElementAttributeEqualsString(page.getTextTextarea, \"value\", \"\", driver);\n\n //type text in the text area. getText() returns initial text. getAttribute(\"value\") returns newly typed text\n page.getTextTextarea.sendKeys(\"New text\");\n waiter.waitForElementTextEqualsString(page.getTextTextarea, \"Predefined text\", driver);\n waiter.waitForElementAttributeEqualsString(page.getTextTextarea, \"value\", \"New text\", driver);\n }", "public void testEditor() {\n // open sample file in Editor\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME);\n JavaNode sampleClass1Node = new JavaNode(sample1Node, SAMPLE1_FILE_NAME);\n sampleClass1Node.open();\n // find open file in editor\n EditorOperator eo = new EditorOperator(SAMPLE1_FILE_NAME);\n eo.setCaretPosition(\"public static void main\", true);\n int insertLine = eo.getLineNumber() + 2;\n eo.insert(\"\\n\", insertLine, 1); // NOI18N\n // Need to disable verification because shortcut \"sout\" is replaced\n // by \"System.out.println(\"\");\" and \"sout\" is not found in Editor\n eo.setCaretPositionToLine(insertLine);\n eo.txtEditorPane().setVerification(false);\n eo.txtEditorPane().typeText(\"sout\"); // NOI18N\n eo.txtEditorPane().typeKey('\\t');\n eo.txtEditorPane().setVerification(true);\n eo.insert(\"Hello\"); // NOI18N\n //eo.insert(\"System.out.println(\\\"Hello\\\");\\n\", insertLine+1, 1); // NOI18N\n final String textToCopy = \"System.out.println(\\\"Hello\\\");\"; // NOI18N\n eo.select(textToCopy);\n int oldDispatchingModel = JemmyProperties.getCurrentDispatchingModel();\n // \"Copy\"\n CopyAction copyAction = new CopyAction();\n try {\n copyAction.perform(eo);\n } catch (TimeoutExpiredException e) {\n // if not succed try it second time in Robot mode\n JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);\n copyAction.perform(eo);\n } finally {\n // set previous dispatching model\n JemmyProperties.setCurrentDispatchingModel(oldDispatchingModel);\n }\n // wait until clipboard contains text to copy\n try {\n new Waiter(new Waitable() {\n\n @Override\n public Object actionProduced(Object obj) {\n try {\n String text = Toolkit.getDefaultToolkit().getSystemClipboard().\n getContents(null).getTransferData(DataFlavor.stringFlavor).toString();\n return textToCopy.equals(text) ? Boolean.TRUE : null;\n } catch (UnsupportedFlavorException e) {\n // The following exception can be thrown when clipboard is empty.\n // java.awt.datatransfer.UnsupportedFlavorException: Unicode String\n // at org.openide.util.datatransfer.ExTransferable$Empty.getTransferData(ExTransferable.java:461)\n // Ignore this exception.\n return null;\n } catch (IOException ioe) {\n throw new JemmyException(\"Failed getting clipboard content.\", ioe);\n }\n }\n\n @Override\n public String getDescription() {\n return (\"Clipboard contains \" + textToCopy); // NOI18N\n }\n }).waitAction(null);\n } catch (Exception ie) {\n throw new JemmyException(\"Interrupted.\", ie);\n }\n eo.insert(\"int xxxx;\\n\", insertLine + 1, 1); // NOI18N\n eo.select(\"int xxxx;\"); // NOI18N\n PasteAction pasteAction = new PasteAction();\n try {\n pasteAction.perform(eo);\n } catch (TimeoutExpiredException e) {\n // if not succed try it second time in Robot mode\n JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);\n pasteAction.perform(eo);\n } finally {\n // set previous dispatching model\n JemmyProperties.setCurrentDispatchingModel(oldDispatchingModel);\n }\n eo.select(\"Hello\", 1); // NOI18N\n // \"Delete\"\n DeleteAction deleteAction = new DeleteAction();\n deleteAction.performMenu(eo);\n // wait Hello is deleted\n eo.txtEditorPane().waitText(\"System.out.println(\\\"\\\");\"); // NOI18N\n eo.insert(\"Good bye\"); // NOI18N\n // test cut action\n eo.select(3);\n // \"Cut\"\n CutAction cutAction = new CutAction();\n try {\n cutAction.perform(eo);\n } catch (TimeoutExpiredException e) {\n // if not succed try it second time in Robot mode\n JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);\n cutAction.perform(eo);\n } finally {\n // set previous dispatching model\n JemmyProperties.setCurrentDispatchingModel(oldDispatchingModel);\n }\n // need to wait a little until editor content is refreshed after cut action\n new EventTool().waitNoEvent(500);\n // select from column 1 to 2 at line 3 \n eo.select(2, 1, 2);\n try {\n pasteAction.perform(eo);\n } catch (TimeoutExpiredException e) {\n // if not succed try it second time in Robot mode\n JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);\n pasteAction.perform(eo);\n } finally {\n // set previous dispatching model\n JemmyProperties.setCurrentDispatchingModel(oldDispatchingModel);\n }\n }", "@Test(timeout = 4000)\n public void test208() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, \"N^H\", \"N^H\");\n // Undeclared exception!\n try { \n textArea0.add((Component) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test44() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextArea textArea0 = new TextArea(errorPage0, \">/_? 9[?}aX\", \"Tz\\\"qb2hEBW8P^&L\");\n Any any0 = new Any(textArea0, \"Tz\\\"qb2hEBW8P^&L\");\n DynamicSelectModel dynamicSelectModel0 = any0.selectModel();\n Component component0 = dynamicSelectModel0.getComponent();\n assertNull(component0);\n }", "@Test(timeout = 4000)\n public void test342() throws Throwable {\n Form form0 = new Form(\"\\r\");\n Checkbox checkbox0 = new Checkbox(form0, \"\", \"4|f#eFc+8(g<V?*&\");\n // Undeclared exception!\n try { \n checkbox0.fileInput(\"\\r\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\r\n\t\tpublic void testCompileAddition() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"putobject\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.id(\".?p5{ul\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test372() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.h6((Object) \"=P+hF^\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\r\n\t\tpublic void testCompilePuts() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tString a = \"the_best_cat = \\\"Noogie Cat\\\" \\nputs \\\"The best cat is: \\\" + the_best_cat\";\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(a);;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"putstring\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"u\");\n // Undeclared exception!\n try { \n xmlEntityRef0.textInput(\"u;R\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test301() throws Throwable {\n Form form0 = new Form(\"wheel.components.ActionExpression@0000000006\");\n // Undeclared exception!\n try { \n form0.buttonInput((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\r\n public void ensureTextChangesWork() {\n onView(withId(R.id.inputField))\r\n .perform(typeText(\"HELLO\"), closeSoftKeyboard());\r\n reportHelper.label(\"myTestStepLabel_1_1\");\r\n onView(withId(R.id.changeText)).perform(click());\r\n\r\n // Check that the text was changed.\r\n onView(withId(R.id.inputField)).check(matches(withText(\"Lalala\")));\r\n reportHelper.label(\"myTestStepLabel_1_2\");\r\n }", "@Test(timeout = 4000)\n public void test130() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.h4();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "String userInputFromTextArea();", "@Test\n\tpublic void testInfobox() {\t\n\t\tTextArea info = (TextArea) s.lookup(\"#T6_infobox_TextArea\");\n\t\tTextArea compInfo = (TextArea) s.lookup(\"#T6_composite_infobox_TextArea\");\n\t\tTextArea parmInfo = (TextArea) s.lookup(\"#T6_parm_infobox_TextArea\");\n\t\tTextArea pasrmInfo = (TextArea) s.lookup(\"#T6_pasrm_infobox_TextArea\");\n\t\tTextArea ldInfo = (TextArea) s.lookup(\"#T6_ld_infobox_TextArea\");\n\t\tclickOn(\"#Main_compatibility_Button\");\n\t\tmoveTo(\"#T6_more_info_Text\");\n\t\tif (!info.isVisible()||compInfo.isVisible()||parmInfo.isVisible()||pasrmInfo.isVisible()||ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(1);\n\t\t\tassertTrue(false);\n\t\t}\n\t\tmoveTo(\"#T6_composite_Text\");\n\t\tif (info.isVisible()||!compInfo.isVisible()||parmInfo.isVisible()||pasrmInfo.isVisible()||ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(2);\n\t\t\tassertTrue(false);\n\t\t}\n\t\tmoveTo(\"#T6_parm_Text\");\n\t\tif (info.isVisible()||compInfo.isVisible()||!parmInfo.isVisible()||pasrmInfo.isVisible()||ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(3);\n\t\t\tassertTrue(false);\n\t\t\t\n\t\t}\n\t\tmoveTo(\"#T6_pasrm_Text\");\n\t\tif (info.isVisible()||compInfo.isVisible()||parmInfo.isVisible()||!pasrmInfo.isVisible()||ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(5);\n\t\t\tassertTrue(false);\n\t\t}\n\t\tmoveTo(\"#T6_ld_Text\");\n\t\tif (info.isVisible()||compInfo.isVisible()||parmInfo.isVisible()||pasrmInfo.isVisible()||!ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(5);\n\t\t\tassertTrue(false);\n\t\t}\n\t\tmoveTo(\"#T6_generate_Button\");\n\t\t// if any infobox is shown fail test case\n\t\tassertFalse(info.isVisible()||compInfo.isVisible()||parmInfo.isVisible()||pasrmInfo.isVisible()||ldInfo.isVisible());\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test346() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.checkbox((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"9\\\"n-\");\n // Undeclared exception!\n try { \n xmlEntityRef0.submit(\"9\\\"n-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test255() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n Submit submit0 = new Submit(textArea0, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n submit0.wBlock(\"XYD6eL5K7VD|_+{7`{$\");\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test435917b() throws Exception\n {\n // line 11 column 1 - Warning: <input> attribute with missing trailing quote mark\n\n // should not report:\n // line 11 column 2 - Warning: <input> unknown attribute value \"null\"\n\n executeTidyTest(\"435917.html\");\n assertLogDoesntContains(\"null\");\n }", "public void actionPerformed(ActionEvent a) {\n\n String command = a.getActionCommand();\n if (command.equals(\"e\")) {\n //Log toggle.\n if (consoleDisplayed = !consoleDisplayed) //Show\n splitter.setDividerLocation(defaultSliderPosition);\n else //Hide\n splitter.setDividerLocation(.999);\n } else if (command.equals(\"r\")) {\n //Gets the code into a string.\n String code = text.getText();\n\n //Marks certain areas as \"dirty\".\n //Dirty areas are places that shouldn't be considered for any keywords,\n //including \"import\", \"extend\", and so on.\n ArrayList<Integer> dirtyBounds = getDirty(code);\n\n //Not quite perfect all of the time.\n if (text.getText().contains(\"class\")) {\n //This is a bit more explicit\n //if(text.getText().trim().substring(0, text.getText().trim().indexOf(\"{\")).contains(\"class\")) {\n //This means we should try to compile this as normal.\n\n //Pulls out class name\n int firstPos = code.indexOf(\"class\");\n while(isDirty(dirtyBounds, firstPos)) \n firstPos = code.indexOf(\"class\", firstPos + 1);\n\n int secondPos = code.indexOf(\"{\"); //No checks here because who would possibly put a comment between \"class\" and \"{\"?\n String name = code.substring(firstPos + \"class\".length() + 1, secondPos).trim();\n\n //Just a safety check to make sure you don't try to modify this program while it's running.\n if (name.equals(\"Playground\")) {\n System.out.println(\"I know what you're doing and I don't approve. I won't even compile that.\");\n return;\n //println(\"Self-compiling. You were warned.\", warning); //Allowed users to bootstrap this program. October 26, 2014\n }\n\n compileAndRun(name, code);\n } else {\n //This means we should compile this as a playground.\n\n //TODO: Try to assign every line to a variable, and print it out if it's by itself. IE, saying \"int i = 0\" won't do anything,\n //but then just typing \"i\" or \"i;\" would print out \"0\". Add support for functions, too. So \"factorial(5)\" by itself would \n //print out \"120\" without any fluff.\n\n //TODO: Lazy typing. \"int i = 0\" should be equivilant to \"i = 0\"\n\n //TODO: Less need for casting. If \"int.toString()\" is called, modify in-place to \"(new Integer(int)).toString()\"\n //Similar for calls that need Strings but are passed primitives; \"promote\" them by prepending \"\"+ to them.\n\n //Common import statements built-in\n String importDump = new String();\n importDump+=(\"import java.util.*;\\n\" + \n \"import javax.swing.*;\\n\" + \n \"import javax.swing.event.*;\\n\" +\n \"import java.awt.*;\\n\" + \n \"import java.awt.event.*;\\n\" + \n \"import java.io.*;\\n\");\n\n //User-defined or auto-generated methods\n String methodDump = new String();\n\n //Pulls out any \"import\" statements and appends them to the import dump.\n int i = code.indexOf(\"import\");\n while(i >= 0) {\n //Ignores comments and string literals\n if (isDirty(dirtyBounds, i)) {\n i = code.indexOf(\"import\", i+1);\n continue;\n }\n\n String s = code.substring(i, code.indexOf(\";\", i) + 1); \n //System.out.println(\"Found import: \" + s);\n code = code.replaceFirst(s, \"\");\n importDump+=s+\"\\n\";\n i = code.indexOf(\"import\", i+1);\n }\n\n //Pulls out all methods\n i = code.indexOf(\"(\");\n while(i >= 0) {\n if (isDirty(dirtyBounds,i)) {\n i = code.indexOf(\"(\", i+1); continue;\n }\n\n //Move backwards first\n char temp = 0; int pos = i;\n boolean shouldSkip = false;\n while(--pos > 0) {\n temp = code.charAt(pos);\n if (temp == '.') {shouldSkip = true; break;} //This is a method call, ie String.charAt();\n if (temp == ';') {++pos; break;} //This is most likely a method declaration, since we had no errors\n //If we hit the start of the file, that's probable a method dec. too!\n }\n\n String sub = code.substring(pos, i);\n if (shouldSkip || isDirty(dirtyBounds, pos) || \n sub.contains(\"while\") || sub.contains(\"for\") || sub.contains(\"new\") || sub.contains(\"try\") || sub.contains(\"catch\")) \n {i=code.indexOf(\"(\", i+1); continue;} //If this def. isn't a method or it's in a comment\n\n int start = pos;\n temp = 0; pos = code.indexOf(\"{\", i+1);\n int count = 1; shouldSkip = false;\n if(pos != -1) {\n if (code.indexOf(\";\", i+1) > pos || code.indexOf(\";\", i+1) == -1) {\n while(++pos < code.length()) {\n if (count == 0) \n break;\n\n temp = code.charAt(pos);\n if (temp == '{') \n count++;\n if (temp == '}') \n count--;\n }\n } else {\n //If there's a semicolon between the opening paranthesis and opening curly brace, this isn't a method!\n i = code.indexOf(\"(\", i+1);\n continue;\n }\n } else {\n i = code.indexOf(\"(\", i+1);\n continue;\n }\n\n int end = pos;\n String s = code.substring(start,end);\n code = code.replace(s, \"\"); \n\n //Just to make it look nicer\n s = s.trim();\n\n //println(\"Found method: \" + s);\n\n //This makes using the method intuitive by effectively removing the need for static modifiers\n if (!s.substring(0,s.indexOf(\"(\")).contains(\"static\")) {\n s = \"static \" + s;\n //println(\"Silently adding 'static' modifier\", warning);\n }\n\n methodDump+=(s + \"\\n\");\n i = code.indexOf(\"(\", i+1);\n }\n\n //Inject the class header and main method, imports, and methods\n code = \"//User and auto-imports pre-defined\\n\"\n + importDump\n + \"//Autogenerated class\\n\"\n + \"public class Main {\\n\" \n + \"public static void main(String[] args) {\\n\"\n + code\n + \"\\n}\\n\"\n + methodDump \n + \"}\";\n\n //Run as normal\n compileAndRun(\"Main\", code);\n }\n } else if (command.equals(\"k\")) {\n kill(); \n } else if (command.equals(\"o\")) {\n of = new OptionFrame(frame);\n } else if (command.equals(\"/\")) {\n hf = new HelpFrame(frame);\n }\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"u\");\n TextArea textArea0 = new TextArea(xmlEntityRef0, \"u\", \"wheelDevelopmentMode\");\n // Undeclared exception!\n try { \n textArea0.h6((Object) \"wheelDevelopmentMode\");\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"/c[~rNl!Ma-\", \"kIh 4+,VlA$]12\");\n ElExpression elExpression0 = new ElExpression(\"J>w9x0K2Bs|BOY\");\n // Undeclared exception!\n try { \n submit0.eval(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test355() throws Throwable {\n Form form0 = new Form(\"\\r\");\n Hidden hidden0 = new Hidden(form0, \"\\r\", \"mYX#Ua(#:wO\");\n Submit submit0 = new Submit(form0, \"Col component can be added only to a TableBlock.\", \"mYX#Ua(#:wO\");\n // Undeclared exception!\n try { \n submit0.acronym((Object) hidden0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void sendKeys() {\n page.textInput.sendKeys(\"coffee\");\n waiter.waitForElementAttributeEqualsString(page.textInput, \"value\", \"coffee\", driver);\n //type into a <textarea> element\n //before typing, the textarea element displays a hint, but not an actual text (in the 'placeholder' attribute)\n //therefore the getAttribute(\"value\") method call returns an empty String\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"\", driver);\n page.textarea.sendKeys(\"1234567890\");\n //after typing, the text in the field will be \"1234567890\"\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"1234567890\", driver);\n //type the same text again and the text in the field becomes \"12345678901234567890\"\n page.textarea.sendKeys(\"1234567890\");\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"12345678901234567890\", driver);\n }", "@Test(timeout = 4000)\n public void test140() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Submit submit0 = new Submit(errorPage0, \"+4lypJ[6^A\", \"+4lypJ[6^A\");\n // Undeclared exception!\n try { \n submit0.form(\"+4lypJ[6^A\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test290() throws Throwable {\n Form form0 = new Form(\"first character in input was UNICODE noncharacter (0xFFFE)- input requires int swapping\");\n // Undeclared exception!\n try { \n form0.bdo(\"first character in input was UNICODE noncharacter (0xFFFE)- input requires int swapping\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "private void updateTextAreaLenght() {\n //\n }", "@Test\r\n\t\tpublic void testParsePuts() {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\tString a = \"the_best_cat = \\\"Noogie Cat\\\" \\nputs \\\"The best cat is: \\\" + the_best_cat\";\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(a);;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[2]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"@ident\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Test\n public void test033() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"\", \"\");\n String string0 = checkbox0.defaultTagName();\n XmlEntityRef xmlEntityRef0 = (XmlEntityRef)errorPage0.entity(\"input\");\n }", "@Test\n public void test063() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextInput textInput0 = new TextInput(errorPage0, \"E9ZWQsO;7#xLi'\", \"E9ZWQsO;7#xLi'\");\n // Undeclared exception!\n try {\n Component component0 = textInput0.q((Object) \"E9ZWQsO;7#xLi'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test331() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \";BpvU]Xh\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.imageSubmit(\"R,@pnK1{H\", \"java/lang/Throwable\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public void getBranchCommand() {\n\n }", "@Test(timeout = 4000)\n public void test379() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.dt((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test138() throws Throwable {\n Submit submit0 = new Submit((Component) null, \" (position:\", \"kIh 4+,VlA$]12\");\n Checkbox checkbox0 = new Checkbox(submit0, \"B\\\"M$C3CbFMp&xh\", \" (position:\");\n // Undeclared exception!\n try { \n checkbox0.h1((Object) null);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public TextArea getInputPane();", "@Test\n public void test088() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.code();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"-1Uj)9%67!\", \"-1Uj)9%67!\");\n ElExpression elExpression0 = checkbox0.el(\"-1Uj)9%67!\");\n // Undeclared exception!\n try {\n FormElement formElement0 = checkbox0.fileInput(\"-1Uj)9%67!\", elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "@Test(timeout = 4000)\n public void test267() throws Throwable {\n Submit submit0 = new Submit((Component) null, \".\\\"=_m?KP<D\\\"\", \"I&{b+CI\");\n ActionExpression actionExpression0 = submit0.action(\"\");\n assertFalse(actionExpression0.isSubmissible());\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"6F\\\"\", \"6F\\\"\");\n // Undeclared exception!\n try { \n checkbox0.kbd();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test197() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n checkbox0.renderHint(\"]1\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "Editor mo117962b();", "@Test(timeout = 4000)\n public void test362() throws Throwable {\n Form form0 = new Form(\"\\r\");\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"\\r\");\n // Undeclared exception!\n try { \n form0.sup((Object) xmlEntityRef0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test190() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"org.mvel.conversion.IntegerCH$10\");\n TextInput textInput0 = new TextInput(xmlEntityRef0, \"org.mvel.conversion.IntegerCH$10\", \"org.mvel.conversion.IntegerCH$10\");\n // Undeclared exception!\n try { \n textInput0._getTopLevelComponent(true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\r\n\t\tpublic void testParseNoWhitespace() {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[2]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertFalse(elementText.contains(\":on_sp\") || elementText.contains(\":op_nl\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Test(timeout = 4000)\n public void test210() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"(Ljava/lang/String;)Lorg/mvel/integration/VariableResolver;\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"(Ljava/lang/String;)Lorg/mvel/integration/VariableResolver;\", \"W,eg{\", stringSelectModel0, elExpression0);\n Select select0 = new Select(checkboxGroup0, \"W,eg{\", \"http://xmlpull.org/v1/doc/properties.html#serializer-indentation\", stringSelectModel0, \"W,eg{\");\n FileInput fileInput0 = new FileInput(select0, \"]> fkF\\\".:8\", \"W,eg{\");\n // Undeclared exception!\n try { \n fileInput0.end(\"J]'z8)\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No corresponding component found for end expression 'J]'z8)'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextArea textArea0 = new TextArea(errorPage0, \">/_? 9[?}aX\", \"Tz\\\"qb2hEBW8P^&L\");\n Any any0 = new Any(textArea0, \"Tz\\\"qb2hEBW8P^&L\");\n DynamicSelectModel dynamicSelectModel0 = any0.selectModel();\n dynamicSelectModel0.setComponent(errorPage0);\n ErrorPage errorPage1 = (ErrorPage)dynamicSelectModel0.getComponent();\n assertEquals(\"div\", errorPage1.defaultTagName());\n }", "public void test435922() throws Exception\n {\n // line 6 column 1 - Warning: <input> isn't allowed in <body> elements\n // line 7 column 3 - Warning: inserting implicit <form>\n // line 7 column 3 - Warning: missing </form>\n // line 7 column 3 - Warning: <form> lacks \"action\" attribute\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"435922.html\");\n assertWarnings(4);\n }", "@Test\n public void test109() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"-1Uj)9%67!\", \"-1Uj)9%67!\");\n // Undeclared exception!\n try {\n Component component0 = errorPage0.addFirst((Component) checkbox0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Cannot add a form element. No surrounding form found.\n //\n }\n }", "public void VerifyCouponfieldsinCheckout(){\r\n\t\tString countriess1 = \"Denmark,France,PresselSwitzerland,Norway,Spain,BernardFrance,,BernardBelgium,PresselAustria,UK,PresselGermany\";\r\n\t\tString countriess2 = \"Germany,Spain\";\r\n\t\tString countriess3 = \"Netherland,Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cupon Input txt box and Apply button should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess1.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput3inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"3 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"3 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess2.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"1 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"1 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess3.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"2 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"2 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"incorret country is entered in method for -\"+countries.get(countrycount));\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Incorrect country is entered in method for -\"+countries.get(countrycount)+\" or\"\r\n\t\t\t\t\t+ \" Element not found\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t\tthrow new Error(\"Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\r\n\t\tpublic void testParseOperator() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[2]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"*\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "protected void evalBranch(){\n List<Token> arguments = this.mainToken.getChilds();\n\n //Primer argumento es un string\n String stringExpression = arguments.get(0).getValue();\n //Removemos la referencia en la lista\n arguments.remove(0);\n\n String response = this.make(stringExpression, arguments);\n\n //Eliminar hojas\n this.setResponse(response);\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n // Undeclared exception!\n try { \n checkbox0.multiSelect(\"fieldset\", stringSelectModel0, \"Col component can be added only to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test183() throws Throwable {\n Submit submit0 = new Submit((Component) null, \" (position:\", \"kIh 4+,VlA$]12\");\n String string0 = submit0.eval((Object) null);\n assertEquals(\"null\", string0);\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "@Test(timeout = 4000)\n public void test360() throws Throwable {\n TextArea textArea0 = new TextArea((Component) null, (String) null, \"XYD6eL5K7VD|_+{7`{$\");\n // Undeclared exception!\n try { \n textArea0.dateInput((String) null, \"XYD6eL5K7VD|_+{7`{$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n Submit submit0 = new Submit((Component) null, \".\\\"=_m?KP<D\\\"\", \"style\");\n ActionExpression actionExpression0 = submit0.action(\"K]D$m.xC\");\n assertFalse(actionExpression0.isSubmissible());\n }", "@Test\n public void test119() throws Throwable {\n Form form0 = new Form(\".\");\n TextInput textInput0 = new TextInput(form0, \".\", \".\");\n // Undeclared exception!\n try {\n FormElement formElement0 = textInput0.buttonInput(\".\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test011() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ActionExpression actionExpression0 = new ActionExpression(\"'tj#~9z\");\n Form form0 = new Form(errorPage0, \"'tj#~9z\", actionExpression0);\n Submit submit0 = (Submit)form0.submit(\"'tj#~9z\");\n Form form1 = form0.id(\"'tj#~9z\");\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = (Table)errorPage0.table();\n Block block0 = (Block)table0.ins();\n ActionExpression actionExpression0 = new ActionExpression(\"java.lang.String@0000000005\");\n Form form0 = new Form(block0, \"? fOYd~2\", actionExpression0);\n TableBlock tableBlock0 = table0.tbody();\n form0.b((Object) tableBlock0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Table_1\", table0.getComponentId());\n }", "@Test\r\n public void changeText_FailedTest() {\n onView(withId(R.id.inputField)).perform(typeText(\"NewText\"),\r\n closeSoftKeyboard());\r\n reportHelper.label(\"myTestStepLabel_3_1\");\r\n onView(withId(R.id.switchActivity)).perform(click());\r\n\r\n reportHelper.label(\"myTestStepLabel_3_2\");\r\n // This view is in a different Activity, no need to tell Espresso.\r\n onView(withId(R.id.resultView)).check(matches(withText(\"errrrrrr\")));\r\n }", "public void VerifyCommentsField(){\r\n\t\tString countriesComments=\"Spain,France,Italy,Sweden,Germany,Netherland,Denmark,BernardFrance,BernardBelgium\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Comments should be present based on country\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriesComments.contains(countries.get(countrycount))){\r\n\t\t\t\tSystem.out.println(\"Comments field is present as \"+getPropertyValue(locator_split(\"txtCheckoutCommentssection\"), \"name\"));\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Comments field is present\");\r\n\t\t\t}else{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Comments field will not be present for this counry\");\r\n\t\t\t}\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Comments field is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutCommentssection\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test\n public void test141() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TableRow tableRow0 = new TableRow(errorPage0);\n Block block0 = (Block)tableRow0.td();\n // Undeclared exception!\n try {\n FormElement formElement0 = block0.submit(\"&5E<\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \" @\", \"@;3{-{.Zr,[&'oI\");\n Checkbox checkbox1 = new Checkbox(checkbox0, \"@;3{-{.Zr,[&'oI\", \"6F\\\"\");\n // Undeclared exception!\n try { \n checkbox1.script();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.noscript();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.title(\"unsupported feature \");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test272() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.submit(\"E-Fr\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n Checkbox checkbox0 = new Checkbox(label0, \"\", \"\");\n Component component0 = checkbox0.renderHint(\"\");\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test312() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"org.mvel.conversion.BooleanCH\");\n // Undeclared exception!\n try { \n xmlEntityRef0.radio(\"org.mvel.conversion.BooleanCH\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test220() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.getComponents();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void test020() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,\", \"LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.frame((CharSequence) \"LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "private void fillCreateOrEditForm(String name, String branch) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByVisibleText(xpathSelectBranch, branch);\n logger.info(\"# Select branch name: \" + branch);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n Form form0 = new Form(\"\\r\");\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"!XUOT>A8h|G\");\n // Undeclared exception!\n try { \n xmlEntityRef0.p((Object) form0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test087() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n TextInput textInput0 = new TextInput(errorPage0, (String) null, (String) null);\n // Undeclared exception!\n try {\n Component component0 = textInput0.u();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test(timeout = 4000)\n public void test243() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"6F\\\"\", \".}U.0/,SESI0vG=!];E\");\n // Undeclared exception!\n try { \n checkbox0.pre((Object) \"6F\\\"\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test013() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try {\n FormElement formElement0 = errorPage0.textInput(\"V\\\"i%{rPYE$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "@Test\r\n\t\tpublic void testCompileAllOperators() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 6\\nb = 6\\nc = a + (b * 4)\\nd = c / 3\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"opt_div\") && elementText.contains(\"opt_mult\") &! elementText.contains(\"opt_minus\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Test\n\tpublic void test5_verifyEditor() throws GeneralLeanFtException {\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"Test 5 - Verify Editor Started\");\n\t\t\t\n\t\t\t//Check that the Main window should exist\n\t\t\tassertTrue(mySet.appExistsorNot());\t\t\t\n\n\t\t\t//Toolbar Object\n\t\t\tToolBar toolbar = mySet.OR.MainWindow().ToolBar(); \n\n\t\t\t// Clicking the JEditorPane button displays the Editor test object.\n\t\t\ttoolbar.getButton(\"JEditorPane\").press();\n\n\t\t\t// Create a description for the Editor test object.\n\t\t\tEditor edit = mySet.OR.MainWindow().JEditor();\n\n\t\t\t// Verify that the editor in this AUT is read-only HTML with links.\n\t\t\tassertTrue(edit.isReadOnly());\n\n\t\t\t// Click the link to king.html.\n\t\t\tedit.clickLink(\"king.html\");\n\n\t\t\t// Verify that the correct page loaded by checking the text. \n\t\t\tString expectedTextPrefix = \"Do here most humbly lay this small Present\";\n\t\t\tString text = edit.getText().trim().replaceAll(\"[\\n\\r]\", \"\").replaceAll(Character.toString((char)160), \"\");\n\n\t\t\tSystem.out.println(\"Text fetched - \" + text); \n\n\t\t\tassertTrue(text.startsWith(expectedTextPrefix));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unexpected Error Occurred. Message = \" + e.getMessage());\n\t\t\tassertTrue(false);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Test 5 - Verify Editor finished\");\t\n\t\t}\n\t}", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}" ]
[ "0.63643783", "0.6277299", "0.56797767", "0.551471", "0.54289395", "0.54037565", "0.5375964", "0.5369713", "0.53673995", "0.53531957", "0.53345656", "0.53077126", "0.5301084", "0.52889323", "0.52385736", "0.523101", "0.52274716", "0.5226163", "0.52221763", "0.5220793", "0.520571", "0.51893014", "0.5184085", "0.5172529", "0.5167495", "0.5132842", "0.51109207", "0.51095885", "0.51082414", "0.51061773", "0.5075019", "0.5073853", "0.5071246", "0.5070101", "0.5060436", "0.5050353", "0.50381184", "0.5035702", "0.5034101", "0.50270903", "0.5011257", "0.50049096", "0.49962366", "0.49828497", "0.49690163", "0.49662584", "0.4955086", "0.49382478", "0.49358785", "0.49278614", "0.49008828", "0.4900425", "0.4891963", "0.4878109", "0.48756558", "0.48751268", "0.48721087", "0.48707825", "0.48593152", "0.48565045", "0.48558933", "0.48527044", "0.48509005", "0.4849938", "0.48463905", "0.48418805", "0.4841863", "0.48367923", "0.48292738", "0.4828559", "0.48260337", "0.48243943", "0.4822564", "0.48200834", "0.48192582", "0.4816496", "0.48141503", "0.47970247", "0.47873956", "0.47834882", "0.47795293", "0.4777227", "0.4761725", "0.4754284", "0.4747822", "0.47464028", "0.47462118", "0.47452042", "0.47450063", "0.47438273", "0.47423047", "0.47412124", "0.47321218", "0.47292912", "0.47190523", "0.47058222", "0.470535", "0.4704749", "0.47033182", "0.47013775" ]
0.5212712
20
Test case number: 22 / 1 covered goal: Goal 1. wheel.components.Component.kbd()Lwheel/components/Component;: rootBranch
@Test public void test022() throws Throwable { TextInput textInput0 = new TextInput((Component) null, (String) null, "Failed to initialize SimpleDateFormat with pattern '"); // Undeclared exception! try { Component component0 = textInput0.kbd(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"6F\\\"\", \"6F\\\"\");\n // Undeclared exception!\n try { \n checkbox0.kbd();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void upFocusCycle(Component paramComponent)\n/* */ {\n/* 1398 */ if (paramComponent != null) {\n/* 1399 */ paramComponent.transferFocusUpCycle();\n/* */ }\n/* */ }", "@Test\n public void TEST_GOTO_CHOOSING_UI() {\n GameData.mainMenuState = false;\n GameData.chooseDifficultyState = true;\n ChooseDifficultyUI testUI = new ChooseDifficultyUI();\n GameData.currentUI = testUI;\n\n assertFalse(GameData.currentUI.getClass() == ChoosingUI.class);\n assertFalse(GameData.chooseDifficultyState == false);\n assertFalse(GameData.choosingBoatState == true);\n //Create a click position at a point within the button's area (in this case, exactly central).\n Vector2 clickPosition = new Vector2(SCREEN_WIDTH/2, 100 + BUTTON_HEIGHT/2);\n testUI.getInput(SCREEN_WIDTH, clickPosition);\n //test that clickPosition is within area\n assertTrue(clickPosition.x < SCREEN_WIDTH / 2 - BUTTON_WIDTH / 2 + BUTTON_WIDTH);\n assertTrue(clickPosition.x > SCREEN_WIDTH / 2 - BUTTON_WIDTH / 2);\n assertTrue(clickPosition.y < 100 + BUTTON_HEIGHT);\n assertTrue(clickPosition.y > 100);\n //Check changes have been made.\n assertTrue(GameData.currentUI.getClass() == ChoosingUI.class);\n assertTrue(GameData.chooseDifficultyState == false);\n assertTrue(GameData.choosingBoatState == true);\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test\n \tpublic void testFocusHandling() throws FactoryException {\n \n \t\tMainUI ui = new MainUI();\n \t\tButtonPanel bp = new ButtonPanel();\n \t\tui.withModelInteractor(pi).withButtonPanel(bp);\n \t\tRobot robot = BasicRobot.robotWithCurrentAwtHierarchy();\n \n \t\tui.initialize();\n \t\tui.start();\n \t\tbp.start();\n \n \t\t// perform tab key press and wait until it took place\n \t\trobot.pressAndReleaseKey(KeyEvent.VK_TAB);\n \t\trobot.waitForIdle();\n \n \t\t// perform left key press and wait until it took place\n \t\trobot.pressAndReleaseKey(KeyEvent.VK_LEFT);\n \t\trobot.waitForIdle();\n \n \t\t// verify that the game registered the left key press and that it didn't\n \t\t// lose focus\n \t\tverify(pi).left();\n \t\tassertTrue(ui.isFocusOwner());\n \n \t}", "private boolean testTraversalComponent(Component comp){\n \n if (parent == null){\n return false;\n }\n \n /* Build list of focus traversable components in the parent component\n * This is only done once, unless resetReport is called */\n if (!tabTraversalPerformed){\n getTraversableComponents(parent);\n }\n \n if (!comp.hasFocus()){\n // try{\n comp.requestFocus();\n // Hack for our Windowing system - it invokes IllegalStateException if requestFocus isn't called from AWT thread\n // }catch(IllegalStateException exc){\n // // LOG ONLY -/\n // if(debugLog) {\n // System.err.println(\"EXCEPTION \" + exc.getMessage());\n // System.err.println(\"TRY TO CALL IT FROM AWT THREAD\");\n // }\n // final Component comp_final = comp;\n // try{\n // SwingUtilities.invokeAndWait(\n // new Runnable() {\n // public void run() {\n // comp_final.requestFocus();\n // }\n // });\n // }catch(Exception ex){\n // if(debugLog) System.err.println(\"EXCEPTION \" + ex.getMessage());\n //\n // }\n // }\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - After request focus | comp=\"+comp.getClass().getName()+\" hasFocus()=\"+comp.hasFocus());\n }\n \n tabTraversalFinished = false;\n switchTabbed = false;\n \n \n /* Attach custom focus listeners */\n org.netbeans.a11y.AccessibilityTester.TraversalFocusListener listener = new org.netbeans.a11y.AccessibilityTester.TraversalFocusListener();\n \n Iterator i = traversableComponents.iterator();\n while(i.hasNext()){\n ((Component)(i.next())).addFocusListener(listener);\n }\n \n org.netbeans.a11y.AccessibilityTester.TabTraversalTimeOut timeout = new org.netbeans.a11y.AccessibilityTester.TabTraversalTimeOut();\n timeout.start();\n \n /* Tab through all components */\n try{\n Robot robot = getRobot();\n \n // - LOG ONLY\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - Robot=\"+robot.hashCode());\n Iterator it = traversableComponents.iterator();\n int ssl=0;\n while(it.hasNext()){\n ssl++;\n Component fcp = (Component)(it.next());\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - [\"+ssl+\"] \"+fcp);\n }\n System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - Traversable Components + end - =======\");\n } // LOG ONLY -/\n \n \n if (traversableComponents.size() > 0){\n Component lastFocused = null;\n \n while(!tabTraversalFinished){\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> TAB Last Focused component=\"+lastFocused);\n \n try{\n Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY);\n } catch(InterruptedException e){}\n \n Component focusedComponent = listener.getFocusedComponent();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> Focused component=\"+focusedComponent);\n \n Component reallyFocusedComponent = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> Really Focused component=\"+reallyFocusedComponent);\n \n if((focusedComponent instanceof JTabbedPane) && !testSettings.TT_showingOnly) {\n robot.keyPress(KeyEvent.VK_RIGHT);\n robot.keyRelease(KeyEvent.VK_RIGHT);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> VK_LEFT Focused component=\"+lastFocused);\n \n try{\n Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY);\n } catch(InterruptedException e){}\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> TAB Focused component=\"+lastFocused);\n \n switchTabbed = true;\n }else\n switchTabbed = false;\n \n if((focusedComponent==null && lastFocused==null) &&\n !( (reallyFocusedComponent instanceof JTextComponent) ||\n (reallyFocusedComponent instanceof JTabbedPane) ||\n (reallyFocusedComponent instanceof JTable)) ) {\n \n if(debugLog) System.err.println(LOG_CAPTION+\" - ERROR : It's impossible test Tab traversal. After TAB, CTRL + TAB or RIGHT hitting nothing happends.\");\n \n return false;\n }\n \n if (focusedComponent==lastFocused){\n // Component probably swallowed Tab keypress so try Ctrl-Tab\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_TAB);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - --> CONTROL_TAB Focused component=\"+focusedComponent);\n \n try{ Thread.currentThread().sleep(TAB_TRAVERSAL_DELAY); } catch(InterruptedException e){}\n \n focusedComponent = listener.getFocusedComponent();\n \n if ((focusedComponent == lastFocused) && (!switchTabbed)){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testTraversalComponent(Component)> - !!!!! LOCK !!!!! \"+focusedComponent + \"==\" + lastFocused);\n \n // Stuck or window lost focus, so give up\n break;\n }\n }\n lastFocused = focusedComponent;\n }\n }\n }catch(AWTException e){ e.printStackTrace();}\n \n timeout.cancel();\n \n /* Detach focus listeners */\n i = traversableComponents.iterator();\n while(i.hasNext()){\n ((Component)(i.next())).removeFocusListener(listener);\n }\n \n /* Set flag to show at least one tab traversal performed */\n tabTraversalPerformed = true;\n \n return true;\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "@Test\r\n\tpublic void TC101() {\r\n\t\t\r\n\t\t// 1. User opens the JBrick application\r\n\t\t// => The Code Frame has one file open in the code frame (center) and a status pane (bottom)\r\n\t\t// (No file has been opened before hand, this is the equivalent to opening the application for the first time.)\r\n\t\t\r\n\t\tMainWindow jbricks = StartupFunctions.newJBricksInstance(\"JBricks - TC101\");\r\n\t\tComponent editorPane = ContainerFunctions.getEditorPane(jbricks);\r\n\t\tComponent statusPane = ContainerFunctions.getStatusPane(jbricks);\r\n\t\t\r\n\t\tassertTrue(editorPane.getLocationOnScreen().getY() < statusPane.getLocationOnScreen().getY());\r\n\t\t\r\n\t}", "private void Button_SqaureRootActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_SqaureRootActionPerformed\n // TODO add your handling code here:\n }", "@Test\n public void test007() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.kbd((Object) errorPage0);\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "public static void main(String[] args) {\n int progressId = 1;\n Map<Integer, Set<Entity>> progressEntities = new HashMap<>();\n Set<Entity> map000entity = new HashSet<>();\n map000entity.add(new Entity(new LocationPair<>(9.5F, 12.5F), Entity.TOWARD_RIGHT, \"Cirno\") {\n int useRefresh = 10;\n int activeTime = 80;\n boolean acting = true;\n\n @Override\n public void onRegisiter() {\n this.setMovingWay(MOVING_FASTER);\n }\n\n @Override\n public void onUnRegisiter() {\n System.out.println(\"Entity was unregisitered.\");\n }\n\n @Override\n public void action() {\n if (acting) {\n if (activeTime >= 0) {\n this.setToward(Entity.TOWARD_RIGHT);\n this.setWonderMoving(Entity.GOTOWARD_RIGHT);\n } else {\n this.setToward(Entity.TOWARD_LEFT);\n this.setWonderMoving(Entity.GOTOWARD_LEFT);\n }\n }\n if (isLastMovingSucceed()) {\n if (++activeTime >= 160) {\n activeTime = -160;\n }\n }\n if (useRefresh > 0) {\n useRefresh--;\n }\n }\n\n @Override\n public void onUse() {\n if (useRefresh == 0) {\n Keyboard.setState(Keyboard.STATE_DIALOG);\n acting = false;\n int moving = this.getMoving();\n int wonderMoving = this.getWonderMoving();\n int toward = this.getToward();\n this.setMoving(Entity.NOTGO);\n this.setWonderMoving(Entity.NOTGO);\n this.facePlayer();\n System.out.println(\"Changed the state of Keyboard.\");\n Case progress = new Case(\"test.entity.prs\", 2, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n EventManager.getInstance().performedNp(this, 0);\n Resource.regisiterMisc(new Misc() {\n @Override\n public void invoke() {\n if (Resource.getMapId() == 1) {\n this.completed();\n Keyboard.setState(Keyboard.STATE_DIALOG);\n ArrayList<String> str = new ArrayList<>();\n str.add(Localization.query(\"test.misc\"));\n SimpleTalkingDialog std = new SimpleTalkingDialog(str, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n });\n std.init();\n GameFrame.getInstance().regisiterDialog(std);\n System.out.println(\"Invoked misc.\");\n }\n }\n });\n System.out.println(\"Progress ID is now 0.\");\n System.out.println(\"Changed the state of Keyboard.\");\n useRefresh = 40;\n });\n Case hello = new Case(\"test.entity.faq\", 3, () -> {\n ArrayList<String> str = new ArrayList<>();\n str.add(Localization.query(\"test.entity.hello1\"));\n str.add(Localization.query(\"test.entity.hello2\"));\n SimpleTalkingDialog std = new SimpleTalkingDialog(str, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n useRefresh = 40;\n });\n std.init();\n GameFrame.getInstance().regisiterDialog(std);\n System.out.println(\"Changed the state of Keyboard.\");\n });\n Case back = new Case(\"test.entity.buff\", 4, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n Resource.getPlayer().addBuff(new SpeedBuff(600, 1.5F));\n System.out.println(\"Changed the state of Keyboard.\");\n useRefresh = 40;\n });\n progress.setRelation(hello, null, hello);\n hello.setRelation(back, progress, back);\n back.setRelation(null, hello, null);\n progress.init();\n hello.init();\n back.init();\n List<Case> cases = new ArrayList<>();\n cases.add(progress);\n cases.add(hello);\n cases.add(back);\n ArrayList<String> strs = new ArrayList<>();\n strs.add(Localization.query(\"test.entity.title\"));\n\t\t\t\t\tTalkingDialog dialog = new TalkingDialog(strs, cases);\n\t\t\t\t\tdialog.init();\n GameFrame.getInstance().regisiterDialog(dialog);\n }\n useRefresh = 10;\n }\n });\n Set<Entity> map002entity = new HashSet<>();\n List<String> greet = new ArrayList<>();\n greet.add(\"test.entity.npc\");\n map002entity.add(new FriendlyNPC(new LocationPair<>(9.5F, 7.5F), Entity.TOWARD_DOWN, \"Sanae\", 3, greet));\n progressEntities.put(0, map000entity);\n progressEntities.put(2, map002entity);\n Map<Integer, Set<Item>> progressItems = new HashMap<>();\n boolean withDefaultProgress = true;\n //*/\n\n\n /*\n int progressId = 0;\n Map<Integer, Set<Entity>> progressEntities = new HashMap<>();\n Map<Integer, Set<Item>> progressItems = new HashMap<>();\n boolean withDefaultProgress = true;\n */\n\n\n try {\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File(\"resources/object/progress\", \"progress\" + String.format(\"%03d\", progressId) + \".prs\")));\n oos.writeObject(new Progress(progressId, progressEntities, progressItems, withDefaultProgress));\n oos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void processKeyEvent(Component paramComponent, KeyEvent paramKeyEvent)\n/* */ {\n/* 1118 */ if (consumeProcessedKeyEvent(paramKeyEvent)) {\n/* 1119 */ return;\n/* */ }\n/* */ \n/* */ \n/* 1123 */ if (paramKeyEvent.getID() == 400) {\n/* 1124 */ return;\n/* */ }\n/* */ \n/* 1127 */ if ((paramComponent.getFocusTraversalKeysEnabled()) && \n/* 1128 */ (!paramKeyEvent.isConsumed()))\n/* */ {\n/* 1130 */ AWTKeyStroke localAWTKeyStroke1 = AWTKeyStroke.getAWTKeyStrokeForEvent(paramKeyEvent);\n/* 1131 */ AWTKeyStroke localAWTKeyStroke2 = AWTKeyStroke.getAWTKeyStroke(localAWTKeyStroke1.getKeyCode(), localAWTKeyStroke1\n/* 1132 */ .getModifiers(), \n/* 1133 */ !localAWTKeyStroke1.isOnKeyRelease());\n/* */ \n/* */ \n/* */ \n/* 1137 */ Set localSet = paramComponent.getFocusTraversalKeys(0);\n/* */ \n/* 1139 */ boolean bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1140 */ boolean bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1142 */ if ((bool1) || (bool2)) {\n/* 1143 */ consumeTraversalKey(paramKeyEvent);\n/* 1144 */ if (bool1) {\n/* 1145 */ focusNextComponent(paramComponent);\n/* */ }\n/* 1147 */ return; }\n/* 1148 */ if (paramKeyEvent.getID() == 401)\n/* */ {\n/* 1150 */ this.consumeNextKeyTyped = false;\n/* */ }\n/* */ \n/* 1153 */ localSet = paramComponent.getFocusTraversalKeys(1);\n/* */ \n/* 1155 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1156 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1158 */ if ((bool1) || (bool2)) {\n/* 1159 */ consumeTraversalKey(paramKeyEvent);\n/* 1160 */ if (bool1) {\n/* 1161 */ focusPreviousComponent(paramComponent);\n/* */ }\n/* 1163 */ return;\n/* */ }\n/* */ \n/* 1166 */ localSet = paramComponent.getFocusTraversalKeys(2);\n/* */ \n/* 1168 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1169 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1171 */ if ((bool1) || (bool2)) {\n/* 1172 */ consumeTraversalKey(paramKeyEvent);\n/* 1173 */ if (bool1) {\n/* 1174 */ upFocusCycle(paramComponent);\n/* */ }\n/* 1176 */ return;\n/* */ }\n/* */ \n/* 1179 */ if ((!(paramComponent instanceof Container)) || \n/* 1180 */ (!((Container)paramComponent).isFocusCycleRoot())) {\n/* 1181 */ return;\n/* */ }\n/* */ \n/* 1184 */ localSet = paramComponent.getFocusTraversalKeys(3);\n/* */ \n/* 1186 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1187 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1189 */ if ((bool1) || (bool2)) {\n/* 1190 */ consumeTraversalKey(paramKeyEvent);\n/* 1191 */ if (bool1) {\n/* 1192 */ downFocusCycle((Container)paramComponent);\n/* */ }\n/* */ }\n/* */ }\n/* */ }", "public static void main(String[] args) {\nint score = 91;\nString grade;\nif (score >90)\n{\n\tgrade = \"A\";\n}\n\n\n\nelse if (score>=80)\n{\n\tgrade = \"B\";\n}\n//THis is to test Git\n//THis is to test Git\n//THis is to test Git2\n//This is to test the brach made by gitdemo\n//Change from GitX\nelse \n{\n\tgrade = \"C\";\n}\nSystem.out.println(grade);\n}", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.id(\".?p5{ul\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void clickCheckoutButton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- CheckOut button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"btnCheckout\"));\r\n\t\t\tclick(locator_split(\"btnCheckout\")); \r\n\t\t\tsleep(1000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- CheckOut button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- CheckOut button is not clicked \"+elementProperties.getProperty(\"btnCheckout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnCheckout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t\tReporter.log(\"Clicked on Checkout button\");\r\n\t}", "@Test(timeout = 4000)\n public void test190() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"org.mvel.conversion.IntegerCH$10\");\n TextInput textInput0 = new TextInput(xmlEntityRef0, \"org.mvel.conversion.IntegerCH$10\", \"org.mvel.conversion.IntegerCH$10\");\n // Undeclared exception!\n try { \n textInput0._getTopLevelComponent(true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void testGetButton() {\n\t\tassertEquals(this.myButton.getJComponent(),this.myButton.getButton());\n\t}", "private void setupAssociatedBranchesAType(Map<Integer, Double> inputBranchWithJ)\r\n\t{\r\n\t\tgetOppositeParityEnergies(currentK);\r\n\t\tArrayList<Map<Integer, Double>> branches = new ArrayList<Map<Integer, Double>>();\r\n\t\tint jOffset = 0;\r\n\r\n\t\tif (IS_EVEN_SELECTION_RULES) {\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"Q\")) {\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\t\t\t\t\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -1, 1, 0, -1, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 1, -1, 1, 0, false, true);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"P-<-\", \"R-<-\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -1, 1, 0, -1, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 1, -1, 1, 0, true, false);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"P+<+\", \"R+<+\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"R\")) {\r\n\t\t\t\tjOffset = 1;\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, 1, -1, 1, 0, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 2, -1, 2, 0, true, true);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q+<-\", \"P+<+\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, 1, -1, 1, 0, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 2, -1, 2, 0, false, false);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q-<+\", \"P-<-\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"P\")) {\r\n\t\t\t\tjOffset = -1;\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, -1, 1, 0, -1, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -2, 1, 0, -2, true, true);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q+<-\", \"R+<+\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, -1, 1, 0, -1, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -2, 1, 0, -2, false, false);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q-<+\", \"R-<-\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"Q\")) {\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\t\t\t\t\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -1, 1, 0, -1, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 1, -1, 1, 0, false, true);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"P+<-\", \"R+<-\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -1, 1, 0, -1, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 1, -1, 1, 0, true, false);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"P-<+\", \"R-<+\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"R\")) {\r\n\t\t\t\tjOffset = 1;\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, 1, -1, 1, 0, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 2, -1, 2, 0, true, true);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q-<-\", \"P-<+\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, 1, -1, 1, 0, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedP, 2, -1, 2, 0, false, false);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedP);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q+<+\", \"P+<-\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (INPUT_BRANCH_TYPE.equals(\"P\")) {\r\n\t\t\t\tjOffset = -1;\r\n\t\t\t\tcalculateUpperEnergiesLevelsWithJ(inputBranchWithJ, jOffset);\r\n\t\t\t\t\r\n\t\t\t\tif (currentK >= 0) {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, -1, 1, 0, -1, true, false);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -2, 1, 0, -2, true, true);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q-<-\", \"R-<+\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedQ, -1, 1, 0, -1, false, true);\r\n\t\t\t\t\tcalculateAssociatedATypeBranches(associatedR, -2, 1, 0, -2, false, false);\r\n\t\t\t\t\tbranches.add(associatedQ);\r\n\t\t\t\t\tbranches.add(associatedR);\r\n\t\t\t\t\tfindLineMatchesFromPredictions(branches, \"Q+<+\", \"R+<-\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (TRANSITION_TYPE.equals(\"b-type\")) {\r\n\t\t\t//The 2 and -2 represent \"get lower energies with K +2 / -2 offset from the current K value, if it exists\"\r\n\t\t\tsetupTriangularTypes(2);\r\n\t\t\tsetupTriangularTypes(-2);\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"/c[~rNl!Ma-\", \"kIh 4+,VlA$]12\");\n ElExpression elExpression0 = new ElExpression(\"J>w9x0K2Bs|BOY\");\n // Undeclared exception!\n try { \n submit0.eval(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void clickMastercard(){\t\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Mastercard should be clicked\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\twaitforElementVisible(locator_split(\"imgMasterCard\"));\r\n\t\t\tclick(locator_split(\"imgMasterCard\"));\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Mastercard is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- imgMasterCard not clicked \"+elementProperties.getProperty(\"imgMasterCard\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgMasterCard\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "private void BuildingCombo() {\n \n }", "@Test\n public void buttonOne_initiates_game_matching_shapes() {\n\n }", "@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }", "@Test\n\tpublic void testAppliedTargets(){\n\t\ttry{\n\t\t\tchord = new Chord(1, \"4/4\");\n\t\t\tassertEquals(7, chord.getRoot());\n\t\t\tassertEquals(4, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"5/5\");\n\t\t\tassertEquals(2, chord.getRoot());\n\t\t\tassertEquals(5, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"7/6\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(6, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"4/2\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(2, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(6, \"4/7\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(2, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"1\");\n\t\t\tassertEquals(0, chord.getAppliedTarget());\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(e.getMessage());\n\t\t}\n\t}", "public static void main(String[] args) throws InterruptedException\n\t{\n\n\t\tRobot rbt;\n\t\ttry {\n\t\t\trbt = new Robot();\n\t\t\t//JavaRobotKeys jrb = new JavaRobotKeys();\n\t\t\tThread.sleep(10000);\n\t\t\t//rbt.keyPress(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_C);\n\t\t\trbt.keyRelease(KeyEvent.VK_C);\n\t\t\trbt.keyPress(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_SEMICOLON);\n\t\t\trbt.keyRelease(KeyEvent.VK_SEMICOLON);\n\t\t\trbt.keyRelease(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_BACK_SLASH);\n\t\t\trbt.keyRelease(KeyEvent.VK_BACK_SLASH);\n\t\t\t//rbt.keyRelease(KeyEvent.VK_SHIFT);\n\t\t\t//rbt.keyPress(KeyEvent.VK_SLASH);\n\t\t\t//rbt.keyPress(KeyEvent.VK_SLASH);\n\t\t\trbt.keyPress(KeyEvent.VK_K);\n\t\t\trbt.keyRelease(KeyEvent.VK_K);\n\t\t\trbt.keyPress(KeyEvent.VK_E);\n\t\t\trbt.keyRelease(KeyEvent.VK_E);\n\t\t\trbt.keyPress(KeyEvent.VK_Y);\n\t\t\trbt.keyRelease(KeyEvent.VK_Y);\n\t\t\trbt.keyPress(KeyEvent.VK_S);\n\t\t\trbt.keyRelease(KeyEvent.VK_S);\n\t\t\trbt.keyPress(KeyEvent.VK_BACK_SLASH);\n\t\t\trbt.keyRelease(KeyEvent.VK_BACK_SLASH);\n\t\t\trbt.keyPress(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_H);\n\t\t\trbt.keyRelease(KeyEvent.VK_H);\n\t\t\trbt.keyRelease(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_U);\n\t\t\trbt.keyRelease(KeyEvent.VK_U);\n\t\t\trbt.keyPress(KeyEvent.VK_R);\n\t\t\trbt.keyRelease(KeyEvent.VK_R);\n\t\t\trbt.keyPress(KeyEvent.VK_I);\n\t\t\trbt.keyRelease(KeyEvent.VK_I);\n\t\t\trbt.keyPress(KeyEvent.VK_X);\n\t\t\trbt.keyRelease(KeyEvent.VK_X);\n\t\t\trbt.keyPress(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_Q);\n\t\t\trbt.keyRelease(KeyEvent.VK_Q);\n\t\t\trbt.keyPress(KeyEvent.VK_A);\n\t\t\trbt.keyRelease(KeyEvent.VK_A);\n\t\t\trbt.keyRelease(KeyEvent.VK_SHIFT);\n\t\t\trbt.keyPress(KeyEvent.VK_0);\n\t\t\trbt.keyRelease(KeyEvent.VK_0);\n\t\t\trbt.keyPress(KeyEvent.VK_0);\n\t\t\trbt.keyRelease(KeyEvent.VK_0);\n\t\t\trbt.keyPress(KeyEvent.VK_1);\n\t\t\trbt.keyRelease(KeyEvent.VK_1);\n\t\t\trbt.keyPress(KeyEvent.VK_PERIOD);\n\t\t\trbt.keyRelease(KeyEvent.VK_PERIOD);\n\t\t\trbt.keyPress(KeyEvent.VK_P);\n\t\t\trbt.keyRelease(KeyEvent.VK_P);\n\t\t\trbt.keyPress(KeyEvent.VK_E);\n\t\t\trbt.keyRelease(KeyEvent.VK_E);\n\t\t\trbt.keyPress(KeyEvent.VK_M);\n\t\t\trbt.keyRelease(KeyEvent.VK_M);\n\t\t\trbt.keyPress(KeyEvent.VK_ENTER);\n\t\t\trbt.keyRelease(KeyEvent.VK_ENTER);\n\n\n\t\t} catch (AWTException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "protected void okPressed() {\r\n \t\tArrayList resources= new ArrayList(10);\r\n \t\tfindCheckedResources(resources, (IContainer)fTree.getInput());\r\n \t\tif (fWorkingSet == null)\r\n \t\t\tfWorkingSet= new WorkingSet(getText().getText(), resources.toArray());\r\n \t\telse if (fWorkingSet instanceof WorkingSet) {\r\n \t\t\t// Add not accessible resources\r\n \t\t\tIResource[] oldResources= fWorkingSet.getResources();\r\n \t\t\tfor (int i= 0; i < oldResources.length; i++)\r\n \t\t\t\tif (!oldResources[i].isAccessible())\r\n \t\t\t\t\tresources.add(oldResources[i]);\r\n \r\n \t\t\t((WorkingSet)fWorkingSet).setName(getText().getText());\r\n \t\t\t((WorkingSet)fWorkingSet).setResources(resources.toArray());\r\n \t\t}\r\n \t\tsuper.okPressed();\r\n \t}", "private void findFocusableComponent(Component comp, Container cont, FocusTraversalPolicy fp) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <findFocusableComponent(Component,Container,FocusTraversalPolicy)> - COMP= \" + comp);\n \n if(comp instanceof Container) {\n Container comp_cont = (Container) comp;\n if(comp_cont.isFocusCycleRoot()){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <findFocusableComponent(Component,Container,FocusTraversalPolicy)> - is root\");\n \n findFocusableContainer(comp_cont);\n } else {\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <findFocusableComponent(Component,Container,FocusTraversalPolicy)> - isn't root\");\n \n // Component next = fp.getComponentAfter(cont,comp);\n Component next = fp.getComponentAfter(comp.getFocusCycleRootAncestor(),comp);\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <findFocusableComponent(Component,Container,FocusTraversalPolicy)> - COMP next=\"+next);\n \n if(next == cont || focused.contains(next)){\n \n //- LOG ONLY\n if(debugLog)System.err.println(LOG_CAPTION+\" - <findFocusableComponent(Component,Container,FocusTraversalPolicy)> - next==cont / \"+ (next==cont) + \" >< focused.contains() / \"+focused.contains(next));\n \n return;\n }else{\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <findFocusableComponent(Component,Container,FocusTraversalPolicy)> - ADDED\");\n \n focused.add(next);\n }\n \n findFocusableComponent(next, cont, fp);\n }\n }\n }", "public void verify() {\n lblPaletteContent();\n treePaletteContentsTree();\n lblJLabel();\n btMoveUp();\n btMoveDown();\n btRemove();\n btNewCategory();\n btAddFromJAR();\n btAddFromLibrary();\n btAddFromProject();\n btResetPalette();\n btClose();\n }", "static void jump_when_carry(String passed){\n\t\tif(CS)\n\t\t\tcomplete_jump_req(passed.substring(3));\n\t}", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void whenTryExecuteAdditionShouldCheckThatIsWorkCorrect() {\n String[] answer = new String[]{\"1.0\", \"y\"};\n StubIO stubIO = new StubIO(answer);\n MenuCalculator menuCalculator = new MenuCalculator(new Calculator(), stubIO, actions);\n menuCalculator.fillActions();\n String expected = \"0.0 + 1.0 = 1.0\\n\";\n final int command = 0;\n\n menuCalculator.select(command);\n\n assertThat(stubIO.getOut(), is(expected));\n }", "@Test\r\n\t\tpublic void testCompilePuts() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tString a = \"the_best_cat = \\\"Noogie Cat\\\" \\nputs \\\"The best cat is: \\\" + the_best_cat\";\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(a);;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"putstring\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test220() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.getComponents();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void handleCompositeCommand1() {\n }", "@Test\n\tpublic void testAddLinkOkComponent() {\n\t\tSubmenu root = new Submenu(\"root\");\n\t\tAssert.assertNull(root.getParentBean());\n\t\tAssert.assertEquals(\"root\", root.getName());\n\t\tAssert.assertNull(root.getMenuentrys());\n\n\t\tMenuItem item1 = new MenuItem(\"item1\");\n\t\tAssert.assertNull(item1.getParentBean());\n\t\troot.addMenuentry(item1);\n\t\tAssert.assertEquals(1, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, root.getMenuentrys().iterator().next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\n\t\tSubmenu submenu1 = new Submenu(\"submenu1\");\n\t\tAssert.assertNull(submenu1.getParentBean());\n\t\troot.addMenuentry(submenu1);\n\n\t\tIterator<?> iter = root.getMenuentrys().iterator();\n\t\tAssert.assertEquals(2, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, iter.next());\n\t\tAssert.assertSame(submenu1, iter.next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\t\tAssert.assertSame(root, submenu1.getParentBean());\n\t}", "public void onKeyEvent(String ke) {\n if (ke.equals(\"b\")) {\n bfs = true;\n dfs = false;\n manual = false;\n reset();\n }\n else if (ke.equals(\"d\")) {\n bfs = false;\n dfs = true;\n manual = false;\n reset();\n }\n else if (ke.equals(\"p\")) {\n bfs = false;\n dfs = false;\n manual = true;\n reset();\n }\n else if (ke.equals(\"r\")) {\n boardSetup();\n }\n else if (manual) {\n if (p.hasNext()) {\n if (ke.equals(\"left\")) {\n p.moveLeft();\n }\n else if (ke.equals(\"up\")) {\n p.moveUp();\n }\n else if (ke.equals(\"right\")) {\n p.moveRight();\n }\n else if (ke.equals(\"down\")) {\n p.moveDown();\n }\n }\n }\n }", "@Test\r\n public void test() {\n assertEquals(JShell.getWorkingDir().toString(), \"MASTER\");\r\n\r\n // Test setWorkingDir\r\n ArrayList<String> testMKDIR = new ArrayList<String>();\r\n // Directories made for testCase1 \"a\"\r\n String[] testCasesMKDIR1 = {\"mkdir\", \"a\"};\r\n testMKDIR.addAll(Arrays.asList(testCasesMKDIR1));\r\n MKDIR.execute(testMKDIR);\r\n // CD changes sets the working directory to \"a\"\r\n ArrayList<String> testCD2 = new ArrayList<String>();\r\n String[] testCasesCD2 = {\"cd\", \"a\"};\r\n testCD2.addAll(Arrays.asList(testCasesCD2));\r\n CD.execute(testCD2);\r\n // See if the directory has been changed\r\n assertEquals(JShell.getWorkingDir().toString(), \"a\");\r\n\r\n // Test getInputs and setInputs is shown in HISTORYTest - redundant code\r\n // Test getDirHistory and setDirHistory is shown in POPDTest and PUSHDTest -\r\n // redundant code\r\n }", "public void getBranchCommand() {\n\n }", "public void focusNextComponent(Component paramComponent)\n/* */ {\n/* 1380 */ if (paramComponent != null) {\n/* 1381 */ paramComponent.transferFocus();\n/* */ }\n/* */ }", "@Test(groups = {\"Sprint54\"}, description = \"Advanced search bar should be opened in No Java applet, no task area, but show Go To shortcuts layout.\")\r\n\tpublic void SprintTest54_1_20_5() throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select No Java applet, no task area layout and save the settings\r\n\t\t\t//-------------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);\r\n\r\n\t\t\tif(configurationPage.configurationPanel.isJavaAppletEnabled())\r\n\t\t\t\tthrow new Exception(\"Java applet is enabled\");\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value);\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Save the settings\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved after changing its layout.\");\r\n\r\n\t\t\tLog.message(\"1. No java applet with task area with go to layout is selected and saved.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. No java applet with task area with go to layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and click Advanced Search in search pane\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\t\t\thomePage.searchPanel.clickAdvancedSearch(true); //Clicks Advanced search button\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and advanced search button is clicked.\");\r\n\r\n\t\t\t//Verification : Verify if advanced search is displayed\r\n\t\t\t//-----------------------------------------------------\r\n\t\t\tif (homePage.searchPanel.isAdvancedSearchDisplayed()) //Verifies if Advanced search is displayed in No Java applet, no task area, but show Go To shortcuts layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Advanced search is displayed in No java applet with Task area only layout.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Advanced search is not displayed in No java applet with Task area only layout.\", driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "private void setupKeyMaps() {\n JPanel c = (JPanel) ((JLayeredPane) ((JRootPane) this.getComponents()[0]).getComponents()[1]).getComponents()[0];\n for (Component com : c.getComponents()) {\n if (com.getClass() == JButton.class || com.getClass() == JCheckBox.class || com.getClass() == JToggleButton.class) {\n ((JComponent) com).getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"SPACE\"), \"none\");\n }\n if (com.getClass() == JTabbedPane.class) {\n for (Component com2 : ((JTabbedPane) com).getComponents()) {\n for (Component com3 : ((JPanel) com2).getComponents()) {\n if (com3.getClass() == JButton.class || com3.getClass() == JCheckBox.class || com3.getClass() == JToggleButton.class) {\n ((JComponent) com3).getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"SPACE\"), \"none\");\n }\n }\n }\n }\n }\n \n getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(\n KeyStroke.getKeyStroke(\"SPACE\"), \"spacePressed\");\n getRootPane().getActionMap().put(\"spacePressed\", new AbstractAction(){\n private static final long serialVersionUID = 1L;\n @Override\n public void actionPerformed(ActionEvent e) {\n changeButton.doClick();\n }\n });\n \n getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(\n KeyStroke.getKeyStroke(\"ESCAPE\"), \"escapePressed\");\n getRootPane().getActionMap().put(\"escapePressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n bodiesComboBox.setSelectedIndex(-1);\n }\n });\n \n sunRadioButton.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n sunRadioButton.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n sunRadioButton.setSelected(true);\n }\n });\n \n planetRadioButton.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n planetRadioButton.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n planetRadioButton.setSelected(true);\n }\n });\n \n addNewBodyButton.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n addNewBodyButton.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n addNewBodyButton.doClick();\n }\n });\n \n bodiesComboBox.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n bodiesComboBox.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n bodiesComboBox.setPopupVisible(!bodiesComboBox.isPopupVisible());\n }\n });\n \n colorComboBoxAdd.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n colorComboBoxAdd.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n colorComboBoxAdd.setPopupVisible(!colorComboBoxAdd.isPopupVisible());\n }\n });\n \n moveableCheckBoxEdit.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n moveableCheckBoxEdit.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n moveableCheckBoxEdit.setSelected(!moveableCheckBoxEdit.isSelected());\n }\n });\n \n moveableCheckBoxAdd.getInputMap(JComponent.WHEN_FOCUSED).put(\n KeyStroke.getKeyStroke(\"ENTER\"), \"enterPressed\");\n moveableCheckBoxAdd.getActionMap().put(\"enterPressed\", new AbstractAction(){\n @Override\n public void actionPerformed(ActionEvent e) {\n moveableCheckBoxAdd.setSelected(!moveableCheckBoxAdd.isSelected());\n }\n });\n }", "private void level7() {\n }", "@Test(timeout = 4000)\n public void test213() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"wh\\\"vVQ `'HnBv\", \"~qV]vimZJQ;pcba\");\n // Undeclared exception!\n try { \n checkbox0.get(\"4_R]T<#2)Q?]R7Ut\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Could not find component with id '4_R]T<#2)Q?]R7Ut'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void clickSubmitInkAndTonnerSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public void ClickChecoutSubmitbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btncheckoutregistrationsubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutregistrationsubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@ParameterizedTest\n @MethodSource(value = \"createEverythingGoals\")\n\tpublic void AC1MultiLevelled(Goal everythingGoal) {\n\t\tGame g1 = Game.createMockGame(everythingGoal, \"\"\n\t\t\t+ \"PS! \\n\"\n\t\t\t+ \"TE B_ \\n\"\n\t\t);\n\t\t\n\t\tg1.movePlayer(Direction.DOWN);\n\t\tg1.movePlayer(Direction.UP);\n\t\tg1.movePlayer(Direction.RIGHT);\n\t\t\n\t\tg1.swingSword(Direction.RIGHT);\n\t\t\n\t\tg1.movePlayer(Direction.DOWN);\n\t\tg1.movePlayer(Direction.RIGHT);\n\t\tg1.movePlayer(Direction.RIGHT);\n\t\t\n\t\tassertEquals(\"\"\n\t\t\t+ \" \\n\"\n\t\t\t+ \" E PB \\n\"\n\t\t\t, g1.getBoardString()\n\t\t);\n\t\t\n\t\tassertFalse(g1.getHasWon());\n\t\t\n\t\tg1.movePlayer(Direction.LEFT);\n\t\tg1.movePlayer(Direction.LEFT);\n\t\t\n\t\tassertTrue(g1.getHasWon());\n\t\t\n\t\tGame g2 = Game.createMockGame(everythingGoal, \"\"\n\t\t\t+ \"PS! \\n\"\n\t\t\t+ \"TE B_ E\\n\"\n\t\t);\n\t\t\n\t\tg2.movePlayer(Direction.DOWN);\n\t\tg2.movePlayer(Direction.UP);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\t\n\t\tg2.swingSword(Direction.RIGHT);\n\t\t\n\t\tg2.movePlayer(Direction.DOWN);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\t\n\t\tassertEquals(\"\"\n\t\t\t+ \" \\n\"\n\t\t\t+ \" E PBE\\n\"\n\t\t\t, g2.getBoardString()\n\t\t);\n\t\t\n\t\tg2.movePlayer(Direction.LEFT);\n\t\tg2.movePlayer(Direction.LEFT);\n\t\tg2.movePlayer(Direction.LEFT);\n\t\t\n\t\tassertEquals(\"\"\n\t\t\t+ \" \\n\"\n\t\t\t+ \" P _BE\\n\"\n\t\t\t, g2.getBoardString()\n\t\t);\n\t\t\n\t\tassertFalse(g2.getHasWon());\n\n\t\tg2.movePlayer(Direction.UP);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\tg2.movePlayer(Direction.DOWN);\n\t\tg2.movePlayer(Direction.LEFT);\n\n\t\tassertEquals(\"\"\n\t\t\t+ \" \\n\"\n\t\t\t+ \" E BPE\\n\"\n\t\t\t, g2.getBoardString()\n\t\t);\n\t\t\n\t\tassertFalse(g2.getHasWon());\n\n\t\tg2.movePlayer(Direction.RIGHT);\n\t\t\n\t\tassertTrue(g2.getHasWon());\n\t\n\t\tGame g3 = Game.createMockGame(everythingGoal, \"\"\n\t\t\t+ \"S! \\n\"\n\t\t\t+ \"BE \\n\"\n\t\t\t+ \"_T \\n\"\n\t\t\t, \"\"\n\t\t\t+ \"P \\n\"\n\t\t\t+ \" \\n\"\n\t\t\t+ \" \\n\"\n\t\t);\n\t\t\n\t\tg3.swingSword(Direction.RIGHT);\n\t\t\n\t\tg3.movePlayer(Direction.DOWN);\n\t\tg3.movePlayer(Direction.RIGHT);\n\t\tg3.movePlayer(Direction.DOWN);\n\t\t\n\t\tassertFalse(g3.getHasWon());\n\t\t\n\t\tg3.movePlayer(Direction.UP);\n\t\t\n\t\tassertTrue(g3.getHasWon());\n }", "public void ClickMyAccountContinueShopping(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Registration continue shopping should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountContinueShopping\"));\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tSystem.out.println(\"My Account Registration continue shopping is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration continue shopping is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration continue shopping is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountContinueShopping\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\t@Test\n\tpublic void testDefaultFocusIsAsExpected() throws Throwable {\n\t\tList<String> expectedDefaultFocus = getExpectedDefaultActivePath();\n\t\tassumeNotNull(expectedDefaultFocus);\n\t\tm.build();\n\n\t\tSet<TargetObject> activatable = getActivatableThings();\n\t\tMap<List<String>, TargetInterpreter> found =\n\t\t\tm.findAll(TargetInterpreter.class, getExpectedSessionPath(), true);\n\t\t// The default must be one of the activatable objects\n\t\tObject[] keys = found.keySet().toArray();\n\t\tTargetObject obj = found.get(keys[keys.length - 1]);\n\t\tassertTrue(activatable.contains(obj));\n\t\tif (m.hasInterpreter()) {\n\t\t\tTargetInterpreter interpreter = findInterpreter(obj);\n\t\t\tassertActiveViaInterpreter(obj, interpreter);\n\t\t}\n\t}", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test13() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setDepth(0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n assertEquals(0, defaultMenuItem0.getDepth());\n }", "@Test\n\tpublic void testDrive2ExitSkill0() {\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.setSkillLevel(0);\n\t\tcontrol.switchFromTitleToGenerating(0);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\ttry {\n\t\t\texplorer.setDimensions(control.getMazeConfiguration().getWidth(), control.getMazeConfiguration().getHeight());\n\t\t\tassertTrue(explorer.drive2Exit());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n Submit submit0 = new Submit((Component) null, \".\\\"=_m?KP<D\\\"\", \"style\");\n ActionExpression actionExpression0 = submit0.action(\"K]D$m.xC\");\n assertFalse(actionExpression0.isSubmissible());\n }", "@Test\n public void testRun_DecisionWithEquals_IN_A1_D_A2_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow set to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow set to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dn = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, A1_ID);\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dn).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dn);\n\n // Initial node (id #1) creation and flow set to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A2_ID, wf.getContext().get(KEY));\n }", "public void actionPerformed(ActionEvent a) {\n\n String command = a.getActionCommand();\n if (command.equals(\"e\")) {\n //Log toggle.\n if (consoleDisplayed = !consoleDisplayed) //Show\n splitter.setDividerLocation(defaultSliderPosition);\n else //Hide\n splitter.setDividerLocation(.999);\n } else if (command.equals(\"r\")) {\n //Gets the code into a string.\n String code = text.getText();\n\n //Marks certain areas as \"dirty\".\n //Dirty areas are places that shouldn't be considered for any keywords,\n //including \"import\", \"extend\", and so on.\n ArrayList<Integer> dirtyBounds = getDirty(code);\n\n //Not quite perfect all of the time.\n if (text.getText().contains(\"class\")) {\n //This is a bit more explicit\n //if(text.getText().trim().substring(0, text.getText().trim().indexOf(\"{\")).contains(\"class\")) {\n //This means we should try to compile this as normal.\n\n //Pulls out class name\n int firstPos = code.indexOf(\"class\");\n while(isDirty(dirtyBounds, firstPos)) \n firstPos = code.indexOf(\"class\", firstPos + 1);\n\n int secondPos = code.indexOf(\"{\"); //No checks here because who would possibly put a comment between \"class\" and \"{\"?\n String name = code.substring(firstPos + \"class\".length() + 1, secondPos).trim();\n\n //Just a safety check to make sure you don't try to modify this program while it's running.\n if (name.equals(\"Playground\")) {\n System.out.println(\"I know what you're doing and I don't approve. I won't even compile that.\");\n return;\n //println(\"Self-compiling. You were warned.\", warning); //Allowed users to bootstrap this program. October 26, 2014\n }\n\n compileAndRun(name, code);\n } else {\n //This means we should compile this as a playground.\n\n //TODO: Try to assign every line to a variable, and print it out if it's by itself. IE, saying \"int i = 0\" won't do anything,\n //but then just typing \"i\" or \"i;\" would print out \"0\". Add support for functions, too. So \"factorial(5)\" by itself would \n //print out \"120\" without any fluff.\n\n //TODO: Lazy typing. \"int i = 0\" should be equivilant to \"i = 0\"\n\n //TODO: Less need for casting. If \"int.toString()\" is called, modify in-place to \"(new Integer(int)).toString()\"\n //Similar for calls that need Strings but are passed primitives; \"promote\" them by prepending \"\"+ to them.\n\n //Common import statements built-in\n String importDump = new String();\n importDump+=(\"import java.util.*;\\n\" + \n \"import javax.swing.*;\\n\" + \n \"import javax.swing.event.*;\\n\" +\n \"import java.awt.*;\\n\" + \n \"import java.awt.event.*;\\n\" + \n \"import java.io.*;\\n\");\n\n //User-defined or auto-generated methods\n String methodDump = new String();\n\n //Pulls out any \"import\" statements and appends them to the import dump.\n int i = code.indexOf(\"import\");\n while(i >= 0) {\n //Ignores comments and string literals\n if (isDirty(dirtyBounds, i)) {\n i = code.indexOf(\"import\", i+1);\n continue;\n }\n\n String s = code.substring(i, code.indexOf(\";\", i) + 1); \n //System.out.println(\"Found import: \" + s);\n code = code.replaceFirst(s, \"\");\n importDump+=s+\"\\n\";\n i = code.indexOf(\"import\", i+1);\n }\n\n //Pulls out all methods\n i = code.indexOf(\"(\");\n while(i >= 0) {\n if (isDirty(dirtyBounds,i)) {\n i = code.indexOf(\"(\", i+1); continue;\n }\n\n //Move backwards first\n char temp = 0; int pos = i;\n boolean shouldSkip = false;\n while(--pos > 0) {\n temp = code.charAt(pos);\n if (temp == '.') {shouldSkip = true; break;} //This is a method call, ie String.charAt();\n if (temp == ';') {++pos; break;} //This is most likely a method declaration, since we had no errors\n //If we hit the start of the file, that's probable a method dec. too!\n }\n\n String sub = code.substring(pos, i);\n if (shouldSkip || isDirty(dirtyBounds, pos) || \n sub.contains(\"while\") || sub.contains(\"for\") || sub.contains(\"new\") || sub.contains(\"try\") || sub.contains(\"catch\")) \n {i=code.indexOf(\"(\", i+1); continue;} //If this def. isn't a method or it's in a comment\n\n int start = pos;\n temp = 0; pos = code.indexOf(\"{\", i+1);\n int count = 1; shouldSkip = false;\n if(pos != -1) {\n if (code.indexOf(\";\", i+1) > pos || code.indexOf(\";\", i+1) == -1) {\n while(++pos < code.length()) {\n if (count == 0) \n break;\n\n temp = code.charAt(pos);\n if (temp == '{') \n count++;\n if (temp == '}') \n count--;\n }\n } else {\n //If there's a semicolon between the opening paranthesis and opening curly brace, this isn't a method!\n i = code.indexOf(\"(\", i+1);\n continue;\n }\n } else {\n i = code.indexOf(\"(\", i+1);\n continue;\n }\n\n int end = pos;\n String s = code.substring(start,end);\n code = code.replace(s, \"\"); \n\n //Just to make it look nicer\n s = s.trim();\n\n //println(\"Found method: \" + s);\n\n //This makes using the method intuitive by effectively removing the need for static modifiers\n if (!s.substring(0,s.indexOf(\"(\")).contains(\"static\")) {\n s = \"static \" + s;\n //println(\"Silently adding 'static' modifier\", warning);\n }\n\n methodDump+=(s + \"\\n\");\n i = code.indexOf(\"(\", i+1);\n }\n\n //Inject the class header and main method, imports, and methods\n code = \"//User and auto-imports pre-defined\\n\"\n + importDump\n + \"//Autogenerated class\\n\"\n + \"public class Main {\\n\" \n + \"public static void main(String[] args) {\\n\"\n + code\n + \"\\n}\\n\"\n + methodDump \n + \"}\";\n\n //Run as normal\n compileAndRun(\"Main\", code);\n }\n } else if (command.equals(\"k\")) {\n kill(); \n } else if (command.equals(\"o\")) {\n of = new OptionFrame(frame);\n } else if (command.equals(\"/\")) {\n hf = new HelpFrame(frame);\n }\n }", "@Override\n public void testPeriodic()\n {\n // test is currently built to debug cargo arm placements\n // press 'A' on the second controller to output the encoder's position\n // and whatever angle it thinks we're at\n // press 'Select' on p2 to re-zero the cargo arm\n \n // cargoArm.armUp();\n \n if(driver2.pressed(driver2.A))\n {\n System.out.println(\"Cargo arm is at encoder value: \" + cargoArm.encCargoArm.position());\n System.out.println(\"Which is \" + (cargoArm.encCargoArm.angle() + cargoArm.ZERO_ANGLE) + \" degrees.\");\n \n System.out.println(\"Hatch finger is at encoder value: \" + hatchArm.fingerEncValue());\n }\n if(driver2.pressed(driver2.Select))\n {\n cargoArm.zeroEncoder();\n System.out.println(\"Cargo arm zeroed.\");\n\n hatchArm.zero();\n System.out.println(\"Hatch finger zeroed.\");\n\n hatchArm.finger_target = 0;\n hatchArm.finger_moving = false;\n hatchArm.dirMoving = 0;\n }\n \n // if(driver2.pressed(driver2.B))\n // {\n // cargoArm.armPositionTarget = testGoalAngle * 56.9;\n // //double forceToApply = cargoArm.getArmCalculation();\n // System.out.println(\"To reach the goal of \" + testGoalAngle + \", the following force would be applied: \" + forceToApply);\n // }\n \n // adjust test goal angle to combine with the above to see, without moving, a cargo arm motor speed to apply\n if(driver2.dpad(driver2.Up))\n {\n testGoalAngle += 5;\n cargoArm.armPositionTarget = testGoalAngle * 56.9;\n System.out.println(\"Test goal angle incremented to \" + testGoalAngle);\n }\n if(driver2.dpad(driver2.Down))\n {\n testGoalAngle -= 5;\n \n cargoArm.armPositionTarget = testGoalAngle * 56.9;\n System.out.println(\"Test goal angle decremented to \" + testGoalAngle);\n }\n \n // // adjust gravitational constant for on-the-go tweak testing\n // // if you don't know what you're doing, do not try to do this!\n // if(driver2.pressed(driver2.R1))\n // {\n // cargoArm.GRAV_CONSTANT += 0.02;\n // System.out.println(\"Gravitational constant incremented to \" + cargoArm.GRAV_CONSTANT);\n // }\n // if(driver2.pressed(driver2.L1))\n // {\n // cargoArm.GRAV_CONSTANT -= 0.02;\n // System.out.println(\"Gravitational constant decremented to \" + cargoArm.GRAV_CONSTANT);\n // }\n // button 7: L2\n // button 8: R2\n // L2 will reverse the finger\n // R2 will rotate it forward\n if(driver2.down(driver2.L1))\n {\n hatchArm.rotateFinger(1);\n }\n else\n {\n if(driver2.down(driver2.L2))\n {\n hatchArm.rotateFinger(-1);\n }\n else\n {\n hatchArm.rotateFinger(0);\n }\n }\n hatchArm.periodic();\n\n if(driver2.pressed(driver2.B))\n {\n hatchArm.toggleFinger();\n }\n\n // test brake power\n if(driver2.pressed(driver2.Start))\n {\n cargoArm.toggleBrake();\n System.out.println(\"Bike brake toggled to: \" + cargoArm.solArmBrake.get());\n }\n\n // press 'x' to toggle whether or not arm should attempt to ONLY counterract the force of gravity\n // use this to check if the grav constant is correct. if it is, the arm should not fall\n if(driver2.pressed(driver2.X))\n {\n cargoArm.toggleArmLock();\n System.out.println(\"Arm lock toggled.\");\n if(cargoArm.armLockEnabled)\n {\n System.out.println(\"Arm should stay constant at given location.\");\n }\n }\n\n // if(driver2.down(driver2.L2) && driver2.pressed(driver2.R2))\n // {\n // movementInTest = !movementInTest;\n // if(movementInTest)\n // {\n // System.out.println(\"Movement in test has been enabled!\");\n // }\n // else\n // {\n // System.out.println(\"Movement in test has been disabled.\");\n // }\n // }\n if(driver2.pressed(driver2.R1))\n {\n System.out.println(\"Moving hatch finger to UP\");\n hatchArm.fingerUp();\n }\n if(driver2.pressed(driver2.R2))\n {\n System.out.println(\"Moving hatch finger to GRAB\");\n hatchArm.fingerGrab();\n }\n\n // if(movementInTest)\n // {\n // cargoArm.rotateArm(cargoArm.getArmCalculation());\n // }\n \n // // this is an attempt to read values from the DriverStation so we can edit constants without redeploying\n // // this may need tweaking b/c the resource that said this was possible was from 2013\n // if(driver2.pressed(driver2.Start))\n // {\n // System.out.println(\"Grabbing constants from Smart Dashboard...\");\n // cargoArm.GRAV_CONSTANT = prefs.getDouble(\"Grav_Constant\", 0.5);\n // // cargoArm.ENCODER_RATIO = prefs.getDouble(\"Cargo_Gear_Ratio\", 1);\n // cargoArm.armPositions[1] = prefs.getDouble(\"Cargo_Full_Down_Pos\", -6000);\n // }\n\n }", "@Test\n public void test7() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getParent();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "@As( \"key $ is pressed on handle $\" )\n void keyPressed(int key, HandleDirections dir) {\n int mask = dir.dirMask;\n int i = dir.ordinal();\n Handle h = handles.get(i);\n Rectangle2D.Double rect = figure.getBounds();\n\n KeyEvent event1 = new KeyEvent(new Button(), 0, 0, 0, key, 'k');\n KeyEvent event2 = new KeyEvent(new Button(), 0, 0, 0, key, 'k');\n\n h.keyPressed(event1);\n Rectangle2D.Double actualBounds = figure.getBounds();\n figure.setBounds(rect);\n keyPressedHelper(event2, mask);\n Rectangle2D.Double expectedBounds = figure.getBounds();\n\n\n boundsPair = new Pair<>(actualBounds, expectedBounds);\n keyEventPair = new AbstractMap.SimpleEntry<>(event1, event2);\n }", "@Test\n\tpublic void testDrive2ExitSkill9() {\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.setSkillLevel(9);\n\t\tcontrol.switchFromTitleToGenerating(6);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\ttry {\n\t\t\texplorer.setDimensions(control.getMazeConfiguration().getWidth(), control.getMazeConfiguration().getHeight());\n\t\t\tassertFalse(explorer.drive2Exit());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private boolean doTestsPass()\r\n {\r\n return minimalSteps(\"ABCDABCE\") == 8 && minimalSteps(\"ABCABCE\") == 5;\r\n }", "@Test\n\tpublic void testsetBattery2zero() {\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.setSkillLevel(0);\n\t\tcontrol.switchFromTitleToGenerating(0);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\trobot.setBatteryLevel(0);\n\t\ttry {\n\t\t\tassertFalse(explorer.drive2Exit());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public SNGTestCases Exit_TC1029() throws InterruptedException{\n \tString flavour = \"Electrical\";\n \t\n \tforDebugger();\n \twaitForElement(By.id(\"com.pointedsquares.gamy5.android:id/header_name\"),120);\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/wallet_tab\")).click();\n \twaitForVisibilityOf(By.id(\"com.pointedsquares.gamy5.android:id/free_coins\"));\n \tString coinsBefore = driver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/free_coins\")).getText();\n \tSystem.out.println(coinsBefore);\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/sitngo_tab\")).click();\n \twaitForElement(By.id(\"com.pointedsquares.gamy5.android:id/header_name\"),120);\n \t\n \ttry{\n \t\twaitForElement(By.xpath(\"//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]\") , 5);\n \t}catch(Exception ex){\n \t\tdriver.scrollTo(\"Academics\");\n \t}\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]\")).click();\n \twaitForElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\"), 10);\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\")).click();\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\")).sendKeys(flavour);\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]\")).click();\n \twaitForElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]\"),5);\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]\")).click();\n \twaitForElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]\"), 5);\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]\")).click();\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/positive_button\")).click();\n \twaitForVisibilityOf(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]\"));\n \twaitForVisibilityOf(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Waiting for Players to Join.\\nPlease wait 9 seconds, approximately.')]\"));\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/exit_player\")).click();\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/negative_button\")).click();\n \twaitForVisibilityOf(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]\"));\n \tdriver.navigate().back();\n \tdriver.navigate().back();\n \twaitForElement(By.id(\"com.pointedsquares.gamy5.android:id/header_name\"),120);\n \twaitForVisibilityOf(By.id(\"com.pointedsquares.gamy5.android:id/wallet_tab\"));\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/wallet_tab\")).click();\n \twaitForVisibilityOf(By.id(\"com.pointedsquares.gamy5.android:id/free_coins\"));\n \tString coinsAfter = driver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/free_coins\")).getText();\n \tSystem.out.println(coinsAfter);\n \tboolean isCoinEqual = true;\n \tif(!coinsBefore.equals(coinsAfter)){\n \t\tisCoinEqual = false;\n \t}\n \tassertTrue(isCoinEqual , \"Coins Not Found Same After Exiting From Message \\\"Finding room for you\\\"\");\n \tThread.sleep(7000);\n \treturn new SNGTestCases(driver);\n }", "@Test\n public void isJumpActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final Agent agentRed = agents.get(0);\n final Agent agentWhite = agents.get(1);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P21,\n CheckersPosition.P17);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentWhite, CheckersPosition.P09,\n CheckersPosition.P14);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P22,\n CheckersPosition.P18);\n action.doIt();\n }\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can jump his token over a red token to an empty space.\n assertTrue(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P21));\n\n // Agent white cannot jump his token to an occupied space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P23));\n\n // Agent white cannot jump his token to an adjacent empty space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P10,\n CheckersPosition.P15));\n\n // Agent white cannot jump his own token.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P08,\n CheckersPosition.P15));\n }", "protected Component getTestTarget(){\n return tester.parent;\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "@Test\n public void testIsValidTap() {\n setUpCorrect();\n assertTrue(boardManager.isValidTap(11));\n assertTrue(boardManager.isValidTap(14));\n assertFalse(boardManager.isValidTap(10));\n }", "@Test\r\n\tpublic void TC103() {\r\n\t\t\r\n\t\t// 1. User opens the JBrick application \r\n\t\t// => The Code Frame has one file open in the code frame (center) and a status pane (bottom)\r\n\t\t// (No file has been opened before hand, this is the equivalent to opening the application for the first time.)\r\n\t\t\r\n\t\tfinal MainWindow jbricks = StartupFunctions.newJBricksInstance(\"JBricks - TC102\");\r\n\t\tfinal Component editorPane = ContainerFunctions.getEditorPane(jbricks);\r\n\t\tfinal Component statusPane = ContainerFunctions.getStatusPane(jbricks);\r\n\t\t\r\n\t\tassertTrue(editorPane.getLocationOnScreen().getY() < statusPane.getLocationOnScreen().getY()); \r\n\t\t\r\n\t\t// 2. User selects the \"Show File Viewer\"\r\n\t\t// => The file viewer is opened on the left of the code and status frame. The viewer shows the files and folders in the workspace directory set in the preferences.\r\n\t\t\r\n\t\tMenuFunctions.showFilePane(jbricks);\r\n\t\tTestUtils.waitUntil(5000, new Callable<Object>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object call() throws Exception {\r\n\t\t\t\treturn (ContainerFunctions.getFilePane(jbricks) != null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfinal Component filePane = ContainerFunctions.getFilePane(jbricks);\r\n\r\n\t\tdouble filePaneX = filePane.getLocationOnScreen().getX();\r\n\t\tdouble editorPaneX = editorPane.getLocationOnScreen().getX();\r\n\t\tassertTrue(filePaneX < editorPaneX);\r\n\t\t\r\n\t\t// Any further testing, including what documents are listed in the file Pane, requires more decoupling\r\n\t\t\t\t\r\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n Checkbox checkbox0 = new Checkbox(label0, \"\", \"\");\n Component component0 = checkbox0.renderHint(\"\");\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tpublic void test3_checkButtons() throws GeneralLeanFtException{\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tSystem.out.println(\"Test 3 - Check Buttons Started\");\n\t\t\t\n\t\t\t//Check that the Main window should exist\n\t\t\tassertTrue(mySet.appExistsorNot());\t\t\t\n\t\t\t\n\t\t\t//Toolbar Object\n\t\t\tToolBar toolbar = mySet.OR.MainWindow().ToolBar(); \n\n\t\t\t// Clicking the JButton displays the required frame\n\t\t\ttoolbar.getButton(\"JButton\").press();\n\t\t\t\n\t\t\t//Getting the Image Buttons in the Panel\n\t\t\tButton[] imgButtons = mySet.OR.MainWindow().ImageButtonsPanelUiObject()\n\t\t\t .findChildren(Button.class,new ButtonDescription.Builder().nativeClass(\"javax.swing.JButton\").build());\n\t\t\t \n\t\t\t//There should be 3 Image Buttons\n\t\t\tassertEquals(3, imgButtons.length);\n\t\t\t\n\t\t\t//Trigger the Mouse Entered Event for the each button in the Panel\t\t\t\t\n\t\t\tRobot robo = new Robot();\t\t\t\n\t\t\tfor(Button btn : imgButtons)\n\t\t\t{\t\t\t\t\n\t\t\t\trobo.mouseMove(btn.getAbsoluteLocation().x,btn.getAbsoluteLocation().y);\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\t//Store the Original Dimension\n\t\t\tDimension orginalDimension = mySet.OR.MainWindow().ImageButtonsPanelUiObject().getSize();\n\t\t\t\n\t\t\t//Increase the Size by Selecting the Pad Radio Button\n\t\t\tmySet.OR.MainWindow().Pad10RadioButton().click();\n\t\t\t\n\t\t\t//Verify that the radio button is checked\n\t\t\tassertTrue(mySet.OR.MainWindow().Pad10RadioButton().isChecked()==true);\n\t\t\t\n\t\t\t//Store the New Dimension\n\t\t\tDimension newDimension = mySet.OR.MainWindow().ImageButtonsPanelUiObject().getSize();\n\t\t\t\n\t\t\t//Assert that Height Increases and Width Decreases\n\t\t\tassertTrue((newDimension.width < orginalDimension.width) && (newDimension.height > orginalDimension.height));\n\t\t\t\n\t\t\t//Click the Enabled Check box\n\t\t\tmySet.OR.MainWindow().EnabledCheckBox().click();\n\t\t\t\n\t\t\t//Check that the Check Box has been unchecked \n\t\t\tassertTrue(mySet.OR.MainWindow().EnabledCheckBox().getState()==CheckedState.UNCHECKED);\n\t\t\t\n\t\t\t//Check that all Image Buttons are disabled\n\t\t\tfor(Button btn : imgButtons)\n\t\t\t{\n\t\t\t\tassertTrue(btn.isEnabled()==false);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unexpected Error Occurred. Message = \" + e.getMessage() + \"Stack Trace = \");\n\t\t\te.printStackTrace();\n\t\t\tassertTrue(false);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Test 3 - Check Buttons Finished\");\n\t\t}\n\t\t\n\t}", "@Test\r\n public void testIsValidTap() {\r\n assertTrue(boardManager3.isValidTap(7));\r\n assertTrue(boardManager3.isValidTap(5));\r\n assertFalse(boardManager3.isValidTap(0));\r\n }", "public void keyPressed(KeyEvent event)\n\t{\n int keyCode = event.getKeyCode();\n \n int arrowUp = 38;\n int arrowDown = 40;\n \n int oldIndex = indexOfCurrentSelectedComponent;\n if (keyCode == arrowDown)\n {\n indexOfCurrentSelectedComponent++;\n }\n if (keyCode == arrowUp)\n {\n indexOfCurrentSelectedComponent--;\n }\n \n while (oldIndex != indexOfCurrentSelectedComponent)\n {\n if (indexOfCurrentSelectedComponent > components.size() - 1)\n {\n indexOfCurrentSelectedComponent = 0;\n }\n else if (indexOfCurrentSelectedComponent < 0)\n {\n indexOfCurrentSelectedComponent = components.size() - 1;\n }\n \n GlComponent component = components.get(indexOfCurrentSelectedComponent);\n if (component instanceof GlButton)\n {\n ((GlButton) component).setSelected(true);\n break;\n } \n else if (keyCode == arrowDown)\n {\n indexOfCurrentSelectedComponent++;\n } \n else if (keyCode == arrowUp)\n {\n indexOfCurrentSelectedComponent--;\n }\n \n }\n \n if (oldIndex != -1 && components.get(oldIndex) instanceof GlButton)\n {\n ((GlButton) components.get(oldIndex)).setSelected(false);\n }\n\t}", "@Test\r\n\tpublic final void testGetButton() {\n\t\tassertEquals(\"ON\",a.getButton());\r\n\t}", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "static void jump_when_carry_not(String passed){\n\t\tif(!CS)\n\t\t\tcomplete_jump_req(passed.substring(4));\n\t}", "@Test\n public void test11() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n int int0 = defaultMenuItem0.getDepth();\n assertEquals(0, int0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "public void test24() {\n //$NON-NLS-1$\n deployBundles(\"test24\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public boolean dispatchKeyEvent(KeyEvent paramKeyEvent)\n/* */ {\n/* 800 */ Component localComponent1 = paramKeyEvent.isPosted ? getFocusOwner() : paramKeyEvent.getComponent();\n/* */ \n/* 802 */ if ((localComponent1 != null) && (localComponent1.isShowing()) && (localComponent1.canBeFocusOwner()) && \n/* 803 */ (!paramKeyEvent.isConsumed())) {\n/* 804 */ Component localComponent2 = paramKeyEvent.getComponent();\n/* 805 */ if ((localComponent2 != null) && (localComponent2.isEnabled())) {\n/* 806 */ redispatchEvent(localComponent2, paramKeyEvent);\n/* */ }\n/* */ }\n/* */ \n/* 810 */ boolean bool = false;\n/* 811 */ List localList = getKeyEventPostProcessors();\n/* 812 */ if (localList != null) {\n/* 813 */ localObject = localList.iterator();\n/* 814 */ while ((!bool) && (((Iterator)localObject).hasNext()))\n/* */ {\n/* */ \n/* 817 */ bool = ((KeyEventPostProcessor)((Iterator)localObject).next()).postProcessKeyEvent(paramKeyEvent);\n/* */ }\n/* */ }\n/* 820 */ if (!bool) {\n/* 821 */ postProcessKeyEvent(paramKeyEvent);\n/* */ }\n/* */ \n/* */ \n/* 825 */ Object localObject = paramKeyEvent.getComponent();\n/* 826 */ ComponentPeer localComponentPeer = ((Component)localObject).getPeer();\n/* */ \n/* 828 */ if ((localComponentPeer == null) || ((localComponentPeer instanceof LightweightPeer)))\n/* */ {\n/* */ \n/* 831 */ Container localContainer = ((Component)localObject).getNativeContainer();\n/* 832 */ if (localContainer != null) {\n/* 833 */ localComponentPeer = localContainer.getPeer();\n/* */ }\n/* */ }\n/* 836 */ if (localComponentPeer != null) {\n/* 837 */ localComponentPeer.handleEvent(paramKeyEvent);\n/* */ }\n/* */ \n/* 840 */ return true;\n/* */ }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n JYearChooser jYearChooser0 = new JYearChooser();\n JDayChooser jDayChooser0 = new JDayChooser(true);\n jDayChooser0.setEnabled(true);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n KeyEvent keyEvent0 = new KeyEvent(jDayChooser0, 3, (-1609L), 1359, 34, 'E');\n KeyEvent keyEvent1 = new KeyEvent(jYearChooser0, 34, 64, 3, 35, 'x');\n jDayChooser0.keyPressed(keyEvent1);\n jDayChooser0.setDay(34);\n JDayChooser.DecoratorButton jDayChooser_DecoratorButton0 = jDayChooser0.new DecoratorButton();\n Button button0 = null;\n try {\n button0 = new Button();\n fail(\"Expecting exception: HeadlessException\");\n \n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "@Test(groups = {\"Sprint54\"}, description = \"'Reset all' should reset search conditions in No Java applet, no task area, but show Go To shortcuts layout.\")\r\n\tpublic void SprintTest54_1_22_5() throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select No Java applet, no task area layout and save the settings\r\n\t\t\t//-------------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);\r\n\r\n\t\t\tif(configurationPage.configurationPanel.isJavaAppletEnabled())\r\n\t\t\t\tthrow new Exception(\"Java applet is enabled\");\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value);\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Save the settings\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved after changing its layout.\");\r\n\r\n\t\t\tLog.message(\"1. No java applet with task area with go to layout is selected and saved.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. No java applet with task area layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and change the search word\r\n\t\t\t//-------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page.\");\r\n\r\n\t\t\t//Step-4 : Change the search option to Any word\r\n\t\t\t//----------------------------------------------\r\n\t\t\thomePage.searchPanel.clickAdvancedSearch(true); //Clicks Advanced search button\r\n\t\t\tString prevOption = homePage.searchPanel.getSelectedSearchOption(); //Gets the selected search option\r\n\t\t\thomePage.searchPanel.setSearchOption(Caption.Search.SearchAnyWord.Value); //Sets Search option to Search any word\r\n\r\n\t\t\tLog.message(\"4. Search option is modified from '\" + prevOption + \"' to '\" + Caption.Search.SearchAnyWord.Value + \"'.\");\r\n\r\n\t\t\t//Step-5 : Click Reset all button\r\n\t\t\t//-------------------------------\r\n\t\t\thomePage.searchPanel.resetAll(); //Clicks Reset all button\r\n\r\n\t\t\tLog.message(\"5. Reset all button is clicked.\");\r\n\r\n\t\t\t//Verification : Verify if Reset all button reset the conditions\r\n\t\t\t//---------------------------------------------------------------\r\n\t\t\tif (homePage.searchPanel.getSelectedSearchOption().equalsIgnoreCase(prevOption)) //Verifies if reset all has reset the conditions\r\n\t\t\t\tLog.pass(\"Test case Passed. Reset all has reset the conditions in .\"+Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value);\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Reset all has not reset the conditions in \" + Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value+ \" layout.\", driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "private void kk12() {\n\n\t}", "@Test\n\tpublic void testIfForbriddenSelfKillAdvanced(){\n\t\tboard.commitMove(new Point(2,1), 1);\n\t\tboard.commitMove(new Point(3,1), 1);\n\t\tboard.commitMove(new Point(4,2), 1);\n\t\tboard.commitMove(new Point(3,3), 1);\n\t\tboard.commitMove(new Point(3,4), 1);\n\t\tboard.commitMove(new Point(2,5), 1);\n\t\tboard.commitMove(new Point(1,4), 1);\n\t\tboard.commitMove(new Point(1,3), 1);\n\t\tboard.commitMove(new Point(1,2), 1);\n\t\t\n\t\tboard.commitMove(new Point(2,4), 0);\n\t\tboard.commitMove(new Point(2,3), 0);\n\t\tassertEquals(0, board.commitMove(new Point(2,2), 0));\n\t\tassertNotEquals(0,board.commitMove(new Point(3,2), 0));\n//\t\tboard.printBoard();\n\t}", "private static void Test19(ChromeDriver driver) throws InterruptedException {\n\t\tHold();\n\t\tdriver.findElement(By.id(\"teacher\")).click();\n\t\tHold();\n\t\tdriver.findElement(By.ByTagName.id(\"newAcc\")).click();\n\t\tHold();\n\t\tdriver.findElement(By.ByTagName.name(\"name\")).sendKeys(\"Shivam\");\n\t\tdriver.findElement(By.ByTagName.name(\"lastName\")).sendKeys(\"Raj\");\n\t\tdriver.findElement(By.ByTagName.name(\"email\")).sendKeys(\"[email protected]\");\n\t\tdriver.findElement(By.ByTagName.name(\"rollNo\")).sendKeys(\"10ECE311\");\n\t\tdriver.findElement(By.ByTagName.name(\"phNo\")).sendKeys(\"9600539385\");\n\t\tdriver.findElement(By.ByTagName.name(\"doj\")).sendKeys(\"2010-11-10\");\n\t\tdriver.findElement(By.id(\"branch\")).click();\n\t\tList<WebElement> branches = driver.findElements(By.cssSelector(\"#branch__select-drop div > button > div >span\"));\n\t\tfor(WebElement branch:branches)\n\t\t{\n\t\t\tif(branch.getText().equals(\"ECE\"))\n\t\t\t{\n\t\t\t\tbranch.click();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdriver.findElement(By.ByTagName.name(\"passsword\")).sendKeys(\"VINTAGE\");\n\t\tHold();\n\t\tdriver.findElement(By.id(\"registerBtn\")).click();\n\t\tHold();\n\t\tdriver.get(\"http://localhost:3000/teachersignin\");\n\t\tHold();\n\t\tdriver.findElement(By.ByTagName.id(\"HomeBtn\")).click();\n\t}", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test291() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n // Undeclared exception!\n try { \n checkbox0.h3((Object) \"0G-VP2>k}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void KeyActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Test\n public void test3() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n boolean boolean0 = defaultMenuItem0.isLeaf();\n assertEquals(true, boolean0);\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n LuuPhuongUyen L = new LuuPhuongUyen();\n L.addLast(\"00\", \"aa\", 2, 2);\n L.addLast(\"11\", \"bb\", 3, 2);\n while (true) {\n L.menu();\n int choice = sc.nextInt();\n switch (choice) {\n case 1:\n L.addItem();\n break;\n case 2:\n L.searchItem();\n break;\n case 3:\n L.deleteItem();\n break;\n case 4:\n L.traverse();\n break;\n case 5:\n return;\n }\n }\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"null\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.strong();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private static void FinalIndVsPAk() {\n\t\tSystem.out.println(\"Pak Lost The Match\");\n\t\t\n\t}", "private boolean testFocusability(Component aComponent) {\n return focused.contains(aComponent);\n }", "static public void main(String args[])\n\t{\n\t\tint ii;\n\n\t\t// I DONT want to use an array. I want control over each letter\n\t\tNamedGroup root= new NamedGroup(\"root\");\n\t\tNamedGroup A= new NamedGroup(\"A\");\n\t\tNamedGroup B= new NamedGroup(\"B\");\n\t\tNamedGroup C= new NamedGroup(\"C\");\n\t\tNamedGroup D= new NamedGroup(\"D\");\n\t\tNamedGroup E= new NamedGroup(\"E\");\n\t\tNamedGroup F= new NamedGroup(\"F\");\n\t\tNamedGroup G= new NamedGroup(\"G\");\n\t\tNamedGroup H= new NamedGroup(\"H\");\n\t\tNamedGroup I= new NamedGroup(\"I\");\n\t\tNamedGroup J= new NamedGroup(\"J\");\n\t\tNamedGroup K= new NamedGroup(\"K\");\n\t\tNamedGroup L= new NamedGroup(\"L\");\n\t\tNamedGroup M= new NamedGroup(\"M\");\n\t\tNamedGroup N= new NamedGroup(\"N\");\n\n\t\t//root.checkValidity();\n\n\t\troot.addChild(A);\n\t\troot.addChild(B);\n\t\troot.addChild(C);\n\n\t\tA.addChild(D);\n\t\tA.addChild(E);\n\t\tA.addChild(F);\n\n\t\tB.addChild(G);\n\n\t\tC.addChild(H);\n\t\tH.addChild(L);\n\t\tC.addChild(I);\n\n\t\tD.addChild(J);\n\t\tD.addChild(K);\n\n\t\tH.addChild(L);\n\n\t\tK.addChild(M);\n\t\tM.addChild(N);\n\n\t\t// Lookey here.\n\t\t// This is kinda tricky\n\t\t// We're using an anonymous class to define a doAction() for the abstract\n\t\t// class BaseGroupAction\n\t\tnew BaseTraversalAction()\n\t\t{\n\t\t\tprotected boolean actionImplementation(iNamedObject node)\n\t\t\t{\n\t\t\t\tSystem.out.println(node.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t.applyAction(root);\n\n\t\tSystem.exit(0);\n\t}" ]
[ "0.59401655", "0.5482178", "0.5423927", "0.5391457", "0.53845817", "0.5383734", "0.53152966", "0.5305858", "0.5299015", "0.52852476", "0.5252978", "0.5194968", "0.51861644", "0.5181138", "0.51318514", "0.5111927", "0.50818795", "0.5073143", "0.5043739", "0.5041456", "0.50208974", "0.501998", "0.5016332", "0.50113636", "0.50025254", "0.49841616", "0.4977423", "0.49704123", "0.4950412", "0.49448463", "0.49415588", "0.49341393", "0.4932706", "0.49260807", "0.49002627", "0.48863035", "0.48759446", "0.48703286", "0.4862622", "0.4852892", "0.48501056", "0.4846015", "0.48447117", "0.48425648", "0.48422122", "0.48418453", "0.4840452", "0.48380914", "0.4838009", "0.48339975", "0.4825901", "0.48253128", "0.4823901", "0.48220208", "0.48209086", "0.48199332", "0.4817017", "0.4808919", "0.4806323", "0.4803556", "0.48030457", "0.48013723", "0.4797602", "0.47970676", "0.47909996", "0.47887325", "0.47862312", "0.47829992", "0.47823477", "0.4780428", "0.47704694", "0.47620043", "0.4756242", "0.4756237", "0.4753189", "0.47521693", "0.47499344", "0.47473398", "0.47462004", "0.47452444", "0.47428012", "0.47392315", "0.47386912", "0.47380504", "0.47376686", "0.47334898", "0.47322148", "0.4728754", "0.47249678", "0.47241083", "0.47239846", "0.4723753", "0.47230417", "0.47213626", "0.47201934", "0.47201052", "0.47200596", "0.47166166", "0.47130993", "0.4711018", "0.47088623" ]
0.0
-1
Test case number: 23 / 1 covered goal: Goal 1. wheel.components.Component.b(Ljava/lang/Object;)Lwheel/components/Component;: rootBranch
@Test public void test023() throws Throwable { XmlEntityRef xmlEntityRef0 = new XmlEntityRef("i%mts"); // Undeclared exception! try { Component component0 = xmlEntityRef0.b((Object) "i%mts"); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "String branch();", "public Branch() { }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "public RelocateBranch() {\n }", "HibBranch getBranch(InternalActionContext ac, HibProject project);", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Override\n public void b() {\n }", "@Override\n\tpublic void b() {\n\n\t}", "boolean isBranchTaken();", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "public void getBranchCommand() {\n\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "double getBranchProbability();", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public Branch(E e) {\n\t\tinfo = e;\n\t\tisLeaf = true;\n\t}", "public void b() {\r\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void b() {\n\t\tSystem.out.println(\"b method\");\n\t\t\n\t}", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n public void bfs() {\n\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "public boolean a(World paramaqu, Random paramRandom, bjb parambjb)\r\n/* 37: */ {\r\n/* 38:859 */ if (a(paramaqu, parambjb)) {\r\n/* 39:860 */ return false;\r\n/* 40: */ }\r\n/* 41:864 */ a(paramaqu, parambjb, 0, 0, 0, 4, 4, 4, true, paramRandom, blr.c());\r\n/* 42: */ \r\n/* 43:866 */ a(paramaqu, paramRandom, parambjb, this.d, 1, 1, 0);\r\n/* 44:868 */ if ((this.m == EnumDirection.NORTH) || (this.m == EnumDirection.EAST)) {\r\n/* 45:869 */ a(paramaqu, parambjb, 0, 1, 1, 0, 3, 3, BlockList.air.instance(), BlockList.air.instance(), false);\r\n/* 46: */ } else {\r\n/* 47:871 */ a(paramaqu, parambjb, 4, 1, 1, 4, 3, 3, BlockList.air.instance(), BlockList.air.instance(), false);\r\n/* 48: */ }\r\n/* 49:874 */ return true;\r\n/* 50: */ }", "protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "public final void a() {\n /*\n r25 = this;\n r1 = r25\n int r0 = r25.getAndIncrement()\n if (r0 == 0) goto L_0x0009\n return\n L_0x0009:\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.flowable.cq$b<T>[]> r2 = r1.e\n java.lang.Object r0 = r2.get()\n io.reactivex.internal.operators.flowable.cq$b[] r0 = (io.reactivex.internal.operators.flowable.cq.b[]) r0\n r3 = 1\n r4 = r0\n r5 = 1\n L_0x0014:\n java.lang.Object r0 = r1.h\n io.reactivex.internal.b.j<T> r6 = r1.j\n if (r6 == 0) goto L_0x0023\n boolean r8 = r6.isEmpty()\n if (r8 == 0) goto L_0x0021\n goto L_0x0023\n L_0x0021:\n r8 = 0\n goto L_0x0024\n L_0x0023:\n r8 = 1\n L_0x0024:\n boolean r0 = r1.a(r0, r8)\n if (r0 == 0) goto L_0x002b\n return\n L_0x002b:\n if (r8 != 0) goto L_0x0156\n int r0 = r4.length\n int r9 = r4.length\n r12 = 0\n r13 = 0\n r14 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n L_0x0036:\n r16 = -9223372036854775808\n if (r12 >= r9) goto L_0x0053\n r7 = r4[r12]\n long r18 = r7.get()\n int r20 = (r18 > r16 ? 1 : (r18 == r16 ? 0 : -1))\n if (r20 == 0) goto L_0x004e\n long r10 = r7.c\n long r10 = r18 - r10\n long r10 = java.lang.Math.min(r14, r10)\n r14 = r10\n goto L_0x0050\n L_0x004e:\n int r13 = r13 + 1\n L_0x0050:\n int r12 = r12 + 1\n goto L_0x0036\n L_0x0053:\n r9 = 1\n if (r0 != r13) goto L_0x0093\n java.lang.Object r0 = r1.h\n java.lang.Object r7 = r6.poll() // Catch:{ all -> 0x005e }\n goto L_0x0075\n L_0x005e:\n r0 = move-exception\n r6 = r0\n io.reactivex.c.b.throwIfFatal(r6)\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.cancel()\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.error(r6)\n r1.h = r0\n r7 = 0\n L_0x0075:\n if (r7 != 0) goto L_0x0079\n r6 = 1\n goto L_0x007a\n L_0x0079:\n r6 = 0\n L_0x007a:\n boolean r0 = r1.a(r0, r6)\n if (r0 == 0) goto L_0x0081\n return\n L_0x0081:\n int r0 = r1.i\n if (r0 == r3) goto L_0x0090\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.request(r9)\n L_0x0090:\n r6 = 1\n goto L_0x0165\n L_0x0093:\n r0 = r8\n r8 = 0\n L_0x0095:\n long r11 = (long) r8\n int r13 = (r11 > r14 ? 1 : (r11 == r14 ? 0 : -1))\n if (r13 >= 0) goto L_0x0139\n java.lang.Object r0 = r1.h\n java.lang.Object r13 = r6.poll() // Catch:{ all -> 0x00a1 }\n goto L_0x00b8\n L_0x00a1:\n r0 = move-exception\n r13 = r0\n io.reactivex.c.b.throwIfFatal(r13)\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.cancel()\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.error(r13)\n r1.h = r0\n r13 = 0\n L_0x00b8:\n if (r13 != 0) goto L_0x00bc\n r7 = 1\n goto L_0x00bd\n L_0x00bc:\n r7 = 0\n L_0x00bd:\n boolean r0 = r1.a(r0, r7)\n if (r0 == 0) goto L_0x00c4\n return\n L_0x00c4:\n if (r7 != 0) goto L_0x0135\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.getValue(r13)\n int r11 = r4.length\n r12 = 0\n r13 = 0\n L_0x00cd:\n if (r12 >= r11) goto L_0x0103\n r3 = r4[r12]\n long r22 = r3.get()\n int r24 = (r22 > r16 ? 1 : (r22 == r16 ? 0 : -1))\n if (r24 == 0) goto L_0x00f1\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n int r24 = (r22 > r20 ? 1 : (r22 == r20 ? 0 : -1))\n r22 = r6\n r23 = r7\n if (r24 == 0) goto L_0x00eb\n long r6 = r3.c\n long r6 = r6 + r9\n r3.c = r6\n L_0x00eb:\n org.b.c<? super T> r3 = r3.f8109a\n r3.onNext(r0)\n goto L_0x00fb\n L_0x00f1:\n r22 = r6\n r23 = r7\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n r13 = 1\n L_0x00fb:\n int r12 = r12 + 1\n r6 = r22\n r7 = r23\n r3 = 1\n goto L_0x00cd\n L_0x0103:\n r22 = r6\n r23 = r7\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n int r8 = r8 + 1\n java.lang.Object r0 = r2.get()\n io.reactivex.internal.operators.flowable.cq$b[] r0 = (io.reactivex.internal.operators.flowable.cq.b[]) r0\n if (r13 != 0) goto L_0x0120\n if (r0 == r4) goto L_0x0119\n goto L_0x0120\n L_0x0119:\n r6 = r22\n r0 = r23\n r3 = 1\n goto L_0x0095\n L_0x0120:\n if (r8 == 0) goto L_0x0133\n int r3 = r1.i\n r4 = 1\n if (r3 == r4) goto L_0x0133\n java.util.concurrent.atomic.AtomicReference<org.b.d> r3 = r1.g\n java.lang.Object r3 = r3.get()\n org.b.d r3 = (org.b.d) r3\n long r6 = (long) r8\n r3.request(r6)\n L_0x0133:\n r4 = r0\n goto L_0x0165\n L_0x0135:\n r23 = r7\n r0 = r23\n L_0x0139:\n if (r8 == 0) goto L_0x014c\n int r3 = r1.i\n r6 = 1\n if (r3 == r6) goto L_0x014d\n java.util.concurrent.atomic.AtomicReference<org.b.d> r3 = r1.g\n java.lang.Object r3 = r3.get()\n org.b.d r3 = (org.b.d) r3\n r3.request(r11)\n goto L_0x014d\n L_0x014c:\n r6 = 1\n L_0x014d:\n r7 = 0\n int r3 = (r14 > r7 ? 1 : (r14 == r7 ? 0 : -1))\n if (r3 == 0) goto L_0x0157\n if (r0 == 0) goto L_0x0165\n goto L_0x0157\n L_0x0156:\n r6 = 1\n L_0x0157:\n int r0 = -r5\n int r5 = r1.addAndGet(r0)\n if (r5 == 0) goto L_0x0168\n java.lang.Object r0 = r2.get()\n r4 = r0\n io.reactivex.internal.operators.flowable.cq$b[] r4 = (io.reactivex.internal.operators.flowable.cq.b[]) r4\n L_0x0165:\n r3 = 1\n goto L_0x0014\n L_0x0168:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.reactivex.internal.operators.flowable.cq.c.a():void\");\n }", "public void b() {\n }", "public void b() {\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public T caseEquivalentBranch(EquivalentBranch object) {\n\t\treturn null;\n\t}", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "public GitBranch(String aName) { _name = aName; }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "public abstract void bepaalGrootte();", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "public GitBranch getBranch(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); if (ref==null) return null; }\n catch(Exception e) { throw new RuntimeException(e); }\n String name = ref.getTarget().getName();\n GitBranch b = _branches.get(name);\n if (b==null) _branches.put(name, b=new GitBranch(name));\n return b;\n}", "public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalculation = this.getRectanglesToConsiderForBranchingVarCalculation( );\r\n \r\n //collect 0 direction refcounts into this map\r\n Map<String, Integer> zeroVar_RefCountMap = new HashMap<String, Integer> () ;\r\n //and one diirection refconts into this map\r\n Map<String, Integer> oneVar_RefCountMap = new HashMap<String, Integer> () ;\r\n \r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle =null;\r\n for (Rectangle rect: rectanglesToConsiderForBranchingVarCalculation){\r\n variablesUsedForBranchingInThisRectangle = getVariablesUsedForBranchingInThisRectangle (rect);\r\n if (variablesUsedForBranchingInThisRectangle.size()>ZERO) {\r\n this.updateVariableRefCounts(zeroVar_RefCountMap, oneVar_RefCountMap, variablesUsedForBranchingInThisRectangle) ;\r\n }else {\r\n System.err.print(\"trying to branch a node which should have been marked infeasible\" );\r\n exit(ONE);\r\n }\r\n }\r\n \r\n \r\n //now find the highest refcount var, no matter its direction\r\n int highZeroFreq = zeroVar_RefCountMap.isEmpty()?ZERO:Collections.max( zeroVar_RefCountMap.values());\r\n int highOneFreq = oneVar_RefCountMap.isEmpty()? ZERO: Collections.max(oneVar_RefCountMap.values()) ;\r\n \r\n //we need to find the selected var's refcount on the other side\r\n int selectedVarRefCountOnOtherSide = ZERO;\r\n \r\n int totalRects = getNumberOfRects(this.myInfeasibleRectanglesList) ;\r\n \r\n if (highZeroFreq>highOneFreq) {\r\n result.varName=getHighestFreqVar (zeroVar_RefCountMap,highZeroFreq ) ;\r\n result.coeff=highZeroFreq;\r\n selectedVarRefCountOnOtherSide= oneVar_RefCountMap.get( result.varName)==null? ZERO : oneVar_RefCountMap.get( result.varName);\r\n //this is how many rects will survive on either side\r\n childRectCounts.zeroSideCount = totalRects - selectedVarRefCountOnOtherSide;\r\n childRectCounts.oneSideCount=totalRects -highZeroFreq ;\r\n \r\n } else {\r\n result.varName=getHighestFreqVar (oneVar_RefCountMap,highOneFreq ) ;\r\n result.coeff=highOneFreq;\r\n selectedVarRefCountOnOtherSide= zeroVar_RefCountMap.get( result.varName)==null? ZERO : zeroVar_RefCountMap.get( result.varName);\r\n \r\n childRectCounts.zeroSideCount = totalRects - highOneFreq;\r\n childRectCounts.oneSideCount=totalRects - selectedVarRefCountOnOtherSide;\r\n }\r\n \r\n return result;\r\n }", "public interface IBranchFunctionDef {\n /**\n * Verifies that the branch function is valid\n * @return If the usage of the branch function is valid\n */\n boolean verify(@Nullable IBranchFunctionDef parent, ISkriptFunctionDef function, ICodeDef codeDef);\n\n /**\n * Gets the variables of the def\n * @return Def's variables\n */\n List<IVariableDef> getVariables();\n\n /**\n * Sets up the variables of the def\n * @param factory Variable factory\n */\n void setupVariables(IVariableFactory factory);\n}", "protected abstract void a(bru parambru);", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public final AstValidator.split_branch_return split_branch() throws RecognitionException {\n AstValidator.split_branch_return retval = new AstValidator.split_branch_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree SPLIT_BRANCH407=null;\n AstValidator.alias_return alias408 =null;\n\n AstValidator.cond_return cond409 =null;\n\n\n CommonTree SPLIT_BRANCH407_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:628:2: ( ^( SPLIT_BRANCH alias cond ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:628:4: ^( SPLIT_BRANCH alias cond )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n SPLIT_BRANCH407=(CommonTree)match(input,SPLIT_BRANCH,FOLLOW_SPLIT_BRANCH_in_split_branch3344); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n SPLIT_BRANCH407_tree = (CommonTree)adaptor.dupNode(SPLIT_BRANCH407);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(SPLIT_BRANCH407_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_alias_in_split_branch3346);\n alias408=alias();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, alias408.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cond_in_split_branch3348);\n cond409=cond();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, cond409.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n aliases.add( (alias408!=null?alias408.name:null) );\n }\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "private BaleElement.Branch createOuterBranch(BaleAstNode sn)\n{\n switch (sn.getNodeType()) {\n case FILE :\n\t return new BaleElement.CompilationUnitNode(for_document,cur_parent);\n case CLASS :\n\t return new BaleElement.ClassNode(for_document,cur_parent);\n case METHOD :\n\t return new BaleElement.MethodNode(for_document,cur_parent);\n case FIELD :\n\t return new BaleElement.FieldNode(for_document,cur_parent);\n case ANNOTATION :\n\t return new BaleElement.AnnotationNode(for_document,cur_parent);\n case STATEMENT :\n\t return new BaleElement.SplitStatementNode(for_document,cur_parent);\n case EXPRESSION :\n\t return new BaleElement.SplitExpressionNode(for_document,cur_parent);\n case BLOCK :\n\t return new BaleElement.BlockNode(for_document,cur_parent);\n case SWITCH_BLOCK :\n\t return new BaleElement.SwitchBlockNode(for_document,cur_parent);\n case INITIALIZER :\n\t return new BaleElement.InitializerNode(for_document,cur_parent);\n case SET :\n\t // return new BaleElement.DeclSet(for_document,cur_parent);\n\t break;\n default:\n\t break;\n }\n return null;\n}", "private void selectBranch () {\n \n TagsNode node = (TagsNode)tagsTree.getLastSelectedPathComponent();\n \n if (node == null) {\n // nothing selected\n }\n else\n if (node == position.getTagsNode()) {\n // If we're already positioned on the selected node, then no\n // need to do anything else (especially since it might set off\n // an endless loop).\n }\n else\n if (node.getNodeType() == TagsNode.ITEM) {\n // System.out.println (\"selectBranch selected item = \" + node.toString());\n boolean modOK = modIfChanged();\n if (modOK) {\n ClubEvent branch = (ClubEvent)node.getTaggable();\n int branchIndex = clubEventList.findByUniqueKey (branch);\n if (branchIndex >= 0) {\n position = clubEventList.positionUsingListIndex (branchIndex);\n position.setTagsNode (node);\n positionAndDisplay();\n } else {\n System.out.println (\"ClubPlanner.selectBranch\");\n System.out.println \n (\"-- Selected a branch from the tree that couldn't be found in the list\");\n System.out.println (\"-- node = \" + node.toString());\n System.out.println (\"-- event = \" + branch.getWhat());\n System.out.println (\"-- branch index = \" + String.valueOf(branchIndex));\n }\n }\n }\n else {\n // Do nothing until an item is selected\n // System.out.println (\"selectBranch selected node = \" + node.toString());\n }\n }", "abstract void depComponent(DepComponent depComponent);", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public int getBranchCount() { return _brcnt; }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void l0() {\n b bVar = (b) this.c0.get();\n if (bVar != null) {\n bVar.a();\n }\n }", "protected void a(bug parambug)\r\n/* 35: */ {\r\n/* 36:36 */ this.j.a((bxf)null);\r\n/* 37: */ }", "BranchingBlock createBranchingBlock();", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "public ArrayList <Branch> createBranch(){\n\t\tPVector dir1 =PVector.sub(loc_end,loc_begin);\n\t\tPVector dir2 =PVector.sub(loc_end,loc_begin);\n\t\t//println(\"loc_newEnd1: \"+loc_end.x+\" : \"+loc_end.y);\n\t\t//println(\"loc_newEnd1: \"+dir1.x+\" : \"+dir1.y);\n\t\tdir1.rotate(random(PI/4,PI/5));\n\t\tdir1.mult(0.67f);\n\t\tPVector loc_newEnd1 = PVector.add(loc_end,dir1);\n\t\tBranch branch_a = new Branch(this.loc_end,loc_newEnd1);\n\t\t\n\t\tdir2.rotate(random(-PI/4,-PI/5));\n\t\tdir2.mult(0.67f);\n\t\tPVector loc_newEnd2 = PVector.add(loc_end,dir2);\n\t\tBranch branch_b = new Branch(this.loc_end,loc_newEnd2);\n\n\t\tArrayList<Branch> bs = new ArrayList<Branch>() ;\n\t\tbs.add(branch_a);\n\t\tbs.add(branch_b);\n\t\tcomplete=true;\n\n\t\t\n\t\t//println(\"loc_newEnd2: \"+loc_newEnd2.x+\" : \"+loc_newEnd2.y);\n\t\t\n\t\treturn bs;\n\n\t}", "public void branchChainTo(Label label) {\n // do nothing by default\n }", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public bb b() {\n return a(this.a);\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test090() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Vi_5aV\", \"Vi_5aV\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.br();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "public boolean b()\r\n/* 709: */ {\r\n/* 710:702 */ return this.l;\r\n/* 711: */ }", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public abstract C0631bt mo9227aB();", "@Test\n public void test3() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n boolean boolean0 = defaultMenuItem0.isLeaf();\n assertEquals(true, boolean0);\n }", "public synchronized BDD behaviourBDD(BIPComponent component) throws BIPEngineException {\n\n\t\tBDD componentBehaviourBDD = engine.getBDDManager().zero();\n\t\tBehaviour behaviour = wrapper.getBehaviourByComponent(component);\n\t\tif (behaviour == null) {\n\t\t\ttry {\n\t\t\t\tlogger.error(\"Behaviour of component {} is null\", component.getId());\n\t\t\t\tthrow new BIPEngineException(\"Behaviour of component \" + component.getId() + \" is null.\");\n\t\t\t} catch (BIPEngineException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t\tList<Port> componentPorts = behaviour.getEnforceablePorts();\n\t\tList<String> componentStates = new ArrayList<String>(behaviour.getStates());\n\t\tHashtable<String, BDD> portToBDD = componentToPortToBDD.get(component);\n\t\tHashtable<String, BDD> stateToBDD = componentToStateToBDD.get(component);\n\n\t\tBDD tmp;\n\t\tfor (String componentState : componentStates) {\n\t\t\tlogger.trace(\"BE: Component State: \" + componentState);\n\n\t\t\tBDD onlyState = engine.getBDDManager().one().and(stateToBDD.get(componentState));\n\n\t\t\tfor (String otherState : componentStates) {\n\t\t\t\tif (!componentState.equals(otherState)) {\n\t\t\t\t\tlogger.trace(\"BE: Negated State: \" + otherState);\n\t\t\t\t\ttmp = onlyState.and(stateToBDD.get(otherState).not());\n\t\t\t\t\tonlyState.free();\n\t\t\t\t\tonlyState = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSet<Port> statePorts = behaviour.getStateToPorts().get(componentState);\n\t\t\tif (!statePorts.isEmpty()) {\n\t\t\t\tfor (Port port : statePorts) {\n\t\t\t\t\tlogger.trace(\"BE: Component state port: \" + port);\n\t\t\t\t\tBDD ports = engine.getBDDManager().one().and(onlyState);\n\t\t\t\t\ttmp = ports.and(portToBDD.get(port.getId()));\n\t\t\t\t\tports.free();\n\t\t\t\t\tports = tmp;\n\t\t\t\t\tfor (Port otherPort : componentPorts) {\n\t\t\t\t\t\tif (!port.getId().equals(otherPort.getId())) {\n\t\t\t\t\t\t\tlogger.trace(\"BE: Negated ports: \" + otherPort);\n\t\t\t\t\t\t\tports.andWith(portToBDD.get(otherPort.getId()).not());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcomponentBehaviourBDD.orWith(ports);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (Port otherPort : componentPorts) {\n\t\t\t\t\tlogger.trace(\"BE: All negated ports: \" + otherPort);\n\t\t\t\t\tonlyState.andWith(portToBDD.get(otherPort.getId()).not());\n\t\t\t\t}\n\t\t\t\tcomponentBehaviourBDD.orWith(onlyState);\n\t\t\t}\n\t\t}\n\n\t\tBDD allNegatedPortsBDD = engine.getBDDManager().one();\n\t\tfor (Port port : componentPorts) {\n\t\t\tallNegatedPortsBDD.andWith(portToBDD.get(port.getId()).not());\n\t\t}\n\t\treturn componentBehaviourBDD.orWith(allNegatedPortsBDD);\n\n\t}", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public interface bj\n extends bl\n{\n\n public abstract void a(a a1);\n\n public abstract void b(a a1);\n\n public abstract Ad c();\n\n public abstract String d();\n\n public abstract a e();\n\n public abstract b f();\n\n // Unreferenced inner class com/vungle/publisher/bj$a\n /* block-local class not found */\n class a {}\n\n\n // Unreferenced inner class com/vungle/publisher/bj$b\n /* block-local class not found */\n class b {}\n\n}", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public amj b(dz paramdz, amj paramamj)\r\n/* 7: */ {\r\n/* 8:242 */ aqu localaqu = paramdz.i();\r\n/* 9: */ \r\n/* 10:244 */ dt localdt = paramdz.d().a(ave.b(paramdz.f()));\r\n/* 11: */ \r\n/* 12:246 */ bec localbec = localaqu.p(localdt);\r\n/* 13:247 */ atr localatr = localbec.c();\r\n/* 14:248 */ bof localbof = localatr.r();\r\n/* 15: */ alq localalq;\r\n/* 16:251 */ if ((bof.h.equals(localbof)) && ((localatr instanceof axl)) && (((Integer)localbec.b(axl.b)).intValue() == 0)) {\r\n/* 17:252 */ localalq = amk.ax;\r\n/* 18:253 */ } else if ((bof.i.equals(localbof)) && ((localatr instanceof axl)) && (((Integer)localbec.b(axl.b)).intValue() == 0)) {\r\n/* 19:254 */ localalq = amk.ay;\r\n/* 20: */ } else {\r\n/* 21:256 */ return super.b(paramdz, paramamj);\r\n/* 22: */ }\r\n/* 23:259 */ localaqu.g(localdt);\r\n/* 24:260 */ if (--paramamj.b == 0)\r\n/* 25: */ {\r\n/* 26:261 */ paramamj.a(localalq);\r\n/* 27:262 */ paramamj.b = 1;\r\n/* 28: */ }\r\n/* 29:263 */ else if (((bcx)paramdz.h()).a(new amj(localalq)) < 0)\r\n/* 30: */ {\r\n/* 31:264 */ this.b.a(paramdz, new amj(localalq));\r\n/* 32: */ }\r\n/* 33:266 */ return paramamj;\r\n/* 34: */ }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public bcm a(World paramaqu, int paramInt)\r\n/* 41: */ {\r\n/* 42:56 */ return new bdj();\r\n/* 43: */ }", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "protected abstract void mo3471b(ProgressBar progressBar);", "public abstract BoundType b();", "public abstract int b();", "private void setBranchAtom(IMolecule molecule, IAtom unplacedAtom, IAtom atomA, IAtomContainer atomNeighbours, AtomPlacer3D ap3d, AtomTetrahedralLigandPlacer3D atlp3d) throws Exception {\n\t\t//logger.debug(\"****** SET Branch Atom ****** >\"+molecule.getAtomNumber(unplacedAtom));\n\t\tIAtomContainer noCoords = molecule.getBuilder().newAtomContainer();\n\t\tnoCoords.addAtom(unplacedAtom);\n\t\tPoint3d centerPlacedMolecule = ap3d.geometricCenterAllPlacedAtoms(molecule);\n\t\tIAtom atomB = atomNeighbours.getAtom(0);\n\n String atypeNameA = atomA.getAtomTypeName();\n String atypeNameB = atomB.getAtomTypeName();\n String atypeNameUnplaced = unplacedAtom.getAtomTypeName();\n\n double length = ap3d.getBondLengthValue(atypeNameA, atypeNameUnplaced);\n double angle = (ap3d.getAngleValue(atypeNameB, atypeNameA, atypeNameUnplaced)) * Math.PI / 180;\n\t\t/*\n\t\t * System.out.println(\"A:\"+atomA.getSymbol()+\" \"+atomA.getAtomTypeName()+\" B:\"+atomB.getSymbol()+\" \"+atomB.getAtomTypeName()\n\t\t * +\" unplaced Atom:\"+unplacedAtom.getAtomTypeName()+\" BL:\"+length+\" Angle:\"+angle\n\t\t * +\" FormalNeighbour:\"+atomA.getFormalNeighbourCount()+\" HYB:\"+atomA.getFlag(CDKConstants.HYBRIDIZATION_SP2)\n\t\t * +\" #Neigbhours:\"+atomNeighbours.getAtomCount());\n\t\t */\n\t\tIAtom atomC = ap3d.getPlacedHeavyAtom(molecule, atomB, atomA);\n\n\t\tPoint3d[] branchPoints = atlp3d.get3DCoordinatesForLigands(atomA, noCoords, atomNeighbours, atomC\n\t\t\t\t, (atomA.getFormalNeighbourCount() - atomNeighbours.getAtomCount())\n\t\t\t\t, length, angle);\n\t\tdouble distance = 0;\n\t\tint farthestPoint = 0;\n\t\ttry {\n\t\t\tfor (int i = 0; i < branchPoints.length; i++) {\n\t\t\t\tif (Math.abs(branchPoints[i].distance(centerPlacedMolecule)) > Math.abs(distance)) {\n\t\t\t\t\tdistance = branchPoints[i].distance(centerPlacedMolecule);\n\t\t\t\t\tfarthestPoint = i;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception ex2) {\n\t\t\tthrow new IOException(\"SetBranchAtomERROR: Not enough branch Points\");\n\t\t}\n\n\t\tint stereo = -1;\n\t\tif (atomA.getStereoParity() != CDKConstants.UNSET && atomA.getStereoParity() != 0 ||\n\t\t\t\t(Math.abs((molecule.getBond(atomA, unplacedAtom)).getStereo()) < 2\n\t\t\t\t && Math.abs((molecule.getBond(atomA, unplacedAtom)).getStereo()) != 0)\n\t\t\t\t && molecule.getMaximumBondOrder(atomA) == IBond.Order.SINGLE) {\n\t\t\tif (atomNeighbours.getAtomCount() > 1) {\n\t\t\t\tstereo = atlp3d.makeStereocenter(atomA.getPoint3d(), molecule.getBond(atomA, unplacedAtom), (atomNeighbours.getAtom(0)).getPoint3d(), (atomNeighbours.getAtom(1)).getPoint3d(), branchPoints);\n\t\t\t}\n\t\t}\n\t\tif (stereo != -1) {\n\t\t\tfarthestPoint = stereo;\n\t\t}\n\t\tunplacedAtom.setPoint3d(branchPoints[farthestPoint]);\n\t\tunplacedAtom.setFlag(CDKConstants.ISPLACED, true);\n\t}", "protected void evalBranch(){\n List<Token> arguments = this.mainToken.getChilds();\n\n //Primer argumento es un string\n String stringExpression = arguments.get(0).getValue();\n //Removemos la referencia en la lista\n arguments.remove(0);\n\n String response = this.make(stringExpression, arguments);\n\n //Eliminar hojas\n this.setResponse(response);\n }", "@Test\n public void testAddCase2b()\n {\n RedBlackTree<Integer> tree = new RedBlackTree<Integer>();\n tree.add(1);\n tree.add(2);\n assert(\"[b:1]\\n[r:2]\\n\".equals(tree.toString()));\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public BoundType b() {\n throw new AssertionError(\"this statement should be unreachable\");\n }", "BOperation createBOperation();", "public void b(World paramaqu, Random paramRandom, BlockPosition paramdt, Block parambec)\r\n/* 77: */ {\r\n/* 78: 93 */ BlockPosition localdt1 = paramdt.up();\r\n/* 79: */ label260:\r\n/* 80: 95 */ for (int i = 0; i < 128; i++)\r\n/* 81: */ {\r\n/* 82: 96 */ BlockPosition localdt2 = localdt1;\r\n/* 83: 97 */ for (int j = 0; j < i / 16; j++)\r\n/* 84: */ {\r\n/* 85: 98 */ localdt2 = localdt2.offset(paramRandom.nextInt(3) - 1, (paramRandom.nextInt(3) - 1) * paramRandom.nextInt(3) / 2, paramRandom.nextInt(3) - 1);\r\n/* 86: 99 */ if ((paramaqu.getBlock(localdt2.down()).getType() != BlockList.grass) || (paramaqu.getBlock(localdt2).getType().blocksMovement())) {\r\n/* 87: */ break label260;\r\n/* 88: */ }\r\n/* 89: */ }\r\n/* 90:104 */ if (paramaqu.getBlock(localdt2).getType().material == Material.air)\r\n/* 91: */ {\r\n/* 92: */ Object localObject;\r\n/* 93:108 */ if (paramRandom.nextInt(8) == 0)\r\n/* 94: */ {\r\n/* 95:109 */ localObject = paramaqu.b(localdt2).a(paramRandom, localdt2);\r\n/* 96:110 */ avy localavy = ((EnumFlowerVariant)localObject).a().a();\r\n/* 97:111 */ Block localbec = localavy.instance().setData(localavy.l(), (Comparable)localObject);\r\n/* 98:112 */ if (localavy.f(paramaqu, localdt2, localbec)) {\r\n/* 99:113 */ paramaqu.setBlock(localdt2, localbec, 3);\r\n/* 100: */ }\r\n/* 101: */ }\r\n/* 102: */ else\r\n/* 103: */ {\r\n/* 104:116 */ localObject = BlockList.tallgrass.instance().setData(bbh.a, bbi.b);\r\n/* 105:117 */ if (BlockList.tallgrass.f(paramaqu, localdt2, (Block)localObject)) {\r\n/* 106:118 */ paramaqu.setBlock(localdt2, (Block)localObject, 3);\r\n/* 107: */ }\r\n/* 108: */ }\r\n/* 109: */ }\r\n/* 110: */ }\r\n/* 111: */ }", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "private static void bfs(State curr) {\n curr.buildStack(curr.getSuccessors(curr));\r\n \r\n if(curr.isGoalState()) \r\n System.out.println(curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(curr.getOrderedPair());//initial\r\n \r\n curr.close.add(curr);\r\n while(!curr.open.isEmpty()&&!curr.isGoalState()) {\r\n curr.buildStack(curr.getSuccessors(curr));\r\n curr.printHelp(curr, 3);\r\n curr = curr.open.get(0);\r\n curr.close.add(curr.open.remove(0));\r\n }\r\n \r\n if(curr.isGoalState()) {\r\n System.out.println(curr.getOrderedPair() + \" Goal\");\r\n curr.printPath(curr);\r\n }\r\n }", "public void e(android.arch.persistence.a.b bVar) {\n android.arch.persistence.a.b bVar2 = bVar;\n HashMap hashMap = new HashMap(2);\n hashMap.put(\"work_spec_id\", new android.arch.persistence.room.b.b.a(\"work_spec_id\", \"TEXT\", true, 1));\n hashMap.put(\"prerequisite_id\", new android.arch.persistence.room.b.b.a(\"prerequisite_id\", \"TEXT\", true, 2));\n HashSet hashSet = new HashSet(2);\n hashSet.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"work_spec_id\"}), Arrays.asList(new String[]{\"id\"})));\n hashSet.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"prerequisite_id\"}), Arrays.asList(new String[]{\"id\"})));\n HashSet hashSet2 = new HashSet(2);\n hashSet2.add(new d(\"index_Dependency_work_spec_id\", false, Arrays.asList(new String[]{\"work_spec_id\"})));\n hashSet2.add(new d(\"index_Dependency_prerequisite_id\", false, Arrays.asList(new String[]{\"prerequisite_id\"})));\n android.arch.persistence.room.b.b bVar3 = new android.arch.persistence.room.b.b(\"Dependency\", hashMap, hashSet, hashSet2);\n android.arch.persistence.room.b.b a = android.arch.persistence.room.b.b.a(bVar2, \"Dependency\");\n StringBuilder stringBuilder;\n if (bVar3.equals(a)) {\n hashMap = new HashMap(23);\n hashMap.put(\"id\", new android.arch.persistence.room.b.b.a(\"id\", \"TEXT\", true, 1));\n hashMap.put(\"state\", new android.arch.persistence.room.b.b.a(\"state\", \"INTEGER\", true, 0));\n hashMap.put(\"worker_class_name\", new android.arch.persistence.room.b.b.a(\"worker_class_name\", \"TEXT\", true, 0));\n hashMap.put(\"input_merger_class_name\", new android.arch.persistence.room.b.b.a(\"input_merger_class_name\", \"TEXT\", false, 0));\n hashMap.put(\"input\", new android.arch.persistence.room.b.b.a(\"input\", \"BLOB\", true, 0));\n hashMap.put(\"output\", new android.arch.persistence.room.b.b.a(\"output\", \"BLOB\", true, 0));\n hashMap.put(\"initial_delay\", new android.arch.persistence.room.b.b.a(\"initial_delay\", \"INTEGER\", true, 0));\n hashMap.put(\"interval_duration\", new android.arch.persistence.room.b.b.a(\"interval_duration\", \"INTEGER\", true, 0));\n hashMap.put(\"flex_duration\", new android.arch.persistence.room.b.b.a(\"flex_duration\", \"INTEGER\", true, 0));\n hashMap.put(\"run_attempt_count\", new android.arch.persistence.room.b.b.a(\"run_attempt_count\", \"INTEGER\", true, 0));\n hashMap.put(\"backoff_policy\", new android.arch.persistence.room.b.b.a(\"backoff_policy\", \"INTEGER\", true, 0));\n hashMap.put(\"backoff_delay_duration\", new android.arch.persistence.room.b.b.a(\"backoff_delay_duration\", \"INTEGER\", true, 0));\n hashMap.put(\"period_start_time\", new android.arch.persistence.room.b.b.a(\"period_start_time\", \"INTEGER\", true, 0));\n hashMap.put(\"minimum_retention_duration\", new android.arch.persistence.room.b.b.a(\"minimum_retention_duration\", \"INTEGER\", true, 0));\n hashMap.put(\"schedule_requested_at\", new android.arch.persistence.room.b.b.a(\"schedule_requested_at\", \"INTEGER\", true, 0));\n hashMap.put(\"required_network_type\", new android.arch.persistence.room.b.b.a(\"required_network_type\", \"INTEGER\", false, 0));\n hashMap.put(\"requires_charging\", new android.arch.persistence.room.b.b.a(\"requires_charging\", \"INTEGER\", true, 0));\n hashMap.put(\"requires_device_idle\", new android.arch.persistence.room.b.b.a(\"requires_device_idle\", \"INTEGER\", true, 0));\n hashMap.put(\"requires_battery_not_low\", new android.arch.persistence.room.b.b.a(\"requires_battery_not_low\", \"INTEGER\", true, 0));\n hashMap.put(\"requires_storage_not_low\", new android.arch.persistence.room.b.b.a(\"requires_storage_not_low\", \"INTEGER\", true, 0));\n hashMap.put(\"trigger_content_update_delay\", new android.arch.persistence.room.b.b.a(\"trigger_content_update_delay\", \"INTEGER\", true, 0));\n hashMap.put(\"trigger_max_content_delay\", new android.arch.persistence.room.b.b.a(\"trigger_max_content_delay\", \"INTEGER\", true, 0));\n hashMap.put(\"content_uri_triggers\", new android.arch.persistence.room.b.b.a(\"content_uri_triggers\", \"BLOB\", false, 0));\n hashSet = new HashSet(0);\n hashSet2 = new HashSet(1);\n hashSet2.add(new d(\"index_WorkSpec_schedule_requested_at\", false, Arrays.asList(new String[]{\"schedule_requested_at\"})));\n bVar3 = new android.arch.persistence.room.b.b(\"WorkSpec\", hashMap, hashSet, hashSet2);\n a = android.arch.persistence.room.b.b.a(bVar2, \"WorkSpec\");\n if (bVar3.equals(a)) {\n hashMap = new HashMap(2);\n hashMap.put(\"tag\", new android.arch.persistence.room.b.b.a(\"tag\", \"TEXT\", true, 1));\n hashMap.put(\"work_spec_id\", new android.arch.persistence.room.b.b.a(\"work_spec_id\", \"TEXT\", true, 2));\n hashSet = new HashSet(1);\n hashSet.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"work_spec_id\"}), Arrays.asList(new String[]{\"id\"})));\n hashSet2 = new HashSet(1);\n hashSet2.add(new d(\"index_WorkTag_work_spec_id\", false, Arrays.asList(new String[]{\"work_spec_id\"})));\n bVar3 = new android.arch.persistence.room.b.b(\"WorkTag\", hashMap, hashSet, hashSet2);\n a = android.arch.persistence.room.b.b.a(bVar2, \"WorkTag\");\n if (bVar3.equals(a)) {\n hashMap = new HashMap(2);\n hashMap.put(\"work_spec_id\", new android.arch.persistence.room.b.b.a(\"work_spec_id\", \"TEXT\", true, 1));\n hashMap.put(\"system_id\", new android.arch.persistence.room.b.b.a(\"system_id\", \"INTEGER\", true, 0));\n hashSet = new HashSet(1);\n hashSet.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"work_spec_id\"}), Arrays.asList(new String[]{\"id\"})));\n bVar3 = new android.arch.persistence.room.b.b(\"SystemIdInfo\", hashMap, hashSet, new HashSet(0));\n a = android.arch.persistence.room.b.b.a(bVar2, \"SystemIdInfo\");\n if (bVar3.equals(a)) {\n hashMap = new HashMap(2);\n hashMap.put(\"name\", new android.arch.persistence.room.b.b.a(\"name\", \"TEXT\", true, 1));\n hashMap.put(\"work_spec_id\", new android.arch.persistence.room.b.b.a(\"work_spec_id\", \"TEXT\", true, 2));\n HashSet hashSet3 = new HashSet(1);\n hashSet3.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"work_spec_id\"}), Arrays.asList(new String[]{\"id\"})));\n hashSet = new HashSet(1);\n hashSet.add(new d(\"index_WorkName_work_spec_id\", false, Arrays.asList(new String[]{\"work_spec_id\"})));\n android.arch.persistence.room.b.b bVar4 = new android.arch.persistence.room.b.b(\"WorkName\", hashMap, hashSet3, hashSet);\n android.arch.persistence.room.b.b a2 = android.arch.persistence.room.b.b.a(bVar2, \"WorkName\");\n if (!bVar4.equals(a2)) {\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle WorkName(androidx.work.impl.model.WorkName).\\n Expected:\\n\");\n stringBuilder.append(bVar4);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a2);\n throw new IllegalStateException(stringBuilder.toString());\n }\n return;\n }\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle SystemIdInfo(androidx.work.impl.model.SystemIdInfo).\\n Expected:\\n\");\n stringBuilder.append(bVar3);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a);\n throw new IllegalStateException(stringBuilder.toString());\n }\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle WorkTag(androidx.work.impl.model.WorkTag).\\n Expected:\\n\");\n stringBuilder.append(bVar3);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a);\n throw new IllegalStateException(stringBuilder.toString());\n }\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle WorkSpec(androidx.work.impl.model.WorkSpec).\\n Expected:\\n\");\n stringBuilder.append(bVar3);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a);\n throw new IllegalStateException(stringBuilder.toString());\n }\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle Dependency(androidx.work.impl.model.Dependency).\\n Expected:\\n\");\n stringBuilder.append(bVar3);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a);\n throw new IllegalStateException(stringBuilder.toString());\n }", "protected int b(i var1_1, y.c.q var2_2, y.c.q var3_3, h var4_4, h var5_5, int var6_6, ArrayList var7_7, ArrayList var8_8, h var9_9, h var10_10) {\n block26 : {\n block25 : {\n var24_11 = o.p;\n this.c = var6_6;\n this.d = var2_2;\n this.e = var3_3;\n this.n = var1_1.h();\n this.o = var1_1.f();\n this.h = var1_1;\n this.i = new int[this.n];\n this.j = new int[this.n];\n this.k = new int[this.o];\n this.l = new int[this.o];\n this.m = new int[this.n];\n this.b = new Object[this.o];\n this.t = new int[this.n];\n this.r = new d[this.n];\n this.s = new d[this.n];\n this.f = var4_4;\n this.a = new a[this.n];\n this.q = new ArrayList<E>(var1_1.f());\n this.p = new I(this.o);\n var11_12 = 0;\n block0 : do {\n v0 = var11_12;\n block1 : while (v0 < var7_7.size()) {\n var12_15 = (a)var7_7.get(var11_12);\n v1 /* !! */ = var12_15.b();\n if (var24_11) break block25;\n var13_17 = v1 /* !! */ ;\n while (var13_17.f()) {\n var14_20 = var13_17.a();\n var15_23 = var14_20.b();\n this.a[var14_20.b()] = var12_15;\n this.i[var15_23] = var12_15.a();\n v0 = this.i[var15_23];\n if (var24_11) continue block1;\n if (v0 < 0) {\n throw new B(\"found negative capacity\");\n }\n var13_17.g();\n if (!var24_11) continue;\n }\n ++var11_12;\n if (!var24_11) continue block0;\n }\n break block0;\n break;\n } while (true);\n v1 /* !! */ = var11_13 = this.h.p();\n }\n while (var11_13.f()) {\n var12_15 = var11_13.a();\n this.r[var12_15.b()] = (d)var10_10.b(var12_15);\n this.s[var12_15.b()] = (d)var9_9.b(var12_15);\n var11_13.g();\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block26;\n }\n this.g = new u[this.o];\n }\n var11_13 = var1_1.o();\n while (var11_13.f()) {\n var12_15 = var11_13.e();\n v2 = this;\n if (!var24_11) {\n v2.g[var12_15.d()] = new u((y.c.q)var12_15, var12_15.d());\n var11_13.g();\n if (!var24_11) continue;\n }\n ** GOTO lbl65\n }\n block5 : do {\n v2 = this;\nlbl65: // 2 sources:\n var11_14 = var13_18 = v2.a();\n var12_16 = 0;\n var14_21 = 0;\n block6 : do {\n v3 = var14_21;\n v4 = var8_8.size();\n block7 : while (v3 < v4) {\n v5 = var8_8.get(var14_21);\n do {\n var15_24 = (ArrayList)v5;\n var16_26 = false;\n var17_27 = 0;\n var18_28 = 0;\n v6 = 0;\n if (!var24_11) {\n for (var19_29 = v1574606; var19_29 < var15_24.size(); ++var19_29) {\n block28 : {\n block27 : {\n var20_30 = (a)var15_24.get(var19_29);\n v3 = this.m[var20_30.b[0].b()];\n v4 = 1;\n if (var24_11) continue block7;\n if (v3 != v4 || this.m[var20_30.b[1].b()] != 1) continue;\n ++var12_16;\n var21_31 = this.s[var20_30.b[0].b()];\n var22_32 = 0;\n while (this.m[var21_31.b()] == 1) {\n var22_32 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n var21_31 = this.s[var21_31.b()];\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block27;\n }\n var22_32 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n }\n var23_33 = 0;\n var21_31 = this.s[var20_30.b[1].b()];\n while (this.m[var21_31.b()] == 1) {\n var23_33 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n var21_31 = this.s[var21_31.b()];\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block28;\n }\n var23_33 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n }\n if (var23_33 > 400 || var22_32 > 400) {\n block29 : {\n if (var23_33 < var22_32) {\n this.a(var20_30);\n if (!var24_11) break block29;\n }\n this.b(var20_30);\n }\n var16_26 = true;\n }\n var18_28 += var23_33;\n var17_27 += var22_32;\n if (!var24_11) continue;\n }\n if (!var16_26) {\n for (var19_29 = 0; var19_29 < var15_24.size(); ++var19_29) {\n var20_30 = (a)var15_24.get(var19_29);\n v3 = this.m[var20_30.b[0].b()];\n v4 = 1;\n if (var24_11) continue block7;\n if (v3 != v4 || this.m[var20_30.b[1].b()] != 1) continue;\n if (var18_28 < var17_27) {\n this.a(var20_30);\n if (!var24_11) continue;\n }\n this.b(var20_30);\n if (!var24_11) continue;\n }\n }\n ++var14_21;\n if (!var24_11) continue block6;\n }\n ** GOTO lbl133\n v6 = var12_16;\nlbl133: // 2 sources:\n if (v6 > 0) continue block5;\n v5 = this.h.p();\n } while (var24_11);\n }\n break;\n } while (true);\n break;\n } while (true);\n var13_19 = v5;\n while (var13_19.f()) {\n var14_22 = var13_19.a();\n v7 = var14_22.b();\n if (var24_11 != false) return v7;\n var15_25 = v7;\n var5_5.a((Object)var14_22, this.m[var15_25]);\n var13_19.g();\n if (!var24_11) continue;\n }\n v7 = var11_14;\n return v7;\n }" ]
[ "0.6589841", "0.60462016", "0.59157014", "0.5860497", "0.584119", "0.5838489", "0.5802258", "0.5797502", "0.5784377", "0.57630986", "0.5727037", "0.57211983", "0.561326", "0.5595675", "0.55696476", "0.55641806", "0.55101824", "0.5491105", "0.5472038", "0.5458578", "0.5440715", "0.54298866", "0.5414601", "0.5404881", "0.5402085", "0.538354", "0.5373816", "0.53643143", "0.535998", "0.53590244", "0.53577375", "0.53577375", "0.53262156", "0.53106016", "0.5303965", "0.5303869", "0.5279478", "0.527274", "0.5267005", "0.5261008", "0.52326584", "0.522841", "0.5224155", "0.5222793", "0.5205404", "0.5203834", "0.5200679", "0.51922524", "0.51859295", "0.5183685", "0.51725036", "0.5170875", "0.51680034", "0.5164791", "0.51597846", "0.5159325", "0.51539356", "0.51530963", "0.51518625", "0.5146546", "0.51464957", "0.5144473", "0.5141791", "0.5121405", "0.51135385", "0.5112043", "0.5109161", "0.51053244", "0.51021725", "0.50995", "0.5088961", "0.50827974", "0.50757307", "0.5074004", "0.5073778", "0.50715274", "0.507024", "0.5065705", "0.5063643", "0.50574505", "0.5053942", "0.505212", "0.5051438", "0.50493234", "0.50478953", "0.5043872", "0.5038269", "0.5038198", "0.5037751", "0.50337064", "0.5021833", "0.5020313", "0.5010313", "0.50083053", "0.50055075", "0.5004425", "0.5001897", "0.5000204", "0.49972147", "0.49950278", "0.498892" ]
0.0
-1
Test case number: 24 / 1 covered goal: Goal 1. wheel.components.Component.s()Lwheel/components/Component;: rootBranch
@Test public void test024() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Table table0 = new Table(errorPage0, ""); Block block0 = (Block)table0.s(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public void checkAndSetStart() {\r\n\t\tSystem.out.println(\"\t\tcheckAndSetStart \"+this.id +\" size:\"+this.components.size());\r\n\t\tif(hasNoStart()) {\t\t\r\n\t\t\tList<ComponentConfig> longestVisitedComps = new ArrayList<ComponentConfig>();\r\n\t\t\tComponentConfig longestVisitedComp = null;\r\n\t\t\tint longestVisited = 0;\r\n\t\t\tfor(ComponentConfig comp: components) {\r\n\t\t\t\tint visited = traverseModel(0,comp);\r\n\t\t\t\tSystem.out.println(\"\t\t\ttraverse\"+comp.getId()+\" v:\"+visited);\r\n\t\t\t\tif(visited > longestVisited) {\r\n\t\t\t\t\tlongestVisited = visited;\r\n\t\t\t\t\tlongestVisitedComps.clear();\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t} else if(visited == longestVisited) {\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t}\r\n\t\t\t\t// catch deadloop, if all component are visisted\r\n\t\t\t\tif(longestVisited == components.size())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(ComponentConfig st: longestVisitedComps) {\r\n\t\t\t\tst.setIsstartcaller(true);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t// find other component that call to the same component that start component calls within model\r\n\t\tList<ComponentConfig> startComps = new ArrayList<ComponentConfig>();\r\n\t\tfor(ComponentConfig st: components) {\r\n\t\t\tif(st.isIsstartcaller())\r\n\t\t\t\tstartComps.add(st);\r\n\t\t}\r\n\t\tList<Integer> calls = new ArrayList<Integer>();\r\n\t\tfor(ComponentConfig st: startComps) {\r\n\t\t\tif(st.isIsstartcaller() && st.getCalls()!=null) {\r\n\t\t\t\tfor(int i: st.getCalls())\r\n\t\t\t\t\tfor(ComponentConfig eachComp: components) {\r\n\t\t\t\t\t\tSystem.out.println(\"\tfind comp that call \"+i+\" \"+eachComp.getCalls());\r\n\t\t\t\t\t\tif(eachComp.getCalls()!=null)\r\n\t\t\t\t\t\t\tfor(int callee: eachComp.getCalls()) {\r\n\t\t\t\t\t\t\t\t// found component that call to the same target\r\n\t\t\t\t\t\t\t\tif(callee == i)\r\n\t\t\t\t\t\t\t\t\teachComp.setIsstartcaller(true);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "String branch();", "@Test\n\tpublic void componentToString()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent comp = new Component();\n\t\t\tcomp.setName(compName);\n\t\t\tcomp.setGroup(compGroup);\n\t\t\tcomp.setVersion(compVersion);\n\t\t\tcomp.setType(compType);\n\t\t\t\n\t\t\tString expectedStringWithoutTabs = \"Name:newComponent\\n\" +\n\t\t\t\t\t\"Group: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"Version: 1.5.1\\n\";\n\t\t\tString actualStringWithoutTabs = ComponentUtilities.toString(comp);\n\t\t\t\n\t\t\tif (expectedStringWithoutTabs.equals(actualStringWithoutTabs))\n\t\t\t\twatcher.getLogger()\n\t\t\t\t\t\t.info(\"Got Expected String from ComponentUtilities.toString(comp)!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithoutTabs,\n\t\t\t\t\t\tactualStringWithoutTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithoutTabs.equals(actualStringWithoutTabs));\n\t\t\t\n\t\t\tString expectedStringWithTabs = \"\tName:newComponent\\n\" +\n\t\t\t\t\t\"\tGroup: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"\tVersion: 1.5.1\\n\";\n\t\t\t\n\t\t\tString actualStringWithTabs = ComponentUtilities.toString(comp, \"\t\");\n\t\t\t\n\t\t\tif (actualStringWithTabs.equals(expectedStringWithTabs))\n\t\t\t\twatcher.getLogger().info(\"Got Expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\")!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithTabs,\n\t\t\t\t\t\tactualStringWithTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\"): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithTabs.equals(actualStringWithTabs));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting ComponentUtilities.toString.\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCYCLE() {\n CuteNetlibCase.doTest(\"CYCLE.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test163() throws Throwable {\n ElExpression elExpression0 = new ElExpression(\"N2}mQjM@Rjzvl\");\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"z:_i>EAQ.Bdq@CL&k?\\\"\");\n // Undeclared exception!\n try { \n xmlEntityRef0.clasS(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testParallelScan() throws Exception {\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"Convoluted\");\n job.setDefinition(new CpsFlowDefinition(\n \"echo 'first'\\n\" +\n \"def steps = [:]\\n\" +\n \"steps['1'] = {\\n\" +\n \" echo 'do 1 stuff'\\n\" +\n \"}\\n\" +\n \"steps['2'] = {\\n\" +\n \" echo '2a'\\n\" +\n \" echo '2b'\\n\" +\n \"}\\n\" +\n \"parallel steps\\n\" +\n \"echo 'final'\",\n true));\n\n /* Flow structure (ID - type)\n 2 - FlowStartNode (BlockStartNode)\n 3 - Echostep\n 4 - ParallelStep (StepStartNode) (start branches)\n 6 - ParallelStep (StepStartNode) (start branch 1), ParallelLabelAction with branchname=1\n 7 - ParallelStep (StepStartNode) (start branch 2), ParallelLabelAction with branchname=2\n 8 - EchoStep, (branch 1) parent=6\n 9 - StepEndNode, (end branch 1) startId=6, parentId=8\n 10 - EchoStep, (branch 2) parentId=7\n 11 - EchoStep, (branch 2) parentId = 10\n 12 - StepEndNode (end branch 2) startId=7 parentId=11,\n 13 - StepEndNode (close branches), parentIds = 9,12, startId=4\n 14 - EchoStep\n 15 - FlowEndNode (BlockEndNode)\n */\n\n WorkflowRun b = r.assertBuildStatusSuccess(job.scheduleBuild2(0));\n FlowExecution exec = b.getExecution();\n Collection<FlowNode> heads = b.getExecution().getCurrentHeads();\n\n AbstractFlowScanner scanner = new LinearScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 9, 8, 6, 4, 3, 2);\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n\n // Depth first scanner and with blacklist\n scanner = new DepthFirstScanner();\n scanner.setup(heads);\n\n // Compatibility test for ordering\n FlowTestUtils.assertNodeOrder(\"FlowGraphWalker\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n FlowTestUtils.assertNodeOrder(\"Depth first\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n scanner.setup(Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\")));\n FlowTestUtils.assertNodeOrder(\"Depth-first scanner from inside parallels\", scanner, 9, 8, 6, 4, 3, 2, 12, 11, 10, 7);\n\n // We're going to test the ForkScanner in more depth since this is its natural use\n scanner = new ForkScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13,\n 12, 11, 10, 7,// One parallel\n 9, 8, 6, // other parallel\n 4, 3, 2); // end bit\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n // Test forkscanner midflow\n scanner.setup(exec.getNode(\"14\"));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 14, 13,\n 12, 11, 10, 7, // Last parallel\n 9, 8, 6, // First parallel\n 4, 3, 2); // end bit\n\n // Test forkscanner inside a parallel\n List<FlowNode> startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 12, 11, 10, 7, 4, 3, 2);\n\n startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"11\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 11, 10, 7, 4, 3, 2);\n\n\n // Filtering at different points within branches\n List<FlowNode> blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"7\"));\n Assert.assertEquals(4, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n Assert.assertEquals(4, scanner.filteredNodes(heads, Collections.singletonList(exec.getNode(\"4\")), FlowTestUtils.MATCH_ECHO_STEP).size());\n blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"10\"));\n Assert.assertEquals(3, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Override\n\tpublic void run(){\n\t\tbranch(0, sol,0);\t\n\t\tSystem.out.println(\"####### \" + counter + \" #######\");\n\t}", "@Test\r\n public void testForCNSHIsFullCNCHHasOnlyOnePlace() {\r\n createCNSHIsFullCNCHHasOnlyOnePlace();\r\n this.sol = new Solution(this.studentList, this.schoolList, this.studentPreferences, this.schoolPreferences);\r\n assertEquals(solutionForCNSHIsFullCNCHHasOnlyOnePlace(), sol.getSolution(), \"Should work\");\r\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "boolean isBranchTaken();", "public void solution() {\n\t\t\n\t}", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\r\n public void testForCNSHIsFull() {\r\n createCNSHIsFull();\r\n this.sol = new Solution(this.studentList, this.schoolList, this.studentPreferences, this.schoolPreferences);\r\n assertEquals(solutionForCNSHIsFull(), sol.getSolution());\r\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private static void dfsComponents() {\r\n\t\tprintThis(\"Standard DFS Demo (the input graph must be UNDIRECTED)\");\r\n\t\tfor (int i = 0; i < V; i++) { // for each vertex i in [0..V-1]\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) { // if that vertex is not visited yet\r\n\t\t\t\tSystem.out.printf(\"Component %d:\", ++numComp);\r\n\t\t\t\tdfs(i);\r\n\t\t\t\tSystem.out.printf(\"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.printf(\"There are %d connected components\\n\", numComp);\r\n\t}", "@Test\n public void testUnstableOnlyStableTrue() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(true).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogNotContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Skipping Cobertura coverage report as build was not SUCCESS or better\", run);\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void testGetComponent() {\n System.out.println(\"getComponent\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent comp = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(comp).getComponent();\n DesignComponent expResult = comp;\n \n assertEquals(expResult,result);\n }\n });\n \n }", "int countComponents() throws Exception;", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testTripleParallel() throws Exception {\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"TripleParallel\");\n job.setDefinition(new CpsFlowDefinition(\n \"echo 'test stage'\\n\"+ // Id 3, Id 2 before that has the FlowStartNode\n \"parallel 'unit':{\\n\" + // Id 4 starts parallel, Id 7 is the block start for the unit branch\n \" echo \\\"Unit testing...\\\"\\n\" + // Id 10\n \"},'integration':{\\n\" + // Id 11 is unit branch end, Id 8 is the branch start for integration branch\n \" echo \\\"Integration testing...\\\"\\n\" + // Id 12\n \"}, 'ui':{\\n\" + // Id 13 in integration branch end, Id 9 is branch start for UI branch\n \" echo \\\"UI testing...\\\"\\n\" + // Id 14\n \"}\", // Node 15 is UI branch end node, Node 16 is Parallel End node, Node 17 is FlowEndNode\n true));\n WorkflowRun b = r.assertBuildStatusSuccess(job.scheduleBuild2(0));\n FlowExecution exec = b.getExecution();\n ForkScanner f = new ForkScanner();\n List<FlowNode> heads = exec.getCurrentHeads();\n f.setup(heads);\n TestVisitor visitor = new TestVisitor();\n f.visitSimpleChunks(visitor, new BlockChunkFinder());\n sanityTestIterationAndVisiter(heads);\n\n List<TestVisitor.CallEntry> parallels = visitor.calls.stream()\n .filter(\n predicateForCallEntryType(TestVisitor.CallType.PARALLEL_BRANCH_START)\n .or(\n predicateForCallEntryType(TestVisitor.CallType.PARALLEL_BRANCH_END)))\n .collect(Collectors.toList());\n Assert.assertEquals(6, parallels.size());\n\n // Visiting from partially completed branches\n // Verify we still get appropriate parallels callbacks for a branch end\n // even if in-progress and no explicit end node\n ArrayList<FlowNode> ends = new ArrayList<>();\n ends.add(exec.getNode(\"11\"));\n ends.add(exec.getNode(\"12\"));\n ends.add(exec.getNode(\"14\"));\n Assert.assertEquals(new DepthFirstScanner().allNodes(ends).size(),\n new ForkScanner().allNodes(ends).size());\n visitor = new TestVisitor();\n f.setup(ends);\n f.visitSimpleChunks(visitor, new BlockChunkFinder());\n sanityTestIterationAndVisiter(ends);\n\n // Specifically test parallel structures\n parallels = visitor.calls.stream()\n .filter(\n predicateForCallEntryType(TestVisitor.CallType.PARALLEL_BRANCH_START)\n .or(\n predicateForCallEntryType(TestVisitor.CallType.PARALLEL_BRANCH_END)))\n .collect(Collectors.toList());\n Assert.assertEquals(6, parallels.size());\n Assert.assertEquals(18, visitor.calls.size());\n\n // Test the least common ancestor implementation with triplicate\n FlowNode[] branchHeads = {exec.getNode(\"7\"), exec.getNode(\"8\"), exec.getNode(\"9\")};\n ArrayDeque<ForkScanner.ParallelBlockStart> starts = f.leastCommonAncestor(new HashSet<>(Arrays.asList(branchHeads)));\n Assert.assertEquals(1, starts.size());\n ForkScanner.ParallelBlockStart pbs = starts.pop();\n Assert.assertEquals(exec.getNode(\"4\"), pbs.forkStart);\n Assert.assertEquals(3, pbs.unvisited.size());\n Assert.assertTrue(pbs.unvisited.contains(exec.getNode(\"7\")));\n Assert.assertTrue(pbs.unvisited.contains(exec.getNode(\"8\")));\n Assert.assertTrue(pbs.unvisited.contains(exec.getNode(\"9\")));\n }", "public void test642_smartLifting3() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl3Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl3_1 t = new Team642sl3_3();\\n\" +\n\t\t\t \" T642sl3_2 o = new T642sl3_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_4 extends Team642sl3_3 {\\n\" +\n\t\t\t \" public class Role642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_4.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_3 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_1 extends T642sl3_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl3_2 extends Role642sl3_1 playedBy T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl3_3 extends Role642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl3_2 as Role642sl3_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_4 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_2 extends Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl3_4 extends Role642sl3_3 playedBy T642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_5 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_3 extends Team642sl3_2 {\\n\" +\n\t\t\t \" public class Role642sl3_5 extends Role642sl3_3 playedBy T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_3.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_6 extends T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl3_2 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl3_3.Role642sl3_4\");\n }", "@Test\n\tpublic void testBuild() {\n\n\t\tSystem.out.println(\"End\");\n\t}", "private static void bfs(State curr) {\n curr.buildStack(curr.getSuccessors(curr));\r\n \r\n if(curr.isGoalState()) \r\n System.out.println(curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(curr.getOrderedPair());//initial\r\n \r\n curr.close.add(curr);\r\n while(!curr.open.isEmpty()&&!curr.isGoalState()) {\r\n curr.buildStack(curr.getSuccessors(curr));\r\n curr.printHelp(curr, 3);\r\n curr = curr.open.get(0);\r\n curr.close.add(curr.open.remove(0));\r\n }\r\n \r\n if(curr.isGoalState()) {\r\n System.out.println(curr.getOrderedPair() + \" Goal\");\r\n curr.printPath(curr);\r\n }\r\n }", "public abstract void updateMainComponents(String component);", "public RelocateBranch() {\n }", "public void test17() {\n //$NON-NLS-1$\n deployBundles(\"test17\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_STATIC_TO_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private List<State> substitueStateSketch(State oldState, Set<Node> components) {\n\n// long start = System.currentTimeMillis();\n\n List<State> ret = new ArrayList<>();\n\n for (Node sk : components) {\n\n State newState = new State(oldState);\n VariableNode v = newState.pp.findSelectedVar();\n v.sketch = sk;\n\n if (sk instanceof NullaryTerminalNode) {\n\n NullaryTerminalNode n = (NullaryTerminalNode) sk;\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n if (n.sym.name.equals(\"<any>\")) continue;\n } else if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n newState.cost += Main.NOT_TERMINAL_PATTERN;\n }\n }\n\n newState.pp.numNullaryTerminals++;\n } else if (sk instanceof OperatorNode) {\n if (((OperatorNode) sk).special) newState.cost += Main.SPECIAL_REPEATATLEAST_1;\n\n String opName = ((OperatorNode) sk).operatorName;\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n if (!(opName.equals(\"startwith\") || opName.equals(\"endwith\") || opName.equals(\"contain\"))) {\n newState.cost += Main.NOT_NOT_CONTAIN_SW_EW_PATTERN;\n }\n }\n }\n } else {\n\n // do not continue if we are trying to replace argument of notcc with a op node\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n continue;\n }\n }\n }\n\n newState.pp.numOperatorSketch++; // TODO: it might be a problem if we have a rf sketch such as concat(v:contain(v:?{<num>}))\n newState.pp.deselectVar();\n if (evalApprox(newState)) ret.add(newState);\n\n }\n\n return ret;\n\n }", "public void test8() {\n //$NON-NLS-1$\n deployBundles(\"test8\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void dumpComponent(ServiceComponentExt comp)\n {\n log(\"*\");\n log(\"* ServiceComponent Information\");\n assertNotNull(\"SC Name cannot be null\", comp.getName());\n log(\"* SC Name: \" + comp.getName());\n int pid = comp.getPID();\n // TODO (Josh) Verify this range of pids\n assertTrue(\"SC Pid does not fall within valid range\", pid > 0 && pid < 65535);\n log(\"* SC Pid: \" + pid);\n log(\"* SC Assoc. Language: \" + comp.getAssociatedLanguage());\n assertNotNull(\"SC ServiceInformationType cannot be null\", comp.getServiceInformationType());\n log(\"* SC ServiceInformationType: \" + comp.getServiceInformationType());\n assertNotNull(\"SC StreamType cannot be null\", comp.getStreamType());\n log(\"* SC StreamType: \" + comp.getStreamType());\n short est = comp.getElementaryStreamType();\n // TODO (Josh) Enable once Elementary StreamType is broadcast properly\n // assertTrue(\"Elementary StreamType does not fall within valid range: 1-14 or 128-132 (inclusive)\",\n // (est > 0 && est < 15) && (est > 127 && est < 133));\n log(\"* SC Elementary StreamType: \" + est);\n assertNotNull(\"SC UpdateTime cannot be null\", comp.getUpdateTime());\n long now = new Date().getTime();\n long oneYearAgo = now - (1000 * 60 * 60 * 24 * 365);\n long oneYearAhead = now + (1000 * 60 * 60 * 24 * 365);\n assertTrue(\"ServiceDetails' Update time should not be more than a year off\", (oneYearAgo < comp.getUpdateTime()\n .getTime())\n && (oneYearAhead > comp.getUpdateTime().getTime()));\n log(\"* SC UpdateTime: \" + comp.getUpdateTime());\n try\n {\n log(\"* SC Component Tag: \" + comp.getComponentTag());\n }\n catch (SIException ex)\n {\n log(\"* SC Component Tag: UNDEFINED\");\n }\n try\n {\n log(\"* SC Carousel ID: \" + comp.getCarouselID());\n }\n catch (SIException ex)\n {\n log(\"* SC Carousel ID: UNDEFINED\");\n }\n assertNotNull(\"SC Locator cannot be null\", comp.getLocator());\n log(\"* SC Locator: \" + comp.getLocator());\n assertNotNull(\"SC Handle cannot be null\", comp.getServiceComponentHandle());\n log(\"* SC Handle: \" + comp.getServiceComponentHandle());\n assertNotNull(\"Returned ServiceDetails cannot be null\", comp.getServiceDetails());\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "@Test\n public void testUnstableOnlyStableFalse() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(false).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Cobertura coverage report found.\", run);\n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void checkNoCycles(List<JpsModule> component) {\n if (component.size() > 1) {\n StringBuilder message = new StringBuilder();\n message.append(\"Found circular module dependency: \")\n .append(component.size())\n .append(\" modules\");\n for (JpsModule module : component) {\n message.append(\" \").append(module.getName());\n }\n logger.error(message.toString());\n }\n }", "public void test642_smartLifting1() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl1Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl1_1 t = new Team642sl1_1();\\n\" +\n\t\t\t \" T642sl1_2 o = new T642sl1_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_4 extends Team642sl1_3 {\\n\" +\n\t\t\t \" public class Role642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_4.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_2 extends Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl1_4 extends Role642sl1_3 playedBy T642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_5 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_3 extends Team642sl1_2 {\\n\" +\n\t\t\t \" public class Role642sl1_5 extends Role642sl1_3 playedBy T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_3.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_6 extends T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl1_2 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_3 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_1 extends T642sl1_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl1_2 extends Role642sl1_1 playedBy T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl1_3 extends Role642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl1_2 as Role642sl1_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_4 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl1_1.Role642sl1_3\");\n }", "@Test\n public void Test14() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertEquals(54760, component.hashCode());\n }", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"/c[~rNl!Ma-\", \"kIh 4+,VlA$]12\");\n ElExpression elExpression0 = new ElExpression(\"J>w9x0K2Bs|BOY\");\n // Undeclared exception!\n try { \n submit0.eval(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testShortestPathEstacoes() {\n completeMap = new Graph(false);\n incompleteMap = new Graph(false);\n\n completeMap.insertVertex(porto);\n Company.getParkRegistry().getParkMap().put(porto, portoL);\n completeMap.insertVertex(braga);\n Company.getParkRegistry().getParkMap().put(braga, bragaL);\n completeMap.insertVertex(vila);\n Company.getParkRegistry().getParkMap().put(vila, vilaL);\n completeMap.insertVertex(aveiro);\n Company.getParkRegistry().getParkMap().put(aveiro, aveiroL);\n completeMap.insertVertex(coimbra);\n Company.getParkRegistry().getParkMap().put(coimbra, coimbraL);\n completeMap.insertVertex(leiria);\n Company.getParkRegistry().getParkMap().put(leiria, leiriaL);\n\n completeMap.insertVertex(viseu);\n Company.getParkRegistry().getParkMap().put(viseu, viseuL);\n completeMap.insertVertex(guarda);\n Company.getParkRegistry().getParkMap().put(guarda, guardaL);\n completeMap.insertVertex(castelo);\n Company.getParkRegistry().getParkMap().put(castelo, casteloL);\n completeMap.insertVertex(lisboa);\n Company.getParkRegistry().getParkMap().put(lisboa, lisboaL);\n completeMap.insertVertex(faro);\n Company.getParkRegistry().getParkMap().put(faro, faroL);\n\n completeMap.insertEdge(porto, aveiro, c, 75);\n completeMap.insertEdge(porto, braga, c2, 60);\n completeMap.insertEdge(porto, vila, c3, 100);\n completeMap.insertEdge(viseu, guarda, c4, 75);\n completeMap.insertEdge(guarda, castelo, c5, 100);\n completeMap.insertEdge(aveiro, coimbra, c6, 60);\n completeMap.insertEdge(coimbra, lisboa, c7, 200);\n completeMap.insertEdge(coimbra, leiria, c8, 80);\n completeMap.insertEdge(aveiro, leiria, c9, 120);\n completeMap.insertEdge(leiria, lisboa, c10, 150);\n\n completeMap.insertEdge(aveiro, viseu, c11, 85);\n completeMap.insertEdge(leiria, castelo, c12, 170);\n completeMap.insertEdge(lisboa, faro, c13, 280);\n\n incompleteMap = completeMap.clone();\n\n incompleteMap.removeEdge(aveiro, viseu);\n incompleteMap.removeEdge(leiria, castelo);\n incompleteMap.removeEdge(lisboa, faro);\n\n System.out.println(\"Test of shortest path\");\n\n LinkedList<String> shortPath = new LinkedList<>();\n double lenpath = 0;\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(completeMap, porto, l, shortPath);\n assertTrue(\"Length path should be 0 if vertex does not exist\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(incompleteMap, porto, faro, shortPath);\n assertTrue(\"Length path should be 0 if there is no path\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPath(completeMap, porto, porto, shortPath);\n assertTrue(\"Number of nodes should be 1 if source and vertex are the same\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPath(incompleteMap, porto, lisboa, shortPath);\n assertTrue(\"Path between Porto and Lisboa should be 335 Km\", lenpath == 335);\n\n Iterator<String> it = shortPath.iterator();\n assertTrue(\"First in path should be Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Coimbra\", it.next().equals(coimbra));\n assertTrue(\"then Lisboa\", it.next().equals(lisboa));\n completeMap.insertEdge(porto, lisboa, c, 10);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(incompleteMap, braga, leiria, shortPath);\n assertEquals(\"Path between Braga and Leiria should be close to 152.89\", lenpath, 152, 1);\n\n it = shortPath.iterator();\n\n assertTrue(\"First in path should be Braga\", it.next().equals(braga));\n assertTrue(\"then Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Coimbra\", it.next().equals(coimbra));\n assertTrue(\"then Leiria\", it.next().equals(leiria));\n\n shortPath.clear();\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(completeMap, porto, castelo, shortPath);\n assertEquals(\"Path between Porto and Castelo Branco should be close to 202.86\", lenpath, 202, 1);\n assertTrue(\"N. cities between Porto and Castelo Branco should be 5 \", shortPath.size() == 5);\n\n it = shortPath.iterator();\n\n assertTrue(\"First in path should be Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Viseu\", it.next().equals(viseu));\n assertTrue(\"then Viseu\", it.next().equals(guarda));\n assertTrue(\"then Castelo Branco\", it.next().equals(castelo));\n\n //Changing Edge: aveiro-viseu with Edge: leiria-C.Branco \n //should change shortest path between porto and castelo Branco\n completeMap.removeEdge(aveiro, viseu);\n completeMap.insertEdge(leiria, castelo, c12, 170);\n shortPath.clear();\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPath(completeMap, porto, castelo, shortPath);\n assertTrue(\"Path between Porto and Castelo Branco should now be 330 Km\", lenpath == 330);\n assertTrue(\"Path between Porto and Castelo Branco should be 4 cities\", shortPath.size() == 4);\n\n }", "@Test\r\n public void gallonsCauldronHolds() {\r\n \r\n System.out.println(\"gallonsCauldronHolds\");\r\n \r\n //Test #1\r\n System.out.println(\"Test case #1\"); \r\n \r\n double diameter = 50;\r\n double depth = 25;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 212.500;\r\n double result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #2\r\n System.out.println(\"Test case #2\");\r\n \r\n diameter = 15;\r\n depth = -12;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #3\r\n System.out.println(\"Test case #3\");\r\n \r\n diameter = -5;\r\n depth = 20;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #4\r\n System.out.println(\"Test case #4\");\r\n \r\n diameter = 0;\r\n depth = 30;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #5\r\n System.out.println(\"Test case #5\");\r\n \r\n diameter = 14;\r\n depth = 0;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #6\r\n System.out.println(\"Test case #6\");\r\n \r\n diameter = 1;\r\n depth = 12;\r\n \r\n expResult = .041;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #7\r\n System.out.println(\"Test case #7\");\r\n \r\n diameter = 20;\r\n depth = 1;\r\n \r\n expResult = 1.36;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n }", "public void test642_smartLifting4() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl4Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl4_1 t = new Team642sl4_4();\\n\" +\n\t\t\t \" T642sl4_2 o = new T642sl4_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_4 extends Team642sl4_3 {\\n\" +\n\t\t\t \" public class Role642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_4.this.toString() + \\\".Role642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_3 extends Team642sl4_2 {\\n\" +\n\t\t\t \" public class Role642sl4_5 extends Role642sl4_3 playedBy T642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_3.this.toString() + \\\".Role642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_6 extends T642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl4_2 extends T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_3 extends T642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_1 {\\n\" +\n\t\t\t \" public class Role642sl4_1 extends T642sl4_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl4_2 extends Role642sl4_1 playedBy T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl4_3 extends Role642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl4_2 as Role642sl4_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_4 extends T642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_2 extends Team642sl4_1 {\\n\" +\n\t\t\t \" public class Role642sl4_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_2.this.toString() + \\\".Role642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl4_4 extends Role642sl4_3 playedBy T642sl4_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_2.this.toString() + \\\".Role642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_5 extends T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl4_4.Role642sl4_4\");\n }", "@Test\n void getMandatoryDeepSuccessors () {\n\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void shouldOptimizeVisualizationOfThePipelineDependencyGraph() {\n\n String acceptance = \"acceptance\";\n String plugins = \"plugins\";\n String gitPlugins = \"git-plugins\";\n String cruise = \"cruise\";\n String gitTrunk = \"git-trunk\";\n String hgTrunk = \"hg-trunk\";\n String deployGo03 = \"deploy-go03\";\n String deployGo02 = \"deploy-go02\";\n String deployGo01 = \"deploy-go01\";\n String publish = \"publish\";\n\n ValueStreamMap graph = new ValueStreamMap(acceptance, null);\n graph.addUpstreamNode(new PipelineDependencyNode(plugins, plugins), null, acceptance);\n graph.addUpstreamNode(new PipelineDependencyNode(gitPlugins, gitPlugins), null, plugins);\n graph.addUpstreamNode(new PipelineDependencyNode(cruise, cruise), null, plugins);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(gitTrunk, gitTrunk, \"git\"), null, cruise, new MaterialRevision(null));\n graph.addUpstreamMaterialNode(new SCMDependencyNode(hgTrunk, hgTrunk, \"hg\"), null, cruise, new MaterialRevision(null));\n graph.addUpstreamNode(new PipelineDependencyNode(cruise, cruise), null, acceptance);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(hgTrunk, hgTrunk, \"hg\"), null, acceptance, new MaterialRevision(null));\n\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo03, deployGo03), acceptance);\n graph.addDownstreamNode(new PipelineDependencyNode(publish, publish), deployGo03);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo01, deployGo01), publish);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo02, deployGo02), acceptance);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo01, deployGo01), deployGo02);\n\n List<List<Node>> nodesAtEachLevel = graph.presentationModel().getNodesAtEachLevel();\n\n assertThat(nodesAtEachLevel.size(), is(7));\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(0), 0, gitTrunk, hgTrunk);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(1), 1, gitPlugins, cruise);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(2), 2, plugins);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(3), 0, acceptance);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(4), 0, deployGo03, deployGo02);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(5), 1, publish);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(6), 0, deployGo01);\n\n MatcherAssert.assertThat(graph.findNode(gitTrunk).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(hgTrunk).getDepth(), is(3));\n MatcherAssert.assertThat(graph.findNode(gitPlugins).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(cruise).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(deployGo03).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(deployGo02).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(publish).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(deployGo01).getDepth(), is(1));\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n StandaloneComponent standaloneComponent0 = dynamicSelectModel0.getTopLevelComponent();\n assertNull(standaloneComponent0);\n }", "@Test\n public void Test10() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Test\n public void shouldDetectCycleWhenUpstreamLeavesAreAtDifferentLevels() {\n\n String g1 = \"g1\";\n String g2 = \"g2\";\n String p1 = \"p1\";\n String p2 = \"p2\";\n String p3 = \"p3\";\n String p4 = \"p4\";\n String p5 = \"p5\";\n String p6 = \"p6\";\n String current = \"current\";\n\n ValueStreamMap valueStreamMap = new ValueStreamMap(current, null);\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p4, p4), null, current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p3, p3), null, p4);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p2, p2), null, p3);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p1, p1), null, p2);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g1, g1, \"git\"), null, p1, new MaterialRevision(null));\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,2,\"2\"), current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p6, p6), new PipelineRevision(p6,1,\"1\"), p5);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,1,\"1\"), p6);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g2,g2,\"git\"), null, p5, new MaterialRevision(null));\n\n assertThat(valueStreamMap.hasCycle(), is(true));\n }", "@Test\n public void t2() {\n List<StableCommit> stableCommitList = getStableCommits().stream().filter(commit ->\n commit.getFilePath().equals(\"src/java/org/apache/commons/lang/builder/HashCodeBuilder.java\") && commit.getLevel() == 1).collect(Collectors.toList());\n // it has been through 9 different refactorings\n List<RefactoringCommit> refactoringCommitList = getRefactoringCommits().stream().filter(commit ->\n commit.getFilePath().equals(\"src/java/org/apache/commons/lang/builder/HashCodeBuilder.java\")).collect(Collectors.toList());\n\n Assert.assertEquals(4, stableCommitList.size());\n Assert.assertEquals(8, refactoringCommitList.size());\n\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", stableCommitList.get(0).getCommit());\n\n // then, it was refactored two times (in commit 5c40090fecdacd9366bba7e3e29d94f213cf2633)\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", refactoringCommitList.get(0).getCommit());\n Assert.assertEquals(\"5c40090fecdacd9366bba7e3e29d94f213cf2633\", refactoringCommitList.get(1).getCommit());\n\n // It appears 3 times\n Assert.assertEquals(\"379d1bcac32d75e6c7f32661b2203f930f9989df\", stableCommitList.get(1).getCommit());\n Assert.assertEquals(\"d3c425d6f1281d9387f5b80836ce855bc168453d\", stableCommitList.get(2).getCommit());\n Assert.assertEquals(\"3ed99652c84339375f1e6b99bd9c7f71d565e023\", stableCommitList.get(3).getCommit());\n }", "@Test\n @Issue(\"JENKINS-41685\")\n public void testParallelsWithDuplicateEvents() throws Exception {\n //https://gist.github.com/vivek/ccf3a4ef25fbff267c76c962d265041d\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"ParallelInsanity\");\n job.setDefinition(new CpsFlowDefinition(\"\" +\n \"echo 'first stage'\\n\" +\n \"parallel left : {\\n\" +\n \" echo 'run a bit'\\n\" +\n \" echo 'run a bit more'\\n\" +\n \" semaphore 'wait1'\\n\" +\n \"}, right : {\\n\" +\n \" echo 'wozzle'\\n\" +\n \" semaphore 'wait2'\\n\" +\n \"}\\n\" +\n \"echo 'last stage'\\n\" +\n \"echo \\\"last done\\\"\\n\",\n true));\n ForkScanner scan = new ForkScanner();\n ChunkFinder labelFinder = new NoOpChunkFinder();\n WorkflowRun run = job.scheduleBuild2(0).getStartCondition().get();\n SemaphoreStep.waitForStart(\"wait1/1\", run);\n SemaphoreStep.waitForStart(\"wait2/1\", run);\n\n TestVisitor test = new TestVisitor();\n List<FlowNode> heads = run.getExecution().getCurrentHeads();\n scan.setup(heads);\n scan.visitSimpleChunks(test, labelFinder);\n\n SemaphoreStep.success(\"wait1\"+\"/1\", null);\n SemaphoreStep.success(\"wait2\"+\"/1\", null);\n r.waitForCompletion(run);\n\n int atomEventCount = 0;\n int parallelBranchEndCount = 0;\n int parallelStartCount = 0;\n for (TestVisitor.CallEntry ce : test.calls) {\n switch (ce.type) {\n case ATOM_NODE:\n atomEventCount++;\n break;\n case PARALLEL_BRANCH_END:\n parallelBranchEndCount++;\n break;\n case PARALLEL_START:\n parallelStartCount++;\n break;\n default:\n break;\n }\n }\n\n sanityTestIterationAndVisiter(heads);\n Assert.assertEquals(10, atomEventCount);\n Assert.assertEquals(1, parallelStartCount);\n Assert.assertEquals(2, parallelBranchEndCount);\n }", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testASSY2HasSubComponents() {\n assertThat( hasSubComponents( ASSY2_WITH_SUB_COMP ), is( true ) );\n }", "public void ensureOneComponent(Set<Factor> factors) {\n List<Set<Factor>> components = checkComponents(factors);\n logger.info(\"Total components: \" + components.size());\n if (components.size() == 1)\n return;\n int i = 0;\n for (Set<Factor> comp : components) {\n logger.info(\"Component \" + i + \": \" + comp.size());\n i++;\n }\n linkComponents(components, \n factors);\n// useBiggestComponent(components, factors);\n }", "public void test7() {\n //$NON-NLS-1$\n deployBundles(\"test7\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.DECREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testDslServerAllPRAllowedBranchesActionsFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslServerAllPRAllowedBranchesActionsFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n /* Only one 'triggers{}' closure */\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n /* Six different triggers expected */\n assertEquals(6, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(1).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n\n tmpNname = tmp2.getTriggers().get(2).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n\n tmpNname = tmp2.getTriggers().get(3).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(4).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(5).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n }\n assertEquals(6, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestServerCreatedActionFilter\");\n assertEquals(dispNames.get(1), \"BitBucketPPRPullRequestServerUpdatedActionFilter\");\n assertEquals(dispNames.get(2), \"BitBucketPPRPullRequestServerSourceUpdatedActionFilter\");\n assertEquals(dispNames.get(3), \"BitBucketPPRPullRequestServerApprovedActionFilter\");\n assertEquals(dispNames.get(4), \"BitBucketPPRPullRequestServerMergedActionFilter\");\n assertEquals(dispNames.get(5), \"BitBucketPPRPullRequestServerDeclinedActionFilter\");\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(table0, \"input\", (String) null);\n // Undeclared exception!\n try { \n checkbox0.samp((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testTRK1HasSubComponents() {\n assertThat( hasSubComponents( TRK1_WITH_SUB_COMP ), is( true ) );\n }", "@Test\n public void shouldThrowCyclicDependencyExceptionIfACycleIsDetected_DownstreamOfCurrentWasUpstreamOfCurrentAtSomePoint() {\n String grandParent = \"grandParent\";\n String parent = \"parent\";\n String child = \"child\";\n String currentPipeline = \"current\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n graph.addDownstreamNode(new PipelineDependencyNode(child, child), currentPipeline);\n graph.addDownstreamNode(new PipelineDependencyNode(grandParent, grandParent), child);\n graph.addUpstreamNode(new PipelineDependencyNode(parent, parent), null, currentPipeline);\n graph.addUpstreamNode(new PipelineDependencyNode(grandParent, grandParent), null, parent);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"g\",\"g\",\"git\") , null, grandParent, new MaterialRevision(null));\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"g\",\"g\",\"git\") , null, parent, new MaterialRevision(null));\n\n assertThat(graph.hasCycle(), is(true));\n }", "public UpdateandRemoveBranch() {\n initComponents();\n }", "protected void checkComponentList()\n {\n String lsLeft ;\n String lsDocComp ;\n int liDotIdx ;\n int liNumComps ;\n Hashtable loCompHash = new Hashtable( 5 ) ;\n\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n lsLeft = getData( \"AND_COND_LHS_\" + liCtr ).getString() ;\n if ( lsLeft != null )\n {\n liDotIdx = lsLeft.indexOf( '.' ) ;\n if ( liDotIdx >= 0 )\n {\n lsDocComp = lsLeft.substring( 0, liDotIdx ) ;\n } /* end if ( liDotIdx >= 0 ) */\n else\n {\n lsDocComp = lsLeft ;\n } /* end else */\n loCompHash.put( lsDocComp, lsDocComp ) ;\n } /* end if ( lsLeft != null ) */\n } /* end for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ ) */\n\n liNumComps = loCompHash.size() ;\n if ( liNumComps > 2 )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( liNumComps > 2 ) */\n else if ( liNumComps == 2 )\n {\n Enumeration leComps = loCompHash.elements() ;\n String lsComp1 = (String)leComps.nextElement() ;\n String lsComp2 = (String)leComps.nextElement() ;\n\n if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) &&\n ( !lsComp2.endsWith( \"_DOC_HDR\" ) ) )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) && . . . */\n } /* end else if ( liNumComps == 2 ) */\n }", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n @NavigateTo(\"/group/dp/common-components\")\n public void testListingComponents() {\n // #action: Navigate to the common-components landing page.\n // #expects: There is at least one component listed.\n assertThat(driver.findElements(By.cssSelector(\".categories li\")).size()).isGreaterThan(0);\n }", "@Test\n\tpublic void testAddLinkOkComponent() {\n\t\tSubmenu root = new Submenu(\"root\");\n\t\tAssert.assertNull(root.getParentBean());\n\t\tAssert.assertEquals(\"root\", root.getName());\n\t\tAssert.assertNull(root.getMenuentrys());\n\n\t\tMenuItem item1 = new MenuItem(\"item1\");\n\t\tAssert.assertNull(item1.getParentBean());\n\t\troot.addMenuentry(item1);\n\t\tAssert.assertEquals(1, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, root.getMenuentrys().iterator().next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\n\t\tSubmenu submenu1 = new Submenu(\"submenu1\");\n\t\tAssert.assertNull(submenu1.getParentBean());\n\t\troot.addMenuentry(submenu1);\n\n\t\tIterator<?> iter = root.getMenuentrys().iterator();\n\t\tAssert.assertEquals(2, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, iter.next());\n\t\tAssert.assertSame(submenu1, iter.next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\t\tAssert.assertSame(root, submenu1.getParentBean());\n\t}", "public void test642_smartLifting7() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl7Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl7_1 t = new Team642sl7_3();\\n\" +\n\t\t\t \" T642sl7_2 o = new T642sl7_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_4 extends Team642sl7_3 {\\n\" +\n\t\t\t \" public class Role642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_4.this.toString() + \\\".Role642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_3 extends T642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_1 {\\n\" +\n\t\t\t \" public class Role642sl7_1 extends T642sl7_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl7_2 extends Role642sl7_1 playedBy T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl7_3 extends Role642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl7_2 as Role642sl7_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_4 extends T642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_2 extends Team642sl7_1 {\\n\" +\n\t\t\t \" public class Role642sl7_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_2.this.toString() + \\\".Role642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl7_4 extends Role642sl7_3 playedBy T642sl7_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_2.this.toString() + \\\".Role642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_5 extends T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_3 extends Team642sl7_2 {\\n\" +\n\t\t\t \" public class Role642sl7_5 extends Role642sl7_3 playedBy T642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_3.this.toString() + \\\".Role642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_6 extends T642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl7_2 extends T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl7_3.Role642sl7_3\");\n }", "public void test642_smartLifting2() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl2Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl2_1 t = new Team642sl2_2();\\n\" +\n\t\t\t \" T642sl2_2 o = new T642sl2_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_4 extends Team642sl2_3 {\\n\" +\n\t\t\t \" public class Role642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_4.this.toString() + \\\".Role642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_1 {\\n\" +\n\t\t\t \" public class Role642sl2_1 extends T642sl2_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl2_2 extends Role642sl2_1 playedBy T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl2_3 extends Role642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_1.this.toString() + \\\".Role642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl2_2 as Role642sl2_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_4 extends T642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_2 extends Team642sl2_1 {\\n\" +\n\t\t\t \" public class Role642sl2_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_2.this.toString() + \\\".Role642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl2_4 extends Role642sl2_3 playedBy T642sl2_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_2.this.toString() + \\\".Role642sl2_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_5 extends T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl2_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl2_3 extends Team642sl2_2 {\\n\" +\n\t\t\t \" public class Role642sl2_5 extends Role642sl2_3 playedBy T642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl2_3.this.toString() + \\\".Role642sl2_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_6 extends T642sl2_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl2_2 extends T642sl2_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl2_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl2_3 extends T642sl2_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl2_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl2_2.Role642sl2_4\");\n }", "public void testCreateComponentReference() {\n System.out.println(\"createComponentReference\"); // NOI18N\n \n final DesignDocument document = ModelTestUtil.createTestDesignDocument(\"TEST_PROJECT\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent expResult = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(expResult).getComponent();\n assertEquals(expResult,result);\n }\n });\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }" ]
[ "0.5903385", "0.5849358", "0.56070924", "0.5565882", "0.5514163", "0.55133325", "0.54547614", "0.5392506", "0.53435504", "0.53248334", "0.5315982", "0.5281817", "0.5274594", "0.5244622", "0.5227961", "0.52220803", "0.5182382", "0.5174229", "0.51723754", "0.51721597", "0.51383376", "0.51308274", "0.5123818", "0.51154166", "0.5107678", "0.510659", "0.5105217", "0.5103198", "0.50985247", "0.5089957", "0.507221", "0.5069555", "0.506285", "0.5056997", "0.505441", "0.50499815", "0.50402534", "0.5036209", "0.5029558", "0.50230354", "0.502279", "0.50182384", "0.4997756", "0.4984105", "0.49796095", "0.49792302", "0.49749854", "0.4970103", "0.49578026", "0.4951967", "0.49460113", "0.49387455", "0.4934088", "0.49263042", "0.4926165", "0.49253586", "0.49127135", "0.4909988", "0.49075532", "0.4902752", "0.4896909", "0.48953927", "0.48947036", "0.48931655", "0.4886547", "0.4886264", "0.4878784", "0.4877623", "0.48731792", "0.4871129", "0.48711148", "0.48696607", "0.48679706", "0.48598683", "0.48577356", "0.4856128", "0.48546165", "0.48533624", "0.48495945", "0.48470414", "0.48405498", "0.4836662", "0.48361164", "0.48329815", "0.48315793", "0.4830231", "0.48197386", "0.4816011", "0.48155165", "0.48138604", "0.4812199", "0.4810026", "0.4808328", "0.48056418", "0.4802024", "0.48002762", "0.4798017", "0.47952428", "0.47943863", "0.4783818", "0.47767624" ]
0.0
-1
Test case number: 25 / 2 covered goals: Goal 1. wheel.components.Component.renderHint(Ljava/lang/CharSequence;)Lwheel/components/Component;: I98 Branch 18 IFLE L150 false Goal 2. wheel.components.Component.renderHint(Ljava/lang/CharSequence;)Lwheel/components/Component;: I110 Branch 19 IFNE L150 true
@Test public void test025() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); ArrayStringFilter.Mode arrayStringFilter_Mode0 = ArrayStringFilter.Mode.EXACT; String[] stringArray0 = new String[6]; stringArray0[0] = "iul "; stringArray0[1] = "iul "; stringArray0[2] = "iul "; ArrayStringFilter arrayStringFilter0 = new ArrayStringFilter(arrayStringFilter_Mode0, stringArray0); String string0 = arrayStringFilter0.toString(); Any any0 = new Any((Component) errorPage0, (CharSequence) "EXACT:iul ,iul ,iul ,null,null,null"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n Checkbox checkbox0 = new Checkbox(label0, \"\", \"\");\n Component component0 = checkbox0.renderHint(\"\");\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test197() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n checkbox0.renderHint(\"]1\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test224() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.hr();\n List<CharSequence> list0 = component0._getRenderHints();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertNotNull(list0);\n assertEquals(\"Any_1\", component0.getComponentId());\n assertEquals(1, list0.size());\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public boolean isShowingHintText() {\n/* 1355 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test232() throws Throwable {\n Form form0 = new Form(\"ms)\");\n form0.renderHint(\"z:_i>EAQ.Bdq@CL&k?\\\"\");\n Form form1 = form0.renderHint(\"z:_i>EAQ.Bdq@CL&k?\\\"\");\n assertEquals(\"ms)\", form1.getComponentId());\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void checkBaselineHints() {\n onView(withId(R.id.upperThresh)).check(matches(withHint(topHint)));\n onView(withId(R.id.upperThresh)).perform(typeText(\"2.00\"), closeSoftKeyboard());\n onView(withId(R.id.lowerThresh)).check(matches(withHint(botHint)));\n onView(withId(R.id.lowerThresh)).perform(typeText(\"1.00\"), closeSoftKeyboard());\n }", "static boolean applyChainOptimized(android.support.constraint.solver.widgets.ConstraintWidgetContainer r39, android.support.constraint.solver.LinearSystem r40, int r41, int r42, android.support.constraint.solver.widgets.ChainHead r43) {\n /*\n r0 = r40\n r1 = r41\n r2 = r43\n android.support.constraint.solver.widgets.ConstraintWidget r3 = r2.mFirst\n android.support.constraint.solver.widgets.ConstraintWidget r4 = r2.mLast\n android.support.constraint.solver.widgets.ConstraintWidget r5 = r2.mFirstVisibleWidget\n android.support.constraint.solver.widgets.ConstraintWidget r6 = r2.mLastVisibleWidget\n android.support.constraint.solver.widgets.ConstraintWidget r7 = r2.mHead\n r8 = r3\n r9 = 0\n r10 = 0\n r11 = 0\n float r12 = r2.mTotalWeight\n android.support.constraint.solver.widgets.ConstraintWidget r13 = r2.mFirstMatchConstraintWidget\n android.support.constraint.solver.widgets.ConstraintWidget r14 = r2.mLastMatchConstraintWidget\n r2 = r39\n r15 = r8\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour[] r8 = r2.mListDimensionBehaviors\n r8 = r8[r1]\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour r2 = android.support.constraint.solver.widgets.ConstraintWidget.DimensionBehaviour.WRAP_CONTENT\n r16 = 0\n r17 = r9\n if (r8 != r2) goto L_0x002b\n r2 = 1\n goto L_0x002c\n L_0x002b:\n r2 = 0\n L_0x002c:\n r8 = 0\n r18 = 0\n r19 = 0\n if (r1 != 0) goto L_0x0050\n int r9 = r7.mHorizontalChainStyle\n if (r9 != 0) goto L_0x0039\n r9 = 1\n goto L_0x003a\n L_0x0039:\n r9 = 0\n L_0x003a:\n r8 = r9\n int r9 = r7.mHorizontalChainStyle\n r21 = r2\n r2 = 1\n if (r9 != r2) goto L_0x0044\n r2 = 1\n goto L_0x0045\n L_0x0044:\n r2 = 0\n L_0x0045:\n int r9 = r7.mHorizontalChainStyle\n r22 = r2\n r2 = 2\n if (r9 != r2) goto L_0x004e\n r2 = 1\n goto L_0x004f\n L_0x004e:\n r2 = 0\n L_0x004f:\n goto L_0x006e\n L_0x0050:\n r21 = r2\n int r2 = r7.mVerticalChainStyle\n if (r2 != 0) goto L_0x0058\n r2 = 1\n goto L_0x0059\n L_0x0058:\n r2 = 0\n L_0x0059:\n r8 = r2\n int r2 = r7.mVerticalChainStyle\n r9 = 1\n if (r2 != r9) goto L_0x0061\n r2 = 1\n goto L_0x0062\n L_0x0061:\n r2 = 0\n L_0x0062:\n int r9 = r7.mVerticalChainStyle\n r23 = r2\n r2 = 2\n if (r9 != r2) goto L_0x006b\n r2 = 1\n goto L_0x006c\n L_0x006b:\n r2 = 0\n L_0x006c:\n r22 = r23\n L_0x006e:\n r9 = 0\n r18 = 0\n r24 = r7\n r7 = r11\n r11 = r15\n r15 = r9\n r9 = 0\n L_0x0077:\n r19 = 0\n r25 = r13\n r13 = 8\n if (r10 != 0) goto L_0x0143\n r26 = r10\n int r10 = r11.getVisibility()\n if (r10 == r13) goto L_0x00ca\n int r9 = r9 + 1\n if (r1 != 0) goto L_0x0092\n int r10 = r11.getWidth()\n float r10 = (float) r10\n float r15 = r15 + r10\n goto L_0x0098\n L_0x0092:\n int r10 = r11.getHeight()\n float r10 = (float) r10\n float r15 = r15 + r10\n L_0x0098:\n if (r11 == r5) goto L_0x00a4\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n r10 = r10[r42]\n int r10 = r10.getMargin()\n float r10 = (float) r10\n float r15 = r15 + r10\n L_0x00a4:\n if (r11 == r6) goto L_0x00b2\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n int r20 = r42 + 1\n r10 = r10[r20]\n int r10 = r10.getMargin()\n float r10 = (float) r10\n float r15 = r15 + r10\n L_0x00b2:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n r10 = r10[r42]\n int r10 = r10.getMargin()\n float r10 = (float) r10\n float r18 = r18 + r10\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n int r20 = r42 + 1\n r10 = r10[r20]\n int r10 = r10.getMargin()\n float r10 = (float) r10\n float r18 = r18 + r10\n L_0x00ca:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n r10 = r10[r42]\n r27 = r9\n int r9 = r11.getVisibility()\n if (r9 == r13) goto L_0x0106\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour[] r9 = r11.mListDimensionBehaviors\n r9 = r9[r1]\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour r13 = android.support.constraint.solver.widgets.ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT\n if (r9 != r13) goto L_0x0106\n int r7 = r7 + 1\n if (r1 != 0) goto L_0x00f0\n int r9 = r11.mMatchConstraintDefaultWidth\n if (r9 == 0) goto L_0x00e7\n return r16\n L_0x00e7:\n int r9 = r11.mMatchConstraintMinWidth\n if (r9 != 0) goto L_0x00ef\n int r9 = r11.mMatchConstraintMaxWidth\n if (r9 == 0) goto L_0x00fe\n L_0x00ef:\n return r16\n L_0x00f0:\n int r9 = r11.mMatchConstraintDefaultHeight\n if (r9 == 0) goto L_0x00f5\n return r16\n L_0x00f5:\n int r9 = r11.mMatchConstraintMinHeight\n if (r9 != 0) goto L_0x0105\n int r9 = r11.mMatchConstraintMaxHeight\n if (r9 == 0) goto L_0x00fe\n goto L_0x0105\n L_0x00fe:\n float r9 = r11.mDimensionRatio\n int r9 = (r9 > r19 ? 1 : (r9 == r19 ? 0 : -1))\n if (r9 == 0) goto L_0x0106\n return r16\n L_0x0105:\n return r16\n L_0x0106:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r11.mListAnchors\n int r13 = r42 + 1\n r9 = r9[r13]\n android.support.constraint.solver.widgets.ConstraintAnchor r9 = r9.mTarget\n if (r9 == 0) goto L_0x012c\n android.support.constraint.solver.widgets.ConstraintWidget r13 = r9.mOwner\n r28 = r7\n android.support.constraint.solver.widgets.ConstraintAnchor[] r7 = r13.mListAnchors\n r7 = r7[r42]\n android.support.constraint.solver.widgets.ConstraintAnchor r7 = r7.mTarget\n if (r7 == 0) goto L_0x012a\n android.support.constraint.solver.widgets.ConstraintAnchor[] r7 = r13.mListAnchors\n r7 = r7[r42]\n android.support.constraint.solver.widgets.ConstraintAnchor r7 = r7.mTarget\n android.support.constraint.solver.widgets.ConstraintWidget r7 = r7.mOwner\n if (r7 == r11) goto L_0x0127\n goto L_0x012a\n L_0x0127:\n r17 = r13\n goto L_0x0131\n L_0x012a:\n r7 = 0\n goto L_0x012f\n L_0x012c:\n r28 = r7\n r7 = 0\n L_0x012f:\n r17 = r7\n L_0x0131:\n if (r17 == 0) goto L_0x0139\n r7 = r17\n r11 = r7\n r10 = r26\n goto L_0x013b\n L_0x0139:\n r7 = 1\n r10 = r7\n L_0x013b:\n r13 = r25\n r9 = r27\n r7 = r28\n goto L_0x0077\n L_0x0143:\n r26 = r10\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r3.mListAnchors\n r10 = r10[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r10 = r10.getResolutionNode()\n android.support.constraint.solver.widgets.ConstraintAnchor[] r13 = r4.mListAnchors\n int r20 = r42 + 1\n r13 = r13[r20]\n android.support.constraint.solver.widgets.ResolutionAnchor r13 = r13.getResolutionNode()\n r29 = r14\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r10.target\n if (r14 == 0) goto L_0x0480\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r13.target\n if (r14 != 0) goto L_0x0170\n r30 = r2\n r32 = r6\n r37 = r7\n r33 = r8\n r38 = r9\n r35 = r13\n r13 = r0\n goto L_0x048d\n L_0x0170:\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r10.target\n int r14 = r14.state\n r0 = 1\n if (r14 != r0) goto L_0x0471\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r13.target\n int r14 = r14.state\n if (r14 == r0) goto L_0x018d\n r30 = r2\n r32 = r6\n r37 = r7\n r33 = r8\n r38 = r9\n r35 = r13\n r13 = r40\n goto L_0x047f\n L_0x018d:\n if (r7 <= 0) goto L_0x0192\n if (r7 == r9) goto L_0x0192\n return r16\n L_0x0192:\n r0 = 0\n if (r2 != 0) goto L_0x0199\n if (r8 != 0) goto L_0x0199\n if (r22 == 0) goto L_0x01b2\n L_0x0199:\n if (r5 == 0) goto L_0x01a4\n android.support.constraint.solver.widgets.ConstraintAnchor[] r14 = r5.mListAnchors\n r14 = r14[r42]\n int r14 = r14.getMargin()\n float r0 = (float) r14\n L_0x01a4:\n if (r6 == 0) goto L_0x01b2\n android.support.constraint.solver.widgets.ConstraintAnchor[] r14 = r6.mListAnchors\n int r20 = r42 + 1\n r14 = r14[r20]\n int r14 = r14.getMargin()\n float r14 = (float) r14\n float r0 = r0 + r14\n L_0x01b2:\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r10.target\n float r14 = r14.resolvedOffset\n r30 = r2\n android.support.constraint.solver.widgets.ResolutionAnchor r2 = r13.target\n float r2 = r2.resolvedOffset\n r20 = 0\n int r23 = (r14 > r2 ? 1 : (r14 == r2 ? 0 : -1))\n if (r23 >= 0) goto L_0x01c7\n float r23 = r2 - r14\n float r23 = r23 - r15\n goto L_0x01cb\n L_0x01c7:\n float r23 = r14 - r2\n float r23 = r23 - r15\n L_0x01cb:\n r27 = 1\n if (r7 <= 0) goto L_0x02b9\n if (r7 != r9) goto L_0x02b9\n android.support.constraint.solver.widgets.ConstraintWidget r20 = r11.getParent()\n if (r20 == 0) goto L_0x01e8\n r31 = r2\n android.support.constraint.solver.widgets.ConstraintWidget r2 = r11.getParent()\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour[] r2 = r2.mListDimensionBehaviors\n r2 = r2[r1]\n r32 = r6\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour r6 = android.support.constraint.solver.widgets.ConstraintWidget.DimensionBehaviour.WRAP_CONTENT\n if (r2 != r6) goto L_0x01ec\n return r16\n L_0x01e8:\n r31 = r2\n r32 = r6\n L_0x01ec:\n float r23 = r23 + r15\n float r23 = r23 - r18\n r2 = r3\n r6 = r2\n r2 = r14\n L_0x01f3:\n if (r6 == 0) goto L_0x02ad\n android.support.constraint.solver.Metrics r11 = android.support.constraint.solver.LinearSystem.sMetrics\n if (r11 == 0) goto L_0x021a\n android.support.constraint.solver.Metrics r11 = android.support.constraint.solver.LinearSystem.sMetrics\n r33 = r8\n r34 = r9\n long r8 = r11.nonresolvedWidgets\n long r8 = r8 - r27\n r11.nonresolvedWidgets = r8\n android.support.constraint.solver.Metrics r8 = android.support.constraint.solver.LinearSystem.sMetrics\n r35 = r13\n r36 = r14\n long r13 = r8.resolvedWidgets\n long r13 = r13 + r27\n r8.resolvedWidgets = r13\n android.support.constraint.solver.Metrics r8 = android.support.constraint.solver.LinearSystem.sMetrics\n long r13 = r8.chainConnectionResolved\n long r13 = r13 + r27\n r8.chainConnectionResolved = r13\n goto L_0x0222\n L_0x021a:\n r33 = r8\n r34 = r9\n r35 = r13\n r36 = r14\n L_0x0222:\n android.support.constraint.solver.widgets.ConstraintWidget[] r8 = r6.mNextChainWidget\n r17 = r8[r1]\n if (r17 != 0) goto L_0x022e\n if (r6 != r4) goto L_0x022b\n goto L_0x022e\n L_0x022b:\n r13 = r40\n goto L_0x02a1\n L_0x022e:\n float r8 = (float) r7\n float r8 = r23 / r8\n int r9 = (r12 > r19 ? 1 : (r12 == r19 ? 0 : -1))\n if (r9 <= 0) goto L_0x0249\n float[] r9 = r6.mWeight\n r9 = r9[r1]\n r11 = -1082130432(0xffffffffbf800000, float:-1.0)\n int r9 = (r9 > r11 ? 1 : (r9 == r11 ? 0 : -1))\n if (r9 != 0) goto L_0x0241\n r8 = 0\n goto L_0x0249\n L_0x0241:\n float[] r9 = r6.mWeight\n r9 = r9[r1]\n float r9 = r9 * r23\n float r8 = r9 / r12\n L_0x0249:\n int r9 = r6.getVisibility()\n r11 = 8\n if (r9 != r11) goto L_0x0252\n r8 = 0\n L_0x0252:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n r9 = r9[r42]\n int r9 = r9.getMargin()\n float r9 = (float) r9\n float r2 = r2 + r9\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n r9 = r9[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r9.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r11 = r10.resolvedTarget\n r9.resolve(r11, r2)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n int r11 = r42 + 1\n r9 = r9[r11]\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r9.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r11 = r10.resolvedTarget\n float r13 = r2 + r8\n r9.resolve(r11, r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n r9 = r9[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r9.getResolutionNode()\n r13 = r40\n r9.addResolvedValue(r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n int r11 = r42 + 1\n r9 = r9[r11]\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r9.getResolutionNode()\n r9.addResolvedValue(r13)\n float r2 = r2 + r8\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n int r11 = r42 + 1\n r9 = r9[r11]\n int r9 = r9.getMargin()\n float r9 = (float) r9\n float r2 = r2 + r9\n L_0x02a1:\n r6 = r17\n r8 = r33\n r9 = r34\n r13 = r35\n r14 = r36\n goto L_0x01f3\n L_0x02ad:\n r33 = r8\n r34 = r9\n r35 = r13\n r36 = r14\n r13 = r40\n r8 = 1\n return r8\n L_0x02b9:\n r31 = r2\n r32 = r6\n r33 = r8\n r34 = r9\n r35 = r13\n r36 = r14\n r13 = r40\n int r2 = (r23 > r19 ? 1 : (r23 == r19 ? 0 : -1))\n if (r2 >= 0) goto L_0x02d3\n r8 = 0\n r22 = 0\n r2 = 1\n r30 = r2\n r33 = r8\n L_0x02d3:\n if (r30 == 0) goto L_0x0370\n float r23 = r23 - r0\n r2 = r3\n float r6 = r3.getBiasPercent(r1)\n float r6 = r6 * r23\n float r14 = r36 + r6\n r11 = r2\n r23 = r14\n L_0x02e3:\n if (r11 == 0) goto L_0x036a\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n if (r2 == 0) goto L_0x0301\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r8 = r2.nonresolvedWidgets\n long r8 = r8 - r27\n r2.nonresolvedWidgets = r8\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r8 = r2.resolvedWidgets\n long r8 = r8 + r27\n r2.resolvedWidgets = r8\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r8 = r2.chainConnectionResolved\n long r8 = r8 + r27\n r2.chainConnectionResolved = r8\n L_0x0301:\n android.support.constraint.solver.widgets.ConstraintWidget[] r2 = r11.mNextChainWidget\n r17 = r2[r1]\n if (r17 != 0) goto L_0x0309\n if (r11 != r4) goto L_0x0366\n L_0x0309:\n r2 = 0\n if (r1 != 0) goto L_0x0312\n int r6 = r11.getWidth()\n float r2 = (float) r6\n goto L_0x0317\n L_0x0312:\n int r6 = r11.getHeight()\n float r2 = (float) r6\n L_0x0317:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r6 = r11.mListAnchors\n r6 = r6[r42]\n int r6 = r6.getMargin()\n float r6 = (float) r6\n float r6 = r23 + r6\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n r8 = r8[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r10.resolvedTarget\n r8.resolve(r9, r6)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r10.resolvedTarget\n float r14 = r6 + r2\n r8.resolve(r9, r14)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n r8 = r8[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n r8.addResolvedValue(r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n r8.addResolvedValue(r13)\n float r6 = r6 + r2\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n int r8 = r8.getMargin()\n float r8 = (float) r8\n float r23 = r6 + r8\n L_0x0366:\n r11 = r17\n goto L_0x02e3\n L_0x036a:\n r37 = r7\n r38 = r34\n goto L_0x046f\n L_0x0370:\n if (r33 != 0) goto L_0x0374\n if (r22 == 0) goto L_0x036a\n L_0x0374:\n if (r33 == 0) goto L_0x0379\n float r23 = r23 - r0\n goto L_0x037d\n L_0x0379:\n if (r22 == 0) goto L_0x037d\n float r23 = r23 - r0\n L_0x037d:\n r2 = r3\n int r9 = r34 + 1\n float r6 = (float) r9\n float r6 = r23 / r6\n if (r22 == 0) goto L_0x0395\n r8 = r34\n r9 = 1\n if (r8 <= r9) goto L_0x0390\n int r9 = r8 + -1\n float r9 = (float) r9\n float r6 = r23 / r9\n goto L_0x0397\n L_0x0390:\n r9 = 1073741824(0x40000000, float:2.0)\n float r6 = r23 / r9\n goto L_0x0397\n L_0x0395:\n r8 = r34\n L_0x0397:\n r9 = r36\n int r11 = r3.getVisibility()\n r14 = 8\n if (r11 == r14) goto L_0x03a2\n float r9 = r9 + r6\n L_0x03a2:\n if (r22 == 0) goto L_0x03b2\n r11 = 1\n if (r8 <= r11) goto L_0x03b2\n android.support.constraint.solver.widgets.ConstraintAnchor[] r11 = r5.mListAnchors\n r11 = r11[r42]\n int r11 = r11.getMargin()\n float r11 = (float) r11\n float r9 = r36 + r11\n L_0x03b2:\n if (r33 == 0) goto L_0x03c0\n if (r5 == 0) goto L_0x03c0\n android.support.constraint.solver.widgets.ConstraintAnchor[] r11 = r5.mListAnchors\n r11 = r11[r42]\n int r11 = r11.getMargin()\n float r11 = (float) r11\n float r9 = r9 + r11\n L_0x03c0:\n r11 = r2\n r23 = r9\n L_0x03c3:\n if (r11 == 0) goto L_0x046b\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n if (r2 == 0) goto L_0x03e6\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n r37 = r7\n r38 = r8\n long r7 = r2.nonresolvedWidgets\n long r7 = r7 - r27\n r2.nonresolvedWidgets = r7\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r7 = r2.resolvedWidgets\n long r7 = r7 + r27\n r2.resolvedWidgets = r7\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r7 = r2.chainConnectionResolved\n long r7 = r7 + r27\n r2.chainConnectionResolved = r7\n goto L_0x03ea\n L_0x03e6:\n r37 = r7\n r38 = r8\n L_0x03ea:\n android.support.constraint.solver.widgets.ConstraintWidget[] r2 = r11.mNextChainWidget\n r17 = r2[r1]\n if (r17 != 0) goto L_0x03f6\n if (r11 != r4) goto L_0x03f3\n goto L_0x03f6\n L_0x03f3:\n r8 = 8\n goto L_0x0463\n L_0x03f6:\n r2 = 0\n if (r1 != 0) goto L_0x03ff\n int r7 = r11.getWidth()\n float r2 = (float) r7\n goto L_0x0404\n L_0x03ff:\n int r7 = r11.getHeight()\n float r2 = (float) r7\n L_0x0404:\n if (r11 == r5) goto L_0x0411\n android.support.constraint.solver.widgets.ConstraintAnchor[] r7 = r11.mListAnchors\n r7 = r7[r42]\n int r7 = r7.getMargin()\n float r7 = (float) r7\n float r23 = r23 + r7\n L_0x0411:\n r7 = r23\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n r8 = r8[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r10.resolvedTarget\n r8.resolve(r9, r7)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r10.resolvedTarget\n float r14 = r7 + r2\n r8.resolve(r9, r14)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n r8 = r8[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n r8.addResolvedValue(r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n r8.addResolvedValue(r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n int r8 = r8.getMargin()\n float r8 = (float) r8\n float r8 = r8 + r2\n float r23 = r7 + r8\n if (r17 == 0) goto L_0x03f3\n int r7 = r17.getVisibility()\n r8 = 8\n if (r7 == r8) goto L_0x0463\n float r23 = r23 + r6\n L_0x0463:\n r11 = r17\n r7 = r37\n r8 = r38\n goto L_0x03c3\n L_0x046b:\n r37 = r7\n r38 = r8\n L_0x046f:\n r2 = 1\n return r2\n L_0x0471:\n r30 = r2\n r32 = r6\n r37 = r7\n r33 = r8\n r38 = r9\n r35 = r13\n r13 = r40\n L_0x047f:\n return r16\n L_0x0480:\n r30 = r2\n r32 = r6\n r37 = r7\n r33 = r8\n r38 = r9\n r35 = r13\n r13 = r0\n L_0x048d:\n return r16\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.constraint.solver.widgets.Optimizer.applyChainOptimized(android.support.constraint.solver.widgets.ConstraintWidgetContainer, android.support.constraint.solver.LinearSystem, int, int, android.support.constraint.solver.widgets.ChainHead):boolean\");\n }", "protected abstract void showHint();", "@Test(timeout = 4000)\n public void test291() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"kiDz=CI9_ri)~odKM\", \"]1\");\n // Undeclared exception!\n try { \n checkbox0.h3((Object) \"0G-VP2>k}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test213() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"wh\\\"vVQ `'HnBv\", \"~qV]vimZJQ;pcba\");\n // Undeclared exception!\n try { \n checkbox0.get(\"4_R]T<#2)Q?]R7Ut\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Could not find component with id '4_R]T<#2)Q?]R7Ut'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(table0, \"input\", (String) null);\n // Undeclared exception!\n try { \n checkbox0.samp((Object) errorPage0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "private boolean randomSwitch(View v, int screen, float scrollProgress){\n /* YUNOS BEGIN PB*/\n //##modules(HomeShell): ##author:guoshuai.lgs\n //##BugID:(5221896) ##date:2014/09/03\n //##decrpition: support mainmenu feature, cancel drop feature, page management feature, and so on\n //CellLayout cellLayout = (CellLayout) v;\n //ShortcutAndWidgetContainer container = cellLayout.getShortcutAndWidgetContainer();\n\n //final float verticalDelta = 0.7f * cellLayout.getCellHeight()\n // * (float) (1 - Math.abs(2 * Math.abs(scrollProgress) - 1));\n ViewGroup container;\n float verticalDelta;\n \n if (v instanceof CellLayout) {\n CellLayout cellLayout = (CellLayout) v;\n container = cellLayout.getShortcutAndWidgetContainer();\n verticalDelta = 0.7f * cellLayout.getCellHeight()\n * (float) (1 - Math.abs(2 * Math.abs(scrollProgress) - 1));\n } else if (v instanceof PagedViewCellLayout) {\n PagedViewCellLayout cellLayout = (PagedViewCellLayout) v;\n container = cellLayout.getChildrenLayout();\n verticalDelta = 0.7f * cellLayout.getCellHeight()\n * (float) (1 - Math.abs(2 * Math.abs(scrollProgress) - 1));\n } else if (v instanceof PagedViewGridLayout) {\n PagedViewGridLayout layout = (PagedViewGridLayout)v;\n container = (ViewGroup)v;\n verticalDelta = 0.7f * (layout.getHeight()/layout.getCellCountY())\n * (float) (1 - Math.abs(2 * Math.abs(scrollProgress) - 1));\n } else {\n //never\n return false;\n } \n /*YUNOS END PB*/\n\n for (int i = 0; i < container.getChildCount(); i++) {\n /* YUNOS BEGIN PB*/\n //##modules(HomeShell): ##author:guoshuai.lgs\n //##BugID:(5221896) ##date:2014/09/03\n //##decrpition: support mainmenu feature, cancel drop feature, page management feature, and so on\n /*\n View view = container.getChildAt(i);\n ItemInfo info = (ItemInfo) view.getTag();\n if ((info.cellX % 2 == 0)) {\n // even columns\n view.setTranslationY(verticalDelta);\n } else {\n // odd columns\n view.setTranslationY(-verticalDelta);\n }*/\n View view = container.getChildAt(i);\n int index;\n if (v instanceof CellLayout) {\n ItemInfo info = (ItemInfo) view.getTag();\n /* YUNOS BEGIN PB*/\n // ##module:HomeShell ##author:jinjiang.wjj\n // ##BugID:5621125 ##date:2014/12/05\n // ##description:choose floating up and down effect, cause a nullpointer exception\n if (info == null) {\n index = i;\n } else {\n index = info.cellX;\n }\n /* YUNOS END PB*/\n } else {\n index = i;\n }\n \n if (index % 2 == 0) {\n // even columns\n view.setTranslationY(verticalDelta);\n } else {\n // odd columns\n view.setTranslationY(-verticalDelta);\n }\n /*YUNOS END PB*/\n }\n return true;\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"sajp\", \"sajp\");\n // Undeclared exception!\n try { \n checkbox0.hr();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public CharSequence getHintText() {\n/* 1485 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "@Test(timeout = 4000)\n public void test228() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"unsupported feature \", \"unsupported feature \");\n String[] stringArray0 = new String[2];\n Component component0 = checkbox0.attributes(stringArray0);\n assertSame(component0, checkbox0);\n }", "public final void mo5180f() {\n boolean z;\n int i;\n TextDirectionHeuristic textDirectionHeuristic;\n if (mo5181g()) {\n if (this.f9480b) {\n if (this.f9488l.getMeasuredHeight() > 0 && this.f9488l.getMeasuredWidth() > 0) {\n if (Build.VERSION.SDK_INT >= 29) {\n z = this.f9488l.isHorizontallyScrollable();\n } else {\n z = ((Boolean) m7504a((Object) this.f9488l, \"getHorizontallyScrolling\", (Object) false)).booleanValue();\n }\n if (!z) {\n i = (this.f9488l.getMeasuredWidth() - this.f9488l.getTotalPaddingLeft()) - this.f9488l.getTotalPaddingRight();\n } else {\n i = 1048576;\n }\n int height = (this.f9488l.getHeight() - this.f9488l.getCompoundPaddingBottom()) - this.f9488l.getCompoundPaddingTop();\n if (i > 0 && height > 0) {\n synchronized (f9477i) {\n f9477i.setEmpty();\n f9477i.right = (float) i;\n f9477i.bottom = (float) height;\n RectF rectF = f9477i;\n int length = this.f9484f.length;\n if (length != 0) {\n int i2 = length - 1;\n int i3 = 0;\n int i4 = 1;\n while (i4 <= i2) {\n int i5 = (i4 + i2) / 2;\n int i6 = this.f9484f[i5];\n CharSequence text = this.f9488l.getText();\n TransformationMethod transformationMethod = this.f9488l.getTransformationMethod();\n if (transformationMethod != null) {\n CharSequence transformation = transformationMethod.getTransformation(text, this.f9488l);\n if (transformation != null) {\n text = transformation;\n }\n }\n int i7 = Build.VERSION.SDK_INT;\n int maxLines = this.f9488l.getMaxLines();\n TextPaint textPaint = this.f9487k;\n if (textPaint == null) {\n this.f9487k = new TextPaint();\n } else {\n textPaint.reset();\n }\n this.f9487k.set(this.f9488l.getPaint());\n this.f9487k.setTextSize((float) i6);\n int round = Math.round(rectF.right);\n int i8 = Build.VERSION.SDK_INT;\n StaticLayout.Builder obtain = StaticLayout.Builder.obtain(text, 0, text.length(), this.f9487k, round);\n obtain.setAlignment((Layout.Alignment) m7504a(this.f9488l, \"getLayoutAlignment\", Layout.Alignment.ALIGN_NORMAL)).setLineSpacing(this.f9488l.getLineSpacingExtra(), this.f9488l.getLineSpacingMultiplier()).setIncludePad(this.f9488l.getIncludeFontPadding()).setBreakStrategy(this.f9488l.getBreakStrategy()).setHyphenationFrequency(this.f9488l.getHyphenationFrequency()).setMaxLines(maxLines == -1 ? Integer.MAX_VALUE : maxLines);\n try {\n if (Build.VERSION.SDK_INT < 29) {\n textDirectionHeuristic = (TextDirectionHeuristic) m7504a(this.f9488l, \"getTextDirectionHeuristic\", TextDirectionHeuristics.FIRSTSTRONG_LTR);\n } else {\n textDirectionHeuristic = this.f9488l.getTextDirectionHeuristic();\n }\n obtain.setTextDirection(textDirectionHeuristic);\n } catch (ClassCastException e) {\n Log.w(\"ACTVAutoSizeHelper\", \"Failed to obtain TextDirectionHeuristic, auto size may be incorrect\");\n }\n StaticLayout build = obtain.build();\n if (maxLines != -1) {\n if (build.getLineCount() <= maxLines) {\n if (build.getLineEnd(build.getLineCount() - 1) != text.length()) {\n }\n }\n i3 = i5 - 1;\n i2 = i3;\n }\n if (((float) build.getHeight()) <= rectF.bottom) {\n int i9 = i4;\n i4 = i5 + 1;\n i3 = i9;\n }\n i3 = i5 - 1;\n i2 = i3;\n }\n float f = (float) this.f9484f[i3];\n if (f != this.f9488l.getTextSize()) {\n mo5175a(0, f);\n }\n } else {\n throw new IllegalStateException(\"No available text sizes to choose from.\");\n }\n }\n } else {\n return;\n }\n } else {\n return;\n }\n }\n this.f9480b = true;\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"S\", \"\\bd8<X\");\n TextArea textArea0 = new TextArea(checkbox0, \"HD17N:Bzj:S\", \"=P+hF^\");\n Table table0 = new Table(textArea0, \"S\");\n TableBlock tableBlock0 = table0.colgroup();\n TableRow tableRow0 = tableBlock0.tr();\n // Undeclared exception!\n try { \n textArea0.h6((Object) tableRow0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test277() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.strike();\n Component component0 = errorPage0.legend();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (model.getHintsUsed() < model.getPuzzle().getDifficulty().getMaxHints()) {\n model.getPuzzle().hint(false);\n model.setHintsUsed(model.getHintsUsed() + 1);\n update();\n System.err.println(\"HINT USED: \" + model.getStringHintsUsed());\n if (model.getHintsUsed() == model.getPuzzle().getDifficulty().getMaxHints()) {\n view.getGamePanel().getHintBtn().setEnabled(false);\n JOptionPane.showOptionDialog(getParent(), \"Let's not make it too easy!\\nThat was the last hint for this game.\\n\\nDid you Know?\\nSudokus can likely prevent Alzheimer's disease\\nand Dementia, so don't make it too easy.\", \"Out of Hints\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);\n }\n checkGridCompletion();\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n AspectRatio aspectRatio0 = homeEnvironment0.getVideoAspectRatio();\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.WALLS_ALPHA;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"eH]^40[h2\", propertyChangeListener0);\n PropertyChangeEvent propertyChangeEvent0 = new PropertyChangeEvent(homeEnvironment_Property0, \"eH]^40[h2\", (Object) null, homeEnvironment0);\n propertyChangeEvent0.setPropagationId(propertyChangeListenerProxy0);\n propertyChangeEvent0.toString();\n propertyChangeListenerProxy0.propertyChange(propertyChangeEvent0);\n PropertyChangeEvent propertyChangeEvent1 = new PropertyChangeEvent(propertyChangeListenerProxy0, \"{@sDvCJq(i\", aspectRatio0, \"eH]^40[h2\");\n propertyChangeEvent1.toString();\n propertyChangeListenerProxy0.propertyChange(propertyChangeEvent1);\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n URL uRL0 = MockURL.getFtpExample();\n TemporaryURLContent temporaryURLContent0 = new TemporaryURLContent(uRL0);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"eH]^40[h2\", temporaryURLContent0, (-1942.4762F), 1805.02F, \"\", true);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n homeEnvironment0.setSkyTexture(homeTexture0);\n homeEnvironment0.setWallsAlpha((-1942.4762F));\n homeEnvironment0.setGroundColor(0);\n homeEnvironment0.getPhotoAspectRatio();\n homeEnvironment0.getGroundColor();\n HomeEnvironment.Property homeEnvironment_Property1 = HomeEnvironment.Property.WALLS_ALPHA;\n homeEnvironment0.removePropertyChangeListener(homeEnvironment_Property1, propertyChangeListenerProxy0);\n homeEnvironment0.getPhotoWidth();\n homeEnvironment0.setAllLevelsVisible(true);\n homeEnvironment0.setGroundColor(0);\n assertTrue(homeEnvironment0.isAllLevelsVisible());\n }", "@Test\r\n public void checkSpinnerChoicesViews(){\r\n\r\n String [] VALUES = {\"Education\", \"Transport\", \"Planning\", \"Fire and Public Safety\", \"Social Care\", \"Libraries\", \"Waste Management\",\r\n \"Allotments\", \"Public Clocks\", \"Bus Shelters\", \"Community Centres\", \"Play Areas\", \"Grants\", \"Neighbourhood Planning\", \"Litter, Fouling and Graffiti\"};\r\n\r\n String [] PARISH_ISSUES =\r\n {\"Allotments\", \"Public Clocks\", \"Bus Shelters\", \"Community Centres\", \"Play Areas\", \"Grants\", \"Neighbourhood Planning\", \"Litter, Fouling and Graffiti\"};\r\n\r\n DrawerLayout rlContainer = mActivity.findViewById(R.id.drawer_layout);\r\n ComplaintFragment complaintFragment = new ComplaintFragment();\r\n mActivity.getSupportFragmentManager().beginTransaction().replace(R.id.drawer_layout, complaintFragment).commitAllowingStateLoss();\r\n getInstrumentation().waitForIdleSync();\r\n\r\n String str = null;\r\n for(int i = 0; i< 15 ; i++ ) {\r\n\r\n\r\n str = VALUES[i];\r\n onView(withId(R.id.spinner))\r\n .perform(click());\r\n onData(hasToString(startsWith(str)))\r\n .perform(click());\r\n if (Arrays.asList(PARISH_ISSUES).contains(str)) {\r\n\r\n assertTrue(complaintFragment.getView().findViewById(R.id.submitButton).isShown());\r\n assertTrue(complaintFragment.getView().findViewById(R.id.complaintBody).isShown());\r\n assertFalse(complaintFragment.getView().findViewById(R.id.reportLinkText).isShown());\r\n } else {\r\n assertFalse(complaintFragment.getView().findViewById(R.id.submitButton).isShown());\r\n assertFalse(complaintFragment.getView().findViewById(R.id.complaintBody).isShown());\r\n assertTrue(complaintFragment.getView().findViewById(R.id.reportLinkText).isShown());\r\n\r\n }\r\n }\r\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testGREENBEA() {\n CuteNetlibCase.doTest(\"GREENBEA.SIF\", \"-1.74990012991E+03\", \"-1.74990012991E+03\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(29, 13, 1.7976931348623157E308, 1.7976931348623157E308, 0.0, 0.0);\n assertEquals(\"id=29 modelOptComp: vol = N/A delta = N/A: modelPrice = 0.0: pvDividend = 0.0\", string0);\n }", "@Test(timeout = 4000)\n public void test259() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n List<CharSequence> list0 = errorPage0._getRenderHints();\n assertNotNull(list0);\n \n Component component0 = errorPage0.address((Object) list0);\n Component component1 = component0.p((Object) errorPage0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component1._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(3033, 611, 186.275786794074, (-1.0), 186.275786794074, 40);\n assertEquals(\"id=3033 unknown: vol = 186.275786794074 delta = -1.0\", string0);\n }", "@Test\n public void test07() throws Throwable {\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"Jf)%}s\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo0 = chartRenderingInfo0.getPlotInfo();\n CategoryTextAnnotation categoryTextAnnotation0 = new CategoryTextAnnotation(\"The renderer has changed and I don't know what to do!\", (Comparable) \"Jf)%}s\", 473.308516391);\n categoryTextAnnotation0.setValue(473.308516391);\n boolean boolean0 = standardEntityCollection0.equals(categoryTextAnnotation0);\n SynthListUI synthListUI0 = new SynthListUI();\n JList<Object> jList0 = null;\n // Undeclared exception!\n try { \n synthListUI0.indexToLocation((JList) null, 0);\n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"javax.swing.plaf.basic.BasicListUI\", e);\n }\n }", "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void test142() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.em();\n Block block1 = (Block)block0.renderHint((CharSequence) \"V\\\"i%{rPYE$\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(block0._isGeneratedId());\n }", "public void validatePipe(SunGraphics2D paramSunGraphics2D) {\n/* 155 */ if (paramSunGraphics2D.antialiasHint != 2 && paramSunGraphics2D.paintState <= 1 && (paramSunGraphics2D.compositeState <= 0 || paramSunGraphics2D.compositeState == 2)) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 160 */ if (paramSunGraphics2D.clipState == 2) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 165 */ super.validatePipe(paramSunGraphics2D);\n/* */ } else {\n/* 167 */ switch (paramSunGraphics2D.textAntialiasHint) {\n/* */ \n/* */ \n/* */ case 0:\n/* */ case 1:\n/* 172 */ paramSunGraphics2D.textpipe = solidTextRenderer;\n/* */ break;\n/* */ \n/* */ case 2:\n/* 176 */ paramSunGraphics2D.textpipe = aaTextRenderer;\n/* */ break;\n/* */ \n/* */ default:\n/* 180 */ switch ((paramSunGraphics2D.getFontInfo()).aaHint) {\n/* */ \n/* */ case 4:\n/* */ case 6:\n/* 184 */ paramSunGraphics2D.textpipe = lcdTextRenderer;\n/* */ break;\n/* */ \n/* */ case 2:\n/* 188 */ paramSunGraphics2D.textpipe = aaTextRenderer;\n/* */ break;\n/* */ } \n/* */ \n/* 192 */ paramSunGraphics2D.textpipe = solidTextRenderer;\n/* */ break;\n/* */ } \n/* */ } \n/* 196 */ paramSunGraphics2D.imagepipe = imagepipe;\n/* 197 */ if (paramSunGraphics2D.transformState >= 3) {\n/* 198 */ paramSunGraphics2D.drawpipe = gdiTxPipe;\n/* 199 */ paramSunGraphics2D.fillpipe = gdiTxPipe;\n/* 200 */ } else if (paramSunGraphics2D.strokeState != 0) {\n/* 201 */ paramSunGraphics2D.drawpipe = gdiTxPipe;\n/* 202 */ paramSunGraphics2D.fillpipe = gdiPipe;\n/* */ } else {\n/* 204 */ paramSunGraphics2D.drawpipe = gdiPipe;\n/* 205 */ paramSunGraphics2D.fillpipe = gdiPipe;\n/* */ } \n/* 207 */ paramSunGraphics2D.shapepipe = gdiPipe;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 213 */ if (paramSunGraphics2D.loops == null)\n/* */ {\n/* 215 */ paramSunGraphics2D.loops = getRenderLoops(paramSunGraphics2D);\n/* */ }\n/* */ } else {\n/* 218 */ super.validatePipe(paramSunGraphics2D);\n/* */ } \n/* */ }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.GROUND_COLOR;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"Super class isn't cloneable\", propertyChangeListener0);\n homeEnvironment0.removePropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "private void testWithBacktrackingInput(LcssAlgorithm algorithm) {\n\t}", "@Test(timeout = 4000)\n public void test136() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"cannot bind to collection property: \", \".*,r%\");\n // Undeclared exception!\n try { \n checkbox0.h2();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(29, 13, 1.7976931348623157E308, 1.7976931348623157E308, 1.7976931348623157E308, 0.0);\n assertEquals(\"id=29 modelOptComp: vol = N/A delta = N/A: modelPrice = N/A: pvDividend = 0.0\", string0);\n }", "@Test(timeout = 4000)\n public void test221() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n MockDate mockDate0 = new MockDate((-800), (-800), (-707), 75, 43);\n Label label0 = new Label(errorPage0, mockDate0);\n Component component0 = label0.b();\n component0._getVisibleForm(false);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "private void showHint() {\r\n\t\tUtil.println(\"A special hint will be calculated for you, please wait.\");\r\n\r\n\t\tStrategyInterface s = new SmartStrategy();\r\n\r\n\t\tTurn turn = s.requestTurn(client.getTurn());\r\n\r\n\t\tclient.setTurn(turn);\r\n\r\n\t\tUtil.println(\"The following moves will be suggested: \");\r\n\t\tUtil.println(client.getTurn().getMoves().toString());\r\n\t\tUtil.println(\"Type applyhint to apply these moves.\");\r\n\t}", "public void drawNonEssentialComponents(){\n\t\t\n\t}", "private void testLabelForSet(Component comp) {\n if (testSettings.AP_labelForSet && (comp instanceof JLabel)){\n // H1- hack for JLabels labels.add(comp);\n Component labelFor = ((JLabel)comp).getLabelFor();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testLabelForSet()> - labelFor=\"+labelFor);\n \n if (labelFor == null){\n noLabelFor.add(comp);\n }\n }\n \n if (testSettings.AP_noLabelFor) {\n if ((testSettings.AP_nlf_text && (comp instanceof JTextComponent)) ||\n (testSettings.AP_nlf_table && (comp instanceof JTable)) ||\n (testSettings.AP_nlf_list && (comp instanceof JList)) ||\n (testSettings.AP_nlf_tree && (comp instanceof JTree)) ||\n (testSettings.AP_nlf_tabbedPane && (comp instanceof JTabbedPane))){\n labelForPointingComponents.add(comp);\n }\n }\n \n }", "@Test(priority=12)\n\tpublic void verifySuggestionsAreDisappearingByEnablingStarIconOnSuggestionInDropDown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.startIconOnPageHeader);\n\t click(overviewPage.startIconOnPageHeader);\n\t int size=overviewPage.startIconSuggestionLists.size();\n\t for (int i=0;i<size;i++)\n\t {\n\t click(overviewPage.starIconsOnSuggestions);\n\t waitTill(2000);\n\t switch(i) {\n\t case 0:\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.overviewInStartIconSuggestionList),\n\t\t \t\t\"overview suggestion not disappeared by clicking on star icon on suggestions\");\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.overviewIconOnHeaderSection),\n\t\t \t\t\"overview suggestion on header not disappeared by clicking on star icon on suggestions\"); \n\t\t break;\n\t case 1:\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.leadsInStartIconSuggestionList),\n\t\t \t\t\"leads suggestion not disappeared by clicking on star icon on suggestions\");\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.leadsIconOnHeaderSection),\n\t\t \t\t\"leads suggestion on header not disappeared by clicking on star icon on suggestions\");\n\t\t break;\n\t case 2:\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.myStockInStartIconSuggestionList),\n\t\t \t\t\"my stock suggestion not disappeared by clicking on star icon on suggestions\");\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.mystockIconOnHeaderSection),\n\t\t \t\t\"my stock suggestion on header not disappeared by clicking on star icon on suggestions\");\n\t\t break;\n\t case 3:\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.addStockInStartIconSuggestionList),\n\t\t \t\"add stock suggestion not disappeared by clicking on star icon on suggestions\");\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.addstockIconOnHeaderSection),\n\t\t \t\t\"add stock suggestion on header not disappeared by clicking on star icon on suggestions\");\n\t\t break;\n\t case 4:\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.profileInStartIconSuggestionList),\n\t\t \t\"profile suggestion not disappeared by clicking on star icon on suggestions\");\n\t\t Assert.assertFalse(verifyElementPresent(overviewPage.profileIconOnHeaderSection),\n\t\t \t\t\"profile suggestion on header not disappeared by clicking on star icon on suggestions\");\n\t\t break;\n\t }\n\t\t}\n\t }", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"tt\", \"Can't add components to a component that is not an instance of IContainer.\");\n // Undeclared exception!\n try { \n checkbox0.dfn();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public boolean shouldQuickSettingsIntercept(float r6, float r7, float r8) {\n /*\n r5 = this;\n boolean r0 = r5.mQsExpansionEnabled\n r1 = 0\n if (r0 == 0) goto L_0x006c\n boolean r0 = r5.mCollapsedOnDown\n if (r0 != 0) goto L_0x006c\n boolean r0 = r5.mKeyguardShowing\n if (r0 == 0) goto L_0x0016\n com.android.systemui.statusbar.phone.KeyguardBypassController r0 = r5.mKeyguardBypassController\n boolean r0 = r0.getBypassEnabled()\n if (r0 == 0) goto L_0x0016\n goto L_0x006c\n L_0x0016:\n boolean r0 = r5.mKeyguardShowing\n if (r0 != 0) goto L_0x0024\n com.android.systemui.plugins.qs.QS r0 = r5.mQs\n if (r0 != 0) goto L_0x001f\n goto L_0x0024\n L_0x001f:\n android.view.View r0 = r0.getHeader()\n goto L_0x0026\n L_0x0024:\n com.android.systemui.statusbar.phone.KeyguardStatusBarView r0 = r5.mKeyguardStatusBar\n L_0x0026:\n android.widget.FrameLayout r2 = r5.mQsFrame\n float r2 = r2.getX()\n int r2 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n r3 = 1\n if (r2 < 0) goto L_0x0057\n android.widget.FrameLayout r2 = r5.mQsFrame\n float r2 = r2.getX()\n android.widget.FrameLayout r4 = r5.mQsFrame\n int r4 = r4.getWidth()\n float r4 = (float) r4\n float r2 = r2 + r4\n int r2 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r2 > 0) goto L_0x0057\n int r2 = r0.getTop()\n float r2 = (float) r2\n int r2 = (r7 > r2 ? 1 : (r7 == r2 ? 0 : -1))\n if (r2 < 0) goto L_0x0057\n int r0 = r0.getBottom()\n float r0 = (float) r0\n int r0 = (r7 > r0 ? 1 : (r7 == r0 ? 0 : -1))\n if (r0 > 0) goto L_0x0057\n r0 = r3\n goto L_0x0058\n L_0x0057:\n r0 = r1\n L_0x0058:\n boolean r2 = r5.mQsExpanded\n if (r2 == 0) goto L_0x006b\n if (r0 != 0) goto L_0x0069\n r0 = 0\n int r8 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r8 >= 0) goto L_0x006a\n boolean r5 = r5.isInQsArea(r6, r7)\n if (r5 == 0) goto L_0x006a\n L_0x0069:\n r1 = r3\n L_0x006a:\n return r1\n L_0x006b:\n return r0\n L_0x006c:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.systemui.statusbar.phone.NotificationPanelViewController.shouldQuickSettingsIntercept(float, float, float):boolean\");\n }", "@Test(timeout = 4000)\n public void test185() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.label();\n component0._wrapComponentId(\"d1^!A21Y[^*?\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "private void m3387b(android.view.MotionEvent r7) {\n /*\n r6 = this;\n r0 = 0;\n r6.f2686t = r0;\n r1 = r7.getAction();\n r2 = 1;\n if (r1 != r2) goto L_0x0012;\n L_0x000a:\n r1 = r6.isEnabled();\n if (r1 == 0) goto L_0x0012;\n L_0x0010:\n r1 = 1;\n goto L_0x0013;\n L_0x0012:\n r1 = 0;\n L_0x0013:\n r3 = r6.isChecked();\n if (r1 == 0) goto L_0x004a;\n L_0x0019:\n r1 = r6.f2690x;\n r4 = 1000; // 0x3e8 float:1.401E-42 double:4.94E-321;\n r1.computeCurrentVelocity(r4);\n r1 = r6.f2690x;\n r1 = r1.getXVelocity();\n r4 = java.lang.Math.abs(r1);\n r5 = r6.f2691y;\n r5 = (float) r5;\n r4 = (r4 > r5 ? 1 : (r4 == r5 ? 0 : -1));\n if (r4 <= 0) goto L_0x0045;\n L_0x0031:\n r4 = android.support.v7.widget.bg.m3615a(r6);\n r5 = 0;\n if (r4 == 0) goto L_0x003f;\n L_0x0038:\n r1 = (r1 > r5 ? 1 : (r1 == r5 ? 0 : -1));\n if (r1 >= 0) goto L_0x003d;\n L_0x003c:\n goto L_0x0043;\n L_0x003d:\n r2 = 0;\n goto L_0x0043;\n L_0x003f:\n r1 = (r1 > r5 ? 1 : (r1 == r5 ? 0 : -1));\n if (r1 <= 0) goto L_0x003d;\n L_0x0043:\n r1 = r2;\n goto L_0x004b;\n L_0x0045:\n r1 = r6.getTargetCheckedState();\n goto L_0x004b;\n L_0x004a:\n r1 = r3;\n L_0x004b:\n if (r1 == r3) goto L_0x0050;\n L_0x004d:\n r6.playSoundEffect(r0);\n L_0x0050:\n r6.setChecked(r1);\n r6.m3383a(r7);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.v7.widget.SwitchCompat.b(android.view.MotionEvent):void\");\n }", "@Test(timeout = 4000)\n public void test243() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"6F\\\"\", \".}U.0/,SESI0vG=!];E\");\n // Undeclared exception!\n try { \n checkbox0.pre((Object) \"6F\\\"\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \".*,r%\", \"Could not evaluate expression \");\n // Undeclared exception!\n try { \n checkbox0.legend((Object) hidden0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \".*,r%\", \"Could not evaluate expression \");\n // Undeclared exception!\n try { \n checkbox0.style();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test343() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n // Undeclared exception!\n try { \n label0.title(\"select\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "public int getSuggestThreshold() {\n/* 152 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override // com.beloo.widget.chipslayoutmanager.p295d.AbstractLayouter\n /* renamed from: l */\n public boolean mo21684l() {\n return true;\n }", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n Select select0 = new Select(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"cannot bind to collection property: \", stringSelectModel0, \"cannot bind to collection property: \");\n ActionExpression actionExpression0 = new ActionExpression((String) null);\n Form form0 = new Form(select0, \"cannot bind to collection property: \", actionExpression0);\n Checkbox checkbox0 = new Checkbox(form0, \"cannot bind to collection property: \", \"\");\n // Undeclared exception!\n try { \n checkbox0.q();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void renderFlanges(int cons, int tex)\r\n/* 108: */ {\r\n/* 109:106 */ this.context.setTex(tex);\r\n/* 110:108 */ if ((cons & 0x1) > 0)\r\n/* 111: */ {\r\n/* 112:109 */ this.context.setTexFlags(0);\r\n/* 113:110 */ this.context.renderBox(63, 0.25D, 0.0D, 0.25D, 0.75D, 0.125D, 0.75D);\r\n/* 114: */ }\r\n/* 115:112 */ if ((cons & 0x2) > 0)\r\n/* 116: */ {\r\n/* 117:113 */ this.context.setTexFlags(112320);\r\n/* 118:114 */ this.context.renderBox(63, 0.25D, 0.875D, 0.25D, 0.75D, 1.0D, 0.75D);\r\n/* 119: */ }\r\n/* 120:116 */ if ((cons & 0x4) > 0)\r\n/* 121: */ {\r\n/* 122:117 */ this.context.setTexFlags(217134);\r\n/* 123:118 */ this.context.renderBox(63, 0.25D, 0.25D, 0.0D, 0.75D, 0.75D, 0.125D);\r\n/* 124: */ }\r\n/* 125:120 */ if ((cons & 0x8) > 0)\r\n/* 126: */ {\r\n/* 127:121 */ this.context.setTexFlags(188469);\r\n/* 128:122 */ this.context.renderBox(63, 0.25D, 0.25D, 0.875D, 0.75D, 0.75D, 1.0D);\r\n/* 129: */ }\r\n/* 130:124 */ if ((cons & 0x10) > 0)\r\n/* 131: */ {\r\n/* 132:125 */ this.context.setTexFlags(2944);\r\n/* 133:126 */ this.context.renderBox(63, 0.0D, 0.25D, 0.25D, 0.125D, 0.75D, 0.75D);\r\n/* 134: */ }\r\n/* 135:128 */ if ((cons & 0x20) > 0)\r\n/* 136: */ {\r\n/* 137:129 */ this.context.setTexFlags(3419);\r\n/* 138:130 */ this.context.renderBox(63, 0.875D, 0.25D, 0.25D, 1.0D, 0.75D, 0.75D);\r\n/* 139: */ }\r\n/* 140: */ }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"!\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n checkbox0.samp();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public boolean shouldExecute() {\n/* 25 */ if (!this.field_190859_a.getLeashed() && !this.field_190859_a.func_190718_dR()) {\n/* */ \n/* 27 */ List<EntityLlama> list = this.field_190859_a.world.getEntitiesWithinAABB(this.field_190859_a.getClass(), this.field_190859_a.getEntityBoundingBox().expand(9.0D, 4.0D, 9.0D));\n/* 28 */ EntityLlama entityllama = null;\n/* 29 */ double d0 = Double.MAX_VALUE;\n/* */ \n/* 31 */ for (EntityLlama entityllama1 : list) {\n/* */ \n/* 33 */ if (entityllama1.func_190718_dR() && !entityllama1.func_190712_dQ()) {\n/* */ \n/* 35 */ double d1 = this.field_190859_a.getDistanceSqToEntity((Entity)entityllama1);\n/* */ \n/* 37 */ if (d1 <= d0) {\n/* */ \n/* 39 */ d0 = d1;\n/* 40 */ entityllama = entityllama1;\n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* 45 */ if (entityllama == null)\n/* */ {\n/* 47 */ for (EntityLlama entityllama2 : list) {\n/* */ \n/* 49 */ if (entityllama2.getLeashed() && !entityllama2.func_190712_dQ()) {\n/* */ \n/* 51 */ double d2 = this.field_190859_a.getDistanceSqToEntity((Entity)entityllama2);\n/* */ \n/* 53 */ if (d2 <= d0) {\n/* */ \n/* 55 */ d0 = d2;\n/* 56 */ entityllama = entityllama2;\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* 62 */ if (entityllama == null)\n/* */ {\n/* 64 */ return false;\n/* */ }\n/* 66 */ if (d0 < 4.0D)\n/* */ {\n/* 68 */ return false;\n/* */ }\n/* 70 */ if (!entityllama.getLeashed() && !func_190858_a(entityllama, 1))\n/* */ {\n/* 72 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 76 */ this.field_190859_a.func_190715_a(entityllama);\n/* 77 */ return true;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 82 */ return false;\n/* */ }", "public LiquidCanvasBehaviorTest( String testName )\n {\n super( testName );\n }", "@Test(timeout = 4000)\n public void test278() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"z:_i>EAQ.Bdq@CL&k?\\\"\", \"h3\");\n // Undeclared exception!\n try { \n checkbox0.h1((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public boolean tileReachable(float tx, float ty, AgentModel selectedAgent)\r\n/* 243: */ {\r\n/* 244:271 */ float x = selectedAgent.getX() - 0.5F;\r\n/* 245:272 */ float y = selectedAgent.getY() - 0.5F;\r\n/* 246:274 */ switch ((int)selectedAgent.getAngle())\r\n/* 247: */ {\r\n/* 248: */ case 0: \r\n/* 249:277 */ if ((y - 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 250:279 */ return true;\r\n/* 251: */ }\r\n/* 252: */ break;\r\n/* 253: */ case 90: \r\n/* 254:283 */ if ((x + 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 255:285 */ return true;\r\n/* 256: */ }\r\n/* 257: */ break;\r\n/* 258: */ case 180: \r\n/* 259:289 */ if ((y + 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 260:291 */ return true;\r\n/* 261: */ }\r\n/* 262: */ break;\r\n/* 263: */ case 270: \r\n/* 264:295 */ if ((x - 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 265:298 */ return true;\r\n/* 266: */ }\r\n/* 267: */ break;\r\n/* 268: */ }\r\n/* 269:303 */ return false;\r\n/* 270: */ }", "public void changeSpecs(int Idx) {\n\n tb_rule.setText(\"\");\n b_doApply = false;\n /* clear the image panel */\n if (b_gotImagePnl == true) {\n pnl_image.repaint();\n }\n\n\n switch (Idx) {\n case 0:\n /* quadratic Koch Island 1 pg. 13 */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"2\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> F+F-F-FF+F+F-F\");\n\n break;\n\n\n case 1: /* Quadratic Koch Island 2 pg. 14 */\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"2\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> F-FF+FF+F+F-F-FF+F+F-F-FF-FF+F\");\n break;\n\n case 2: /* Island & Lake Combo. pg. 15 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F-F-F-F\");\n tb_ignore.setText(\"Ff+-\");\n tb_depth.setText(\"2\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> F-f+FF-F-FF-Ff-FF+f-FF+F+FF+Ff+FFF\");\n lst_rules.add(\"* <f> * --> ffffff\");\n break;\n\n case 3:\t /* Koch Curve A pg. 16 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> FF+F+F+F+F+F-F\");\n break;\n\n case 4:\t /* Koch Curve B pg. 16 */\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> FF+F+F+F+FF\");\n\n\n break;\n\n case 5:\t /* Koch Curve C pg. 16 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"3\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> FF+F-F+F+FF\");\n break;\n\n\n case 6: /* Koch Curve D pg. 16 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> FF+F++F+F\");\n break;\n\n case 7:\t /* Koch Curve E pg. 16 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> F+FF++F+F\");\n break;\n\n case 8: /* Koch Curve F pg. 16 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> F+F-F+F+F\");\n break;\n\n case 9: /* Mod of snowflake pg. 14*/\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> F-F+F+F-F\");\n\n break;\n\n case 10: /* Dragon Curve pg. 17 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"Fl\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"14\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <l> * --> l+rF+\");\n lst_rules.add(\"* <r> * --> -Fl-r\");\n break;\n\n case 11: /* Hexagonal Gosper Curve pg. 19 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"XF\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"6\");\n lst_rules.removeAll();\n lst_rules.add(\"* <XF> * --> XF+YF++YF-XF--XFXF-YF+\");\n lst_rules.add(\"* <YF> * --> -XF+YFYF++YF+XF--XF-YF\");\n break;\n\n case 12: /* Sierpinski Arrowhead pg. 19 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"YF\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"6\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"6\");\n lst_rules.removeAll();\n lst_rules.add(\"* <XF> * --> YF+XF+YF\");\n lst_rules.add(\"* <YF> * --> XF-YF-XF\");\n break;\n\n case 13: /* Peano Curve pg. 18 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"X\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"3\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> XFYFX+F+YFXFY-F-XFYFX\");\n lst_rules.add(\"* <Y> * --> YFXFY-F-XFYFX+F+YFXFY\");\n break;\n\n case 14: /* Hilbert Curve pg. 18 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"X\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> -YF+XFX+FY-\");\n lst_rules.add(\"* <Y> * --> +XF-YFY-FX+\");\n break;\n\n case 15: /* Approx of Sierpinski pg. 18 */\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+XF+F+XF\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> XF-F+F-XF+F+XF-F+F-X\");\n break;\n\n case 16: /* Tree A pg. 25 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"14\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> F[+F]F[-F]F\");\n break;\n\n case 17: /* Tree B pg. 25 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"X\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"16\");\n lst_rules.removeAll();\n lst_rules.add(\" * <X> * --> F-[[X]+X]+F[+FX]-X\");\n lst_rules.add(\" * <F> * --> FF\");\n break;\n\n\n case 18: /* Tree C pg. 25 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"Y\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"6\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"14\");\n lst_rules.removeAll();\n lst_rules.add(\" * <Y> * --> YFX[+Y][-Y]\");\n lst_rules.add(\" * <X> * --> X[-FFF][+FFF]FX\");\n break;\n\n case 19: /* Tree D pg. 25 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"16\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> FF+[+F-F-F]-[-F+F+F]\");\n break;\n\n case 20: /* Tree E pg. 25 */\n\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"X\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"7\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"18\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> F[+X]F[-X]+X\");\n lst_rules.add(\"* <F> * --> FF\");\n\n break;\n\n case 21: /* Tree B pg. 43 */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F1F1F1\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"30\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"16\");\n lst_rules.clear();\n lst_rules.add(\"0 <0> 0 --> 1\");\n lst_rules.add(\"0 <0> 1 --> 1[-F1F1]\");\n lst_rules.add(\"0 <1> 0 --> 1\");\n lst_rules.add(\"0 <1> 1 --> 1\");\n lst_rules.add(\"1 <0> 0 --> 0\");\n lst_rules.add(\"1 <0> 1 --> 1F1\");\n lst_rules.add(\"1 <1> 0 --> 1\");\n lst_rules.add(\"1 <1> 1 --> 0\");\n lst_rules.add(\"* <-> * --> +\");\n lst_rules.add(\"* <+> * --> -\");\n break;\n\n\n case 22: /* Tree C pg. 43 */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F1F1F1\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"26\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"14\");\n lst_rules.clear();\n lst_rules.add(\"0 <0> 0 --> 0\");\n lst_rules.add(\"0 <0> 1 --> 1\");\n lst_rules.add(\"0 <1> 0 --> 0\");\n lst_rules.add(\"0 <1> 1 --> 1[+F1F1]\");\n lst_rules.add(\"1 <0> 0 --> 0\");\n lst_rules.add(\"1 <0> 1 --> 1F1\");\n lst_rules.add(\"1 <1> 0 --> 0\");\n lst_rules.add(\"1 <1> 1--> 0\");\n lst_rules.add(\"* <-> * --> +\");\n lst_rules.add(\"* <+> * --> -\");\n break;\n\n\n case 23: /* Spiral Tiling pg. 70 */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"AAAA\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"24\");\n lst_rules.removeAll();\n lst_rules.add(\"* <A> * --> X+X+X+X+X+X+\");\n lst_rules.add(\"* <X> * --> [F+F+F+F[---X-Y]+++++F++++++++F-F-F-F]\");\n lst_rules.add(\"* <Y> * --> [F+F+F+F[---Y]+++++F++++++++F-F-F-F]\");\n\n break;\n\n\n case 24: /* BSpline Triangle pg. 20 */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"3\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> F-F+F\");\n\n break;\n\n case 25: /* Snake Kolam pg. 72 */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+XF+F+XF\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> XF-F-F+XF+F+XF-F-F+X\");\n\n break;\n\n\n case 26: /* Anklets of Krishna pg. 73 */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"-X--X\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"8\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> XFX--XFX\");\n\n break;\n\n case 27: /* Color, Koch Curve B */\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+F+F+F\");\n tb_ignore.setText(\"F+\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> FF+F+;;;;;F:::::+F+FF\");\n\n break;\n\n case 28: /* Color, Koch Curve B */\n\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"###F+F+F+F\");\n tb_ignore.setText(\"F+\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * -->;FF+F+F+F+FF\");\n\n break;\n\n\n case 29: /* Color X, Spiral Tiling */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"AAAA\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"24\");\n lst_rules.removeAll();\n lst_rules.add(\"* <A> * --> ;;;;;;;;X::::::::+X+X+X+X+X+\");\n lst_rules.add(\"* <X> * --> [F+F+F+F[---X-Y]+++++F++++++++F-F-F-F]\");\n lst_rules.add(\"* <Y> * --> [F+F+F+F[---Y]+++++F++++++++F-F-F-F]\");\n break;\n\n case 30: /* Color Center, Spiral Tiling */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"AAAA\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"24\");\n lst_rules.removeAll();\n lst_rules.add(\"* <A> * --> X+X+X+X+X+X+\");\n lst_rules.add(\"* <X> * --> [;;;;;F+F+F+F:::::[---X-Y]+++++F++++++++F-F-F-F]\");\n lst_rules.add(\"* <Y> * --> [F+F+F+F[---Y]+++++F++++++++F-F-F-F]\");\n break;\n\n case 31: /* Color Spokes, Spiral Tiling */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"AAAA\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"24\");\n lst_rules.removeAll();\n lst_rules.add(\"* <A> * --> X+X+X+X+X+X+\");\n lst_rules.add(\"* <X> * --> [F+F+F+F[---X-Y]+++++F++++++++;;;;F-F-F-F::::]\");\n lst_rules.add(\"* <Y> * --> [F+F+F+F[---Y]+++++F++++++++F-F-F-F]\");\n break;\n\n case 32: /* Color, Quad Koch Island 1 */\n /* quadratic Koch Island 1 pg. 13 */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"###F+F+F+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"2\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> ;F+F-F-FF+F+F-F\");\n\n break;\n\n case 33: /* Color, Tree E */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"X\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"7\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"18\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> F[+X]F[-X]+X\");\n lst_rules.add(\"* <F> * --> ;;FF::\");\n\n break;\n\n\n case 34: /* Color, Mod of Snowflake */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"###+F\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <F> * --> ;F-F+F+F-F\");\n\n break;\n\n case 35: /* Color, Anklets of Krishna */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"-X--X\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"5\");\n tb_scale.setText(\"100\");\n tb_angle.setText(\"8\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> XFX--X;;;;;;F::::::X\");\n break;\n\n case 36: /* Color, Snake Kolam */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"F+XF+F+;;;XF:::\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"4\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"4\");\n lst_rules.removeAll();\n lst_rules.add(\"* <X> * --> XF-F-F+XF+F+XF-F-F+X\");\n\n break;\n\n case 37: /* Simple Branch */\n tb_clr.setText(\"16\");\n tb_axiom.setText(\"FFF[-FFF][--FFF][FFF][+FFF][++FFF]\");\n tb_ignore.setText(\"F+-\");\n tb_depth.setText(\"1\");\n tb_scale.setText(\"90\");\n tb_angle.setText(\"8\");\n lst_rules.removeAll();\n\n break;\n\n\n\n\n default:\n tb_axiom.setText(\"\");\n tb_ignore.setText(\"\");\n tb_depth.setText(\"\");\n tb_scale.setText(\"\");\n tb_angle.setText(\"\");\n lst_rules.removeAll();\n break;\n\n }\n\n }", "@Test(timeout = 4000)\n public void test238() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component can be added only to a TableBlock.\", \"Col component can be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.dfn();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCYCLE() {\n CuteNetlibCase.doTest(\"CYCLE.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test178() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.acronym();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n public boolean shouldPaint() {\n return false;\n }", "@Test\n public void checkInstructionsLinear() throws InterruptedException\n {\n onView(withId(R.id.instructionsButtonLinear)).perform(ViewActions.click());\n Thread.sleep(500);\n onView(withId(R.id.scrollLinearInstructions)).perform(ViewActions.swipeUp());\n onView(withId(R.id.close_instructions_linear)).perform(ViewActions.click());\n }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(1, 13, 13.0, 706.315725916565, (-2212.473042787062), 1.7976931348623157E308);\n assertEquals(\"id=1 modelOptComp: vol = 13.0 delta = N/A: modelPrice = N/A: pvDividend = N/A\", string0);\n }", "public void paintIcon(Component c, Graphics g, int x, int y)\r\n/* 60: */ {\r\n/* 61:103 */ JCheckBox cb = (JCheckBox)c;\r\n/* 62:104 */ ButtonModel model = cb.getModel();\r\n/* 63:105 */ Graphics2D g2 = (Graphics2D)g;\r\n/* 64:106 */ boolean paintFocus = ((model.isArmed()) && (!model.isPressed())) || ((cb.hasFocus()) && (PlasticXPIconFactory.isBlank(cb.getText())));\r\n/* 65: */ \r\n/* 66: */ \r\n/* 67:109 */ RenderingHints.Key key = RenderingHints.KEY_ANTIALIASING;\r\n/* 68:110 */ Object newAAHint = RenderingHints.VALUE_ANTIALIAS_ON;\r\n/* 69:111 */ Object oldAAHint = g2.getRenderingHint(key);\r\n/* 70:112 */ if (newAAHint != oldAAHint) {\r\n/* 71:113 */ g2.setRenderingHint(key, newAAHint);\r\n/* 72: */ } else {\r\n/* 73:115 */ oldAAHint = null;\r\n/* 74: */ }\r\n/* 75:118 */ drawBorder(g2, model.isEnabled(), x, y, SIZE - 1, SIZE - 1);\r\n/* 76:119 */ drawFill(g2, model.isPressed(), x + 1, y + 1, SIZE - 2, SIZE - 2);\r\n/* 77:120 */ if (paintFocus) {\r\n/* 78:121 */ drawFocus(g2, x + 1, y + 1, SIZE - 3, SIZE - 3);\r\n/* 79: */ }\r\n/* 80:123 */ if (model.isSelected()) {\r\n/* 81:124 */ drawCheck(g2, model.isEnabled(), x + 3, y + 3, SIZE - 7, SIZE - 7);\r\n/* 82: */ }\r\n/* 83:127 */ if (oldAAHint != null) {\r\n/* 84:128 */ g2.setRenderingHint(key, oldAAHint);\r\n/* 85: */ }\r\n/* 86: */ }", "public static boolean OooO00o(@androidx.annotation.NonNull android.content.Context r6, @androidx.annotation.DrawableRes int r7, @androidx.annotation.NonNull android.graphics.drawable.Drawable r8) {\n /*\n android.graphics.PorterDuff$Mode r0 = com.p118pd.sdk.C5994Oooooo0.OooO00o\n int[] r1 = com.p118pd.sdk.C5994Oooooo0.f17302OooO00o\n boolean r1 = OooO00o(r1, r7)\n r2 = 16842801(0x1010031, float:2.3693695E-38)\n r3 = -1\n r4 = 0\n r5 = 1\n if (r1 == 0) goto L_0x0015\n int r2 = androidx.appcompat.C0033R.attr.colorControlNormal\n L_0x0012:\n r7 = -1\n L_0x0013:\n r1 = 1\n goto L_0x0042\n L_0x0015:\n int[] r1 = com.p118pd.sdk.C5994Oooooo0.f17305OooO0OO\n boolean r1 = OooO00o(r1, r7)\n if (r1 == 0) goto L_0x0020\n int r2 = androidx.appcompat.C0033R.attr.colorControlActivated\n goto L_0x0012\n L_0x0020:\n int[] r1 = com.p118pd.sdk.C5994Oooooo0.OooO0Oo\n boolean r1 = OooO00o(r1, r7)\n if (r1 == 0) goto L_0x002b\n android.graphics.PorterDuff$Mode r0 = android.graphics.PorterDuff.Mode.MULTIPLY\n goto L_0x0012\n L_0x002b:\n int r1 = androidx.appcompat.C0033R.C0035drawable.abc_list_divider_mtrl_alpha\n if (r7 != r1) goto L_0x003a\n r2 = 16842800(0x1010030, float:2.3693693E-38)\n r7 = 1109603123(0x42233333, float:40.8)\n int r7 = java.lang.Math.round(r7)\n goto L_0x0013\n L_0x003a:\n int r1 = androidx.appcompat.C0033R.C0035drawable.abc_dialog_material_background\n if (r7 != r1) goto L_0x003f\n goto L_0x0012\n L_0x003f:\n r7 = -1\n r1 = 0\n r2 = 0\n L_0x0042:\n if (r1 == 0) goto L_0x005f\n boolean r1 = com.p118pd.sdk.o0OO00O.m18878OooO00o(r8)\n if (r1 == 0) goto L_0x004e\n android.graphics.drawable.Drawable r8 = r8.mutate()\n L_0x004e:\n int r6 = com.p118pd.sdk.C6948o00000oO.OooO0O0(r6, r2)\n android.graphics.PorterDuffColorFilter r6 = OooO00o(r6, r0)\n r8.setColorFilter(r6)\n if (r7 == r3) goto L_0x005e\n r8.setAlpha(r7)\n L_0x005e:\n return r5\n L_0x005f:\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p118pd.sdk.C5994Oooooo0.OooO00o(android.content.Context, int, android.graphics.drawable.Drawable):boolean\");\n }", "public void setShowingHintText(boolean showingHintText) {\n/* 1370 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void testClickHelp(Tester t) {\n initData();\r\n Cell topLeft = (Cell) this.game2.indexHelp(0, 0);\r\n Cell topRight = (Cell) this.game2.indexHelp(1, 0);\r\n Cell botLeft = (Cell) this.game2.indexHelp(0, 1);\r\n Cell botRight = (Cell) this.game2.indexHelp(1, 1);\r\n\r\n t.checkExpect(topLeft.color, Color.ORANGE);\r\n t.checkExpect(topRight.color, Color.PINK);\r\n t.checkExpect(botLeft.color, Color.CYAN);\r\n t.checkExpect(botRight.color, Color.CYAN);\r\n\r\n\r\n topRight.clickHelp(this.game2, topLeft);\r\n topLeft = (Cell) this.game2.indexHelp(0, 0);\r\n topRight = (Cell) this.game2.indexHelp(1, 0);\r\n botLeft = (Cell) this.game2.indexHelp(0, 1);\r\n botRight = (Cell) this.game2.indexHelp(1, 1);\r\n\r\n t.checkExpect(topLeft.color, Color.PINK);\r\n t.checkExpect(topRight.color, Color.PINK);\r\n t.checkExpect(botLeft.color, Color.CYAN);\r\n t.checkExpect(botRight.color, Color.CYAN);\r\n\r\n t.checkExpect(this.game2.worklist,\r\n new ArrayList<ACell>(Arrays.asList(topLeft)));\r\n\r\n //testing that nothing changes over an end cell\r\n initData();\r\n FloodItWorld game2Copy = new FloodItWorld(1, 100, new Random(20),\r\n 2, 3);\r\n game2Copy.initializeBoard();\r\n t.checkExpect(this.game2, game2Copy);\r\n this.game2.indexHelp(-1, 0).clickHelp(this.game2, topLeft);\r\n t.checkExpect(this.game2, game2Copy);\r\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"null\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.strong();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.placeholder(\"h4\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test148() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"]1\", \"2D_ZO9FaJf0hL((#xC\");\n // Undeclared exception!\n try { \n checkbox0.em();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \" @\", \"@;3{-{.Zr,[&'oI\");\n Checkbox checkbox1 = new Checkbox(checkbox0, \"@;3{-{.Zr,[&'oI\", \"6F\\\"\");\n // Undeclared exception!\n try { \n checkbox1.script();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"RATIO_16_9\", (Content) null, 980.8247F, (-943.0F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, homeTexture0, 0, 980.8247F);\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n HomeEnvironment homeEnvironment2 = homeEnvironment0.clone();\n homeEnvironment2.getPhotoHeight();\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.PHOTO_HEIGHT;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n homeEnvironment1.setSkyTexture(homeTexture0);\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"com.eteks.sweethome3d.model.HomeEnvironment$Property\", propertyChangeListener0);\n homeEnvironment2.removePropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n homeEnvironment1.getVideoFrameRate();\n homeEnvironment1.getSkyTexture();\n homeEnvironment1.setAllLevelsVisible(false);\n homeEnvironment2.getVideoHeight();\n homeEnvironment2.setVideoFrameRate(300);\n assertEquals(300, homeEnvironment2.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test286() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component can be added only to a TableBlock.\", \"Col component can be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.h2();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.LIGHT_COLOR;\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "public void setHintText(CharSequence hintText) {\n/* 1500 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"M\", \"JU_kvUQ\");\n Image image0 = new Image(checkbox0, \"JU_kvUQ\", \"JU_kvUQ\");\n Component component0 = errorPage0.code((Object) image0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test113() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.acronym((Object) \"Col component can e added onlG to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n }\n }", "@Test\n\tpublic void testInfobox() {\t\n\t\tTextArea info = (TextArea) s.lookup(\"#T6_infobox_TextArea\");\n\t\tTextArea compInfo = (TextArea) s.lookup(\"#T6_composite_infobox_TextArea\");\n\t\tTextArea parmInfo = (TextArea) s.lookup(\"#T6_parm_infobox_TextArea\");\n\t\tTextArea pasrmInfo = (TextArea) s.lookup(\"#T6_pasrm_infobox_TextArea\");\n\t\tTextArea ldInfo = (TextArea) s.lookup(\"#T6_ld_infobox_TextArea\");\n\t\tclickOn(\"#Main_compatibility_Button\");\n\t\tmoveTo(\"#T6_more_info_Text\");\n\t\tif (!info.isVisible()||compInfo.isVisible()||parmInfo.isVisible()||pasrmInfo.isVisible()||ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(1);\n\t\t\tassertTrue(false);\n\t\t}\n\t\tmoveTo(\"#T6_composite_Text\");\n\t\tif (info.isVisible()||!compInfo.isVisible()||parmInfo.isVisible()||pasrmInfo.isVisible()||ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(2);\n\t\t\tassertTrue(false);\n\t\t}\n\t\tmoveTo(\"#T6_parm_Text\");\n\t\tif (info.isVisible()||compInfo.isVisible()||!parmInfo.isVisible()||pasrmInfo.isVisible()||ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(3);\n\t\t\tassertTrue(false);\n\t\t\t\n\t\t}\n\t\tmoveTo(\"#T6_pasrm_Text\");\n\t\tif (info.isVisible()||compInfo.isVisible()||parmInfo.isVisible()||!pasrmInfo.isVisible()||ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(5);\n\t\t\tassertTrue(false);\n\t\t}\n\t\tmoveTo(\"#T6_ld_Text\");\n\t\tif (info.isVisible()||compInfo.isVisible()||parmInfo.isVisible()||pasrmInfo.isVisible()||!ldInfo.isVisible()) {\n\t\t\t// if any infobox other than composite infobox is shown fail test case\n\t\t\tSystem.out.println(5);\n\t\t\tassertTrue(false);\n\t\t}\n\t\tmoveTo(\"#T6_generate_Button\");\n\t\t// if any infobox is shown fail test case\n\t\tassertFalse(info.isVisible()||compInfo.isVisible()||parmInfo.isVisible()||pasrmInfo.isVisible()||ldInfo.isVisible());\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test219() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = new Label(errorPage0, errorPage0);\n label0.map(\"org.mvel.conversion.LongCH$1\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"java.nio.StringCharBuffer@0000000004\", \"cannot bind to collection property: \");\n Calendar calendar0 = errorPage0.date();\n // Undeclared exception!\n try { \n checkbox0.pre((Object) calendar0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test282() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"Col component can be added only to a TableBlock.\", \"5]<!^oHS\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"5]<!^oHS\", \"Col component can be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.tt();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor((-733));\n homeEnvironment0.setPhotoHeight(0);\n homeEnvironment0.setVideoFrameRate(0);\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"Content isn't a JAR entry\", propertyChangeListener0);\n PropertyChangeListenerProxy propertyChangeListenerProxy1 = new PropertyChangeListenerProxy(\"Content isn't a JAR entry\", propertyChangeListenerProxy0);\n homeEnvironment0.setPhotoHeight(0);\n assertEquals(0, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n MockDate mockDate0 = new MockDate((-800), (-800), (-707), 75, 43);\n Label label0 = new Label(errorPage0, mockDate0);\n Component component0 = label0.b();\n Submit submit0 = new Submit(component0, \"The list of names must not be null\", \"\\f\");\n Component component1 = label0.strike((Object) submit0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component1._isGeneratedId());\n }", "boolean testOnTickTester(Tester t) {\n return t\n .checkExpect(new NBullets(0).onTickTester(), new NBullets(new MtLoGamePiece(),\n new MtLoGamePiece(), 0, 0, 1, new Random()))\n && t.checkExpect(new NBullets(lob2, los3, 8, 12, 23, new Random(2)).onTickTester(),\n new NBullets(\n new ConsLoGamePiece(\n new Bullet(2, Color.PINK, new MyPosn(250, 292), new MyPosn(0, -8), 1),\n new ConsLoGamePiece(\n new Bullet(4, Color.PINK, new MyPosn(51, 50), new MyPosn(1, 0), 2),\n new ConsLoGamePiece(\n new Bullet(4, Color.PINK, new MyPosn(51, 50), new MyPosn(-1, 0), 2),\n new MtLoGamePiece()))),\n new ConsLoGamePiece(new Ship(10, Color.CYAN, new MyPosn(4, 239), new MyPosn(4, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(496, 248), new MyPosn(-4, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(50, 200), new MyPosn(50, 50)),\n new MtLoGamePiece()))),\n 8, 14, 24, new Random()))\n && t.checkExpect(new NBullets(lob5, los3, 8, 12, 23, new Random(2)).onTickTester(),\n new NBullets(new MtLoGamePiece(),\n new ConsLoGamePiece(new Ship(10, Color.CYAN, new MyPosn(4, 239), new MyPosn(4, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(496, 248), new MyPosn(-4, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(51, 50), new MyPosn(1, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(51, 50), new MyPosn(1, 0)),\n new ConsLoGamePiece(new Ship(10, Color.CYAN, new MyPosn(50, 200),\n new MyPosn(50, 50)), new MtLoGamePiece()))))),\n 8, 12, 24, new Random()));\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"!\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n checkbox0.ins();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n @Tag(\"slow\")\n public void testPILOT_WE() {\n CuteNetlibCase.doTest(\"PILOT-WE.SIF\", \"-2720107.5328449034\", \"20770.464669007524\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n // Undeclared exception!\n try { \n checkbox0.multiSelect(\"fieldset\", stringSelectModel0, \"Col component can be added only to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "@Test(timeout = 4000)\n public void test334() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = new Label(errorPage0, errorPage0);\n Component component0 = errorPage0.legend((Object) label0);\n assertTrue(component0._isGeneratedId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Override\r\n\tint check_sweetness() {\n\t\treturn 10;\r\n\t}" ]
[ "0.6175339", "0.606179", "0.6007941", "0.59482265", "0.58272654", "0.5819824", "0.5744089", "0.57336956", "0.56774527", "0.56376123", "0.5483911", "0.5395942", "0.5388641", "0.5364474", "0.536062", "0.5341629", "0.53000987", "0.5291915", "0.529156", "0.52872795", "0.5246129", "0.52259415", "0.5223986", "0.52218235", "0.52123123", "0.5207372", "0.51997465", "0.5196491", "0.51849496", "0.5135781", "0.5134449", "0.5134165", "0.5125628", "0.51234436", "0.51195836", "0.51103324", "0.5087488", "0.50843215", "0.5074062", "0.5067921", "0.50663924", "0.50659364", "0.5065791", "0.5046813", "0.50414747", "0.5039963", "0.5038665", "0.5034144", "0.50261515", "0.5025461", "0.5021929", "0.5021856", "0.5020964", "0.50160927", "0.5014686", "0.5014362", "0.50077105", "0.5006335", "0.5002516", "0.4999471", "0.49956217", "0.49934122", "0.49877352", "0.4985671", "0.4981314", "0.49762", "0.49747875", "0.49674395", "0.49631944", "0.49621955", "0.49557787", "0.49550924", "0.4954186", "0.49532992", "0.49521968", "0.49496165", "0.49487203", "0.4947599", "0.4945368", "0.4944644", "0.49431926", "0.49430147", "0.4942546", "0.49372828", "0.4935911", "0.49354032", "0.49337968", "0.49323386", "0.49304107", "0.49294943", "0.49291492", "0.4928067", "0.49277842", "0.49276018", "0.49227825", "0.49215475", "0.492038", "0.49156353", "0.49153578", "0.49064082", "0.49056503" ]
0.0
-1
Test case number: 26 / 1 covered goal: Goal 1. wheel.components.Component.strong()Lwheel/components/Component;: rootBranch
@Test public void test026() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Block block0 = (Block)errorPage0.strong(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "String branch();", "@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "boolean isBranchTaken();", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "@Test(timeout = 4000)\n public void test351() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.placeholder(\"&!a0Q!<8UDk+%_*<Z'\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public abstract void bepaalGrootte();", "protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }", "@Test(timeout = 4000)\n public void test170() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"?B(F-\", \"?B(F-\");\n // Undeclared exception!\n try { \n checkbox0.base(\"?B(F-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n ElExpression elExpression0 = new ElExpression(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"button\", \",DH3:A>}/%[r\");\n // Undeclared exception!\n try { \n submit0.renderHint(elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public void test32() {\n //$NON-NLS-1$\n deployBundles(\"test32\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"g+0=\");\n // Undeclared exception!\n try { \n xmlEntityRef0.map(\"y%G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"null\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n checkbox0.strong();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test191() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StandaloneComponent standaloneComponent0 = errorPage0._getTopLevelComponent(true);\n assertEquals(\"wheel_ErrorPage\", standaloneComponent0.getComponentId());\n }", "double getBranchProbability();", "public void test9() {\n //$NON-NLS-1$\n deployBundles(\"test9\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test34() {\n //$NON-NLS-1$\n deployBundles(\"test34\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test271() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"!x\");\n // Undeclared exception!\n try { \n xmlEntityRef0.wrapSelf();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "@Test\n public void buildAgainTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n workerHephaestus.specialPower(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n\n }", "public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"Can't add components to a component that is not an instance of IContainer.\", \"1.3\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"? fOYd~2\", \"kbsv+SXA<!1e,R48\");\n // Undeclared exception!\n try { \n checkbox0.code((Object) \"Can't add components to a component that is not an instance of IContainer.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test56() {\n //$NON-NLS-1$\n deployBundles(\"test56\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testUnstableOnlyStableTrue() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(true).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogNotContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Skipping Cobertura coverage report as build was not SUCCESS or better\", run);\n }", "public static void main(String[] args) {\nint score = 91;\nString grade;\nif (score >90)\n{\n\tgrade = \"A\";\n}\n\n\n\nelse if (score>=80)\n{\n\tgrade = \"B\";\n}\n//THis is to test Git\n//THis is to test Git\n//THis is to test Git2\n//This is to test the brach made by gitdemo\n//Change from GitX\nelse \n{\n\tgrade = \"C\";\n}\nSystem.out.println(grade);\n}", "public void test30() {\n //$NON-NLS-1$\n deployBundles(\"test30\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void test049() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"x_Oj]\", \"x_Oj]\");\n ActionExpression actionExpression0 = checkbox0._getAction();\n }", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test194() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \".*,r%\", \"mARxJH5T\");\n ComponentCreator componentCreator0 = checkbox0.create();\n assertNotNull(componentCreator0);\n }", "public void test16() {\n //$NON-NLS-1$\n deployBundles(\"test16\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.STATIC_TO_NON_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test31() {\n //$NON-NLS-1$\n deployBundles(\"test31\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test42() {\n //$NON-NLS-1$\n deployBundles(\"test42\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENTS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public Branch() { }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"l$m>`KG'f|W8s|}/G\", \"Tfoot component can be added only to a Table.\");\n Object[] objectArray0 = new Object[8];\n // Undeclared exception!\n try { \n checkbox0.message(\"8wl v>H NsaY~+Hd46\", objectArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "@Test\n\tpublic void testAddLinkOkComponent() {\n\t\tSubmenu root = new Submenu(\"root\");\n\t\tAssert.assertNull(root.getParentBean());\n\t\tAssert.assertEquals(\"root\", root.getName());\n\t\tAssert.assertNull(root.getMenuentrys());\n\n\t\tMenuItem item1 = new MenuItem(\"item1\");\n\t\tAssert.assertNull(item1.getParentBean());\n\t\troot.addMenuentry(item1);\n\t\tAssert.assertEquals(1, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, root.getMenuentrys().iterator().next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\n\t\tSubmenu submenu1 = new Submenu(\"submenu1\");\n\t\tAssert.assertNull(submenu1.getParentBean());\n\t\troot.addMenuentry(submenu1);\n\n\t\tIterator<?> iter = root.getMenuentrys().iterator();\n\t\tAssert.assertEquals(2, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, iter.next());\n\t\tAssert.assertSame(submenu1, iter.next());\n\t\tAssert.assertSame(root, item1.getParentBean());\n\t\tAssert.assertSame(root, submenu1.getParentBean());\n\t}", "@Test\n void getMandatoryDeepSuccessors () {\n\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Override\n public void bfs() {\n\n }", "@Test\n public void shouldKeepUpstreamNodeAtALevelLessThanDependent() {\n String dependent = \"P1\";\n ValueStreamMap graph = new ValueStreamMap(dependent, null);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"git_fingerprint\", \"git\", \"git\"), null, dependent, new MaterialRevision(null));\n List<List<Node>> nodesAtEachLevel = graph.presentationModel().getNodesAtEachLevel();\n\n assertThat(nodesAtEachLevel.size(), is(2));\n assertThat(nodesAtEachLevel.get(0).size(), is(1));\n\n Node gitScmNode = nodesAtEachLevel.get(0).get(0);\n assertThat(gitScmNode.getId(), is(\"git_fingerprint\"));\n assertThat(gitScmNode.getName(), is(\"git\"));\n VSMTestHelper.assertThatNodeHasChildren(graph, \"git_fingerprint\", 0, dependent);\n }", "public static void main(String}] args) {\n Node root = new Node(7);\n root.left = new Node(3);\n root.right = new Node(15);\n \n root.left.left = new Node(1);\n root.left.right = new Node(4);\n \n root.right.left = new Node(9);\n root.right.right = new Node(20);\n\n System.out.println(root);\n \n coverToDoublyLL(root);\n \n \n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "private static void bfs(State curr) {\n curr.buildStack(curr.getSuccessors(curr));\r\n \r\n if(curr.isGoalState()) \r\n System.out.println(curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(curr.getOrderedPair());//initial\r\n \r\n curr.close.add(curr);\r\n while(!curr.open.isEmpty()&&!curr.isGoalState()) {\r\n curr.buildStack(curr.getSuccessors(curr));\r\n curr.printHelp(curr, 3);\r\n curr = curr.open.get(0);\r\n curr.close.add(curr.open.remove(0));\r\n }\r\n \r\n if(curr.isGoalState()) {\r\n System.out.println(curr.getOrderedPair() + \" Goal\");\r\n curr.printPath(curr);\r\n }\r\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }", "@Test\n //test if the jumper can move if it's surrounded by the rocks\n public void testBarrierRock() {\n world.add(new Location(FOUR , FOUR), jumper);\n world.add(new Location(TWO, FOUR), new Rock());\n world.add(new Location(SIX, FOUR), new Rock());\n world.add(new Location(FOUR, TWO), new Rock());\n world.add(new Location(FOUR, SIX), new Rock());\n jumper.act();\n assertEquals(new Location(FOUR, FOUR), jumper.getLocation());\n assertEquals(FORTYFIVE, jumper.getDirection());\n }", "public void test57() {\n //$NON-NLS-1$\n deployBundles(\"test57\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_PARAMETER, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(timeout = 4000)\n public void test181() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n hidden0._wrapComponentId(\"(vLoO6y2\\\"Vht&{{\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Override\n public void \n buildPhase()\n throws PipelineException\n {\n pLog.log(LogMgr.Kind.Ops, LogMgr.Level.Fine, \"Checking Out: \" + pSubmitNode);\n frozenStomp(pSubmitNode);\n\n pLog.log(LogMgr.Kind.Ops, LogMgr.Level.Fine, \"Checking Out: \" + pApproveNode);\n pClient.checkOut(getAuthor(), getView(), pApproveNode, null, \n CheckOutMode.KeepModified, CheckOutMethod.PreserveFrozen);\n \n pFinalizeStages = new LinkedList<FinalizableStage>();\n \n String type = TaskType.Lighting.toString();\n \n \n String textureNode = pShotNamer.getLightingTextureNode();\n String textureProduct = pShotNamer.getLightingTextureProductNode();\n NodeID finalTexID = new NodeID(getAuthor(), getView(), textureProduct);\n NodeMod texMod = pClient.getWorkingVersion(getAuthor(), getView(), textureNode);\n NodeMod finalTexMod = pClient.getWorkingVersion(finalTexID);\n \n for (String source : finalTexMod.getSourceNames()) {\n pClient.unlink(finalTexID, source);\n }\n for (LinkMod link : texMod.getSources()) {\n pClient.link(finalTexID, link);\n }\n \n \n String prelgtNode = pShotNamer.getPreLightScene();\n NodeMod preLgtMod = pClient.getWorkingVersion(getAuthor(), getView(), prelgtNode);\n BaseAction preLgtAct = preLgtMod.getAction();\n \n TreeSet<String> lgtModels = new TreeSet<String>();\n for (String source : preLgtMod.getSourceNames()) {\n String sceneType = (String) preLgtAct.getSourceParamValue(source, \"SceneType\");\n if (sceneType != null && sceneType.equals(\"Model\")) {\n lgtModels.add(source);\n }\n }\n \n String lightingScene = pShotNamer.getLightingEditScene();\n String lightingProduct = pShotNamer.getLightingProductScene();\n \n StageInformation stageInfo = getStageInformation();\n stageInfo.setActionOnExistence(ActionOnExistence.Conform);\n {\n String script = pProjectNamer.getLightingProductMEL();\n LightingProductStage stage = \n new LightingProductStage\n (stageInfo, pContext, pClient,\n lightingProduct, lightingScene, script, lgtModels, textureProduct );\n addTaskAnnotation(stage, NodePurpose.Product, pProjectName, pTaskName, type);\n if (stage.build()) \n pFinalizeStages.add(stage);\n }\n\n addToQueueList(pApproveNode);\n addToCheckInList(pApproveNode);\n }", "private void mergeNewBranch(AlertTreeNode branch, int nodeIndex)\n throws AlertException {\n\n AlertNode node = null;\n AlertComponent.AlertProperty prop = null;\n\n if (logger.isLoggable(Level.FINE)) {\n logger.fine(\"merge new branch, node = \" + nodeIndex + \")\");\n }\n\n synchronized(AlertCorrelationEngine.class) {\n\n // Existing 'node' in the tree.\n AlertTreeNode parentNode = root.getChild(nodeIndex);\n AlertNode compNode = (AlertNode) parentNode.getComponent();\n AlertTreeNode lastChild =\n parentNode.getChild(compNode.getNbChildren() - 1);\n\n //\n // Check each service:\n // - if service exists already, update the value\n // and generate alerts\n // - if the service does not exist, create new branch and\n // add new properties\n //\n AlertComponent bCompNode = branch.getComponent();\n if (bCompNode == null) {\n throw(new AlertException(\"new branch from node \" + nodeIndex +\n \" is corrupted, component is null,\" +\n \" skip..\"));\n }\n AlertTreeNode bCurChild = branch.getChild();\n for (int i = 0; i < bCompNode.getNbChildren(); i++) {\n\n if (bCurChild == null) {\n throw(new AlertException(\"new branch from node\" +\n nodeIndex +\n \" is corrupted, child \" + i +\n \" is null, stop processing \" +\n \"branch..\"));\n //deleteNodeProperties(nodeIndex);\n //parentNode.setChild(null);\n }\n\n prop = bCompNode.getPropertyChild(i);\n if (prop == null) {\n throw(new AlertException(\"new branch from node\" +\n nodeIndex + \n \" is corrupted, prop is null,\" +\n \" stop processing branch...\"));\n //deleteNodeProperties(nodeIndex);\n //parentNode.setChild(null);\n }\n\n //\n // Create or update the current service for this node.\n //\n boolean newSvc = mergeNewService(bCurChild, bCompNode,\n compNode, nodeIndex, prop);\n if (newSvc) {\n // Add new service branch to the tree\n if (lastChild == null) {\n parentNode.setChild(bCurChild);\n } else {\n lastChild.setSibling(bCurChild);\n }\n lastChild = bCurChild;\n bCurChild.setParent(parentNode);\n }\n\n\n bCurChild = bCurChild.getSibling();\n }\n }\n }", "public static void selfTest()\n {\n\t\tBoatGrader b = new BoatGrader();\n\t\t \n\t\tSystem.out.println(\"\\n ***Testing Boats with only 2 children***\");\n\t\tbegin(0, 2, b);\n\t\t \n\t\t// System.out.println(\"\\n ***Testing Boats with 2 children, 1 adult***\");\n\t\t// \t begin(1, 2, b);\n\t\t \n\t\t// System.out.println(\"\\n ***Testing Boats with 3 children, 3 adults***\");\n\t\t// begin(3, 3, b);\n }", "public void getBranchCommand() {\n\n }", "@Test\n public void testUnstableOnlyStableFalse() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(false).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Cobertura coverage report found.\", run);\n }", "@Test(timeout = 4000)\n public void test346() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.checkbox((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public void StepComponents(int TestArg){\n\t\t_TEST stack = new _TEST();\t\t/*TEST*/\n\t\tstack.PrintHeader(ID,\"\",\"\");\t/*TEST*/\n\t\t/* Elvileg mar fel van epulve a hierarchia igy nekem eleg megkapnom a ComponentListet */\n\t\tswitch(TestArg){\n\t\tcase 0:\n\t\t\tDigitalObject obj;\n\t\t\tfor(List<iComponent> sublist: ComponentList)\n\t\t\t\tfor(iComponent o : sublist){\n\t\t\t\t\tobj = (DigitalObject) o;\n\t\t\t\t\tSystem.out.println(obj.ID); // DEBUG\n\t\t\t\t\tobj.Step();\n\t\t\t\t}\n\t\t\t/*ComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(0).get(1).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();*/\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tComponentList.get(0).get(0).Step();\n\t\t\tComponentList.get(1).get(0).Step();\n\t\t\tComponentList.get(2).get(0).Step();\n\t\t\tComponentList.get(2).get(1).Step();\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"\",\"\");\t\t/*TEST*/\n\t}", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test(expected = NullPointerException.class)\n public void Test02() {\n component = new DamageEffectComponent(null, 3, 20);\n }", "public UpdateandRemoveBranch() {\n initComponents();\n }", "public void incrementBranchCount() {\n this.branchCount++;\n }", "@Test\n public void buildNotDome() {\n nextWorkerCell.setLevel(1);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n }", "HibBranch getBranch(InternalActionContext ac, HibProject project);", "public RelocateBranch() {\n }", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "public void branchChainTo(Label label) {\n // do nothing by default\n }", "@Test\n public void oncoTreeVersionTest() {\n // TODO: test oncoTreeVersion\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n StandaloneComponent standaloneComponent0 = dynamicSelectModel0.getTopLevelComponent();\n assertNull(standaloneComponent0);\n }", "public void test19() {\n //$NON-NLS-1$\n deployBundles(\"test19\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_TRANSIENT_TO_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testParallelScan() throws Exception {\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"Convoluted\");\n job.setDefinition(new CpsFlowDefinition(\n \"echo 'first'\\n\" +\n \"def steps = [:]\\n\" +\n \"steps['1'] = {\\n\" +\n \" echo 'do 1 stuff'\\n\" +\n \"}\\n\" +\n \"steps['2'] = {\\n\" +\n \" echo '2a'\\n\" +\n \" echo '2b'\\n\" +\n \"}\\n\" +\n \"parallel steps\\n\" +\n \"echo 'final'\",\n true));\n\n /* Flow structure (ID - type)\n 2 - FlowStartNode (BlockStartNode)\n 3 - Echostep\n 4 - ParallelStep (StepStartNode) (start branches)\n 6 - ParallelStep (StepStartNode) (start branch 1), ParallelLabelAction with branchname=1\n 7 - ParallelStep (StepStartNode) (start branch 2), ParallelLabelAction with branchname=2\n 8 - EchoStep, (branch 1) parent=6\n 9 - StepEndNode, (end branch 1) startId=6, parentId=8\n 10 - EchoStep, (branch 2) parentId=7\n 11 - EchoStep, (branch 2) parentId = 10\n 12 - StepEndNode (end branch 2) startId=7 parentId=11,\n 13 - StepEndNode (close branches), parentIds = 9,12, startId=4\n 14 - EchoStep\n 15 - FlowEndNode (BlockEndNode)\n */\n\n WorkflowRun b = r.assertBuildStatusSuccess(job.scheduleBuild2(0));\n FlowExecution exec = b.getExecution();\n Collection<FlowNode> heads = b.getExecution().getCurrentHeads();\n\n AbstractFlowScanner scanner = new LinearScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 9, 8, 6, 4, 3, 2);\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n\n // Depth first scanner and with blacklist\n scanner = new DepthFirstScanner();\n scanner.setup(heads);\n\n // Compatibility test for ordering\n FlowTestUtils.assertNodeOrder(\"FlowGraphWalker\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n FlowTestUtils.assertNodeOrder(\"Depth first\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n scanner.setup(Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\")));\n FlowTestUtils.assertNodeOrder(\"Depth-first scanner from inside parallels\", scanner, 9, 8, 6, 4, 3, 2, 12, 11, 10, 7);\n\n // We're going to test the ForkScanner in more depth since this is its natural use\n scanner = new ForkScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13,\n 12, 11, 10, 7,// One parallel\n 9, 8, 6, // other parallel\n 4, 3, 2); // end bit\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n // Test forkscanner midflow\n scanner.setup(exec.getNode(\"14\"));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 14, 13,\n 12, 11, 10, 7, // Last parallel\n 9, 8, 6, // First parallel\n 4, 3, 2); // end bit\n\n // Test forkscanner inside a parallel\n List<FlowNode> startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 12, 11, 10, 7, 4, 3, 2);\n\n startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"11\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 11, 10, 7, 4, 3, 2);\n\n\n // Filtering at different points within branches\n List<FlowNode> blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"7\"));\n Assert.assertEquals(4, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n Assert.assertEquals(4, scanner.filteredNodes(heads, Collections.singletonList(exec.getNode(\"4\")), FlowTestUtils.MATCH_ECHO_STEP).size());\n blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"10\"));\n Assert.assertEquals(3, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n }", "private static void bellmanfordTest() {\n\t\t\n\t\tgraphs.objectorientedgraph.Graph<Integer> graph = new graphs.objectorientedgraph.Graph<Integer>();\n\t\t\n\t\tfor (int i = 0; i < 6; i++)\n\t\t\tgraph.addVertex(i, i);\n\t\t\n\t\tgraph.addDirectedEdge(0, 1, 0);\n\t\tgraph.addDirectedEdge(0, 2, 0);\n\t\tgraph.addDirectedEdge(0, 3, 0);\n\t\tgraph.addDirectedEdge(0, 4, 0);\n\t\tgraph.addDirectedEdge(0, 5, 0);\n\t\tgraph.addDirectedEdge(5, 1, -1);\n\t\tgraph.addDirectedEdge(5, 2, 1);\n\t\tgraph.addDirectedEdge(1, 4, 4);\n\t\tgraph.addDirectedEdge(1, 3, 5);\n\t\tgraph.addDirectedEdge(2, 1, 0);\n\t\tgraph.addDirectedEdge(3, 5, -3);\n\t\tgraph.addDirectedEdge(3, 4, -1);\n\t\tgraph.addDirectedEdge(4, 5, -3);\n\t\t\n\t\tBellmanFordAlgo<Integer> bellnBellmanFordAlgo = new BellmanFordAlgo(graph ,graph.vertexList.get(0));\n\t\t\n\t\tbellnBellmanFordAlgo.getSingleSourceShortestPath();\n\t\t\n\t\tbellnBellmanFordAlgo.printPath(graph.vertexList.get(3));\n\t\t\n\t}", "public void test55() {\n //$NON-NLS-1$\n deployBundles(\"test55\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n //$NON-NLS-1$\n assertTrue(\"Different from NO_DELTA\", delta == ApiComparator.NO_DELTA);\n }", "@Test\n public void buildDomeTrue() {\n nextWorkerCell.setLevel(3);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(4, nextWorkerCell.getLevel());\n assertTrue(nextWorkerCell.getIsOccupied());\n }", "public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}", "@Override\n\tvoid parseBranch(int index, boolean branched) {\n\t\t\n\t}", "@Test\n public void Test10() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test302() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"D&J!^F2~~&lT'Lakt\");\n // Undeclared exception!\n try { \n xmlEntityRef0.entity(\"D&J!^F2~~&lT'Lakt\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void test642_smartLifting3() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl3Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl3_1 t = new Team642sl3_3();\\n\" +\n\t\t\t \" T642sl3_2 o = new T642sl3_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_4 extends Team642sl3_3 {\\n\" +\n\t\t\t \" public class Role642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_4.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_3 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_1 extends T642sl3_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl3_2 extends Role642sl3_1 playedBy T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl3_3 extends Role642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl3_2 as Role642sl3_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_4 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_2 extends Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl3_4 extends Role642sl3_3 playedBy T642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_5 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_3 extends Team642sl3_2 {\\n\" +\n\t\t\t \" public class Role642sl3_5 extends Role642sl3_3 playedBy T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_3.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_6 extends T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl3_2 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl3_3.Role642sl3_4\");\n }", "@Test\n\tpublic void testBuild() {\n\n\t\tSystem.out.println(\"End\");\n\t}", "protected void checkComponentList()\n {\n String lsLeft ;\n String lsDocComp ;\n int liDotIdx ;\n int liNumComps ;\n Hashtable loCompHash = new Hashtable( 5 ) ;\n\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n lsLeft = getData( \"AND_COND_LHS_\" + liCtr ).getString() ;\n if ( lsLeft != null )\n {\n liDotIdx = lsLeft.indexOf( '.' ) ;\n if ( liDotIdx >= 0 )\n {\n lsDocComp = lsLeft.substring( 0, liDotIdx ) ;\n } /* end if ( liDotIdx >= 0 ) */\n else\n {\n lsDocComp = lsLeft ;\n } /* end else */\n loCompHash.put( lsDocComp, lsDocComp ) ;\n } /* end if ( lsLeft != null ) */\n } /* end for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ ) */\n\n liNumComps = loCompHash.size() ;\n if ( liNumComps > 2 )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( liNumComps > 2 ) */\n else if ( liNumComps == 2 )\n {\n Enumeration leComps = loCompHash.elements() ;\n String lsComp1 = (String)leComps.nextElement() ;\n String lsComp2 = (String)leComps.nextElement() ;\n\n if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) &&\n ( !lsComp2.endsWith( \"_DOC_HDR\" ) ) )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) && . . . */\n } /* end else if ( liNumComps == 2 ) */\n }", "public void test14() {\n //$NON-NLS-1$\n deployBundles(\"test14\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void youCanCreateALoopFromPlatesFromACount() {\n // inputs\n VertexLabel runningTotalLabel = new VertexLabel(\"runningTotal\");\n VertexLabel stillLoopingLabel = new VertexLabel(\"stillLooping\");\n VertexLabel valueInLabel = new VertexLabel(\"valueIn\");\n\n // intermediate\n VertexLabel oneLabel = new VertexLabel(\"one\");\n VertexLabel conditionLabel = new VertexLabel(\"condition\");\n\n // outputs\n VertexLabel plusLabel = new VertexLabel(\"plus\");\n VertexLabel loopLabel = new VertexLabel(\"loop\");\n VertexLabel valueOutLabel = new VertexLabel(\"valueOut\");\n\n // base case\n DoubleVertex initialSum = ConstantVertex.of(0.);\n BooleanVertex tru = ConstantVertex.of(true);\n DoubleVertex initialValue = ConstantVertex.of(0.);\n\n int maximumLoopLength = 100;\n\n Plates plates = new PlateBuilder<Integer>()\n .withInitialState(SimpleVertexDictionary.backedBy(ImmutableMap.of(\n plusLabel, initialSum,\n loopLabel, tru,\n valueOutLabel, initialValue)))\n .withTransitionMapping(ImmutableMap.of(\n runningTotalLabel, plusLabel,\n stillLoopingLabel, loopLabel,\n valueInLabel, valueOutLabel\n ))\n .count(maximumLoopLength)\n .withFactory((plate) -> {\n // inputs\n DoubleVertex runningTotal = new DoubleProxyVertex(runningTotalLabel);\n BooleanVertex stillLooping = new BooleanProxyVertex(stillLoopingLabel);\n DoubleVertex valueIn = new DoubleProxyVertex(valueInLabel);\n plate.addAll(ImmutableSet.of(runningTotal, stillLooping, valueIn));\n\n // intermediate\n DoubleVertex one = ConstantVertex.of(1.);\n BooleanVertex condition = new BernoulliVertex(0.5);\n plate.add(oneLabel, one);\n plate.add(conditionLabel, condition);\n\n // outputs\n DoubleVertex plus = runningTotal.plus(one);\n BooleanVertex loopAgain = stillLooping.and(condition);\n DoubleVertex result = If.isTrue(loopAgain).then(plus).orElse(valueIn);\n plate.add(plusLabel, plus);\n plate.add(loopLabel, loopAgain);\n plate.add(valueOutLabel, result);\n })\n .build();\n\n\n DoubleVertex previousPlus = initialSum;\n BooleanVertex previousLoop = tru;\n DoubleVertex previousValueOut = initialValue;\n\n for (Plate plate : plates) {\n DoubleVertex runningTotal = plate.get(runningTotalLabel);\n BooleanVertex stillLooping = plate.get(stillLoopingLabel);\n DoubleVertex valueIn = plate.get(valueInLabel);\n\n DoubleVertex one = plate.get(oneLabel);\n BooleanVertex condition = plate.get(conditionLabel);\n\n DoubleVertex plus = plate.get(plusLabel);\n BooleanVertex loop = plate.get(loopLabel);\n DoubleVertex valueOut = plate.get(valueOutLabel);\n\n assertThat(runningTotal.getParents(), contains(previousPlus));\n assertThat(stillLooping.getParents(), contains(previousLoop));\n assertThat(valueIn.getParents(), contains(previousValueOut));\n\n assertThat(one.getParents(), is(empty()));\n assertThat(condition, hasParents(contains(allOf(\n hasNoLabel(),\n instanceOf(ConstantDoubleVertex.class)\n ))));\n\n assertThat(plus.getParents(), containsInAnyOrder(runningTotal, one));\n assertThat(loop.getParents(), containsInAnyOrder(condition, stillLooping));\n assertThat(valueOut.getParents(), containsInAnyOrder(loop, valueIn, plus));\n\n previousPlus = plus;\n previousLoop = loop;\n previousValueOut = valueOut;\n }\n\n\n DoubleVertex output = plates.asList().get(maximumLoopLength - 1).get(valueOutLabel);\n\n for (int firstFailure : new int[]{0, 1, 2, 10, 99}) {\n for (Plate plate : plates) {\n BooleanVertex condition = plate.get(conditionLabel);\n condition.setAndCascade(true);\n }\n BooleanVertex condition = plates.asList().get(firstFailure).get(conditionLabel);\n condition.setAndCascade(false);\n Double expectedOutput = new Double(firstFailure);\n assertThat(output, VertexMatchers.hasValue(expectedOutput));\n }\n }", "public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalculation = this.getRectanglesToConsiderForBranchingVarCalculation( );\r\n \r\n //collect 0 direction refcounts into this map\r\n Map<String, Integer> zeroVar_RefCountMap = new HashMap<String, Integer> () ;\r\n //and one diirection refconts into this map\r\n Map<String, Integer> oneVar_RefCountMap = new HashMap<String, Integer> () ;\r\n \r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle =null;\r\n for (Rectangle rect: rectanglesToConsiderForBranchingVarCalculation){\r\n variablesUsedForBranchingInThisRectangle = getVariablesUsedForBranchingInThisRectangle (rect);\r\n if (variablesUsedForBranchingInThisRectangle.size()>ZERO) {\r\n this.updateVariableRefCounts(zeroVar_RefCountMap, oneVar_RefCountMap, variablesUsedForBranchingInThisRectangle) ;\r\n }else {\r\n System.err.print(\"trying to branch a node which should have been marked infeasible\" );\r\n exit(ONE);\r\n }\r\n }\r\n \r\n \r\n //now find the highest refcount var, no matter its direction\r\n int highZeroFreq = zeroVar_RefCountMap.isEmpty()?ZERO:Collections.max( zeroVar_RefCountMap.values());\r\n int highOneFreq = oneVar_RefCountMap.isEmpty()? ZERO: Collections.max(oneVar_RefCountMap.values()) ;\r\n \r\n //we need to find the selected var's refcount on the other side\r\n int selectedVarRefCountOnOtherSide = ZERO;\r\n \r\n int totalRects = getNumberOfRects(this.myInfeasibleRectanglesList) ;\r\n \r\n if (highZeroFreq>highOneFreq) {\r\n result.varName=getHighestFreqVar (zeroVar_RefCountMap,highZeroFreq ) ;\r\n result.coeff=highZeroFreq;\r\n selectedVarRefCountOnOtherSide= oneVar_RefCountMap.get( result.varName)==null? ZERO : oneVar_RefCountMap.get( result.varName);\r\n //this is how many rects will survive on either side\r\n childRectCounts.zeroSideCount = totalRects - selectedVarRefCountOnOtherSide;\r\n childRectCounts.oneSideCount=totalRects -highZeroFreq ;\r\n \r\n } else {\r\n result.varName=getHighestFreqVar (oneVar_RefCountMap,highOneFreq ) ;\r\n result.coeff=highOneFreq;\r\n selectedVarRefCountOnOtherSide= zeroVar_RefCountMap.get( result.varName)==null? ZERO : zeroVar_RefCountMap.get( result.varName);\r\n \r\n childRectCounts.zeroSideCount = totalRects - highOneFreq;\r\n childRectCounts.oneSideCount=totalRects - selectedVarRefCountOnOtherSide;\r\n }\r\n \r\n return result;\r\n }", "public void test17() {\n //$NON-NLS-1$\n deployBundles(\"test17\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_STATIC_TO_STATIC, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public void solution() {\n\t\t\n\t}", "public final void buildNext() {\n branch++;\n }" ]
[ "0.6105938", "0.57696575", "0.55212325", "0.5462074", "0.54527104", "0.545209", "0.5421446", "0.53901017", "0.5383101", "0.5362581", "0.53624755", "0.5353042", "0.52849585", "0.52537054", "0.5252258", "0.51983315", "0.51937103", "0.51767516", "0.51636046", "0.5162716", "0.5155963", "0.5154089", "0.5141703", "0.51400465", "0.5105045", "0.51033324", "0.5100181", "0.5096714", "0.50931257", "0.5081851", "0.5070402", "0.5063666", "0.50627106", "0.50476956", "0.50433457", "0.50415003", "0.5038005", "0.50334734", "0.50292826", "0.50160503", "0.50063944", "0.5003154", "0.5001043", "0.49840596", "0.49810442", "0.49795222", "0.49671483", "0.496342", "0.49589634", "0.49589232", "0.49561813", "0.4954047", "0.49539444", "0.4953835", "0.49536616", "0.4948781", "0.49471235", "0.4945303", "0.49439532", "0.4943932", "0.49437976", "0.4940383", "0.4939858", "0.4935848", "0.49348357", "0.49346745", "0.49342424", "0.49257737", "0.4922524", "0.49220562", "0.4918623", "0.4917491", "0.4915996", "0.49135292", "0.49120316", "0.491119", "0.49067414", "0.4897113", "0.48957145", "0.48943096", "0.48934874", "0.48932695", "0.48883864", "0.4887812", "0.4887703", "0.48799565", "0.4871064", "0.48624602", "0.48617753", "0.48587584", "0.48579484", "0.4851506", "0.48507923", "0.48506007", "0.4850552", "0.48501825", "0.48495018", "0.48419395", "0.48360616", "0.4835616", "0.48315528" ]
0.0
-1
Test case number: 27 / 1 covered goal: Goal 1. wheel.components.Component.passwordInput(Ljava/lang/String;)Lwheel/components/FormElement;: rootBranch
@Test public void test027() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); // Undeclared exception! try { FormElement formElement0 = errorPage0.passwordInput("H6U@J"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Form elements can be created only by compoents that are attached to a form component. // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@When(\"^password$\")\n public void password() throws Throwable {\n \tSystem.out.println(\"input password\");\n \t//Assert.assertEquals(34, 40);\n \t\n \t\n \n }", "@When(\"^user should enter the valid password in the loginpage$\")\n\tpublic void user_should_enter_the_valid_password_in_the_loginpage() throws Throwable {\n\t\tinputValuestoElement(pa.getAp().getPasswordinput(), \"superman@1010\");\n\t\n\t \n\t}", "public void setRegistrationConfirmPassword(String password){\r\n\r\n\t\tString password1 = getValue(password);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Confirm password is entered\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"txtRegistrationContactConfirmPassword\"));\r\n\t\t\tsendKeys(locator_split(\"txtRegistrationContactConfirmPassword\"), password1); \r\n\r\n\r\n\t\t\tSystem.out.println(\"Confirm password is entered\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Create new user link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Confirm password is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRegistrationContactConfirmPassword\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t\tReporter.log(\"Entered Confirm Password in Registration Confirm Password field\");\r\n\t}", "public void setRegistrationPassword(String password){\r\n\t\tString Password = getValue(password);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- check out registration password should be entered\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"txtRegistrationPassword\"));\r\n\t\t\tsendKeys(locator_split(\"txtRegistrationPassword\"), Password); \r\n\t\t\tSystem.out.println(\"Check out registration password is entered\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- check out registration password is entered\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- check out registration password is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRegistrationPassword\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t\tReporter.log(\"Entered Confirm Password in Registration Confirm Password field\");\r\n\t}", "public void Enterloginpassword(String PWD){\r\n\t\tString Password = getValue(PWD);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Password);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Password should be enterd in Login\");\r\n\t\ttry{\r\n\t\t\tsendKeys(locator_split(\"loginpassword\"), Password);\r\n\t\t\tSystem.out.println(\"password is entered\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Password is entered in Login field\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Password is not enterd in Login with WebElement \"+elementProperties.getProperty(\"loginpassword\"));\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"loginpassword\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public void setcheckoutRegistrationPassword(String password){\r\n\t\tString Password = getValue(password);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- check out registration password should be entered\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"checkoutregistrationpassword\"));\r\n\t\t\tsendKeys(locator_split(\"checkoutregistrationpassword\"), Password); \r\n\t\t\tSystem.out.println(\"Check out registration password is entered\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- check out registration password is entered\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- check out registration password is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutregistrationpassword\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t\tReporter.log(\"Entered Confirm Password in Registration Confirm Password field\");\r\n\t}", "@When(\"^The user enters the password$\")\n\tpublic void the_user_enters_the_password() throws Throwable {\n\t\t\n\t lpw.password_textbox();\n\t}", "@Test\n public void _1passwordPasswordTest() {\n // TODO: test _1passwordPassword\n }", "public boolean isPassword() {\n/* 968 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\r\n public static void tc_ClickChange_Password()\t\r\n {\n\t GenericFunctions.launchApplication(\"firefox\");\r\n\t \r\n\t //We get business logic here as we used page factory\r\n\t Admin_ClickChangePassword clk_passwword = PageFactory.initElements(driver, Admin_ClickChangePassword.class);\r\n\t clk_passwword.admin_ClickOnChngPswd();\r\n }", "public void testCorrectPassword() {\n Password p = new Password(\"jesus\".toCharArray());\n assertTrue(p.checkPassword(\"jesus\".toCharArray()));\n }", "@Test\n\t void testPassword() {\n\t\tString expected=passwordEncoder.encode(\"faizan@123\");\n\t\tString actual=user.getPassword();\n\t\tassertNotEquals(expected, actual);\n\t}", "@Test\n public void testPasswordChange()\n {\n// String pass1 = \"Pa$$w0rd\";\n// String pass2 = \"Pa$$w0rd\";\n// boolean success = ownerHelper.changePassword(owner, pass1, pass2);\n// assertTrue(success);\n }", "@Test\r\n\tpublic void testIsValidPasswordSuccessful()\r\n\t{\r\n\t\tassertTrue(PasswordCheckerUtility.isValidPassword(\"#SuperMan1\"));\r\n\t}", "@Test\r\n\tpublic void TC_06_verify_password_Mandatory_Field() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details except password\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", \"\");\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password\r\n\t\t// is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Please enter a value for Password\");\r\n\r\n\t}", "Password getPsw();", "public interface inputPassword {\n public abstract String inputPassword();\n}", "@Test\n public void testPasswordLowerBound()\n {\n String valid = repeatM(8);\n owner.setPassword(valid);\n assertEquals(0, validator.validate(owner).size());\n }", "@Test\n public void AshortPass () {\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //enter correct past password\n onView(withId(R.id.oldPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //enter new short pass\n onView(withId(R.id.newPassword)).perform(typeText(\"pa00\"));\n //close keyboard\n closeSoftKeyboard();\n //renter again the new short pass\n onView(withId(R.id.reNewPassword)).perform(typeText(\"pa00\"));\n //close keyboard\n closeSoftKeyboard();\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.passwordChar))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.passwordChar)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }", "@Test\n public void testInvalidPassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(INVALID_PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }", "@Test\r\n\tpublic void TC_10_verify_Passowrd_Requirements() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with password does not meet system requirements\r\n\t\t\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", \"test\");\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"test\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\terrMsg = Page_Registration.getpswdRqmtErrMsg();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password \r\n\t\t// system requirements\r\n\t\t\r\n\t\tAssert.assertEquals(errMsg, \"Password does not meet the minimum requirements. It must be at least 7 characters in length, contain one number and one letter.\");\r\n\r\n\t}", "public void testvalidatePassword0001()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validatePassword(\"pwd\"));\n\t}", "@Test\r\n public void getPasswordTest()\r\n {\r\n Assert.assertEquals(stub.getPassword(), PASS);\r\n }", "@Test\r\n public void testSetPassword() {\r\n\r\n }", "@Test(priority = 3)\n public void emptyPasswordLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, \"\");\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,emptyPasswordError);\n\n }", "@Test\n public void changePassword() {\n }", "@Step\r\n\tpublic void enterPassword(String password) {\r\n\t\tLOGGER.info(\"Entering password: \"+ password);\r\n\t\tpasswordInput.type(password);\r\n\t}", "public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }", "@Test\r\n\tpublic void TC_09_verify_Passowrd_Does_Not_Match_with_confirm_password() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with both password and confirm password do'nt match\r\n\t\t\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"test12345\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password and confirm\r\n\t\t// password do'nt match is displayed\r\n\t\t\r\n\t\terrMsg = Page_Registration.getpswdErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"The password you entered does not match\");\r\n\r\n\t}", "public boolean verifyPassword(int input){\n return input==password;\n }", "@WebElementLocator(webDesktop = \"//input[@type='password']\",webPhone = \"//input[@type='password']\")\n private static WebElement passwordField() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"passwordField\")));\n }", "@Test\n public void testValidUserNamePassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n UiObject2 welcomeText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"welcome_text_view\")),\n 500 /* wait 500ms */);\n assertThat(welcomeText.getText(), is(equalTo(WELCOME)));\n\n UiObject2 usernameText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_value\")),\n 500 /* wait 500ms */);\n assertThat(usernameText.getText(), is(equalTo(USERNAME_TO_BE_TYPED)));\n\n UiObject2 passwordText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_value\")),\n 500 /* wait 500ms */);\n assertThat(passwordText.getText(), is(equalTo(PASSWORD_TO_BE_TYPED)));\n\n }", "java.lang.String getPass();", "java.lang.String getPass();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "@Test\r\n\tpublic void TC_07_verify_Confirmpassword_Mandatory_Field() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details except confirm password\r\n\t\t\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding confirm password\r\n\t\t// is displayed\r\n\t\t\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Please enter a value for Confirm Password\");\r\n\r\n\t}", "@Test\n\t\tpublic void testhashPassword() {\n\t\t\tString actual = Professor.hashPassword(\"thePassword\");\n\t\t\tString expected = Professor.hashPassword(\"thePassword\");\n\t\t\t\n\t\t\tassertEquals(expected, actual);\n\t\t}", "@Test\n public void testPasswordExists() {\n String userInput = \"Mounta1nM@n\";\n Owner testUser = ownerHelper.validateUser(\"harry.louis\", userInput);\n assertEquals(testUser.getPassword(), owner1.getPassword());\n assertEquals(testUser.getFirstName(), owner1.getFirstName());\n assertEquals(testUser.getLastName(), owner1.getLastName());\n\n }", "@When (\"^Enter email and password$\")\t\t\t\t\t\n public void Enter_email_and_password() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n driver.findElement(By.id(\"identifierId\")).sendKeys(\"halamohamed86757556\");\n driver.findElement(By.xpath(\"//*[@id='identifierNext']/content/span\")).click();\n driver.findElement(By.name(\"password\")).sendKeys(\"halamohamed12345\");\t\t\t\t\n }", "@And(\"^user enters any password$\")\n public void userEntersAnyPassword() throws Throwable {\n }", "public void testIncorrectPassword() {\n Password p = new Password(\"jesus\".toCharArray());\n assertFalse(p.checkPassword(\"buddha\".toCharArray()));\n }", "@Test\n public void testGetPassword() {\n System.out.println(\"getPassword Test (Passing value)\");\n String expResult = \"$2a$10$EblZqNptyYvcLm/VwDCVAuBjzZOI7khzdyGPBr08PpIi0na624b8.\";\n String result = user.getPassword();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test303() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.passwordInput(\"ay_>w\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }", "public void showPasswordPrompt();", "public void testvalidatePassword0003()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validatePassword(\"password test greater than\"));\n\t}", "@Override\r\n\tpublic boolean validatePassword(String arg0, String arg1) {\n\t\treturn false;\r\n\t}", "@Test(priority=1)\n\tpublic void testPasswordValidity() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"[email protected]\");\n\t\tsignup.enterPassword(\"1234567\");\n\t\tsignup.reenterPassword(\"1234567\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\t\n\t\t// is String Present looks for the presence of expected error message from all of errors present on current screen. \n\t\tAssert.assertTrue(TestHelper.isStringPresent(errors, \"Passwords do not match; please enter a password and reenter to confirm.\\nPasswords must contain at least 6 characters and no spaces.\"));\n\t}", "protected void validatePassword(){\n //Only Checking For Word Type Password With Minimum Of 8 Digits, At Least One Capital Letter,At Least One Number,At Least One Special Character\n Boolean password = Pattern.matches(\"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9](?=.*[!@#$%^&*()])).{8,}$\",getPassword());\n System.out.println(passwordResult(password));\n }", "@Test\n public void testLessThanEightCharactersPassword() {\n String password = \"Pass123\";\n\n try {\n User.validatePassword(password);\n } catch (IntelligenceIdentityException e) {\n return;\n }\n\n fail(\"Password is wrong, an exception should be thrown, check implementation of password validation\");\n }", "private String getPassword(){\n System.out.println(\"Enter the Password Minimum Of 8 Charters\");\n return sc.next();\n }", "@Test\n public void testIsValidPassword() {\n System.out.println(\"isValidPassword\");\n String input = \".%6gwdye\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidPassword(input);\n assertEquals(expResult, result);\n }", "@Test\n public void BnotMatchPass () {\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //enter correct past password\n onView(withId(R.id.oldPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //enter new pass\n onView(withId(R.id.newPassword)).perform(typeText(\"serene00\"));\n //close keyboard\n closeSoftKeyboard();\n //enter diff new pass\n onView(withId(R.id.reNewPassword)).perform(typeText(\"passwoord77\"));\n //close keyboard\n closeSoftKeyboard();\n //click the save button\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.passwordMatch))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.passwordMatch)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }", "@Test\n public void testGetPassword() {\n System.out.println(\"getPassword\");\n Funcionario instance = new Funcionario();\n String expResult = \"\";\n String result = instance.getPassword();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testvalidatePassword0002()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertTrue(loginCheckTest.validatePassword(\"passwd\"));\n\t}", "@Test\n public void testGetPassword() {\n System.out.println(\"getPassword\");\n Manager instance = new Manager();\n String expResult = \"\";\n String result = instance.getPassword();\n assertEquals(expResult, result);\n \n fail(\"The test case is a prototype.\");\n }", "@Test\n public void password() {\n String command = PasswordCommand.COMMAND_WORD + \" \" + VALID_PASSWORD;\n assertCommandSuccess(command, VALID_PASSWORD);\n\n /* Case: set password with no leading or trailing password -> password set */\n command = \" \" + PasswordCommand.COMMAND_WORD + \" \" + VALID_PASSWORD + \" \";\n assertCommandSuccess(command, VALID_PASSWORD);\n\n /* Case: two parameters -> password set as the whole string */\n command = \" \" + PasswordCommand.COMMAND_WORD + \" \" + VALID_PASSWORD + \" \" + VALID_PASSWORD;\n assertCommandSuccess(command, VALID_PASSWORD + \" \" + VALID_PASSWORD);\n\n /* Case: undo previous command -> rejected */\n command = UndoCommand.COMMAND_WORD;\n String expectedResultMessage = UndoCommand.MESSAGE_FAILURE;\n assertCommandFailure(command, expectedResultMessage);\n\n /* Case: redo previous command -> rejected */\n command = RedoCommand.COMMAND_WORD;\n expectedResultMessage = RedoCommand.MESSAGE_FAILURE;\n assertCommandFailure(command, expectedResultMessage);\n\n /* ----------------------------------- Perform invalid password operations ---------------------------------- */\n\n /* Case: no parameters -> rejected */\n assertCommandFailure(PasswordCommand.COMMAND_WORD + \" \",\n String.format(MESSAGE_INVALID_COMMAND_FORMAT, INVALID_PASSWORD, MESSAGE_USAGE));\n\n /* Case: mixed case command word -> rejected */\n assertCommandFailure(MIXED_CASE_PASSWORD_COMMAND_WORD + \" \" + VALID_PASSWORD, MESSAGE_UNKNOWN_COMMAND);\n }", "@When(\"^enter any value \\\"([^\\\"]*)\\\" in Pass field$\")\npublic void enter_any_value_in_Pass_field(String arg1) throws Throwable \n{\n\t driver.findElement(By.id(\"password\")).sendKeys(\"Password@5454\");\n}", "void mo33731Pw();", "public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test(enabled = false)\r\n\tpublic void TC_02_Class() {\n\t\tdriver.findElement(By.className(\"validate-password\")).sendKeys(\"Viet0602\");\r\n\t\tsleepInSecond(3);\r\n\t}", "@Test(priority = 1)\n public void incorrectLoginWithPassword() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, incorrectPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,wrongUsernameAndPasswordError);\n }", "@Test\n public void passwordTestTrue () {\n Accounts test = null;\n test.createAccounts();\n test = Accounts.getByPassword(\"bob123\");\n assertNotNull(test);\n }", "@Test(timeout = 4000)\n public void test090() throws Throwable {\n Form form0 = new Form(\"w\");\n // Undeclared exception!\n try { \n form0.passwordInput(\"null\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "@Test\n\tpublic void Authentication_03() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"100\", \"[email protected]\", \"12345\");\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Password length must be 6 or more\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t\t\n\t}", "public void setPassword(String password)\r\n/* 26: */ {\r\n/* 27:42 */ this.password = password;\r\n/* 28: */ }", "String getNewPassword();", "void issueBoardingPass();", "private void passwordRegisterActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public static void signInInvalidPassword() throws InterruptedException {\n // test case 1- sign in to home depot account\n // step one: ****Open Browser and Navigate to URL\n browseSetUp(chromeDriver, chromeDriverPath, url);\n // click on my account web element\n driver.findElement(By.cssSelector(\"#headerMyAccount > div.MyAccount__icon > div > div.HeaderIcon__primary > svg\")).click();\n // step two: enter your credentials\n //valid user name:\n driver.findElement(By.cssSelector(\"#SPSOSignIn > a > span\")).click();\n // step three: enter valid email\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"[email protected]\");\n // valid passoword:\n driver.findElement(By.id(\"password-input-field\")).sendKeys(\"fouad12345@#\");\n // click on sign in\n driver.findElement(By.cssSelector(\"#single-signin__body > div > div.col__12-12.col__8-12--xs.u--paddingNone-top.col__4-12--lg.col__4-12--md.col__6-12--sm > form > button > span\")).click();\n Thread.sleep(3000);\n driver.quit();\n\n\n\n }", "public void LocationAssesment_Location(){\r\n\t\t//String RFSID = getValue(\"RFSName\");\r\n\t//\tString password = getValue(Password);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tdriver.switchTo().defaultContent();\r\n\t\t\t\t\tsleep(3000);\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget2Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocationAssesment\"));\r\n\t\t\t click(locator_split(\"linkclickLocation\"));\r\n\t\t\t // driver.findElement(By.xpath(\"//*[@tabindex='4']/a/span\")).click();\r\n\t\t\t // driver.findElement(By.xpath(\"//a[@title='Click here to open Location Assessment']\")).click();\r\n\t\t\t driver.switchTo().defaultContent();\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget3Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocation\"));\r\n\t\t\t //driver.findElement(By.xpath(\"//li[@tabindex='0']/a/span\")).click();\r\n\t\t\t System.out.println(\"verification\");\r\n\t\t\t sleep(1000);\r\n\t\t\t\t System.out.println(driver.findElement(By.id(\"GRASP_LOCATION_NM\")).getAttribute(\"value\"));\r\nsleep(2000);\r\n\t\t\t \r\n\t\t\t // verifyTextPresent(locator_split(\"txtLocation\"), getValue(\"Locationname\"),\"Location Name\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtLocation\"), getValue(\"Locationname\")) == false){\r\n\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtLocation\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtLocation\")), getValue(\"Locationname\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t // getAndVerifyTextvalue(locator_split(\"txtCity\"), getValue(\"CityName\"),\"city\");\r\n\t\t\t // System.out.println(driver.findElement(By.id(\"GRASP_LOCATION_NM\")).getText());\r\n\t\t\t \r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtCity\"), getValue(\"CityName\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtCity\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtCity\")), getValue(\"CityName\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"ListCountry\"), getValue(\"Country\"),\"Country\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"ListCountry\"), getValue(\"Country\"))==false){\r\n\t\t\t\t \r\n\t\t\t \t//clearWebEdit(locator_split(\"ListCountry\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tselectListValue((locator_split(\"ListCountry\")), getValue(\"Country\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBIvalue\"),getValue(\"BIValue\"),\"BI Value\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBIvalue\"), getValue(\"BIValue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBIvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBIvalue\")), getValue(\"BIValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBIindemnityperiod\"), getValue(\"BIIndemnityperiod\"),\"BI Indemnity period\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBIindemnityperiod\"), getValue(\"BIIndemnityperiod\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBIindemnityperiod\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBIindemnityperiod\")), getValue(\"BIIndemnityperiod\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBuildingValue\"), getValue(\"BuildingValue\"),\"Building\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBuildingValue\"), getValue(\"BuildingValue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBuildingValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBuildingValue\")), getValue(\"BuildingValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtMEvalue\"), getValue(\"MandEvalue\"),\"M+EValue\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtMEvalue\"), getValue(\"MandEvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtMEvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtMEvalue\")), getValue(\"MandEvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtcontentvalue\"), getValue(\"Contentvalue\"),\"Content value\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtcontentvalue\"), getValue(\"Contentvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtcontentvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtcontentvalue\")), getValue(\"Contentvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t //verifyTextPresent(locator_split(\"txtstockinventory\"), getValue(\"Stockvalue\"),\"Stock inventory\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtstockinventory\"), getValue(\"Stockvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtstockinventory\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtstockinventory\")), getValue(\"Stockvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtotherPD\"), getValue(\"OtherPD\"),\"Other PD\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtotherPD\"), getValue(\"OtherPD\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtotherPD\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtotherPD\")), getValue(\"OtherPD\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t //click(locator_split(\"txtLocationnext\"));\r\n\t\t\t\t//clickbylinktext(\"No\");\r\n\t\t\t\r\n\t\t//switchframe(\"PegaGadget2Ifr\");\r\n\t\tsleep(3000);\r\n\t\t//clickbylinktext(\"No\");*/\r\n\t\t\tif(driver.findElement(By.id(\"SectionCompleted\")).isSelected()==true)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Check Box alresy selected\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Check box is not selected\");\r\n\t\t\t\tdriver.findElement(By.id(\"SectionCompleted\")).click();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Report tab is clicked and user is logged in\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Report tab is not clicked in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@When(\"^user enters \\\"([^\\\"]*)\\\" in password field$\")\r\n public void user_enters_in_password_field(String arg1) throws Throwable {\n throw new PendingException();\r\n }", "void onPasswordSuccess();", "@Step\r\n\tpublic void enterConfirmPassword(String password) {\r\n\t\tLOGGER.info(\"Entering confirm password: \" + password);\r\n\t\tpasswordConfirmInput.type(password);\r\n\t}", "@Test\n\t\n\t\tpublic void Login_invalid() \n\t\t\n\t\t{\n\n\t\t\tString un = \"vivek\";\n\t\t\tString pw = \"vivek kumar\";\n\n\t\t\tlogger.info(\"********** Verify that use can able to login with correct username & incorrect password***********\");\n\t\t\t\n\t\t\tWebElement uname = d.findElement(By.id(\"kitchen_user_user_name\"));\n\t\t\tWebElement pwd = d.findElement(By.id(\"kitchen_user_password_digest\"));\n\t\t\t// WebElement Rme = d.findElement(By.name(\"remember\"));\n\t\t\tWebElement submit = d.findElement(By.name(\"commit\"));\n\n\t\t\t\n\t\t\tif (uname.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the User Name field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the User Name field is present \");\n\n\t\t\t}\n\t\t\t\n\n\t\t\tif (uname.equals(d.switchTo().activeElement())) {\n\n\t\t\t\tlogger.info(\"Verify that if the username fields get autofocus\");\n\n\t\t\t\tuname.sendKeys(\"vivek\");\n\t\t\t\t\n\t\t\t\tuname.sendKeys(Keys.TAB);\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the username fields get autofocus\");\n\n\t\t\t}\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tif (pwd.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the Password field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the Password field is present \");\n\n\t\t\t}\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\t\n\n\t\t\tif (pwd.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the Password field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the Password field is present \");\n\n\t\t\t}\n\n\t\t\tif (pwd.equals(d.switchTo().activeElement())) {\n\n\t\t\t\tlogger.info(\"Verify that if the password fields get focused\");\n\n\t\t\t\tpwd.sendKeys(\"vivek kumar\");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the password fields get focused\");\n\t\t\t}\n\n\t\t\t\n\t\t\tif (submit.isEnabled()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsubmit.click();\n\t\t\t\t\n\n\t\t\t\tString url = \"http://192.168.1.73:4000\";\n\t\t\t\t\n\t\t\t\tString curl = d.getCurrentUrl();\n\t\t\t\t\n\t\t\t\tif (d.getCurrentUrl().equals(url)) {\n\t\t\t\t\t\n\t\t\t\t\tlogger.error(\"Verify that if the user can't able to login with correct un & incorrect password\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else {\t\t\t\t\n\n\t\t\t\t\tlogger.info(\"Verify that if the user can't able to login with correct un & incorrect password\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that user can't able to click the submit\");\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t}", "void validatePassword(String usid, String password) throws Exception;", "public void AddAccount(String subtab){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\tclick(locator_split(\"Maintenencetab\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tswitchframe(\"PegaGadget1Ifr\");\r\n\t\t\tsleep(2000);\r\n\t\t\tclick(locator_split(subtab));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccountName\"), getValue(\"Accountname\"));\r\n\t\t\t//selectList(locator_split(\"LstLineofBusiness\"),1);\r\n\t\t\tselectListValue(locator_split(\"LstLineofBusiness\"), \"ENERGY AND ENGINEERED RISK\");\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"lstOccupancyType\"), getValue(\"Occupancytype\"));\r\n\t\t\tsendKeys(locator_split(\"txtlocationselect\"), getValue(\"BusinessAs\"));\r\n\t\t\tsendKeys(locator_split(\"LstaccountunderWriter\"), getValue(\"Underwriter\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"LstunderwriterRegion\"), getValue(\"UnderwriterRegion\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstUnderWriterCountry\"), getValue(\"UnderWriterCountry\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstUnderWriterBranch\"), getValue(\"UnderWriterBranch\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstAccountEngineerId\"), getValue(\"AccountEngineer\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tclearWebEdit(locator_split(\"LstAccountCurrency\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"LstAccountCurrency\"), getValue(\"Accountcurrency\"));\r\n\t\t\t\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtPolicyInceptionDate\"), getValue(\"PolicyInceptiondate\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyExpirationDate\"), getValue(\"PolicyExpirydate\"));\r\n\t\t\tsendKeys(locator_split(\"txtAccountPD\"), getValue(\"AccountPD\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccountBI\"), getValue(\"AccountBI\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccBI\"), getValue(\"AccountBI\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyLimit\"), getValue(\"PolicyLimit\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"txtPolicyNumber\"), getValue(\"PolicyNumber\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyLimit\"), getValue(\"PolicyLimit\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"LstPolicyStatus\"), getValue(\"Policystatus\"));\r\n\t\t\t//click(locator_split(\"txtlocationselect\"));\r\n\t\t\tsleep(2000);\r\n\t\t\t//click(locator_split(\"Lstlocationselect\"));\r\n\t\t\t\r\n\t\t\tclick(locator_split(\"btnAddAccount\"));\r\n\t\t\tsleep(3000);\r\n\t\t//\tclick(locator_split(\"btnAddLocations\"));\r\n\t\t/*\tclearWebEdit(locator_split(\"txtLoginNamegrasp\"));\r\n\t\t\t//sendKeys(locator_split(\"txtLoginNamegrasp\"), username);\r\n\t\t\t//sendKeys(locator_split(\"txtpasswordgrasp\"), password);\r\n\t\t\t\r\n\t\t\tsleep(3000);\r\n\t\t\tclick(locator_split(\"btn_privacyok\"));*/\r\n\t\t\tsleep(5000);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(getText(locator_split(\"txtAccountID\")));\r\n\t\t\tsleep(5000);\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Report tab is clicked and user is logged in\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Report tab is not clicked in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "String getPass();", "public void setPassword(boolean password) {\n/* 983 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private Object String(char[] password) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public String getPassword();", "public String getPassword();", "String password();", "@When(\"^I Enter old password, Nominate and confirm new password$\")\n public void i_Enter_old_password_Nominate_and_confirm_new_password() throws Throwable {\n changepassword.enterPwdDetails(PropertyReader.testDataOf(\"change_password\"),PropertyReader.testDataOf(\"new_Password\"),PropertyReader.testDataOf(\"new_Password\"));\n\n //changepassword.enterPwdDetails(PropertyReader.dynamicReadTestDataOf(\"change_password\"),PropertyReader.dynamicReadTestDataOf(\"new_Password\"),PropertyReader.dynamicReadTestDataOf(\"confirm_new_Password\"));\n\n }", "@Test\n public void CsamePass () {\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //enter correct past password\n onView(withId(R.id.oldPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //enter new pass that same as old\n onView(withId(R.id.newPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //renter again the new pass that same as old\n onView(withId(R.id.reNewPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //click the button\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.passwordSame))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.passwordSame)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }", "@When(\"^user eneter \\\"([^\\\"]*)\\\" in password textbox$\")\r\n public void user_eneter_in_password_textbox(String arg1) throws Throwable {\n throw new PendingException();\r\n }" ]
[ "0.6917608", "0.6825172", "0.6691731", "0.6659425", "0.6570358", "0.6464534", "0.64072555", "0.63661766", "0.6317107", "0.6214044", "0.61754876", "0.61728173", "0.61192507", "0.60841584", "0.6065051", "0.5994083", "0.59789854", "0.59767336", "0.5975662", "0.59579873", "0.59485704", "0.59479755", "0.5939909", "0.5930951", "0.5922009", "0.5917187", "0.59150136", "0.5899521", "0.58891463", "0.5879734", "0.58735865", "0.58453983", "0.5844116", "0.5844116", "0.58437073", "0.58437073", "0.58437073", "0.58437073", "0.58437073", "0.58437073", "0.58437073", "0.58437073", "0.58437073", "0.5839852", "0.58361566", "0.58238703", "0.58209825", "0.58188087", "0.5809627", "0.5805693", "0.57971305", "0.57964647", "0.5791583", "0.57912326", "0.5789206", "0.5782086", "0.5774222", "0.5767332", "0.576616", "0.57600516", "0.5752833", "0.5749941", "0.5741961", "0.57401484", "0.57374346", "0.57373", "0.5737149", "0.57363844", "0.57113355", "0.5707227", "0.5693898", "0.5692416", "0.5692416", "0.5692416", "0.5692416", "0.5692416", "0.5692416", "0.5692416", "0.56853616", "0.5681221", "0.56752396", "0.5674833", "0.5661645", "0.5656231", "0.56508625", "0.56435955", "0.5632808", "0.5627044", "0.5626912", "0.56222063", "0.5620284", "0.5618224", "0.5614716", "0.5612877", "0.5591521", "0.5591521", "0.5589615", "0.55850244", "0.55736834", "0.5569378" ]
0.6238611
9