query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
If the player typed /tardis then do the following... check there is the right number of arguments
@Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if (cmd.getName().equalsIgnoreCase("tardis")) { Player player = null; if (sender instanceof Player) { player = (Player) sender; } if (ar...
[ "private static void getCommand() {\n System.out.print(\"What would you like to do? Commands: GO, TAKE, LOOK. \");\n System.out.print(\"> \");\n String command = kb.nextLine();\n //this only happens if they typed at least two words:\n if (command.contains(\" \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the given button highlighted or normal.
private void highlight(AbstractButton button, boolean highlight) { button.setBackground(highlight ? COLOR_HIGHLIGHT : COLOR_STANDARD); if (IS_OSX) { button.setOpaque(highlight); button.setBorderPainted(!highlight); } }
[ "private void changeSelectedButton(RoundedButton button)\r\n\t{\r\n\t\tformatButton(selected);\r\n\t\tselected = button;\r\n\t\tbutton.setBackground(babyBlue.darker());\r\n\t\tbutton.setForeground(Color.WHITE);\r\n\t}", "public void setHighlighted(boolean highlighted) {\n this.highlighted = highlighted;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.com.github.jtendermint.jabci.types.ResponseDeliverTx deliver_tx = 6;
com.github.jtendermint.jabci.types.Types.ResponseDeliverTxOrBuilder getDeliverTxOrBuilder();
[ "com.github.jtendermint.jabci.types.Types.ResponseDeliverTx getDeliverTx();", "com.github.jtendermint.jabci.types.Types.RequestDeliverTx getDeliverTx();", "com.github.jtendermint.jabci.types.Types.RequestDeliverTxOrBuilder getDeliverTxOrBuilder();", "com.github.jtendermint.jabci.types.Types.ResponseCheckTx ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated method Setter of IntegrationObjectItem.attributes attribute defined at extension integrationservices.
@Accessor(qualifier = "attributes", type = Accessor.Type.SETTER) public void setAttributes(final Set<IntegrationObjectItemAttributeModel> value) { getPersistenceContext().setPropertyValue(ATTRIBUTES, value); }
[ "void setAttributes(Attributes attributes);", "public void setAttributes(java.util.Properties attributes) {\r\n this.attributes = attributes;\r\n }", "public void setAttribute(String attr) { this.attribute = attr; }", "private void handlePropertyAsAttribute(Attributes attributes, List<String> ignore...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of assignees separated by comma.
String getAllAssigneesAsString();
[ "List getAllAssignees();", "public List<String> getAvailableAssignees()\n {\n // TODO stefan an Rollen knüpfen\n final Matcher<String> m = new BooleanListRulesFactory<String>().createMatcher(\"admin/user/*\");\n final List<GWikiElementInfo> userInfos = wikiContext.getElementFinder()\n .getPageInf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MyCometListener cometListener = new MyCometListener(); AtmosphereGWTSerializer serializer = GWT.create(MessageDTOSerializer.class); set a small length parameter to force refreshes normally you should remove the length parameter client = new AtmosphereClient(url, serializer, cometListener); client.start();
private void initialize(String url) { new AtmosphereJerseySuspend(new MyCometListener(), url).listen(); }
[ "public interface CometCallback {\r\n\t/**\r\n\t * This method is invoked each time an object payload is received from the\r\n\t * server\r\n\t * \r\n\t * @param object\r\n\t */\r\n\tvoid onPayload(Object object);\r\n\r\n\t/**\r\n\t * This method is invoked when the server disconnects or terminates a comet\r\n\t * ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Exercise 10. Prompt the user to enter a wage and hours worked. How much money will be made?
public void salary() { System.out.print("Wage: "); double wage = in.nextDouble(); System.out.print("Hours: "); double hours = in.nextDouble(); final double REG_HOURS = 40; final double OVERTIME_MULTIPLIER = 0.5; double salary = wage * hours; if (hours > REG_HOURS) { ...
[ "public static void f_salary(){\n\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"imput the total hours thath the worked by worker\");\n\n int hours= keyboard.nextInt();\n int salary =0;\n while( hours<=0 ){\n \n System.out.println(\"ERROR:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the index of the time in the given list that is closest without going past the given time.
public static int indexOfTimeBeforeTime(List <? extends Number> aList, float aTime) { // Iterate over times until we find one less than given time for(int i=aList.size()-1; i>=0; i--) if(aList.get(i).floatValue() < aTime) return i; // Return -1 if no time was found prior to given time ...
[ "public static int findNearestTimeIndex(List<DateTime> dtList, DateTime target)\n {\n int index = Collections.binarySearch(dtList, target, DATE_TIME_COMPARATOR);\n if (index < 0)\n {\n // No exact match, but we have the insertion point, i.e. the index of\n // the first ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set parameter values before executing the webhook. repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction set_parameter_actions = 4;
com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction getSetParameterActions(int index);
[ "java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction> \n getSetParameterActionsList();", "java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterActionOrBuilder> \n getSetParameterActionsOrBuilderList();", "com.google.cloud.dialogflow.c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Default constructor sets SPS Attack properties to a default values: 1000 attack iterations with random key bits. Only the result will be printed.
public SpsAttackWrapper() { this.SPSConfiguration = SPSConfig.createSPSConfig(); }
[ "public Attack() {\n\n\t}", "public BasicAttack() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Spy () {\n _name = \"Spy\";\n _hitPts = 200;\n _strength = 80;\n _defense = 15;\n _attack = 1.5;\n }", "public void setAttack(int value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The view that is active when opening / using the filter. optional .android_studio.FilterMetadata.View active_view = 1;
com.google.wireless.android.sdk.stats.FilterMetadata.View getActiveView();
[ "public void onViewActivated();", "void setActiveView(int streamID);", "boolean getGView();", "interface CurrentView {\n int OPTIONS_LAYOUT = 1;\n int READ_LAYOUT = 2;\n int WRITE_LAYOUT = 3;\n int PDF_SELECTION_LAYOUT = 4;\n }", "View getActiveView(int position) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Establece el valor de ideDocumentoRecibo.
public void setIdeDocumentoRecibo(java.lang.Long ideDocumentoRecibo) { this.ideDocumentoRecibo = ideDocumentoRecibo; }
[ "public java.lang.Long getIdeDocumentoRecibo() {\n\t\treturn ideDocumentoRecibo;\n\t}", "public String getNroRecibo() {\n return nroRecibo;\n }", "public void setIdeFormatoRecibo(java.lang.Integer ideFormatoRecibo) {\n\t\tthis.ideFormatoRecibo = ideFormatoRecibo;\n\t}", "public void setNroRecibo(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for price per dozen
public void setPricePerDozen(int pricePerDozen) { this.pricePerDozen = pricePerDozen; }
[ "public void setPrice(double price);", "public void setPrice(double p) {\n price = p;\n }", "public void setPrice(double value) {\n this.price = value;\n }", "public void setPrice() {\n this.price = 37.99;\n }", "public void setPrice(double price)\n {\n this.price = price;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method sets the value of the database column propiedadarchivo.codPropiedadArchivo
public void setCodpropiedadarchivo(Long codpropiedadarchivo) { this.codpropiedadarchivo = codpropiedadarchivo; }
[ "public Long getCodpropiedadarchivo() {\r\n return codpropiedadarchivo;\r\n }", "public void setTipoArchivoId(java.lang.Long tipoArchivoId) {\r\n this.tipoArchivoId = tipoArchivoId;\r\n }", "public String getCodtipoarchivo() {\r\n return codtipoarchivo;\r\n }", "public void setTipoA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the cost of the given path.
private static String getPathCost(AbstractGraph graph, List<Node> path) { String thisNode = null; String nextNode = null; DefaultWeightedEdge edge; double weight; double sum = 0; int counter = 0; for (Node n : path) { if (counter++ == 0) { thisNode = nextNode = n.toString(); ...
[ "public static double calculateCost(List<ICell> path) {\n\t\tdouble pathCost = 0;\n\n\t\tfor (int i = 0; i < path.size() - 1; i++) {\n\t\t\tICell current = path.get(i);\n\t\t\tICell next = path.get(i + 1);\n\t\t\tdouble moveCost = (current.getTraverseCost() + next\n\t\t\t\t\t.getTraverseCost()) / 2.0;\n\t\t\tpathCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the room array.
public Room[][] getRoomArray() { return this.roomArray; }
[ "public Room[] getRooms() {\r\n return rooms.clone();\r\n }", "public JSONArray getRooms() {\r\n //Loads the rooms json\r\n Json rooms = loadRooms();\r\n\r\n //Reads the JSON file into a JSONArray\r\n JSONArray roomArray = rooms.readJson();\r\n\r\n return roomArray;\r\n }", "public Cha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns all the information of the Workouts as an ArrayList of String arrays, one entry in the ArrayList per Workout. The String array should contain the workout's Name, Equipment, Primary and Secondary Muscles, Description, and Reminders. All of these should be strings.
public final ArrayList<String[]> getFullInformation() { ArrayList<String[]> allInfo = new ArrayList<String[]>(); for (Workout i : workoutList) { allInfo.add(new String[] { i.getName(), i.getEquipment().toString(), i.getPrimaryMuscle().toString(), i.getSecondaryMuscle().toString(), i.getDesc(), i.getRe...
[ "public List<Workout> getAllWorkoutsList() {\n Cursor workoutCursor = getWorkoutTable();\n List<Workout> workouts = new ArrayList<>();\n\n // Go through each of the workoutId\n while (workoutCursor.moveToNext()) {\n long workoutId = workoutCursor.getLong(workoutCursor.getColum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the password logic.
public PINLogic getPasswordLogic() { return passwordLogic; }
[ "private String getPassword()\n {\n String password = getPasswordProvided();\n\n if (password == null)\n {\n password = getPasswordPrompted();\n }\n if (password == null)\n {\n password = getPasswordFromFile();\n }\n if (password == null)\n {\n password = getPasswordFromEn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the figure which plays.
@Override public String getFigure() { return figure; }
[ "public String getFigure() {\n return figure;\n }", "public Figure getFigure() {\n return (Figure) getSource();\n }", "public GamePlay getGamePlay() {\n return gamePlay;\n }", "public GamePlay getGamePlay()\n {\n return gamePlay;\n }", "public String getSong() {\n\t\tSys...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form BatchFilesDialog
public BatchFilesDialog() { initComponents(); this.setLocationRelativeTo(null); this.setModal(true); }
[ "public BatchFilesDialog(Dialog parent) {\n super(parent, \"Select Batch Files\", true);\n initComponents();\n initTextFields();\n this.setLocationRelativeTo(null);\n this.setModal(true);\n }", "public BatchFilesDialog(Frame parent) {\n super(parent, \"Select Batch Fil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
nom des colonnes pour JTable.
@Override public String[] getColumsName() { String[] tab = new String[4]; tab[0] = "idparticipant"; tab[1] = "idevenement"; tab[2] = "hebergement"; tab[3] = "restauration"; return tab; }
[ "public void CrearTablaHotel(TableModelNoEditable modeloTabla) {\r\n modeloTabla.addColumn(\"Nombre Hotel\");\r\n }", "private void addColuna(){\n DefaultTableModel model = (DefaultTableModel) jTableItens.getModel();\n model.addColumn(\"data\");\n model.addColumn(\"codprod\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is base64 mac valid.
public static boolean isBase64MacValid(String base64Mac, String input, byte[] keyBytes) { byte[] expected = EncodeUtils.decodeBase64(base64Mac); byte[] actual = hmacSha1(input, keyBytes); return Arrays.equals(expected, actual); }
[ "static boolean isValidMac(String mac) {\n if (mac.length() != 12) {\n return false;\n }\n for (int i = 0; i < Controls.MAC_LENGTH; i++) {\n int c = mac.charAt(i);\n if (c < '0' || (c > '9' && c < 'A') || (c > 'F' && c < 'a') || c > 'f') ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method of showing customers by phone
public void ShowCustomerByPhoneNumber() { Integer phoneNumber = Integer.valueOf(scanner.nextLine()); Customer customer = phoneToCustomer.get(phoneNumber); customer.showCustomerInformation(); }
[ "public void getCustomerByPhoneExample(String customerPhone) throws JSONException {\n handleResponse(connectionHandler.sendAPIGetRequest(GET_CUSTOMER_API_PATH + customerPhone));\n }", "public static void searchAndPrintRegisteredCustomerByTelephone(int telephone) {\r\n boolean found = false;\r\n fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / Takes care of measuring a single cell. / / Index of the cell to measure. / If "true" then cell is always / calculated to infinite height.
private void MeasureCell( int cell, boolean forceInfinityV) { EnterCounter(Counters._MeasureCell); double cellMeasureWidth; double cellMeasureHeight; if ( PrivateCells[cell].IsAutoU && !PrivateCells[cell].IsStarU ) { ...
[ "private boolean isFull(){\n return cellSize == Max;\n }", "protected int getCellCount()\n {\n return this.cellCount ;\n }", "public int getCell(){ return cell; }", "public int getCellSize()\n {\n return cellSize;\n }", "public int getCellCount() {\n return getWidth() * g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field mortgageGuaranteeType is set (has been assigned a value) and false otherwise
public boolean isSetMortgageGuaranteeType() { return EncodingUtils.testBit(__isset_bitfield, __MORTGAGEGUARANTEETYPE_ISSET_ID); }
[ "public boolean isSetMortgageGuaranteeTypeText() {\n return this.mortgageGuaranteeTypeText != null;\n }", "public boolean isSetMortgageType() {\n return EncodingUtils.testBit(__isset_bitfield, __MORTGAGETYPE_ISSET_ID);\n }", "public boolean isSetMortgageTypeText() {\n return this.mortgageTypeText != ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that performs save action for given certificate id and set of this certificate tags
void saveCertificateTags(Long certificateId, Set<Tag> certificateTags);
[ "void save(int certificateId, int tagId) throws DaoException;", "@Override\n public void saveCertificate(@NonNull Certificate certificate) {\n CertificateEntity entity = toEntity(certificate);\n ObjectifyService.run(new VoidWork() {\n @Override\n public void vrun() {\n ofy().save().entity(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the receive object.
public void setReceiveObject(int receiveObject) { this.receiveObject = receiveObject; }
[ "public void setReceive(Receive receive) { \n\t\tthis.receive = receive;\n\t}", "public int getReceiveObject() {\n\t\treturn receiveObject;\n\t}", "public void setReceiver(Receiver receiver) {\n\t this.receiver = receiver;\n\t }", "public void setReceiver (Receiver receiver) {\n\t\t_receiver = receiver;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validation of current profile and checking for EPG and Instances
public void validateCurrentProfile(String application,String expectedProfile,String expectedEPG){ if(validateProfileDetails(expectedProfile)){ Link.click("EPG", epgLink, driver); Sync.waitForSeconds(5, driver); if(tableRows.size() != 0){ StringBuilder epgs = new StringBuilder(); CommonUtil.vali...
[ "private void validateSelectedProfile() {\r\n Profiles ps = kernel.getProfiles();\r\n\r\n //Check if selected profile passes the current settings\r\n Profile selected = ps.getSelectedProfile();\r\n VersionMeta selectedVersion = selected.getVersionID();\r\n\r\n if (selected.getType...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build pulse views and animators.
private void build() { LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); List<Animator> animators = new ArrayList<>(); for (int index = 0; index < count; index++) { PulseView pulseView = new PulseView(getContext()); pulseView.setScaleX(...
[ "public void buildAnimation() {\n\t\tif (seq.shp != null) {\n\t\t\tanimation = new Animation(\"Animation\" + id, 0.5f);\n\n\t\t\tfor (int i = 0; i < seq.numJoints; ++i) {\n\n\t\t\t\tfloat[] times = { 0.0f };\n\n\t\t\t\t// rotation bone\n\t\t\t\tBoneTrack track = new BoneTrack(i);\n\t\t\t\tVector3f[] translations = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the answer of this registration.
@Override public void setAnswer(String answer) { _registration.setAnswer(answer); }
[ "public void setAnswer()\n \t{\n \t\tmAnswer = true;\n \t}", "public void setAnswer(java.lang.String _answer)\n {\n answer = _answer;\n }", "private void setAnswer(String answer){\n\t\tif(answer!=null){\n\t\t\tthis.answer= answer;\n\t\t}\n\t}", "public void setAnswer(AnswerType answer) {\n this.an...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/SimpleQueue queue = new SimpleQueue(); new Thread(new Producer(queue)).start(); new Thread(new Consumer(queue)).start();
public static void main(String[] args) { SimpleQueue2 queue = new SimpleQueue2(); new Thread(new Producer(queue),"P1").start(); new Thread(new Producer(queue),"P2").start(); new Thread(new Producer(queue),"P3").start(); new Thread(new Consumer(queue),"C").start(); }
[ "@Test\n public void testQueueCodeExamples() throws Exception {\n logger.info(\"Beginning testQueueCodeExamples()...\");\n\n // Allocate an empty queue\n Queue<Integer> queue = new Queue<>(256); // capacity of 256 elements\n\n // Start up some consumers\n Consumer consumer1 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to acquire the name of the part. Typically this is used when the part represents a text parameter rather than a file. However, this can also be used with a file part.
public String getName() { if(part == null) { return null; } return part.getName(); }
[ "public String getPartName() {\n return partName.get();\n }", "public String name() {\n return (parts.length > 0) ? parts[parts.length - 1] : null;\n }", "public final String getFileName(final Part part) {\n for (String cd : part.getHeader(\"content-disposition\").split(\";\")) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
minimax function that takes in the current board, whether its a max level or not, and the depth as input
public int miniMax(Board currentBoard, boolean maxLevel, int depth){ int score = checkWinner(currentBoard); Board boardCopy = new Board(currentBoard); //exits when the desired depth has been reached if(depth == 0){ return score; } //ends if the AI h...
[ "private int minimax(OthelloState state, int depth)\n {\n if(depth == searchDepth_ || state.gameOver() )\n return heuristic(state);\n\n if(state.nextPlayerToMove == self_) //maximizing step\n {\n int bestValue = Integer.MIN_VALUE;\n List<OthelloMove> nextMove...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When a single result is expected, this method returns this entity's oid
@SuppressWarnings("unchecked") public <O extends OID> O getSingleExpectedOidOrThrow() { M outEntity = this.getSingleExpectedOrThrow(); return (O)(outEntity != null ? outEntity.getOid() : null); }
[ "java.lang.String getEntityId();", "String getEntityId();", "int getEntityID();", "EntityId getEntityId(Entity entity);", "public int getResultId() {\n return resultId;\n }", "public long getResultId() {\n return resultId;\n }", "long getId();", "String refreshedEntityId();", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modifie un objet Transport existant dans la database
public Transport updateTransport(Transport transport) { if (transport.getId() != null && transport.getId() != 0 && daoT.existsById(transport.getId())) { log.info("Modification du Transport SUCCESS"); return daoT.save(transport); } else { log.warn("Modification du transport FAILED"); return null; } }
[ "public void update(Triplet t) throws DAOException;", "@Insert\n long insert(Transport transport);", "@Test\n @Transactional\n public void testUpdate() {\n int id = traject.getId();\n \n Traject result = (Traject)service.read(id);\n result.setNaam(\"Java Dev2\");\n se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run r on this worker after delay units have passed.
@ThreadSafe public final void runLater(long delay, TimeUnit units, Runnable r) { checkAlive(); log.debugEnter(this, "delay, units, r", delay, units, r); if (delay <= 0) throw new IllegalArgumentException("delay " + delay+" <= 0"); _runLater(r, delay, units); }
[ "@ThreadSafe public final void runConditional(long delay, TimeUnit units, Runnable r) {\r\n log.debugEnter(this, \"delay, units, r\", delay, units, r);\r\n\r\n synchronized (pendingLazyRunables) {\r\n\r\n if (pendingLazyRunables.containsKey(r)) return;\r\n\r\n // OPTIMIZE common ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.err.println("updatePos: \n" + itemText + "\n " + absoluteSelectedWordIdx + "\n ");
@Override public void updatePos(String itemText, int absoluteSelectedWordIdx) { BusyIndicator.busy("updating the part of speech of word with index: " + absoluteSelectedWordIdx, " new pos: " + itemText , ""); StringBuilder sb = new StringBuilder(); sb.append(USER); sb.append(":"); sb.append(clientSession.g...
[ "int TextSetPos(int id, int x, int y);", "int getResetWordPos();", "public void changedUpdate(DocumentEvent e) {\n\nSystem.out.println(\"got c update \"+e.getType());\n\n try {\n viz.getFocussedItem().updateID( e.getDocument().getText(0,\n e.getDocument().getLength()));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Override to handle changes to the current metadata.
public void onMetadataChanged(MediaMetadataCompat metadata) { }
[ "protected void repositoryMetadataChanged() {\n }", "@Override\n public void updateMetadata(AbstractMetadataValue value) {\n }", "protected void onModified()\n\t{\n\t\tm_modified = true;\n\t\tif (m_metadata != null)\n\t\t{\n\t\t\tm_metadata.onModified();\n\t\t}\n\t}", "void repositoryMetadataChanged(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a shingled time series to the table the user responsible for the proper ordering of the frequencies.
public void addShingledSeries(String key, int[] counts) { shingles.put(key, counts); }
[ "public void addShingledSeries(String key, Map<String, Integer> shingledSeries) {\n // allocate the weights array corresponding to the time series\n int[] counts = new int[this.indexTable.size()];\n // fill in the counts\n for (String str : shingledSeries.keySet()) {\n Integer idx = this.indexTable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hook method that must be overridden by an implementing subclass. Parses the response from the application and returns a list of strings representing the URLs for each form definition.
protected abstract List<String> parseToUrlList(String responseBody) throws Exception;
[ "ReferenceList getListForms( );", "@Override\n public List<FormInfo> getForms() {\n return forms;\n }", "public WebForm[] getForms() throws SAXException;", "protected List<String> printTextFieldsAndGatherResponsesAsArray() {\n List<String> responses = new ArrayList<>();\n\n for (Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper to get the forward soft limit in sensor units.
public Length getForwardSoftLimit() { return toSensorUnits(configuration.getForwardSoftLimit()); }
[ "public Length getForwardLimit() {\n\t\treturn toSensorUnits(configuration.getForwardLimit());\n\t}", "double getSoftLowerLimit();", "Double getLowerMotorLimit() throws DeviceException;", "public Length getReverseSoftLimit() {\n\t\treturn toSensorUnits(configuration.getReverseSoftLimit());\n\t}", "double ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new EntityManagerContext
EntityManagerContext(EntityManagerFactory factory) { this.factory = factory; }
[ "EntityManager createEntityManager(PersistenceContextType type);", "public EntityManager create(InjectionContext ctx) {\n\n\t\tInjection injection = ctx.getInjection();\n\n\t\tString persistenceUnit;\n\t\tif (!injection.name().equals(\"\")) {\n\t\t\tpersistenceUnit = injection.name();\n\t\t\t\n\t\t} else {\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ A Tricky Solution: If we see some examples of this problems, we can easily observe following pattern. The maximum product can be obtained be repeatedly cutting parts of size 3 while size is greater than 4, keeping the last part as size of 2 or 3 or 4. For example, n = 10, maximum product is obtained by 3, 3, 4. For n...
public static int maxProd(int n) { if (n == 2 || n == 3) return (n - 1); int res = 1; while (n > 4) { // Keep removing parts of size 3 while n is greater than 4 n -= 3; res *= 3; } return (n * res); }
[ "static long maxProduct(int[] arr, int n) {\n long maxproduct=arr[0], temp1=0, temp2=0;\n long mintillhere=arr[0], maxtillhere=arr[0];\n for(int i=1; i<n; i++){\n // if(arr[i] > 0){\n // product *= arr[i];\n // if(product > maxpro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the next intermediate stop which passengers should be routed to in order to reach the given destination. If the given stop is null or not in the table, then return null
public Stop nextStop(Stop destination){ if (destination == null || !neighbours.containsKey(destination)){ return null; } return neighbours.get(destination).getNext(); }
[ "public static String getStop(int stop) {\n switch(stop) {\n case 0: return \"In Route South P\";\n case 1: return \"In Route West\";\n case 2: return \"In Route SAC\";\n case 3: return \"In Route Chapin\";\n case 4: return \"Out Route South P\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns all reservations that have allocated at least one Resource or Person that is part of the allocatables array.
Reservation[] getReservations(Allocatable[] allocatables,Date start,Date end) throws RaplaException;
[ "public Reserved[] getAllAvailableReserved()\n {\n Reserved[] allReserves = getAdapter().getAllReserved();\n Item[] allItems = getAdapter().getAllItems();\n Reserved[] itemReservers = null;\n\n ArrayList<Reserved> temp = new ArrayList<Reserved>();\n if (allItems != null)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of RecordAction
public RecordAction(Recorder r) { rec = r; }
[ "LogAction createLogAction();", "Action createAction();", "final protected ActionRecord newActionRecord(StackOwner pActor, LocationSnapshot pLocationSnapshot, MoreData pMoreData) {\n\t\treturn (pMoreData == null)\n\t\t\t\t?new ActionRecord( pActor, pLocationSnapshot)\n\t\t\t\t:new Actio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates player points based on his or her remaining hand's tiles.
public int calculatePoints() { int pointsSum = 0; for (Tile tile : getHand()) { pointsSum += tile.getTotalValue(); } setPoints(pointsSum); return pointsSum; }
[ "private List<Player> calculatePoints()\n\t{\n\t\tthis.systemDataInput.printMessage(\"Calculating points...\");\n\t\t\n\t\tArrayList<Player> winningPlayers = new ArrayList<Player>();\n\t\tint maxPoints = 0;\n\t\tint maxBuilding = 0;\n\t\t\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\tint points = 0;\n\t\t\tint...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
extract the posted data from an incoming request, stripping away a piggybacked data
private String readPostedData(HttpRequest req, String sessionId, String uniqueId) throws IOException { // if the request was sent as application/x-www-form-urlencoded, we can get the decoded data // right away... // we do this because it appears that Safari likes to send the data back as // applic...
[ "protected String getPostData(HttpServletRequest request)\n throws ServletException, IOException {\n BufferedReader reader = new BufferedReader(request.getReader());\n StringBuffer strBuf = new StringBuffer();\n char[] c = new char[request.getContentLength()];\n reader.read(c)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the connectedStorages value for this Server.
public com.profitbricks.api.ws.ConnectedStorage[] getConnectedStorages() { return connectedStorages; }
[ "public List<StorageAccount> storageAccounts() {\n return this.storageAccounts;\n }", "public com.google.protobuf.ProtocolStringList getStorageLocationsList() {\n return storageLocations_;\n }", "public Collection<StorageManager> getStorageManagers();", "@RequestMapping(value = \"/storageFacilit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to convert an InputStream to an array of bytes (used in our case to recover image from SQL Blob)
public static byte[] toByteArray(InputStream is) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); int reads = is.read(); while (reads != -1) { baos.write(reads); reads = is.read(); } return baos.toByteArray(); }
[ "public byte[] getByteArrayFromInputStream(InputStream is) {\r\n\t\r\n\t\ttry {\r\n\t\t\tjava.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();\r\n\t\t\tjava.io.BufferedOutputStream bos = new java.io.BufferedOutputStream(\r\n\t\t\t\t\tbaos);\r\n\t\r\n\t\t\tint c = 0;\r\n\t\t\tbyte[] b = new byte[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the ShipyardController.
public ShipyardController() { super(SHIPYARD_VIEW_FILE); currentShip = player.getShip(); shipGroup = new ToggleGroup(); fillLabels(); buildShipsList(); }
[ "public HandController(SessionController parent) {\n\tinitComponents();\n\t\n\tthis.sessionController = parent;\n\t\n\tthis.hand = new Hand(this);\n }", "public ShelterListController() {\n this(\"\", true, true, true, true, true, true);\n }", "public ShooterSubsystem() {\n super(new PIDControlle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the Product Label Accordion
public synchronized WebElement ProductInfomationAccordionLabel() throws Exception { return utils.findElementByLocator(driver, "PDP_ProductInfomationAccordionLabel", "| PDP:Product Infomation Accordion Label not present"); }
[ "public String getProductLabel(){\n return productLabel.getText().trim();\n }", "private RLabel getProductLabel() {\n if (productLabel == null) {\n productLabel = new RLabel();\n productLabel.setText(\"<%= ivy.cms.co(\\\"/Dialogs/about/product\\\") %>\");\n productLabel.setStylePropert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Aquires a Topics [] from JSONArray
public static List<Topic> Topics(JSONArray topicsJSON, String projectId){ List<Topic> topics = new ArrayList<>(); for(int i = 0; i < topicsJSON.length(); i++){ try { topics.add(new Topic(topicsJSON.getJSONObject(i), projectId)); } catch (JSONException e) { ...
[ "public String[] getTopics();", "private void getTopics() {\n \t\tAsyncCallback<TopicData[]> callback = new AsyncCallback<TopicData[]>() {\n \n \t\t\t@Override\n \t\t\tpublic void onFailure(Throwable caught) {\n \t\t\t\tSystem.err.println(\"failed getting topics\");\n \n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpubli...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to save Requirement
@Override public ResponseEntity<Requirement> saveRequirement(Requirement requirement) { Requirement saveRequirement = new Requirement(); saveRequirement.setRequirementCode(requirement.getRequirementCode()); saveRequirement.setLanguage(requirement.getLanguage()); saveRequirement.setExperienceInYears(requirement...
[ "public StockSpecification saveStockSpecification(StockSpecification stockSpecification);", "public void saveRequirementModel(ArchERequirementModel requirementModel) throws ArchEException{\n\t try {\t \t\n\t\t\t// Begin unit of work (transaction == session) in Hibernate, which means\n\t \t// \t1) Open a ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstExpressionRelational__Group__0" $ANTLR start "rule__AstExpressionRelational__Group__0__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17808:1: rule__AstExpressionRelational__Group__0__Impl : ( ruleAstExpressionShift ) ;
public final void rule__AstExpressionRelational__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17812:1: ( ( ruleAstExpressionSh...
[ "public final void rule__AstExpressionShift__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17955:1: ( rule__AstExpressionS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtain user Default jsp for forwarding
public String getForwardUserDefaultJSP () { return getJSPbyId (JSPIdUserDefault) ;}
[ "public String getRedirectUserDefaultJSP () { return getRedirectJSPbyId (JSPIdUserDefault) ;}", "public String getForwardLoginJSP () { return getJSPbyId (JSPIdLogin) ; }", "public String getRdirectLoginJSP () { return getRedirectJSPbyId (JSPIdLogin) ; }", "public String getFullUrlLoginJSP () \n {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the appropriate action for a postdial char, but does not notify application. returns false if the character is invalid and should be ignored
private boolean processPostDialChar(char c) { if (PhoneNumberUtils.is12Key(c)) { mOwner.mCi.sendDtmf(c, mHandler.obtainMessage(EVENT_DTMF_DONE)); } else if (c == PhoneNumberUtils.PAUSE) { // From TS 22.101: // It continues... // Upon the called party a...
[ "public void onInvalidCharacter(char c) {\n \n }", "private void handleInput() {\r\n\t\tString input = this.input.getText();\r\n\t\tif (input.matches(\"[0-9A-Za-z]{1,2}\")) {\r\n\t\t\tthis.inChannel.write(input);\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"Incorrect Input Data.\");\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the profile entity associated with given googleId. If the profile does not exist, it tries to get the profile from the function 'getStudentProfileEntityForLegacyData'. TODO: update this function once legacy data have been ported over
private StudentProfile getStudentProfileEntityFromDb(String googleId) { Key childKey = KeyFactory.createKey(Account.class.getSimpleName(), googleId) .getChild(StudentProfile.class.getSimpleName(), googleId); try { StudentProfile profile = getPM().get...
[ "private StudentProfile getStudentProfileEntityForLegacyData (String googleId) {\n Key key = KeyFactory.createKey(Account.class.getSimpleName(), googleId);\n try {\n // This method is not testable as loading legacy data into \n // current database is restricted by new validity ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use JSONObject details to recreate the factions from the saved game
public void processFaction(JSONObject details) { String name = details.getString("name"); double wealth = details.getDouble("wealth"); double treasury = details.getDouble("treasury"); boolean allConquered = details.getBoolean("allConquered"); Faction faction = new Faction(...
[ "public void saveInput(JSONObject json) {\r\n\t\tif (json.containsKey(MsgType.clientId.toString())) {\r\n\t\t\tthis.clientId = Integer.parseInt((String) json.get(MsgType.clientId.toString()));\r\n\t\t}\r\n\r\n\t\tif (json.containsKey(MsgType.name.toString())) {\r\n\t\t\tsspName.set(\"\");\r\n\t\t\tsspName.set((Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert an object to BigDecimal object, supports String to BigDecimal Number to BigDecimal, return the given alternative object if the converted object is null else return the converted object. Support converting String or Numeric type to BigDecimal type.
public static BigDecimal toBigDecimal(Object obj, BigDecimal altVal) { return defaultObject(Conversion.convert(obj, BigDecimal.class), altVal); }
[ "protected BigDecimal convertObjectToBigDecimal(Object sourceObject) throws ConversionException {\r\n BigDecimal bigDecimal = null;\r\n\r\n try {\r\n if (sourceObject instanceof String) {\r\n bigDecimal = new BigDecimal((String)sourceObject);\r\n } else if (sourceO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the target X value.
public void setTargetX(int x) { modifyX = (x - nowX) / timeMillis; towardsX = x; timeElapsed = 0; }
[ "public void setTargetX(double x) {\r\n\t\ttargetX = x;\r\n\t}", "public void setX(double value) {\n this.X = value;\n }", "public void setX(double val) {\n xCoord = val;\n }", "public void setX(double x){\n this.x = x;\n }", "public void setX(double x){\n\t\tthis.xPos=x;\n\t}", "voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EArtifactType__NameAssignment_0" $ANTLR start "rule__EArtifactType__ArtifactAssignment_3" InternalAADMParser.g:24318:1: rule__EArtifactType__ArtifactAssignment_3 : ( ruleEArtifactTypeBody ) ;
public final void rule__EArtifactType__ArtifactAssignment_3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:24322:1: ( ( ruleEArtifactTypeBody ) ) // InternalAADMParser.g:24323:2: ( ruleEArtifactTypeBody ) { ...
[ "public final void rule__EArtifactType__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:7068:1: ( ( ( rule__EArtifactType__ArtifactAssignment_3 ) ) )\n // InternalAADMParser.g:7069:1: ( ( rule__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
outputDirPresenterImple.refreshDir("root", new MyStringCallBack(0x123, "null"));
@Override public void onRefreshBegin(PtrFrameLayout frame) { if(isInDir) { outputDirPresenterImple.queryFacesetDir(dirUrl, "imglist", currentDir, "output", new MyStringCallBack(0x456, currentDir)); }else { outputDirPresenterImple.refres...
[ "public void onNewDirLoaded(File dirFile);", "void directoryMappingChanged();", "public void projectWorkDirChanged() { }", "void renameDir(avro.commands.RenameDirCommand command, org.apache.avro.ipc.Callback<java.lang.String> callback) throws java.io.IOException;", "public static native void dirInsertFile(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets active login action token created later that given time
Optional<ActionToken> getActiveLoginActionTokenCreatedLaterThanGivenTime(Long userId, String key, Instant notOlderThan);
[ "long getAccessTokenIssuedTime();", "java.lang.String getManualAccessTokenExpirationTime();", "Duration getTokenExpiredIn();", "String getSessionToken();", "int getSignOnTime();", "@Test\n public void authtime1() {\n long requestTime = timeOffset + System.currentTimeMillis();\n TokenParam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method readVenueFile Read details from the file containing venues and adds it to the collection of venues
private void readVenueFile(String path) { FileIO fileIO = new FileIO(); fileIO.setFileName(path); String fileData = fileIO.readFile(); String[] data = fileData.split("\\n"); // split data by new line character for(int i = 0 ; i < data.length ; i++) { Strin...
[ "public void loadRecurringEventsFile(){\n\t\tFile recurring_events_file = new File(RECURRING_EVENTS_FILE_NAME);\n\n\t\ttry {\n\t\t\tFileReader file_reader = new FileReader(recurring_events_file);\n\t\t\tBufferedReader buffered_reader = new BufferedReader(file_reader);\n\n\t\t\tString next_line = \"\";\n\t\t\twhile...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of claspath entry paths to be scanned.
protected String[] getClasspathEntries() { return new String[0]; }
[ "public static Collection<String> getClassPathEntries() {\n String classPath = System.getProperty(\"java.class.path\", \"\");\n Collection<String> result = new ArrayList<String>();\n Collections.addAll(result, classPath.split(getClassPathSeparator()));\n return result;\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
== Gets the attribute storage.
public DelegatingAttributeStorage getAttributeStorage() { return attributeStorage; }
[ "public Storage getStorage()\r\n\t{\r\n\t\treturn storage;\r\n\t}", "public Storage storage() {\n return this.innerProperties() == null ? null : this.innerProperties().storage();\n }", "public Storage getStorage()\n {\n return __m_Storage;\n }", "protected final Stor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adding relation method.. This will add a new data to the list relation object..
public void addRelation(NotificationData notificationData) { try{ try{ //Save to database.. notificationData.save__db(); }catch (NoSuchMethodError e) { ...
[ "amdocs.iam.pd.webservices.productrelations.productlistinput.Relations addNewRelations();", "public void addRelation(PauseSubscription pauseSubscriptions) {\n try{\n try{\n\n //Save to database..\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for the calculated attribute KeyAttr.
public void setKeyAttr(Integer value) { setAttributeInternal(KEYATTR, value); }
[ "public void setAttribute(final String key, final String value) {\n if (value == null) {\n mAttributes.remove(key);\n } else {\n mAttributes.put(key, value);\n }\n }", "public CustomAttribute setCustomAttribute(final Object groupIdOrPath, final String key, final Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When the broadcast receiver receives a broadcast start the Alarm Service
@Override public void onReceive(Context context, Intent intent) { Log.d("MAD", "Received"); // Begin service Intent service1 = new Intent(context, MyAlarmService.class); context.startService(service1); }
[ "@Override\n public void onReceive(Context context, Intent intent) {\n String prayerName = intent.getStringExtra(EXTRA_PRAYER_NAME);\n long prayerTime = intent.getLongExtra(EXTRA_PRAYER_TIME, -1);\n\n boolean timePassed = (prayerTime != -1 && Math.abs(System.currentTimeMillis() - prayerTime) > FIVE_MINUTE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to build exception response entity
private ResponseEntity<Object> buildExceptionResponseEntity(final Exception exception, final HttpStatus status, final WebRequest request, final List<String> errors) { final Map<String, Object> body = new LinkedHashMap<>(); final String path...
[ "private void buildException() {\n if (exceptionDetails == null) {\n if (getCmfErrorCode() == null || getCmfErrorCode().equals(\"\")) {\n setCmfErrorCode(\"ERR-0000\");\n }\n String message = null;\n propUtil = PropertiesUtil.getInstanceof(domain, \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column organizationreportdetails.schoolyear
public Long getSchoolYear() { return schoolYear; }
[ "public Integer getSchoolYear() {\r\n\t\treturn schoolYear;\r\n\t}", "public java.lang.String getStudent_schoolYear() {\n\t\treturn _primarySchoolStudent.getStudent_schoolYear();\n\t}", "public void setSchoolYear(Long schoolYear) {\n\t\tthis.schoolYear = schoolYear;\n\t}", "public void setSchoolYear(Integer s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
StringySuperArray data1 = new StringySuperArray();
public static void main(String[] args) { StringySuperArray data = new StringySuperArray(5); //System.out.println(data1.toStringDebug()); System.out.println(data.toStringDebug()); // data1.add("hi"); //data.add("hi"); int i = 0; while(i < 26){ data.add(""+(char)('A'+i%26)); //data1.a...
[ "public MyArray() {\n this.dataArray = new String[0];\n }", "private static void createMultipleDataTypeArray() {\n Object[] array = {\"adas\", \"asd\", \"wer\", 1, 2.5};\n System.out.println(Arrays.toString(array));\n }", "public StringData1() {\n }", "public SuperArray(int size)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Simple constructor which takes in a start and finish position for a move.
public Move(Position startPosition, Position endPosition) { this.start = startPosition; this.end = endPosition; }
[ "public Move(Position start, Position end) {\n this.start = start;\n this.end = end;\n }", "Moves(String nameOfShape, int startTime, int endTime,\n Point2D startingPoint, Point2D endingPoint) {\n super(nameOfShape, startTime, endTime);\n this.startingPoint = startingPoint;\n this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updates the events that are given to mScheduler
@Override public void onChanged(List<Event> events) { if(mScheduler == null){ mScheduler = new Scheduler(events, Calendar.getInstance(), null); } else mScheduler.setEvents(events); }
[ "private void updateEvents() {\n eventListModel.clear();\n for (Event event: world.getEvents()) {\n eventListModel.addElement(event);\n }\n updateTable();\n }", "public void updateEvents(){\n ec.getUsers();\n ec.getMyEvents(userEmail, userPass);\n ec....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
process msgs from the nfc tag
public void processMsg(NdefMessage msg){ //extract web server address and port from the message webServerAddr_ = new String(msg.getRecords()[0].getPayload()); String restaurant_id_string = new String(msg.getRecords()[1].getPayload()); restaurant_name_ = new String(msg.getRecords()[2]....
[ "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n String s = new String(msg.getRecords()[0].getPayload());\n nfcTagCode = s.substring(3);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "function_call" src/main/java/com/tinkerpop/gremlin/compiler/GremlinEvaluator.g:475:1: function_call returns [Atom value] : ^( FUNC_CALL ^( FUNC_NAME ^( NS ns= IDENTIFIER ) ^( NAME fn_name= IDENTIFIER ) ) ^( ARGS ( ^( ARG st= statement ) ) ) ) ;
public final GremlinEvaluator.function_call_return function_call() throws RecognitionException { GremlinEvaluator.function_call_return retval = new GremlinEvaluator.function_call_return(); retval.start = input.LT(1); CommonTree root_0 = null; CommonTree _first_0 = null; CommonT...
[ "public final CliParser.functionCall_return functionCall() throws RecognitionException {\n CliParser.functionCall_return retval = new CliParser.functionCall_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token functionName=null;\n Token char_literal234=n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Insert Result Type'.
InsertResultType createInsertResultType();
[ "InsertType createInsertType();", "public ActionResultsType getInsertResults() {\n return insertResults;\n }", "T create(ResultSet resultset) throws Exception;", "public abstract InsertQuery toInsertQuery(Database database, T object);", "int insert(SearchResult searchResult);", "org.roylance.yao...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "nb" $ANTLR start "nm" C:\\Users\\Cavicchio\\workspace\\InterDepAdjStructure\\newgrammar\\JCB_tree.g:140:1: nm : INT ;
public final void nm() throws RecognitionException { Token INT3=null; try { // C:\\Users\\Cavicchio\\workspace\\InterDepAdjStructure\\newgrammar\\JCB_tree.g:140:3: ( INT ) // C:\\Users\\Cavicchio\\workspace\\InterDepAdjStructure\\newgrammar\\JCB_tree.g:140:5: INT { ...
[ "public final void nb() throws RecognitionException {\n Token INT2=null;\n\n try {\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB_tree.g:128:3: ( INT )\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on all elements on the list Only the clickable elements are clicked
@Override FluentList<E> click();
[ "public void clickAll(List<WebElement> elements, boolean select) {\n\n for(WebElement element : elements) {\n if(element.isEnabled() && element.isSelected()!=select) {\n element.click();\n }\n }\n }", "IWebElementWrapper click();", "public void click(){\n\t\t\n\tfor(MouseListener m: list...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the transformer that controls how a file name is stored.
public MemoryFileSystemBuilder setStoreTransformer(StringTransformer storeTransformer) { Objects.requireNonNull(storeTransformer); this.storeTransformer = storeTransformer; return this; }
[ "public void setTransformer(final Function<String, String> transformer) {\n Ensure.that(transformer).isNotNull();\n\n this.transformer = transformer;\n }", "public void setTransformer(IndexTransformer tf) {\n\t\ttransformer = tf;\n\t}", "public void setFileName (String FileName);", "public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a connection to a specific social network using loaded properties.
public static AbstractSocialConnection createConnection(Properties pProperties){ AbstractSocialConnection socConn = null; String strSocDataSource = pProperties.getProperty(SOCIAL_DATA_SOURCE); if (pProperties != null && strSocDataSource != null && !strSocDataSource.equals("")){ /** Creating a Twitter ...
[ "public static AbstractSocialConnection createConnection(Properties pProperties, String pDataSource){\n pProperties.put(SOCIAL_DATA_SOURCE, pDataSource);\n return createConnection(pProperties);\n }", "WithCreate withNetworkProfile(LabNetworkProfile networkProfile);", "ShareNetwork create(ShareNetworkCrea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set method to set fixed amount value to new value
public void setFixedAmount(double newFixedAmount) { fixedAmount = newFixedAmount; }
[ "public void setMoney(int newVal);", "void setAmount(double newAmount) {\n this.amount = newAmount;\n }", "public void setFixedAmount(double fixedAmount) {\r\n // needs validation\r\n this.fixedAmount = fixedAmount;\r\n setDiscountDesc();\r\n }", "public void setAmount(double...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by demetribairaktaris on 3/23/16. Interface for any state the timer can be in. Implementing classes will also be listening to button events and ticks
public interface TimerState extends TimerUIListener, OnTickListener{ void updateView(); public String getState(); }
[ "public void updateState() {\n\t\tfloat uptime = .05f;\t\t\t// Amount of Time the up animation is performed\n\t\tfloat downtime = .35f;\t\t\t// Amount of Time the down animation is performed\n\t\tColor colorUp = Color.YELLOW;\t// Color for when a value is increased\n\t\tColor colorDown = Color.RED;\t// Color for wh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a tuition reimbursement form to the system
void addTuitionForm(TuitionReimbursementForm form);
[ "void updateTuitionForm(TuitionReimbursementForm form);", "TuitionReimbursementForm getTuitionForm(String issuer, UUID id);", "public void payTuition() {\n Finances finances = new Finances();\n finances.viewDebit(this.tuitionBalance);\n ScannerObj scannerObj = ScannerObj.getInstance();\n int payment...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
topBar is the ui element set to the top of the UI. topBar holds the GameMenuBar.
private Pane topBar() { HBox topBar = new HBox(new GameMenuBar(player, gameCore)); return topBar; }
[ "private void createTopBar() {\n GameTopBar topBar = new GameTopBar(panel, \"Settings\");\n add(topBar, BorderLayout.PAGE_START);\n }", "private Node setTopPanel() {\n topBar = new MenuBar();\n fileDialog = new FileChooser();\n Menu optionOne = new Menu(\"File\");\n\n optio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Drop a table or view
public static void drop(String tableName) throws SQLException { Connection con = null; Statement st = null; ResultSet rs = null; try { con = ConnectionPool.getConnection(); st = con.createStatement(); rs = st.executeQuery("select table_type...
[ "public void doDropTable();", "public void drop(ITable table);", "void drop(StructuredTableId tableId) throws IOException;", "public void dropView(SchemaTableName viewName)\n {\n metaManager.deleteViewMetadata(viewName);\n }", "private void handleDelDbButton() {\n sqlUtility.dropTable();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates if a processing chain is constructed for the channel and that the processing chain is currently processing.
private boolean isProcessing(Channel channel) { return mProcessingChains.containsKey(channel.getChannelID()) && mProcessingChains.get(channel.getChannelID()).isProcessing(); }
[ "public Boolean isProcessing() {\n return processing;\n }", "public boolean isProcessing() {\n return state == ClientState.PROCESSING;\n }", "public boolean isProcessing()\r\n {\r\n return (getActiveCount() > 0) || hasWaitingTasks();\r\n }", "protected boolean buildProcessingPipelin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
wrapsections wrap within &lt;![ ... ]&gt; section tags
public void setWrapSection(boolean wrapSection) { configuration.wrapSection = wrapSection; }
[ "public boolean getWrapSection()\n {\n return configuration.wrapSection;\n }", "public void setWrapStatements(boolean isWrap)\n {\n _isWrapStatements = isWrap;\n }", "public StickSection ()\r\n {\r\n }", "private void removeNonChosenSections()\n\t{\n\t\tSectionModel[] sM = templateM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
trigger the jackPotBonus that the game has
public void triggerJackPotBonus() { this.jackPotBonus.trigger(this); }
[ "public void triggerGetExtraBallBonus(){\n this.extraBallBonus.trigger(this);\n }", "@Override\n public void activatePowerUp() {\n myBalls.get(0).ballPowerUp(MAKE_FIERY_BALL);\n }", "public void activateBonusGame() {\n shooterGamePresenter.activateBonusGame();\n }", "@EventHandler\r\n \tpub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for name. The new value is set only if compareTo() says it is different, or if one of either the new value or the current value is null. In case the new value is different, it is set and the field is marked as 'modified'.
public void setName(String newVal) { if ((newVal != null && this.name != null && (newVal.compareTo(this.name) == 0)) || (newVal == null && this.name == null && name_is_initialized)) { return; } this.name = newVal; name_is_modified = true; name_is_init...
[ "public void setName(String name) {\n if (name != this.name\n || (name != null && !name.equals(this.name))) {\n String oldName = this.name;\n this.name = name;\n this.propertyChangeSupport.firePropertyChange(Property.NAME.toString(), oldName, name);\n }\n }", "public void setNA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Template: Same as class + Parameters: ...that... ABST Is this tree the same as that tree?
abstract boolean sameTree(ABST<T> that);
[ "abstract boolean sameNode(Node<T> that);", "abstract boolean sameLeaf(Leaf<T> that);", "abstract boolean sameDataNode(Node<T> that);", "abstract boolean sameDataLeaf(Leaf<T> that);", "public boolean isTree(Node any);", "public boolean sameTree(ABST<T> that) {\n return that.sameLeaf(this);\n }", "AB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return Next Episode for TVSerie
@Override public void nextEpisode() { mPlaybackActionCallback.onLoadNextEpisode(); }
[ "public Episode getEpisode(int number);", "public Viseme getNextViseme();", "@Test\n public void Sixth_VideoNext() throws UiObjectNotFoundException {\n\n for (int i = 0; i < execute_times; i++){\n makeVideoControlVisible(); //確定控件存在\n UiObject nextObj = new UiObject(new UiSelect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes buttons for HomeView
private void initButtons() { findViewById(R.id.home_profileBtn).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent profile = new Intent(HomeView.this, ProfileView.class); profile.putExtra("profile", user); ...
[ "public void setupButtons() {\n\t\tCustomButton cb1 = new CustomButton(homeButton, \"home\");\n\t\tCustomButton cb2 = new CustomButton(backButton, \"back\");\n\t}", "private void initializeButtons() {\n btnBack.toFront();\n btnBack.setOnAction(event -> {\n MenuController.show();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'keyFilePath'
@Test public void keyFilePathTest() { // TODO: test keyFilePath }
[ "@Test\n public void keyFileTest()throws IOException\n {\n \n boolean publc= false;\n boolean privat=false;\n File priv=new File(\"private.txt\");\n File pub= new File(\"public.txt\");\n \n if(priv.isFile())\n privat=true;\n \n if(pub.isFile())\n publc=true;\n \n assertT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unions the given bds rectangle into the given base rectangle; since the rectangle may get created, it always returns r (if not null) or the new rectangle.
protected Rectangle unionBounds(Rectangle r, Rectangle bds) { if (bds != null) { if (r == null) { r = new Rectangle(bds); } else { r.union(bds); } } return r; }
[ "public Rectangle union(Rectangle rect)\r\n\t{\r\n\t\tdouble left = x < rect.x ? x : rect.x;\r\n\t\tdouble top = y < rect.y ? y : rect.y;\r\n\t\tdouble lhs = x + width;\r\n\t\tdouble rhs = rect.x + rect.width;\r\n\t\tdouble right = lhs > rhs ? lhs : rhs;\r\n\t\tlhs = y + height;\r\n\t\trhs = rect.y + rect.height;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column CTSTRS_HISTORY.DATE_REVERSED
public Date getDATE_REVERSED() { return DATE_REVERSED; }
[ "public Date getDATE_REVERSED()\r\n {\r\n\treturn DATE_REVERSED;\r\n }", "public Timestamp getDateReval() {\n\t\treturn (Timestamp) get_Value(\"DateReval\");\n\t}", "public Date getDATE_RENEWED() {\r\n return DATE_RENEWED;\r\n }", "public void setDATE_REVERSED(Date DATE_REVERSED) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the hasItMovedYet flag
public void setHasItMovedYet(boolean x) { hasItMovedYet = x; }
[ "public void sethasMoved(boolean hasMoved) {\n\t\tthis.hasMoved = hasMoved;\n\t}", "public void itMoved()\n {\n this.hasAlreadyMove = true;\n }", "public void setMoved(boolean b)\r\n {\r\n moved = b;\r\n }", "public void moved(){\r\n\t\tisMoved = true;\r\n\t}", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For a given account id, return a service proxy if applicable, or null.
public static EmailServiceProxy getServiceForAccount(Context context, IEmailServiceCallback callback, long accountId) { String protocol = Account.getProtocol(context, accountId); if (protocol.equals(HostAuth.SCHEME_IMAP)) { return getImapService(context, callback); } e...
[ "public Proxy getProxy(String id) {\n\t\treturn findProxy(proxy -> proxy.getId().equals(id), true);\n\t}", "protected AbstractProxy getProxy(int id) throws ProxyNotFound\n {\n final Integer _id = new Integer(id);\n\n AbstractProxy _servant;\n\n synchronized (modifyProxiesLock_)\n {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method saves order.
void saveOrder(Order order);
[ "public void saveOrderLine(OrderLine orderline_1);", "public void updateOrder();", "void saveDriversToOrder(List<Driver> drivers, Order order);", "public void save(BackOrder bo);", "@Override\n\tpublic Order saveOrder(Order order) {SessionFactory sessionFactory = HibernateUtil.getSessionFactory();\n//\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }