query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Get the list of cards.
public List<Card> getCards();
[ "public List<Card> getCards() {\n return cards;\n }", "public List<Card> getCards(){\r\n\t\treturn cards;\r\n\t}", "public List<String> getCards() {\r\n\t\treturn cards;\r\n\t}", "List<Card> getCommunalCards();", "public ArrayList<Card> getCards(){\r\n return model.getCards();\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end GraphicalInterface constructor Create the GUI and show it. For thread safety, this method should be invoked from the event dispatch thread.
private static void createAndShowGUI() { //Create and set up the window. frame = new JFrame("Caching Visualisation"); frame.setExtendedState(JFrame.MAXIMIZED_BOTH); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); GraphicalInterface fcd = new GraphicalInterface(); frame.setJMenuBar(menubar); f...
[ "public GUI()\n {\n createGUI(); \n }", "public void initGui() {\r\n\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tGuiWindow window = new GuiWindow(Controller.this);\r\n\t\t\t\t\tlinkedGuiWindow = window;\r\n\t\t\t\t\twindow.setVisible(true);\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for class NetconfigGUI
public NetconfigGUI() { this(40000,60); }
[ "public DBConfigGui() {\r\n\t}", "public NetconfigGUI(int maxPacketSize) {\n this(maxPacketSize,60);\n }", "public NetworkPanel() {\n initComponents();\n }", "public BindingConfigurationPanel() {\n initComponents();\n initGUI();\n }", "private Networks (String netname){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new dir in the explorer temp provider. The dir is deleted on exit. The returned file store has a valid mount id which is not shown in the explorer view.
public static LocalExplorerFileStore createExplorerTempDir(final String prefix) throws CoreException { Map<String, AbstractContentProvider> allMounts = getMountedContentInclTempSpace(); AbstractContentProvider tempProvider = null; for (Entry<String, AbstractContentProvider> e : allMounts.entrySe...
[ "public File getStoreDir();", "String createWorkspace(String identity) {\n String dir = System.getProperty(\"java.io.tmpdir\")+\"/metamatrix/\"+identity; //$NON-NLS-1$ //$NON-NLS-2$\n System.setProperty(MM_IO_TMPDIR, dir); \n \n File f = new File(dir);\n \n // If di...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle the handshake for a typical (not a service) subscriber in response to a channel read.
private void handleSubscriberHandshake(final ChannelHandlerContext ctx, final ConnectionHeader incomingConnectionHeader) throws InterruptedException, Exception { if( DEBUG ) { log.info("Subscriber handshake ChannelHandlerContext:"+ctx+" for:"+this+" header:"+incomingConnectionHeader); } assert(incomingCon...
[ "@Override\n public Object channelRead(ChannelHandlerContext ctx, Object e) throws Exception {\n\tif( DEBUG ) {\n\t\t\t log.info(\"TcpServerHandshakeHandler channelRead ChannelHandlerContext:\"+ctx+\" for:\"+this+\" payload:\"+e);\n\t}\n\t// check for null, possible fault on bad connect\n ConnectionHeader inco...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ MIPS me !!!
public void MIPSme() { sir_MIPS_a_lot.getInstance().fileWriter.print("\t# --- function epilog ---\n"); if (funcLabel.equals("main_real")) { // sir_MIPS_a_lot.getInstance().fileWriter.format("\taddi $fp,$sp,%d\n",totalLocalVarSize + 9 * 4); // 8 for registers and 1 for saved ra } ...
[ "public void MIPSme()\n\t{\n\n\t\t// Allocate fresh Temps\n\t\tTEMP charTemp = TEMP_FACTORY.getInstance().getFreshTEMP();\n\t\tTEMP src_offset1 = TEMP_FACTORY.getInstance().getFreshTEMP();\n\t\tTEMP src_offset2 = TEMP_FACTORY.getInstance().getFreshTEMP();\n\t\tTEMP src_offset3 = TEMP_FACTORY.getInstance().getFreshT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "addResponse" element
public by.makedon.axis.AddResponseDocument.AddResponse getAddResponse() { synchronized (monitor()) { check_orphaned(); by.makedon.axis.AddResponseDocument.AddResponse target = null; target = (by.makedon.axis.AddResponseDocument.AddResponse)get_store().find_element...
[ "public by.makedon.axis.AddResponseDocument.AddResponse addNewAddResponse()\n {\n synchronized (monitor())\n {\n check_orphaned();\n by.makedon.axis.AddResponseDocument.AddResponse target = null;\n target = (by.makedon.axis.AddResponseDocument.AddResponse)get_store(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers the specified service object with the specified name.
ServiceReference registerService(String name, Object service);
[ "public void registerService(String serviceName, Object service);", "ServiceReference registerService(String name, Object service, Hashtable properties, int groupId);", "ServiceReference registerService(String name, Object service, Hashtable properties);", "void register(String name, Object bean);", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load the DNA structure into a Twodimensional vectors.
private char[][] loadDNAStructure(DNASequence dnaSequence) { log.debug("Load the DNA structure into a Two-dimensional vectors."); int vectorLength = dnaSequence.getDna().size(); char[][] dna = new char[vectorLength][vectorLength]; for (int i = 0; i < vectorLength; i++) { String dnaRow = dnaSequence.getDna()...
[ "public ArrayList<ArrayList<Double>> readVectors (String filename, Boolean binary) throws IOException { \n\t\tRandomAccessFile vector_file = new RandomAccessFile(filename, \"r\");\n\t\tvector_file.seek(vector_file.length());\n\t\tvector_size = new Integer((int) (vector_file.getFilePointer()/16/vocab_size -1));\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /favouritesongs : get all the favouriteSongs.
@GetMapping("/favourite-songs") @Timed public List<FavouriteSong> getAllFavouriteSongs() { log.debug("REST request to get all FavouriteSongs"); return favouriteSongRepository.findAll(); }
[ "public static List<FavouriteSongModel> getFavouriteSongsFromRealmDb(Realm realm) {\n RealmResults<FavouriteSongModel> results = realm.where(FavouriteSongModel.class).findAll();\n return new ArrayList<>(results);\n }", "List<Favorite> getFavorites(String userName);", "@GetMapping(\"/favourite-s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the cuentaCredito property.
public void setCuentaCredito(long value) { this.cuentaCredito = value; }
[ "public void setComprobanteCredito(int value) {\n this.comprobanteCredito = value;\n }", "public void setNota_credito(int nota_credito) {\n\t\tthis.nota_credito = nota_credito;\n\t}", "void setSolicitarCredito(com.soa.SolicitarCreditoDocument.SolicitarCredito solicitarCredito);", "public long getCue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column inv_transfer_dtls.tnsfd_stk_id
public void setTnsfdStkId(Integer tnsfdStkId) { this.tnsfdStkId = tnsfdStkId; }
[ "public void setStkcd(String stkcd) {\n this.stkcd = stkcd == null ? null : stkcd.trim();\n }", "public Integer getTnsfdStkId() {\r\n return tnsfdStkId;\r\n }", "public void setTnsfdQty(Double tnsfdQty) {\r\n this.tnsfdQty = tnsfdQty;\r\n }", "public void setTnsfdId(Integer tnsfd...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether or not the pathname exists. If the pathname is a URL, then existence is determined based on whether or not we can successfully read content from the URL.
public boolean exists() { if (isURL) { try { url.getContent(); return true; } catch (final IOException e) { log().trace("Failed to retrieve content from URL", e); return false; } } if (file.exists()) return true; if (locationService.getMappedFile(file.getPath()) != null) return true;...
[ "public boolean exists() {\n try {\n HttpURLConnection.setFollowRedirects(false);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(\"HEAD\");\n return con.getResponseCode() == HttpURLConnection.HTTP_OK;\n } catch (Ex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a userobject into a userDtoobject.
private UserDto convertToDto(User u){ return new UserDto(u.getId(), u.getUsername()); }
[ "public static UserDto createUserDtoFromUser(User user) {\n\t\tlogger.info(\"Creating UserDto from User\");\n\t\tlogger.debug(\"User: \" + user);\n\n\t\t// create the UserDto\n\t\tUserDto usr = new UserDto(user.getId(), user.getUsername(), user.getfName(), user.getlName(), user.getPriv(),\n\t\t\t\tuser.getActivatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtain an internal derby model.
public final InternalDerbyModel newDerbyModel() { return (InternalDerbyModel) newProxy(InternalDerbyModel.class, DerbyModelImpl.class); }
[ "DataModelOracle getDataModelOracle( Path project );", "HdbdtiModel createHdbdtiModel();", "public DiagrammModel getDiagrammModel();", "public TableModel getBaseModel();", "DEECoModel createDEECoModel();", "public abstract SchemaModel getSchemaModel();", "protected Model getJavaModelByQualifiedName(Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the column pair's "base" column.
Column baseColumn();
[ "public abstract int getRightmostColumn();", "Column getCol();", "public abstract int getCol(int x);", "public Column getRealColumn() {\n return realColumn;\n }", "java.math.BigInteger getCollocation();", "Iterator<Column> baseColumns();", "@Override\r\n protected int getLeadingColumn() {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse a String in JSON format into a Restaurant Object.
public Restaurant parseRestaurantfromJson(String restString) { JSONParser parser=new JSONParser(); JSONObject objs = null; Restaurant restaurant = null; try { objs = (JSONObject)parser.parse(restString); } catch (ParseException e) { e.printStackTrace(); ...
[ "public static List<Restaurant> parseRestaurants(String rawJSON) {\n\t\tif (rawJSON == null || rawJSON.isBlank()) {\n\t\t\trawJSON = \"{\\\"businesses\\\": []}\";\n\t\t}\n\t\tJSONObject json = new JSONObject(rawJSON);\n\t\tJSONArray businesses = json.getJSONArray(\"businesses\");\n\t\tList<Restaurant> restaurants =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
showConnexion() permet d'ouvrir la page de connexion, 1ere page de l'application.
public void showConnexion(){ try { // nouvelle scene pour pop up FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("view/Connexion.fxml")); root = (AnchorPane) loader.load(); // Creer nouvelle scene et l'ouvre. ...
[ "public String deconnexion() {\r\n\r\n\t\t// Determine vers quelle page ou Formulaire l'on doit se diriger\r\n\t\tString v$navigation = null;\r\n\r\n\t\t/***\r\n\t\t * TODO Implementation Basique a finaliser\r\n\t\t */\r\n\r\n\t\t// Raz des paramètres de connexion de l'utilisateur\r\n\t\t// defaultVue.setAuthentifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO5 uncomment the below to configure DigestAuthenticationEntryPoint
private DigestAuthenticationEntryPoint getDigestEntryPoint() { DigestAuthenticationEntryPoint digestEntryPoint = new DigestAuthenticationEntryPoint(); digestEntryPoint.setRealmName("admin-digest-realm"); digestEntryPoint.setKey("somedigestkey"); return digestEntryPoint; }
[ "private DigestAuthenticationFilter getDigestAuthFilter() throws Exception {\n\t\tDigestAuthenticationFilter digestFilter = new DigestAuthenticationFilter();\n\t\tdigestFilter.setUserDetailsService(userDetailsServiceBean());\n\t\tdigestFilter.setAuthenticationEntryPoint(getDigestEntryPoint());\n\t\treturn digestFil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets given button to be an activity launcher.
public void setButtonActivityLauncher(final Button button, final Class<? extends Activity> activityToLaunch) { setButtonActivityLauncher(this, button, activityToLaunch); }
[ "public static void setButtonActivityLauncher(final Activity activity, final Button button, final Class<? extends Activity> activityToLaunch) {\n\t\tbutton.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinal Intent intent = new Intent(activity, activityToLaunch);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all values of property UnsynchronizedTextContentDescriptor as a ReactorResult of RDF2Go nodes
public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllUnsynchronizedTextContentDescriptor_asNode_() { return Base.getAll_as(this.model, this.getResource(), UNSYNCHRONIZEDTEXTCONTENTDESCRIPTOR, org.ontoware.rdf2go.model.node.Node.class); }
[ "public ReactorResult<java.lang.String> getAllUnsynchronizedTextContentDescriptor_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), UNSYNCHRONIZEDTEXTCONTENTDESCRIPTOR, java.lang.String.class);\r\n\t}", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllUnsynchronizedTextContent_as...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show story main image from the resource.
void showStoryImage(int resourceId);
[ "void showStoryImage(@NonNull String imageUrl);", "private void showImageDetail() {\n }", "public void image()\n {\n ImageConfig imageConfig;\n String imageJSON = getTextArea().getCommandManager().getStringValue(Command.INSERT_IMAGE);\n if (imageJSON != null) {\n imageConfi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This tests the case where a different id is linked after pulling the user but before the target id is linked. The link should therefore succeed.
@Test public void linkReflectionAddIDPass() throws Exception { final Method m = MongoStorage.class.getDeclaredMethod( "addIdentity", AuthUser.class, RemoteIdentity.class); m.setAccessible(true); storage.createUser(NewUser.getBuilder( new UserName("foo1"), UID, new DisplayName("bar"), NOW, REMOTE4).build(...
[ "@Test\n\tpublic void testEstablishLink() {\n\t\tresetTestVars();\n\t\tuser1.setID(\"1\");\n\t\tuser2.setID(\"1\");\n\t\tuser3.setID(\"2\");\n\t\tsn.addUser(user1);\n\t\tsn.addUser(user2);\n\t\tsn.addUser(user3);\n\t\t\n\t\ttry {\n\t\t\tsn.establishLink(null, null, null, status);\n\t\t} catch (NullPointerException ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of uploaded form data items in study.
public int getFormCount(int studyIdx) { return ((Vector) uploadedFormsData.elementAt(studyIdx)).size(); }
[ "public int getStudyCount() {\r\n\t\treturn uploadedFormsData.size();\r\n\t}", "@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)\n\tpublic int getFormItemsCount()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public int getPartCount()\n {\n return _partList.siz...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set MapiContactTelephonePropertySetDto.callbackTelephoneNumber and return builder.
public MapiContactTelephonePropertySetDtoBuilder callbackTelephoneNumber(String callbackTelephoneNumber) { this.model.callbackTelephoneNumber(callbackTelephoneNumber); return this; }
[ "public MapiContactTelephonePropertySetDtoBuilder businessTelephoneNumber(String businessTelephoneNumber) {\n this.model.businessTelephoneNumber(businessTelephoneNumber);\n return this;\n }", "public Builder setCallbackContactBytes(\n com.google.protobuf.ByteString value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to filter a Transaction given a creditCardNumber
public List<Transaction> findByCreditCardCreditCardNumber(String creditCardNumber);
[ "public void removeTransaction() {\r\n\t\tIterator<CreditCard> it = cards.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tCreditCard obj = it.next();\r\n\t\t\tIterator<Transaction> iter = transactions.iterator();\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tTransaction transaction = iter.next();\r\n\t\t\t\tif (o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes the text of the friends button to Add Friends and the appropriate click handler
private void buttonAddFriends() { friendsButton.setText("Add Friends"); friendsButton.setOnClickListener(view -> launchProfilesActivity()); profileOptions.setVisibility(View.VISIBLE); friendsView.setOnClickListener(view -> onFriendsClicked()); }
[ "public static void addFriend(){\n friendsList.addElement(friendAdd);\n JFriendList.setModel(friendsList);\n ChatHistoryHandler.createHistory(friendAdd);\n reset();\n JOptionPane.showMessageDialog(null, friendAdd + \" has been added.\");\n }", "private void friendsListBtnList...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Posts to the server a request to follow a given user and, if successful, returns a message indicating so.
public FollowUserResponse follow(FollowUserRequest request) throws IOException { ClientCommunicator followCommunicator = new ClientCommunicator(new FollowUserStrategy()); return (FollowUserResponse) followCommunicator.doWebRequest(request, request.getAuthToken()); }
[ "Boolean sendFollowRequest(User user);", "Result<Void> follow( String userId1, String userId2, boolean isFollowing);", "public void followUser(User user) \r\n\t{\n\t\tUser follow = user;\r\n\t\tthis.following.add(follow);//follows the user used as a parameter\r\n\t\tnotifyObservers(follow);//notifies observers ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the maturity date.
public void setMaturityDate(ZonedDateTime maturityDate) { JodaBeanUtils.notNull(maturityDate, "maturityDate"); this._maturityDate = maturityDate; }
[ "public void setMaturityDate(LocalDate maturityDate) {\n JodaBeanUtils.notNull(maturityDate, \"maturityDate\");\n this._maturityDate = maturityDate;\n }", "public void setMATURITY_DATE(Date MATURITY_DATE)\r\n {\r\n\tthis.MATURITY_DATE = MATURITY_DATE;\r\n }", "public void setMATURITY_DATE(Date MATU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether Entity is far enough away from the player to despawn.
private void checkDespawn() { Player player = GameInstance.INSTANCE.getEntityManager().getOrCreatePlayer(); if (this.distanceFrom(player) > 3000) { setDead(true); Gdx.app.debug("NPCEntity", "Too far from player, despawning!"); if(this instanceof NPCBoat) { ...
[ "boolean closeEnough() {\n\t\treturn (Math.sqrt((x - Player.x) * (x - Player.x) + (y - Player.y)\n\t\t\t\t* (y - Player.y)) < distanceFromBed);\n\t}", "private boolean distanceExceeded()\r\n\t{\n\t\tif(taskCompletionDistance<=0)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t{\r\n\t\t\tVector3f currentPosition = sim.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Menu__Group__2" $ANTLR start "rule__Menu__Group__2__Impl" InternalNav.g:455:1: rule__Menu__Group__2__Impl : ( ( rule__Menu__NameAssignment_2 ) ) ;
public final void rule__Menu__Group__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalNav.g:459:1: ( ( ( rule__Menu__NameAssignment_2 ) ) ) // InternalNav.g:460:1: ( ( rule__Menu__NameAssignment_2 ) ) { ...
[ "public final void rule__S_Definition__Group__2__Impl() throws RecognitionException {\n int rule__S_Definition__Group__2__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 415) ) { r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleECLInteger" $ANTLR start "entryRuleECLUnsigned" ../org.xtext.hipie/srcgen/org/xtext/hipie/parser/antlr/internal/InternalHIPIE.g:2475:1: entryRuleECLUnsigned returns [EObject current=null] : iv_ruleECLUnsigned= ruleECLUnsigned EOF ;
public final EObject entryRuleECLUnsigned() throws RecognitionException { EObject current = null; EObject iv_ruleECLUnsigned = null; try { // ../org.xtext.hipie/src-gen/org/xtext/hipie/parser/antlr/internal/InternalHIPIE.g:2476:2: (iv_ruleECLUnsigned= ruleECLUnsigned EOF ) ...
[ "public final EObject entryRuleECLInteger() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleECLInteger = null;\n\n\n try {\n // ../org.xtext.hipie/src-gen/org/xtext/hipie/parser/antlr/internal/InternalHIPIE.g:2429:2: (iv_ruleECLInteger= ruleECLInteger EOF )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If user selects Enterprise contact, we clear the photo and notify the photo it is not supported
private void clearPhoto() { if (mImageUri != null && mImageUri.toString().trim().length() > 0) { mContactImage.setText(""); mContactImage.setBackground(Objects.requireNonNull(getActivity()).getDrawable(R.drawable.ic_avatar_generic105)); Utils.sendSnackBarData(getActivity(), g...
[ "public void checkPhoto(){\n if(getView().getphotoChoosen()){ //if a photo attachment is choosen the icon is binded to the photo label in the view\n getView().getPhotoAddBtn().setVisible(false);\n setStaffPhoto( getView().getphotoLabel(),getView().getPhotoAttachment());\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check that the secondary validation on entries that are not blank. It checks that the entries are in the correct format.
public static void secondaryValidation(String[] entry, int rowNum) { String course = entry[0].trim(); String school = entry[1].trim(); String title = entry[2].trim(); String description = entry[3].trim(); String examDate = entry[4].trim(); String examStart = entry...
[ "public Boolean validationForBlankFields(){\r\n\t\tif(addressLine1.getText().equals(\"\"))\r\n\t\t\treturn false;\r\n\t\telse if(city.getText().equals(\"\"))\r\n\t\t\treturn false;\r\n\t\telse if(state.getText().equals(\"\"))\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "private void validate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End removeRider Increment Bus's curStop and update direction where appropriate
public void update() { if (direction.equals("e")) { curStop++; if (curStop > 29) { curStop = 29; direction = "w"; } } else if (direction.equals("w")) { curStop--; if (curStop < 0) { curSto...
[ "public void completeStop(){\n motorFrontLeft.setPower(0);\n motorFrontRight.setPower(0);\n motorBackLeft.setPower(0);\n motorBackRight.setPower(0);\n }", "public void backward() {\n\t\tif (! this.goingBackward()) {\n\n\t\t\tLogWriter.INSTANCE.writeToLog(\"Zeppelin achteruit laten g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to save ticket in DB.
public boolean saveTicket(Ticket ticket) throws SQLException, ClassNotFoundException { try (Connection con = dataBaseConfig.getConnection(); PreparedStatement ps = con.prepareStatement(DbConstants.SAVE_TICKET)) { ps.setInt(1, ticket.getParkingSpot().getId()); ps.setString(2, ticket.getVehicleR...
[ "public void saveTicket(Ticket ticket) throws DavException;", "@Transactional\n @Override\n public void addTicket(Ticket ticket) {\n\n try {\n Session session = this.sessionFactory.getCurrentSession();\n\n session.persist(ticket);\n logr.info((\"BUY TICKET with DEPART...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test expected behaviour of checking for valid file directory
@Test public void validFileDirectoryTest() { // Test valid file directory File f = new File(workingDir); assertTrue(Helper.isValidDirectory(f)); // Test valid file directory 2 workDir = new File(workingDir); expected = workDir.getAbsolutePath(); actual = Helper.isValidDirectory(workDir, "misc"); asser...
[ "@Test\n\tpublic void invalidFileDirectoryTest() {\n\t\t// Test error handling: invalid file directory\n\t\tworkingDir = \"./misc/InvalidHelper\";\n\t\tFile f = new File(workingDir);\n\t\tassertFalse(Helper.isValidDirectory(f));\n\n\t\t// Test error handling: invalid file directory\n\t\tdirName = \"InvalidTest\";\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints a 4 move journey
public String printJourney(int[] initialPosition, int[] firstJump, int[] secondJump, int[] thirdJump, int[] fourthJump) { return " " + positionToNotation(initialPosition) + " --> " + positionToNotation(firstJump) + " --> " + positionToNotation(secondJump) + " --> " + positionToNotation(thirdJump) + " --> " + p...
[ "public void printMoveList(){\n\t\tString body = \"\";\n\t\tfor (int i = 0; i < moveList.size(); i++) {\n\t\t\tif (i % 2 == 0)\n\t\t\t\tbody += \"\\n\" + Integer.toString(i / 2 + 1) + \" \";\n\n\t\t\tbody += moveList.get(i).algebraicNotationPrint() + \" \";\n\t\t}\n\t\tSystem.out.println(body);\n\t}", "public voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We can be called (started) in two different ways: 1. First one is the "normal method" way: by an activity when user starts the app from class "ServicePingerAlarmReceiver". In this situation we will continue to run as long as any foreground activity "pings" us to remain alive. 2. Second one is by a GCM notification from...
@Override public int onStartCommand(Intent intent, int flags, int startId) { serviceStartNormalMethod = intent.getBooleanExtra(BC_SERVICE_START_METHOD, false); // This is actually where we receive "pings" from activities to start us // and keep us running pingStamp = System.current...
[ "private void handleStart(Intent intent) {\n if (intent != null && intent.hasExtra(COMMAND_EXTRA)) {\n Bundle extras = intent.getExtras();\n int command = extras.getInt(COMMAND_EXTRA, COMMAND_UNKNOWN);\n try {\n long alarmId = currentAlarmId(); // get the current alarm\n switch (comm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a value of property Comments given as an instance of java.lang.String
public void removeComments(java.lang.String value) { Base.remove(this.model, this.getResource(), COMMENTS, value); }
[ "public void setComments(java.lang.String value);", "public static void removeComments(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.remove(model, instanceResource, COMMENTS, value);\r\n\t}", "public String removeStringProperty(String propertyName);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the level of the element at pos.
int getLevelAt(int pos) { return levels[pos]; }
[ "public int getLevelPos() {\n\t\treturn levelPos;\n\t}", "long getLevel();", "default int getLevel() {\n\n\t\tfinal RandomVariable element = getElement(0);\n\t\tif(element instanceof RandomVariableArray) {\n\t\t\treturn ((RandomVariableArray)element).getLevel() + 1;\n\t\t}\n\t\telse {\n\t\t\treturn 1;\n\t\t}\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a source which reads from standard input without ever closing it.
public static Source stdin() { return stream(System.in); }
[ "protected final ByteSource getInput(String name) {\n try {\n if (name.equals(\"-\")) {\n return new StandardInputSource();\n } else {\n File file = new File(name);\n if (!file.exists()) {\n throw new FileNotFoundException(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CollectionType with same name are equal.
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CollectionType)) return false; return o.hashCode() == this.hashCode(); }
[ "public static boolean sameCollection (LinkedForneymonegerie y1, LinkedForneymonegerie y2) {\n \tint count = 0;\n \tif (y1.size != y2.size || y1.typeSize != y2.typeSize) { return false; }\n \t\tfor (ForneymonType n = y1.head; n != null; n = n.next) {\n \t\t\tfor (ForneymonType m = y2.head; m != null; m ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Greater' attribute. If the meaning of the 'Greater' attribute isn't clear, there really should be more of a description here...
String getGreater();
[ "public QualitativeValue getGreater() throws ClassCastException;", "public InequalityTerm getGreaterTerm() {\n\t\treturn _greaterTerm;\n\t}", "public QualitativeValue getGreaterOrEqual() throws ClassCastException;", "public final void mGREATERTHAN() throws RecognitionException {\n try {\n in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
nodeToken > "(" nodeToken1 > "short" nodeToken2 > ")" expression > Expression()
public void visit(CoercionToShortExpression n, String argu) { n.nodeToken.accept(this, argu); n.nodeToken1.accept(this, argu); n.nodeToken2.accept(this, argu); n.expression.accept(this, argu); }
[ "public Snippet visit(CoercionToShortExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to update a users playing status to not playing a game.
public void updateToNotPlayingGame(String username){ try (PreparedStatement updateStatement = connection.prepareStatement("UPDATE userstatus SET playing = 0 WHERE username = ? ")){ updateStatement.setString(1, username); updateStatement.executeUpdate(); } catch (SQLException e) {...
[ "public void updateGameStatus()\n\t{\n\t\tif (isWon())\n\t\t{\n\t\t\tstatus = GameStatus.HASWINNER;\n\t\t}\n\t\telse if (isCat())\n\t\t{\n\t\t\tstatus = GameStatus.CATGAME;\n\t\t}\n\t}", "public void setGameRunning()\n {\n gameStatus = GameStatus.GAME_RUNNING;\n }", "public void updateToPlayingGame...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/This is now ONLY called by AI when using a joker. Jokers will only be added to valid melds.
public void addJoker(Tile joker) { joker.setColour('J'); joker.setValue(0); /* -> inspect the meld -> if the meld is a set and the set is less than size 4: ->add the joker and set the joker's # to the # of the set -> if the meld is a run, look for holes in the c...
[ "private boolean addJoker(Tile t, int i) {\n\t\tif (meldTiles.size() == 1) {\n\t\t\tif (meldTiles.get(0).getID() > 9) {\n\t\t\t\tSystem.out.print(\"Error! Cannot put two jokers beside eachother!\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tmeldTiles.add(0, t);\n\t\t\t\t}\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creats a TypingNotificationEvent with the specified parameters.
public TypingNotificationEvent(Contact sourceContact, int state) { super(sourceContact); this.typingState = state; }
[ "public void createNotification(Notification notification);", "PSNotificationTemplate createNotificationTemplate();", "Events<T> create();", "public Event createNotify(Address resource, String event);", "Notification createNotification();", "Long createNotificationTemplate(NotificationTemplate notificatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the correct dbName if it has not been overridden crit.getDbName will return the same object if not set to another value so == check is okay and faster
private static void setDbName(Criteria crit) { if (crit.getDbName() == Torque.getDefaultDB()) { crit.setDbName(DATABASE_NAME); } }
[ "public void setDBName(String name) {\n dbName = name;\n }", "public boolean isSetDbName() {\n return this.dbName != null;\n }", "public void setDb(String db)\n {\n dbName = db;\n }", "public void setDistDbName(String dbName) {\n\t\tthis.setMsgItem(\"dist_db_name\", dbName);\n\t\tdistDbNa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__BarChart__Group__6__Impl" $ANTLR start "rule__BarChart__Group__7" InternalMyDsl.g:6080:1: rule__BarChart__Group__7 : rule__BarChart__Group__7__Impl rule__BarChart__Group__8 ;
public final void rule__BarChart__Group__7() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:6084:1: ( rule__BarChart__Group__7__Impl rule__BarChart__Group__8 ) // InternalMyDsl.g:6085:2: rule__BarChart__Group__7__Impl rule__Ba...
[ "public final void rule__BarChart__Group__7__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:6096:1: ( ( ( rule__BarChart__Group_7__0 )? ) )\n // InternalMyDsl.g:6097:1: ( ( rule__BarChart__Group_7__0 )? )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows a save dialog and writes the computation report to the specified file.
@Override public void actionPerformed (ActionEvent e) { // Create the File Save dialog. FileDialog fd = new FileDialog( AppContext.cartogramWizard, "Save Computation Report As...", FileDialog.SAVE); fd.setModal(true); fd.setBounds(20, 30, 150, 200); fd.setVisible(true); // Get the selecte...
[ "private void savePressed(){\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\tFileNameExtensionFilter extentions = new FileNameExtensionFilter(\"SuperCalcSave\", \"scalcsave\");\n\t\tfileChooser.setFileFilter(extentions);\n\t\tint retunedVal = fileChooser.showSaveDialog...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ def test_basic_condition assert_equal false, Condition.new('1', '==', '2').evaluate assert_equal true, Condition.new('1', '==', '1').evaluate end
@Test public void basicConditionTest() throws Exception { assertThat(getNode("1 == 2", "expr").render(null), is((Object)false)); assertThat(getNode("1 == 1", "expr").render(null), is((Object)true)); }
[ "@Test\n public void testCondition() {\n System.out.println(\"condition\");\n EsoLangParser instance = null;\n EsoLangParser.ConditionContext expResult = null;\n EsoLangParser.ConditionContext result = instance.condition();\n assertEquals(expResult, result);\n // TODO re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property codigo.
public void setCodigo(java.lang.String codigo) { this.codigo = codigo; }
[ "public void setCodigo(String codigo) {\r\n\r\n\t\tthis.codigo = codigo;\r\n\t}", "public void setCodice(String codice) {\n this.codice = codice;\n }", "public void setCodigo(java.lang.Integer codigo) {\n this.codigo = codigo;\n }", "public abstract void setCod_tecnico(java.lang.String new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
smbPut("192.168.0.29", "secserver", "123", "/home/besthyhy/x/hello.txt","share", null); smbPut("192.168.0.29", "secserver", "123", "C:/Users/besthyhy/works/jboss/xnjccodestyleeclipseformatter.xml", "share", null);
public static boolean smbPut(String host, String username, String passwd, String localFilePath, String shareDir, String newFileName) { OutputStream out = null; NtlmPasswordAuthentication auth = null; auth = new NtlmPasswordAuthentication(host, username, passwd); try { ...
[ "void putString(String absolutePath, String content);", "public static void copyFileFromLinuxToWindows() throws JSchException, SftpException {\n\t\tString copyTo = \"D:\\\\\";\n\t\tString copyFrom = \"/home/vagrant/sample.txt\";\n\n\t\tSystem.out.println(\"Sending commands...\");\n\t\tsession = getSession();\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up the navigation header.
private static void setUpNavigationHeader() { View navigationHeader = navigationView.getHeaderView(0); TextView userName = navigationHeader.findViewById(R.id.lblUserName); TextView userEmail = navigationHeader.findViewById(R.id.lblUserEmail); CircularImageView circularImageView = navigat...
[ "private void setupNavigationView() {\n if (navigationView != null) {\n // inflating headerview\n View headerView = navigationView.inflateHeaderView(R.layout.layout_header_navigationview);\n\n TextView txtUser = (TextView) headerView.findViewById(R.id.txt_username);\n\n txtUser.setText(\"Prat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Container's getter for SeeAlsoUniformTitleVo1.
public ViewObjectImpl getSeeAlsoUniformTitleVo1() { return (ViewObjectImpl)findViewObject("SeeAlsoUniformTitleVo1"); }
[ "public ViewObjectImpl getLatinSeeAlsoUniformTitleVo() {\n return (ViewObjectImpl)findViewObject(\"LatinSeeAlsoUniformTitleVo\");\n }", "public ViewObjectImpl getSeeUniformTitle1() {\n return (ViewObjectImpl)findViewObject(\"SeeUniformTitle1\");\n }", "public ViewObjectImpl getMainSeeAlsoUni...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getHint method, of class HurkleTableModel.
public void testGetHint() { System.out.println("getHint"); model.newGameBoard(); model.cheatLayout(); model.makeMove(1, 0, false, false); assertEquals(Direction.EAST, model.getHint()); }
[ "protected abstract void showHint();", "public void giveHint() {\r\n\t\t/*\r\n\t\t * Get the number of filled cells and check if there are any empty cells\r\n\t\t * left to give hints in.\r\n\t\t */\r\n\t\tint clues = Sudoku.getNumberOfClues(recentGrid);\r\n\t\tif (clues == this.SIZE * this.SIZE) {\r\n\t\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test creating an Action rule with valid JSON.
@Test public void createActionRuleGoodJsonProvided() throws Exception { ActionRule actionRule = new ActionRule( ACTION_RULE_ID_3, 3, actionPlans.get(0).getActionPlanPK(), actionTypes.get(0).getActionTypePK(), "BSREM+0", "TEST descript...
[ "@Test\n public void createActionRuleBadJsonProvided() throws Exception {\n\n final ResultActions resultActions = mockMvc.perform(postJson(\"/actionrules\", \"{}\"));\n\n resultActions\n .andExpect(status().isBadRequest())\n .andExpect(handler().handlerType(ActionRuleEndpoint.class))\n ....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SListNode() (with two parameters) constructs a list node referencing the item "obj", whose next list node is to be "next".
SListNode(Object obj, SListNode next) { this.item = obj; this.next = next; }
[ "SListNode(Object obj) {\n\t\tthis(obj, null);\n\t}", "public ObjectListNode (Object o) {\n info = o;\n next = null;\n }", "ListNode(Student o, ListNode nextNode)\n {\n data = o;\n next = nextNode;\n }", "public ObjectListNode (Object o, ObjectListNode p) {\n info = o;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column pms_product_sale_attr_value.sale_attr_value_name
public void setSaleAttrValueName(String saleAttrValueName) { this.saleAttrValueName = saleAttrValueName == null ? null : saleAttrValueName.trim(); }
[ "public String getSaleAttrValueName() {\n return saleAttrValueName;\n }", "public void setProductAttrValue(String value) {\n setAttributeInternal(PRODUCTATTRVALUE, value);\n }", "public void setSaleAttrId(Long saleAttrId) {\n this.saleAttrId = saleAttrId;\n }", "public void setJP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function controls the deallocation of units from a given thread. This function is called by a client. If the thread has no claim, is trying to free negative units, or currently has no units allocated, the entire program will exit, as this would be an issue. Otherwise, it will remove the number of allocated units f...
public synchronized void release(int nUnits){ Thread curThread = Thread.currentThread(); //get current thread name if(!clientel.contains(curThread.getName()) || nUnits < 0 || nUnits > clientel.get(curThread.getName())[1]){ System.exit(1); //exit if some things are invalid ...
[ "private void deallocateWorker(ActorRef allocatedWorker, DrinkRequestMessage drink) {\r\n ActorRef deallocatedWorker = allocatedDrinkWorkers.remove(drink);\r\n if (deallocatedWorker != null) {\r\n availableDrinkWorkers.add(allocatedWorker);\r\n capacity += drink.getDrinkType().ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__InterfaceParameterList__Group__1" $ANTLR start "rule__InterfaceParameterList__Group__1__Impl" InternalDsl.g:20776:1: rule__InterfaceParameterList__Group__1__Impl : ( ( rule__InterfaceParameterList__Group_1__0 ) ) ;
public final void rule__InterfaceParameterList__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:20780:1: ( ( ( rule__InterfaceParameterList__Group_1__0 )* ) ) // InternalDsl.g:20781:1: ( ( rule__InterfaceParamete...
[ "public final void rule__InterfaceParameterList__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:20823:1: ( rule__InterfaceParameterList__Group_1__1__Impl )\n // InternalDsl.g:20824:2: rule__InterfaceParam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pumps through each waiting download, either removing it because it was stopped, or adding it because there's an active slot and it requires attention.
private synchronized void pumpDownloads() { int index = 1; for(Iterator i = waiting.iterator(); i.hasNext(); ) { ManagedDownloader md = (ManagedDownloader)i.next(); if(md.isAlive()) { continue; } else if(md.isCancelled() ||md.isCompleted()) { ...
[ "public void scheduleWaitingPump() {\n if(_waitingPump != null)\n return;\n \n _waitingPump = new Runnable() {\n public void run() {\n pumpDownloads();\n }\n };\n RouterService.schedule(_waitingPump,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
don't attack the same target multiple times
protected void groupedAttack(Unit target) { if (currentTarget == target) return; // just command every unit to attack one unit for (Unit u : self.getUnits()) { attack(u, target); } // saving the target that is getting attacked currentTarget = target; }
[ "public void attackTarget() {\n\t\t\n\t}", "public void attack(Unit target)\n { \n unitAI.attack(target);\n }", "public abstract void attack(Entity target);", "@Override\n\tpublic void attack() {\n\t}", "public void attackTargetCharacter() {\n }", "protected void doAttack(final L2Charac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
removes a record from the set
public void removeRecordFromSet(INetReceiptMessageConfig record) { this.netReceiptMessage.removeElement(record); }
[ "public Record removeRecord(Record record) {\n Record toRet = null;\n\n if (records.contains(record)) {\n for (Record rec : records) {\n if (rec.equals(record)) {\n toRet = rec;\n\n if (rec.getType() == RecordType.WITHDRAW)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the partKey property.
public long getPartKey() { return partKey; }
[ "public long getPartProducedKey() {\n\t\treturn partProducedKey;\n\t}", "public String partitionKey() {\n return this.partitionKey;\n }", "public PartBase getPart(String key) {\n return parts.get(key);\n }", "public String partitionKeyName() {\n return this.partitionKeyName;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'card' field.
public java.lang.Integer getCard() { return card; }
[ "public java.lang.Integer getCard() {\n return card;\n }", "public int getCardVal(){\n\t\treturn cardVal;\n\t}", "public Card getCard(){\n\t\treturn card;\n\t}", "public String getCardValue() {\n return Cvalue;\n }", "public Card getCard() {\n return card;\n }", "public String getC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The "preferred" flag is used to identify features that are particularly important for presenting to humans.
public void setPreferred(boolean preferred) { this.preferred = preferred; }
[ "public boolean isPreferred() {\n return preferred;\n }", "public String getIsRecommended() {\n return isRecommended;\n }", "public boolean getIsPreferredSupport() {\n return isPreferredSupport_;\n }", "public boolean getIsPreferredSupport() {\n return isPreferredSupport_;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get a list of predicates in array list of terms
public ArrayList<Predicate> getAllPreds(ArrayList<myTerm> terms) { ArrayList<Predicate> buff_preds = new ArrayList<Predicate>(); for (myTerm t : terms) { if (!buff_preds.contains(t.getPred())) { // System.out.println(t.getPred().getName() + '/' + t.getPred().getArity()); buff_preds.add(t.getPred()); } ...
[ "public Token[] getPredicate() {\n return predicate;\n }", "Set<PredicateSym> getPreds();", "public ArrayList<SimplifyResult> doAND(String predicates[]) throws IOException {\n\t\tString formula = new String();\n\t\t\n\t\tformula += \"(AND \";\n\t\tfor (String p : predicates) {\n\t\t\tformula += p + \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This interface defines a LBMS request. Each request contains a text string and stores whether or not the request is a partial request. Each type of request has a different execute functionality that returns a LBMS Response.
public interface Request{ public Response execute(Library library); public String getTextString(); public String[] getParams(); public boolean isPartial(); }
[ "public interface ExecuteRequest {\n /**\n * Execute http requests logic\n */\n void execute();\n }", "public interface Request extends Message {\n\n\n\t/**\n\t * Gets the URI of the endpoint (HTTP or HTTPS) for which the request \n\t * is intended.\n\t * \n\t * @return The endpoi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
secondsDifference Input: two time of day Strings Returns: integer number of seconds difference between time of day inputs (Returns 99999 if either time of day inputs invalid) General time of day format HH:MM:SS Examples: start end Return Value "12:34:09AM""12:00:00PM" 41151 "3:03:03PM""12:00:02am"54181 "6:34:52PM""6:34...
public static int secondsDifference(String start, String end) { int difference; //difference is initialized,and will be returned at the end. //firstsec is the amount of seconds past midnight in the start time, and //secondsec is the amount of seconds past midnight in the end time. In order to //...
[ "public double getTimeDifference(String first, String second)\r\n\t{\r\n\t\tdouble diff=0;\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\r\n\t\t\tDate end = dateFormat.parse(first);\r\n\t\t\tDate start = dateFormat.parse(second);\r\n\r\n\t\t\tdiff = (end.getTime()-start.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required string ECMFolderId = 34 [(.validation.regex) = ""];
public com.google.protobuf.ByteString getECMFolderIdBytes() { java.lang.Object ref = eCMFolderId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.l...
[ "public Builder setECMFolderId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n eCMFolderId_ = value;\n onChanged();\n return this;\n }", "java.lang.String ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Required. The maximum travel time in seconds. The maximum allowed value is `3600s` (one hour). Format is `123s`. .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED];
public Builder setTravelDuration(com.google.protobuf.Duration value) { if (travelDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } travelDuration_ = value; } else { travelDurationBuilder_.setMessage(value); } bitField0_...
[ "@java.lang.Override\n public com.google.protobuf.Duration getTravelDuration() {\n return travelDuration_ == null\n ? com.google.protobuf.Duration.getDefaultInstance()\n : travelDuration_;\n }", "@java.lang.Override\n public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
value associated with the given key in subtree rooted at node; if the node is null, search the previous node fnode for the require;
private Value search(Node node, Key key, Node fnode) { if (node == null){ return fnode.value; } int comp = compare(key, node.key); if (comp < 0){ if (node == root) { return search(node.left, key, root); }else { return search(node.left, k...
[ "public String search(int key){\r\n\r\n String val;\r\n if( searchTree(root,key) == null){\r\n val = null;\r\n }else{\r\n val = searchTree(root,key).value;\r\n }\r\n\r\n return val;\r\n\r\n }", "private TFNode search(TFNode node, Object key) throws TFNodeException {\r\n\r\n // Check for ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the thiness of the crosshair
public void setThiness(int s){ this.stroke = s; }
[ "public void drawHair(Canvas can)\n {\n\n paint.setColor(hairColor);\n if(hairStyle == 1)\n {\n can.drawOval(200.0f, 50.0f, 500.0f, 150.0f, paint);\n\n }\n else if(hairStyle == 2)\n {\n can.drawOval(150.0f, 0.0f, 550.0f, 250.0f, paint);\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'time' field has been set
public boolean hasTime() { return fieldSetFlags()[0]; }
[ "public boolean isSetTime() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID);\n }", "public boolean hasTime() {\n return this.timeWrapper.isPresent();\n }", "public boolean isSetTime() {\n return EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID);\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the perihelionAngle property.
public double getPerihelionAngle() { return perihelionAngle; }
[ "public void setPerihelionAngle(double value) {\n this.perihelionAngle = value;\n }", "public double getOrientationAngle() {\n return fOrientationAngle;\n }", "private double getAngle(){\n return -ehr.angularOrientation;\n }", "public double getAngle() {\n if (r == 0) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
API to get drill down data when clicked on a particular area of a chart
private void drillDownAPI(){ mDrilldownList.clear(); // here mKey is the value we get from chart e.g India Mart mKey = mKey.replace("NA",""); SharedPrefManager mPrefManager = new SharedPrefManager(getActivity()); // String chartURl = mChartObj.getDataUrl(); mChartUrl = mCh...
[ "private void buttonExploreDatasetMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonExploreDatasetMouseClicked\n this.controller.responseExploreDataset();\n }", "@Override\n public void mouseReleased(MouseEvent e) {\n\n // 2D mode\n if (getChart().getView().is2D()) {\n Vie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send a line of output to the slave JVM.
public void sendOutput(String output) { this.toSlave.println(output); }
[ "public void sendRawLine(String line);", "public void send(String result) {\n streamOut.println(result);\n //streamOut.flush();\n\n }", "public void sendRaw(String line)\n\t{\n\t\tif (!isConnected())\n\t\t{\n\t\t\tthrow new NotConnectedException(\"You can't send something if you're not connecte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse a Carrier object from a JSONObject
public static Carrier createCarriersFromJsonObject(JSONObject _jsonObject) throws JSONException { //Parse fields int carriersCarrierId = _jsonObject.getInt("CarrierId"); String carriersName = _jsonObject.getString("Name"); //Construct result Carrier result = new Carrier(carrier...
[ "public static Race fromJson(JSONObject json) {\n Race race = new Race();\n try {\n // Basic race info\n race.title = json.getString(\"title\");\n race.date = json.getString(\"date\");\n race.time = json.getString(\"time\");\n race.setDateAndTime(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets filter processes url.
public String getFilterProcessesUrl() { return filterProcessesUrl; }
[ "String getQueryRequestUrl();", "public void setFilterProcessesUrl(String filterProcessesUrl) {\n this.filterProcessesUrl = filterProcessesUrl;\n }", "public String getURL() {\n StringBuffer sBuff = request.getRequestURL();\n String queryString = request.getQueryString();\n if ( querySt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the file indexes.
public void setFilesIndexes(int[] containersIndexes) { this.filesIndexes = containersIndexes; }
[ "void setFileIndex(long value);", "public void setCurrentSongIndex(File songFile);", "private void setIndexArray() throws IOException {\n\n byte[] recBuf = new byte[INDEX_RECORD_LENGTH];\n long rafPos = ShapeConst.SHAPE_FILE_HEADER_LENGTH;\n int iaIndex = 0;\n ArrayList indexArrayVec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the base context that we are wrapping. Here, its this, but for other thing like VM related context contortions, it can be something else
@Override public InternalContextAdapter getBaseContext() { return this; }
[ "private Context getBaseContext(){\n\t\treturn this.getActivity().getBaseContext();\n\t}", "public Context getContext();", "public Object getContext();", "@SuppressWarnings(\"unchecked\")\n protected C context()\n {\n return (C)RequestReferences.get().context;\n }", "public Object getContext()\n {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the innneedrecovery property.
public void setINNNEEDRECOVERY(boolean value) { this.innneedrecovery = value; }
[ "public boolean isINNNEEDRECOVERY() {\r\n return innneedrecovery;\r\n }", "public void setRecovery(entity.Recovery value) {\n __getInternalInterface().setFieldValue(RECOVERY_PROP.get(), value);\n }", "public void setRecovery(entity.Recovery value) {\n __getInternalInterface().setFieldValue(RE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get set of all specialized forms of this class.
public Set<AlfClass> getSpecializations() { return Collections.unmodifiableSet(this.specializations); }
[ "public abstract Collection<Pair<String,String>> getAllForms();", "public abstract Class<?>[] getFormRegions();", "public Set<String> getSubtypes();", "public static Collection<MicrosoftGraphTeamSpecialization> values() {\n return values(MicrosoftGraphTeamSpecialization.class);\n }", "@Override\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tokenizes Expression in the most basic tokens
public static Array<Token> tokenize(String expression) throws ExpressionEvaluationException { checkNoInvalidSymbols(expression); Array<Token> tokens = new Array<Token>(true, 32); Matcher matcher = tokenizingPattern.matcher(expression); while (matcher.find()){ String tokenTe...
[ "private static List<String> tokenize(String expression) {\r\n\t\tString[] arrayTokens = expression.split(\r\n\t\t\t\t\"((?<=\\\\+)|(?=\\\\+))|((?<=\\\\-)|(?=\\\\-))|((?<=\\\\*)|(?=\\\\*))|((?<=\\\\/)|(?=\\\\/))|((?<=\\\\()|(?=\\\\())|((?<=\\\\))|(?=\\\\)))\");\r\n\r\n\t\t// not all minus sign is an operator. It ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve employees by role name
List<String> getEmployeeWithRoleNames(String role);
[ "public List<Employee> getEmployeeByRole(String role)\n\t{\n\t\trole = role.toUpperCase();\n\t\tList<Optional<Employee>> employee = employeeRepository.findByRole(role);\n\t\tList<Employee> employees = employee.stream().map(e->e.get()).collect(Collectors.toList());\n\t\treturn employees;\n\t}", "public Role findRo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the billToCity value for this Account.
public void setBillToCity(java.lang.Object billToCity) { this.billToCity = billToCity; }
[ "@Override\n\tpublic void setBillingCity(java.lang.String billingCity) {\n\t\t_bookOrder.setBillingCity(billingCity);\n\t}", "public void setShipToCity(String shipToCity) {\n super.setAddressCity(shipToCity);\n }", "public void setBankCity(String bankCity) {\r\n this.bankCity = bankCity == null...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the text which lies between the two TextLocations.
public String getText(TextLocation begin, TextLocation end) { return bjEditor.getText(convertLocation(begin), convertLocation(end)); }
[ "public static TextPos diffPos(String s1, String s2) {\n int d = diff(s1, s2);\n if (d <0) return new TextPos(); // return undefined TextPos\n if (s1.length() >= s2.length()) {\n return getTextPos(s1, d);\n } else {\n return getTextPos(s2, d);\n }\n }", "@Nullable\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the azureKeyVaultKms property: Azure Key Vault [key management service]( settings for the security profile.
public AzureKeyVaultKms azureKeyVaultKms() { return this.azureKeyVaultKms; }
[ "java.lang.String getKmsKeyName();", "public String getKmsAccessKey() {return this.databaseConfig.getProperty(\"kmsAccessKey\");}", "com.google.protobuf.ByteString getKmsKeyNameBytes();", "public String getKmsSecretKey() {return this.databaseConfig.getProperty(\"kmsSecretKey\");}", "public String keyVault()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check for an empty LinkedList given by location
public boolean isEmpty(int location) { if(theLists[location].size() == 0) { return true; } else { return false; } }
[ "public boolean isEmpty(){\n\t\treturn sizeOfLinkedList() == 0;\n\t}", "@Override\n public boolean isEmpty() {\n return linkedlist_.isEmpty();\n }", "boolean isListRemainingEmpty();", "@Test\r\n\tpublic void testLinkedListRecursive() {\r\n\t\tassertNotNull(ll);\r\n\t\tassertTrue(ll.isEmpty());\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The kind of target (e.g., e.g. "cc_library rule", "source file", "generated file") where the completion is reported. string target_kind = 1;
public com.google.protobuf.ByteString getTargetKindBytes() { java.lang.Object ref = targetKind_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); targetKind...
[ "java.lang.String getTargetKind();", "public java.lang.String getTargetKind() {\n java.lang.Object ref = targetKind_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteStrin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds several Lucene Field objects to the provided index Document that reflect the provided name and value and are appropriate for searching shorter fields. This method stores multiple versions to accommodate multiple search types, such as stemmed searching, faceted results, exact matching, etc.
public static void addKeywordField(String name, String value, Document indexDoc) { if (value == null || value.trim().equals("")) { // Store an indicator that the field is unset. indexDoc.add(new Field(name + PRESENT_SUFFIX, "0", Field.Store.NO, Field.Index.TOKENIZED, Field.TermVector....
[ "public static void addFullTextField(String name, String value, Document indexDoc) {\r\n // store base\r\n indexDoc.add(new Field(name, value, Field.Store.NO, Field.Index.TOKENIZED, Field.TermVector.WITH_POSITIONS_OFFSETS));\r\n \r\n // store stemmed\r\n indexDoc.add(new Field(nam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This constructor creates a new node of height "height", initializes its refs to null, and initializes the node's value to the given "value".
Node(Any data, int height) { this.height = height; this.value = data; refs = new ArrayList<Node<Any>>(); for (int i = 0; i < height; i++) refs.add(null); }
[ "public Node(T value) {\n this.value = value;\n this.height = 0;\n this.leftChild = null;\n this.rightChild = null;\n this.parent = null;\n }", "Node(int height)\n\t{\n\t\tthis.height = height;\n\t\trefs = new ArrayList<Node<Any>>();\n\t\tfor (int i = 0; i < height; i++)\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maximum length of nonnull values in the scanned data. int64 max_length = 2;
@java.lang.Override public long getMaxLength() { return maxLength_; }
[ "long getMaxLength();", "@java.lang.Override\n public long getMaxLength() {\n return maxLength_;\n }", "public int getMaxLength();", "boolean getMaxByteLengthNull();", "io.dstore.values.IntegerValue getMaxByteLength();", "io.dstore.values.IntegerValueOrBuilder getMaxByte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runnable interface ////////////////// Resolves proxy address in other thread, to avoid annoying blocking in GUI thread.
public void run(){ if(!initProxy()){ //Check if we have been aborted if(mode != OK_MODE) return; if(net_thread != Thread.currentThread()) return; mode = COMMAND_MODE; warning_label.setText("Look up failed."); warning_label.invalidate(); return; ...
[ "public void resolveAddress() {\n checkWidget();\n browser.evaluate(\"resolveAddress()\");\n }", "public String getProxyAddress() {\n\t\treturn updater.getProxyAddress();\n\t}", "@Override\n\tpublic void proxyIPCrawl() {\n\t}", "NetworkProxy getNetworkProxy( String id );", "public void run(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
renders: tile layer static entities dynamic entities lighting hitboxes and cutoffY's if debug is true doesn't render: gui developer console
@Override public void render() { beginRender(); TiledMapTileLayer tileLayer = (TiledMapTileLayer) map.getLayers().get("Tile Layer 1"); renderTileLayer(tileLayer); // render tiles before entities so tiles // are on the bottom renderEntities(); endRender(); rayHandler.updateAndRender(); beginRender(); ...
[ "public void drawDebug(){\n debugRenderer.setProjectionMatrix(cam.combined);\n debugRenderer.begin(ShapeRenderer.ShapeType.Line);\n\n for (Object e : world.getEnemies()) {\n Enemy enemy = (Enemy)e;\n Rectangle rect = enemy.getBounds();\n float x1 = rect.x;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the current program spec. If there is a cached spec, return it. If not, load the spec. If online check that the local copy is uptodate.
public ProgramSpec getProgramSpec() { if (programSpec == null) { File programSpecDir = pathsProvider.getProgramSpecDir(); if (Authenticator.getInstance().isAuthenticated()) { List<S3ObjectSummary> needDownload = findObsoleteProgspecFiles(); if (needDownlo...
[ "public static String getCurrentProgramVersionInfo() {\n String versionText = \"V15.08\";\n String versionFilename = \"version.txt\";\n URL versionUrl = ExplodeTcpMonMessages.class.getResource(versionFilename);\n InputStream versionInputStream = null;\n if ( versionUrl != null ) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column sys_account.createIP
public String getCreateip() { return createip; }
[ "public String getCreateUserip() {\r\n\t\treturn createUserip;\r\n\t}", "public String getCreateIp() {\n return createIp;\n }", "public String create()\r\n\t{\r\n\t\tlog.debug(\"creating a ignore ip address = \" + ignoreIpAddress.getName());\r\n\t\tadded = false;\r\n\t\tIgnoreIpAddress other = ignoreI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the desired path between Squares is clear or not.
private boolean clearPath(Square square1, Square square2) { int x1 = square1.getCoords()[0]; int x2 = square2.getCoords()[0]; int y1 = square1.getCoords()[1]; int y2 = square2.getCoords()[1]; int targetX; int targetY; int startX; int startY; if (...
[ "@Test\n\tpublic void testIsClearPath() {\n\t\tChessBoard board = new ChessBoard(8); //a rook in front of a king\n\t\tboard.addPiece(new King(Color.W, 7,7), new int[] {7,7});\n\t\tboard.addPiece(new Rook(Color.W,0,3), new int[] {0,3});\n\t\tboard.addPiece(new King(Color.B, 5,3), new int[] {5,3});\n\t\tassertEquals(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }