query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Sets the number of pivotal elements in this file.
private void setNumberOfPivotalElements(final int numPivotElem) { this.numberOfPivotalElements = numPivotElem; }
[ "@Override\n\tpublic void setNumberOfElements(int value) {\n\t\t\n\t\tnelm = value;\n\t}", "void setTotalProductCount(int totalProductCount);", "void xsetTotalProductCount(org.apache.xmlbeans.XmlInt totalProductCount);", "void xsetNumberOfEntries(org.apache.xmlbeans.XmlInteger numberOfEntries);", "void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to paint the contents of this layer using a given painter. The default implementation ignores the painter.
public void paintContents(Graphics g, FigPainter painter) { paintContents(g); }
[ "protected abstract void paint(Painter painter);", "@Override\n public void paint(Painter painter)\n {\n // Drawing the outline of the CarrierShape\n painter.drawRect(_x,_y,_width,_height);\n // Translating the origin to x and y point to the top left corner\n // of the CarrierSha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if this hand is two pairs.
private boolean isTwoPair() { boolean early = hand[0].getFace() == hand[1].getFace() && hand[2].getFace() == hand[3].getFace(); boolean split = hand[0].getFace() == hand[1].getFace() && hand[3].getFace() == hand[4].getFace(); boolean late = hand[1]...
[ "public boolean isTwoPair() {\r\n\t\tint firstPairIdx = findPairStartingAt(0);\r\n\t\tint second_pairIdx = findPairStartingAt(firstPairIdx+2);\r\n\t\treturn ((firstPairIdx != -1) &&\r\n\t\t\t\t(second_pairIdx != -1) &&\r\n\t\t\t\t!isFourOfAKind() &&\r\n\t\t\t\t!isFullHouse());\r\n\t}", "public boolean isTwoPair()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the string as a CSS file
public void saveCSS(String name){ File file = new File(_savedCSSFilePath); //Nothing is saved to file when string is empty if (name != null && !name.isEmpty()) { //Writing to file try { FileWriter f2 = new FileWriter(file, false); f2.write(...
[ "public void saveTheme(){\n final String FILENAME = \"src/userinterface/style/themes/custom.css\";\n\n String css =\n \".parent { -fx-background-color: \" + backgroundColor + \";}\\n\"\n + \".infolabel, .button { -fx-text-fill: \" + textColor ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create remote window animation from the currently running app to the overview panel.
@Override public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] targetCompats) { if (mRecentsView != null) { mRecentsView.setRunningTaskIconScaledDown(true); } AnimatorSet anim = new AnimatorSet(); anim.addListener(new AnimationSuccessListener() { ...
[ "private void animateWindow() {\n AnimationTimer windowTimer = new AnimationTimer() {\n private long lastTime = 0;\n\n @Override\n public void handle(long now) {\n if (lastTime == 0) {\n lastTime = now;\n return;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Removes the entry with configuration string config from the dictionary. Will throw a DictionaryException (see below) if the configuration is not in the dictionary.
public void remove(String config) throws DictionaryException { int searchNum = hash(config); //uses the hash function to store the hash index for the key we want to remove Node<Configuration> removeMe = dict[searchNum]; if(removeMe == null) { //if the key is empty or non existence throw new DictionaryExcepti...
[ "public void remove(String config) throws DictionaryException {\t\t\r\n\t\t// Calculate the position that the string configuration would be located using the hash function \r\n\t\tint position = createPosition(config);\r\n\t\tNode node;\r\n\t\tboolean check = true;\r\n\t\t// If there are no nodes at the position th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get access to the packages list
public ArrayList<Package> getPackages() { return packages; }
[ "@Override\n\tpublic List<String> getListPackages() {\n\t\tlogger.log(Level.INFO, \"PackMan-CVMFS: Getting list of packages \");\n\n\t\tif (this.getHavePath()) {\n\t\t\tfinal String listPackages = SystemCommand.bash(alienv_bin + \" q --packman\").stdout;\n\t\t\treturn Arrays.asList(listPackages.split(\"\\n\"));\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a list of valid image extensions
static public List<String> getValidImageExtensions() { final List<String> extensions = new ArrayList<>(); extensions.add(".jpg"); extensions.add(".jpeg"); extensions.add(".png"); extensions.add(".gif"); return extensions; }
[ "public Set<String> getSupportedFileExtensions();", "abstract protected String[] getRequiredExtensionNames();", "Set<String> getAllowedExtensions();", "String[] getFileExtensions();", "static public List<String> getInvalidPageExtensions() {\r\n\t\tfinal List<String> invalidSuffixes = new ArrayList<>();\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field askPrice is set (has been assigned a value) and false otherwise
public boolean isSetAskPrice() { return EncodingUtils.testBit(__isset_bitfield, __ASKPRICE_ISSET_ID); }
[ "public boolean isSetPrice() {\n return this.price != null;\n }", "public boolean isSetPrice() {\n return EncodingUtils.testBit(__isset_bitfield, __PRICE_ISSET_ID);\n }", "public boolean isSetPayPrice() {\n return EncodingUtils.testBit(__isset_bitfield, __PAYPRICE_ISSET_ID);\n }", "public boolean ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Employee Setters and Getters sets an employee as the instance variable selectedEmployee
public void setEmployee(int idNum) { try { this.selectedEmployee = this.selectedEmployee.getEmployee(idNum); } catch (Exception anExcept) { System.out.print("setSelectedEployee Error: " + anExcept); } }
[ "public void setEmployee(Employee employee) {\n this.employee = employee;\n }", "public void setEmployee1(Employee e) {\n employee1 = e;\n }", "public void setEmployee3(Employee e) {\n employee3 = e;\n }", "public void setEmployee2(Employee e) {\n employee2 = e;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method: getAllWeaponData Purpose: Get all of the weapon data.
public ArrayList<String> getAllWeaponData() throws SQLException { Weapon wep = new Weapon(); ArrayList<Weapon> weapons = null; weapons = wep.getAllWeapons(); ArrayList<String> wepStrs = new ArrayList<String>(); for (Weapon weapon : weapons) { wepStrs.add(weapon.toString()); } return wepStrs; }
[ "public static List<Weapon> getAllWeapons() {\n\t\treturn allWeapons;\n\t}", "public ArrayList<Weapon> getAllWeapons() {\n\t\tArrayList<Weapon> toReturn = new ArrayList<Weapon>(weapons);\n\t\treturn toReturn;\n\t}", "public ArrayList<String> getAllWeapons(){\n \n ArrayList<String> weapons = new Arr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
write edge message (async)
@Override public EdgeResult write(EdgeMessage msg) throws Exception { writeAsyncValue(getNodeInstance(), msg).thenAccept(status -> { Optional.ofNullable(status).ifPresent(value -> { EdgeEndpointInfo epInfo = new EdgeEndpointInfo.Builder(msg.getEdgeEndpointInfo().getEndpointUri()) ...
[ "public void writeMessage(Message message) throws IOException;", "@Override\r\n\tpublic void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {\r\n\t\tReferenceCountUtil.release(msg);\t// directly discard all writen data.\r\n\t\tpromise.setSuccess();\t// !!! notify the Channel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the Machine for searched type
public String getProdMachine(String mType, int nr) { int cnt = 0; for (String s : fc.machineMap.keySet()) //iterate through machines { Cell cell = fc.machineMap.get(s); //get Cell of act. machine if (cell.getTeam() == JobController.TEAM)//one of our Cell? { String...
[ "MachineType getType();", "java.lang.String getMachineType();", "public String getMachineType() {\n return machineType;\n }", "Computer getComputer(ComputerType type, String model, String cores, String memory, String disk);", "public String getMachineType() {\n return machineType;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get performance counter 0.
public static int performanceCountGet() { return 0; }
[ "public Counter() {\r\n value = 0;\r\n }", "public static void setCounterToZero() {\n\t\tcounter = 0;\n\t}", "private void zeroCounters() {\n\t\tfinal String COUNT_ZERO = \"count zero\";\n\t\tthis.vme.sendMessage(COUNT_ZERO);\n\t}", "public Counter() {\n this.count = 0;\n }", "long getZeroCoun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns array of references of sensor object. array is indexes by sensor indexes
public synchronized Sensor[] getSensorArray(){ return sensorArray; }
[ "protected Sensor[] getSensorValues() { return sensors; }", "public int[] getIndexReference(){\r\n \treturn this.index;\r\n \t}", "IrSeekerIndividualSensor[] getIndividualSensors();", "public List<Sensor> getSensorList()\n {\n return new ArrayList<>(sensors.values());\n }", "@Overri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the copy action.
public Action getCopyAction () { return copyAction; }
[ "public Action getCopyAction() {\n return copyAction;\n }", "public Action getPasteAction () {\n\t\treturn pasteAction;\n\t}", "public CopyAction getUserDatumCopyAction(Object key) {\n\t\treturn props.getUserDatumCopyAction(key);\n\t}", "public Action getPasteAction() {\n return pasteAction;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hace el llamado al mundo para verificar una interseccion con la moneda.
public void verificarInterseccionMoneda() { if(juego.atrapoMoneda()) { System.out.println("Atrapo"); playSound("data/coin.wav"); } }
[ "private void verificar() {\n if ( txtDocumento.getText().length() < conf.getMinDocIdentidad() ) {\n Dialog.inform(\"¡ Error de búsqueda, ingrese como minimo \" + conf.getMinDocIdentidad() + \" caracteres.\");\n return ;\n }\n progress.open();\n progress.setTitle(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether or not this rule is a lexical rule or not
public boolean isLexical(){ return lexical; }
[ "public boolean isEpsilonRule() {\n return Character.isUpperCase(this.keyword.charAt(0)) && children.isEmpty();\n }", "boolean isImportedRule(Rule rule);", "private boolean grammar() {\r\n return skip() && rules() && MARK(END_OF_TEXT) && EOT();\r\n }", "public boolean containsAllTerminalsO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ParameterAssign__Group_2__0" $ANTLR start "rule__ParameterAssign__Group_2__0__Impl" InternalDsl.g:15485:1: rule__ParameterAssign__Group_2__0__Impl : ( ',' ) ;
public final void rule__ParameterAssign__Group_2__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:15489:1: ( ( ',' ) ) // InternalDsl.g:15490:1: ( ',' ) { // InternalDsl.g:15490:1: ( ',' ) ...
[ "public final void rule__ParameterAssign__Group_2__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:15504:1: ( rule__ParameterAssign__Group_2__1__Impl )\n // InternalDsl.g:15505:2: rule__ParameterAssign__Group_2__1_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
StoredInfoType configuration. .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1;
public Builder setConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { if (configBuilder_ == null) { if (value == null) { throw new NullPointerException(); } config_ = value; } else { configBuilder_.setMessage(value); } bitField0_ |= 0x00000001...
[ "@java.lang.Override\n public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() {\n return config_ == null\n ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance()\n : config_;\n }", "@java.lang.Override\n public com.google.privacy.dlp.v2.StoredInfoTyp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for the calculated attribute DistributionStatus
public String getDistributionStatus() { return (String)getAttributeInternal(DISTRIBUTIONSTATUS); }
[ "public Integer getAttrStatus() {\n return attrStatus;\n }", "public String getStatus() {\n return (String)getAttributeInternal(STATUS);\n }", "int getDeliveryStatusValue();", "public Number getDistributionAmount() {\n return (Number)getAttributeInternal(DISTRIBUTIONAMOUNT);\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that FSNamesystemclear clears all leases.
@Test public void testFSNamespaceClearLeases() throws Exception { Configuration conf = new HdfsConfiguration(); File nameDir = new File(MiniDFSCluster.getBaseDirectory(), "name"); conf.set(DFS_NAMENODE_NAME_DIR_KEY, nameDir.getAbsolutePath()); NameNode.initMetrics(conf, NamenodeRole.NAMENODE); DF...
[ "public void simClearSystemCollection() {\n systemColl.clear();\n }", "public void clear() {\n\t\tsystems.clear();\n\t}", "public void clear() {\n usedNames.clear();\n }", "public static void resetSystem() {\n DeltaSystem.init();\n DPS.init();\n LocalServer.releaseAll();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the 'unitaryDiagrams' from 'Zone'
public void setUnitaryDiagrams(java.util.List unitaryDiagrams);
[ "public java.util.List getUnitaryDiagrams();", "private void setZones() {\r\n\t\ttry {\r\n\t\t\tcanvasPane.setSprinklerAttributesSet(false);\r\n\t\t\tcanvasPane.setStateOfCanvasUse(Use.ZONEEDITING);\r\n\t\t\tcanvasPane.selectedSprinklerShapes.clear();\r\n\t\t\tnumberOfSelectedHeadsText.setText(\"0\");\r\n\t\t\tfl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ reads in the entire page, stripping it from all white space
private String readToEndStripped() throws IOException { StringBuffer sb = new StringBuffer(); String raw = readToEndRaw(); StringBuffer source = new StringBuffer(raw); for (int i = 0; i < source.length(); i++) { char c = source.charAt(i); if (!isWhiteSpace(c)) sb.append(c); } ret...
[ "private String readWebpage(PrintWriter writer) {\n\n\t\t// create new userAgent (headless browser)\n\t\tUserAgent userAgent = new UserAgent();\n\n\t\t// visit a url\n\t\ttry {\n\t\t\tuserAgent.visit(url);\n\n\t\t\ttitle = userAgent.doc.findFirst(\"<title>\").getText();\n\n\t\t\t// prints all text with \"span\" hea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the player's data in the sql database.
public void updatePlayerData() { final UUID uuid = player.getUniqueId(); if (!(playerExists())) createPlayer(); try (PreparedStatement statement = getConnection().prepareStatement( "UPDATE " + table + " SET Nickname=?,Kills=?," + "FinalKills=?,Deaths=?,Rec...
[ "void updatePlayerData(PlayerData playerData);", "@Override\n public void changeData(Player player) {\n String command = F_BASE + \"update_player_inf(\\'\" + player.getId_code() + \"\\', \\'\" + player.getName() + \"\\', \\'\" + player.getStatus() + \"\\');\";\n openConnection();\n try {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set EventID for this event.
public void setEventID(int eventID) { EventID = eventID; }
[ "public void setEventID(int value) {\r\n this.eventID = value;\r\n }", "public void setEventID(String eventID){\n this.eventID = eventID;\n }", "@Override\n\tpublic void setEventId(long eventId) {\n\t\t_events.setEventId(eventId);\n\t}", "public void setEventId(Number value) {\n set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This constructor is used to get a power law degree distribution with given length, average degree, and gammma i.e p(k) = Constpow(k,gamma)
public QDistribution_PowerLaw(double avg_degree, double gamma) { length = calculateDistLength(gamma, avg_degree)-1; /*Length is from QDist, however calculated for pDist. Hence the -1 */ double epsilon = (1.0/ (zeta(gamma, length))); pDist = new double[length+1]; pDist[0] = 0; //pDist[1] = 0; /* Rem...
[ "public QDistribution_PowerLaw(double avg_degree)\n\t{\n\t\t\tdouble gamma = 1;\n\t\t\tlength = calculateDistLength(gamma, avg_degree)-1; /*Length is from QDist, however calculated for pDist. Hence the -1 */\n\t\t\tdouble epsilon = (1.0/ (zeta(gamma, length))); \n\t\t\tpDist = new double[length+1];\n\t\t\tpDist[0] ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns or sets the time in miliseconds for the communication line break signal Getter method for the COM property "BreakLength"
@DISPID(17) //= 0x11. The runtime will prefer the VTID if present @VTID(40) short breakLength();
[ "public int getTimeLength() {\r\n return timeLength;\r\n }", "@DISPID(17) //= 0x11. The runtime will prefer the VTID if present\n @VTID(39)\n void breakLength(\n short retval);", "public long lengthInMilli() {\n return this.length.milliSec();\n }", "public AvailabilityPeriod g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the click is misinterpreted as a long press, do a pressBack() to dismiss a context menu.
private static GeneralClickAction clickAndPressBackIfAccidentallyLongClicked() { return new GeneralClickAction( Tap.SINGLE, GeneralLocation.CENTER, Press.FINGER, ViewActions.pressBack()); }
[ "public void cancelLongPress() { throw new RuntimeException(\"Stub!\"); }", "void longClick();", "public void rightClick();", "public int rightClick()\r\n {\r\n if(!pressed)\r\n {\r\n switch( flag )\r\n {\r\n // flag a square with a 'flag'\r\n case 0:\r\n flag = 1;\r\n this.setIcon(FLAG);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invokes the actionDataRequired event.
public void askActionData() { ((Event<RemoteActionsHandler, RemoteAction.Data>)actionDataRequired).invoke(this, getActionData()); }
[ "public void ifRequired(Runnable action) {\n if (required) {\n action.run();\n }\n }", "public boolean getActionRequired() {\n return actionRequired;\n }", "public void setActionRequired(boolean tmp) {\n this.actionRequired = tmp;\n }", "public void authenicateDeviceIfRequi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draws an outlined roundcornered rectangle using this graphics context's current color. The left and right edges of the rectangle are at x and x&nbsp;+&nbsp;width, respectively. The top and bottom edges of the rectangle are at y and y&nbsp;+&nbsp;height.
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { // System.out.println("drawRoundRect"); }
[ "public void drawRoundRect(int x, int y, int width, int height, int arcWidth,\r\n int arcHeight) {\r\n }", "public void strokeRoundRectangle(int x, int y, int width, int height, int radius);", "public void drawRect(int x, int y, int width, int height, int color);", "public fina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Update status of current booking For : Accept , Deny , Cancel
@POST("/booking/set_status") Call<ResponseViews.UpdateBookingStatusResponse> updateBookingStatusOfCurrentBooking(@Query("id") int ownerId, @Query("token") String token, @Query("booking_id") long bookingId, @Query("status") int statusVal,@Query("reason") String message, @Query("who") int who);
[ "@POST(\"/booking/set_notify_status\")\n Call<ResponseViews.UpdateBookingStatusResponse> updateNotifyStatusOfCurrentBooking(@Query(\"id\") int ownerId, @Query(\"token\") String token, @Query(\"booking_id\") long bookingId,\n @...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'SPCA_CAT' field.
public java.lang.CharSequence getSPCACAT() { return SPCA_CAT; }
[ "public java.lang.CharSequence getSPCACAT() {\n return SPCA_CAT;\n }", "public void setSPCACAT(java.lang.CharSequence value) {\n this.SPCA_CAT = value;\n }", "public String getCatName() {\n return (String)getAttributeInternal(CATNAME);\n }", "public String getCatCode() {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column TRAMITE.TDMVD_REGREQTUPA.N_NUMGRUPO
public Short getnNumgrupo() { return nNumgrupo; }
[ "public java.lang.String getGrnNo () {\n\t\treturn grnNo;\n\t}", "public String getGrupoNRC() {\n return grupoNRC;\n }", "public int getNUMRGSTRO() {\n return numrgstro;\n }", "public int getRegNum() {\n return regNum;\n }", "public int getGiorno() {\r\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Seats a walkin an "empty" table.
public boolean fillEmptyTable() { if(isEmpty()) { System.err.println("The queue is empty! All of the walk-ins have been seated!"); return false; } else { WalkIn out = first.getData(); first = first.getNextNode(); if(first == null) last = null; size...
[ "void visit(final Table table);", "void shootAtEmptySea(int row, int column) {\n\t\tthis.hit[0] = true;\n\t}", "public void Reset ( ) \r\n\t{\r\n\t\tcurrentCol = size / 2;\r\n\t\tcurrentRow = size / 2;\r\n\t\t\r\n\t\tint totalDistance;\r\n\t\tdo {\r\n\t\tint dist = size*size+1;\r\n\t\tmaze = new Room [size] [si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method test the winner player in two player configuration with same score and different number of lantern cards.
@Test public void testWinnerTwoPlayerSameScoreDiffCard(){ GameConfiguration gc1 = new GameConfiguration(2); gi = new GameInstance(new GameConfiguration(), playerTypes); Players player[] = gi.getPlayersList(); //set total score player[0].setTotalPoints(10); player[1].setTotalPoints(10); //set la...
[ "@Test\n\tpublic void testWinnerFourPlayerSameScoreDiffCard(){\n\t\tGameConfiguration gc1 = new GameConfiguration(4);\n\t\tgi = new GameInstance(new GameConfiguration(), playerTypes);\n\t\t\n\t\tPlayers player[] = gi.getPlayersList();\n\t\t\n\t\t//set total score\n\t\tplayer[0].setTotalPoints(10); \n\t\tplayer[1].s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Calculates the xvalue of a point on the other side of the line based on the width and height of the panel on which it is drawn Parameters: int panelWidth = width of panel int panelHeight = height of panel Returns this xcoordinate
public int getX2(int panelWidth, int panelHeight){ return (int)(getRadius(panelWidth, panelHeight) * Math.cos(getTheta()) + panelWidth/2); }
[ "public int getX1(int panelWidth, int panelHeight){\r\n\t\treturn (int)(-getRadius(panelWidth, panelHeight) * Math.cos(getTheta()) + panelWidth/2);\r\n\t}", "public int getPanelXLocation() {\n\t\treturn panel.getX();\n\t}", "public double getX() {\n\t\tRectangle2D bounds = _parentFigure.getBounds();\n\t\tdouble...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the x position of the arrow when being held by the player
private float getHoldingArrowX() { return xPos + getCurrentFrameWidth() / 2; }
[ "public int getPlayerX()\n {\n return iPlayerPosX + (iPlayerWidth / 2);\n }", "public float getPlayerX() {\n return player.getX();\n }", "double getPositionX();", "public int getXLeft() {\n return xLeft;\n }", "public int getX(){\n int x = TwodokuGame.getMoveIntX(move);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an ArrayList of Neighbouring Landpieces of an Intersection
public ArrayList<Landpiece> getNeighbouringLandpieces(Utility.Pair coordinate){ ArrayList<Landpiece> landpieces = new ArrayList<>(); if(coordinate.getX() % 2 == 0){ landpieces.add(getLandpieceQuietly((coordinate.getX()/2) - 1, coordinate.getY() - 1)); landpieces.add(getLandpieceQuietly((coordinate.get...
[ "public ArrayList<Landpiece> getNeighbouringLandpieces(Intersection intersection){\r\n\r\n\t\tArrayList<Landpiece> landpieces = new ArrayList<>();\r\n\r\n\t\tif(intersection.getCoordinates().getX() % 2 == 0){\r\n landpieces.add(getLandpieceQuietly((intersection.getCoordinates().getX()/2) - 1, intersectio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log an exception event at EVENT level.
public void eventReportException(Throwable th, String message) { if (event) recordDebugMessage(message, EVENT, th); }
[ "public void logException(LogEvent e) {\n if (isEnabled()) {\n dispatchLogException(e);\n }\n }", "public void exception (ServerEvent event) {\r\n\r\n\t\tException e = event.getException();\r\n\t\tSystem.err.println(\"Exception: \" + e.getMessage());\r\n\t}", "@Subscribe\n public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PRE: maxDias debe ser un entero positivo POST: modifica el maximo de dias de la restriccion que estamos tratando
public void setMaxDias(int maxDias) { this.maxDias = maxDias; }
[ "public void setDuracionMax(int duracionMax) {\n this.duracionMax = duracionMax;\n }", "public void setMaxDiscomfort(Integer maxDiscomfort) {\r\n this.maxDiscomfort = maxDiscomfort;\r\n }", "void setMaxDays(Integer maxDays);", "public int getDuracionMax() {\n return duracionMax;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the semantic link of the given type between this object and the given object. This object is the parent object in the relationship.
public void removeSemanticLink(IBusinessObject dest, LinkKind type) throws OculusException;
[ "public void removeRelation(int type, Accessible target) {\n\t\t//TODO: platform-specific? (we will manage the set on Windows)\n\t}", "void unsetRelationType();", "public void removeObjectTypeNode(ObjectTypeNode node) {\n this.inputNodes.remove(node.getDeftemplate());\n }", "public void removeNodeAf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
changes number type to differentiate between weapons and upgrades
@Override public int getType() { return weapon.getType() + 20; }
[ "public void changeWeapons(int change) {\r\n weapons += change;\r\n if (weapons < 0) {\r\n weapons = 0;\r\n }\r\n }", "private void upgrade(Powerup item){\n\t if (item instanceof Powerup_Speed){\n\t\t if (vel + 1 <= MAX_VEL){\n\t\t\t vel ++;\n\t\t }\n\t }\n\t else if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Konstruktor von BigLogic. Sie laedt die benoetigten Klassen, Datein und Konfigurationen hoch
public BigLogic() { configLoader = new ConfigLoader(); pluginTableModel = new PluginTableModel(configLoader.getPlugins()); tdiDialog = new TDIDialog(this, pluginTableModel); icons = configLoader.loadIcons(); Collections.sort(icons); wallpaper = new Wallpaper(configLoader.loadWallpaper(), configLoader.g...
[ "private void init() {\n\n JMethod method = null;\n JSourceCode jsc = null;\n boolean extended = false;\n\t\t\n //Make sure that the Descriptor is extended XMLClassDescriptor\n //even when the user has specified a super class for all the generated\n //classes\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new local archive. Uses the properties from props first, if possible. Props can be null.
Archive(Package pkg, Properties props, Os os, Arch arch, String localOsPath) { mPackage = pkg; mOs = props == null ? os : Os.valueOf(props.getProperty(PROP_OS, os.toString())); mArch = props == null ? arch : Arch.valueOf(props.getProperty(PROP_ARCH, arch.toString())); mUrl = null; ...
[ "Archive createArchive();", "Archiv createArchiv();", "public AposNtripCasterMock (Properties props) throws FileNotFoundException {\n\t\tinit (props);\n\t}", "private String createPlugin(final Path structure, String... properties) throws IOException {\n PluginTestUtil.writeProperties(structure, propert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates "ui" palette tool group
private PaletteContainer createUi1Group() { PaletteGroup paletteContainer = new PaletteGroup( Messages.Ui1Group_title); paletteContainer.setId("createUi1Group"); //$NON-NLS-1$ paletteContainer.add(createTable1CreationTool()); paletteContainer.add(createColumn2CreationTool()); paletteContainer.add(createUn...
[ "private void createControlsGroup() {\r\n PaletteContainer group = new PaletteToolbar(Messages.ArchimateDiagramEditorPalette_0);\r\n \r\n // The selection tool\r\n ToolEntry tool = new PanningSelectionToolEntry();\r\n tool.setToolClass(PanningSelectionExtendedTool.class);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form Magasin
public Magasin() { initComponents(); }
[ "public frmInsertarMascota() {\n initComponents();\n }", "public static void newMakler() {\n\t\tMakler m = new Makler();\n\n\t\tm.setName(FormUtil.readString(\"Name\"));\n\t\tm.setAddress(FormUtil.readString(\"Adresse\"));\n\t\tm.setLogin(FormUtil.readString(\"Login\"));\n\t\tm.setPassword(FormUtil.read...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new rider within the transit system with the given name and email address
public Rider(String name, String email) { this.name = name; this.email = email; this.id = IDGenerator.generateID('R'); cards = new ArrayList<Card>(); }
[ "Responsible createResponsible();", "Sponsor createSponsor(String name, String description, String street, String city, String state, String zip) throws CustomException;", "Businessemailcontact create(Businessemailcontact businessemailcontact);", "public void createSupplier(String name, String address, int ph...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column route.route_id
public String getRouteId() { return routeId; }
[ "public Integer getRouteID()\n\t{\n\t\treturn routeID;\n\t}", "public Long getRouteid() {\n return routeid;\n }", "public int getRouteId() {\n return routeId;\n }", "String getRouteID();", "public String getRouteId() {\n Object ref = routeId_;\n if (!(ref instanceof String)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for telefono.
public void setTelefono(String aTelefono) { telefono = aTelefono; }
[ "public void setTelefono(String telefono) {\r\n this.telefono = telefono;\r\n }", "public void setTelefono(String telefono) {\n this.telefono = telefono;\n }", "@Override\n\tpublic void setTelefono(java.lang.String telefono) {\n\t\t_candidato.setTelefono(telefono);\n\t}", "public void setT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a dump of this history and writes it to the given buffer.
void dump(Appendable buffer) throws IOException;
[ "protected void saveHistory() {\n BufferedOutputStream str;\n \n try {\n str = new BufferedOutputStream(\n new FileOutputStream(getHistoryFilename()));\n m_History.store(str, \"SQL-Viewer-History\");\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Negate a term, avoiding double negation. If formula is (not x) it returns x, otherwise it returns (not formula).
public Term negate(final Term formula) { if (isApplication("not", formula)) { return ((ApplicationTerm) formula).getParameters()[0]; } return formula.getTheory().term("not", formula); }
[ "private JCExpression NOT(JCExpression expr) { return m().Unary(JCTree.NOT, expr); }", "public Expression negate() {\n switch (operation) {\n case BOOLEAN:\n return SystemFunction.makeSystemFunction(\"not\", getArguments());\n case NOT:\n return SystemFun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set band: upper side band (usb), lower side band (lsb), side band with line in range (optimum).
public void setBand(String value) { _avTable.set(ATTR_BAND, value); }
[ "public void setBand(Band band) {\n this.band = band;\n }", "public void setBand(boolean mod) {\n\n }", "public void setBandDims() {\n }", "public void setBand(int $param_int_1, int $param_int_2, int $param_int_3, double $param_double_4) {\n java.lang.Object $__result = null;\n tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing the Daemon interface is not required for Windows but is for Linux
@Override public void init(DaemonContext ctx) throws Exception { System.out.println("Daemon init"); }
[ "public interface Daemon extends Runnable {\n\t/**\n\t * @return if the logs are activated or not.\n\t */\n\tdefault boolean verbose() {\n\t\treturn false;\n\t}\n}", "public interface DaemonContext extends Serializable {\n\n /**\n * The unique identifier for this daemon.\n */\n String getUid();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set new expire date.
public void setExpireDate(Date expireDate) { this.expireDate = expireDate; }
[ "public void doSetExpirationDate(Date val) {\n this.dtExpiration = val;\n }", "public void setExpirationDate(Date val) {\n doSetExpirationDate(val);\n }", "void setExpiredDate(Date expiredDate);", "public void setExpiredDate(Date expiredDate);", "public void setExpireDate(Date expireDate) {\n\t\tthi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if (null == reqMap || reqMap.isEmpty()) return CommonUtil.ReturnWarp(Constant.TRAN_PARAERCODE, Constant.ERRORTYPE);
@RequestMapping("/query.do") public @ResponseBody Map<String, Object> query(@RequestParam Map reqMap) { List<CpzProductLevelBean> cpzproductlevelBeans=null; try { cpzproductlevelBeans=cpzProductLevelService.get(reqMap); } catch (Exception e) { e.printStackTrace(); } Map r=new HashMap(); r.put("returnData",cpzproductl...
[ "private Spz requestParamsToSpz(Map<String, String[]> parameterMap) throws SPZException {\n if(!checkSpzParams(parameterMap)){\n return null;\n }\n Spz spz = new Spz();\n /*if(!parameterMap.containsKey(\"reqnumber\")){\n return null;\n }*/\n // spz.setS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets status of an interview, identified by its ID
public void setInterviewStatus(String interview_id, String status) { String url2_is=ec2_ip+"/setInterviewStatus.php?id="+interview_id+"&nstatus='"+status+"'"; urlCode(url2_is); }
[ "@PutMapping(\"/update/{interviewId}/{interviewStatus}\")\r\n\t\tpublic Interview updateInterviewStatus(Interview interview, @PathVariable (\"interviewId\") long intId) {\r\n\t\t\t Interview existingInterview1 = this.interviewRepository.findById(intId)\r\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns Email Address corresponding to the photo_id and contact_id provided.
private String getContactImageURI(Context argContext, String photo_id, String contact_id) { String contactImage = null; // Fetching Contact image URL. try { if (photo_id != null) { Uri contactUri = ContentUris .withAppendedId(Contacts.CONTENT_LOOKUP_URI, Long.parseLong(contact_id)); ...
[ "private String getEmailFromContact(\n\t\t\tJsArray<ong.eu.soon.mobile.json.ifx.element.Contact> contacts) {\n\t\tString eMail = \"\";\n\t\tfor (int i = 0; i < contacts.length(); i++) {\n\t\t\tLocator locator = contacts.get(i).getLocator();\n\t\t\tif (locator instanceof Email) {\n\t\t\t\tEmail email = (Email) locat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ ComienzaTimer(): Toma el valor del instante actual y lo guarda en "timer".
public static void ComienzaTimer(){ timer = System.nanoTime(); }
[ "long getTimerSeconds();", "public int getTimer() {\n return timer;\n }", "public static void ParaTimer(){\n tiempoTranscurrido = (System.nanoTime() - timer)/(1000000000.);\n }", "public void temporizadorTiempo() {\n Timer timer = new Timer();\n tareaRestar = new TimerTask() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
StxJL sjl= new StxJL( "28Dec09", 50, 0, SRa); System.err.println( sjl.toString()); sjl= new JLRec( "28Dec09", 50, 0, NRa); System.err.println( sjl.toString()); sjl= new JLRec( "28Dec09", 50, 0, UT); System.err.println( sjl.toString()); sjl= new JLRec( "28Dec09", 50, 0, DT); System.err.println( sjl.toString()); sjl= new...
public static void main( String[] args) { // sjl= new JLRec( "28-Dec-09", 50, 0, NRa); // System.err.println( sjl.toString()); // sjl= new JLRec( "28-Dec-09", 50, 0, UT); // System.err.println( sjl.toString()); // ...
[ "public static void main(String[] args) {\n\n Studenti s1= new Studenti(\"Pera Peric\",\"drumski\",\"DR-123\");\n Studenti s2 = new Studenti(\"Laza Lazic\", \"logistika\",\"LO-267\");\n Studenti s3 = new Studenti(\"Marko Markovic\", \"vodni\", \"VO-745\");\n\n // menja broj indeksa\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the mail server host.
public String getMailServerHost() { return mailServerHost; }
[ "Object getMailhost();", "public String getSmtpHost() {\n\t\treturn _smtpHost;\n\t}", "public static String getSmtpHost() {\n String value = null;\n try {\n XMLConfiguration xmlConf = new XMLConfiguration(AppConfig.class.getResource(\"/com/pimmanager/configuration/config.xml\"));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets history of all drawings in a List
public List<AllShapes> getHistory() { return history; }
[ "public List<Drawing> getChangedDrawings() {\n// Set<String> changedDrawingNames = new HashSet<String>();\n// for (Drawing drawing : _changedDrawings) {\n// changedDrawingNames.add(drawing.getName());\n// }\n return new ArrayList<Drawing>(_changedDrawings);\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to test mirrorTemple
public static void testMirrorTemple() { Picture temple = new Picture("temple.jpg"); temple.explore(); temple.mirrorTemple(); temple.explore(); }
[ "public static void testMirrorTemple()\n {\n CollageLab temple = new CollageLab(\"temple.jpg\");\n temple.explore();\n temple.mirrorTemple();\n temple.explore();\n }", "public static void testMirrorTemple()\n {\n Picture temple = new Picture(\"temple.jpg\");\n temple.explore();\n temple.mi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates 'FROM' and the tables with their join expression
protected void generateFromClause( WrqInfo wrqInfo, SQLStatementWithParams sqlStatement ) throws BindingException { sqlStatement.append(" FROM "); WrqBindingSet bs = wrqInfo.getResultingBindingSet(); resolvedBindingSets.addAll(bs.getResolvedBindingSets()); sqlStatement.append(wrqInfo.getSQLSelectWithP...
[ "private String getFrom() {\n String selectSub = getSelectSubquery();\n\n String fromSub = \"from \" + jam.getFromSourceClause(params) + \" as \" + ANALYTICS_TBL_ALIAS + \" \";\n\n String whereSub = getWhereSubquery();\n\n String groupBySub = getGroupBySubquery();\n\n return \"from (\"\n + sel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ location(int) is the location_counter's current value isdw(boolean)is true if the range to be checked has to be changed from the default value returns true if the location is OUT OF RANGE else returns false
private static boolean Range(int location, boolean isdw) { int lowl, highl; if (isdw) { lowl = 111; highl = 127; } else { lowl = 0; highl = 110; } if (location >= lowl && location <= highl) return false; ...
[ "boolean isRanged();", "private boolean inBounds(Location loc)\n {\n int row = loc.getRow();\n int col = loc.getCol();\n return (row < 8 && row >= 0 && col < 8 && col >= 0);\n }", "boolean hasDestRange();", "@Override\n public boolean isRange() {\n return true;\n }", "private boolean isInRan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Put a long value (padded) in a byte array at a specific offset.
public static void putLong(long value, byte[] array, int offset) { array[offset] = (byte) (0xff & (value >>> 56)); array[offset + 1] = (byte) (0xff & (value >>> 48)); array[offset + 2] = (byte) (0xff & (value >>> 40)); array[offset + 3] = (byte) (0xff & (value >>> 32)); array[offset + 4] = (byte) (0xff & (val...
[ "public static int putLong(byte[] bytes, int offset, long val) {\n if (bytes.length - offset < SIZEOF_LONG) {\n throw new IllegalArgumentException(\"Not enough room to put a long at\"\n + \" offset \" + offset + \" in a \" + bytes.length + \" byte array\");\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Anonymous Definition'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseAnonymousDefinition(AnonymousDefinition object) { return null; }
[ "public T casePrimitiveAnonymousDefinition(PrimitiveAnonymousDefinition object)\n {\n return null;\n }", "public T caseCompositeAnonymousDefinition(CompositeAnonymousDefinition object)\n {\n return null;\n }", "public T caseDefinition(Definition object)\n {\n return null;\n }", "public T caseAn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new DeviceInfo RecordBuilder by copying an existing Builder.
public static export.serializers.avro.DeviceInfo.Builder newBuilder(export.serializers.avro.DeviceInfo.Builder other) { return new export.serializers.avro.DeviceInfo.Builder(other); }
[ "public static export.serializers.avro.DeviceInfo.Builder newBuilder(export.serializers.avro.DeviceInfo other) {\n return new export.serializers.avro.DeviceInfo.Builder(other);\n }", "public static export.serializers.avro.DeviceInfo.Builder newBuilder() {\n return new export.serializers.avro.DeviceInfo.Bui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return new Result(200, "success", "hello,this is imooc");
@RequestMapping("/test") @ResponseBody public Result<String> test() { return Result.success("hello this imooc"); }
[ "Wrapper() {\n this(ResponseType.SUCCESS,\"\");\n }", "public Response hello() {\n \t\t\n \t\treturn new StreamingResponse(\"text/xml\", \"<a f=\\\"\" + this.parameters.get(\"y\") + \"\\\" />\");\n \t}", "@Override\n public void onResponseSuccess(final String resp) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the search is completed, for situations where there is some final processing to do.
public void FinishedSearch();
[ "void searchingFinished(boolean interrupted);", "void searchThreadFinished(CardFinder finder, CardSearchResultSet results);", "abstract SearchNode finish();", "public synchronized void batchProcessComplete() {\n processed.clear();\n LOGGER.info(\"Completed \" + entityCount + \" documents\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method returns the value of the database column KMORDER.COUPON_STATEMENT.STATEMENT_NO
public Long getStatementNo() { return statementNo; }
[ "public long getNutrientStatementNumber() {\n\t\treturn nutrientStatementNumber;\n\t}", "public Integer getCno() {\n return cno;\n }", "public void setStatementNo(Long statementNo) {\r\n this.statementNo = statementNo;\r\n }", "String getConstraintClauseNumber();", "private int getC_BankStatem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Send an SPEP startup message to the ESOE and request startup. If the request is accepted the SPEP will begin processing, if not it will wait until it has clearance to start from the ESOE.
protected void doStartup() { this.logger.info(Messages.getString("StartupProcessorImpl.2")); //$NON-NLS-1$ setStartupResult(result.wait); while (!result.allow.equals(allowProcessing())) { try { String samlID = this.identifierGenerator.generateSAMLID(); Element requestDocument...
[ "public void RequestStart() {\n\t\tif (this.simulationState == SimulationState.Idle) {\n\t\t\tsendControlMessage(\"START\");\n\t\t}\n\t}", "public void startup()\n\t{\t\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tplaySound(R.raw.startup);\n\t\t\t\t// Replace while and mHandler ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all project roles Gets a list of all project roles, complete with project role details and default actors. About project roles [Project roles]( are a flexible way to to associate users and groups with projects. In Jira Cloud, the list of project roles is shared globally with all projects, but each project can have ...
public Flux<ProjectRole> getAllProjectRoles() throws WebClientResponseException { Object postBody = null; // create path and map variables final Map<String, Object> pathParams = new HashMap<String, Object>(); final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<Stri...
[ "@RequestMapping(value = \"/project-role\", method = RequestMethod.GET)\n public\n @ResponseBody\n Collection<ProjectRole> getProjectRoles() {\n return Arrays.asList(ProjectRole.values());\n }", "public List<Role> getAllRoles();", "public List<SecRole> getAllRoles();", "public ActionReturn ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para obtener la cola economico
public ColaG getColaEconomico() { return ColaEconomico; }
[ "public Fenetre_resultat_coaxial(float longueur, float largeur, float hauteur, float debit_m, float capacite_th, float tempc, float tempf, float masse_volumique, float viscosite, float epaisseur) {\n\n Coaxial coax1;\n Finance F1;\n\n coax1 = new Coaxial(longueur, largeur, hauteur, debit_m, cap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initiate saturation to 0
public void initiateSaturation(HashMap <Integer, Integer> saturation, int numNodes) { for(int i=1; i<=numNodes; i++) { saturation.put(i, 0); numEdges.put(i, 0); } }
[ "public void setSaturation(float saturation);", "private ColorAdjust __setSaturation(double saturation) {\n ColorAdjust colorAdjust = new ColorAdjust();\n colorAdjust.setSaturation(saturation);\n return colorAdjust;\n }", "public void adjustSaturation()\n\t{\n\t\tfinal int prevSaturation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a ResponseAPDU from a byte array containing the complete APDU contents (conditional body and trailed). Note that the byte array is cloned to protect against subsequent modification.
public ResponseAPDU(byte[] apdu) { apdu = apdu.clone(); check(apdu); this.apdu = apdu; }
[ "public CardCommandAPDU(byte[] commandAPDU) {\n\tSystem.arraycopy(commandAPDU, 0, header, 0, 4);\n\tsetBody(ByteUtils.copy(commandAPDU, 4, commandAPDU.length - 4));\n }", "public static ResponseApdu fromBytes(byte[] buf) throws ParseException {\n return new ResponseApdu(new ByteArrayInputStreamExtension...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reset the pending purchase and navigate to selection page.
@Override public void onClick(View v) { LBDataManager.GetInstance().resetPendingPurchase(source); Intent intent = new Intent(PurchaseDetailActivity.this, SelectorsActivity.class); startActivity(intent); }
[ "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tLBDataManager.GetInstance().resetPendingPurchase(source, true);\n\t\t\t\t\t\n\t\t\t\t\tIntent intent = new Intent(PurchaseDetailActivity.this, SelectorsActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}", "void resetPurchaseNum(int slot);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the wrapped message on this instance (expert).
public void setWrappedMessage(Message wrappedMessage) { this.wrappedMessage = wrappedMessage; }
[ "void setMessage(Object message);", "public void setMessage( Object msg )\n {\n // hold current message\n Object sMsg = getMessage();\n\n // assign new message\n super.setMessage( msg );\n\n // break it up\n try\n {\n tokenize();\n }\n c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column c_print.dysj
public void setDysj(String dysj) { this.dysj = dysj; }
[ "public String getDysj() {\n return dysj;\n }", "public void setYDSJ(java.lang.String YDSJ) {\r\n this.YDSJ = YDSJ;\r\n }", "public void setdCjsj(Date dCjsj) {\n this.dCjsj = dCjsj;\n }", "public void setJkglStxxd(String jkglStxxd)\n\t{\n\t\tthis.jkglStxxd = jkglStxxd;\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Division__Group_1__2__Impl" $ANTLR start "rule__Primary__Group_0__0" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:8122:1: rule__Primary__Group_0__0 : rule__Primary__Group_0__0__Impl rule__Primary__Group_0__1 ;
public final void rule__Primary__Group_0__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:8126:1: ( rule__Primary__Group_0__0__Impl rule__Primary_...
[ "public final void rule__Division__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7981:1: ( ( rulePrimary ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all values of property Pagestart as a ReactorResult of java.lang.String
public ReactorResult<java.lang.String> getAllbiboPagestart_as() { return Base.getAll_as(this.model, this.getResource(), PAGESTART, java.lang.String.class); }
[ "java.lang.String getPages();", "String getStartpage();", "public String getPages() {\n return pages;\n }", "public ReactorResult<java.lang.String> getAllbiboPageend_as() {\n\t\treturn Base.getAll_as(this.model, this.getResource(), PAGEEND, java.lang.String.class);\n\t}", "Map<String, String> getS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Open the user list.
protected void openUserList() { new JDialogUsers(this.ctrl); }
[ "public void displayUsers(){\n //go through the userName arraylist and add them to the listView\n for(String val:this.userNames){\n this.userListView.getItems().add(val);\n }\n }", "private void loadUserList () {\n\t\tAgent owner = getAnonymous();\n\t\tboolean bLoadedOrCreated =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last slogan in the ordered set where groupId = &63; and status = &63;.
public static com.inkwell.internet.slogan.model.Slogan findByG_S_Last( long groupId, int status, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.inkwell.internet.slogan.NoSuchSloganException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() ....
[ "public static com.inkwell.internet.slogan.model.Slogan fetchByG_S_Last(\n\t\tlong groupId, int status,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchByG_S_Last(groupId, status...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get or create a vertex with given id.
synchronized Vertex<V, E, M> getOrCreateVertex(long id) { Vertex<V, E, M> vertex = vertices.get(id); if (vertex == null) { vertex = new Vertex<>(id, this); this.vertices.put(id, vertex); } return vertex; }
[ "V getVertexById(String id);", "Vertex getVertex(Long id){\n return graphDB.get(id);\n }", "public Vertex getVertex(int id) {\n if (idVertexIndex.containsKey(id)) {\n return idVertexIndex.get(id);\n } else {\n throw new RuntimeException(\"Graph: getVertex: cannot re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Or__Group__1" $ANTLR start "rule__Or__Group__1__Impl" InternalTym.g:2133:1: rule__Or__Group__1__Impl : ( ( rule__Or__Group_1__0 ) ) ;
public final void rule__Or__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalTym.g:2137:1: ( ( ( rule__Or__Group_1__0 )* ) ) // InternalTym.g:2138:1: ( ( rule__Or__Group_1__0 )* ) { // InternalTy...
[ "public final void rule__Or__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTym.g:2126:1: ( rule__Or__Group__1__Impl )\n // InternalTym.g:2127:2: rule__Or__Group__1__Impl\n {\n pushFollow(FO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field checkStatus is set (has been assigned a value) and false otherwise
public boolean isSetCheckStatus() { return EncodingUtils.testBit(__isset_bitfield, __CHECKSTATUS_ISSET_ID); }
[ "boolean hasCheckField();", "boolean getCheckState();", "public boolean is_set_status() {\n return this.status != null;\n }", "public boolean isSetCheckInfo() {\n return this.checkInfo != null;\n }", "public boolean isSetGameStatus() {\n return this.gameStatus != null;\n }", "public boolea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get the initial data packet to request file from server
private DatagramPacket getRequestPacket() { String requestFile = "REQUEST ", filePath; DatagramPacket packet; if (ip != null) { try { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter file name: "); ...
[ "private String makeInitialRequest() {\n StringBuilder sb = new StringBuilder(50\n + this.filePart.getFilename().length()\n + this.recDef.getJsonInputDef().length()\n + this.recDef.getJsonOutputDef().length());\n sb.append(\"{ \\\"format\\\" : \\\"binary\\\", \\\"node\\\" : \");\n sb.a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build the neighboord for each instance of "instances1" using the "instances2" to take the neighbors.
public void build (Instances instances1, Instances instances2) { Enumeration<Instance> e = instances1.enumerateInstances(); XNNNeighborhood row; Instance inst; int i = 0; // For each instance, build its XNNNeighborhood object and add it to the table. while (e.hasMoreElements())...
[ "public List<Sequence> createNeighborhood(Sequence seq, int range) {\n \tList<Sequence> neighbors = new ArrayList<Sequence>();\n \t\n \tfor (SingleConstraint c : singleConstraints) {\n Game game = c.getGame();\n // too early, move forward\n if (c.earliestStartPenalty() > 0)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the opponent's board
public Board getOpponentsBoard() { return opponentsBoard; }
[ "int[][] getBoard();", "private Board getBoard() {\n return gameStatus.getBoard();\n }", "public String getBoard() {\r\n\t\tString r = \"\";\r\n\t\tfor (int y = 0; y < 3; y++) {\r\n\t\t\tfor (int x = 0; x < 3; x++) {\r\n\t\t\t\tr = r + board[y][x];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Spring Data JPA repository for the Datasource entity.
public interface DatasourceRepository extends JpaRepository<Datasource, Long> { Optional<Datasource> findOneById(Long id); Optional<Datasource> findOneByTracksId(Long id); }
[ "@Repository\npublic interface DataSourceConfigRepository extends JpaRepository<DataSourceConfig, Long> {\n \n}", "@Repository\n@Table(name = \"fixed_device\")\npublic interface ScheduleContextRepository extends JpaRepository<ScheduleContextForDB, String> {\n\n}", "String getRepositoryDatasource();", "@Sup...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the exchange id from the input URI.
public String getUriExchangeId() { return _uriExchangeId; }
[ "String getExchangeId();", "private static long toId(URI uri)\n\t{\n\t\t// Releases are identified by \"<package>.release:<id>\" where <package> is the current package\n\t\t// and <id> is the database identifier.\n\t\tif (!uri.getScheme().startsWith(schema))\n\t\t\tthrow new IllegalArgumentException(uri.toString(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method that fetches a record from the database and transforms it into an EmailBean
public EmailBean getEmail(int id) throws SQLException { EmailBean bean = new EmailBean(); String query = "SELECT * FROM Emails e WHERE e.email_id = ?"; try (PreparedStatement ps = connection.prepareStatement(query)) { ps.setInt(1, id); ResultSet rs = ps.executeQuery(); ...
[ "public List<EmailBean> findAll() throws SQLException {\n String query = \"SELECT * FROM Emails\";\n List<EmailBean> allEmails = new ArrayList();\n try (Connection connection = DriverManager.getConnection(URL, UNAME, PASSWORD)) {\n PreparedStatement ps = connection.prepareStatement(q...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleNullLiteral" $ANTLR start "entryRuleStringLiteral" ../eu.artist.postmigration.nfrvt.lang.gml/srcgen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4309:1: entryRuleStringLiteral returns [EObject current=null] : iv_ruleStringLiteral= ruleStringLiteral EOF ;
public final EObject entryRuleStringLiteral() throws RecognitionException { EObject current = null; EObject iv_ruleStringLiteral = null; try { // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:431...
[ "public final EObject entryRuleStringLiteral() throws RecognitionException {\n EObject current = null;\n int entryRuleStringLiteral_StartIndex = input.index();\n EObject iv_ruleStringLiteral = null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 107) ) { r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test Constructor(Interface, UMLModelManager), with null interface. IllegalArgumentException is expected.
public void testCtor1WithNullInterface() { try { new AddInterfaceAction(null, manager); fail("IllegalArgumentException is expected."); } catch (IllegalArgumentException iae) { // pass } }
[ "public void testCtor1WithNullManager() {\n try {\n new AddInterfaceAction(interfacee, null);\n fail(\"IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "public void testCtor2WithNullManager() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the this object contains information associated with a connected Internet Gateway Device.
public GatewayInfo getGatewayInfo() { return gatewayInfo; }
[ "public String getDeviceInformation() {\n\t\treturn deviceInformation;\n\t}", "public DeviceInformation getDeviceInformation() {\n if (deviceInformation == null) {\n deviceInformation = deviceManager.generateDeviceInformation();\n }\n return deviceInformation;\n }", "@Override\n public DeviceI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Predicate to keep track of our (AbstractAsset) Maintenance orgs
private static UnaryPredicate maintAssetPred() { return new UnaryPredicate() { public boolean execute(Object o) { if (o instanceof AbstractAsset) { if (((AbstractAsset)o).getTypeIdentificationPG().getTypeIdentification().equals("MAINTENANCE")) return true; } return false; } }; }
[ "private static UnaryPredicate assetPred() {\n return new UnaryPredicate() {\n\tpublic boolean execute( Object o ) {\n\t return ( o instanceof CargoVehicle );\n\t}\n };\n }", "protected abstract boolean isAPowerUserEditableArtifact();", "public boolean isArtifact(RepoArtifact art);", "boolean is...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the AUTHOR_ICON_LINK_URL value for this ABSTRACTPORTAL_PAGE_PORTLET_VIEWType.
public void setAUTHOR_ICON_LINK_URL(java.lang.String AUTHOR_ICON_LINK_URL) { this.AUTHOR_ICON_LINK_URL = AUTHOR_ICON_LINK_URL; }
[ "public java.lang.String getAUTHOR_ICON_LINK_URL() {\r\n return AUTHOR_ICON_LINK_URL;\r\n }", "public void setAUTHOR_ICON(java.lang.String AUTHOR_ICON) {\r\n this.AUTHOR_ICON = AUTHOR_ICON;\r\n }", "public java.lang.String getAUTHOR_ICON() {\r\n return AUTHOR_ICON;\r\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of YahooSearchEngine
public YahooSearchEngine(String key) { setKey(key); client = new SearchClient(getKey()); }
[ "public static GwebSearch create(){ \n\t\treturn impl.create();\n\t}", "public AbstractSearchEngine() {}", "private YahooMeteoRetriever() {\r\n\t\tsuper();\r\n\t}", "public static Analyzer createSearchAnalyzer()\r\n {\r\n return new SearchAnalyzer();\r\n }", "public TinySearchEngine()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the row of the matrix for assignations implying the host as a target and source as family of source agent.
public Set<Assignation<InteractionClass>> getHostAsTargetAssignation( @SuppressWarnings("unused") Class<? extends IAgent> sourceClass) { return null; // MatrixRow<InteractionClass> row = this.getHostRow(); // if (row == null) // return null; // return row.getAssignations(sourceClass); }
[ "public Set<Assignation<InteractionClass>> getHostAssignation(\n Class<? extends IAgent> targetClass) {\n MatrixRow<InteractionClass> row = this.getHostRow();\n if (row == null) {\n return null;\n }\n return row.getAssignations(targetClass);\n }", "public Set<Assignation<InteractionClass>> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the ObjectCache for the given key and objectKey
public ObjectCache getCache(String key, Object objectKey) { return this.cache.getElement(key, objectKey); }
[ "public Object get(Object key) throws CacheException;", "T getCacheData(String key);", "public T getObject(T object) {\r\n\t\t\r\n\t\tif(cache.contains(object) == false) //if not in the cache\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Element not found.\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }