query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Sets the details value.
public void setDetails(String details) { this.details = details; }
[ "public void setDetails(String details) {\n Errors e = Errors.getInstance();\n if (details.length() > 50) {\n e.setError(\"Event details cannot be over 50 characters long\");\n }\n else\n this.details = details;\n }", "public void setDetail(String detail) {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for objects of class World2.
public World2() { // Create a new world with 1000x600 cells with a cell size of 1x1 pixels. super(1000, 600, 1); GreenfootImage back2 = new GreenfootImage("images/splash.png"); GreenfootImage back1 = new GreenfootImage("images/wallp.png"); backg...
[ "public World()\n\t{\n\t\tinitWorld();\t\n\t}", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 350, 1);Borboleta borboleta = new Borboleta(); //criar \"Borboleta\".\n addObject(borboleta, 35, 175); //adicionar \"Borboleta\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all weathers mapped by DayOfWeek for a location by its name
Map<DayOfWeek, Weather> getWeatherMap(String locationName);
[ "Weather getWeather(String locationName, DayOfWeek dayOfWeek);", "List<Employee> getAllByDaysAvailableContains(DayOfWeek dayOfWeek);", "public static String[] getAllFullDaysOfWeek() {\n String[] namesOfDays = {\"monday\", \"tuesday\", \"wednesday\",\n \"thursday\", \"friday\", \"saturday\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the type of this attribute.
public void setAttributeType(final String attributeType);
[ "public void setType(final String type) {\n setAttribute(ATTRIBUTE_TYPE, type);\n }", "public void setAttributeType(String attributeType);", "public void setAttributeType(java.lang.String attributeType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a conversation whose name is the domain portion of the passed in UserIdentifier. This returns null if the conversation does not exist.
Conversation getConversation(UserIdentifier userIdentifier);
[ "java.lang.String getConversationId();", "public final EObject ruleUserDomain() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:491:2: ( (otherlv_0= 'UserDo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get issue type property keys Returns all the [issue type property]( keys of the issue type. This operation can be accessed anonymously. [Permissions](permissions) required: Administer Jira [global permission]( to get the property keys of any issue type. Browse projects [project permission]( to get the property keys of ...
@Test public void getIssueTypePropertyKeysTest() throws ApiException { String issueTypeId = null; PropertyKeys response = api.getIssueTypePropertyKeys(issueTypeId); // TODO: test validations }
[ "@Test\n public void getIssuePropertyKeysTest() throws ApiException {\n String issueIdOrKey = null;\n PropertyKeys response = api.getIssuePropertyKeys(issueIdOrKey);\n\n // TODO: test validations\n }", "@Test\n public void getIssueTypePropertyTest() throws ApiException {\n Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "statisticalFunction" /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:434:1: statisticalFunction : ( AVG statisticalFunctionParameters | MEDIAN statisticalFunctionParameters | MIN statisticalFunctionParameters | MAX statisticalFunctionParameters | STD...
public final CQLParser.statisticalFunction_return statisticalFunction() throws RecognitionException { CQLParser.statisticalFunction_return retval = new CQLParser.statisticalFunction_return(); retval.start = input.LT(1); Object root_0 = null; Token AVG116=null; Token MEDIAN118=n...
[ "public final CQLParser.resultStatisticalFunction_return resultStatisticalFunction() throws RecognitionException {\n CQLParser.resultStatisticalFunction_return retval = new CQLParser.resultStatisticalFunction_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token i=n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to set the number of armies currently stationed in this country
public void setNumArmies( int numArmies ) { this.numOfArmies = numArmies; }
[ "@Override\n public void setUsedArmies(int armies) { this.usedArmies = armies; }", "public void setArmies(int armies)\n\t{\n\t\tthis.armies = armies;\n\t}", "public static void setCardArmies(int armies) {\r\n\t\tcardArmies = armies;\r\n\t}", "public int getNumberOfArmies() {\r\n\t\treturn numberOfArmies;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to update labels once item has been confirmed
public void updateLabels() { idTag.setText("Enter Book ID for item #"+ String.valueOf(orderCounter+1) + ":"); quantityTag.setText("Enter quantity for item #"+String.valueOf(orderCounter+1)); itemInfoTag.setText("Item #"+String.valueOf(orderCounter+1) +" information:"); subtotalTag.setTex...
[ "public void updateLabels() { }", "public void updateUnreadLabel() {\n int count = getUnreadMsgCountTotal();\n if (count > 0) {\n// unreadLabel.setText(String.valueOf(count));\n// unreadLabel.setVisibility(View.VISIBLE);\n mTab.showBadgeAtIndex(1, count, getResources...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ return the attacker ID
public int getAttackerId() { return attacker_id; }
[ "String getUserSteamID();", "String getKilledUserSteamID();", "public long getAttacker()\n\t{\n\t\treturn this.getIssuer();\n\t}", "java.lang.String getUserID();", "java.lang.String getMitmproxyId();", "long getUserid();", "long getSteamID();", "public String getAttackedID() {\n\t\treturn attackedID;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WindowDto must always contain the window room
@PostMapping public WindowDto create(@RequestBody WindowDto dto) { Room room = roomDao.findById(dto.getRoomId()).orElseThrow(IllegalArgumentException::new); // On creation id is NOT specified if (dto.getId() == null) { return new WindowDto( windowDao.save(new Win...
[ "List<Window> findRoomOpenWindows(Long id);", "@Schema(example = \"7\", required = true, description = \"Size of the rolling window in days.\")\n public Integer getWindow() {\n return window;\n }", "public List<Window> getWindows(){\n\t\treturn windows;\n\t}", "@Override\n public long getValidWindow() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by A7605 on 10218 This method checks the notification message showing on listing nil flight that is not manifested
public OPR004 checkNotificationShowingOnListingFlightThatIsNotManifestedAndNil(String uldNo, String carrierCode, String flightNo, String flightDate){ uldNo = PropertyHandler.getPropValue(dataFilePath, uldNo); carrierCode = PropertyHandler.getPropValue(dataFilePath, carrierCode); flightNo = PropertyHandler.getProp...
[ "public OPR004 checkNotificationShowingOnListingFlightThatIsNotManifested(String uldNo, String carrierCode, String flightNo, String flightDate){\n\t\tuldNo = PropertyHandler.getPropValue(dataFilePath, uldNo);\n\t\tcarrierCode = PropertyHandler.getPropValue(dataFilePath, carrierCode);\n\t\tflightNo = PropertyHandler...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor with a Parcel parameter for passing ParcelableMessages between Activities.
public ParcelableMessage(Parcel source) { super(source.readString(), source.readString(), new Date( source.readLong())); }
[ "public ParcelableMessage(Message message) {\n\t\tsuper(message);\n\t}", "public Contact(Parcel in){\n\n readFromParcel(in);\n\n }", "@Override\n public MyData createFromParcel(Parcel parcel) {\n return new MyData(parcel);\n }", "public Person(Parcel p) {\r\n\t\tpid = p.read...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setCurrent_player method, of class Game.
@Test public void testSetCurrent_player() { System.out.println("setCurrent_player"); Profile current_player = null; Game instance = new Game(); instance.setCurrent_player(current_player); // TODO review the generated test code and remove the default call to fail. //fa...
[ "@Test\n public void testSetGetActivePlayer(){\n turn.setActivePlayer(player1);\n Assert.assertEquals(player1, turn.getActivePlayer());\n }", "@Test\n public void testChangePlayer()\n {\n System.out.println(\"changePlayer\");\n GameBl instance = new GameBl(sizeRow, sizeCol)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that changes note length read in to the format that our bell choir can read Switch Statement syntax from Oracle documentation:
private static String formatNoteLength(String length) { String properLength = "HALF"; // default to half note // System.out.println(length); switch (length) { case "8": properLength = "EIGHTH"; break; case "4": properLength = "QUARTER"; break; case "2": properLength = "HALF"; b...
[ "void editNoteLength(NoteModel currentNote, int newLength);", "public void setNoteLength ( final int len )\n {\n _root.putInt ( NOTE_LENGTH, len );\n }", "private NoteLength numberToNoteLength(String len) {\n\t\tswitch (len) {\n\t\t\tcase \"1\":\n\t\t\t\treturn NoteLength.WHOLE;\n\t\t\tcase \"2\":\n\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleOperation" $ANTLR start "entryRuleEvent" ../com.mguidi.soa/srcgen/com/mguidi/soa/parser/antlr/internal/InternalSOA.g:1332:1: entryRuleEvent returns [String current=null] : iv_ruleEvent= ruleEvent EOF ;
public final String entryRuleEvent() throws RecognitionException { String current = null; AntlrDatatypeRuleToken iv_ruleEvent = null; try { // ../com.mguidi.soa/src-gen/com/mguidi/soa/parser/antlr/internal/InternalSOA.g:1333:2: (iv_ruleEvent= ruleEvent EOF ) // ../com....
[ "public final EObject entryRuleEvent() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEvent = null;\n\n\n try {\n // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:186:2: (iv_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show an error on the activity. The idea has been to escalate errors to the UI classes by the exception mechanisms and let these classes decide how to show the error.
private void showError(Throwable error) { uiBinding.recipesList.setVisibility(View.GONE); uiBinding.recipesListLoadingLayout.loadingLayout.setVisibility(View.GONE); uiBinding.recipesListErrorLayout.errorLayout.setVisibility(View.VISIBLE); uiBinding.recipesListNoElementsLayout.noElementsL...
[ "@Override\n public void showError(String message) {\n Toast.makeText(getApplicationContext(), \"Error\" + message, Toast.LENGTH_SHORT).show();\n\n }", "public static void showError (Exception e)\n\t{\n\t\tString message = getErrorMessage(e);\n\t\n\t\t// filter out cancelled actions by the user which...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Receives a message. The message is checked against looping and then forwarded to the message queue of a suitable RequestHandler. The method returns as soon as this is done and does not block until the message is processed.
@Override public Message receive(Message message) { log("received message", message); logger.debug("Received message" + message); logger.debug("Getting new handler for " + message); RequestHandler requestHandler = handlerStore.getHandler(message); logger.debug("Got handler f...
[ "public void receiveMessage() throws InterruptedException, ExecutionException {\n ReceiveMessageRequest request = createReceiveMessageRequest();\n ReceiveMessageResult messageResult = amazonSQS.receiveMessage(request);\n\n logger.info(\"Total of messages retrieved: {}\", messageResult.getMessa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates an id and dependency against a list of DependencyDescriptors. The id and dependency are valid if there is a descriptor with a matching dependency id and class.
public static boolean validateService( List<DependencyDescriptor> descriptors, String dependencyId, Object dependency) { if (dependencyId == null || dependency == null) { theLogger.warn("Found null argument. Returning false."); return false; } for (DependencyDescriptor descriptor : descriptors...
[ "public static boolean validateServiceId(\n\t\t\t\tList<DependencyDescriptor> descriptors,\n\t\t\t\tString dependencyId) {\n\t\t\tif (dependencyId == null) {\n\t\t\t\ttheLogger.warn(\"Found null dependencyId. Returning false.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (DependencyDescriptor descriptor : descrip...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .AddFriendFromOther.Rsp add_friend_from_other_rsp = 12;
AddFriendFromOther.Rsp getAddFriendFromOtherRsp();
[ "AddFriendFromSelf.Rsp getAddFriendFromSelfRsp();", "private void mergeAddFriendFromOtherRsp(AddFriendFromOther.Rsp value) {\n if (rspCase_ == 12 &&\n rsp_ != AddFriendFromOther.Rsp.getDefaultInstance()) {\n rsp_ = AddFriendFromOther.Rsp.newBuilder((AddFriendFromOther.Rsp) rsp_)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a list of spout definitions. Optionally overriding existing definitions if one with the same ID already exists.
public void addAllSpouts(List<SpoutDef> spouts, boolean override) { for (SpoutDef spout : spouts) { String id = spout.getId(); if (this.spoutMap.get(id) == null || override) { this.spoutMap.put(spout.getId(), spout); } else { LOG.warn("Ignoring...
[ "void setDefinitions(Set<IItemDefinition> aDefinitions) throws Exception;", "public List<SpoutDef> getSpouts() {\n ArrayList<SpoutDef> retval = new ArrayList<SpoutDef>();\n retval.addAll(this.spoutMap.values());\n return retval;\n }", "public void addDefinitions(Map<String, Definition> d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Crea las reglas para el juego Gravity
public ReglasJuego creaReglas() { return new ReglasGravity(numFilGR, numColGr); }
[ "public void construirGrupos() {\r\n GeneradorGrupos genGr = new GeneradorGrupos(datos);\r\n this.grupos = genGr.generarGrupos();\r\n }", "private void initialisationGrille() {\r\n\t\tif (typeGrille == 1) {\r\n\t\t\ttableau = new GrilleRectangulaire(hauteur, largeur);\r\n\t\t}\r\n\t\tif (typeGril...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operacion para consultar todas las Transferencias de compra del sistema
public Collection<Transferencia> traerTodasLasTransferencias() { Collection<Transferencia> resultado = null; try { controlTransferencia = new ControlTransferencia(); bitacora.info("Registro Transferencia Iniciado correctamente"); resultado = controlTransferencia.traer...
[ "public static void consultarPerfiles() throws Exception, RemoteException, MalformedURLException, ServiceException{\n\t\tURL url = new URL(\"http://10.10.115.12:9083/pventasservicios/ws/carterasModeloPubIntWS\");\n\t\tCarterasModeloPubIntWS_ServiceLocator locator = new CarterasModeloPubIntWS_ServiceLocator();\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the share symbol's format
@Test public void setShareSymbol1() { String invalidSymbol = "doge/usd"; boolean shouldBeFalse = bean.setShareSymbol1(invalidSymbol); assertFalse(shouldBeFalse); String validSymbol = "doge-usd"; boolean shouldBeTrue = bean.setShareSymbol1(validSymbol); assertTrue(sho...
[ "@Test\n public void setShareSymbol2() {\n String invalidSymbol = \"doge/usd\";\n boolean shouldBeFalse = bean.setShareSymbol2(invalidSymbol);\n assertFalse(shouldBeFalse);\n\n String validSymbol = \"doge-usd\";\n boolean shouldBeTrue = bean.setShareSymbol2(validSymbol);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
read from the csv update pulse and the other values
@Override public void run() { try { sleep(1000); BufferedReader br = new BufferedReader(new FileReader(new File(this.patientDataLocation))); String line; boolean firstLine = true; for(int count=1; count<=5; count++) ...
[ "public void Read_Csv() {\n\t\t\n\t\tFile file = new File(\"Faucets.csv\");\n\t\tif(file.exists() == false) {\n\t\t\ttry {\n\t\t\t\t if (file.createNewFile()) {\n\t\t\t\t System.out.println(\"File created: \" + file.getName());\n\t\t\t\t } else {\n\t\t\t\t System.out.println(\"File already exists... E...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
auto generated Axis2 call back method for addPersonInfo method override this method for handling normal response from addPersonInfo operation
public void receiveResultaddPersonInfo( org.tempuri.UserWcfStub.AddPersonInfoResponse result) { }
[ "ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson addNewControlPersonsExt();", "public void receiveResultgetUserPersoninfo(\r\n org.tempuri.UserWcfStub.GetUserPersoninfoResponse result) {\r\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription addNewControlPe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ TC_AK_NV_Weekly Created by Jeffrey Date Created: 1/14/19 Usage: Loads AK and NV Weekly timesheets
public void AKNVWeekly() { String pass = "AK_NV_Weekly"; CommonST_Weekly(pass); }
[ "public void COWeekly()\r\n\t{\r\n\t\tString pass = \"CO_Weekly\";\r\n\t\tCommonST_Weekly(pass);\r\n\t}", "public void CommonWeekly()\r\n\t{\r\n\t\tString pass = \"CommonST_Weekly\";\r\n\t\tCommonST_Weekly(pass);\r\n\t}", "public void AKDailyTimesheet()\r\n\t{\r\n\t\tString pass = \"NV_AK_Daily\";\r\n\t\talaska...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
finds the max using the map and letter
public static ArrayList<String> findMax(Map<String, ArrayList<String>> master, char letter){ ArrayList<String> max = new ArrayList<String>(); ArrayList<String> temp = new ArrayList<String>(); Iterator<String> i = master.keySet().iterator(); //initializes max with first Strin...
[ "private int maxNumber() {\n int max = 0;\n for (String word : map.keySet()) {\n int size = map.get(word).size();\n if (size > max)\n max = size;\n }\n\n return max;\n }", "public static char getMaxChars(String str){\n\t\n\n\t\n\tHashMap<Characte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column tb_yhzh.ZHLX
public Builder zhlx(String zhlx) { obj.setZhlx(zhlx); return this; }
[ "void setZyhtVO(nc.vo.crd.bd.interf.zyhtvo.ZyhtVO zyhtVO);", "public void setXH(java.lang.String XH) {\r\n this.XH = XH;\r\n }", "public void setZhiyuanIndex(Integer zhiyuanIndex) {\n this.zhiyuanIndex = zhiyuanIndex;\n }", "public void setZhongliang(String zhongliang) {\n this.zhon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if potion break; otherwise drop on the cell ItemMaster.isWeapon(item);
private void dropped(HeroItem item, Unit unit) { if (ItemMaster.isBreakable(item)) { item.broken(); // remove from game? if (item instanceof QuickItem) { QuickItem quickItemObj = (QuickItem) item; if (quickItemObj.isConcoction()) { quic...
[ "void dropMissileAsItem();", "@Override\n public boolean isUsableWith(Weapon item) {\n return false;\n }", "public void attackWith(RpgItem item) {\r\n\t\tif(item.type == RpgItemType.Single_Use_Weapon) {\r\n\t\t\tinv.removeItem(item);\r\n\t\t\tequippedItem = null;\r\n\t\t} else if(it...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtain filter that revert the filtering. In other words: every things accepted by this filter will be refused by created filter, and every things refused by this filter will be accepted by created filter.
default Filter<T> negate() { final Filter<T> parent = this; return new Filter<T>() { @Override public boolean isFiltered(final T element) { return !parent.isFiltered(element); } @Override public Filter<...
[ "Filter getFilter();", "public Filter getFilter() {\n\t\treturn (filter);\n\t}", "public void resetFilter();", "BuildFilter defaultFilter();", "public InvertFilter(String name)\n {\n super(name);\n }", "static Filter getEnrichedFilter(Filter originalFilter) {\n if (originalFilter insta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if (!permitted_reads_.contains(paramString)) throw new SecurityException("Attempting to read file! (" + paramString + ")");
public void checkRead(String paramString) { }
[ "public void checkRead(String paramString, Object paramObject) {\n }", "private static boolean isServiceFileAccessForRead(String reqUser, Properties meta) {\n\t\tString location = \"isServiceFileAccessForRead\";\n\t\tboolean retVal= false;\n\t\tString DUCC_HOME = System.getProperty(\"DUCC_HOME\");\n\t\tString du...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if this register is accepted_tou.
public boolean isAccepted_tou();
[ "public boolean getAccepted_tou();", "public void setAccepted_tou(boolean accepted_tou);", "public abstract boolean accepts(Unit unit);", "@XmlTransient\n\tpublic boolean isCanActivateUser() {\n\t\treturn (isSecurityAdministrator() && isSelfRegistrationEnabled());\n\t}", "public boolean isSetToUserId() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column USER_INFO.TBOOK.BOOKSTYPE
public void setBookstype(String bookstype) { this.bookstype = bookstype == null ? null : bookstype.trim(); }
[ "public String getBookstype() {\n return bookstype;\n }", "public void setBookType(int bookType) {\n\t\tthis.bookType = bookType;\n\t}", "public void setBookType(String bookType) {\n this.bookType = bookType == null ? null : bookType.trim();\n }", "public String getBookType() {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the item which is currently selected. Returns null if the slot is empty.
public Item getSelectedItem() { return this.getSelectedSlot().getMappedItem(); }
[ "private ItemSlot getSelectedSlot() {\n\t\tfor(ItemSlot slot : itemSlots) {\n\t\t\tif((slot.getCoordX() == selectedSlotPosX) && (slot.getCoordY() == selectedSlotPosY)) {\n\t\t\t\treturn slot;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public SidePaneItem getSelectedItem() {\n if (_selectedItem != null)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the pitch of this note
public Pitch getPitch() { return pitch; }
[ "public double getPitch()\n\t{\n\t\treturn this.pitch;\n\t}", "public int getPitch() {\n return pitch;\n }", "public Pitch getPitch() {\n return this.pitch;\n }", "public float getPitch() {\n return pitch;\n }", "public String getPitchAsString(){ return Integer.toString(this.pitch);}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a data function to the model
public void addDataFunction(DataFunction dataFunction) { dataFunctions.add(dataFunction); }
[ "public void addData(F dataObject) {\r\n this.data = dataObject;\r\n }", "void addDemoData();", "Builder addBusinessFunction(BusinessFunction value);", "Builder addBusinessFunction(String value);", "public abstract DataValue add(DataMeasure measure);", "public T onDataAdded(R node);", "public ...
{ "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.modify_user_no
public Integer getModifyUserNo() { return modifyUserNo; }
[ "public java.lang.Integer getModifyuserno () {\n\t\treturn modifyuserno;\n\t}", "public Integer getModifyUser() {\n return modifyUser;\n }", "public void setModifyUserNo(Integer modifyUserNo) {\n this.modifyUserNo = modifyUserNo;\n }", "public String getModifyUserId() {\n return mod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the process the node belongs to.
public ProcessItem getProcess();
[ "public Process getProcess() {\n\t\tOperator parent = getParent();\n\t\tif (parent == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn parent.getProcess();\n\t\t}\n\t}", "Process getProcess();", "public Process getProcess(int pid){\r\n for(int i=0; i<this.processesList.size(); i++){\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field779' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField779(java.lang.CharSequence value) { validate(fields()[779], value); this.field779 = value; fieldSetFlags()[779] = true; return this; }
[ "public void setField779(java.lang.CharSequence value) {\n this.field779 = value;\n }", "public void setField778(java.lang.CharSequence value) {\n this.field778 = value;\n }", "public void setField787(java.lang.CharSequence value) {\n this.field787 = value;\n }", "public void setField79(java.lang....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'supportedFormats' field.
public Energistics.Etp.v12.Protocol.Core.RequestSession.Builder clearSupportedFormats() { supportedFormats = null; fieldSetFlags()[6] = false; return this; }
[ "public void clearFormats();", "public void unsetFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FORMAT$10, 0);\n }\n }", "void unsetFormat();", "void unsetFormatOptions();", "public static void unregisterAll() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of releaseScores method, of class ScoreService.
@Test public void shouldIncrementAndThenReleaseScorePlayerOne() { int expected = 0 ; scoreService.incrementScorePlayerOne() ; scoreService.incrementScorePlayerOne() ; scoreService.releaseScores() ...
[ "@Test\n public void shouldIncrementAndThenReleaseScorePlayerTwo() {\n int expected = 0 ;\n scoreService.incrementScorePlayerTwo() ;\n scoreService.incrementScorePlayerTwo() ;\n scoreService.releaseScores() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prefixes the specified message with the plugin name
private static TextComponent prefixMessage(TextComponent message) { return TextComponent.builder() .append( TextComponent.of("[") .color(TextColor.GOLD) ) .append( TextComponent.of("DriveBackupV2") ...
[ "private static String prefixMessage(String message) {\n return translateMessageColors(Config.getMessagePrefix() + Config.getDefaultMessageColor()) + message;\n }", "public interface IMessagePrefixProvider {\n\n /**\n* Returns the computed prefix for the provided control.\n*\n* @param control\n* ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
send a DATA packet using the Routing table and the neighbor information
public void send_data_packet(char dest, DatagramPacket dp) { if (win.is_local_name(dest)) { // Send to local node try { dp.setAddress(InetAddress.getLocalHost()); dp.setPort(ds.getLocalPort()); ds.send(dp); win.DATA_snt++; ...
[ "public void sendTable(){\n\t\tfor(int i = 0; i<this.neighbors.length; i++){\n\t\t\ttry {\n\t\t\t\tSystem.out.println(name+\" Sending: \" + Arrays.toString(table.toByteArray()) + \" to \" + neighbors[i].getAddress());\n\t\t\t\t//UDPPacket udp = new UDPPacket(port, destPort, data);\n\t\t\t\t//DatagramPacket packet =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int64 connectUnitRoleId = 6;
long getConnectUnitRoleId();
[ "public long getConnectUnitRoleId() {\n return connectUnitRoleId_;\n }", "public long getConnectUnitRoleId() {\n return connectUnitRoleId_;\n }", "boolean hasConnectUnitRoleId();", "long getSamanRoleId();", "public Builder setConnectUnitRoleId(long value) {\n bitField0_ |= 0x00000...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
trying to remove permission the manager hasn't
@Test void removeStorePermissionNegative() { int amountPerms = mangerStore.getStorePermissions().size(); Assertions.assertFalse(mangerStore.removeStorePermission(StorePermission.EDIT_PRODUCT)); Assertions.assertFalse(mangerStore.getStorePermissions().size()<amountPerms); ...
[ "public boolean removePermission(Permission permission);", "public void revokePermission(Permissable perm, IPermission permission);", "public void removePermission(T object, Permission permission, User user);", "void onPermissionsCleared(PermissionsManager manager);", "@Override\n public void clearPermis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the renderer for this component family and renderer type.
public RendererBean findRenderer( String componentFamily, String rendererType) { String compositeKey = componentFamily + "|" + rendererType; return _renderers.get(compositeKey); }
[ "String getRendererType();", "public static Renderer getRenderer() {\n\t\treturn renderer.get();\n\t}", "Renderer getRenderer();", "public Renderer getRenderer()\n\t{\n\t\treturn getObject().getRenderer();\n\t}", "public Renderer<?> getRenderer() {\n return (Renderer<?>) getState().rendererConnec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Operation__Group__1__Impl" $ANTLR start "rule__Operation__Group__2" InternalMyDsl.g:2828:1: rule__Operation__Group__2 : rule__Operation__Group__2__Impl rule__Operation__Group__3 ;
public final void rule__Operation__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:2832:1: ( rule__Operation__Group__2__Impl rule__Operation__Group__3 ) // InternalMyDsl.g:2833:2: rule__Operation__Group__2__Impl rule...
[ "public final void rule__Operation__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5912:1: ( rule__Operation__Group_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks the behavior of the trim function.
@Test(description = "Implements ATC 1-2") public void trim() { String str = " foo "; Assert.assertTrue("foo".equals(str.trim())); }
[ "@Test\n public void testSafeTrim() {\n assertEquals(\"\", Strings.safeTrim(null));\n assertEquals(\"\", Strings.safeTrim(\" \\t\\n\"));\n assertEquals(\"hello there!\", Strings.safeTrim(\" hello there! \\n\"));\n }", "@Test\n public void testRtrim() {\n logger.info(\"rtrim\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Esta funcion realiza el parseo de la sentencia BEGIN TRANSACTION
public static ZStatement parseBeginTransacctionStatement(String sentencia) throws ParseException, TokenMgrError { int endOfStatementChar = sentencia.toLowerCase().indexOf(";"); if (endOfStatementChar == -1) { throw new ParseException("Parser TXL: SQL string not recognized"); } sentencia =...
[ "Transaction beginTx();", "public static ZStatement parseCommitTransacctionStatement(String sentencia) throws ParseException, TokenMgrError {\r\n \tint endOfStatementChar = sentencia.toLowerCase().indexOf(\";\");\r\n \tif (endOfStatementChar == -1) {\r\n \t\tthrow new ParseException(\"Parser TXL: SQL str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configure the behavior of adjustedContentInset. Default is UIScrollViewContentInsetAdjustmentAutomatic. APISince: 11.0
@Generated @Selector("setContentInsetAdjustmentBehavior:") public native void setContentInsetAdjustmentBehavior(@NInt long value);
[ "@Generated\n @Selector(\"adjustedContentInsetDidChange\")\n public native void adjustedContentInsetDidChange();", "@Generated\n @Selector(\"adjustedContentInset\")\n @ByValue\n public native UIEdgeInsets adjustedContentInset();", "@Generated\n @Selector(\"automaticallyAdjustsScrollIndicatorIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_SYN_SETLMT_ACC.MT202_FIELD72_1
public void setMT202_FIELD72_1(String MT202_FIELD72_1) { this.MT202_FIELD72_1 = MT202_FIELD72_1 == null ? null : MT202_FIELD72_1.trim(); }
[ "public void setMT103_FIELD72_1(String MT103_FIELD72_1) {\r\n this.MT103_FIELD72_1 = MT103_FIELD72_1 == null ? null : MT103_FIELD72_1.trim();\r\n }", "public void setField602(java.lang.CharSequence value) {\n this.field602 = value;\n }", "public void setField329(java.lang.CharSequence value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the average task time.
public double getAverageTaskTime();
[ "public long getAvgTime() {\n return avgTime;\n }", "public TimeSpan getTotalAvgTime() {\n return totalTimer.getAvgTime();\n }", "public Time getAverageTime()\n\t{\n\t\treturn averageTime;\n\t}", "public long calulateAverageTime()\r\n {\r\n long sum = 0;\r\n long avgTime = 0;\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EAttributeDefinition__Group__3__Impl" $ANTLR start "rule__EAttributeDefinition__Group__4" InternalAADMParser.g:14276:1: rule__EAttributeDefinition__Group__4 : rule__EAttributeDefinition__Group__4__Impl ;
public final void rule__EAttributeDefinition__Group__4() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:14280:1: ( rule__EAttributeDefinition__Group__4__Impl ) // InternalAADMParser.g:14281:2: rule__EAttributeDefinition__...
[ "public final void rule__EAttributeDefinition__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:14291:1: ( ( RULE_END ) )\n // InternalAADMParser.g:14292:1: ( RULE_END )\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field945' field
public java.lang.CharSequence getField945() { return field945; }
[ "public java.lang.CharSequence getField945() {\n return field945;\n }", "java.lang.String getField1571();", "java.lang.String getField1301();", "java.lang.String getField1599();", "java.lang.String getField1393();", "java.lang.String getField1063();", "java.lang.String getField1362();", "java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal helper method to retrieve the container for all the flash scopes. Will return null if the container does not exist.
@SuppressWarnings("unchecked") private static Map<Integer, FlashScope> getContainer(HttpSession session) throws IllegalStateException { return (Map<Integer, FlashScope>) session .getAttribute(StripesConstants.REQ_ATTR_FLASH_SCOPE_LOCATION); }
[ "private static Map<Integer, FlashScope> getContainer(HttpServletRequest req, boolean create) {\n try {\n HttpSession session = req.getSession(create);\n Map<Integer, FlashScope> scopes = null;\n if (session != null) {\n scopes = getContainer(session);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of showDoubleData method showFloatData method
public String showFloatData(){ Node current = floatHead; floatListContents = "" + floatHead.floatData; while(current.nextFloat != null){ System.out.print(current.floatData + " -> "); current = current.nextFloat; floatListCon...
[ "Float getABinaryFloatDataSourceValue();", "Double getFreeFloat();", "public String showDoubleData(){\r\n \r\n Node current = doubleHead;\r\n \r\n doubleListContents = \"\" + doubleHead.doubleData;\r\n \r\n while(current.nextDouble != null){\r\n System.out.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the year portion of the date.
public int getYear() { return date.getYear(); }
[ "public int getYear(){\n\t\treturn date.getYear();\n\t}", "java.lang.String getYear();", "private int getYear(Date date) {\r\n return getGivenTimeFieldValue(date, Calendar.YEAR);\r\n }", "public Integer getDateyear() {\n return dateyear;\n }", "public static int getYear(int date) {\n\t\treturn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the time at which this document was created. Returns null for nonexisting documents.
@Nullable public Timestamp getCreateTime() { return createTime; }
[ "public DateTime getCreatedTimestamp() {\n\t\treturn getDateTime(\"sys_created_on\");\n\t}", "public Long getCreateAt() {\n\t\treturn createAt;\n\t}", "public Timestamp getCreate_timestamp() {\n\t\treturn create_timestamp;\n\t}", "public Timestamp getCreate_timestamp() {\n return create_timestamp;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleXVariableDeclaration" $ANTLR start "entryRuleJvmFormalParameter" ../org.xtext.scripting/srcgen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:3766:1: entryRuleJvmFormalParameter returns [EObject current=null] : iv_ruleJvmFormalParameter= ruleJvmFormalParameter EOF ;
public final EObject entryRuleJvmFormalParameter() throws RecognitionException { EObject current = null; EObject iv_ruleJvmFormalParameter = null; try { // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:3767:2: (iv_ruleJvmFormalParamet...
[ "public final void entryRuleJvmFormalParameter() throws RecognitionException {\n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1272:1: ( ruleJvmFormalParameter EOF )\n // ../org.xtext.example.hello...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Gl Journal Name' attribute. If the meaning of the 'Gl Journal Name' attribute isn't clear, there really should be more of a description here...
String getGlJournalName();
[ "String getGlJournalId();", "public String getJournal() {\n \n return this.journal;\n }", "public String getRlName() {\n return (String) getAttributeInternal(RLNAME);\n }", "public String getJournal() {\n return journal;\n }", "public String getL_name() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
delete the clinic by id.
public void delete(Long id) { log.debug("Request to delete Clinic : {}", id); clinicRepository.delete(id); }
[ "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Colecao : {}\", id); colecaoRepository.deleteById(id);\n }", "@Override\n public void delete(String id) {\n log.debug(\"Request to delete Disciplina : {}\", id);\n disciplinaRepository.delete(id);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets product at specified index in inventory
public Product getProduct(int i){ return inventory.get(i); }
[ "InventorySlot get(int index);", "sigma.software.leovegas.drugstore.api.protobuf.Proto.ProductDetailsItem getProducts(int index);", "hipstershop.Demo.Product getProducts(int index);", "com.example.tutorial.PublishProductProtocol.PublishProductItem getPublishProduct(int index);", "public items giveItem(int _...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of all nodes in the MultiGraph
@Override public List<N> getNodes() { List<N> nodeList = new ArrayList<N>(); nodeList.addAll(adjacencyMap.keySet()); return nodeList; }
[ "Collection<Node> getNodes();", "public List nodes()\n\t{\n\t\t// List<GraphNode>\n\t\treturn nodes ;\n\t}", "public Set<String> getAllNodes() {\n return this.graph.keySet();\n }", "List<Node> getNodes();", "Collection<Node> allNodes();", "@Override\n public Set<Node> getNodes() throws PMExce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the scroll position to the 0,0.
public void resetScroll() { if (scroller != null) { scroller.reset(); refreshView(); } }
[ "@Override\n public void resetScrollPosition() {\n }", "public void restorePosition() {\n if (rememberedPosition_ != -1) {\n scrollbar_.setValue(rememberedPosition_);\n rememberedPosition_ = -1;\n }\n }", "public void resetPosition()\n {\n resetPosition(false);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ServidorAplicaciones__Group_4__0__Impl" $ANTLR start "rule__ServidorAplicaciones__Group_4__1" InternalCeffective.g:3576:1: rule__ServidorAplicaciones__Group_4__1 : rule__ServidorAplicaciones__Group_4__1__Impl ;
public final void rule__ServidorAplicaciones__Group_4__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCeffective.g:3580:1: ( rule__ServidorAplicaciones__Group_4__1__Impl ) // InternalCeffective.g:3581:2: rule__ServidorAplicaciones...
[ "public final void rule__ServidorAplicaciones__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:3322:1: ( ( ( rule__ServidorAplicaciones__Group_4__0 )? ) )\n // InternalCeffective.g:3323:1: ( ( r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get one clientUser by id.
@Transactional(readOnly = true) public Optional<ClientUser> findOne(Long id) { log.debug("Request to get ClientUser : {}", id); return clientUserRepository.findById(id); }
[ "public User getUser(Long id) {\n LOG.info(\"Retrieving user.\", id);\n return userRepository.findOne(id);\n }", "public User get(String id);", "private User getUser(int id) {\n\n for (User user : this.users\n ) {\n if (user.getUserNumber() == id) return user;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The addAlwaysTrueRestriction method adds a new restriction to the query that is designed to create a RecordCardinality() set that occurs once at all times. (The IsTemporalRelationWithQuantities() function will test that this special set has a quantity of at least one, so it will be true at all times.)
private static void addAlwaysTrueRestriction(SPARQLQuery sPARQLQuery) { String trueRestriction; //The special restriction String newVariable; //A new variable to put in the SELECT line SPARQLQuery trueQuery; //It's in a query QueryRestriction trueQueryRestriction; //Which becomes a query r...
[ "public void addRestriction(Restriction newRestriction)\r\n\t{\r\n\t\trestrictions.add(newRestriction);\r\n\t}", "boolean hasMarketTradableRestriction();", "boolean getLimitToOneMatch();", "int getMarketTradableRestriction();", "public void addRestrictions()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tfor(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of controllerImagen
public controllerImagen() { }
[ "public void newController(){\n if(game==null){\n newGame();\n }\n this.controller = new Controller(game);\n }", "public ImageController() {\n em = EMF.createEntityManager();\n }", "Controllers createControllers();", "public ControllerEnfermaria() {\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the earliest start time of an activity. Units for the start time are the same as the activity duration units.
int getEarliestStartTime(ActivityData activity);
[ "int getEarliestEndTime(ActivityData activity);", "public String getActivityStartTime() {\n\t\treturn this.activityStartTime;\n\t}", "public Timestamp getStarttime() {\n return (Timestamp) getAttributeInternal(STARTTIME);\n }", "int getLatestStartTime(ActivityData activity);", "public java.sql.Tim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a fixed, nonconfigurable value for a Property.
public <T> void addFixedValue(Property<T> property, T value) { if (property == null || value == null) { throw new IllegalArgumentException("The property and value must be non-null"); } //simple check for duplicates (doesn't consider _fixedNamedValues) for (PropertyValue pv : _fixedPropertyValues) { if (...
[ "private void setFixed(entity.PolicyLocation value) {\n __getInternalInterface().setFieldValue(FIXED_PROP.get(), value);\n }", "public void setProperty(String property, String value);", "public void setFixed(int value) {\n this.fixed = value;\n }", "public void setProperty(String property) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
BEHAVIOUR Game loop, calls playTurn until checkmate is reached
public void play() { int turn = 1; while (!isCheckMate()) { System.out.println("Turn " + turn++); board.print(); playTurn(whitePlayer); board.print(); playTurn(blackPlayer); } }
[ "private void doGameTurn()\n\t{\n\t\tif (!lost && !won)\n\t\t{\n\t\t\trefreshMapAndFrame();\n\t\t\t\n\t\t\tcheckPlayerCondition();\n\t\t\tElementAccess.openExit();\n\t\t\tSystem.out.println(turn);\n\t\t}\n\t\telse if (lost)\n\t\t{\n\t\t\tSound.lost();\n\t\t\trefreshMapAndFrame();\n\n\t\t\tif (playerHasLost())\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Here we check to see if the game had a winner, and then update the gb state accordingly
private void determineGbState() { if ( //check rows (getButtonState(1) == getButtonState(2) && getButtonState(2) == getButtonState(3) && getButtonState(1) != EMPTY) || (getButtonState(4) == getButtonState(5) && getButtonState(5) == getButtonSta...
[ "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "public void winGame() {\n this.isWinner = true;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the byte hw1_1000000LOC26method14(double,double,short) method test.
@Test public void testHw1_1000000LOC26method14_2() throws Exception { hw1_1000000LOC26 fixture = new hw1_1000000LOC26(); fixture.f0 = (short) 1; double var0 = 1.0; double var1 = 1.0; short var2 = (short) 1; byte result = fixture.hw1_1000000LOC26method14(var0, var1, var2); // add additional test code ...
[ "@Test\n\tpublic void testHw1_500LOC27method43_1()\n\t\tthrows Exception {\n\t\tdouble var0 = 1.0;\n\t\thw1_500LOC18 var1 = new hw1_500LOC18();\n\t\tbyte var2 = (byte) 1;\n\t\tlong var3 = 1L;\n\t\tbyte var4 = (byte) 1;\n\t\thw1_500LOC6 var5 = new hw1_500LOC6();\n\t\tfloat var6 = 1.0f;\n\t\tfloat var7 = 1.0f;\n\t\ts...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets or maybe creates a generic group.
GenericGroup getOrMaybeCreateGenericGroup( String groupId, boolean createIfNotExists ) throws UnknownMemberIdException, GroupIdNotFoundException { Group group = groups.get(groupId); if (group == null && !createIfNotExists) { throw new UnknownMemberIdException(String.form...
[ "GroupType createGroupType();", "TgroupType getTgroup();", "Group getGroupById(String id);", "Group getGroupByID(int id) throws Exception;", "GroupsType createGroupsType();", "Object getGroupID(String groupName) throws Exception;", "GroupR createGroupR();", "Group getGroup ( UUID id ) throws Fileshare...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To remove all players from JList.
synchronized public void removeAllPlayers() { players.clear(); Runnable runnable = new Runnable() { public void run() { playersListModel.removeAllElements(); revalidate(); repaint(); } }; SwingUtilities.invokeLater( runnable ); }
[ "public void removeAllPlayers()\r\n\t{\r\n\t\tplayers.clear();\r\n\t}", "public void clearGameList() {\n gameJList.removeAll();\n }", "public void removePlayers() {\r\n\t\tList<Object> newObjects = new ArrayList<Object>();\r\n\t\tfor (int x = 0; x < objects.size(); x++) {\r\n\t\t\tif (!(objects.get(x)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mandatory empty constructor for the fragment manager to instantiate the fragment (e.g. upon screen orientation changes).
public FragmentMy() { }
[ "public MainFragment() {\n }", "public PersonFragment() {\n }", "public Basic_Fragment() {\n\n }", "protected abstract Fragment createFragment();", "public userHomeFragment() {\n\n }", "Fragment createFragment();", "public RoomAmenitiesFragment() {\n // Required empty public construct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the HTTP GET method. Lists the dishes on all submenus of a particular menu to the customer.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //processRequest(request, response); int rid = Integer.parseInt(request.getParameter("rid")); String mtype = request.getParameter("mtype"); Http...
[ "public static void getIndexMenus() {\n\t\tRestAssured.baseURI = \"http://beverlyshill.solutions/\";\n\t\tRestAssured.basePath = \"index\";\n\t\tRestAssured.defaultParser = Parser.JSON;\n\t\tString getLine = RestAssured.baseURI + RestAssured.basePath;\n\t\tgetIndexMenusResponse =\n \t\tgiven().\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check state after job submission and correct assignment of tasks on empty slots
@Test public void testSubmitJobAndAssignTask() throws IOException { this.advanceTime(1000); JobInProgress submittedJIP = this.submitJob(JobStatus.RUNNING, 1, 1); assertTrue(this.scheduler.getJobs(null).iterator().next() .equals(submittedJIP)); List<Task> tasks = this.scheduler.assignTasks(t...
[ "@Test\n public void submitJobWithoutSubmissions() {\n atheneService.submitJob(exercise1);\n assertThat(!atheneService.isTaskRunning(exercise1.getId())).isTrue();\n }", "private boolean isOnlyTask(State state) {\r\n\t\treturn state.getTasks(taskString).size() == 1;\r\n\t}", "public void test...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sort the query result by WorkbasketKey.
HistoryQuery orderByWorkbasketKey(SortDirection sortDirection);
[ "public void sortbyKey() {\n\t\tCollections.sort(getPIRvalue(), new Comparator<Pair<String, Double>>() {\n\t\t\tpublic int compare(Pair<String, Double> o1, Pair<String, Double> o2) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn o1.getKey().compareTo(o2.getKey());\n\t\t\t}\n\t\t});\n\t}", "private s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ResponseSheet is made of the assessment and an ArrayList of answers for each question
public ResponseSheet(Assessment assess, ArrayList<ArrayList<String>> rep) { assessment = assess; responses = rep; }
[ "List<ExamGrSubMeta> getAnswerSheetMeta();", "QuestionResponse getResponses(String questionId);", "public void processResponses() {\r\n //data we need for the calcualtions\r\n double totals[] = new double[survey.numQuestions];\r\n double averages[] = new double[survey.numQuestions];\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
load bulk data from InputStream to MySQL
public static void bulkLoadFromInputStream(Connection cnn,String loadDataSql, InputStream dataStream) throws Exception { if(dataStream==null){ Log.info("InputStream is null ,No data is imported"); throw new IOException("inputstream is null!"); } Statement myStatement = (com.mysql.jdbc.Statement)cnn.createS...
[ "private void batchImport() {\r\n m_jdbcTemplate.batchUpdate(createInsertQuery(),\r\n new BatchPreparedStatementSetter() {\r\n public void setValues(\r\n PreparedStatement ps, int i)\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the latest active procedure for a particular steward or registrar
public Procedure getLatestActiveProcedure(String stewardOrRegistrar) throws RepositoryException;
[ "org.hl7.fhir.Procedure getProcedure();", "public ProcedureDeclaration getProcedure(String procedure)\n {\n if(global.procedures.containsKey(procedure))\n return global.procedures.get(procedure);\n else\n throw new IllegalArgumentException(\"No Procedure called: \" + procedu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associate the specified PersistenceEnvironment with this exception. This method should only be called once. Once a PersistenceEnvironment has been associated with this exception, this method will have no effect.
public synchronized PersistenceException initPersistenceEnvironment(PersistenceEnvironment<?> env) { if (m_aEnv == null) { m_aEnv = new PersistenceEnvironment<?>[] {env}; } return this; }
[ "public void testassociate_PersistenceException() throws Exception {\r\n Address address = this.getAddress();\r\n address.setId(1);\r\n address.setCreationDate(new Date());\r\n address.setModificationDate(new Date());\r\n try {\r\n new InformixAddressDAO(\"InformixAddre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that multiple calls to the server in parallel works.
public void testMultipleCallsToServer() throws Throwable { XINSCallRequest request = new XINSCallRequest("_NoOp", null); TargetDescriptor descriptor = new TargetDescriptor(AllTests.url(), 20000); XINSServiceCaller caller = new XINSServiceCaller(descriptor); // Creating threads....
[ "public void testRoundRobinConcurrency() throws Exception {\n int concurrency = 10;\n\n AxisConfiguration axisConfig = new AxisConfiguration();\n ConfigurationContext configContext = new ConfigurationContext(axisConfig);\n SynapseConfiguration synapseConfig = new SynapseConfiguration();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
draws this AProjectile onto the given world scene
public abstract void draw(WorldScene s);
[ "public void draw(WorldScene s) {\n // does not draw anything since there is no projectile\n }", "void draw(WorldScene s);", "public void draw( GameState state, Graphics2D gr, Scene scene );", "public void draw()\r\n\t{\r\n\t\tactor.draw((int)this.xPos, (int) this.yPos);\r\n\t}", "public void draw() {\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Challenge: Part 1, Calculate Interest Using the for statement, call the calculateInterest method with the amount of $10,000 with an interestRate of 2,3,4,5,6,7 and 8 and print the results to the console window. Challenge: Part 2, Calculate Interest How would you modify the for loop to do the same thing as shown but t...
public static void main(String[] args) { // Challenge Part 1 for(int i = 2; i <= 8; i++){ System.out.println("$10,000 at " + i + "% interest = $" + String.format("%.2f",calculateInterest(10000,i))); /* Output: $10,000 at 2% interest = $200.00 ...
[ "public static void main(String[] args) {\r\n\r\n for (int i = 0; i <= 5; i++) {\r\n System.out.println(\"Loop \" + i);\r\n }\r\n\r\n for (double interestRate = 2; interestRate <= 8; interestRate++) {\r\n System.out.println(\"Interest on 10,000 = \" + String.format(\"%.2f\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create and show an editor for preferences, iff the MetaPrefSet and PrefSet are nonnull. If the PrefSet is null, a new empty one will be created for the editor to use.
public Object createPrefsEditor(final boolean createJFrame, final boolean isStandalone) { Object result = null; if (metaPrefSet != null) { if (prefSet == null) prefSet = new PrefSet(); result = FundamentalPlatformSpecifics.get().getOrCreatePrefsEditor(metaPrefSet, prefSet, prefsPURL, createJFram...
[ "public PrefEditorWidgets createPrefsEditor()\n \t{\n \t\treturn this.createPrefsEditor(true, false);\n \t}", "public Object createPrefsEditor()\n \t{\n \t\treturn this.createPrefsEditor(true, false);\n \t}", "public PrefEditorWidgets createPrefsEditor(final boolean createJFrame, final boolean isStandalone)\n \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the dead attribute.
public void setDead(boolean value);
[ "void setDead(boolean dead);", "public void setDead(boolean dead){\n this.dead = dead;\n }", "public void setDead(boolean dead) {\n isDead = dead;\n }", "public void setDead(String name) {\r\n\t\tfam.getMember(name).setDead();\r\n\t}", "private void setNameToDead() {\n this.name = name ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when a Tab is removed from the tab pane.
void tabRemoved(Tab tab, Component component, int index);
[ "public void removeTab() {\n tabPane.getTabs().remove(tabPane.getSelectionModel().getSelectedItem());\n }", "@Override\n\t public void onTabUnselected(Tab tab, FragmentTransaction ft) {\n\t ft.remove(fragment);\n\t }", "@Override\n public void onTabUnselected(TabLayout.Tab tab) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether or not this edge is tagged as removed
public boolean isTaggedAsRemoved() { return levelOfRemoval > 0; }
[ "public boolean isRemoved() {\n return removed;\n }", "boolean removeEdge(E edge);", "public void tagAsRemoved() {\n\t levelOfRemoval ++;\n\t}", "@Override\r\n\tpublic boolean removeEdge(E edge) {\n\t\tN nodeIn = edge.getNodeIn();\r\n\t\tN nodeOut = edge.getNodeOut();\r\n\t\tif (nodeIn != null && nodeO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last interview schedule in the ordered set where vacancyCandidateId = &63;.
@Override public InterviewSchedule findByVacancyCandidate_Last( long vacancyCandidateId, OrderByComparator orderByComparator) throws NoSuchInterviewScheduleException, SystemException { InterviewSchedule interviewSchedule = fetchByVacancyCandidate_Last(vacancyCandidateId, orderByComparator); if (interviewS...
[ "public vn.com.ecopharma.hrm.rc.model.InterviewSchedule fetchByVacancyCandidate_Last(\n\t\tlong vacancyCandidateId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public vn.com.ecopharma.hrm.rc.model.InterviewSchedule fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test greeting action happy path.
@Test public void testGreetingAction() { IvrRequest ivrRequest = createIvrRequest(); ivrRequest.setIvrController(GREETING); ivrRequest.setCallSid("A1"); IvrIdentity ivrIdentity = new IvrIdentity(); ivrIdentity.setPhoneNumber("11"); ivrRequest.setIvrIdentity(ivrIdentity); InternalResultsRe...
[ "public void greet() {\n print(GREET_MESSAGE);\n }", "private static String testSayHello(Greeter greeter)\n {\n return greeter.sayHello();\n }", "public String greeting(final String inName);", "@Override\n\tpublic void greeting() {\n\t\t// Message\n\t\tSystem.out.println(\"Welcome to th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build resourceSpec from managedMem.
public static ResourceSpec fromManagedMem(int managedMem) { ResourceSpec.Builder builder = ResourceSpec.newBuilder(); builder.setManagedMemoryInMB(managedMem); return builder.build(); }
[ "Device_Resource createDevice_Resource();", "public Resource(byte bytes[], String aName) { _bytes = bytes; _name = aName; }", "String drbdResourceConfig(final Host configOnHost)\n throws Exceptions.DrbdConfigException {\n final StringBuilder config = new StringBuilder(50);\n config.append(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CommunityPool queries the community pool coins.
public void communityPool(cosmos.distribution.v1beta1.QueryOuterClass.QueryCommunityPoolRequest request, io.grpc.stub.StreamObserver<cosmos.distribution.v1beta1.QueryOuterClass.QueryCommunityPoolResponse> responseObserver) { asyncUnaryCall( getChannel().newCall(getCommunityPoolMethod(), getCallO...
[ "public cosmos.distribution.v1beta1.QueryOuterClass.QueryCommunityPoolResponse communityPool(cosmos.distribution.v1beta1.QueryOuterClass.QueryCommunityPoolRequest request) {\n return blockingUnaryCall(\n getChannel(), getCommunityPoolMethod(), getCallOptions(), request);\n }", "public void commun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries and infer the OCL type of the given Object.
private String inferOCLType(Object obj) { String oclType = "OCLAny"; //$NON-NLS-1$ EcoreEnvironment env = (EcoreEnvironment)new EcoreEnvironmentFactory().createEnvironment(); if (obj instanceof Collection<?>) { EClassifier elementType = inferCollectionContentOCLType(env, (Collection<?>)obj); Colle...
[ "private EClassifier getOCLType(EcoreEnvironment env, Object obj) {\r\n \t\tOCLStandardLibrary<EClassifier> library = env.getOCLStandardLibrary();\r\n \t\tEClassifier oclType = library.getOclAny();\r\n \t\tif (obj instanceof Number) {\r\n \t\t\tif (obj instanceof BigDecimal || obj instanceof Double || obj instanceo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will be called to edit an album. At the end, the album is set to null so that it does not stay in session scoped and the filtered albums are regenerated.
public String edit() { try { albumController.edit(album); } catch(Exception e) { System.out.println(e.getMessage()); } this.album = null; this.filteredAlbums = albumController.findAlbumEntities(); return "manindex"; ...
[ "public void setAlbum(Album album)\n {\n this.album = album;\n }", "public void setAlbum(String al){\r\n rAlbum.set(al);\r\n }", "public Album findAlbumById(){\n //album = albumController.findAlbum(id); // questionable, do I set just the album variable and return void?\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleXBlockExpression" $ANTLR start "entryRuleXExpressionInsideBlock" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:1327:1: entryRuleXExpressionInsideBlock : ruleXExpressionInsideBlock EOF ;
public final void entryRuleXExpressionInsideBlock() throws RecognitionException { try { // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:1328:1: ( ruleXExpressionInsideBlock EOF ) // ../org.xtext.mongobeans.ui/src-gen/org/xte...
[ "public final void entryRuleXExpressionInsideBlock() throws RecognitionException {\n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1412:1: ( ruleXExpressionInsideBlock EOF )\n // ../org.xtext.guicemodules.ui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column regsat_regist.regist_moneycn
public BigDecimal getRegistMoneycn() { return registMoneycn; }
[ "public void setRegistMoneycn(BigDecimal registMoneycn) {\n this.registMoneycn = registMoneycn;\n }", "public String getJP_BankDataCustomerCode2();", "public String getJP_BankDataCustomerCode1();", "public BigDecimal getRegistMoneyus() {\n return registMoneyus;\n }", "public static Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRulePackageName" $ANTLR start "rulePackageName" InternalGo.g:438:1: rulePackageName : ( ruleIDENTIFIER ) ;
public final void rulePackageName() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalGo.g:442:2: ( ( ruleIDENTIFIER ) ) // InternalGo.g:443:2: ( ruleIDENTIFIER ) { // InternalGo.g:443:2: ( ruleIDENTIFIER ...
[ "public final void entryRulePackageName() throws RecognitionException {\r\n try {\r\n // InternalGo.g:430:1: ( rulePackageName EOF )\r\n // InternalGo.g:431:1: rulePackageName EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getPa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }