query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Unify two atoms, resulting in a set of equivalence classes, ECset, which represents a substitution
static ECset unify(DatalogStatement query, Atom queryAtom, Atom constraintAtom) { //If the two atoms don't share the same predicate, they can't be unified if (!queryAtom.predicate.equals(constraintAtom.predicate)) { return null; } //If the two atoms don't share the same numb...
[ "private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }", "public Set union(Set anotherSet);", "void union(Multiset<E> other);", "Set<E> intersect(Set<E> other);", "public EquivalenceSets() {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate that all fields of a Namespace object are valid for the database.
protected void validateNamespace(Namespace namespace) throws WikiException { checkLength(namespace.getDefaultLabel(), 200); }
[ "public static void ensureValidNamespace(String namespace) {\n if (!isValidNamespace(namespace)) {\n throw new IllegalArgumentException(\n String.format(\"Invalid namespace ID: %s. Should only contain alphanumeric \"\n + \"characters or _.\", namespace));\n }\n }", "protected voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the mean |q| in the set containing all measurements with |q| > 0.
public final double getMeanNonZeroModQ() { double sumNZMQ = 0.0; for(int i=0; i<numMeas; i++) { if(!zero(i)) sumNZMQ += getModQ(i); } return sumNZMQ / (numMeas - numZeroMeas); }
[ "double getMeanQuantity() {\n ArrayList<Double> allQuantities = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> quantitiesOfFirm = firm.getQuantities();\n allQuantities.addAll(quantitiesOfFirm.subList(quantitiesOfFirm.size() - SimulationManager.sizeOfExaminationIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The interface Hit notifier.
public interface HitNotifier { /** * Add a hit listener as a listener to hit events.. * * @param hl the hit listener */ void addHitListener(HitListener hl); /** * Remove a hit listener from the list of listeners to hit events.. * * @param hl the hit listener ...
[ "public interface HitNotifier {\r\n\r\n /**\r\n * @param hl a hit listener\r\n * Add hl as a listener to hit events.\r\n */\r\n void addHitListener(HitListener hl);\r\n}", "public interface HitNotifier {\r\n /**\r\n * The method adds the listener from the hit notifier.\r\n *...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method receives type of diet and amount of beef, dairy products and plant products in kg as parameters along with context. Calculates percentage for consumptions compared to finnish average. Sends asynced http get request to ilmastiodieetti FoodCalculator API with parameters. Receives JSON data from API and parses the ...
public void calculateFoodEmissions(String diet, double meatAmount, double dairyAmount, double plantAmount, Context context) { String urlString = "https://ilmastodieetti.ymparisto.fi/ilmastodieetti/calculatorapi/v1/FoodCalculator"; AsyncHttpClient client = new AsyncHttpClient(); RequestParams par...
[ "public void consumptionResults(int clothing, int communications, int electronics, int other, int paper, int recreation, int shoes){\n this.clothing = clothing;\n this.communications = communications;\n this.electronics = electronics;\n this.other = other;\n this.paper = paper;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets dashboard delete enabled.
public void setDashboardDeleteEnabled(final boolean dashboardDeleteEnabled) { this.dashboardDeleteEnabled = dashboardDeleteEnabled; }
[ "public boolean isDashboardDeleteEnabled() {\n return dashboardDeleteEnabled;\n }", "void setDeleteButtonEnabled(boolean isEnabled);", "public void setEnableDelete(java.lang.Boolean _enableDelete)\n {\n enableDelete = _enableDelete;\n }", "public void setPortalDeleteEnabled(final boolean portal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fills Q in the first iteration of the algorithm
private void fillQ() { for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { Cell cell = new Cell(i, j); addToQ(cell, true); } } }
[ "public void generateQ(){\n\t\t\tq = wsum.add(BigInteger.ONE);\n\t}", "public CheckOutQ() {\r\n\t\tq = new LinkedList<Person>();\r\n\t\tmaxQ = 0;\r\n\t}", "public void setQ(int q) {\n this.q = q;\n }", "private static void initAQValues(double AQ0){\n for(int i = 0; i <= edges.length - 1; i++){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the initial menu for algorithm comparison. Checks for an exception where all arrays were not properly initialized for each algorithm class. The user will be notified of this.
private void comparisonMenu() { comparisonMenuOptions(); try { handeComparisonMenuCommands(); } catch (Exception ex) { System.out.println("\nYou must create the array first\n"); } }
[ "public void promptAlg() {\n welcomeTA.setText(\"n = \" + size + \"\\nPlease choose which sorting algorithm you'd like to use on the data\" +\n \"from the dropdown box above.\\n\");\n }", "private void printOptionsMessage() {\n System.out.println(\"\\n\");\n System.out.print...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new WebDAV multistatus element and sets it as the root of the given document. Returns an editor on the new multistatus element. The document must not be null, and must not already have a root element.
public static MultiStatus create(Document document) { Assert.isNotNull(document); Assert.isTrue(document.getOwnerDocument() == null); Element element = create(document, "multistatus"); //$NON-NLS-1$ try { return new MultiStatus(element); } catch (MalformedElementExcep...
[ "public static MultiStatus createFromXml(Element multistatusElement) {\n if (!DomUtil.matches(multistatusElement, XML_MULTISTATUS, NAMESPACE)) {\n throw new IllegalArgumentException(\"DAV:multistatus element expected.\");\n }\n\n MultiStatus multistatus = new MultiStatus();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the parent URL
public void setParent(String parent) { this.parent = parent; }
[ "@Override\n public void setFullUrl(final String url) {\n this.parent.setFullUrl(url);\n }", "public void setParent(String p) { parent = p; }", "void setParent(Resource parent)\n {\n this.parent = new ResourceRef(parent, coral);\n if(parent != null)\n {\n \tparentId =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the value associated with the column: fk_source
public com.neuralquest.server.Cell getSourceFk () { return sourceFk; }
[ "public static Object getSourceAttribute(Object fkAttribute,\n Object srcRelation) {\n String srcColName = Model.getFacade().getTaggedValueValue(fkAttribute,\n GeneratorSql.SOURCE_COLUMN_TAGGED_VALUE);\n Object srcAttr = null;\n if (srcColName.equals(\"\")) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if a token should be removed
private boolean shouldRemove(Token token) { for(int i = 0; i < REMOVE_TOKENS.length; ++i) { if(REMOVE_TOKENS[i].equals(token.getName())) { return true; } } return false; }
[ "void removeToken(String token);", "boolean isTokenValid();", "private static boolean checkToken(String token){\n\t\treturn true;\n\t}", "private boolean isValidToken(String token) {\n\t\treturn token.length() > 1 && !stopwords.contains(token) && !token.matches(SPECIAL_CHARS);\n\t}", "void deleteToken(Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Store a named AppMap that has been successfully opened or found already opened.
protected void registerAppMap(String mapname, ApplicationMap map){ appmaps.put(mapname.toUpperCase(), map); }
[ "public boolean registerAppMap (String mapname, String mapfile) {\n\t\ttry {\n\t\t\tif (isAppMapRegistered(mapname)) return true;\n\t\t\t\n\t\t\tif (openAppMap(mapname, mapfile)) {\n\t\t\t\t// local cache for Application Maps\n\t\t\t\tApplicationMap map = createAppMapInstance(mapname);\n\t\t\t\tmap.setSTAFHelper(ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
decrypt the code according to the secret key. decrypted code is lowercase and punctuationfree except for end ? or . Step 1: remove the special char y2 from positions that are multiples of z used to store new string
void decryptCode() { StringBuilder temp = new StringBuilder(""); // go through entire phrase for (int i = 0; i < this.getText().length(); ++i) { // append char to temp if char at i is not a multiple of z if (!(i % Character.getNumericValue(this.secretKey.charAt(7)) == 0) || i == 0)...
[ "private String decryptSecret(NedWorker worker, String line) {\n Pattern p = Pattern.compile(\"( \\\\$[48]\\\\$[^\\\\s]*)\"); // \" $4$<key>\" || \" $8<key>\"\n Matcher m = p.matcher(line);\n while (m.find()) {\n String password = line.substring(m.start() + 1, m.end());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the hooks. Should only be used in tests.
@SuppressWarnings("PMD.DefaultPackage") // package-private for tests static void reset() { runningHooks = false; }
[ "@SuppressWarnings(\"PMD.DefaultPackage\") // package-private for tests\n static void removeAllHooks() {\n if (runningHooks) {\n return;\n }\n hooks.clear();\n }", "public static void reset() {\n preCallInterceptorCalls.set(0);\n postCallInterceptorCalls.set(0);\n }", "protected...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends a push through TCP. Returns true if we have a valid push route, or if a push proxy gave us a succesful sending notice.
private boolean sendPushTCP(final RemoteFileDesc file, final byte[] guid) { // if this is a FW to FW transfer, we must consider special stuff final boolean shouldDoFWTransfer = file.supportsFWTransfer() && UDPService.instance().canDoFWT() && !RouterServic...
[ "private boolean sendPushUDP(RemoteFileDesc file, byte[] guid) {\n PushRequest pr = \n new PushRequest(guid,\n (byte)2,\n file.getClientGUID(),\n file.getIndex(),\n Route...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes a new item with given ID and price.
Item(long ID, DukatAmount price){ this(ID, new Weight(5), price); }
[ "public Item(int price) {\n\t\tif (price < 1) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot set zero or negative price.\");\n\t\t} else {\n\t\t\tthis.price = price;\n\t\t}\n\t}", "Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}", "Item(long ID, Weight weight, DukatAmount price){\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new cache exception.
public CacheException(String message){ super(message); }
[ "public CacheException() {\r\n\t\tsuper();\r\n\t}", "public CacheException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}", "public static CacheException launderException(org.infinispan.commons.CacheException e) {\n if (e.getCause() instanceof CacheException) {\n return (CacheException) e.getCause(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find an include included in this file (nonrecursive)
public IAstPreprocessorIncludeDirective findInclude(String string);
[ "public IAstSourceFile findIncludeFile(String string);", "public IAstSourceFile findIncludeFile(ISourceFile file);", "public IAstPreprocessorIncludeDirective findInclude(ISourceFile file);", "public static VirtualFile getIncludedFile(Project project, VirtualFile referencing, String name) {\n File file ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a bean wrapper around an existing bean instance. Will try to use a cached BeanWrapperContext to save introspection time.
@Override public JuffrouBeanWrapper getBeanWrapper(Object instance) { return new JuffrouBeanWrapper(getBeanWrapperContext( instance.getClass(), null), instance); }
[ "public static BeanWrapper createWrapper(Object bean) {\r\n BeanWrapper wrapper;\r\n wrapper = PropertyAccessorFactory.forBeanPropertyAccess(bean);\r\n try {\r\n ConversionService conversionService = getConversionsService();\r\n if (conversionService!=null) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this checks wall collision for the drone, if the drone is hitting the wall then the angle becomes the opposite of the previous angle.
public void checkDrone(MyCanvas mc) { if (mX < mRadius || mX > mc.getXCanvasSize() - mRadius) mAngle = 180 - mAngle; // if the position is less than the radius of the drone or if drone hits a wall // if drone hit (tried to go through) left or right walls, set mirror angle, being 180-angle ...
[ "private int checkCollisionSide(Ball ball, Wall wall) {\n \n boolean rightSide = (ball.getHorizontalSpeed()<0);\n boolean topSide = (ball.getVerticalSpeed()>0);\n double slope = Math.abs((ball.getY()-wall.getY())/(ball.getX()-wall.getX()));\n if(slope<1){\n return right...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create Signature method is defined by algorithm value
public SignatureMethod createSignatureMethod(String algorithm, List<Content> contents) { SignatureMethod signatureMethod = new SignatureMethod(); signatureMethod.setAlgorithm(algorithm); signatureMethod.getContent().addAll(contents); return signatureMethod; }
[ "public SignatureMethod createSignatureMethod(String algorithm,\n\t\t\tList<Content> contents);", "protected void createGetSignatureMethod() {\n MethodVisitor cv = m_cw.visitMethod(\n ACC_PUBLIC,\n GET_SIGNATURE_METHOD_NAME,\n GET_SIGNATURE_METHOD_SIGNATURE,\n null,\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
invoked to enable/disable cancel button
public void setCancelEnabled(boolean isEnabled);
[ "protected abstract boolean isCancelEnabled();", "protected void setCancelButton(boolean flag){\r\n if (m_cancelBut != null)\r\n m_cancelBut.setEnabled(flag);\r\n }", "protected void disableButton()\r\n\t\t{\r\n\t\tthis.launch.setEnabled(false);\r\n\t\tthis.cancel.setEnabled(false);\r\n\t\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get content policy mapping that was stored for the given resource type.
public static @Nullable ContentPolicyMapping getContentPolicyMapping(@NotNull String resourceType, @NotNull ResourceResolver resourceResolver) { String relativeResourceType = makeResourceTypeRelative(resourceType); String policyMappingPath = buildPolicyMappingPath(relativeResourceType); Resource resou...
[ "public TemplateTypeMapping getTemplateTypeMapping(TemplateType type);", "public PolicyMap getPolicyMap();", "public Map<String, ?> getTypeMap(DataEntryType type){\n\t\tif(this.loadedTypes.containsKey(type)){\n\t\t\tDataSet<?> ds = this.loadedTypes.get(type);\n\t\t\tif(ds!=null){\n\t\t\t\treturn ds.getMap();\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method should be used to get all messages from a specific circle. Call the corresponding method of Respository interface.
public List<Message> getMessagesFromCircle(String circleName,int pageNumber) { try { if(circleRepository.getOne(circleName)!=null) { return messageRepository.getMessagesFromCircle(circleName).subList((pageNumber-1)*10,((pageNumber-1)*10)+10); }else { return null; } }catch (Exception e) {...
[ "@RequestMapping(value = \"/groupMessages\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\r\n public ResponseEntity<Iterable<Messages>> getGroupMessages(@RequestParam(value = \"latitudefornotice\") String latitudefornotice,\r\n @RequestParam(value = \"longitudefornotice\") ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the captureService value for this CameraStructBase.
public java.lang.String getCaptureService() { return captureService; }
[ "public void setCaptureService(java.lang.String captureService) {\n this.captureService = captureService;\n }", "public Camera getCamera() {\n return getValue(PROP_CAMERA);\n }", "public CameraInstance getCameraInstance() {\n return cameraInstance;\n }", "public BaseVideoCapturer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method which convert celsius to kalvin and return value in Main class
public double getKalvin() { kalvin = (celsius + 273.15); return kalvin; }
[ "@Override\n public double toKelvin(double celsius) {\n return celsius + ConstantsForEquations.CONSTANT_3;\n }", "@Test\n\tpublic void testConvertCelsiusToKelvin() {\n\t\tassertEquals(273.15, Temperature.convertCelsiusToKelvin(0),0);\n\t}", "@Test\n\tpublic void testConvertKelvintoCelsius() {\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new NamespaceIamRoleAuthorizationEntity from the given parameters.
private NamespaceIamRoleAuthorizationEntity createNamespaceIamRoleAuthorizationEntity(NamespaceEntity namespaceEntity, IamRole iamRole) { NamespaceIamRoleAuthorizationEntity namespaceIamRoleAuthorizationEntity = new NamespaceIamRoleAuthorizationEntity(); namespaceIamRoleAuthorizationEntity.setNamesp...
[ "ISModifyProvidedRole createISModifyProvidedRole();", "Role createRole();", "ExistingRole createExistingRole();", "@NotNull public static OrganizationRole.Builder organizationRole() { return new OrganizationRole.Builder(new HashMap<String,Object>()); }", "ResourceRole createResourceRole();", "public RoleE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attach the shape to the body
public IShape attachToBody(IBody body, Vec2 position, float density) { if(this.shape != null) { throw new RuntimeException("Shape already attached"); } if(position == null) position = new Vec2(0, 0); shapePosition = position; this.body = body; shape = body.createBox( rect.getHalfWidth...
[ "public void attachToBody(Body body, float dx, float dy);", "void addShape(Shape shape);", "public void attachToBody(Body body, float offsetX, float offSetY, float degrees);", "private void makeBody()\n {\n ellipse.setFrame(getDrawPosition().x + WHITE_EDGE_WIDTH, getDrawPosition().y + WHITE_EDGE_WID...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Close'.
Close createClose();
[ "public java.lang.String getClose() {\n return close;\n }", "public Integer getClose() {\n return close;\n }", "private JButton getCloseButton() {\n\t\tif (closeButton == null) {\n\t\t\tcloseButton = new JButton();\n\t\t\tcloseButton.setText(\"close\");\n\t\t\tcloseButton.setBorder(javax.swi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the wind gusts speed.
public final void setWindGusts(float gustsSpeed){ this.gustsSpeed = gustsSpeed; }
[ "public void setWindSpeed(int s) {\n sky.testWindSpeed = s;\n }", "public void setWindSpeed(int windSpeed){\n this.windSpeed=windSpeed;\n }", "public final void setWindSpeed(float speed){\r\n this.windSpeed = speed;\r\n }", "public void setSpeed(double speed);", "void setSpeed(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the phones whose childSKUs have the model number passed in parameter
public List<RepositoryItem> getPhonesForModelNumber(String modelNumber) { List<RepositoryItem> phoneProducts = new ArrayList<RepositoryItem>(); RepositoryView catalogRepoView; try { catalogRepoView = getCatalogRepository().getView(CricketCommonConstants.PHONE_SKU); Object[] objects = new Object[1]; ob...
[ "List<MobilePhone> getMobilePhonesFromOwner(Owner owner);", "public void testgetMobileNumberDetailsByBoothId()\r\n\t{\n\t\tSet<String> list = mobileNumbersDAO.getIvrMobilenosBasedOnPriority(1l,1l,20,IConstants.PANCHAYAT);\r\n\t\t\r\n\t\tSystem.out.println(list.size());\r\n\t}", "List<PhoneDirty> findLike(String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function loads all the info from the file number/country_specfic_codes_world.csv and stores the information in a hashmap indexed by country code specificWorldFlagMap contains information about the country used provider and has the name of a flag to display for that country
private static void loadSpecificFlagMap(){ Debug.info("Loading the country code -> flag map"); specificWorldFlagMap = new HashMap<String, String>(2200); BufferedReader br = null; FileInputStream fi = null; try{ fi = new FileInputStream(JFritzUtils.getFullPath(JFritzUtils.FILESEP + "number") +JFritzUtils...
[ "public static void loadFlagMap(){\n\t\tDebug.info(\"Loading the country code -> flag map\");\n\t\tworldFlagMap = new HashMap<String, String>(2200);\n\t\tBufferedReader br = null;\n\t\tFileInputStream fi = null;\n\t\t\n\t\ttry{\n\t\t\tfi = new FileInputStream(JFritzUtils.getFullPath(JFritzUtils.FILESEP + \"number\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if var2Path is null this generates a trivial query for the current output var and current path
public List<LineageSQLQuery> lineageQueryGen(String wfInstanceID, String proc, Map<Var, String> var2Path, Var outputVar, String path, boolean returnOutputs) { // setup StringBuffer effectivePath = new StringBuffer(); List<LineageSQLQuery> newQueries = new ArrayList<LineageSQLQuery>(); // use the calcula...
[ "public String forSql(){\r\n StringBuilder buffer = new StringBuilder(1);\r\n char c;\r\n for (int i = 0; i < path.length(); i++){\r\n c = path.charAt(i);\r\n if (c == '\\\\'){\r\n buffer.append(\"\\\\\");\r\n buffer.append(\"\\\\\");\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Call a BlueAlliance URL and a key and it will give you the parsed JSON back
public static String getBlueAllianceData(final String key, final String url) { String keyedJson = ""; try { JSONObject issueObj = new JSONObject(readUrl(url)); keyedJson = issueObj.getString(key); } catch (Exception e) { e.printStackTrace(); } ...
[ "private String callAPI(String url) throws MalformedURLException, IOException {\n\n\t URL uurl = new URL(url);\n\t HttpURLConnection conn = (HttpURLConnection) uurl.openConnection();\n\t conn.setRequestMethod(\"GET\");\n\t BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field1036' field has been set
public boolean hasField1036() { return fieldSetFlags()[1036]; }
[ "public boolean hasField36() {\n return fieldSetFlags()[36];\n }", "public boolean hasField1034() {\n return fieldSetFlags()[1034];\n }", "public boolean hasField1037() {\n return fieldSetFlags()[1037];\n }", "public boolean hasField1040() {\n return fieldSetFlags()[1040];\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check that get set menu item by id is correct
@Test public void testSetMenuFactoryGetSetMenuItem() { SetMenu setMenuController = setMenuFactory.getSetMenu(); Menu menuController = menuFactory.getMenu(); menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION); ArrayList<MenuItem> menuItems = new ArrayList<>...
[ "public MenuItem findItem(int id);", "UmsMenu getItem(Long id);", "MenuItem findMenuItem(Integer menuItemId) throws BusinessException;", "public MenuItem findMenuItemById(Long menuItemId);", "@Override\n public void editMenuItem(int id, MenuItem item) {\n notNull(item);\n assert (id>=0) && ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
booked() The mediator scans for first available hotel and books it. This is not simply a facade because the scanning is new functionality that mediator adds.
public boolean book(Traveler traveler, int numRooms) { if (hotels == null) return false; boolean booked = false; for (Hotel hotel : hotels) { if (hotel.isAvailable(numRooms)) booked = hotel.bookRooms(traveler, numRooms); if (booked) break; } ...
[ "public List<Booking> getBookings(String hotelName);", "public boolean isBooked() { return isBooked; }", "public void setBooked(boolean booked) {\n this.booked = booked;\n }", "public void findBook(){\n this.hagglingBook = true;\n }", "public ArrayList<Bookings> bookingsForAssignedHotel(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new PlayerPoints.
public PlayerPoints(Player owner) { this.owner = owner; }
[ "Points createPoints();", "public SpawnPoints() {\r\n this.spawnPoints = new ArrayList<>();\r\n createList();\r\n }", "public void createPlayer(){\n\t\tfor(int i=0;i<_numberOfPlayers;i++){\n\t\t\t\t//Create new players and add them into ArrayList.\n\t\t\t_playerList.add(new Player());\n\t\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field27' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField27(java.lang.CharSequence value) { validate(fields()[27], value); this.field27 = value; fieldSetFlags()[27] = true; return this; }
[ "public void setField27(java.lang.CharSequence value) {\n this.field27 = value;\n }", "public void setField271(java.lang.CharSequence value) {\n this.field271 = value;\n }", "public void setField29(java.lang.CharSequence value) {\n this.field29 = value;\n }", "public void setField1027(java.lang.Ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes key name for package dependencies of a package for a commit to output YAML file
private void writePackageDependenciesKey() { writeSpacesCorrespondingToNestedLevel(PKG_INFO_NEST_LEVEL); writer.println("packageDependencies:"); }
[ "public void writeCommitDataToYAMLFile(CommitAnalyzerInfo commitMetaData, ArrayList<PackageInfo> packagesInfo,\n HashMap<String, Integer> classesChangedWithLOCchanges,\n ArrayList<String> classesRemoved,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new http11 response.
public Http11Response() { super(); setVersion("HTTP/1.1"); addHeader("Server", "Shreejit's server/1.2"); addHeader("Connection", "Close"); TimeZone timeZone = TimeZone.getTimeZone("GMT"); Calendar cal = Calendar.getInstance(timeZone); addHeader("Date", Parser.formatDate(cal.getTime())); }
[ "protected abstract TResponse createResponseInstance();", "public BasicResponse() {\n }", "private XCapHttpResponse createResponse(HttpResponse response)\n throws IOException\n {\n XCapHttpResponse xcapHttpResponse = new XCapHttpResponse();\n int statusCode = response.getStatusLin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the Service Provider validation regex.
public static String getSPValidatorRegex() { String spValidatorRegex = IdentityUtil.getProperty(SERVICE_PROVIDERS_NAME_REGEX); if (StringUtils.isBlank(spValidatorRegex)) { spValidatorRegex = APP_NAME_VALIDATING_REGEX; } return spValidatorRegex; }
[ "public String getFeatureValidationRegex() {\n\t\treturn featureValidationRegex;\n\t}", "public static String getSPValidatorJavascriptRegex() {\n\n String spValidatorJavascriptRegex = IdentityUtil.getProperty(SERVICE_PROVIDERS_NAME_JAVASCRIPT_REGEX);\n if (StringUtils.isBlank(spValidatorJavascriptRe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of move method, of class Snake, when the direction is right.
@Test public void testMoveWithRightDirection() { //given snake.setDirection(Directions.RIGHT); //when snake.move(); //then assertEquals("Snake's head x-position should be 120.", 120, snake.getSnakeBody().get(0).getPosition().x); assertEquals("Snake's ...
[ "@Test\r\n public void testMoveWithDownDirection() {\r\n //given \r\n snake.setDirection(Directions.DOWN);\r\n //when\r\n snake.move();\r\n //then\r\n assertEquals(\"Snake's head x-position should be 100.\", 100, snake.getSnakeBody().get(0).getPosition().x);\r\n a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Save ticks into file
public byte[] saveTicks() throws IOException { DirectByteArrayOutputStream buffer = new DirectByteArrayOutputStream(); PrintStream out = new PrintStream(buffer); for (Tick tick : mTicks) { Map<String, String> properties = tick.save(); Str...
[ "public void save() \n throws IOException \n {\n File tickDir = new File(TextUtil.expand(TICKS_DIR));\n\n File tickFile = getTickFile(mExport);\n if (!mTicks.isEmpty() \n || (tickFile.exists() && !tickFile.getParentFile().equals(tickDir))) \n {\n tickFile....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Endpoint to append the path and parameters.
protected abstract String getBaseEndpointPath();
[ "public abstract String getRequestPath();", "String getEndpointUri();", "public void appendPathComponents(String... queryComponents) {\n if (queryComponents != null) {\n // Join all the query components together and append it to the existing query\n appendPathComponent(StringUtils.j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
replace XML tags '' to (gt)
public static String maskXML(String text) { String result = text; result = result.replaceAll("<", "(lt)"); result = result.replaceAll(">", "(gt)"); return result; }
[ "private String renderXmlEntities(String original) {\r\n\t\toriginal = original.replace(\"&amp;\", \"&\");\r\n\t\toriginal = original.replace(\"&quot;\", \"\\\"\");\r\n\t\toriginal = original.replace(\"&apos;\", \"'\");\r\n\t\toriginal = original.replace(\"&lt;\", \"<\");\r\n\t\toriginal = original.replace(\"&rt;\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Given the attributes of a specific note, the method modify its attributes in the database and return a message in a JSON Format that reports the operation result.
public String modifyNote( int idNote, String description){ this.con = db.connect(); String responseJson = "[{\"err_code\":\"{ERR_CODE}\",\"msg\":\"{MSG}\"}]"; String modify_query = "update workspace_notes set description = '{DESCRIPTION}' where id_note = '{ID_NOTE}'"; modify_query = m...
[ "OperationOutcome updateOrCreateCustomerNote(final Long id, final Note note);", "@RequestMapping(\"/agent/enrollment/note\")\n @ResponseBody\n public StatusDTO saveNote(@RequestParam(\"id\") long ticketId, @RequestParam(\"note\") String note) {\n String signature = \"EnrollmentController#saveNote(lon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AdditionStatement__Group__2__Impl" $ANTLR start "rule__AdditionStatement__Group__3" InternalArithmetic.g:546:1: rule__AdditionStatement__Group__3 : rule__AdditionStatement__Group__3__Impl rule__AdditionStatement__Group__4 ;
public final void rule__AdditionStatement__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalArithmetic.g:550:1: ( rule__AdditionStatement__Group__3__Impl rule__AdditionStatement__Group__4 ) // InternalArithmetic.g:551:2: rule...
[ "public final void rule__AdditionStatement__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalArithmetic.g:523:1: ( rule__AdditionStatement__Group__2__Impl rule__AdditionStatement__Group__3 )\n // InternalArithmetic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets need buyer address and phone.
public void setNeedBuyerAddressAndPhone(Boolean needBuyerAddressAndPhone) { this.needBuyerAddressAndPhone = needBuyerAddressAndPhone; }
[ "public void setBuyer(String buyer) {\n this.buyer = buyer;\n }", "public void setBuyer(User buyer) {\r\n\t\tuser = buyer;\r\n\t}", "public Boolean getNeedBuyerAddressAndPhone() {\n return needBuyerAddressAndPhone;\n }", "public void setBuyerContactPhone(String buyerContactPhone) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property listParametersForRequest
public Map<String, List<String>> getListParametersForRequest(){ return this.listParametersForRequest; }
[ "public ArrayList<String> getRequestParameters() { return this.requestParameters; }", "java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList();", "java.util.List<com.google.cloud.commerce.consumer.procurement.v1.Parameter> getParametersList();", "public List<ParameterOb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if has "SqlMapping" element
boolean isSetSqlMapping();
[ "@XmlElement\n public boolean isHasMapping() {\n return hasMapping;\n }", "boolean hasNameMappingList();", "final boolean isMappingClassNamePresent()\r\n {\r\n return this.mappingClassName != null && this.mappingClassName.trim().length() > 0;\r\n }", "final boolean hasMappingProperti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Perform the test for the given matrix column (A21) and row (B18).
public void testA21_B18() { test_id = getTestId("A21", "B18", "155"); NonRootModelElement src = selectA("A21"); NonRootModelElement dest = selectB("B18"); A_B_Action(src, dest); assertTrue("Paste was allowed but was not successful", checkResult_pasteSuccessful(src,dest)); ...
[ "public abstract boolean test(Matrix A);", "@Test\r\n public void testRows() {\r\n int expResult=3;\r\n int result=matrixA.rows();\r\n assertEquals(expResult, result);\r\n }", "protected boolean checkRow( int row, int num )\n {\n System.out.println(java.time.LocalTime.now() + ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the single_issue_id value for this Order_item_select_responseOrder_item.
public void setSingle_issue_id(int single_issue_id) { this.single_issue_id = single_issue_id; }
[ "public int getSingle_issue_id() {\n return single_issue_id;\n }", "public void setItemIssue (java.lang.String itemIssue) {\n\t\tthis.itemIssue = itemIssue;\n\t}", "public void setIssue_id(int issue_id) {\n this.issue_id = issue_id;\n }", "public void setIssue(Integer issue) {\n thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the pivot for body A
public float[] getPivotInA() { return Native3DPoint2PointConstraint.getPivotInA(getNative()); }
[ "Point getElementPivotPoint();", "Vec pivotTransform(Vec pivot) {\n return pivotTransform(pivot, a, X0, alpha, 0.);\n }", "public static int PickPivot(int[] A){\r\n\t\t\r\n\t\t// Initialize a Pivot, a left index and right index\r\n\t\tint pivot;\r\n\t\tint left = 0;\r\n\t\tint right = A.length -1;\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the value at "index" in the array get() method tailored to Concert Population context
int getConcertPopulation(int index) { return array[index]; }
[ "public int get(int index){\n\t\treturn data[index];\n\t}", "public Object getValue(int index);", "public Object get(int index) {\n\tif(index > arr.length) return null;\n\treturn arr[index];\n}", "T get (AT array, int index);", "public Object get(int index) {\n\t\tif(index <= arr.length-1) return arr[index]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public setter for type of item.
public void setType(ItemType type) { this.type = type; }
[ "public void setItemType(Type type) {\n \t\tmType = type;\n \t}", "public void setItem_type(String item_type);", "public void setType(Type itemType) {\r\n this.itemType = itemType;\r\n itemId = itemType.getId();\r\n }", "@Override\n\tpublic void setItemType(String type) {\n\t\titemType = type...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo que se encarga de buscar un listado de VacacionParametro vigentes por nombre
public List<VacacionParametro> buscarPorNombreDuplicados(final String nombre) throws DaoException { try { return buscarPorConsultaNombrada(VacacionParametro.BUSCAR_POR_NOMBRE, nombre); } catch (DaoException ex) { Logger.getLogger(VacacionParametroDao.class.getName()).log(Level.SE...
[ "public List<VacacionParametro> buscarVigente() throws DaoException {\n try {\n return buscarPorConsultaNombrada(VacacionParametro.BUSCAR_VIGENTES);\n } catch (DaoException ex) {\n Logger.getLogger(VacacionParametroDao.class.getName()).log(Level.SEVERE, null, ex);\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function calculates a densest region on the board. The board is virtually split into 4 equal quadrants and the towers in each is summed. The region with the most towers is said to be the densest. Legend: 1 = Top Left 2 = Top Right 3 = Bottom Left 4 = Bottom Right
private int detectDensestRegion() { int region = -1; int max = -1; int[] temp = new int[4]; // Calculate the density of region 1 for(int i = 0; i < (testingBoard.BOARDSIZE/2); i++){ for(int j = 0; j < (testingBoard.BOARDSIZE/2); j++){ if(testingBoard.getTower(i, j) != null) temp[0]++; ...
[ "private void reduceByAreaAndDist(int row, int col)\n {\n int northBuilding = findBuildingWithMinDist(mappedNorth[row][col], row, col);\n// System.out.println(row + \" \" + col + \" \" + northBuilding);\n int southBuilding = findBuildingWithMinDist(mappedSouth[row][col], row, col);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the next token and returns the consumed token. Precondition: t.kind != EOF
private Token consume() throws SyntaxException { Token tmp = t; t = scanner.nextToken(); return tmp; }
[ "private Token consume() throws SyntaxException {\n\t\tToken tmp = t;\n\t\tt = scanner.nextToken();\n\t\treturn tmp;\n\t}", "Token nextToken() throws TokenizerException;", "private Token nextToken() {\n Token token = scanner.nextToken();\n lastSourcePosition = token.location.end;\n return token;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new Rest Action
public Rest() { this.name = "Rest "; }
[ "Rest createRest();", "public Rest() {\n }", "Action createAction();", "public OpinionRest() {\n }", "public CommonRouterActions() {}", "public Action() {\n super();\n }", "DSL_ResourceAction createDSL_ResourceAction();", "public EnterpriseListAction() {\n }", "public RestMessage(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Magic types are types that may appear in the replacement and will need to find their corresponding entry in the list of matches.
public interface MagicType extends Type { /** * Given that we are a type specified in a replacement rule (e.g. a Var or * Atom), can we consume a submatch of the given type in the match? * * Alternatively, we could have overriden .equals(). */ boolean replacementfor(Type o); }
[ "@Override\n public String typesPattern() {\n return \"EJSSISSSSS\";\n }", "boolean replacementfor(Type o);", "protected void augmentSimpleTypes() {\n Set<Class<?>> simpleTypes = MappingBeanHelper.getSimpleTypes();\n simpleTypes.add(com.mongodb.DBRef.class);\n simpleTypes.add(ObjectId.clas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtiene el valor del lado de la imagen objetivo
public int getLadoImg() { return ladoImg; }
[ "public String darImagen( )\n {\n return imagen;\n }", "public String getImagen() {\n return imagen;\n }", "public String consultarImagen() {\n\t\treturn img;\n\t}", "public String obtenerImagen() {\r\n return jugadorActual.getFigura().getRuta();\r\n }", "public int getLarge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates a project permission, adding permission level for the user in the given project
@PreAuthorize("hasAnyRole('ROLE_ADMIN','ROLE_USER', 'ROLE_REMOTE')") void createProjectPermission(ProjectPermission permission) throws IOException;
[ "List<ProjectPermission> listProjectPermisionLevel(User user, Project project);", "public PortalPermission createPermission(PortalPermission permission);", "public ProjectPermission() {\n }", "void addProjectMember(final UserAccount userAccount, final Project project) {\n\t\tfinal ProjectAuthorizationPolic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Imports a document inclusive its binary content into DOX.
DocumentReference importDocument(PhysicalDocument physicalDocument) throws ValidationException, DocumentDuplicationException, DocumentClassNotFoundException;
[ "DocumentContent createDocumentContent(byte[] bytes);", "public void importDocument(Import bpelImport) {\n \tString importType = bpelImport.getImportType();\n \tLazyImportVisitorService vService = (LazyImportVisitorService) getVisitorService();\n \tBPELParseContext bpelParseContext = vService.getBPELPars...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the InboundRecord field. The Inbound Record this subrecord is associated with.
@gw.internal.gosu.parser.ExtendedProperty public entity.InboundRecord getInboundRecord();
[ "public Object inValue() {\n return inValue;\n }", "public jkt.hms.masters.business.Inpatient getInpatient () {\n\t\treturn inpatient;\n\t}", "public java.lang.Object getInvoiceNumber() {\n return invoiceNumber;\n }", "protected Object getInboundReference() {\n\t\treturn inboundReference;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the GeneralCheckup specified by the id provided.
@GetMapping ( BASE_PATH + "/generalcheckups/{id}" ) @PreAuthorize ( "hasAnyRole('ROLE_HCP', 'ROLE_OD', 'ROLE_OPH', 'ROLE_PATIENT')" ) public ResponseEntity getGeneralCheckup ( @PathVariable ( "id" ) final Long id ) { final GeneralCheckup visit = GeneralCheckup.getById( id ); if ( null == vis...
[ "@DeleteMapping ( BASE_PATH + \"/generalcheckups/{id}\" )\r\n @PreAuthorize ( \"hasAnyRole('ROLE_OD', 'ROLE_OPH', 'ROLE_PATIENT')\" )\r\n public ResponseEntity deleteGeneralCheckup ( @PathVariable final Long id ) {\r\n final GeneralCheckup visit = GeneralCheckup.getById( id );\r\n if ( null == v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field cusAcctManagerName is set (has been assigned a value) and false otherwise
public boolean isSetCusAcctManagerName() { return this.cusAcctManagerName != null; }
[ "public boolean isSetCusAcct() {\n return this.cusAcct != null;\n }", "public boolean isSetCnName() {\n return this.cnName != null;\n }", "public boolean isSetCustomerName() {\n return this.customerName != null;\n }", "public boolean isSetCompany_name() {\n return this.company_name != null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns Health with updated max >= 0. Lowers current so it doesn't exceed max if necessary
Health changeMax(int change) { int nextMax = this.max + change; return new Health(Math.min(this.current, nextMax), Math.max(0, nextMax)); }
[ "public int getMaxHealth();", "public int getMaxHealth () {\r\n return health;\r\n }", "private static int maxHealth(int health){\r\n int mHealth = 0;\r\n mHealth = health + 5;\r\n return mHealth; \r\n }", "public double getMaxHealth() {\n return maxHealth;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
BA.debugLineNum = 250;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)"; BA.debugLineNum = 251;BA.debugLine="Activity.Finish";
public static String _activity_pause(boolean _userclosed) throws Exception{ mostCurrent._activity.Finish(); //BA.debugLineNum = 252;BA.debugLine="End Sub"; return ""; }
[ "public static String _activity_pause(boolean _userclosed) throws Exception{\nmostCurrent._activity.Finish();\n //BA.debugLineNum = 243;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public static String _activity_pause(boolean _userclosed) throws Exception{\nif (_userclosed==anywheresoftware.b4a.keywords.Common...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a map of protocol buffer field descriptors to their StorageMethod types, as defined in our protocol buffer extensions.
private ImmutableMap<FieldDescriptor, StorageMethod> generateStorageMethodMap() { ImmutableMap.Builder<FieldDescriptor, StorageMethod> storageMethodMapBuilder = ImmutableMap.builder(); int primaryKeyCount = 0; Message message = Database.getDefaultInstance(clazz); for (FieldDescriptor fiel...
[ "abstract public Map<String,FieldReflective> getDeclaredFields();", "Map<String, FieldDef> getVariableTypes();", "Map<String, FieldDefinition> fieldDefinitions();", "java.util.Map<java.lang.String, com.google.protobuf.ByteString>\n getStorageMap();", "public Map<String,FieldInfo> fieldInfo() ;", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets SQL string from XML tag
protected String getSQL (Element sql) { //local variables String SQL = ""; //code description NodeList textlist = sql.getChildNodes(); for (int i = 0; i < textlist.getLength(); i++) { if (textlist.item(i).getNodeType() == Node.TEXT_NODE) { SQL += textlist.item(i)...
[ "public org.apache.xmlbeans.XmlString xgetQuerySql()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(QUERYSQL$36, 0);\n return ta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for the calculated attribute Qual.
public void setQual(String value) { setAttributeInternal(QUAL, value); }
[ "void setValue(Attribute att, double value);", "public void setQualFlag(String value) {\r\n setAttributeInternal(QUALFLAG, value);\r\n }", "void setQualifier(\n\t\tString schemaNS,\n\t\tString propName,\n\t\tString qualNS,\n\t\tString qualName,\n\t\tString qualValue,\n\t\tPropertyOptions options) thro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set currency plural patterns. These are initially set in the constructor based on the locale, and usually do not need to be changed.
public void setCurrencyPluralPattern(String pluralCount, String pattern) { pluralCountToCurrencyUnitPattern.put(pluralCount, pattern); }
[ "public CurrencyPluralInfo() {\n initialize(ULocale.getDefault(Category.FORMAT));\n }", "public String getCurrencyPluralPattern(String pluralCount) {\n String currencyPluralPattern = pluralCountToCurrencyUnitPattern.get(pluralCount);\n if (currencyPluralPattern == null) {\n // f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
XStream xstream = new XStream(new DomDriver());
public XStream createXStream() { XStream xstream = new XStream(new XppDriver()); xstream.registerConverter(new CalendarConverter(), XStream.PRIORITY_VERY_HIGH); // xstream.registerConverter(new JoinedConverter(), XStream.PRIORITY_NORMAL); // xstream.addImplicitCollection(TeamsTO.class, "teams", TeamTO.class)...
[ "public UE2_0_3Serializer(){\n\t\txstream = new XStream(/*new DomDriver()*/);\n\t}", "public XStream getXStreamWriter() {\n\n XStream xstream = new XStream();//new Sun14ReflectionProvider(new FieldDictionary(sorter)));\n\n customizeXstream(xstream);\n\n return xstream;\n }", "@Override\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the detailedStatusMessage property: The descriptive message about the current detailed status.
public String detailedStatusMessage() { return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); }
[ "public String getStatusMessage() {\n return mMediator.getCurrentStatusMessage();\n }", "public String getCurrentStatusMessage()\n {\n return statusMessage;\n }", "String detailedStatusMessage();", "public String getStatusMessage() {\n\t\treturn statusMessage.getText();\n\t}", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'UML Domain Concept'.
UMLDomainConcept createUMLDomainConcept();
[ "DomainConcept createDomainConcept();", "DomainConcept getDomainConcept();", "ConceptsType createConceptsType();", "ConceptType createConceptType();", "ConceptualSchemeType createConceptualSchemeType();", "DomainModel createDomainModel();", "DomainType createDomainType();", "DsmlNonUML createDsmlNonUM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__CustomNoteParam__Group_0__0" $ANTLR start "rule__CustomNoteParam__Group_0__0__Impl" ../ufscar.Compiladores2.ui/srcgen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3198:1: rule__CustomNoteParam__Group_0__0__Impl : ( ( rule__CustomNoteParam__OctaveAssignment_0_0 ) ) ;
public final void rule__CustomNoteParam__Group_0__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3202:1: ( ( ( rule__CustomNoteParam__Octa...
[ "public final void rule__CustomNoteParam__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3250:1: ( rule__CustomNoteParam__Gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests multiplying large series.
public void testMultiplySeriesBig() { for (int i = 0; i < 5; i++) { multiplySeries(BIG, "multiplySeries-big"); } }
[ "public void testMultiplySeriesSmall() {\n for (int i = 0; i < 5; i++) {\n multiplySeries(SMALL, \"multiplySeries-small\");\n }\n }", "@Test\n public void testBigMultiplication()\n {\n CalculatorModel test = new CalculatorModel();\n\n assertEquals(\"480\", test.evaluate(BIG_MULTIPL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column vendor_application.electronic_business_license
public void setElectronicBusinessLicense(String electronicBusinessLicense) { this.electronicBusinessLicense = electronicBusinessLicense == null ? null : electronicBusinessLicense.trim(); }
[ "public void setBusinessLicense(String businessLicense)\n\t{\n\t\tthis.businessLicense = businessLicense;\n\t}", "@Column(name = \"BUS_LIC\")\n\tpublic String getBusinessLicense()\n\t{\n\t\treturn businessLicense;\n\t}", "public String getElectronicBusinessLicense() {\n return electronicBusinessLicense;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Service Interface for managing RolLocation.
public interface RolLocationService { /** * Save a rolLocation. * * @param rolLocation the entity to save * @return the persisted entity */ RolLocation save(RolLocation rolLocation); /** * Get all the rolLocations. * * @return the list of entities */ List<R...
[ "void updateServiceLocation();", "@SuppressWarnings(\"unused\")\npublic interface LocationService {\n\n void setLocationRepository(LocationRepository locationRepository);\n\n /* Persistence Methods */\n\n /**\n * Delete all items in the Location repository\n *\n * @throws ServiceException som...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes SpotifyApi object using personal credentials. See ApiCredentials field for instructions.
public void initializeApi() { spotifyApi = new SpotifyApi.Builder() .setClientId(ApiCredentials.getClientId()) .setClientSecret(ApiCredentials.getClientSecret()) .build(); }
[ "public void initializeSpotifyApi() {\n spotifyDefaultCredentialStore.getSpotifyClientPkceApi(null, new SpotifyContinuation<SpotifyClientApi>() {\n @Override\n public void onSuccess(SpotifyClientApi spotifyClientApi) {\n mSpotifyClientApi = spotifyClientApi;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get X component of the translate vector.
public double getTranslateX() { return translateX; }
[ "public int getTranslateX() {\n return m_iX;\n }", "public double getLocationX()\r\n\t{\r\n\t\treturn myTranslation.getTranslateX();\r\n\t}", "public double getXTranslation() {return xtranslation;}", "private float getTranslateX(){\r\n\t\tfloat shipX = level.pship.getCircle().getCenterX();\r\n\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_SYN_SETLMT_ACC.SETT_TRS_TYPE
public void setSETT_TRS_TYPE(String SETT_TRS_TYPE) { this.SETT_TRS_TYPE = SETT_TRS_TYPE == null ? null : SETT_TRS_TYPE.trim(); }
[ "public String getSETT_TRS_TYPE() {\r\n return SETT_TRS_TYPE;\r\n }", "public void setTRS_TYPE(String TRS_TYPE) {\r\n this.TRS_TYPE = TRS_TYPE == null ? null : TRS_TYPE.trim();\r\n }", "public String getTRS_TYPE() {\r\n return TRS_TYPE;\r\n }", "public void setLBR_TransactionType...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable font subsetting in PDFs.
@javax.annotation.Nullable @ApiModelProperty(value = "Disable font subsetting in PDFs.") @JsonProperty(JSON_PROPERTY_NO_SUBSET_FONTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getNoSubsetFonts() { return noSubsetFonts; }
[ "public boolean isFontSet() { return false; }", "protected void doStandardFonts() {\r\n\t\trenderer.txt.setUseStandardFonts(ui.viewStandardFonts.isSelected());\r\n\t}", "public void disableFontCache() {\n fontCacheManager = FontCacheManagerFactory.createDisabled();\n }", "@javax.annotation.Nullable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares this Pair to another object. If the object is a Pair, this function will work providing the elements of the Pair are themselves comparable. It will then return a value based on the pair of objects, where p &gt; q iff p.first() &gt; q.first() || (p.first().equals(q.first()) && p.second() &gt; q.second()). If th...
public int compareTo(Object o) { Pair another = (Pair) o; int comp = ((Comparable) first()).compareTo(another.first()); if (comp != 0) { return comp; } else { return ((Comparable) second()).compareTo(another.second()); } }
[ "@Override\n public int compareTo(Pair<K, V> o) {\n return k.compareTo(o.k);\n }", "@Override\n public int compareTo(TSTuple o) {\n return Long.compare(this.tsAggValueProto.getCloseTime(), o.tsAggValueProto.getCloseTime());\n }", "public int compareTo(VehiclePair o) {\n\t\t\treturn this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get one shipping by id.
@Transactional(readOnly = true) public Shipping findOne(Long id) { log.debug("Request to get Shipping : {}", id); Shipping shipping = shippingRepository.findOne(id); return shipping; }
[ "@GetMapping(\"/shipping/{id}\")\n public ResponseEntity<Shipping> get(@PathVariable(\"id\") long id) {\n\t Shipping shipping = shippingService.get(id);\n return ResponseEntity.ok().body(shipping);\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<OrderShippingDTO> findOne(Long...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CONSTRUCTOR Creates a new machineCounter
public MachineCounter(TotalCostAnalyzer costAnalyzer) { // Initializes attributes this.machineCounts = new HashMap<MachineType, Integer>(); this.costAnalyzer = costAnalyzer; this.costAnalyzer.resetMachineStatus(); }
[ "public Counter() {}", "public Counter()\n {\n this(0);\n }", "public Counter() {\n mCount = 0;\n }", "public Counter() {\r\n value = 0;\r\n }", "public Counter() {\n this.count = 0;\n }", "public Counter createCounter() {\n return new CounterImpl(initialValue);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the template type used for rendering recommendations from this module
RecommendationRenderType getRenderType();
[ "String getTemplate(String type);", "DataType getType_template();", "Template getDeftemplate();", "public Integer getTemplateType() {\n return templateType;\n }", "String getViewType();", "public TemplateType getType() {\n return type;\n }", "Class<T> getTemplateType();", "String getRend...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get method for the URI of the Applicant/Person
public String getPersonURI() { return this.personURI; }
[ "String getEndpointUri();", "public abstract String getRequestPath();", "java.lang.String getAuthorizationURI();", "@Override\n public boolean isRestfulShow() {\n return \"GET\".equals(httpMethod) && isByIdPath();\n }", "protected abstract String getBaseEndpointPath();", "java.lang.String get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the Block class type associated with this BlockType.
public Class<? extends Block> blockClass() { return klass; }
[ "public BlockType getType()\n {\n return blockType;\n }", "public BlockType getBlockType() {\n\t\treturn type;\n\t}", "public String getBlockType() {\r\n\t\treturn blockType;\r\n\t}", "@Override\n public String getBlockType() {\n return this.type;\n }", "public Class getTypeClass()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
zoom level protected mode Security Allow contents 32 bit or 64 bit IE pre requisites careful with IE version 11 logs page load strategy NOT POSSIBLE binary NOT POSSIBLE PROXY Profiling NOT POSSIBLE Notifications NOT POSSIBLE certificate
@Test public void ieOptions() { System.setProperty(InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY,"INFO"); //System.setProperty(InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY,"FATAL"); //System.setProperty(InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY,"ERROR"); ...
[ "Boolean enableInternetSecurity();", "@DISPID(2) //= 0x2. The runtime will prefer the VTID if present\r\n @VTID(11)\r\n boolean enableTrustedBrowser();", "protected static void _handleIECertWarnings() {\r\n\t\tString sInvalidCert = \"invalidcert\";\r\n\t\t// Bail out if the browser isn't Internet Explorer\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the localLock value for this Bapislockd.
public void setLocalLock(java.lang.String localLock) { this.localLock = localLock; }
[ "void setLockManager( LockManager lockManager );", "public void setLocalId(String aLocalId)\n {\n localId = aLocalId;\n setItDirty(true);\n }", "public synchronized void setLocalAMRMToken(\n Token<AMRMTokenIdentifier> localToken) {\n this.localToken = localToken;\n this.localToken...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts into EmpOrders Database using prodID and quantity
public void insertDBorder(String prodID, String quantity) { try { String sql = "INSERT INTO EmpOrders (ProductID, QuantityNeeded) VALUES ('" + prodID + "', '" + quantity + "')"; Statement stmt = Customer.connectDB(); stmt.execute(sql); } catch (SQLException e) { ...
[ "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: com.ss.android.common.applog.NetUtil$IExtraParams
public interface IExtraParams { HashMap<String, String> getExtrparams(); }
[ "String getExtraArgs();", "public String[] getExtraInfo() {\n return extraInfo;\n }", "public void setExtraInfo(String[] extraInfo) {\n this.extraInfo = extraInfo;\n this.bextraInfo = true;\n }", "public void setExtraInfo (String info) {\n\tthis.extraInfo = info;\n }", "public void setExtraInf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the denominateur of a Rationnel
public int getDenominateur() { return this.denominateur; }
[ "String getProfitRatio();", "public int getDenominator();", "public int getDenominator() { \n return denominator; \n }", "public double getRatio(){\n\t\treturn this.totalInterest()/this.principle;\n\t\t\n\t}", "double getRatio();", "private double denominator () {\n double denominator = 0.0;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an array of characters
public static char[] createArray() { // Declare an array of characters and create it char[] chars = new char[100]; // Create lowercase letters randomly and assign them to the array for (int i = 0; i < chars.length; i++) { chars[i] = RandomCharacter.getRandomLowerCaseLetter()...
[ "public char [] toCharArray(){\n\tint length = length();\n\tchar [] chars = new char[length];\n\tJVKernel.copyArray(this.chars,0,chars,0,length);\n\treturn chars;\n }", "private String[] getConvertedChars()\r\n {\r\n int ascii;\r\n String binary;\r\n int numberOfChars = text.length();\r\n S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor that creates a vertex with a given data and type creating empty ingress and egress maps.
public Vertex(HashMap data, String tag) { this.tag = tag; this.data = data; ingress = new HashMap(); egress = new HashMap(); }
[ "Vertex createVertex();", "public static void init(TypeHandler type, IndexHandler index) {\n\t\ttype.createVertexType(SchemaContainerVersionImpl.class, MeshVertexImpl.class);\n\t}", "void create(VertexDescriptor descriptor);", "public void addVertex(T data) throws Exception {\n if(vertices.size() >= MAX_VE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 303 for further information. The SLEE calls this method to signify that a service has been uninstalled in the SLEE. The event types associated to the service key are no longer of interest to a particular application.
public void serviceUninstalled(String serviceID) { eventIDFilter.serviceUninstalled(serviceID); }
[ "void unbind(EventService service);", "public abstract void unregister(Object aService);", "public void serviceRemoved(String serviceID);", "public void onServiceUnregistered() {\r\n \t// Update the list of sessions\r\n\t\tupdateList();\r\n }", "public void deregisterService(short sServiceName) throws...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the appropriate ViewType according to the sender of the message.
@Override public int getItemViewType(int position) { TextPOJO message = (TextPOJO) mMessageList.get(position); if (message.getType() == sender_code) { // If the current user is the sender of the message return sender_code; } else { // If some other user s...
[ "String getViewType();", "@Override\n public int getItemViewType(int position) {\n MessageDetails message = details.get(position);\n\n if (message.getSender_id().equals(String.valueOf(ConstantInterFace.USER.getId()))) {\n // If the current user is the sender of the message\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }