query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Generates an TaskBook with autogenerated tasks.
public TaskBook generateTaskBook_Events(int numGenerated) throws Exception{ TaskBook taskBook = new TaskBook(); addEventsToTaskBook(taskBook, numGenerated); return taskBook; }
[ "TaskBook generateTaskBook(int numGenerated) throws Exception{\n TaskBook taskBook = new TaskBook();\n addToTaskBook(taskBook, numGenerated);\n return taskBook;\n }", "TaskBook generateTaskBook(List<Task> tasks) throws Exception{\n TaskBook taskBook = new TaskBoo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the length of the data array is equal to the product of the number of rows and columns.
public boolean verify() { return ( this.data.length == this.nRows*this.nCols ); }
[ "private boolean isNxNShape() {\n return this.matrix.size() == this.n &&\n this.matrix.stream()\n .allMatch(row -> row.size() == this.n);\n }", "public boolean isSquare() {\n return this.rowCount == this.columnCount;\n }", "@Override\n public boolean ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new complex polynomial from its roots.
public ComplexRootedPolynomial(Complex ...roots) { if (roots.length == 0) { throw new IllegalArgumentException("Number of roots must be non-zero."); } this.roots = roots; }
[ "public ComplexRootedPolynomial(Complex constant, Complex ... roots) {\n\t\tthis.constant = constant;\n\t\tthis.roots = roots;\n\t}", "public ComplexRootedPolynomial(Complex... roots) throws IllegalArgumentException {\r\n\t\tif (roots.length == 0) {\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\t}\r\n\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Service Interface for managing ProviderCommandRequest.
public interface ProviderCommandRequestService { /** * Save a providerCommandRequest. * * @param providerCommandRequest the entity to save * @return the persisted entity */ ProviderCommandRequest save(ProviderCommandRequest providerCommandRequest); /** * Get all the provider...
[ "TransferInitiateResponse initiateProviderRequest(DataRequest dataRequest);", "List<ProviderCommandRequest> findAll();", "public RequestControl(RequestManager requestManager){\n //add request\n commandList.put(\"createRequest\", new CreateRequest(requestManager));\n //change the status of a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get before_sent in Mills
public static long get_before_sent() { return before_sent; }
[ "public int getSentFrom() {\n return sentFrom;\n }", "public Object before() {\n return this.before;\n }", "public Message[] getSentMessages() {\n return sentMessages;\n }", "public int getBefore()\n {\n return this.before;\n }", "public int[] getBeforeId() {\n\t\t\treturn b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an empty instance of this class
public static TestClass getEmptyObject() { return new TestClass(); }
[ "public IDataObject getEmptyDataObject() {\n return new DataObject();\n }", "public static CBTBuilder empty() {\n return new CBTBuilder();\n }", "public static Query empty() {\n return new Query();\n }", "public static Metadata empty() {\n return EMPTY;\n }", "@Suppre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
comparator, nulls lower (everInCustody) //
public JwComparator<AcItem> getEverInCustodyComparatorNullsLower() { return EverInCustodyComparatorNullsLower; }
[ "public JwComparator<AcItem> getInCustodyComparatorNullsLower()\n {\n return InCustodyComparatorNullsLower;\n }", "public JwComparator<AcItem> getInvoicedComparatorNullsLower()\n {\n return InvoicedComparatorNullsLower;\n }", "public JwComparator<AcItem> getAcceptCustodyLocalTsComparat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If list not empty, moves cursor to beginning of list & returns true, else returns false
public boolean gotoBeginning() { if (!isEmpty()) { cursor = head; return true; } return false; }
[ "@Override\n public boolean isBeforeFirst() {\n ensureOpen(\"isBeforeFirst\");\n return (cursor == -1);\n }", "private static boolean IsAtListItemStart(ITextPointer position)\r\n { \r\n // Check for empty ListItem case\r\n if (typeof(ListItem).IsAssignableFrom(position.ParentType) && \r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update insurance container view data.
private void updateInsuranceContainerViewData(final BasePackage packageModel, final InsuranceContainerViewData insuranceContainerViewData) { for (final ExtraFacilityCategory categoryModel : packageModel.getExtraFacilityCategories()) { if (StringUtils.equalsIgnoreCase(categoryModel.get...
[ "private void updateInsuranceContainerViewData(final String insuranceCode,\r\n final InsuranceContainerViewData insuranceContainerViewData)\r\n {\r\n updateInsuranceViewData(insuranceCode, insuranceContainerViewData.getInsViewData());\r\n updateInsPassViewData(insuranceContainerViewData.getInsPasVi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that splits headers cell that are separated with "!!"
public ArrayList<String> translateHeaderCell2(String row) { ArrayList<String> headers = new ArrayList<String>(); int startRow = row.indexOf("!"); // int startRow = 2; int startPos = 2; int bracketCount = 0; while (startPos < row.length() - 1) { String text = row.substring(startPos, startPos + 2); s...
[ "public ArrayList<String> translateHeaderCell1(String row) {\n\n\t\tint i = 0;\n\t\tArrayList<String> headers = new ArrayList<String>();\n\t\tint startRow = row.indexOf(\"!\");\n\t\t// int startRow = 2;\n\t\tint startPos = 2;\n\t\tint bracketCount = 0;\n\t\twhile (startPos < row.length() - 1) {\n\t\t\tString text =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the search path object
protected SearchPath getSearchPath() { if (this.searchPath == null) { try { // TODO: fix this /* ApplicationContext rootApplicationContext = FrameworkHelper.getApplicationContext(); if (rootApplicationCo...
[ "public String getSearchPath() {\n String path = null;\n if (parent != null) {\n path = parent.getSearchPath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"%s\", name);\n }\n return path;\n }", "public St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
receives input, returns the adjusted input for better sensitivity
private double adjustInput(double input){ return input * Math.abs(input); }
[ "public double calculate(double input) {\n if(input == 0.0d) return 0.0d;\n\n if(input < 0.0d)\n return -(Math.pow(-input, sensitivityExponent));\n else\n return Math.pow(input, sensitivityExponent);\n }", "private static double reducePower(double input) {\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check that nothing interferes with the placement of the WorldNode other, and if something does interfere, then remove it.
public void checkRemoveCollisionInEditor(WorldNode other) { for (Iterator<Bar> i = bars.iterator(); i.hasNext();) { Bar n = i.next(); if (n != other && n.getX() == other.getX() && n.getY() == other.getY() && !n.canOccupySameLocationInEditorAs(other)) i.remove(); } for (Iterator<Enemy> i = enemies.i...
[ "void removeFromWorld(){\r\n\t\tassert (this.getWorld() != null && !this.getWorld().hasAsGameObject(this));\r\n\t\tthis.setWorld(null);\r\n\t\tthis.setPosition(null);\r\n\t}", "public void remove() {\n\t\tthis.world.remove(this);\n\t\tthis.world = null;\n\t}", "private void removeCloud()\n {\n if (get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method check the conversion from kb to Bytes.
@Test public void testToConvertKbToBytes() { assertEquals(1000, convertor.convertToBytes(1, "kb")); assertEquals(33550, convertor.convertToBytes(33.55, "KB")); assertEquals(500, convertor.convertToBytes(0.5, "kb")); assertEquals(303550, convertor.convertToBytes(303.55, "KB")); ...
[ "@Test\n public void testToConvertGbToBytes() {\n assertEquals(15800000000L, convertor.convertToBytes(15.8, \"Gb\"));\n assertEquals(1070000000L, convertor.convertToBytes(1.07, \"gb\"));\n assertEquals(170000000L, convertor.convertToBytes(0.17, \"gb\"));\n assertEquals(305800000000L, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To test code 200 and id, get one project successfully.
@Test public void getProjectTest() throws Exception { httpclient = HttpClients.createDefault(); //set up user deleteUsers(); String userId = createTestUser(); //deleteProjects(userId);//all projects have already been deleted by server since deleteUsers(); try { ...
[ "Project getProject(long id);", "@Test\r\n public void testGetIdProject() {\r\n System.out.println(\"getIdProject\");\r\n EditDataProjectController instance = new EditDataProjectController(project);\r\n int expResult = 0;\r\n int result = instance.getIdProject();\r\n assertEq...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the _BIC_ZGSPY value for this _BIC_AZMDYX0000.
public void set_BIC_ZGSPY(java.math.BigDecimal _BIC_ZGSPY) { this._BIC_ZGSPY = _BIC_ZGSPY; }
[ "public java.math.BigDecimal get_BIC_ZGSPY() {\r\n return _BIC_ZGSPY;\r\n }", "public void set_BIC_ZGSPQNY(java.math.BigDecimal _BIC_ZGSPQNY) {\r\n this._BIC_ZGSPQNY = _BIC_ZGSPQNY;\r\n }", "public void set_BIC_ZGSPN(java.math.BigDecimal _BIC_ZGSPN) {\r\n this._BIC_ZGSPN = _BIC_ZGSPN;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor of VariableNotFoundException. This Constructor accepts only the unrecognized variable.
public VariableNotFoundException (String var) { this("", var); }
[ "public VariableNotFoundException (String faultyExpression, String var) {\n\t\tsuper(faultyExpression);\n\t\tthis.var = var;\n\t}", "public VariableNotFoundException(){\n super(\"Variable not found in block.\");\n }", "public InvalidVariableNotFound(String varName)\n\t{\n\t\tif (varName == null)\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRulesignedINT" $ANTLR start "rulesignedINT" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1164:1: rulesignedINT : ( ( rule__SignedINT__Group__0 ) ) ;
public final void rulesignedINT() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1168:2: ( ( ( rule__SignedINT_...
[ "public final void entryRulesignedINT() throws RecognitionException {\r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1156:1: ( rulesignedINT EOF )\r\n // ../org.ow2.mindEd.idt.editor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new instance of GraphicsWriter. This is called by the constructor of ThreadedOSGraphics after its superclass has been initialized.
protected abstract GraphicsWriter newGraphicsWriter();
[ "public Graphics2D createGraphics() {\n\treturn recorder.createGraphics();\n }", "public VectorGraphics2D createGraphics() {\n\t\treturn new VectorGraphics2D(new Graphics2DContext(), operations);\n\t}", "public Graphics create() {\n return new GdkGraphics(this);\n }", "private GraphicsManager() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether two providers are the same
private boolean isSameProvider(String provider1, String provider2) { if (provider1 == null) { return provider2 == null; } return provider1.equals(provider2); }
[ "private static boolean isSameProvider(String provider1, String provider2) {\n if (provider1 == null) {\n return provider2 == null;\n }\n return provider1.equals(provider2);\n }", "private boolean isSameProvider(String provider1, String provider2) {\n if (provider1 == null)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Date date = new Date(); Calendar cal = Calendar.getInstance(); cal.setTime(date); / Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT+7")); long time = cal.getTimeInMillis(); Date date = new Date(time); String currTime = new SimpleDateFormat("HH:mm:ss").format(date); return currTime;
public static String getCurrentTime() { Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT+7")); SimpleDateFormat fmt = new SimpleDateFormat("HH:mm:ss"); fmt.setCalendar(cal); String currTime = fmt.format(cal.getTimeInMillis()); return currTime; }
[ "public static String getCurrentDateTime() {\n Calendar cal = new GregorianCalendar(TimeZone.getTimeZone(\"GMT+7\"));\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n fmt.setCalendar(cal);\n String currDateTime = fmt.format(cal.getTimeInMillis());\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove given objects from the unit's list of synchronized objects.
public native static void synchronizeObjectsRemove(GameObject oper1, java.util.List oper2);
[ "protected void removeQueuedEntities(){\n\t\tif(!queuedRemoval.isEmpty())\n\t\t\tfor(MapObject mo: queuedRemoval){\n\t\t\t\tlistWithMapObjects.remove(mo);\n\t\t\t}\n\t\tqueuedRemoval.clear();\n\t}", "public void unlockObjects(Collection<? extends CDOObject> objects, LockType lockType);", "public void removeFrom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add the game to the user's likes create the game this will not create if the game already exists
private void handleAddGameButton(String name, String rating, HttpServletRequest request, HttpServletResponse response, UserModel user) throws ServletException, IOException { char r = rating.charAt(0); GameDao.saveGame(name, r); //add the like - this will check if the user already liked the game ...
[ "boolean createGame(Game newGame) {\n return gameList.addGame(newGame);\n }", "public void addGame(Game game) {\n System.out.println(\"here\");\n game.setGameId(generateId++);\n gameRepository.save(game);\n }", "public void newGame(){\n sendGuess(new Request(NEW_GAME));\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated Property Setter for attribute DISPLAYWAITINTERVAL
@Override public void setDisplayWaitInterval(java.lang.Number displayWaitInterval) throws G2AccessException { setAttributeValue (SystemAttributeSymbols.DISPLAY_WAIT_INTERVAL_, displayWaitInterval); }
[ "@Override\n public java.lang.Number getDisplayWaitInterval() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.DISPLAY_WAIT_INTERVAL_);\n return (java.lang.Number)retnValue;\n }", "@Override\n public java.lang.Number getDisplayUpdateInterval() throws G2A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a Builder by copying an existing Browse instance
private Builder(maestro.layouts.internal.Browse other) { super(maestro.layouts.internal.Browse.SCHEMA$); if (isValidValue(fields()[0], other.type)) { this.type = data().deepCopy(fields()[0].schema(), other.type); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], ot...
[ "public static maestro.layouts.internal.Browse.Builder newBuilder(maestro.layouts.internal.Browse.Builder other) {\n return new maestro.layouts.internal.Browse.Builder(other);\n }", "public static maestro.layouts.internal.Browse.Builder newBuilder(maestro.layouts.internal.Browse other) {\n return new maest...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public setter Contains details about why an item does or doesn't qualify as an eBay Express listing. Only returned when IncludeExpressRequirements is true the request. The item requirements are assessed in this order: SellerExpressEligible ExpressOptOut ExpressApproved All other settings
public void setExpressItemRequirements(ExpressItemRequirementsType expressItemRequirements) { this.expressItemRequirements = expressItemRequirements; }
[ "public ExpressItemRequirementsType getExpressItemRequirements() {\n\t return this.expressItemRequirements;\n\t}", "public Boolean getExpressListing() {\n\t return this.expressListing;\n\t}", "public void setExpressNo(String expressNo) {\r\n this.expressNo = expressNo;\r\n }", "public com.fede...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
======================================================================================================= == HELP Validate this is a valid receipt list. If it isn't, it will throw an exception.
public void validateReceiptList(ReceiptList result) throws SystemException { // Iterate the list for (Receipt item : result) { // Every receipt must be terminal and ok if (!item.getType().isOk()||!item.getType().isTerminal()); throw new SystemException("Command response failed while sending. ...
[ "private ValidationStatus validateListItems() {\n ValidationStatus status = OK_STATUS;\n String[] items = list.getItems();\n for (int i = 0; i < items.length && status.isOK(); i++) {\n status = listValidator.validate(items[i]);\n }\n return status;\n }", "public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 2 / 2 covered goals: Goal 1. org.objectweb.cjdbc.controller.cache.CacheStatistics.addUncacheable()V: rootBranch Goal 2. org.objectweb.cjdbc.controller.cache.CacheStatistics.()V: rootBranch
@Test(timeout=300000) public void test02() throws Throwable { CacheStatistics cacheStatistics0 = new CacheStatistics(); cacheStatistics0.addUncacheable(); }
[ "@Test(timeout=300000)\n public void test07() throws Throwable {\n CacheStatistics cacheStatistics0 = new CacheStatistics();\n cacheStatistics0.addHits();\n }", "@Test(timeout=300000)\n public void test01() throws Throwable {\n CacheStatistics cacheStatistics0 = new CacheStatistics();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates options for adunit
public static final AdUnitOptions newInstance() { return JavaScriptObject.createObject().cast(); }
[ "private static Options GenerateOptions() {\n Options options = new Options();\n options.addOption(PARAM_DT, \"delta\", true, \"Delta of time to be used.\");\n options.addOption(PARAM_DT2, \"delta2\", true, \"Delta 2 of time to be used.\");\n options.addOption(PARAM_SF, \"static_file\", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the authorisation calculation of the value given at the CDR date. We have to perform an evaluation for each of the threshold steps in the model and find the lowest nonzero result. When the authorisation runs out, the same process can happen again with less available balance. Not very beautiful, but functional ...
protected double performAuthEvaluationThreshold(String PriceModel, ArrayList<RateMapEntry> tmpRateModel, double availableBalance, long CDRDate) throws ProcessingException { int Index = 0; double ThisTierRUMUsed; long ThisTierBeatCount; RateMapEntry tmpEntry; double RUMValueUsed = 0; // check tha...
[ "protected double performAuthEvaluationFlat(String PriceModel, ArrayList<RateMapEntry> tmpRateModel, double availableBalance, long CDRDate) throws ProcessingException {\n RateMapEntry tmpEntry;\n double tmpcalculationResult;\n\n // check that we have something to work on\n if (tmpRateModel == null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a Bindings that contains the unique components of this join operation and the datasets.
@VisibleForTesting static ComponentBindings createJoinScope(Map<String, Dataset> namedDatasets) { return new ComponentBindings(namedDatasets); }
[ "public BindingSet join(ArrayList bindingSets) throws IOException {\n remainingBindingSets = (ArrayList) bindingSets.clone();\n if (bindingSets.size() == 0)\n throw new RuntimeException(\"Invalid binding sets size \" + bindingSets.size());\n Collections.sort(remainingBindingSets);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the state of the sync service to idle.
void setIdle();
[ "public void forceIdle(){\n try{\n mService.forceIdle();\n }catch(Exception e){\n Log.w(TAG, \"Error enabling idle state\", e);\n }\n }", "public void busy() {\n mIsIdle = false;\n }", "public void idle() {\n mIsIdle = true;\n }", "@Override\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the arrows menu.
protected Menu createArrowMenu() { CommandMenu menu = new CommandMenu("Arrow"); menu.add(new ChangeAttributeCommand("none", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_NONE), fView)); menu.add(new ChangeAttributeCommand("at Start", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_STA...
[ "private void createMenuButtons() {\n createMenuButton(\"START\");\n createMenuButton(\"SCORES\");\n createMenuButton(\"HELP\");\n createMenuButton(\"CREDITS\");\n createMenuButton(\"EXIT\");\n }", "void createMenu() {\n\n\t\tdragButton.setBackground(Color.GREEN);\n\n\t\t// A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new event handler and initialized the object for the database access.
public UserHandler() { dbHandler = new DatabaseHandler(); LoggerHandler.logger.info("UserHandler called."); }
[ "public PersistentLogEventListener() {\n\t\tthis(new EventDAO());\n\t}", "public EventDao() {\n\t\tsuper(de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.Event.EVENT, de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.pojos.Event.class);\n\t}", "public RegistrationHandler()\r\n\t{\r\n\t\ttry\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the cryptographic provider, or keystore type.
public static String getProvider() { // pkcs12 and jceks are the only ootb providers that allow storing a secret key //return "PKCS12"; return "JCEKS"; }
[ "public static String getKeyStoreProvider(String keyStoreType) {\n if (KeystoreType.PKCS12.toString().equalsIgnoreCase(keyStoreType)) {\n return BouncyCastleProvider.PROVIDER_NAME;\n }\n return null;\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv xgetCry...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
accepts an array of ints, returns it except the element at index idx
public static int[] remove(int[] arr, int idx) { int[] arrRemoved = new int[arr.length - 1]; for (int i = 0; i < idx; i++) { arrRemoved[i] = arr[i]; } for (int i = idx; i < arrRemoved.length; i++) { arrRemoved[i] = arr[i + 1]; } return arrRemoved; }
[ "public static int[] remove(int[] arr1, int idx) {\n\t\t\tint[] arr2 = new int[arr1.length-1];\r\n\t\t\tint idxArr2=0;\r\n\t\t\tfor (int i=0; i<arr1.length; i++) {\r\n\t\t\t\tif (i!=idx) {\r\n\t\t\t\t\tarr2[idxArr2]=arr1[i];\r\n\t\t\t\t\tidxArr2++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn arr2;\r\n\t\t\t}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new ManualMoveStorage.
public ManualMoveStorage() { addRequirements(Robot.storage); }
[ "void create(Storage<?> storage);", "@Override\n\tpublic org.eclipse.cmf.occi.multicloud.modemo.Manualmigrationpolicy createManualmigrationpolicy() {\n\t\treturn new ManualmigrationpolicyConnector();\n\t}", "StoragePoint createStoragePoint();", "boolean createStorage();", "Manual createManual();", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'La dir' containment reference. If the meaning of the 'La dir' containment reference isn't clear, there really should be more of a description here...
LATrans getLa_dir();
[ "public Integer getLandDir() {\n return landDir;\n }", "public Direction getDirection()\n {\n return dir;\n }", "public double getDirection() {\n\t\treturn (getAngle() < pid.getTarget()) ? 1 : -1;\n\t}", "Direction getMoveDir();", "public org.landxml.schema.landXML11.Direction xgetDir...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the COM property "DesignTablesSynchronization"
@DISPID(1611005972) //= 0x60060014. The runtime will prefer the VTID if present @VTID(47) short designTablesSynchronization();
[ "@DISPID(1611005972) //= 0x60060014. The runtime will prefer the VTID if present\n @VTID(48)\n void designTablesSynchronization(\n short oDesignTablesSynchronization);", "public String getSynchronizationMode() {\n\t\treturn syncMode;\n\t}", "public String[] getSynchronizedTableNames();", "protected Objec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table cm_industry_config
CmIndustryConfig selectByPrimaryKey(String industryId);
[ "List<CmIndustryConfig> selectByExample(CmIndustryConfigExample example);", "public void setIndustry(String industry) {\n this.industry = industry;\n }", "public void setIndustryCode(String industryCode) {\r\n this.industryCode = industryCode;\r\n }", "public void setIndustry(String indust...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the populate_State__c value for this Zuora_Customer_HPM_Setting__c.
public java.lang.Boolean getPopulate_State__c() { return populate_State__c; }
[ "public void setPopulate_State__c(java.lang.Boolean populate_State__c) {\r\n this.populate_State__c = populate_State__c;\r\n }", "public java.lang.Boolean getPopulate_Postal_Code__c() {\r\n return populate_Postal_Code__c;\r\n }", "public java.lang.Boolean getPopulate_Phone__c() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'id_type' field.
public Builder setIdType(String value) { validate(fields()[1], value); this.id_type = value; fieldSetFlags()[1] = true; return this; }
[ "public void setId_type(String id_type) {\n this.id_type = id_type;\n }", "public void setIdType(String idType) {\n this.idType = idType;\n }", "public void setIdType(String idType) {\r\n this.idType = idType;\r\n }", "public void setIdType(Integer idType) {\n this.idType ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a new note to the song
void addNote(NoteModel newNote);
[ "MusicPieceModel addNote(Note note);", "private void addNote() {\n if (checkNote()) {\n return;\n }\n\n Note note = new Note(noteTitle.getText(), noteBody.getText());\n\n notesToAdd.add(note);\n\n broadcast(\"Note successfully added!\");\n }", "public void addNot...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines whether it is possible to start the specified phase by the name of phase type.
public boolean canStart(Phase phase) throws PhaseManagementException { return this.delegate.canStart(phase); }
[ "public boolean canPerform(Phase arg0) throws PhaseHandlingException {\r\n return false;\r\n }", "public boolean canPerform(Phase phase) throws PhaseHandlingException {\r\n PhasesHelper.checkNull(phase, \"phase\");\r\n PhasesHelper.checkPhaseType(phase, PHASE_TYPE_AGGREGATION_REVIEW);\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns the index of the column that the specified x falls within, or 1 if the x lies to the right of the last column.
int computeColumnIntersect(int x, int startColumn) { int numColumns = getColumnCount(); for (int i = startColumn; i < numColumns; i++) { int endX = columns[i].getRightmostX(); if (x <= endX) return i; } return -1; }
[ "private int findColumn(int targetx) {\r\n int xSize = experiment.getNumberOfSamples()*elementSize.width;\r\n if (targetx >= xSize || targetx < 0) {\r\n return -1;\r\n }\r\n return targetx/elementSize.width;\r\n }", "public abstract int findColForWindow(int x);", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Sender'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseSender(Sender object) { return null; }
[ "java.lang.String getSender();", "public String getoSender() {\n return oSender;\n }", "public T caseSendMessage(SendMessage object) {\n\t\treturn null;\n\t}", "org.gnw.mktsim.common.msg.Messages.Sender getSender();", "String getSender();", "public String getSender() {\r\n return sender;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ ISteamController controller = (ISteamController) pointer; controller>TriggerHapticPulse((ControllerHandle_t) controllerHandle, (ESteamControllerPad) targetPad, (unsigned short) durationMicroSec);
private static native void triggerRepeatedHapticPulse(long pointer, long controllerHandle, int targetPad, int durationMicroSec, ...
[ "private static native void triggerVibration(long pointer,\n long controllerHandle,\n short leftSpeed,\n short rightSpeed);", "short ps2000_set_trigger2(short handle, short ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the autobean for a single system message
AutoBean<Message> makeMessage();
[ "private ManualMessage() {\n initFields();\n }", "SystemMessage createSystemMessage();", "MessageDef getMessageDef();", "private void setACMsg(OL_Message msg) {\n messageid = msg.getMessageIdentifier();\n root = socket.createLogicalAddress(((FSM_Extension) msg.getFirstExtensionByType(Ext...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
record the use of the provided setting
public void recordUsedSettingAndValue(String settingName, Object value, String description);
[ "void setSetting(String settingName, String value);", "private void addSetting( Setting setting )\n\t{\n\t\tmSettings.addSetting( setting );\n\n\t\tsave();\n\t\t\n\t\tbroadcastSettingChange( setting );\n\t}", "public void incSetting(){\n\t\tswitch(setting) {\n\t\tcase OFF: setting = Setting.LOW; break;\n\t\tcas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string proxy_request_path_template = 11;
@java.lang.Override public com.google.protobuf.ByteString getProxyRequestPathTemplateBytes() { java.lang.Object ref = proxyRequestPathTemplate_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( ...
[ "java.lang.String getProxyRequestPathTemplate();", "boolean hasProxyRequestPathTemplate();", "@java.lang.Override\n public java.lang.String getProxyRequestPathTemplate() {\n java.lang.Object ref = proxyRequestPathTemplate_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method creates a temp user account for telephone caller from a given phone number. It saves the input phone number and uses "Temp_Record" as the patient's first name field. This indicator will be used later to inform speech and GUI app that the record is temporary. The other fields in the patient temp record are b...
public static int createTempUserAccount (String phone, String doctorId) { try { PatientRecord patientRecord = new PatientRecord (); String patientId; String normalizePhone = PhoneHelper.normalize(phone, false); patientRecord.doctorId = doctorId; /* if temp record already exist for ...
[ "private void createAccount(AccountCreationFormData data) {\n\t\t// show loading bar\n\t\tsetIsLoading(true);\n\n\t\t// format phone number to properly include hyphens\n\t\tdata.number = Utility.formatPhoneNumberForServer(data.number);\n\n\t\t// create parameters for post\n\t\tRequestParams params = new RequestPara...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the given player and hide his teammates if any.
@SuppressWarnings("deprecation") private void update(Player player) { Team team = teams.getTeam(player); if (team == null) { for (Player online : game.getPlayers()) { player.showPlayer(online); online.showPlayer(player); } return; ...
[ "void updatePlayer(Player player);", "public void hideForPlayer(Player p) { waitingBar.removePlayer(p); }", "public void updatePlayerData() {\n final Client client = Client.getInstance();\n client.getPlayerData(new ResponseHandler() {\n @Override\n public void handleResponse(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method Name: isHitableDestroyed Method Purpose: implementing isHitableDestroyed method Date created: 11112020 Date last modified: 11112020
@Override public boolean isHitableDestroyed() { return currentHealth <= 0; }
[ "public abstract boolean isDestroyed();", "@Override\n public boolean isDestroyed() {\n return destroyed;\n }", "public boolean isDestroyed(){\n\t\treturn entState == EntState.Destroyed;\n\t}", "public boolean isDestroyed() {\n\t\treturn isDestroyed;\n\t}", "public boolean isDestroyed(){\n \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test("SELECT FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME LIKE '%\\_p%' ESCAPE '\\'"); // SQL equivalent
@Test public void columnsWithColumnNameFilter() throws Exception { GetColumnsResp resp = BaseTestQuery.client.getColumns(null, null, null, LikeFilter.newBuilder().setPattern("%\\_p%").setEscape("\\").build()).get(); Assert.assertEquals(OK, resp.getStatus()); List<ColumnMetadata> columns = re...
[ "@Test\n public void columnsWithColumnNameFilterAndTableNameFilter() throws Exception {\n GetColumnsResp resp = BaseTestQuery.client.getColumns(null, null, LikeFilter.newBuilder().setPattern(\"%bits\").build(), LikeFilter.newBuilder().setPattern(\"%\\\\_p%\").setEscape(\"\\\\\").build()).get();\n A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the isFillable value for this DocumentRevision.
public void setIsFillable(java.lang.Boolean isFillable) { this.isFillable = isFillable; }
[ "public void setBillable(boolean billable) {\n\t\tthis.billable = billable;\n\t}", "public void setFillable() {\n if (filled == null) {\n filled = Collections.emptySet();\n unmodifiableFilled = filled;\n }\n }", "public java.lang.Boolean getIsFillable() {\n return i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a boolean indicating if a file that is being staged is a container or not.
public boolean isTransferringContainer() { return this.isContainerFile(); }
[ "public boolean isContainerFile() {\n return ( this.mType == PegasusFile.DOCKER_CONTAINER_FILE || \n this.mType == PegasusFile.SINGULARITY_CONTAINER_FILE ||\n this.mType == PegasusFile.SHIFTER_CONTAINER_FILE\n );\n }", "public boolean getIsContainer()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
render data in JSON format
private void renderJson(final SlingHttpServletResponse response, final Map<String, String> data) throws IOException { response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); final Writer out = response.getWriter(); //deliberately not closing, as ...
[ "protected static void renderJSON(Object data) {\n renderJSON(Jsonable.toPrettyJson(data));\n }", "public String getJson();", "private void jsonResponse() {\n try {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"infos\", infos);\n jsonObject.put(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use NotifyOnlineStatusOfDevRspMsg.newBuilder() to construct.
private NotifyOnlineStatusOfDevRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private NotifyOnlineStatusOfDevReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private CheckDeviceOnlineRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private CheckDeviceOnlineReqMsg(com.google.protobuf.G...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When we have finished a FunctionService element, we create the object and push it onto stack
private void endFunctionService() { Object top = stack.pop(); if (!(top instanceof FunctionServiceCreation)) { throw new CacheXmlException( "Expected a FunctionServiceCreation instance"); } FunctionServiceCreation fsc = (FunctionServiceCreation) top; cache.setFunctionServiceCreation(...
[ "private void startFunctionService() {\n stack.push(new FunctionServiceCreation());\n }", "private void endFunctionName() {\n Declarable d = createDeclarable();\n if (!(d instanceof Function)) {\n String s = String.format(\"A %s is not an instance of a Function\",\n d.getClass().getName())...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines whether the indicated flow type is one that is currently supposed to be followed.
private boolean shouldFollowFlow(FlowType currentFlowType) { boolean shouldFollowFlow = true; // Determine whether or not to follow this particular flow. if ((!followAllFlow) && ((currentFlowType.equals(RefType.COMPUTED_CALL) && !followComputedCall) || (currentFlowType.equals(RefType.COMPUTED_JUMP) && !fol...
[ "boolean willMatch(TokenType type) {\n\t\treturn current != null && current.getType() == type;\n\t}", "public boolean isFlow() {\n\t\tint[] incoming = new int[this.numVertices];\n\t\tint[] outgoing = new int[this.numVertices];\n\n\t\tfor (int i = 0; i < this.numVertices; i++){\n\t\t\tfor (int j = 0; j < this.numV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of creaPost method, of class GestisciPostController.
@Test public void testCreaPost() { System.out.println("creaPost"); Plugin plugin = null; GestisciPostController gpc = new GestisciPostController(); Post result = gpc.creaPost(plugin); assertEquals(sessione.getUserName(), result.getAutore()); assertEquals(sessione.getC...
[ "@Test\n public void testSetDatiPost() {\n System.out.println(\"setDatiPost\");\n Post p = new Post();\n p.setCorpo(new Testo());\n String titolo = \"titolo\";\n String testo = \"testo\";\n Visibilita visibilita = Visibilita.PRIVATO;\n List<Nodo> nodi = new Linked...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set link to get the next set of subscriptions.
public SubscriptionsResponse withNextLink(String nextLink) { this.nextLink = nextLink; return this; }
[ "public void setNext(Link next) {\n\t\tthis.next = next;\n\t}", "public void setNext(Linkable nextObject);", "public PurchasedPhoneNumbers setNextLink(String nextLink) {\n this.nextLink = nextLink;\n return this;\n }", "public void setNext(Cell link)\n { next = link; }", "void nextLink();"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the starting children. This overwrites the existing children.
public void setStartChildren(ArrayList<Entity> startChildren) { this.startChildren.clear(); this.startChildren.addAll(startChildren); }
[ "public void setChildren(List<BTreeNode<E>> newChildren) {\n\t\t//not adding in order, but does not matter because list is empty, and you will only call this method when the children are in order\n\t\tchildren.addAll(newChildren);\n\t\tfor (BTreeNode<E> child: newChildren) {\n\t\t\tchild.parent = this;\n\t\t}\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
determine whether a union is a nullable union; note that this function doesn't check containing types of the input union recursively.
public static boolean isAcceptableUnion(Schema in) { if (! in.getType().equals(Schema.Type.UNION)) return false; List<Schema> types = in.getTypes(); if (types.size() <= 1) { return true; } else if (types.size() > 2) { return false; /*contains more tha...
[ "boolean isUnionType();", "boolean isUnion();", "public boolean hasUnionDefNull() {\n return fieldSetFlags()[6];\n }", "private boolean isUnionSchemaType(final IntermediateDataStructure structure) {\n return (Util.hasAspect(structure, Shared.UNION_ASPECT_FULLY_QUALIFIED) && \n (!Util.visibleFi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rulePropertyValueExpression" $ANTLR start "entryRulePropertyReferenceExpression" InternalDsl.g:2636:1: entryRulePropertyReferenceExpression returns [EObject current=null] : iv_rulePropertyReferenceExpression= rulePropertyReferenceExpression EOF ;
public final EObject entryRulePropertyReferenceExpression() throws RecognitionException { EObject current = null; EObject iv_rulePropertyReferenceExpression = null; try { // InternalDsl.g:2637:2: (iv_rulePropertyReferenceExpression= rulePropertyReferenceExpression EOF ) ...
[ "public final EObject entryRulePropertyReference() throws RecognitionException {\n EObject current = null;\n\n EObject iv_rulePropertyReference = null;\n\n\n try {\n // InternalDsl.g:2693:2: (iv_rulePropertyReference= rulePropertyReference EOF )\n // InternalDsl.g:2694:2: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "UpdateDeploymentResult" element
void unsetUpdateDeploymentResult();
[ "void setUpdateDeploymentResult(com.conferma.cpapi.UpdateDeploymentResponse updateDeploymentResult);", "void setUpdateDeploymentResponse(com.conferma.cpapi.UpdateDeploymentResponseDocument.UpdateDeploymentResponse updateDeploymentResponse);", "com.conferma.cpapi.UpdateDeploymentResponse getUpdateDeploymentResul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the center Y location of this object. This should be from the top left position.
public void setCenterY(float y) { dimensions.y = y - getHeight() / 2; }
[ "public void setCenterY(int y) {\n center.setY(y);\n }", "public void setYCenter(int y) {\r\n\t\tsetY(y - getHeight() / 2);\r\n\t}", "public void setCenterY(double y) { centerY.set(clamp(y, Y_MIN, Y_MAX)); }", "public void setCenterY(float cY)\n {\n this.body.setCenterY(cY);\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Computes gradient in the y direction.
private final float yGradient(float[] data, int x, int y) { return data[(y+1)*width+x] - data[(y-1)*width+x]; }
[ "public double getGradient() {\n\t\tint xDiff = end.getX() - begin.getX();\n\t\tint yDiff = end.getY() - begin.getY();\n\t\treturn Math.atan2(yDiff, xDiff);\n\t}", "public void calculateGradient() {\r\n }", "private final float xGradient(float[] data, int x, int y) {\n return data[y*width+x+1] - data[y*wi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SingleValue__Group_0__0__Impl" $ANTLR start "rule__SingleValue__Group_0__1" InternalTaskDefinition.g:2859:1: rule__SingleValue__Group_0__1 : rule__SingleValue__Group_0__1__Impl ;
public final void rule__SingleValue__Group_0__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalTaskDefinition.g:2863:1: ( rule__SingleValue__Group_0__1__Impl ) // InternalTaskDefinition.g:2864:2: rule__SingleValue__Group_0__1__Impl ...
[ "public final void rule__SingleValue__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:2890:1: ( rule__SingleValue__Group_1__0__Impl rule__SingleValue__Group_1__1 )\n // InternalTaskDefinition.g:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Bred Date Estimate' attribute. If the meaning of the 'Bred Date Estimate' attribute isn't clear, there really should be more of a description here...
Date getBredDateEstimate();
[ "public Date getBudgetDate() {\n return (Date) getAttributeInternal(BUDGETDATE);\n }", "public Date getBudgetDate() {\n return (Date)getAttributeInternal(BUDGETDATE);\n }", "public Number getBudgetAsToDate() {\n return (Number) getAttributeInternal(BUDGETASTODATE);\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ SETTERS/GETTERS setup game camera
public void setCamera() { /* camera height: 0.5 world height camera width: 0.5 world width */ camera = new OrthographicCamera(); viewport = new StretchViewport(LotCG.V_WIDTH / LotCG.V_SCALE / 1.75f, LotCG.V_HEIGHT / LotCG.V_SCALE / 1.75f, camera); camera.p...
[ "private void setupCamera() {\n\t\tcamera = new Camera(new Vector3f(0.0f, 0.0f, 0.0f), new Vector3f(0.0f, 0.0f, 0.0f), 0.01f, 1000.0f);\n\t\tcamera.applyPerspective();\n\t}", "public static void setCameraFrame() {\n\t\tCAMERA.src = VERTICES[CAMERA.v];\n\t\tVector zc = CAMERA.src.d.scale(-1).normalized();\n\t\tCAM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the failed scan LED timeout was received. Note that this will also be true if the post scan delay has been received, not just if the fail scan timeout has been received.
public boolean didReceiveFailedScanLedTimeout() { return hasFailedScanLedTimeout || hasPostScanDelayTimeout; }
[ "public boolean didReceiveSuccessfulScanLedTimeout() {\n return hasSuccessfulScanLedTimeout || hasFailedScanLedTimeout || hasPostScanDelayTimeout;\n }", "boolean hasIfInL2MismatchTimeouts();", "public boolean didReceivePostScanDelayTimeout() {\n return hasPostScanDelayTimeout;\n }", "boole...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When the local audio is muted, we should adjust the buttons and audio stream
public void onLocalAudioMuteClicked(View view) { // Change the value of muted mMuted = !mMuted; // Update the agora engine with the mute mRtcEngine.muteLocalAudioStream(mMuted); // Get the correct mute button int res = mMuted ? R.drawable.btn_mute : R.drawable.btn_unmute;...
[ "public void buttonSound() {\n if (!mutedSound) {\n try {\n AudioInputStream ais = AudioSystem.getAudioInputStream(buttonSound);\n Clip sound = AudioSystem.getClip();\n sound.open(ais);\n FloatControl gainControl = (FloatControl) sound.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field789' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField789() { field789 = null; fieldSetFlags()[789] = false; return this; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField123() {\n field123 = null;\n fieldSetFlags()[123] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retourne la date de la session du Talk.
public Date getDateSession() { if (this.session != null) { return this.session.getDateFormat(); } else { return null; } }
[ "public java.util.Date getSessionDate() {\n return sessionDate;\n }", "protected String getSessionTimestamp() {\n \t\t// Main should have set the session start-up timestamp so return that. \n \t\t// Return the \"now\" time if not available.\n \t\tString ts = FrameworkProperties.getProperty(\"eclipse.sta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the cuboNome value for this Atributo.
public void setCuboNome(java.lang.String cuboNome) { this.cuboNome = cuboNome; }
[ "public java.lang.String getCuboNome() {\n return cuboNome;\n }", "public void setName(String nome)\n {\n this.nome = nome;\n }", "public void setNomeCooperativa(String nomeCooperativa) {\n this.nomeCooperativa = nomeCooperativa;\n }", "@Override\n\tpublic void setNome(java.lang.Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENLAST:event_ratioPlotOptionsJButtonMouseEntered Change the cursor back to the default cursor.
private void ratioPlotOptionsJButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ratioPlotOptionsJButtonMouseExited setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); }
[ "private void ratioPlotHelpJButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ratioPlotHelpJButtonMouseExited\r\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\r\n }", "private void helpJButtonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_helpJButtonM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the catch that will returns Result.
public static <OUTPUT> Catch<OUTPUT, Result<OUTPUT>, RuntimeException> toResult() { return new Catch<OUTPUT, Result<OUTPUT>, RuntimeException>() { public Result<OUTPUT> doCatch(OUTPUT data, Exception exception) { if (exception != null) return Result.o...
[ "public Catch getCatch_() {\n\t\treturn catch_;\n\t}", "public T getOrThrow() {\n if (hasResult) {\n return value;\n } else {\n throw new ReflectionException(exception);\n }\n }", "public Object getResultOrThrowable() throws Throwable {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a directed edge from first that points to second
void addDirectedEdge(final Node first, final Node second) { if ( first == second ) { return; } else if (first.connectedNodes.contains(second)) return; else first.connectedNodes.add(second); }
[ "void addEdge(Node node1, Node node2);", "public void addEdge(int first, int second) {\n checkVertex(first);\n adjacencyList.get(first).add(second);\n }", "void addEdge(int source, int destination, int weight);", "public void addEdge(Vertex source, Vertex target);", "@Override\n\tpublic voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated Property Getter for attribute SYM122
@Override public java.lang.Object getSym122() throws G2AccessException { java.lang.Object retnValue = getAttributeValue (SYM_122_); return (java.lang.Object)retnValue; }
[ "@Override\n public java.lang.Object getSym188() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SYM_188_);\n return (java.lang.Object)retnValue;\n }", "@Override\n public java.lang.Object getSym111() throws G2AccessException {\n java.lang.Object retnValue = getAttributeVa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This is the onCreate method which initiates by Android Also the method is modified to initiate the view of calendar
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_calendar); mNavigationDrawerFragment = (NavigationDrawerFragment) getSupportFragmentManager() .findFragmentById(R.id.navigation_drawer); mTitle = getTitle(); // Set up the...
[ "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_navigation_screen);\n\n //calendarView = (CalendarView) findViewById(R.id.calendarView);\n //myDate = (TextView) findViewById(R.id.myDate);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method empties the hand, which is ArrayList of Cardobjects. All of the cards in handlist are put to decklist.
public void emptyHand() { this.hand.forEach(card -> { this.deck.addToDeck(card); }); this.hand.clear(); }
[ "public void removeAllCards() {\r\n\t\tcardsInHand = new CardList();\r\n\t}", "public void clearHand() {\n\t\tthis.aHand = new Chips[aHand.length];\n\t}", "public void clear() {\n deck.clear();\n }", "public void freshHand() {\n\t\tfor (int i = hand.size() - 1; i >= 0 ; i--) { \n\t\t\thand.remove(ta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CodePtr getNextCooperative( ClassReference introducingClass, String methodName, CodePtr currentImpl )
public Object execute( ObjectReference target, Object param1, Object param2, Object param3 ) { // CodePtr getNextCooperative( ClassReference introducingClass, String methodName, CodePtr currentImpl ) // RDictionary cooperationChains = (RDictionary)target.invoke( Environment.Object, "getIV", Co...
[ "public InterfaceDescriptor<?> getNext() {\n\t\treturn method.getNext();\n\t}", "private void findNext() {\n\t\tnext = null;\n\t\twhile (impl.hasNext()) {\n\t\t\tSerializable current = impl.next();\n\t\t\tif (clazz.isAssignableFrom(current.getClass())) {\n\t\t\t\tnext = current;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
================= GETTERS =============== Get a UniversalQuote from the desired index. (Mainly used for testing)
public UniversalQuote getAtIndex(int _index) { if (_index < 0 || _index > this.sortedQuotes.size() - 1) { throw new IndexOutOfBoundsException(); } return this.sortedQuotes.get(_index); }
[ "private static Quote getQuoteFromDB(int randomQuoteIndex) {\n\t\treturn new Quote(randomQuoteIndex, \"If you ain't first, you last.\" + randomQuoteIndex, \"Ricky Bobby\");\n\t}", "@ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXGET)\n default IData getAt(int index) {\n \n return notSupported...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Align ca2 onto ca1.
public AFPChain align(Atom[] ca1, Atom[] ca2, Object param) throws StructureException{ if ( ! (param instanceof CeParameters)) throw new IllegalArgumentException("CE algorithm needs an object of call CeParameters as argument."); params = (CeParameters) param; int ca2length = params.getCheckCircular()...
[ "private void makeAlignment(char c1, char c2) {\n sb1.append(c1);\n sb2.append(c2);\n }", "public abstract void doAlignment(String sq1, String sq2);", "public String alignAndFormat(Sequence seq1, Sequence seq2) {\n return outputFormatter.format(align(seq1, seq2));\n }", "public st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the paquete personaje.
public void setPaquetePersonaje(final PaquetePersonaje paquetePersonaje) { this.paquetePersonaje = paquetePersonaje; }
[ "public void setPaquetePersonaje(final PaquetePersonaje paquetePersonaje) {\r\n\tthis.paquetePersonaje = paquetePersonaje;\r\n }", "public void setAutor (Pessoa p){\n }", "public void setProprietaire(SystemeAmendesInt.Personne proprietaire) {\n this.proprietaire = proprietaire;\n }", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renames the given key. Throws error if key doesn't exist, or the entry is readonly.
void renameKey(String section, String oldKey, String newKey);
[ "Key replaceKey(Entry<Key, Value> entry, Key key) throws InvalidKeyException;", "public void setKeyName(String newName){\n\n //assigns the value newName to the keyName field\n this.keyName = newName;\n }", "void replaceKey(Entry<K, V> entry, K key) throws IllegalArgumentException;", "public StatusReply...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
applies the sigmoid function to all elements in an matrix Input matrix is changed.
private void sigmoid(double[][] matrix) { // Sigmoid function: // = 1/(1+e^(-(inputs.weights))) for (int i = 0; i < matrix.length; i++) { for (int j = 0; j < matrix[0].length; j++) { matrix[i][j] = 1.0 / (1.0 + Math.exp(-matrix[i][j])); } } }
[ "public SimpleMatrix sigmoid(SimpleMatrix A){\n SimpleMatrix B = new SimpleMatrix(A);\n for (int i=0; i<B.numRows(); i++){\n for (int j=0; j<B.numCols(); j++){\n B.set(i,j,sigmoid(B.get(i,j)));\n }\n }\n return B;\n }", "public DoubleMatrix apply...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the Selected map.
public static void set_SelectedMapName(String _SelectedMapName) { CurrentGameSession._SelectedMapName = _SelectedMapName; }
[ "public void set_SelectedMap(int Index)\r\n\t{\r\n\t\t_SelectedMap = Index;\r\n\t}", "public int get_SelectedMap() {\r\n\t\treturn _SelectedMap;\r\n\t}", "public void setSelectedMap(MapPreset preset) {\r\n\t\tselectedMap = preset;\r\n\t}", "public void setSelectedTile(Point selectedTile) {\n\t\tthis.selectedT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a CommandAPDU and encrypts it.
private CommandAPDU createCommandAPDU(byte[] commandNonce, byte[] responseNonce, byte[] commandAPDU) throws Exception { this.validateNonce = responseNonce; int toFill = 64 - (commandNonce.length + responseNonce.length + commandAPDU.length); byte[] encrypted; if (toFill > 0) encrypted = encrypt(...
[ "public CardCommandAPDU(byte[] commandAPDU) {\n\tSystem.arraycopy(commandAPDU, 0, header, 0, 4);\n\tsetBody(ByteUtils.copy(commandAPDU, 4, commandAPDU.length - 4));\n }", "private static CommandAPDU genCommand(String commandString) {\n String[] byteStrings = commandString.split(\" \");\n ByteArra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Quizzes on the genre of a movie. First picks a random popular movie to quiz on and then asks the user.
public final void quizGenre() { quizzedMovie = randomPopMovie(); leftText += "\n What genre is the movie " + quizzedMovie.getTitle() + "?"; }
[ "public final void quiz() {\n Random generator = new Random();\n\n // random question type. currently 5 types\n questionType = generator.nextInt(5);\n\n leftText += \"\\n Question number \" + questionNum;\n\n // ask the random question\n if (questionType == 0) {\n quizGenre();\n\n } else i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method returns the value of the database column V_RP_WK_BRANCH_3G.PSR99_DRPR
public Float getPsr99Drpr() { return psr99Drpr; }
[ "public Float getPsr99Drpr() {\r\n return psr99Drpr;\r\n }", "public int getPRDNO() {\n return PRDNO;\n }", "public java.lang.String getRDS_PRC_periodCode(\n ) {\n return this._RDS_PRC_periodCode;\n }", "public BigDecimal getBigDecimalNRR() {\n return fieldNRR.getBigDec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether this state is globally terminal. A globally terminal job is complete and cannot fail any more and will not be restarted or recovered by another standby master node. When a globally terminal state has been reached, all recovery data for the job is dropped from the highavailability services.
public boolean isGloballyTerminalState() { return terminalState == TerminalState.GLOBALLY; }
[ "boolean hasIsTerminal();", "public boolean checkTerminal() {\r\n\r\n\t\tif (this.getNextState() instanceof Cancelled) {\r\n\t\t\tSystem.out.println(\"User Has cancelled the transaction\");\r\n\t\t\treturn true;\r\n\t\t} else if (this.getNextState() instanceof Completed) {\r\n\t\t\tSystem.out.println(\"Congratula...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RequestPort__Group__5__Impl" $ANTLR start "rule__RequestPort__Group__6" InternalComponentDefinition.g:2244:1: rule__RequestPort__Group__6 : rule__RequestPort__Group__6__Impl ;
public final void rule__RequestPort__Group__6() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalComponentDefinition.g:2248:1: ( rule__RequestPort__Group__6__Impl ) // InternalComponentDefinition.g:2249:2: rule__RequestPort__Group__6__I...
[ "public final void rule__RequestPort__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:2221:1: ( rule__RequestPort__Group__5__Impl rule__RequestPort__Group__6 )\n // InternalComponentDefinitio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Block Iterator for container. Each container type need to implement this interface.
public interface BlockIterator<T> extends Closeable { /** * This checks if iterator has next element. If it has returns true, * otherwise false. * @return boolean */ boolean hasNext() throws IOException; /** * Seek to first entry. */ void seekToFirst(); /** * Seek to last entry. */ ...
[ "public Iterator getIterator() {\n\t\t\n\t\treturn blocks.iterator();\n\t\t\n\t}", "abstract public Iterator<BlockReportReplica> iterator();", "public Iterator<Item> iterator() {\n return new LinkedBagIterator();\n }", "@Override\r\n\tpublic Iterator<Item> iterator() {\r\n\t\treturn new BagIterator(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "modifiers" $ANTLR start "classDeclaration" Java.g:221:1: classDeclaration : ( normalClassDeclaration | enumDeclaration );
public final void classDeclaration() throws RecognitionException { int classDeclaration_StartIndex = input.index(); try { dbg.enterRule(getGrammarFileName(), "classDeclaration"); if ( getRuleLevel()==0 ) {dbg.commence();} incRuleLevel(); dbg.location(221, 1); try { ...
[ "public interface ClassDecl extends Term, TopLevelDecl, ClassMember {\n /**\n * The type of the class declaration.\n */\n ParsedClassType type();\n\n /**\n * Set the type of the class declaration.\n */\n ClassDecl type(ParsedClassType type);\n\n /**\n * The class declaration's fla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flip the tile vertically
public void flipVertical() { this.data = flipGridVertical(data); computeHashes(); }
[ "public void flipVertically() {\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = 0; j < width / 2; j++) {\n pieceGrid[i][j] = pieceGrid[i][j] ^ pieceGrid[i][width - j - 1];\n pieceGrid[i][width - j -1] = pieceGrid[i][j] ^ pieceGrid[i][width- j - 1];\n pieceGrid[i][j] = pieceGrid[i][j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Switch to the next widget view (all > account1 > ... > account n > unread > starred) This must be called on a background thread
public synchronized void switchToNextView() { switch(mViewType) { // If we're in starred and there is more than one account, go to "all mail" // Otherwise, fall through to the accounts themselves case STARRED: if (EmailContent.count(sC...
[ "public void toNextView() {\n //false: receiver, true: donor\n\n if (preferences.getBoolean(\"role\", false))\n {\n startActivity(toDonor);\n }\n else {\n startActivity(toReceiver);\n }\n }", "private void nextScreen() \n\t{\n\t\tIntent intent=nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks app for updates or maintenance
private void checkAppStatus() { mDataRef.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { boolean underMaintenance = false; if(dataSnapshot.child("maintenance").exists()) { ...
[ "private void checkNewAppVersionState() {\n\n appUpdateManager\n .getAppUpdateInfo()\n .addOnSuccessListener(new OnSuccessListener<AppUpdateInfo>() {\n @Override\n public void onSuccess(AppUpdateInfo appUpdateInfo) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the first cell chosen by the user.
@Override public Cell firstCell() { return this.selectCell(); }
[ "public CellPanel getFirstCell() {\n\t\treturn cells.get(0);\n\t}", "@VisibleForTesting\n Cell first() {\n return this.getCellSet().first();\n }", "public int GetFirstPossibleValueInTheCell()\n {\n return this._valuesToPut.get(0);\n }", "private Cell findFirstEmptyCell() {\n\t\t// find first...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }