query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Optional. The maximum number of results to return from this request. Nonpositive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.
public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; }
[ "public void setMaxResults(int maxResults) {\n this.maxResults = maxResults;\n }", "public void setMaxResults(final int maxResults) {\n this.maxResults = maxResults;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"limit is a maximum number of responses to return for a list call. I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ 253: / 254:
public FacturaClienteSRI(String establecimiento, String codigoTipoIdentificacion, String codigoTipoComprobanteSRI, String identificacionCliente, DocumentoBase documentoBase, BigDecimal montoIva, BigDecimal baseImponibleTarifaCero, BigDecimal baseImponibleDiferenteCero, BigDecimal baseImponibleNoObjetoIva, long numeroCo...
[ "public void OneTo255() {\n for(int i = 0; i<=255; i++) {\n System.out.println(i);\n }\n}", "static String numericToTextFormat(byte[] src)\n {\n\tStringBuffer sb = new StringBuffer(39);\n\tfor (int i = 0; i < (INADDRSZ / INT16SZ); i++) {\n\t sb.append(Integer.toHexString(((src[i<<1]<<8) & 0xff0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Alert user if he won the game
public void sudokuSolvedAlert() { Alert alert = new Alert(AlertType.INFORMATION); alert.setTitle("SUDOKU SOLVED - CONGRATULATIONS!"); alert.setHeaderText("SOLVED CORRECTLY!"); alert.setContentText("You can close the application by pressing ESC."); alert.showAndWait(); }
[ "public void wonGame(){\r\n\t\tif (!gameOver) {\r\n\t\t\tSystem.out.println(\"gameWon Yeah!!\");\r\n\t\t\tgameScreen.levelCompleted();\r\n\t\t}\r\n\t}", "public void checkForGameOver() {\n\n if(classicBoard.hasXWon()) {\n gameOver = true;\n showDialog(\"You won!\");\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to check if to arrays of the String are equals
public static boolean arraysEqual(String[] array1, String[] array2){ if(array1 == null || array2 == null || array1.length!= array2.length) return false; for (int i = 0; i < array1.length; i++) { if(!array1[i].equals(array2[i])){ return false; } } return true; }
[ "private static boolean m143099a(String str, String[] strArr) {\n for (String str2 : strArr) {\n if (Objects.equals(str, str2)) {\n return true;\n }\n }\n return false;\n }", "public static boolean equals(char[][] a1, char[][] a2) {\n/* 640 */ if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Test of setName method, of class CartItem.
@Test public void getPrice() { System.out.println("getPrice"); CartItem instance = new CartItem(); Double expResult = null; Double result = instance.getPrice(); }
[ "@Test\n public void testSetName() {\n instance.setName(id, \"newname\");\n String expected = \"newname\";\n String actual = instance.getName(id);\n assertEquals(\"Test set name failed\", expected, actual);\n instance.setName(id, \"Jan\");\n }", "@Test\n public void tes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if the task is successful start the activity
@Override public void onComplete(@NonNull Task<Void> task) { if (task.isSuccessful()) { Toast.makeText(NewRecordingMale.this, BodyFatePercentage.toString(), Toast.LENGTH_LONG).show(); finish(); ...
[ "@Override\n public void onClick(View view) {\n Toast.makeText(EditTask.this, \"Task marked as complete!\",\n Toast.LENGTH_SHORT).show();\n\n Intent startViewTasksAc = new Intent(EditTask.this, ViewTasks.class);\n startActivity(startView...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.google.ads.googleads.test.Bar bar = 2;
boolean hasBar();
[ "Def asDef();", "public String getBar() {\r\n\t\treturn myBar;\r\n\t}", "AnnotatedElement mo23364d();", "com.google.devtools.testing.v1.GoogleAutoOrBuilder getGoogleAutoOrBuilder();", "public int getFoo() { return 3; }", "public interface C7003s {\n @C0193h0\n C6986o getShapeAppearanceModel();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User clicked OK button
public void onClick(DialogInterface dialog, int id) { Log.d(TAG, "position of item to be removed = " + position); removeProductFromCartInLocalDb(productList.get(position)); productList.remove(position); if (productList.size...
[ "protected void okPressed() {\r\n\r\n name = wFrameworkCombo.getItem(wFrameworkCombo.getSelectionIndex());\r\n importRuntimeLibraries = wImportRuntimeButton.getSelection();\r\n importBundles = wImportBundleButton.getSelection();\r\n onlyUserDefined = wImportUserButton.getSelection();\r\n\r\n // Set r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an argument of an option in this command line. When the option is not set, a null is returned. The argument is a String for o, a List of Strings for D, I, L, O, U, W and l.
public Object getArg(String option);
[ "public String getOptionArgument(String option) {\r\n return parsedOptions.get(option.charAt(0));\r\n }", "String getOptionArg(String opt, String arg);", "private String getOptionValue(String[] args, String option)\n {\n for (int i = 0; i < args.length - 1; i++)\n {\n if (a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new tokenizer for an expression.
public Tokenizer(String input) { this.input = input; }
[ "public ExpressionTokenizer(String expr) {\n this.expr = expr.trim().toCharArray();\n this.length = this.expr.length;\n }", "protected Tokenizer newTokenizer(Reader in)\n throws ParserCreationException {\n\n return new LatexMathTokenizer(in);\n }", "public TokenizerFactory toke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify the given signature of the given string using key
default boolean verify( String givenString, String key, String givenSignature, EncoderOptions options) { final EncoderOptions encoderOptions = options == null ? new EncoderOptions() : options; return CryptoSupport.verify...
[ "static boolean verifyString(String data, String signature, String pID){\r\n try {\r\n Signature sig = Signature.getInstance(\"SHA1withRSA\");\r\n sig.initVerify(Keys.pubKeys[Integer.parseInt(pID)]);\r\n sig.update(data.getBytes());\r\n return sig.verify(Base64.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the document matches typePrefix and thumbnail requirement, add it to the attachments.
protected void filterTypes(List<Attachment> attachments, ContentResource doc, String typePrefix, boolean thumbs) { // only matching types if ((typePrefix == null) || (doc.getContentType().toLowerCase().startsWith(typePrefix.toLowerCase()))) { // thumbs? not thumbs? if ((doc.getProperties().getPropert...
[ "private void addToMediaList(QueryDocumentSnapshot document) {\n MediaMetadataCompat media = new MediaMetadataCompat.Builder()\n .putString(MediaMetadataCompat.METADATA_KEY_MEDIA_ID,document.getString(getString(R.string.field_media_id)))\n .putString(MediaMetadataCompat.METADATA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The totalBalanceAmount method returns the m
public double totalBalanceAmount() { return balance; }
[ "public double getTotalBalance() {\n double soma=0.0;\n for(int i=0; i < accounts.size(); i++){\n BankAccount conta = accounts.get(i);\n soma = soma + conta.getBalance();\n }\n return soma;\n }", "public double balance() {\n\t\treturn amount;\n\t}", "public double ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void onNothingSelected(AdapterView<?> arg0) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if the button is pressed
public void actionPerformed(ActionEvent e) { String d = e.getActionCommand(); // if ok buton is pressed hide the popup if (d.equals("OK")) { po.hide(); // create a popup po = pf.getPopup(f, p, 180, 100); } else po.sh...
[ "boolean hasButton();", "@Override\n\t\t\tpublic void buttonPressed(Button b) {\n\t\t\t\t\n\t\t\t}", "void buttonA(boolean pressed);", "@Override\r\n\tpublic boolean isPressed()\r\n\t{\n\t\treturn false;\r\n\t}", "public boolean check () {\r\n return controller.getButton(BUTTON) || isRunning;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Optionally initializes fields for the current context.
protected void InitializeFields() { }
[ "private static void initializeFields() {\n\t\tkeywords = new KeywordHandler();\n\t\texpressions = new ExpressionEvaluator();\n\t\tmethods = new TreeMap<String, Method>();\n\t\tcontext = new Stack<Context>();\n\t\tcontext.push(new Context());\n\t\tcode = new Code(\"test\");\n\t\tline = 0;\n\t}", "public final voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HTTPS URL to view the thumbnail
@ApiModelProperty(value = "HTTPS URL to view the thumbnail") public String getHttpsUrl() { return httpsUrl; }
[ "public abstract String getThumbnailUrl();", "String getImageURL();", "java.lang.String getThumbnailImageUrl();", "public String getThumbnailUrl() {\r\n return thumbnailUrl;\r\n }", "java.lang.String getThumbnail();", "String getThumbnailFile();", "String getImgUrl();", "public static String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The stage of the setup task definition allowing to specify if ommand line instructions should run in elevated mode.
interface WithElevatedMode<ParentT> { /** * Specifies that the setup task should run in elevated mode. * @return the next stage of the definition */ WithAttach<ParentT> withRunElevated(); }
[ "@Then(\"^Sytem should display the task enabled$\")\n\tpublic void sytem_should_display_the_task_enabled() throws Exception {\n\t\tmethodName = Thread.currentThread().getStackTrace()[1].getMethodName();\n\n\t\ttry {\n\t\t\tif (isElementPresentVerification(AccessManagementConstants.DR_TaskButton) && isElementPresen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Go to previous song
public static void previousSong(Context context, MediaPlayer mp) { //Get current song ArrayList<Integer> playlist = getCurrentPlaylist(context); int curSong = getCurrentSong(context); int curSongPosInPlaylist = getCurSongPosInPlaylist(context); //If shuffle is activated, get a r...
[ "public void prevSong()\n {\n \tcurrentIndexSong = Math.max(currentIndexSong - 1, 0);\n \ttry \n \t{\n\t\t\tgetPlayer().open(fileSong.get(currentIndexSong).getSelectedSong());\n\t\t} catch (BasicPlayerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public static void pressPrevious() {\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the telefono of this richiesta_rimborso.
@Override public String getTelefono() { return _richiesta_rimborso.getTelefono(); }
[ "public java.lang.String getTelefono() {\n\t\treturn _cargaTienda.getTelefono();\n\t}", "public String getTelefono() {\n return Telefono;\n }", "public java.lang.String getAsesorTelefono() {\n return asesorTelefono;\n }", "public String getTelefono() {\n return telefono;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last company request in the ordered set where groupId = &63;.
public static com.itlifter.employee.service.model.CompanyRequest fetchByGroupId_Last( long groupId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); }
[ "public static com.idetronic.subur.model.CopyRequest findByCompanyGroup_Last(\n\t\tlong companyId, long groupId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.idetronic.subur.NoSuchCopyRequestException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException {\n\t\tretu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method adds a given value to the total.
public void add (int value) { total += value; operations += " + " + value; }
[ "public void add (int value) {\n\t\ttotal += value;\n\t\t\n\t\tint[] temp = new int[allTotals.length + 1];\n\t\tint i = 0;\n\t\tfor(i = 0; i < allTotals.length; i++) {\n\t\t\ttemp[i] = allTotals[i];\n\t\t}\n\t\ttemp[i] = value;\n\t\t\n\t\tallTotals = temp;\n\t\t\n\t}", "public void dealerAddTotal(int value)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the NetStorageFormatManager for this application. The NetStorageFormatManager is used when storing and restoring NeuralNets from the file system.
public NetStorageFormatManager getNetStorageFormatManager() { return fNetStorageFormatManager; }
[ "public INetworkManager getNetManager() {\n\t\treturn this.netManager;\n\t}", "public yandex.cloud.api.mdb.mongodb.v1.config.Mongodb36.MongoCfgConfig3_6.Storage getStorage() {\n if (storageBuilder_ == null) {\n return storage_ == null ? yandex.cloud.api.mdb.mongodb.v1.config.Mongodb36.MongoCfgConf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected String getParamMarks() { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Logic of the BFS
private static void doBFS(Graph graph, ArrayList<Integer> parcours, boolean[] visited, ArrayDeque<Integer> queue, int vertice) { queue.offer(vertice); // Added the top at the end of the queue (it's queuing..) while (!queue.isEmpty()) { // As long as the queue is not empty var vertex = queue....
[ "public void bfs() {\n\t\tDigraph g = this.graph;\n\t\tint start = this.root;\n\t\tList<Integer> toVisit = new ArrayList<Integer>();\n\t\ttoVisit.add(start);\n\t\t// List<Integer> bfsV=new ArrayList<Integer>();\n\t\tint dist = 0;\n\t\twhile (true) {\n\t\t\tif (toVisit.size() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the class of value.
public Class<?> getClazz() { return clazz; }
[ "public Class getValueClass ();", "public Class<?> getValueClass() {\n return typeId.getValueClass();\n }", "public String getValueclass()\n\t{\n\t\treturn valueclass;\n\t}", "public Class<T> getValueClass() {\n return clazz_;\n }", "Class getComponentValueClass();", "Class<ValueT> getValueT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method def ends here. Write the method here..
public void delete__followBrands( RestAdapter restAdapter, final VoidCallback callback) { //Call the onBefore callback method.. callback.onBefore(); //Define methods here.. ...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n public void extornar() {\n \n }", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "Eisdiele() {\r\n\r\n\t}", "@Override...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Begins an atomic delete transaction, and captures the current state of the storage which it will use until that transaction is complete
private Object[] beginDeleteAction(Object transactionKey) { synchronized (getAccessLock()) { //check to see if something else owns the transaction handle if(this.transactionKey != null) { if(!this.transactionKey.equals(transactionKey)) { return deleteA...
[ "public void performDelete() {\n \t}", "void flagActiveDeletionSafe();", "@Test\n public void testDelete() throws Exception {\n final long numBlocksToDelete = TestDB.NUM_PENDING_DELETION_BLOCKS;\n String datanodeUuid = UUID.randomUUID().toString();\n ContainerSet containerSet = makeContainerSet();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
[ "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home\n Intent intent = new Intent(this, MainMenuCard.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private constructor, the class cannot be instantiated
private ExplosionPainter() { }
[ "private PrivateConstructor() { \n \t\n }", "private Lieu() {\n\t}", "private O()\r\n {\r\n super();\r\n }", "private Factory() {\n\t}", "private CSCreator() {\n }", "private Security() {\n\t\t// Private constructor to prevent instantiation\n\t}", "private Justage() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by doods on 09/08/14.
public interface ISystemManager { void getSettings(final DataResponse<WebGuiSetting> response, final Context context); void setSettings(final DataResponse<String> response, final Context context, final WebGuiSetting Setting); void getTimeSettings(final DataResponse<TimeSettings> response, final Context c...
[ "@Override\n public void extornar() {\n \n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n }", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XCasePart__Group__2__Impl" $ANTLR start "rule__XCasePart__Group__3" ../de.grammarcraft.flow.ui/srcgen/de/grammarcraft/flow/ui/contentassist/antlr/internal/InternalFlow.g:11328:1: rule__XCasePart__Group__3 : rule__XCasePart__Group__3__Impl ;
public final void rule__XCasePart__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../de.grammarcraft.flow.ui/src-gen/de/grammarcraft/flow/ui/contentassist/antlr/internal/InternalFlow.g:11332:1: ( rule__XCasePart__Group__3__Impl ) ...
[ "public final void rule__XCasePart__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAle.g:10451:1: ( rule__XCasePart__Group__3__Impl )\n // InternalAle.g:10452:2: rule__XCasePart__Group__3__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Auslesen einer Notiz anhand der Notiz Id.
public Notiz getNotizByKey(int id) throws IllegalArgumentException;
[ "Declaracao getId();", "public int getId() {return posisjon;}", "@Override\n public long getId() {\n return id_;\n }", "@Override\n public int getId() { return id; }", "public int getId () { return id; }", "public IntegerProperty getNotizID();", "private int getId() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
List of Items (III)
public void itemizedList() { int amount = 0; for(int i = 0; i < itemsArr.length; i++) { amount += itemsArr[i].getAmount(); if (itemsArr[i].getAmount() > 0) { double price = itemsArr[i].getPrice(); double amt = itemsArr[i].getAmount(); String name = itemsArr[i].getName(); System.out.printf("%....
[ "java.util.List<ItemPt.Item>\n getItemList();", "java.util.List<com.nkm.framework.resource.data.LushuiBytes.LUSHUI> \n getItemsList();", "public abstract String listItems();", "java.util.List<TfGcmessages.CMsgMvMVictoryInfo.Item> \n getItemsList();", "java.util.List<pomelo.item.ItemOu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ATTENTION: This was autogenerated to implement the App Indexing API. See for more information.
@SuppressLint("WorldReadableFiles") @SuppressWarnings("deprecation") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings_main ); GetFileDisplay = getSharedPreferences(Common.TIME_CATEGORY_GET, 0)...
[ "String genAppIndex();", "private Indexer() {}", "@VTID(15)\r\n int index();", "public String getIndexName()\r\n {\r\n return indexName;\r\n }", "public void index() {\n // new Index();\n }", "@Override\n\tpublic void updateSearchIndex() {\n\t}", "public void getIndex() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { desktopArea = new javax.swing.JDesktopPane(); labelLogo = new javax.swing.JLabel(); labelDataSection = new javax.swing.JLabel(); ...
[ "public StForm() {\n initComponents();\n }", "public CineForm() {\n initComponents();\n }", "public javaform() {\n initComponents();\n }", "public EditDemographicForm() {\n initComponents();\n }", "public FightForm() {\n initComponents();\n }", "public For...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Animates the thumbnail alpha.
void startFadeAnimation(float finalAlpha, int delay, int duration, final Runnable postAnimRunnable) { if (mAlphaAnimator != null) { mAlphaAnimator.cancel(); } mAlphaAnimator = ValueAnimator.ofFloat(mBitmapAlpha, finalAlpha); mAlphaAnimator.addUpdateListener(mAlphaUpdateListen...
[ "void setThumbnailAlpha(int thumbnailAlpha) {\n // Set the alpha and invalidate only the thumbnail bounds.\n this.thumbnailAlpha = thumbnailAlpha;\n invalidate(thumbRect);\n }", "public void setAlpha(@IntRange(from = 0, to = 255) final int alpha) {\n animationDrawable.setAlpha(alpha);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { Telefono telf = new Telefono ("movi","098234234", 20); Telefono telfb = new Telefono ("claro","098234234", 20); Telefono telfc = new Telefono ("movi","098234234", 20); Telefono telfd = new Telefono ("movi","098234234", 20); AdminTelefono at = new Adm...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a no. for index, used by Select value
public int getRandomSelectValues(int size){ return rand.nextInt((size-1)+1)+1; }
[ "@NonNegative int index();", "java.lang.Long getIndex();", "public int getIndex() {\n return 0;\n }", "public int getIndex()\r\n/* 48: */ {\r\n/* 49:113 */ return this.index;\r\n/* 50: */ }", "public int getIndex(){\r\n return index;\r\n }", "org.hl7.fhir.Integer getIndex();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if a profile with minimal fields can be made
@Test void createProfileWithMinimalFieldsTest() { Profile testProfile = createProfileWithMinimalFields(); ResponseEntity<String> responseEntity = profileController.createProfile(testProfile); List<Profile> result = repo.findAll(); assertTrue(result.contains(testProfile)); }
[ "@Override\n public boolean validateProfile(final Profile profile) {\n return false;\n }", "boolean hasProfileInfo();", "public boolean isProfile() {\n return requires != null && requires.size() > 0;\n }", "private boolean hasValidProfile(ApplicationInfo appInfo) {\n File profile...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1 12 123 1234 12345
public static void main(String[] args) { int size =5; for (int i = 1; i <= size; i++) { for (int j = 1; j <=i; j++) { System.out.print(j); } System.out.println(); } }
[ "public static void main(String[] args) {\n\n int x = 12345;\n int birler = x % 10;\n int onlar = (x / 10) % 10;\n int yuzler = (x / 100) % 10;\n int binler = (x / 1000) % 10;\n int onbinler = (x / 10000);\n System.out.println(onbinler + \"\\n\" + binler + \"\\n\" + ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To Set the collectedAmount for pointOfSaleDetails table
public void setCollectedAmount(Float collectedAmount) { this.collectedAmount = collectedAmount; }
[ "public void setTotal(double amount) {\n totalAmount = amount;\n }", "public void setpointTotal(int point) {\n }", "void updateTotalRevenue (Amount saleRevenue);", "public void setAmount(java.math.BigDecimal param){\n \n this.lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private static FindFriendsChoiceFragment instance;
public static FindFriendsChoiceFragment newInstance(boolean onlyFragmentInStack) { Bundle b = new Bundle(); b.putBoolean(ONLY_FRAGMENT_IN_STACK, onlyFragmentInStack); FindFriendsChoiceFragment f = new FindFriendsChoiceFragment(); f.setArguments(b); return f; }
[ "public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n return fragment;\n }", "public FriendListFragment(){\n set_up_friendlist_Listener();\n }", "public static FriendsFragment newInstance()\n {\n FriendsFragment fragment = new F...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new ExportContextClassLoader instance.
private ExportContextClassLoader(int code, String label) { super(code, label); }
[ "private AntClassLoader createClassLoader() {\n AntClassLoader loader = null;\n if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {\n try {\n // 1.2+ - create advanced helper dynamically\n Class loaderClass\n = Class.forName(ANTCL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will populate an arraylist with models
private void modsFiller(){ mods.add("Ranger"); mods.add("TJ"); mods.add("Madza 5"); mods.add("Civic"); mods.add("CR-v"); mods.add("Corvette"); mods.add("F-150"); }
[ "public void setListData()\n {\n\n for (int i = 0; i < 11; i++) {\n\n final ListModel sched = new ListModel();\n\n /******* Firstly take data in model object ******/\n sched.setCompanyName(\"Company \"+i);\n sched.setImage(\"image\"+i);\n sched.setUrl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional bool is_replay_demo_file = 3;
@java.lang.Override public boolean getIsReplayDemoFile() { return isReplayDemoFile_; }
[ "public void setReplay(boolean bool){\n this.replay = bool;\n }", "boolean getReplay();", "public boolean isRecording(){ return recording; }", "public abstract String getFilePlaying();", "public boolean isRecording() { return _sndRec.isRecording(); }", "public boolean isRequirePreviewFile() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface class for creating and saving bookings, thus making booking different availabilities, and ideally removing them from searches.
public interface BookingService { /** * Creates a {@link Bookings} object and * persists it based on the provided parameters * @param bookingLocation The location of room (the {@link ApplicationUser} object * of the selected {@link TimeAvailabilities}) * @param selectedTimeAvailability The selected {@l...
[ "public void addBooking(Booking aBook)\r\n {\r\n bookings.add(aBook);\r\n //return bookings;\r\n }", "public BookingModel(ArrayList<Booking> bookings) {\r\n setBookings(bookings);\r\n }", "public interface Reservation extends Booking {\n}", "public void setBooking(Booking booking...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setting up the test suite.
@BeforeEach void setLauncher() { launcher = new Launcher(); }
[ "public static void setUp() {\n\n }", "default void setUp(){}", "private MTAFTestSetup() {\n mtafCore = new MTAFCore();\n mtafCore.initilize();\n execEngine = mtafCore.getExecutionEngine();\n\n\n }", "public void setUp()\n {\n /* Insert your own setup code here */\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts Lucene document to application specific document.
public static final DocumentBean of(final Document document) { final String path = document.get(PATH_FIELD_NAME); final String content = ""; final String title = document.get(TITLE_FIELD_NAME); if (title == null) { return new DocumentBean(path, content); } else { return new DocumentBean(path, content, ...
[ "public String getTransformedDocument(Document doc) throws ApplicationException;", "@Override\n\tpublic Document createDocument();", "public MLPDocument getDocument(String documentId);", "public abstract String handleDocument(D document);", "public Document2 persistDocument(Document2 document) {\n lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all permutations of a string
public static Set<String> permutate(String s) { if (s == null) { log.error("string must not be null"); throw new IllegalArgumentException(); } int len = s.length(); if (len == 0) { log.error("string must not be empty"); throw new IllegalArgumentException(); } if (len == 1) { return Sets.newHa...
[ "public static ArrayList<String> getAllPermutations(String s) {\n\t\tArrayList<String> permutations = new ArrayList<String>();\n\t\tgetPermutations(permutations,\"\", s);\n\t\treturn permutations;\n\t}", "private static List<String> permutationString(String input) {\n\t\tList<String> result = new ArrayList<>();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method that is used for first roll when a player first clicks Play, it returns a string message stating wheter they won, lost, or continue to second phase of craps
public String firstRoll(Die die1, Die die2){ String message = ""; die1.roll(); die2.roll(); int sumOfDice = die1.getValue() + die2.getValue(); switch(sumOfDice) { case 7: case 11: message = "won"; ...
[ "public void playerLoses()\n {\n System.out.println(\"Game Over\\n\\n\");\n setGameOutcome(\"Lose\");\n }", "public void startGame(){\n this.totalWin = 0;\n this.totalPlay = 0;\n printWelcome();\n do{\n this.totalPlay++;\n play();\n } while(playAgai...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__OptionalFeature__TypeAssignment_2" $ANTLR start "rule__OptionalFeature__ModifiersAssignment_3_1" ../org.sqlproc.meta.ui/srcgen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:37597:1: rule__OptionalFeature__ModifiersAssignment_3_1 : ( ruleOptionalFeatureModifier ) ;
public final void rule__OptionalFeature__ModifiersAssignment_3_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.sqlproc.meta.ui/src-gen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:37601:1: ( ( ruleOptionalFeatureM...
[ "public final void mOPTIONAL() throws RecognitionException {\n try {\n int _type = OPTIONAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // com/dyuproject/protostuff/parser/ProtoLexer.g:127:5: ( 'optional' )\n // com/dyuproject/protostuff/parser/ProtoLexer.g:127:9: '...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A recursive method for stripping extraneous data from a TwisterPath
public TwisterPath recursiveStrip(TwisterPath path, Pose2d pose){ if(path == null){ return null; } if(path.path.size() <= 0) { System.out.println("Completely stripped path"); return path; } if(path.path.get(0).isRequired){ return p...
[ "protected void removeSunnyPath()\n {\n super.removeSunnyPath();\n }", "private void wipePathPreviousNode()\n {\n for (int i = 0; i < NUM_STATES; ++i) {\n Arrays.fill(pathPreviousNode[i], -1);\n }\n }", "private void trashPath() {\n\t\t\t\n\t\t\tfor (Kmer k : _blockPa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table goods_detail_dis
int deleteByExample(GoodsDetailDisExample example);
[ "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Object[]> listDetail(Long idOrderDish) {\n\t\tStringBuilder str = new StringBuilder(\"select d.name,d.photo,d.price,odd.quantity\");\n\t\tstr.append(\" from\");\n\t\tstr.append(\" Dish d join OrderDishDetail odd on d.id=odd.dishId\");\n\t\tstr.append(\" ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes request into the database (table 'students') to insert the current user.
public void deleteAllTimes(int idEmpl) { /* link to the current database */ Connection conn = null; try { /* gets connection to the database from Connection pool */ conn = datasrc.getConnection(); /* prepares SQL statement with parameters */ ...
[ "@Override\n\tpublic User insertstudent(User user) {\n\t\treturn udao.save(user);\n\t}", "private static void insertStudent() {\n\t\tStudent student = new Student();\n\t\tSystem.out.print(\"Nhap ma sinh vien: \");\n\t\tscanner.nextLine(); // xóa bộ nhớ đệm\n\t\tstudent.setId(scanner.nextLong());\n\t\tSystem.out.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This will find the mode of operation of the calculator. This is determined by the type of expression the user has entered. Currently the only mode supported is "assignment" mode of which there are 2 types: 1) "Assignment of a userdefined constant" 2) "Assignment of a userdefined function" Note: mode 0) is normal calcul...
public static int findMode(String expression) { // if we are in assignment mode if(isAssignementMode(expression)) { String regexForGeneralAssignmentOperation = "^([a-zA-Z]+).*\\s*=\\s*(.*)"; Pattern pattern = Pattern.compile(regexForGeneralAssignmentOperation); Matcher matcher = pattern.matcher(...
[ "private Integer getMode(ButtonMode mode)\n {\n switch (mode)\n {\n case SUBMIT:\n return 1;\n case NEXT:\n return 2;\n default:\n return 0;\n }\n }", "public abstract String getModeValue(final String mode);",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public String getInsertQuery(GenericView object) { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Muestra todas las ubicaciones de los apartamentos
public ArrayList<String> mostrarUbicaciones () throws SQLException{ //Declaracion e incializacion de variables String ubicacion=""; ArrayList<String> ubicaciones =new ArrayList<String>(); String query="select distinct ubicacion from apartamento;"; ResultSet rs = miConsulta.hacerConsultaBD(con, query); ...
[ "private void ubicarCuerpo(){\n for(int i = cuerpo+5;i>0;i--) {\n poscionX[i] = poscionX[i-1];\n poscionY[i] = poscionY[i-1];\n }\n }", "private void calcularBarras() {\n for (Barra barra:listaBarras) {\n Conectividad conectividad = getFromIdBarraConectivid...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inorder traversal of tree (starting from root) while printing every node's name.
public void printAllParticles() { printAllParticlesHelper(root); }
[ "@Override\n public void traverse() {\n StringBuilder sb = new StringBuilder();\n inOrderHelper(root, sb);\n System.out.println(sb);\n }", "public void printTree()\r\n\t{\r\n\t\tif (!BST.isEmpty())\r\n\t\t{\r\n\t\t\tTreeIterator<Person> iter = new TreeIterator<Person>(BST);\r\n\t\t\tite...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string requestKey = 1;
public java.lang.String getRequestKey() { java.lang.Object ref = requestKey_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); requestKey_ = s; ...
[ "String calculateKey(HttpServletRequest req);", "public Request data(KeyVal keyval);", "@Test\n public void testGetRoutingKey_Request() {\n System.out.println(\"getRoutingKey\");\n Request request = new RequestBuilder().onNotify(OMCP).content(\"\").build();\n String result = RabbitUtil.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the topic id from a forumId
private long getTopicId(String title, long forumId) throws SQLException { String sql = "SELECT topic_id FROM Topic " + "LEFT JOIN Forum ON topic_forum = forum_id " + "WHERE topic_title = ? AND topic_forum = ?"; try (PreparedStatement p = c.prepareStatement(sql)) { p.setString(1, title); p.setLong(2, forum...
[ "public String getTopicid() {\n\t\treturn topicid;\n\t}", "public int getTopicId() {\n return topicId_;\n }", "public Short getForumId() {\n\t\treturn forumId;\n\t}", "public String getTopicById() throws ObjectNotFoundException{\n\t\tTopic topic =forumService.getTopicById(Integer.parseInt(id...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
index Mapping for index page
@Logger @GetMapping(value = "") String index(Model model) { InsuranceCompany insuranceCompany = insuranceCompanyService.getCompany(); model.addAttribute("insuranceCompany", insuranceCompany); model.addAttribute("vats", billingService.findAllVat()); return "insurance_company/edi...
[ "public Result index() {\n \n return ok(index.render(\"\")); \n \n }", "public static Result index() {\n return ok(Index.render());\n }", "public void index() {\n\t\tInteger pageNumber = 0;\n\t\tInteger pageSize = 10;\n\t\tString writer = \"hadong\";\n\t\tArticleModel.getArti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { okButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); pandaHappy = new javax.swing.JLabel(); pandaHa...
[ "public StForm() {\n initComponents();\n }", "public CineForm() {\n initComponents();\n }", "public javaform() {\n initComponents();\n }", "public EditDemographicForm() {\n initComponents();\n }", "public FightForm() {\n initComponents();\n }", "public For...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected
public long getFileLength(Cursor cursor) { return CursorUtils.getFileLength(cursor); }
[ "@Override\n }", "protected void method_5557() {}", "@Override\n public void extornar() {\n \n }", "@Override\r\n public void publicando() {\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of otherclan kills this clan has recorded.
public int getCurrentClanKills(MOB killer);
[ "private int getNumKilled(){\n\t\treturn GameModel.MAIN.getKillCount(enemyType.name);\n\t}", "public int getKillTotal() {\r\n\t\treturn targetPlayer.getStatistic(Statistic.PLAYER_KILLS);\r\n\t}", "@java.lang.Override\n public int getKills() {\n return kills_;\n }", "public int getAmountKilled...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Intentionally do not reset: super.resetBestPlan();
@Override void resetBestPlan() { }
[ "public void reset()\n {\n System.out.println(\"RESETTING NODE: \" + this.name );\n childCounter = DEFAULT;\n setBestChild();\n //the nodes f(n) cost now becomes the best of all it's children\n this.fn = this.best;\n }", "@Override\n\tpublic void setParametersToBest() {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is called when the game display is clicked on. Handles selecting a stack or moving cards from the previously selected stack
public void onClick(int x, int y) { if (hiddenStock.inBounds(x, y)) { cycleStock(); highlightedStack = null; if (checkWinConditions()) { onGameWon(); } } else { SelectedStackResult clickedStack = getSelectedCardstack(x, y); ...
[ "public void mouseClicked(MouseEvent e) {\n //The source will always be a JLabel\n JLabel source = (JLabel)e.getSource();\n if(source == view.statusText){\n model.initGame();\n return;\n }\n //Determine if the label being clicked is a card in the players...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new StatusObject.
public StatusObject() { }
[ "@SuppressWarnings(\"unused\")\n\t\tprivate Status() {}", "public Status(){\n\t\tthis(1,0,0);\n\t}", "public Status( int raw, JobStatus status )\n {\n m_status = raw;\n m_jobStatus = status;\n }", "public StatusControl(){}", "Status(int ordinal,\n String statusName,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if type is a valid lesson type.
public static boolean isValidType(String type) { requireNonNull(type); for (LessonType t : LessonType.values()) { if (t.name().equals(type)) { return true; } } return false; }
[ "boolean checkValidity(String type)\n\t{\n\t\tif(type.equals(\"int\") || type.equals(\"boolean\") || type.equals(\"String\") || type.equals(\"void\"))\n\t\t\treturn true;\n\t\tClassTreeNode desiredObject = currNode.lookupClass(type);\n\t\tif(desiredObject == null)\n\t\t{\n\t\t\terror.register(error.SEMANT_ERROR, \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The end of any subinterval masks exceptions
final boolean maskExceptions() { if(!isEndPoint()) return false; if(bound == null) return (line == Line.rootLine); return (bound.line == line); }
[ "private static boolean outsideInterval(Timestamp timestamp, Timestamp begin, Timestamp end) {\n if (begin == null) {\n return end != null && timestamp.after(end);\n }\n else {\n if (end == null) {\n return timestamp.before(begin);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Schedule a onetime notification.
public static PendingIntent schedule(Context ctx, long atTime) { return schedule(ctx, atTime, null); }
[ "public void sendAlarmOnce() {\n\t\t// Get the instance in time that is 30 seconds from now\n\t\tCalendar calendar = Utils.getTimeAfterInSecs(30);\n\t\t\n\t\t// Print to the debug view that we are scheduling at a specific time\n\t\tString string = Utils.getDateTimeString(calendar);\n\t\tmReportTo.reportBack(TAG, \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generic reactive cache which returns cached content by key of exist or loads from remote and cache if doesn't exit.
public interface Cache { /** * No cache, just load remote resource. */ Cache NOP = (key, remote, ctl) -> remote.get(); /** * Try to load content from cache or fallback to remote publisher if cached key doesn't exist. * When loading remote item, the cache may save its content to the cac...
[ "private Object cacheHit(String key) {\n Object cache = redisTemplate.opsForValue().get(key);\n // 从缓存获取数据,获取完数据之后,我们需要将数据返回,给页面渲染对吧!\n if (!StringUtils.isEmpty(String.valueOf(cache))){\n // 缓存中有数据,返回的是执行方法时对应的返回类型\n return cache;\n }\n return null;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method converts the ISO_LOCAL_DATE formatted string (eg: 20180507 ) to LocalDate
public static LocalDate validateAndConvertStringToDate(String dateStr) { try { return LocalDate.parse(dateStr); } catch (DateTimeParseException e) { log.error(e.getMessage()); throw new BadRequestException("date is not in ISO_LOCAL_DATE format"); } }
[ "public static LocalDate getLocalDateFromIsoString(String date) {\n String[] dateParts = date.split(\"-\");\n if (dateParts.length == 3) {\n try {\n\n int year = Integer.parseInt(dateParts[0]);\n int month = Integer.parseInt(dateParts[1]);\n int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the shape's center x coordinate. Is used for whatever you want, but it is costly.
@Override public int getCenterX() { return this.getX(); }
[ "public float GetCenterX(){\n\t\treturn getX() + (getOriginX() * getScaleX());\n\t}", "public float getCenterX() {\n return getX() + getWidth() / 2;\n }", "public int getCenterX()\n\t{\n\t\treturn this.x;\n\t}", "public double getCenterX(){\n\t\treturn this.center.getX();\n\t}", "public double get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Constructors / /
public ClassChoice() { super(); this._fieldMappingList = new java.util.ArrayList<org.exolab.castor.mapping.xml.FieldMapping>(); this._containerList = new java.util.ArrayList<org.exolab.castor.mapping.xml.Container>(); }
[ "public Tanh() {\n\t}", "public Cachorro() {\r\n }", "public HeteroAST() { ; }", "public Innlegg() {\n\t\t\n\t}", "Cokolady()\t{\r\n\t\tsuper();\r\n\t}", "public Loto649(){\n\t\t\n\t}", "public Copome() {\r\n\t}", "protected GeometricObject() {\r\n\r\n\t}", "public CEL_Chauffage() {}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated int64 bucket_counts = 6;
public Builder addAllBucketCounts( java.lang.Iterable<? extends java.lang.Long> values) { ensureBucketCountsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, bucketCounts_); onChanged(); return this; }
[ "java.util.List<java.lang.Long> getBucketCountsList();", "private int calculateBucketSize(final int numElements) {\n return ((numElements - 1) >>> 4) + 1;\n }", "public int hashAndGetBucket(double[] values) {\n \n double hashed = hash(values);\n \n int bucket;\n if(_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional float absoluteMaxCapacity = 4;
public float getAbsoluteMaxCapacity() { return absoluteMaxCapacity_; }
[ "private void limitCapacity() {\n }", "public int getCapacity()\r\n/* 44: */ {\r\n/* 45:38 */ return 16000;\r\n/* 46: */ }", "@Override\n \tpublic float getCurrentCapacity()\n \t{\n \t\treturn 0;\n \t}", "public Float getCapacity() {\n return capacity;\n }", "protected int g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override int add(int x, int y) { return x * y; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /soldiers/:id : get the "id" soldier.
@GetMapping("/soldiers/{id}") @Timed public ResponseEntity<SoldierDTO> getSoldier(@PathVariable Long id) { log.debug("REST request to get Soldier : {}", id); Optional<SoldierDTO> soldierDTO = soldierService.findOne(id); return ResponseUtil.wrapOrNotFound(soldierDTO); }
[ "@GetMapping(\"/etudes/{id}\")\n @Timed\n public ResponseEntity<Etude> getEtude(@PathVariable Long id) {\n log.debug(\"REST request to get Etude : {}\", id);\n Etude etude = etudeRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(etude));\n }", "@GetMapp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The Package for the model. It contains accessors for the meta objects to represent each class, each feature of each class, each enum, and each data type
public interface ROMPackage extends EPackage { /** * The ID of the plug-in (in absence of an Activator, this will have to do). * @generated no */ String PLUGIN_ID = "net.sf.rcer.rom"; /** * The package name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ String eNAME = "rom"; ...
[ "private Model<Location> createModel() {\n\t\tfinal Model<Location> model = new Model<>();\n\t\tmodel.addPackage(\"packageA\", location(\"packageA/package-info.java\"));\n\t\tfinal Class<Location> cAA = model.addClass(Name.of(\"packageA.ClassA\"), false, location(\"packageA/ClassA.java\"));\n\t\tcAA.addUsage(Name.o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 138 /Coverage entropy=2.2343358078055116
@Test(timeout = 4000) public void test138() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); NumberInput numberInput0 = new NumberInput(errorPage0, "^?B('>^a", "^?B('>^a"); // Undeclared exception! try { numberInput0.tt(); fail("Expecting exception: RuntimeExceptio...
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loops over the spaceModel's list and calls each one to iterate
public void iterate() { spaceModels.forEach(SpaceModel::iterate); }
[ "private static void run() {\n for(String key : EnvironmentModelList.keySet()) {\n EnvironmentModelList.get(key).run();\n }\n for(String key : csModelList.keySet()) {\n csModelList.get(key).run();\n }\n }", "public void update() {\n\t\ttry {\n\t\t\tfor (CRBaseD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Toggle the expanded state of the header.
public void toggleHeader() { mIsExpanded = !mIsExpanded; notifyItemChanged(0, SectionHeaderViewHolder::updateVisuals); mToggleCallback.run(); }
[ "public void toggle() {\n // Cancel any pending animation.\n cancel();\n if (!expanded) {\n collapsedHeight = element.getScrollHeight();\n }\n expanded = !expanded;\n run(TIME);\n }", "@Override\n protected void toggleExpanded(boolean value) {\n }", "public void toggle() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "RULE_EXTENDED_DIGIT" $ANTLR start "RULE_BASED_INTEGER"
public final void mRULE_BASED_INTEGER() throws RecognitionException { try { // InternalResoluteLexer.g:379:29: ( RULE_EXTENDED_DIGIT ( ( '_' )? RULE_EXTENDED_DIGIT )* ) // InternalResoluteLexer.g:379:31: RULE_EXTENDED_DIGIT ( ( '_' )? RULE_EXTENDED_DIGIT )* { mRUL...
[ "public final void mINTEGER() throws RecognitionException {\n try {\n int _type = INTEGER;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /home/xuchen/Dropbox/d-workspace/cassandra-trunk/src/java/org/apache/cassandra/cql3/Cql.g:1048:5: ( ( '-' )? ( DIGIT )+ )\n // /h...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the _Fields constant that matches name, or null if its not found.
public static _Fields findByName(java.lang.String name) { return byName.get(name); }
[ "public static _Fields findByName(String name)\r\n {\r\n return byName.get(name);\r\n }", "public Field getField(String name) {\n for(Field field : fieldList) {\n if(field.getName().equals(name)) {\n return field;\n }\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method does the SunJupiterPlanetX simulation
public void initSunJupiterProbe(){ scaling =75; //Sat Conditions System.out.println("Please enter the mass of the satellite:"); massSat = kb.nextDouble(); System.out.println("Please enter the x position of the satellite:"); satX = kb.nextDouble(); System.out.println("Please enter the y position of the satell...
[ "public void actionPerformed(ActionEvent e)\n\t\t {\n\t\t\t Sun sun = new Sun (simulation.sunOrgMass, 695508, new Coordinate(500, 350) , Color.ORANGE);\n\n\t\t\t Planet planet = new Planet(sun, 6371 , simulation.planetOrgMass , 152100000 , 29300 , Color.CYAN);\n\t\t\t\t \n\t\t\t Moon moon = new Moon(planet, 173...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates neighbor strings from input string by flipping one bit at a time. The length of the input string = the number of neighbor strings returned.
private static List<String> buildNeighborStrings(String vc) { List<String> neighborStrings = new ArrayList<>(); char[] bits = vc.toCharArray(); for (int i = 0; i < bits.length; i++) { StringBuilder sb = new StringBuilder(vc); char c = (bits[i]=='1') ? ('0') : ('1'); ...
[ "public static void main(String[] args) {\n\t\tString str = \"00011110001110\";\n int n = str.length();\n \n System.out.println(findFlips(str, n));\n\t}", "public static List<String> generatePalindromes(String s) {\n List<String> res = new ArrayList<>();\n int[] table = new int[128];\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ SUBMODULE: newPost IMPORT: EXPORT: ASSERTION: contains sub menu to add a post
public void newPost() { Scanner sc = new Scanner(System.in); int choice = -1; boolean close = false; String user = ""; String post = ""; do //continues until user exits { System.out.println("\nPlease choose an option"); System.out.prin...
[ "private void createNewPost() {\n\t\tSystem.out.println(\"Header: \");\n\t\tString header = scanner.nextLine();\n\t\tSystem.out.println(\"Content: \");\n\t\tString content = scanner.nextLine();\t\n\n\t\tint authorId = user.getId();\n\t\tSystem.out.println(\"ID author: \"+ authorId);\n\t\tint latitude = promptForPos...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for an ASIA register.
public ASIARegister(int register_number, boolean virtual_register) { if (register_number < 0) throw new AssertionError(); if (register_number > 7) throw new AssertionError(); this.register_number = register_number; this.virtual_register = virtual_register; ...
[ "public Instruction() {\r\n\t\tsuper();\r\n\t\tthis.registerList = new ArrayList<>();\r\n\t}", "public Scania() {\n this(0, 0);\n }", "public RegisterRecord() {\n super(Register.REGISTER);\n }", "public RegisterObject() {\n }", "public IA(int equipe) {\n\t\tthis.equipe = equipe;\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The main method to find a classification. The code calls methods to enact each of the needed steps.
public String classifyUnknownSample(Face unknown) { computeDistanceFromUnknownToSamples(unknown); findKClosest(); String classification = voteOnClassification(); return classification; }
[ "public void classify(String args) throws Exception {\n\t\tString DB_dir = \"jdbc:mysql://localhost:3306/traffic\";\n\t\tString Query_command = \"select * from t_traffic_net\";\n\t\tDatabaseLoader loader = new DatabaseLoader();\n\t\tloader.setSource(DB_dir, \"root\", \"asdf\");\n\t\tloader.setQuery(Query_command);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Models a Riak Bucket.
public interface Bucket extends Iterable<String> { boolean isAllowSiblings(); boolean isLastWriteWins(); int getNVal(); String getBackend(); int getSmallVClock(); int getBigVClock(); long getYoungVClock(); long getOldVClock(); Collection<NamedFunction> getPrecommitHooks(); Collec...
[ "public OFBucket getBucket();", "IBucket makeBucket(String name, BucketKind kind) throws RepositoryException;", "String getBucket();", "public String getBucketName() { return this.bucketName; }", "public Builder setBucket(\n String value) {\n copyOnWrite();\n instance.setBucket(value)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ArtifactReferencesType__Group__4" $ANTLR start "rule__ArtifactReferencesType__Group__4__Impl" ../eu.artist.tosca.dsl.ui/srcgen/eu/artist/tosca/dsl/ui/contentassist/antlr/internal/InternalToscaDSL.g:34561:1: rule__ArtifactReferencesType__Group__4__Impl : ( ( rule__ArtifactReferencesType__ArtifactRefere...
public final void rule__ArtifactReferencesType__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.artist.tosca.dsl.ui/src-gen/eu/artist/tosca/dsl/ui/contentassist/antlr/internal/InternalToscaDSL.g:34565:1: ( ( ( rule__ArtifactRefer...
[ "public final void rule__ReferenceType__Group__4__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.osate.xtext.aadl2.propertyset.ui/src-gen/org/osate/xtext/aadl2/propertyset/ui/contentassist/antlr/internal/InternalProp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by howzhi on 15/4/28.
public interface RequestCallback<T> { T onResponse(Response<T> response); }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checking if the length of the number is 10
@Override public void call(String phoneNumber){ if(phoneNumber.length()==10){ txt_space.setText("Calling "+phoneNumber); btn_call.setText("Hang up"); } else{ txt_space.setText("Wrong number"); } }
[ "private boolean has10s(int numberValue) {\n\t\tint get_10s = numberValue % 100;\n\t\t\n\t\tboolean has10s = get_10s>0;\n\t\t\n\t\treturn has10s;\n\t}", "private boolean validar(int n) {\n return n < 10;\n }", "public static boolean telefoneMaiorIgual9Digitos(String numero) {\n\t\tif(numero.length() >...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the creditor of Commitment, return Capability set.
public ArrayList<Capability> getCreditor() { cm = new CapabilityModel(fpcc); ArrayList<Capability> cred = new ArrayList<Capability>(); Property ahc = ccm.getProperty(CapabilityModel.ccURI + "hasCreditor"); for (NodeIterator pcs = ccm.listObjectsOfProperty(coi, ahc); pcs.hasNext();) { Resource r = (Resource) ...
[ "public OGCCapabilities getCapabilities() {\n return configuration;\n }", "public Capabilities getCapabilities() {\n Capabilities\tresult;\n \n if (getEvaluator() == null)\n result = super.getCapabilities();\n else\n result = getEvaluator().getCapabilities();\n \n // set depe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called by ants when trying to find a new Node to travel to. Checks the ant's current node, and finds any nodes connected to it (but not the ant's previous node).
private Node[] findAdjacent(Node current, Node previous) { Node[] adjacent = graph.adjacentTo(current); for (int i = 0; i < adjacent.length; i = i + 1) { if (adjacent[i] == null) { throw new RuntimeException( String.format("Graph returned null adjacent node from current node: %s", current)); } } if (...
[ "public void explore() {\n\n\t\t// The search ends when the list of nodes to visit is empty\n\t\twhile (!nodesToVisit.isEmpty()) {\n\n\t\t\t// Get the next node given the current node\n\t\t\tint nextNode = aco.getAntExploration().getNextNode(this, currentNode);\n\n\t\t\t// Remove the next node from the list of node...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void onClick(View v) { fnkGetAirBaseInfo(21); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method applies the median filter algorithm to the current matrix
public void medianFilter() { int[][] denoisedMatrix = new int[getHeight()][getWidth()]; // The window side length (square window) int windowSize = 3; // window area int window = windowSize * windowSize; // padding from the center int edge = windowSize / 2; Color[] pixel = new Color[window]; // three ...
[ "int[][] median_filter(int pixell_2d[][])\n{\n\tint median_pix[][] = new int [h][w];\n\tint neighbour_array[] = new int[9];\n\tint median_val;\n\t\t\n\tfor(int i = 1;i<h-1;i++)\n\t{\n\t\tfor(int j =1;j<w-1;j++)\n\t\t{\n\t\t\t\n\t\t\tneighbour_array[0] = pixell_2d[i-1][j-1];\n\t\t\tneighbour_array[1] = pixell_2d[i-1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 total_results = 3;
public boolean hasTotalResults() { return ((bitField0_ & 0x00000004) == 0x00000004); }
[ "private void setNumResults(int value) {\n this.bitField0_ |= 1;\n this.numResults_ = value;\n }", "int sizeOfResultArray();", "protected long fitness(UnitTestResultSet results) {\n \n return results.totalExecutionTime() / 1000000;\n }", "int getCheckResultCount();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }