query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Creates a ForumListAdapter, automatically queues a load.
public ForumListAdapter createForumAdapter(int id, AwfulUpdateCallback frag) { ForumListAdapter ad = new ForumListAdapter(id, frag); fragments.add(ad); return ad; }
[ "private void initialiseListView(){\n if (loader != null) loader.interrupt();\n if (this.openSections == null) this.openSections = new ArrayList<>();\n\n this.spinner.setVisibility(View.VISIBLE);\n loader = new Thread(new Runnable(){\n\n private void updateUI(final RecordListA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a position to another.
public Position add(Position p) { return new Position(r + p.getR(), c + p.getC()); }
[ "public void addPosition(int position);", "@Indexable(type = IndexableType.REINDEX)\r\n\tpublic Position addPosition(Position position);", "public void addPosition(Position position) {\n positions.add(position);\n }", "@Override\n\tpublic company.model.Position addPosition(company.model.Position pos...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .com.xiaomi.zhibo.crawler.pb.Comment comments = 2;
public java.util.List<? extends com.xiaomi.zhibo.crawler.pb.PbComment.CommentOrBuilder> getCommentsOrBuilderList() { return comments_; }
[ "com.xiaomi.zhibo.crawler.pb.PbComment.Comment getComments(int index);", "java.util.List<? extends com.xiaomi.zhibo.crawler.pb.PbComment.CommentOrBuilder> \n getCommentsOrBuilderList();", "java.util.List<com.xiaomi.zhibo.crawler.pb.PbComment.Comment> \n getCommentsList();", "com.xiaomi.zhibo.cra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs method FacultyGetObject in Cache. default argument force set to 0
public com.intersys.objects.Oid FacultyGetObject () throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0]; com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("FacultyGetObject",args,com.intersys.objects.Database.RET_PRIM); ...
[ "public com.intersys.objects.Oid FacultyGetObject (java.lang.Integer force) throws com.intersys.objects.CacheException {\r\n com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1];\r\n args[0] = new com.intersys.cache.Dataholder(force);\r\n com.intersys.cache.Dataholder res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For each test, we search an storage on the database and we use this storage to do the different tests. Identifier The aim of this test is to see if the method returns the identifier.
public void testgetIdentifier_0(){ Database b = new Database(); assertTrue(b.storage.getIdentifier() == 0); }
[ "public void testsetIdentifier_0(){\r\n\t\tDatabase b = new Database();\r\n\t\tb.storage.setIdentifier(133);\r\n\t\tassertTrue(b.storage.getIdentifier() == 133);\r\n\t}", "@Test\n public void testGetIdentifierType() {\n String identifierString = identifier.getIdentifier();\n assertSame(identifier...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Identification of a BigQuery source used in the Dataflow job. repeated .google.dataflow.v1beta3.BigQueryIODetails bigquery_details = 3;
@java.lang.Override public java.util.List<com.google.dataflow.v1beta3.BigQueryIODetails> getBigqueryDetailsList() { return bigqueryDetails_; }
[ "@java.lang.Override\n public com.google.dataflow.v1beta3.BigQueryIODetails getBigqueryDetails(int index) {\n return bigqueryDetails_.get(index);\n }", "@java.lang.Override\n public java.util.List<? extends com.google.dataflow.v1beta3.BigQueryIODetailsOrBuilder>\n getBigqueryDetailsOrBuilderList() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the enemy drops a weapon, and allow the player to choose to equip (or not)
public void determineDrop() { int drop = random.nextInt(100); //random integer from 0 to 99 (percentage possible outcome) if((drop >= 0) && (drop < 15)) //15% drop rate of weapons { String category = player.getWeaponCategory(); //Gets appropriate category of weapon String material = player.ge...
[ "public boolean heldsWeapon() {\n return mc.player.getHeldItemMainhand().getItem() instanceof ItemSword\n || mc.player.getHeldItemMainhand().getItem() instanceof ItemAxe\n || mc.player.getHeldItemMainhand().getItem() instanceof ItemPickaxe;\n }", "@Override\n public fina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reconoce la categoria lexica de la palabra pasada como parametro
private CategoriaLexica reconoceCategoria(String palabra) { // Comprobamos que no sea el fin de fichero if (palabra.equals("fin")) return CategoriaLexica.TFin; // Buscamos la categoria lexica a la que pertenece la palabra CategoriaLexica c = simbolo(palabra); if (c != null) return c; // Mir...
[ "public void notificarCategoria (String categoria);", "public static void categoriaLetra(char[][] arreglo, String categoriaBuscada, char letraBuscada) {\n int fila, col;\r\n int posFila = 0; // posCol = 0;\r\n boolean existeCategoria = false, existeLetra = false;\r\n\r\n // Recorro el ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets number of moons
public int getMoonCount() { return _moonCount; }
[ "int getMonsterCount();", "public void setMoonCount(int _moonCount) {\r\n\t\tthis._moonCount = _moonCount;\r\n\t}", "public int numMoose() {\n \tint ct = 0;\n \t\n \tfor(int i = 0; i < rooms.size(); i++)\n \t{\n \t\tMITH_Card card = rooms.get(i).top_card;\n \t\tif(card.getType() == MITH_Card.ROOMMOOSE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves all application information items from this annotation
public XmlObject[] getApplicationInformation();
[ "public List<ApplicationItem> getApplicationItems();", "public static List<AppInfo> getAppsInfo() {\n List<AppInfo> list = new ArrayList<>();\n PackageManager pm = getApp().getPackageManager();\n List<PackageInfo> installedPackages = pm.getInstalledPackages(0);\n for (PackageInfo pi : ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all classes resolved to implement the given interface, in no particular order, limited to the classes in this type hierarchy's graph. Returns an empty collection if the given type is a class, or if no classes were resolved to implement the given interface.
IType[] getImplementingClasses(IType type);
[ "IType[] getAllClasses();", "public static Set<Class<?>> getAllInterfacesForClassAsSet(Class<?> clazz) {\n return getAllInterfacesForClassAsSet(clazz, null);\n }", "private List<Class<?>> getClassHierarchy(final Class<?> type) {\n List<Class<?>> hierarchy = new ArrayList<Class<?>>(20);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enable verbose gRPC logging
private static void configureLogging() { Logger.getLogger("io.grpc").setLevel(Level.ALL); Logger.getLogger("io.grpc.netty.shaded").setLevel(Level.ALL); ConsoleHandler stderr = new ConsoleHandler(); stderr.setLevel(Level.ALL); Logger.getLogger("").addHandler(stderr); }
[ "public void setVerbose(Boolean v) { this.verbose = v; }", "public void setVerbose(boolean value);", "public void verbose() {\r\n isVerbose = true;\r\n }", "public void enableVerboseLogging(boolean verbose) {\n synchronized (sLock) {\n if (verbose) {\n mVerboseLog = mLog;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of Catalogos
public Catalogos() { }
[ "public com.alain.puntocoma.model.Catalogo create(long catalogoId);", "public CatalogoProductos() {\n initComponents();\n }", "public ControladorCatalogoServicios() {\r\n }", "public CatalogoResource() {\n }", "public Producto() {\n }", "public CatalogBean() {\n }", "public CrearPr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the publisher metadata.
public UserMetadata getPublisherMetadata() { return this.publisherMetadata; }
[ "public String getPublisher() {\n return publisher;\n }", "public String publisherName() {\n return this.innerProperties() == null ? null : this.innerProperties().publisherName();\n }", "public static final String getPublisherName() { return publisherName; }", "Map<String, Object> getMetadata();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column tab_rpf.auto_date
public void setAutoDate(Date autoDate) { this.autoDate = autoDate; }
[ "public Date getAutoDate() {\r\n return autoDate;\r\n }", "public void setAutoPayDate(java.lang.String autoPayDate) {\r\n this.autoPayDate = autoPayDate;\r\n }", "public void setREP_DATE(Date REP_DATE) {\r\n this.REP_DATE = REP_DATE;\r\n }", "public void setACTUAL_NEXT_RATE_REV_D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a value of 'productionSteps' attribute. ordered list of scheduled production steps
public void setProductionSteps( List< ProductionStep > aProductionSteps ) { clearProductionSteps(); for( ProductionStep value : aProductionSteps ) { addToProductionSteps( value ); } }
[ "public List< ProductionStep > getProductionSteps()\n {\n return Collections.unmodifiableList( this.productionSteps );\n }", "public void addToProductionSteps( int aIndex, ProductionStep aProductionStepsValue )\n {\n productionSteps.add( aIndex, aProductionStepsValue );\n aProduction...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The WizardSelectionPage implementation of an IDialogPage method disposes of all nested wizards. Subclasses may extend.
@Override public void dispose() { super.dispose(); // notify nested wizards for (int i = 0; i < selectedWizardNodes.size(); i++) { ((IWizardNode) selectedWizardNodes.get(i)).dispose(); } }
[ "@Override public void onExitingPage(Wizard wizard) {\r\n// List<WizardPage> pages = wizard.getPages();\r\n// if (checkBox.isSelected()) {\r\n// pages.remove(page2);\r\n// } else {\r\n// if (! pages.contains(page2)) {\r\n// ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to setup the MaryInterface
private void configureInterface() { try { maryInterface = new LocalMaryInterface(); maryInterface.setVoice(DEFAULT_VOICE); maryInterface.setAudioEffects("Volume(amount:1.00)"); } catch (MaryConfigurationException e) { System.out.println("Unable to load mar...
[ "private void init() {\n\t\ttry {\n\t\t\tmarytts = new LocalMaryInterface();\n\t marytts.setVoice(\"cmu-slt-hsmm\");\n\t log.debug(\"MaryTTS instance triggered [voice = \" + marytts.getVoice().toString() + \"].\");\n\t\t} catch(MaryConfigurationException ex) {\n\t\t\tlog.error(\"An error occured while...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Triggered when mouse go out the cell
protected void cellMouseExited(int row, int col) { }
[ "public final void mouseOut() {\n\t\tonMouseOut();\n\t\tif(mouseOutEvent != null)\n\t\t\tmouseOutEvent.fire();\n\t}", "public void mouseExited(MouseEvent evt){}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(SuiMouseEvent e) {}", "@Override\n public void mouseExited(MouseEvent me)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test whether the indexed servo is enabled (m_servoMotor).
public boolean isServoEnabled(int axisIndex) { Validate.axisIndex(axisIndex, "axis index"); long motorId = nativeId(); boolean result = isServoEnabled(motorId, axisIndex); return result; }
[ "public boolean isServoEnabled(int dofIndex) {\n Validate.inRange(dofIndex, \"DOF index\", 0, 5);\n\n boolean result;\n if (dofIndex >= 3) {\n int axisIndex = dofIndex - 3;\n RotationMotor motor = getRotationMotor(axisIndex);\n result = motor.isServoEnabled();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the return address stack offset.
public void setReturnAddressOffset(int offset);
[ "public int getReturnAddressOffset();", "public void pushReturnAddress(){returnAddrs.push(pc);}", "public int popReturnAddress(){\n return (Integer)returnAddrs.pop();\n }", "public void ret() {\r\n runStack.popFrame();\r\n pc = returnAddrs.pop();\r\n }", "public Integer getStackOf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public byte[] GetStateInformation() Gets called when the module's state gets saved, typically when the user saves a preset with this module in it. Voltage Modular will automatically save the states of knobs, sliders, etc., but if you have any custom state information you need to save, return it from this function.
@Override public byte[] GetStateInformation() { //[user-GetStateInformation] Add your own code here LogToBuffer("GetStateInformation"); return null; //[/user-GetStateInformation] }
[ "com.google.protobuf.ByteString getStateData();", "@Override\n public List<List<Integer>> getStateInfo() {\n List<List<Integer>> currStateConfig = getVisualInfoFromPieces(STATE_INFO_IDENTIFIER);\n return Collections.unmodifiableList(currStateConfig);\n }", "public int getSavedState();", "@...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "KEYWORD_4" $ANTLR start "KEYWORD_5"
public final void mKEYWORD_5() throws RecognitionException { try { int _type = KEYWORD_5; int _channel = DEFAULT_TOKEN_CHANNEL; // ../org.leta.plugin.ui/src-gen/org/ui/contentassist/antlr/lexer/InternalLetaLexer.g:59:11: ( '+' ) // ../org.leta.plugin.ui/src-gen/or...
[ "public final void mKEYWORD_4() throws RecognitionException {\n try {\n int _type = KEYWORD_4;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.leta.plugin.ui/src-gen/org/ui/contentassist/antlr/lexer/InternalLetaLexer.g:57:11: ( '*' )\n // ../org.leta.plugin.ui/...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ load the speakers (list of Speaker)
private void loadSpeakers(){ for(int i = 0; i < utts_.size(); i++){ Utterance utt = utts_.get(i); String spk = utt.getSpeaker().toLowerCase().trim(); Set<String> spkSet = parts_.keySet(); if(!spkSet.contains(spk)){ Speaker speaker = new Speaker(sp...
[ "public void setSpeakers(List<Speaker> speakers) {\n this.speakers = speakers;\n }", "private void setSpeakers() {\n speakersList = DataHandler.getInstance(getContext()).getSpeakers();\n if (speakersList != null) {\n speakersAdapter = new SpeakersAdapter(getContext());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
array to store accounts noargument BankDatabase constructor to store account objects
public MyDatabase() { myAccounts = new MyAccount[5]; //just two accounts for demonstration myAccounts[0] = new MyAccount(30527849, 1992, 1000.0, 12000); myAccounts[1] = new MyAccount(94872503, 2117, 1200.0, 5100.0); myAccounts[2] = new MyAccount(14237983, 5559, 3500.0, 2500.0); myAccounts[3] = new MyA...
[ "public BankList() {\r\n // The array starts off at a size of 1\r\n // and grows as neccessary\r\n accounts = new BankAccount[1];\r\n\r\n }", "public AccountDatabase() {\n accounts = new Account[5];\n size = 0;\n }", "public Bank(String name, int accs){\n bankAccounts...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Applies the trigger to the given transformation.
public final void apply(Transformation<?> transformation){ if (appliesTo(transformation)) { action(transformation); } }
[ "public void applyTransformEffect(Transform transform) {\r\n\t\t\r\n\t}", "public void transform(AffineTransform Tx)\r\n\t{\r\n\t\t// System.out.println(\"transform\");\r\n\t}", "private void transform()\n {\n AST tree = this.parser.getParseTree();\n \n if (tree != null)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds another pathAndKeys value.
public DmcAttribute<?> addPathAndKeys(Object value) throws DmcValueException { DmcAttribute<?> attr = get(DmuDMSAG.__pathAndKeys); if (attr == null) attr = new DmcTypePathAndKeyMV(DmuDMSAG.__pathAndKeys); setLastValue(attr.add(value)); add(DmuDMSAG.__pathAndKeys,attr...
[ "public DmcAttribute<?> addPathAndKeys(PathAndKey value) {\n DmcAttribute<?> attr = get(DmuDMSAG.__pathAndKeys);\n if (attr == null)\n attr = new DmcTypePathAndKeyMV(DmuDMSAG.__pathAndKeys);\n \n try{\n setLastValue(attr.add(value));\n add(DmuDMSAG.__path...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the message indicating that a task was marked as completed.
public static String getCompleteTaskMessage(Task task) { return String.format(COMPLETE_TASK_MESSAGE, task); }
[ "public String getCompleted() {\n return completed;\n }", "com.netflix.conductor.proto.EventHandlerPb.EventHandler.TaskDetails getCompleteTask();", "public String printMarkTaskCompleteConfirmation(Task task) {\n return \"Nice! I've marked this task as done: \\n\"\n + task;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the specified esc sequence parameters form a bitmap sequence. If so, it returns an EscBitmap object. If not, the object given as first parameter will be returned.
static public PrintDataPart getEscBitmap(PrintDataPart obj, int type, int subtype, int value, String escdata, boolean negated, boolean valueispresent) { if (type == 'B' && subtype == 0 && escdata == null && !negated && valueispresent) { EscBitmap esc = new EscBitmap(); esc...
[ "static public PrintDataPart getEscBarcode(PrintDataPart obj, int type, int subtype, int value, String escdata, boolean negated, boolean valueispresent, int mapmode) {\r\n if (type == 'R' && subtype == 0 && !negated && escdata != null) {\r\n EscBarcode esc = new EscBarcode();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
skip: the converse of take. Given a list return another list containing those elements that follow the first 'howMany' elements. That is, if we skip(1,[1,2,3]) then we have [2,3] This is the curried implementation
public static <T> Function<List<? extends T>, List<T>> skip(final int howMany) { return input -> Functional.skip(howMany, input); }
[ "public static <T> Function<Iterable<T>, Iterable<T>> skip(final int howMany) {\r\n return input -> seq.skip(howMany, input);\r\n }", "public static <T> List<T> skip(final int howMany, final List<? extends T> list) {\r\n if (howMany < 0) throw new IllegalArgumentException(\"Functional.ski...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set driver configuration for Mozilla Firefox browser.
private static void setFirefox() { if (os.equals("win")) { System.setProperty("webdriver.gecko.driver", pathToDriver + "geckodriver.exe"); } else if (os.equals("mac")) { System.setProperty("webdriver.gecko.driver", pathToDriver + "geckodriver"); } else { Syste...
[ "private WebDriver setFirefoxDriver() {\n\t\t\n\t\t\n\t\tSystem.setProperty(\"webdriver.firefox.bin\",\n \"C:\\\\Users\\\\Sampada.Joshi\\\\AppData\\\\Local\\\\Mozilla Firefox\\\\firefox.exe\");\n\t\t\n\t\t//System.setProperty(\"webdriver.gecko.driver\", \"C:\\\\Users\\\\Sampada.Joshi\\\\AppData\\\\Lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ShortVarDecl__Group__2__Impl" $ANTLR start "rule__ShortVarDecl__Group__3" InternalGo.g:10045:1: rule__ShortVarDecl__Group__3 : rule__ShortVarDecl__Group__3__Impl ;
public final void rule__ShortVarDecl__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalGo.g:10049:1: ( rule__ShortVarDecl__Group__3__Impl ) // InternalGo.g:10050:2: rule__ShortVarDecl__Group__3__Impl { ...
[ "public final void rule__ShortVarDecl__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10022:1: ( rule__ShortVarDecl__Group__2__Impl rule__ShortVarDecl__Group__3 )\r\n // InternalGo.g:10023:2: rule_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
go into escape mode until a little away from enemies if there's a turretheavy base, should try to go towards that?
public static void escapeIfNecessary() throws GameActionException { MapLocation yourLoc = rc.getLocation(); RobotInfo[] nearbyHostiles = rc.senseHostileRobots(yourLoc, rc.getType().sensorRadiusSquared); Direction fleeDir; while(nearbyHostiles.length > 0) { int bufferRounds = 5; //extra rounds to run from...
[ "public static void checkTurnEnd(){\n\t\tboolean end = true;\n\t\tfor (int i = 0; i < heroList.length && end; i++) {\n\t\t\t\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tif (heroList[i].getOtherAction()){\n\t\t\t\t\tend = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (checkVictory()) {\n\t\t\tinBattle = false;\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the Y bottom bound of the highlight
public int getYBottomBound(){ return this.yBottomBound; }
[ "public int bottom(){\n return (y+ _height);\n }", "public int getBottom(){\n\t\treturn platformHitbox.y+height;\n\t}", "public float getHeightFromBottom() {\n return rowYPos - yMargin + topBorder;\n }", "public int getYBottomPosition()\r\n\t{\r\n\t\treturn Math.round(sprite.getPosition().y +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the logbase 2 of a number v
public static int log2( int v ) { int r; // r will be lg(v) int t, tt; // temporaries tt = v >>> 16; t = tt >>> 8; if(tt != 0) { r = (t != 0) ? 24 + LogTable256[t] : 16 + LogTable256[tt]; } else { r = (t != 0) ? 8 + LogTable256[t] : LogTable256[v]; } return r; }
[ "public static double logBase2(double x){\n return Math.log(x)/Math.log(2);\n }", "static int logbase2(int n) {\n\t\t\r\n\t\tint count = 0;//sets counter to 0\r\n\t\t\r\n\t\twhile (n != 0) {// divide n by 2, increase counter until n = 0\r\n\t\t\t\r\n\t\t\tn = n/2;\r\n\t\t\tcount++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that loads the specified image path into the view.
private void loadImage(String imagePath) { //Loading image from below url into imageView imageFile = new File(imagePath); Glide.with(getApplicationContext()) .load(imagePath) .transition(DrawableTransitionOptions.withCrossFade(300)) .into(imageView...
[ "@Override\n public void loadImage(String path, ImageView imageView) {\n mInteractor.loadImage(path, imageView);\n }", "@Override\r\n\tpublic void getImage(String path) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\timgPath = path;\r\n\t}", "public static Image loadImage(String path) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a given artifact object to an OBR entry.
private static OBREntry convertToOBREntry(ArtifactObject artifactObject, String obrBase) { String name = artifactObject.getName(); String symbolicName = artifactObject.getAttribute(BundleHelper.KEY_SYMBOLICNAME); String version = artifactObject.getAttribute(BundleHelper.KEY_VERSION); Str...
[ "public Object caseUma_Artifact(org.topcased.spem.uma.Artifact object) {\n\t\treturn null;\n\t}", "public Object caseArtifact(Artifact object) {\n\t\treturn null;\n\t}", "public Object caseArtifact(Artifact object) {\r\n\t\treturn null;\r\n\t}", "public Object caseArtifactDefinition(ArtifactDefinition object)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__LTE__Group__0__Impl" $ANTLR start "rule__LTE__Group__1" InternalDsl.g:18497:1: rule__LTE__Group__1 : rule__LTE__Group__1__Impl ;
public final void rule__LTE__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:18501:1: ( rule__LTE__Group__1__Impl ) // InternalDsl.g:18502:2: rule__LTE__Group__1__Impl { pushFollow(FOLLOW_2); ...
[ "public final void rule__LTE__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:18474:1: ( rule__LTE__Group__0__Impl rule__LTE__Group__1 )\n // InternalDsl.g:18475:2: rule__LTE__Group__0__Impl rule__LTE__Group...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column guu_wiki_entry_catalog_history.entry_version
public String getEntryVersion() { return entryVersion; }
[ "public int getHistoryVersion() {\n return historyVersion;\n }", "EntryVersion version();", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public int extractVersionNumber(JSONObject entryObject){\n\t\tint versionNumber = 1;\n\t\ttry {\n\t\t\tJSONObject s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This will set the V entry of the encryption dictionary. See PDF Reference 1.4 Table 3.13. Note: This value is used to decrypt the pdf document. If you change this when the document is encrypted then decryption will fail!.
public void setVersion(int version) { encryptionDictionary.setInt( "V", version ); }
[ "public void setEncryptionKey(LVValue encryptKey) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tmyData.encryptKey=encryptKey;\n\t}", "public void setUserKey(byte[] u) throws IOException\n {\n COSString user = new COSString();\n user.append( u );\n enc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all medical services by page
@RequestMapping(path = "medservices", method = RequestMethod.GET, params = "page") public List<MedicalService> getAllMedServicesByPage(@RequestParam int page){ return medicalServiceService.getAllMedServicesByPage(page); }
[ "@RequestMapping(path = \"medservices/search\", method = RequestMethod.GET, params = {\"name\",\"page\"})\n public List<MedicalService> getMedicalServicesByNamePaging(@RequestParam String name, @RequestParam int page){\n return medicalServiceService.findMedServicesbyNamePaging(name,page);\n }", "@Req...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for Bluetooth plugin
public BluetoothPlugin() { m_bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); m_bpBroadcastReceiver = new BPBroadcastReceiver(); try { Field actionUUID = BluetoothDevice.class.getDeclaredField("ACTION_UUID"); BluetoothPlugin.ACTION_UUID = (String) actionUUID.get(null); Log.d("BluetoothPlugin", "...
[ "public BluetoothRobotManager() {\n\t}", "BluetoothBATransmitter(Context context, ServiceListener l) {\n mContext = context;\n mServiceListener = l;\n mBinding = false;\n mUnbinding = false;\n mAdapter = BluetoothAdapter.getDefaultAdapter();\n IBluetoothManager mgr = mAda...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
try to get the lock, return true if success or false immediately return true if this machine already hold the lock return false if ZooKeeper service is disable
public boolean tryLock();
[ "public boolean tryToLock() {\n // System.out.println(\"[MOSI] trylock \"+ this.hashCode() + \"(\"+l.getHoldCount()+\")\");\n try {\n return this.l.tryLock(1, TimeUnit.MILLISECONDS);\n } catch (InterruptedException ie) {\n return false;\n }\n }", "public boolea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value related to the column: grn_start_no
public void setGrnStartNo (java.lang.String grnStartNo) { this.grnStartNo = grnStartNo; }
[ "public void setStartNo(java.lang.String startNo) {\n this.startNo = startNo;\n }", "public AuditQuery setStartRowNum(int value) {\n this.startRowNum = value;\n return this;\n }", "public void setSTARTG(int value) {\n this.startg = value;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a comment for a model class. The Java code merger should be notified not to delete the entire class in case any manual changes have been made. So this method will always use the "do not delete" annotation. Because of difficulties with the Java file merger, the default implementation of this method should NOT add c...
default void addModelClassComment(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {}
[ "protected void writeClassComment() throws JavaModelException {\r\n\t\tout.println(\"/**\");\r\n\t\tout.println(\" * Do not modify this file. This class has been generated.\");\r\n\t\tout.println(\" * Use inheritance or composition to add functionality.\");\r\n\t\tout.println(\" *\");\r\n\t\tout.println(\" * @autho...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
utility method to create Lookup from objectDefinition Object
public static Lookup createLookup(ObjectDefinition objectDefinition) { Lookup l = new Lookup(objectDefinition); return l; }
[ "public static Lookup createLookup(InputStream objectDefinition) {\r\n\r\n\t\tLookup l = new Lookup(objectDefinition);\r\n\t\treturn l;\r\n\r\n\t}", "public Lookup createLookup (Lookup lookup);", "private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the transactionDate attribute.
public void setTransactionDate(Date transactionDate) { this.transactionDate = transactionDate; }
[ "public void setTransactionDate(Date transactionDate) {\n\t\tthis.transactionDate = transactionDate;\n\t}", "public void setTxnDate(Date txnDate) {\n this.txnDate = txnDate;\n }", "public void setTransDate(Date transDate);", "public void setTrxDate(Date trxDate) {\r\n this.trxDate = trxDate;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column t_spec.SPEC_NAME
public void setSpecName(String specName) { this.specName = specName; }
[ "public void setSpecification(Class spec) {\n super.setSpecification(spec);\n if (m_id == null) {\n m_id = spec.getName();\n }\n }", "public void setSpec(String spec) {\n this.spec = spec;\n }", "public void setSetSpec(String val) {\n\n\t\tsetSpec = val;\n\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns whether the tile is destroyable or not
public boolean isDestroyable() { return destroyable; }
[ "public boolean isDestroyable()\n\t{\n\t\treturn _item.isDestroyable();\n\t}", "protected boolean canDespawn()\n {\n return !this.isTamed();\n }", "@Override\n public boolean isHitableDestroyed()\n {\n return currentHealth <= 0;\n }", "boolean allMyShipsAreDestroyed()\n\t{\n\t\tfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use Vector3.newBuilder() to construct.
private Vector3(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "public Vector3(){\r\n\t\ttag = \"unnamed\";\r\n\t}", "public Vector3() {\n }", "public Vector3(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Vector3(NBTTagCompound nbt)\n {\n this(nbt.getDouble(\"x\"), nbt.getDouble(\"y\"), nbt.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will set the IP address for the session and invoke a geolocation lookup. It should ideally only be invoked by the GeolocationInterceptor, but it is acceptable to invoke it otherwise.
void setSessionIp(final String ipAddress);
[ "public void setUserIp(String userIp) {\n this.userIp = userIp;\n }", "public void setIP(String IP) {\r\n this.IP = IP;\r\n }", "public void setIPAddress(String IP)\n { \n IPAddress = IP;\n }", "public abstract void setIp(java.lang.String newIp);", "public void setIp(Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds layer to neural network
public void addLayer(Layer layer) { // In case of null throw exception to prevent adding null layers if (layer == null) { throw new IllegalArgumentException("Layer cant be null!"); } // set parent network for added layer layer.setParentNetwork(this); ...
[ "public void addLayer(NeuralNetworkLayer arg0) {\n\n\t\targ0.setStartPos(SIZE);\n\t\t\n\t\tfor(int i = 0; i < arg0.size(); i++)\n\t\t\tlinkToNeuron.add(NUM_OF_LAYERS);\n\t\t\n\t\tlayers.add(arg0);\n\n\t\tNUM_OF_LAYERS++;\n\t\t\n\t\tSIZE += arg0.size();\n\t}", "public void addLayer(Layer layer) {\n _layers.add(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtain a URL to a WSDL file in the classpath
private static URL retrieveWsdlUrl(String filePath) { URL result = null; ClassLoader classLoader; if (filePath != null) { classLoader = Thread.currentThread().getContextClassLoader(); result = classLoader.getResource(filePath); } return result; }
[ "public abstract java.net.URL getWSDLDocumentLocation();", "public URL getWsdlLocation() {\n return wsdlLocation;\n }", "private String getWsdlPath(String wsdlFile) {\n return \"\";//help.getWsdlPath(wsdlFile);\n }", "public String getWsdlLocation()\r\n {\r\n return wsdlLocation;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ 0 if they are equal 1 if word1 is greater 2 if word2 is greater
public static int compare(String word1, String word2) { byte[] bytes1 = word1.getBytes(); byte[] bytes2 = word2.getBytes(); return Arrays.compare(bytes1, bytes2); }
[ "private int compareTokens(String token1,String token2){\n int l1 = token1.length(); //length of the first token\n int l2 = token2.length(); //length of the second token\n //in case of same length check for equals first\n if(l1 == l2 && token1.equals(token2)){ \n return l1;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "COMMANDCHAR" $ANTLR start "EPRESSIONCHAR"
public final void mEPRESSIONCHAR() throws RecognitionException { try { int _type = EPRESSIONCHAR; int _channel = DEFAULT_TOKEN_CHANNEL; // C:\\work\\art\\latest-code\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\src\\art\\grammar\\expression.g:128:14: ( '?' ) ...
[ "public final void mCOMMANDCHAR() throws RecognitionException {\n try {\n int _type = COMMANDCHAR;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:12...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Container's getter for EmployeesInDepartment
public EmployeesViewImpl getEmployeesInDepartment() { return (EmployeesViewImpl) findViewObject("EmployeesInDepartment"); }
[ "public ViewObjectImpl getEmployeesForDepartment() {\n return (ViewObjectImpl)findViewObject(\"EmployeesForDepartment\");\n }", "public Department getDepartment();", "List<Employee> getByDep(int departmentId);", "public List getInwDepartments(InwDepartment inwDepartment);", "public String getEmplo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Centers the window over a component (usually another window). The window must already have been sized.
public static void centerWindowOnComponent(Window window, Component over) { if ((over == null) || !over.isShowing()) { centerWindowOnScreen(window); return; } Point parentLocation = over.getLocationOnScreen(); Dimension parentSize = over.getSize(); Dimen...
[ "private void centerWindow() {\n\t\tsetLocation((int) (screenWidth / 2) - (getBounds().width / 2),\n\t\t\t\t(int) (screenHeight / 2) - (getBounds().height / 2));\n\t}", "public static void centerWindowOnScreen(Component component) {\r\n Dimension paneSize = component.getSize();\r\n Dimension screenS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load Music by filepath name
public Music loadMusic(String fileName);
[ "public Music loadMusic(String fileName, float volume);", "public abstract SoundContainer loadSound( String filename ) throws IOException;", "public Sound loadSound(String file);", "public void loadMusic(File f) {\n music = new MP3(f);\n }", "public void loadMusic(String filePath){\n if(s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enables or disabled base complex addition.
public void setAddBaseComplex(final boolean addBaseComplex) { this.addBaseComplex = addBaseComplex; }
[ "public void toggleAddBaseComplex()\n {\n this.addBaseComplex = !this.addBaseComplex;\n calculateBaseComplex();\n }", "public boolean isAddBaseComplex();", "public boolean isAddBaseComplex()\n {\n return this.addBaseComplex;\n }", "public void toggleBaseComplex();", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pass custom arguments (data) to javascript.
public void putArguments(final Object data) { if (null != _webview && null != _webview.getScriptEngine()) { _webview.getScriptEngine().whenReady(JsSnippet.getDispatchEvent(JfxJsEngine.EVENT_DATA, data)); } }
[ "@Override\n public void onClick(View v) {\n webView.loadUrl(\"javascript: \" + \"javaCallScriptArgs\" + \"('\" + \"i am args\" + \"')\");//带参数调用\n }", "Widget render(Object data);", "public native void appendData(String arg) /*-{\r\n\t\tvar jso = this.@com.emitrom.ti4j.core...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__FSM__Group_5_0__1__Impl" $ANTLR start "rule__FSM__Group_5_0__2" InternalTextEditor.g:568:1: rule__FSM__Group_5_0__2 : rule__FSM__Group_5_0__2__Impl ;
public final void rule__FSM__Group_5_0__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalTextEditor.g:572:1: ( rule__FSM__Group_5_0__2__Impl ) // InternalTextEditor.g:573:2: rule__FSM__Group_5_0__2__Impl { pu...
[ "public final void rule__FSM__Group_5_0_2__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTextEditor.g:626:1: ( rule__FSM__Group_5_0_2__1__Impl )\n // InternalTextEditor.g:627:2: rule__FSM__Group_5_0_2__1__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); YambaClient yambaCloud = new YambaClient("student", "password"); just wanted to catch any exception that will happen
@Override protected String doInBackground(String... params) { try { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); String username = prefs.getString("username", ""); String password = prefs.getString("username"...
[ "static void storeCredentials() {\n// MyLog.logCall();\n settings.edit()\n .putString(PREF_URL, _url)\n .putString(PREF_USER, _username)\n .putString(PREF_PASS, _password)\n .putBoolean(PREF_HACK, _sslHack)\n .putBoolean(PREF_H...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal constructor used to create a JoystickButtons value.
JoystickButtons(byte value, String name) { this.value = value; this.name = name; }
[ "private OI() {\n\t\t\n\t\tJoystickButton intakeIn = new JoystickButton(//gunner, \n\t\t\t\tdriver, JOYSTICK_INTAKE);\n\t\tJoystickButton intakeOut = new JoystickButton(//gunner, \n\t\t\t\tdriver, JOYSTICK_REVERSE_INTAKE);\n\t\tJoystickButton pivotOut = new JoystickButton(//gunner,\t\t\t\tThese create officially ea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String HOST = "jdbc:mysql://localhost:3306/DATABASE_NAME";
public void initConnection(){ String HOST = "jdbc:mysql://10.20.63.22:3306/cloud"; String USERNAME = "root"; String PASSWORD = "test"; try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } ...
[ "public void connect(String username, String password) {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n connect = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/?\" + \"user=\" + username + \"&password=\" + password + \"\");\n } catch (Exception e) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the modifier flags that enable singleselection. The default is MODIFIER_NONE. Singleselection has precedence over multiselection.
public void setSingleSelect(int modifiers) { _singleMods = modifiers; }
[ "public void setMultiSelect(int modifiers) {\n\t\t_multiMods = modifiers;\n\t}", "public void setMultiSelection(boolean multiSelection)\n {\n this.multiSelection = multiSelection;\n }", "public boolean isMultiSelection()\n {\n return multiSelection;\n }", "private void setSelectionMo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compare the LSNs referenced by a given Database to the lsns held in the utilization profile. Assumes that the database and environment is quiescent, and that there is no current cleaner activity.
public static void checkLsns(Database db) throws DatabaseException { checkLsns(DbInternal.getDbImpl(db), System.out); }
[ "protected void compareDBOnServer(List<ServerRun> checkConsistencyOnServers, String databaseName) {\n\n /*\n * Preliminar checks\n */\n\n // database must be present on all the servers\n\n String checkOnServer = \"\";\n List<ODatabaseDocument> dbs = new LinkedList<ODatabaseDocument>();\n for ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The popAll() method removes and returns all elements from the stack
@Override public List<T> popAll() { //if the stack is empty, throw an exception if(isEmpty()) { throw new StackUnderflowException(); } else { //else, record the stack in a List<T> object List<T> popList = new ArrayList<>(); for(int i = 0; i <=...
[ "public void popAllStacks(){\n // if top is lost then all elements are lost.\n top = null;\n }", "public void popAll(){\n \tthis.head = null;\n }", "@Override\n public List<T> popAll()\n {\n exceptionChecker();\n\n ArrayList<T> tempList = new ArrayList<>();\n\n int size =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the name of the persistencecapable superclass of a class.
public String getPersistenceCapableSuperClass(String classPath) throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError { final JDOClass clazz = getJDOClass(classPath); if (clazz == null) { return null; } final String name = clazz.getPersistenceCapableSup...
[ "public String getSuperclassName() {\n\treturn superclass_name;\n }", "public String getSuperClass(){\n\t\treturn targetClass.superName;\n\t}", "public String getSuperClass() {\n\t\treturn superField.getText();\n\t}", "@Override\n public String getParentClassSimpleName() {\n if (!isExtending()) r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Using the current set school code and generate the associated report of the current month
public void reportThisMonth() { if (schCode == null || schCode == "") return; Config.init(); java.util.Date date = now; Calendar cal = Calendar.getInstance(); cal.setTime(date); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH) + 1; int day = cal.get(Calendar.DAY_OF_MO...
[ "public void reportLastMonth() {\r\n\r\n\t\tmonthReport = true;\r\n\t\tif (schCode == null || schCode == \"\")\r\n\t\t\treturn;\r\n\r\n\t\tjava.util.Date date = new java.util.Date();\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.setTime(date);\r\n\t\tint year = cal.get(Calendar.YEAR);\r\n\t\tint month = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload. repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;
java.util.List<com.google.cloud.automl.v1.AnnotationPayload> getPayloadList();
[ "com.google.cloud.automl.v1.AnnotationPayload getPayload(int index);", "com.google.cloud.automl.v1.AnnotationPayloadOrBuilder getPayloadOrBuilder(int index);", "com.tencent.angel.serving.apis.prediction.PredictProtos.PredictResponse getResponse();", "com.tencent.angel.serving.apis.prediction.PredictProtos.Pre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds mappings for the specified types.
private void addMapping(Class... types) { for (Class type : types) { if (mappings.put(type.getSimpleName(), type.getName()) != null) { throw new IllegalStateException("A mapping already exists for " + type.getSimpleName()); } } }
[ "private void prepareTypeMappings()\r\n\t{\r\n\t\ttypeResolver\r\n\t\t\t\t.addAbstractTypeMapping(INotification.class, Notification.class)\r\n\t\t\t\t.addAbstractTypeMapping(IRequestInfo.class, RequestInfo.class)\r\n\t\t\t\t.addAbstractTypeMapping(IRequestedAnnouncement.class,\r\n\t\t\t\t\t\tRequestedAnnouncement.c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method constructs the countryList given the country_list.csv file.
public CountryList() { String line = ""; String comma = ","; countryList = new Hashtable<String,String>(); //a new hashtable to store our country list try { BufferedReader read = new BufferedReader(new FileReader("Project/src/main/java/statsVisualiser/gui/country...
[ "private void getCountries(File finput) throws Exception{\n\tFileInputStream fis = new FileInputStream(finput);\n\tBufferedReader br = new BufferedReader(new InputStreamReader(fis));\n\tString line = null;\n\tbr.readLine(); /* Read the first line and ignore it */\n\twhile ((line = br.readLine()) != null) {\n\t /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a page of data given a list of IDs
protected abstract List<T> readPage(List<ID> ids);
[ "private List<String> getMultipleUrl(Set<Integer> ids) {\n\t\tList<String> ret = new ArrayList<>();\n\t\tString s0 = \"https://en.wikipedia.org/w/api.php?\"\n\t\t+ \"format=json&action=query&pageids=\";\n\t\tint c = 0;\n\t\tString s = s0;\n\t\tfor (int i : ids) {\n\t\t// for (int i = 0; i < ids.size()-1; i++) {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the intersection of me with an ellipsoid.
public Vector3d getIntersection(Ellipsoid ell) { return ell.getIntersection(this); }
[ "public abstract Intersection getIntersectionEast();", "public Ellipsoid getEllipsoid() {\n return ellipse;\n }", "@Override\n public Intersection getIntersectionEast(){\n if(!mapLoaded){\n return null;\n }\n return extremIntersection[2];\n }", "public IExtent i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Default constructor for test class SolitaireTest
public SolitaireTest() { }
[ "public PilotoEstrellaTest()\n {\n }", "public TiendaBonsaisTest()\n {\n }", "public AllLaboTest() {\n }", "public ExemplaarTest()\n {\n }", "public pruebasTest()\n {\n }", "public AuxiliarTest()\n {\n }", "public CelulaEspecialUTest()\n {\n }", "public PerezosoT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new intent to open the Freakonomics Activity when the freakonomics view is clicked
@Override public void onClick(View v) { Intent freakanomicsIntent = new Intent(MainActivity.this, FreakonomicsActivity.class); //Start the new activity startActivity(freakanomicsIntent); }
[ "@Override\r\n public void onClick(View view) {\n Intent goCreateHabitIntent = new Intent(MainActivity.this, CreateHabit.class);\r\n startActivity(goCreateHabitIntent);\r\n }", "@Override\n public void onClick(View view) {\n Intent podD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the secondary progress value being displayed.
public void setSecondaryProgress(int progress) { mSecondaryProgress = Math.max(0, Math.min(100, progress)); postInvalidateOnAnimation(); }
[ "public void setProgress(int value);", "public void setSecondaryProgressColor(int color) {\n mSecondaryProgressPaint.setColor(color);\n postInvalidateOnAnimation();\n }", "void setProgress(float progress);", "private void setProgress() {\n score = (100 * current) / obstacles.length;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by zhou on 1684. OnImageLongClickListener
public interface OnImageLongClickListener { /** * 图片长按回调 * * @param imageUrls  全部图片链接 * @param position  当前图片位置 * @return true:已处理,false:未处理并交由imageClicked处理 */ boolean imageLongClicked(List<String> imageUrls, int position, Attributes attributes, RichText richText); }
[ "public void onLongClick(View v, Photo photo);", "void onItemLongClickListener(View view, int postion);", "public void onLongClick(View view, int position){\n }", "public interface OnItemLongClickListener {\n /**\n * Callback method to be invoked when an item in this view has been\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a BigInt from the given chararray.
public BigInt(final char[] s, final int slen) { assign(s, slen); }
[ "public static BigInteger byteArrayToBigIntegerCppCompatible(byte[] bytes) {\n byte[] twosComplement = new byte[bytes.length + 1];\n twosComplement[0] = 0;\n System.arraycopy(bytes, 0, twosComplement, 1, bytes.length);\n return new BigInteger(twosComplement);\n }", "public static void convertStrToArr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Container's getter for EmployeesVO2.
public ViewObjectImpl getEmployeesVO2() { return (ViewObjectImpl)findViewObject("EmployeesVO2"); }
[ "public ViewObjectImpl getEmployeesVO1() {\n return (ViewObjectImpl)findViewObject(\"EmployeesVO1\");\n }", "public ViewObjectImpl getEmployeesVO1() {\r\n return (ViewObjectImpl) findViewObject(\"EmployeesVO1\");\r\n }", "public ViewObjectImpl getEmployees_EVO1() {\n return (ViewObjec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Applies this function to the given argument.
R apply(boolean argument);
[ "public abstract Value apply(List<Value> args, Node location);", "public abstract Node apply(Node node);", "protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);", "void apply(T ctx);", "B apply(A a);", "public Object apply(FunctorData fd, String fn,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the _BIC_ZCWMLEQNT value for this _BIC_AZMDYX0000.
public void set_BIC_ZCWMLEQNT(java.math.BigDecimal _BIC_ZCWMLEQNT) { this._BIC_ZCWMLEQNT = _BIC_ZCWMLEQNT; }
[ "public void set_BIC_ZCWMLEY(java.math.BigDecimal _BIC_ZCWMLEY) {\r\n this._BIC_ZCWMLEY = _BIC_ZCWMLEY;\r\n }", "public void set_BIC_ZCWMLEQNY(java.math.BigDecimal _BIC_ZCWMLEQNY) {\r\n this._BIC_ZCWMLEQNY = _BIC_ZCWMLEQNY;\r\n }", "public void set_BIC_ZCWMLEQN(java.math.BigDecimal _BIC_ZCWM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a token from this area.
public Token removeToken(Token token) { if (this.getTokens().contains(token)) { this.freeSlots.addAll((Collection<? extends Slot>) token.getOccupiedSlots().clone()); this.occupiedSlots.removeAll((Collection<? extends Slot>) token.getOccupiedSlots().clone()); this.getTokens()....
[ "void removeToken(String token);", "public AuthorizationToken removeToken(String token);", "public void removeToken(Token token) {\n synchronized (this) {\n int index = -1;\n for (int i = 0; i < tokens.size(); i++) {\n if (tokens.get(i).equals(token)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
taps timeTable action on click
@FXML private void tap_timeTable_action(Event event) { show_time_table(); }
[ "public void clickOnTableHeading() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-table-column-has-actions.ant-table-column-has-sorters.ant-table-column-sort\"), SHORTWAIT);\r\n\t}", "@Override\n public void onTimerItemClick(TimerItem c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that the setLoginStatus method returns true
@Test public void testSetLoginStatusTrue() throws PersistenceServiceException { assertTrue("set login status true", userDAO.setLoginStatus(CONNALL, true)); }
[ "@Test(description = \"User logs in with username and password - correct credentials\", groups = {\"smoke\"},priority = 1)\n\tpublic void validLogin(){\t\t\n\t\tlogoutPageobj.clickLogoutLink(\"Portal\");\n\t\tsetcurrentContext(null, null, false);\n\t}", "@Test\n public void testIsLoggedInFalse() throws Persist...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column CTSTELLER.ENABLE_MULTI_BR_ACC_CREAT_YN
public void setENABLE_MULTI_BR_ACC_CREAT_YN(String eNABLE_MULTI_BR_ACC_CREAT_YN) { ENABLE_MULTI_BR_ACC_CREAT_YN = eNABLE_MULTI_BR_ACC_CREAT_YN; }
[ "public String getENABLE_MULTI_BR_ACC_CREAT_YN()\r\n {\r\n return ENABLE_MULTI_BR_ACC_CREAT_YN;\r\n }", "public String getALLOW_CIF_CREATION_MASK_YN() {\r\n\t\treturn ALLOW_CIF_CREATION_MASK_YN;\r\n\t}", "public void testUpdateEnableCheck(\n ) throws Exception \n {\n User c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "castExpression" $ANTLR start "primary" Java.g:835:1: primary : ( parExpression | 'this' ( '.' Identifier ) ( identifierSuffix )? | 'super' superSuffix | literal | 'new' creator | Identifier ( '.' Identifier ) ( identifierSuffix )? | primitiveType ( '[' ']' ) '.' 'class' | 'void' '.' 'class' );
public final void primary() throws RecognitionException { int primary_StartIndex = input.index(); try { dbg.enterRule(getGrammarFileName(), "primary"); if ( getRuleLevel()==0 ) {dbg.commence();} incRuleLevel(); dbg.location(835, 1); try { if ( state.backtrack...
[ "public final Expr primary() throws RecognitionException {\n Expr result = null;\n\n int primary_StartIndex = input.index();\n\n Token Decimal14=null;\n Token Int15=null;\n Token StringLit16=null;\n Token BoolLit17=null;\n Token Ident18=null;\n Expr x =null;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the vdoc fields where parentId = &63; from the database.
@Override public void removeByParentId(String parentId) { for (vdocField vdocField : findByParentId(parentId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(vdocField); } }
[ "@Override\n\tpublic void removeByParentId(String parentId) {\n\t\tfor (vdocOrg vdocOrg : findByParentId(parentId, QueryUtil.ALL_POS,\n\t\t\t\tQueryUtil.ALL_POS, null)) {\n\t\t\tremove(vdocOrg);\n\t\t}\n\t}", "@Override\n\tpublic void removeByG_L_P(long groupId, String language, String parentId) {\n\t\tfor (vdocF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle the provided request asynchronously
void handleRequestAsync(HttpServerRequest req, Buffer buffer);
[ "protected void makeAsyncRequest(IRequest<?> request) {\n\t\tlog.debug(\"Making the Async call, and registerign the callback controller\");\n\t\trequest.getServerRequest().asJsonAsync(new ControllerCallback(request));\n\t}", "Object handle(Object request);", "public void handleRequest()\n\t{\n\n\t\tgetSuccessor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Increment the priority of this message by given amount. This method only increases the priority within this object, moving it to the top of the queue is the responsibility of the callee.
public int incrementPriority(int additive) { return this.priority.addAndGet(additive); }
[ "public int incrementPriority() {\n\t\treturn this.priority.incrementAndGet();\n\t}", "public void increaseQuantity(int amount) {\n this.currentQuantity += amount;\n }", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "private void raisePriority() {\n Thread cThr = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the dashboard cards selection is cancelled on dashboard clear. This will happen when no trend cards are shown due to filtering options or time range with no data
@Test public void testTrendCardsSelectionCancelOnDashboardClear() throws Exception { logger.info("Login"); init(); logger.info("Go to dashboard, expand timeline panel"); ui.getLeftNavigationPanel().goToDashboardPage(); ribbon.expandTimelineToolbar(); ...
[ "@Test\n public void testTrendCardsSelectionCancelOnCardRemove() throws Exception {\n \n logger.info(\"Login\");\n init();\n \n logger.info(\"Go to dashboard, expand timeline panel\");\n ui.getLeftNavigationPanel().goToDashboardPage();\n ribbon.expandTimelineToolb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "roll" flips.g:322:1: roll : ( ( 'rol' | 'roll' ) To angularValueWithRate > ^( ROLL FIXED angularValueWithRate ) | ( 'rol' | 'roll' ) angularValueWithRate > ^( ROLL RELATIVE angularValueWithRate ) | ( 'lvl' | 'level' ) > ^( ROLL LEVEL ) );
public final flipsParser.roll_return roll() throws RecognitionException { flipsParser.roll_return retval = new flipsParser.roll_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token string_literal163=null; Token string_literal164=null; Token To165=null; ...
[ "public final void mROLL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.ROLL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:741:6: ( 'roll' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
whether zimlets that send sensitive data are disabled in "mixed" zimbraMailMode
@ZAttr(id=1269) public void setZimletDataSensitiveInMixedModeDisabled(boolean zimbraZimletDataSensitiveInMixedModeDisabled) throws com.zimbra.common.service.ServiceException { HashMap<String,Object> attrs = new HashMap<String,Object>(); attrs.put(Provisioning.A_zimbraZimletDataSensitiveInMixedModeDi...
[ "@ZAttr(id=1269)\n public boolean isZimletDataSensitiveInMixedModeDisabled() {\n return getBooleanAttr(Provisioning.A_zimbraZimletDataSensitiveInMixedModeDisabled, true);\n }", "boolean getEncryptMails();", "boolean getBypassSMIME();", "@ZAttr(id=1269)\n public Map<String,Object> setZimletData...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Define any variables associated with a ShieldPiece object here. These variables MUST be private or package private. Constructs a new ShieldPiece
public ShieldPiece(int side, Board b) { super(side, b); }
[ "public Piece(){}", "public Shield(int x, int y, char figure) {\r\n\t\tsuper(x, y, figure);\r\n\r\n\t}", "private PieceStyle() {\n }", "public TilePiece(){\n\t\t\n\t\tiColour = null;\n\t\tiShape = null;\n\t}", "public PieceWorker(String firstName, String lastName, String socialSecurityNumber, double wage...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When no "before" or "after", is transient
public boolean isTransient() { return (mBefore == null) && (mAfter == null); }
[ "void beforeChange();", "public boolean isTransient()\n {\n return (m_nFlags & ACC_TRANSIENT) != 0;\n }", "public boolean canBeTransient(){\n return false; //TODO codavaj!!\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);
[ "org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);", "Result createTransaction(List<Coin> inputs, List<Coin> outputs, byte[] remark);", "com.satoshilabs.trezor.lib.protobuf.TrezorType.TxInputType getInputs(int index);", "public String createRawTransactio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns ID of the root node
String getRootId();
[ "public Integer getRootId() {\n return rootId;\n }", "public String getIdNode() {\n\t\treturn idNode;\n\t}", "public java.lang.String getPublicIDOfRoot() {\n return ((com.guidewire.pl.domain.extract.RootInfoPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.extract.Roo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_user_log.operation_time
public Date getOperationTime() { return operationTime; }
[ "public Date getOPER_TIME() {\n return OPER_TIME;\n }", "public Timestamp getOperateTime() {\r\n return operateTime;\r\n }", "public String getOperTime() {\r\n\t\treturn operTime;\r\n\t}", "public Long getOperateTime() {\r\n\t\treturn operateTime;\r\n\t}", "public Date getOpTime() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log in the user given the username and password, and returns a login context.
LoginContext login(String username, String password) throws LoginException;
[ "public static void loginUser(Context context){\n String username = context.formParam(\"username\");\n String password = context.formParam(\"password\");\n\n User checkUser = us.getUserByUserName(username);\n\n if(checkUser != null) {\n if(checkUser.getPassword().equals(passwo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets poll interval ms.
public int getPollIntervalMs() { return pollIntervalMs; }
[ "public int getPollInterval()\r\n {\r\n return m_iPollInterval;\r\n }", "public abstract int getPollStatusInterval();", "public int getPollingInterval() {\n return pollingInterval;\n }", "public int getMaxPollInterval()\n {\n return maxPollInterval;\n }", "Duration getDefaultPoll...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }