query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
List of output sprite sheets. repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13;
public Builder addSpriteSheets(com.google.cloud.video.livestream.v1.SpriteSheet value) { if (spriteSheetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSpriteSheetsIsMutable(); spriteSheets_.add(value); onChanged(); } else...
[ "public static Image getSpritesheet() {\n return spritesheet;\n }", "public Image getSpriteSheet() {\n\t\treturn spriteSheet;\n\t}", "public void loadSprites() {\n\t\ttry {\n\t\t\tsprites = new BufferedImage[36];\n\n\t\t\tsprites[0] = ImageIO.read(new File(\"img/player/move/down1.png\"));\n\t\t\tsprit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a Nanda backward slicer with all optimizations.
public static Nanda createNandaBackward(SDG g) { NandaMode mode = new NandaBackward(); Nanda nanda = new Nanda(g, mode); return nanda; }
[ "public void disableSlicing() {\n\t\tslicing = false;\n\t}", "void _copy_backward(int i, int n, X[] A, int j) {\r\n for (int k = n - 1; k > -1; k--)\r\n A[j + k] = this.A[i + k];\r\n }", "public FragmentEndlessScrolling() {\n\t}", "Slice(LayerD _l){\n l = _l;\n }", "public Bac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new SVGIcon object.
public SVGIcon(Document doc) throws TranscoderException { this(doc, 0, 0); }
[ "public Icon() {\n setElement(DOM.createElement(\"i\"));\n }", "public static MdiIcon create() {\n return new MdiIcon();\n }", "void addNewIcon();", "public static MdiIcon create(CssClass icon) {\n return new MdiIcon(icon);\n }", "public Icon(String src) {\n this(DEFAULT_COORDINATE,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a processing instruction. Pass the event on down the filter chain for further processing.
@Override public void processingInstruction(String target, String data) throws SAXException { writeText4Links(); write("<?"); write(target); write(' '); write(data); write("?>"); if (elementLevel < 1) { write('\n'); } super.processi...
[ "public void writeProcessingInstruction(String target) throws XMLStreamException {\n }", "public static synchronized void process() {\n System.out.println(\"processing event\");\n }", "void process(Event event);", "public void process(WatchedEvent event) {\n }", "@Override\t\r\n\t\t\tpublic void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method for asynchronous processing receiving
public Result run(final Data data, final Processor processor) throws ExecutionException, InterruptedException { try { final List<Future<Result>> results = new LinkedList<>(); final List dataElementsToProcess = data.getElementsToProcess(); Integer index = 0, initialPosition =...
[ "public void run() {\n\t\treceiveData();\n\t}", "@Override\n\tpublic CommonMessageResponse processMessageAsync() {\n\t\tDate startDate = new Date();\n\t\tLOGGER.info(\"############# Call Started At : \" + startDate + \" ############\");\n\n\t\tfor (int i = 0; i < 1000; i++) { // 0 1 || 2 3\n\t\t\tList<Integer> ar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the cluster member with the least amount of load.
private Map.Entry<? extends ClusterMember, WorkloadReport> findLeastBusyMember(SchedulerStrategyContext context) { return context.getMapping().entrySet().stream().min(Comparator.comparing(entry -> entry.getValue().getEntries().size())).orElse(null); }
[ "private Memory.ParcelRecord getClosestLoadableParcel() {\n Memory.ParcelRecord minParcelRecord = null;\n if(memory.parcelRecords.size() > 0) {\n Float min = null;\n\n for (Memory.ParcelRecord parcel : memory.parcelRecords) {\n float value = computeVectorNorm(getX(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the name of the configured vehicle theme.
public String getVehicleThemeName() { return configStore.getString("vehicleThemeName", ""); }
[ "public String getTheme() {\r\n return theme;\r\n }", "public String getSelectedTheme() {\r\n return currentUser.selectedTheme;\r\n }", "public String themeSelector(){\n themeComboBox.setOnAction(e -> {\n themeComboBoxText = themeComboBox.getValue().toString();\n });\n return t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update thresholds for parameter
public abstract void updateParameterThresholds(int index, Threshold[] thresholds);
[ "public void updateAREDParameters()\n {\n double max_p = getMaxP();\n if ((getAvg() > TARGET_HIGH) && (getMaxP() <= 0.5))\n {\n // increase max_p\n setMaxP(max_p + ALPHA);\n }\n else if ((getAvg() < TARGET_LOW) && (max_p >= 0.01))\n {\n /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An encapsulation of the font file(s) that the font is originally read from, with the possibility to rewrite them to disk, possibly on another machine after serialization. Creation date: (20010503 15:08:42)
public interface CoFontFileContainer extends Serializable, com.bluebrim.xml.shared.CoXmlEnabledIF { public String getFontFileBaseName(); public void writeFontFileToDisk(File path) throws com.bluebrim.font.shared.CoFontException; }
[ "public void loadFonts() {\n\n final char[] smallFont = {\n 0xf9,0x99,0xf2,0x62,0x27,\n 0xf1,0xf8,0xff,0x1f,0x1f,\n 0x99,0xf1,0x1f,0x8f,0x1f,\n 0xf8,0xf9,0xff,0x12,0x44,\n 0xf9,0xf9,0xff,0x9f,0x1f,\n 0xf9,0xf9,0x9e,0x9e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds new statement before a reference statement
public synchronized void addBefore(ASTNode newElement, Statement referenceStatement) { Block parentBlock = (Block) referenceStatement.getParent(); ListRewrite statementsBlock = astRewriter.getListRewrite(parentBlock, Block.STATEMENTS_PROPERTY); Statement placeHolder = (Statement) astRewriter.createStringPlacehold...
[ "@Override\n public void prependStatement(final Statement statement) {\n this.statements.add(0, statement);\n }", "@OleMethod\r\n\tIXMLDOMNode insertBefore(IXMLDOMNode newChild,IXMLDOMNode refChild);", "public void addBefore(String name) {\n comesBefore.add(name);\n }", "public void add...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the number of keys returned with this response.
public int getKeyCount() { return keyCount; }
[ "public int getNumberOfKeys() {\n return keys.size();\n }", "public int getKeysCount() {\n return keys_.size();\n }", "int getKeyValueCount();", "public int size() {\n\t\t//TODO\n\t\treturn numKeys;\n\t}", "public int getKeyCount() {\n return mSize;\n }", "@...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used when use interacts with sprite by tapping on it. Check the player sprite hitBox is
private boolean isWithinHitBox(int positionX, int positionY){ return (positionX >= spriteCornerList[TOPLEFT].getCorner().getX() && positionX <= spriteCornerList[TOPRIGHT].getCorner().getX() && positionY >= spriteCornerList[TOPLEFT].getCorner().getY() && positionY ...
[ "public void checkHit() {\n Jim jim = (Jim) getOneIntersectingObject(Jim.class);\n if (jim!=null)\n {\n jim.hit(touchDmg, getX(), getY());\n }\n }", "private void handleEnemyShot()\n {\n if (shotManager.playerShotTouches(enemy.getBoudingBox())){\n ene...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public methods summary: adds new coordinates to end of array myPolygon
public void add(Point2D.Double aPoint) { myPolygon.add(aPoint); count++; }
[ "public void addPolygon(Attributed<Polygon> newPolygon) {\n this.polygonsBuilder.add(newPolygon);\n }", "void updatePolygon(int index,ArrayList<GPSPoint> points)\n {\n updatePolygon(index, points,null);\n }", "public void insertPolygon(int corner) {\n\t\tcurrentPoly = new PolygonO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the object this source can provide.
T get();
[ "public IHasIdentifier getObject()\n\t{\n\t\treturn _obj;\n\t}", "public Object getObject()\r\n\t{\r\n\t\treturn _Object;\r\n\t}", "public java.lang.Object getObject()\n {\n return object;\n }", "public Object getObject() {\n return _object;\n }", "public S getObject() {\n\t\treturn thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of values for a given header. Ignores the case of the header when performing the get
default Collection<String> getValuesForHeader(String header) { return getHeaders().entrySet().stream() .filter(e -> e.getKey().equalsIgnoreCase(header)) .flatMap(e -> e.getValue() != null ? e.getValue().stream() : Stream.empty()) ....
[ "public List<Header> getHeaderList();", "public List<String> getHeaderValues(final String name) {\n Validate.notEmpty(name, \"name cannot be empty\");\n \n @SuppressWarnings(\"unchecked\")\n final List<String> result = (List<String>) headers.get(name.toLowerCase());\n return res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'dem_vote' field.
public com.stonybrook.politech.model.GeometricDetailsGenerated.Builder setDemVote(int value) { validate(fields()[5], value); this.dem_vote = value; fieldSetFlags()[5] = true; return this; }
[ "public void voteDemocrat(int d) {\n\t\tdemoVotes += d;\n\t}", "public void setDv(int value) {\n this.dv = value;\n }", "public Builder setVote(boolean value) {\n \n vote_ = value;\n onChanged();\n return this;\n }", "public void setVotes(String votes) {\n Vot...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Receives an energy from a normal energy.
@Override public void receiveNormalEnergy(NormalEnergy energy) {this.energies.setNormalEnergy();}
[ "public float getEnergy(PC_Direction side, float energy);", "@Override\r\n\tpublic void receivePower(double power) throws Exception {\r\n\t\t//unused\r\n\t}", "void eodReceived();", "public void sendEnergy() {\r\n\t\tPacketBuf buf = new PacketBuf(234);\r\n\t\tbuf.put(player.getRunEnergy());\r\n\t\tplayer.getC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert the given object to string with each line except the first indented by 4 spaces.
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
[ "private String toIndentedString(Object o)\n/* */ {\n/* 607 */ if (o == null) {\n/* 608 */ return \"null\";\n/* */ }\n/* 610 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString(Object o)\n/* */ {\n/* 164 */ if (o == null) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Drops the getJSLSchemaName() schema and any related tables in the supplied database if they exist. If the database does not contain a schema called getJSLSchemaName(), then nothing happens
public static void dropJSLDbSchema(Database db) { db.dropSchema(getJSLSchemaName(), JSLTableNames, JSLViewNames); }
[ "@Override\n public void dropSchema(final String catalog, final String schema) {\n final ArrayList<String> script = new ArrayList<>();\n\n Connection conn = null;\n try {\n if (!getCatalogCreationStrategy().catalogExists(catalog)) {\n System.out.println(\"Catalog \" + catalog + \" does not exi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of an option, as a String. If the value is absent, return an empty Optional. If the value is present, but not a String, throw an exception. (for example: FUNCTION(name: 37) option "name" is a number; whereas FUNCTION(name: "37") option "name" would be a String) Otherwise, return the value.
@NotNull public Optional<String> asString(@NotNull final String optionName) { return asType( optionName, String.class, null ); }
[ "public static String valueOrDefaultString(Object value) {\n return valueOrDefault(value, \"\", \"\");\n }", "String getOptionString();", "Optional<String> getString(String name);", "public Optional<String> getOption(String key) {\n String value = settings.get(key);\n if (value == null...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Implementa o interface OneVariableFunction
@Override public Double value(Double x) { return x * x - 4; }
[ "public interface OneVariableFunction extends MultiVariableFunction {\r\n /**\r\n * The method should return the value of the function for the specified variable\r\n * @param x - Value of the independent variable \r\n * @return value - Value of the dependent variable \r\n * @throws IllegalArgumen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Moves a piece to a location
public void movePiece(ChessPiece piece, PieceLocation destination) { // Handle opponent's En Passant move if (getPiece(destination) == null && piece instanceof Pawn && this.lastMovedPiece != null) { // If the pawn moved to the ghost of the last move pawn if (this.lastMovedPiece.direction == PieceMovementDirec...
[ "void movePiece(Location from, Location to);", "public void movePiece(Game game, String pieceType, int fromX, int fromY, int toX, int toY) {\n game.getBoard().setPieceOnBoard(fromX, fromY, \"NULL\");\n game.getBoard().setPieceOnBoard(toX, toY, pieceType);\n }", "void move(GemPoint to);", "pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column fundaccount.price
public Float getPrice() { return price; }
[ "@Column(name = \"PRICE\")\r\n\tpublic double getPrice() {\r\n\t\treturn price;\r\n\t}", "@Basic\n @Column(name = \"retailPrice\")\n public Double getRetailPrice() {\n return retailPrice;\n }", "public BigDecimal getPrice() {\n // Add any custom logic you wish to perform in this getter he...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add all player names into a variable
@Override public void onClick(View view) { for (int i = 0 ; i < llJugadores.getChildCount();i++){ TableRow aux = (TableRow)llJugadores.getChildAt(i); EditText etNames = (EditText)aux.getChildAt(1); String name = etNames.getText().to...
[ "public static void getPlayerNames(){\n \t\tPlayers = SetNames();\n \t}", "public ArrayList<String> getPlayerNames(){\n ArrayList<String> names;\n names = new ArrayList<String>();\n for(int i = 0; i < players.size(); i++) {\n names.add(players.get(i).name);\n }\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the field server.
public void setServer(ch.ivy.addon.portalkit.persistence.domain.Server _server) { server = _server; }
[ "public void setServer (Server s) {\r\n\t\tthis.server = s;\r\n\t}", "protected void setServer(String server) {\n\t\tthis.server = server;\n\t}", "public void setServer(ServerBase server)\n\t{\n\t\tthis.server=server;\n\t}", "public com.voole.hobbit.camus.events.records.EventHeader.Builder setServer(java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
private static void main(String[] args) { HashMap map=new HashMap(); map.put(id, "1"); map.put(name, "ÕÅÈý"); map.put(sex, "ÄÐ"); map.put(age, "25"); map.put(love, "°®Ñ§Java"); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Drop existing course, only request with existing studentID/courseID is a valid request. Invalid request will cause an exception
public void drop(IRequest request) { for(int i=0;i<requestList.size();i++){ if(requestList.get(i).getStudentID()==request.getStudentID()&&requestList.get(i).getCourseID()==request.getCourseID()){ if(requestList.get(i).getRequestType()==IRequest.REQUEST_DROP){ ...
[ "private void removeCourse() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Enter CourseID of course to be removed\");\n\t\t\tint cid = scanner.nextInt();scanner.nextLine();\n\n\t\t\tAdminOperation.getInstance().removeCourse(cid);\n\n\t\t\tSystem.out.println(\"----------Course Removed---------\");\n\n\t\t}catch (Exceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all FeedSubscriber to a given Channel.
public Collection getFeedSubscriberByChannelURL(String locationURL) { return getHibernateTemplate().find( "from FeedSubscriber f where f.channel.locationString like ?", locationURL, Hibernate.STRING); }
[ "public Set<JSONObject> getSubscriptions(String channelID);", "List<Channel> getChannels();", "@Override\n\tpublic List<Channel> queryAll() {\n\t\treturn query(\"select * from razor_channel\");\n\t}", "public Set<String> getSubscribedChannels() {\n return channels.keySet();\n }", "@Nonnull\n\tList...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by akwei on 9/15/14.
public interface EntityCopier { public void copy(Object from, Object to); }
[ "@Override\n public void extornar() {\n \n }", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n \tpublic void init() {\n \n \t}", "@...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update preview while mouse is pressed
public void mouseDragged(MouseEvent e) { if (drawing == true) { prevX = endX; prevY = endY; endX = e.getX(); endY = e.getY(); updateShape(); } }
[ "public void refreshPreview() {\n \t\tpnDrawing.refreshPreview();\n \t}", "void switchToPreview() {\n right.setCurrentPage(0);\n preview.queueDraw();\n }", "@Override\n\tpublic void frame() {\n\t\tif (focused)\n\t\t\tcursorAnim.step(1.0 / p.frameRate);\n\t}", "private void pointerPB_Clicke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all bases in this map.
public List<Base> getBases() { return new ArrayList<>(bases); }
[ "Collection<? extends Type> getBases();", "public Collection<Component> getAll() {\n return map.values();\n }", "public ArrayList<NitroBase> getNitroBases() {\n return nitroBases;\n }", "public Stream<BASE> getUnmatchedBases() {\n return bases.stream().filter(base -> !baseToRaw.containsKey(ba...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The element in this matcher is the last child of its type (tag name)?
abstract protected boolean isLastOfType();
[ "private RepeatableElement getLastChild(RepeatableElement repeatableElement) {\n if (repeatableElement.getChild() != null) {\n return getLastChild(repeatableElement.getChild());\n } else {\n return repeatableElement;\n }\n }", "@DISPID(10) //= 0xa. The runtime will pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Required Passes: C353,C357 Element Tested: CRV Interbucket (diff sign) Risk Measure: Vega & Curvature Group: Credit
@Test public void testC370() { List<FixedAmount> fixed = Collections.emptyList(); List<NotionalFactor> factors = Collections.emptyList(); List<Notional> notional = Collections.emptyList(); List<ProductMultiplier> multipliers = Collections.emptyList(); List<Sensitivity> sensitivities = Arrays.asLis...
[ "@Test\n public void presentValueNoConvexityAjustment() {\n double mqExpected = MQ_3M_CAL[2]; // Dec 14 price\n double pvExpected = (mqExpected - LAST_MARGIN_PRICE_ERZ4) * NOTIONAL * FUTURE_FACTOR * QUANTITY_ERZ4;\n MultiCurrencyAmount pvComputedDsc = ERZ4_TRA.accept(PVDC, MULTICURVE_DSC);\n assertEqua...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: private / renamed from: b
public /* synthetic */ void m60149b() { popBack(); }
[ "protected void method_5557() {}", "protected void a() {}", "private B000066() {\r\n\r\n\t}", "public abstract void mo30461b();", "protected abstract void mo3493a();", "public String e()\r\n/* 17: */ {\r\n/* 18:16 */ return this.b;\r\n/* 19: */ }", "public abstract void mo1443b();", "@Over...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
protected void onStart() { if (D) Log.d(TAG, " onStart"); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); boolean openResult = false; mReader = BTReader.getReader(mContext, mAccessHandler); if (mReader != null) openResult = mReader.SD_Open(); ...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected void onPause() { super.onPause(); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called at the end of the menu's lifetime.
public void release() { if (mChannelTuner != null) { mChannelTuner.removeListener(mChannelTunerListener); } if (mTvView != null) { mTvView.setOnScreenBlockedListener(null); } }
[ "@Override\n protected void OnClose() {\n menuCounter = 0;\n HelperFunctions.ClearAll();\n }", "@Override\r\n\tprotected void _menu() {\n\t\tfinish();\r\n\t}", "public void onCloseMenu() {\n selectedMenuBarItem.setNormalState();\n selectedMenuBarItem = null;\n lockLayer ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
salario total do empregado constructors
public Operario(String nome, String endereço, String telefone) { super(nome, endereço, telefone); }
[ "public SalariedEmployee(){\n super();\n weeklySalary = 0.0;\n }", "public SalariedEmployee() \r\n\t{\r\n\t\tthis.salary = 0;\r\n\t}", "public TOTAL()\n {\n }", "public Calculatorscientific()\n {\n // initialise instance variables\n super.jumlahobject += 1;\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
actually compute the hamming distance between two rows using the amount of bits set in an XOR of both rows
private int getRowsHammingDistance(int row1, int row2) { if (row1 == row2) return 0; // one BitSet needs to be a clone because it's values will be changed by // the XOR-operation BitSet bitsRow1 = (BitSet) rows.get(row1).clone(); BitSet bitsRow2 = rows.get(row2); // the Hamming distance is the number of...
[ "private static int hammingDistance(int x, int y) {\n int xor = x ^ y;\n int setBits = 0;\n\n while (xor > 0) {\n setBits += xor & 1;\n xor >>= 1;\n }\n return setBits;\n }", "public static int hammingDistanceBitShifting(int x, int y) {\n int xor ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
static factory that returns a nonshortcut validator
static Checker forceCheck(Node node, List<Detail> details) { return new Checker(node, details, true); }
[ "protected CustomValidator() { }", "private Validations() {}", "public static PasswordValidator buildValidator( boolean forceSpecialChar,\r\n boolean forceCapitalLetter,\r\n boolean forceNumber,\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a object rValue.
void writeObject(Object rValue);
[ "public void write(T value, ObjectWriter writer) throws Exception ;", "S write(T object);", "public void write(Object obj) {\n\t\t\n\t}", "public void writeValue(OutputStream dest, Object value);", "@Override\n void writeObject(Object obj) throws IOException;", "public void writeObject(Object obj)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Default Constructors / Override OnDraw to draw on View using Canvas
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); //Paint background with blue canvas.drawColor(Color.BLUE); int width = getWidth(); int height = getHeight(); int cellWidth = getCellWidth(); int cellHeight = getCellHeight(); for...
[ "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void draw(Canvas arg0) {\n\n\t}", "@Override\n protected void onDraw(Canvas _canvas) {\n super.onDraw(_canvas);\n\n /* Background Color */\n /*\n Drawable d = ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: e
private static C0534a m583e(String str) { int i; int charAt = str.charAt(0) - 48; if (str.charAt(1) != ':') { i = 2; charAt = (charAt * 10) + (str.charAt(1) - 48); } else { i = 1; } i++; int i2 = i + 1; i = ((str.charAt(...
[ "@Override protected void process (int e) {\n\t\t}", "@Override\n\tpublic void eee() {\n\t\t\n\t}", "public void e() throws c {\n for (i a2 : this.f13971e) {\n a2.e();\n }\n }", "@Override\n\tpublic void visitEnemigo(Enemigo e) {\n\n\t}", "public int e() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populate the world with bombs and a crosshair.
private void populate() { addObject(new Bomb(), L/3, H-30); addObject(new Bomb(), L/3-50, H-30); addObject(new Bomb(), L/3+50, H-30); addObject(new Dart(), L/2 , H/2); addObject(counter, 100, H-30); }
[ "public MyWorld3()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n //this chunck of code should not be changes and MUST be included\r\n //in your solution\r\n super(600, 400, 1);\r\n for (int loop=0; loop<20; loop=loop+1)\r\n {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HashMap idToNode; HashMap idToWay = new HashMap();
public Graph(GraphNode startNode, GraphNode endNode) { this.startNode = startNode; this.endNode = endNode; this.startX = startNode.getX(); this.startY = startNode.getY(); this.endX = endNode.getX(); this.endY = endNode.getY(); }
[ "private void buildMap() {\n \t\tattr2id = new HashMap<String, List<String>>();\n \n \t\tfinal Iterator<CyNode> it = Cytoscape.getRootGraph().nodesIterator();\n \n \t\tString nodeID = null;\n \t\tNode node = null;\n \t\tString attributeValue = null;\n \t\tList<String> nodeIdList = null;\n \n \t\twhile (it.hasNext()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
write your code here
public static void main(String[] args) { final double RATE = .75; // constant double totAmount = 23.7; int num = 5; double num2; num = (int)totAmount; // explicit casting totAmount = num; //implicit int a = 25; num2 = a + 3.0 / 4 - 12 * (9 - 6); //...
[ "void stuffForYouToDo() {\n\t\t// Write your code here...\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THIS SPACE\r\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomethiing3() {\n\n\t}", "@Override\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected void executeInternal(JobExecutionContext context) throws JobExecutionException { LOG.info("hi {}", this.name); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor takes a resource bundle name and parses it for required parameters
public AuthConfig(String bundleName) { try { ResourceBundle bundle = ResourceBundle.getBundle(bundleName); setType(AuthConfig.Type.valueOf(bundle.getString(AUTH_TYPE).toUpperCase())); if (Type.DATABASE.equals(_type)) { setConnectionUrl(bundle.getString(AUTH_CONNECTION_URL)); setLoginName(bundle.get...
[ "public GenericBundle(String bundleName)\n\t{\n\t\tthis.bundleName = bundleName;\n\t\tthis.textResource = ResourceBundle.getBundle(bundleName + \".resources.textRes\", Locale.getDefault());\n\t}", "public void initialize(URL url, ResourceBundle rb) {\n\n\n }", "public I18n(ResourceBundle bundle)\n\t{\n\t\tse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__WheneverStatement__Group_1_1__0" $ANTLR start "rule__WheneverStatement__Group_1_1__0__Impl" InternalAgreeParser.g:7364:1: rule__WheneverStatement__Group_1_1__0__Impl : ( During ) ;
public final void rule__WheneverStatement__Group_1_1__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAgreeParser.g:7368:1: ( ( During ) ) // InternalAgreeParser.g:7369:1: ( During ) { // InternalAg...
[ "public final void rule__XRelationalExpression__Group_1_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalScripting.g:4480:1: ( rule__XRelationalExpression__Group_1_1_0_0__1__Impl )\n // InternalScripting.g:4481:2: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of register method, of class UserDao.
@Test public void testRegisterCorrect() { System.out.println("register"); User u = new User(3, "lukegoss7", "b7542fd1b209c1b414e1d175c425616fa36c9e686d71025a373f79396cd1e746", 50.30, "Luke", "Goss", "123 Bakers Street", "Drogheda", "Louth", 5.0, 1); UserDao instance = new UserDao(); ...
[ "@Test\r\n\tvoid registerUserTest() {\n\t\tuser.setUsername(\"NewUser\");\r\n\t\tuser.setPassword(\"pass\");\r\n\t\tassertTrue(db.registerUser(user));\r\n\t\t\r\n\t}", "@Override//注册校验\n\tpublic boolean register(User user) {\n\treturn userDao.register(user);\n\t}", "@Test\n public void testRegister() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ParameterSetRepository__Group__4__Impl" $ANTLR start "rule__ParameterSetDefinition__Group__0" InternalComponentParameter.g:2653:1: rule__ParameterSetDefinition__Group__0 : rule__ParameterSetDefinition__Group__0__Impl rule__ParameterSetDefinition__Group__1 ;
public final void rule__ParameterSetDefinition__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalComponentParameter.g:2657:1: ( rule__ParameterSetDefinition__Group__0__Impl rule__ParameterSetDefinition__Group__1 ) // Internal...
[ "public final void rule__Parameter__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../de.gebit.integrity.dsl.ui/src-gen/de/gebit/integrity/ui/contentassist/antlr/internal/InternalDSL.g:10372:1: ( rule__Parameter__Group__0__Impl r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Grants the users group permission to read the mnt folder
private void setMntDirectoryPermissions(){ users.addAuthorizedRead(mnt); //Grants the user administrator permission to read and write the mnt folder administrators.addAuthorizedReadWrite(mnt); }
[ "private void sdCardPermissionNaugot() {\r\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\r\n StorageManager sm = getSystemService(StorageManager.class);\r\n if (sm != null && sm.getStorageVolumes().size() == 2 && sm.getStorageVolumes().get(1).isRemovable()) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set single child viewpoints node, replacing prior array of existing nodes (if any). Note: according to Object Model for X3D (OMX3D), acceptable node types are limited to HAnimSite.
@Override public void setViewpoints(X3DNode newValue) { if (newValue == null) { viewpoints.clear(); // newValueNullClearsFieldReturnVoid return; } if (newValue instanceof HAnimSite) { for (HAnimSite element : viewpoints) ((X3DConcreteElement) element).clearParentObject(); // remove references ...
[ "public void setChild(ItemNode<E> child) {\n\tthis.child = child;\n }", "public void setNeighborObjects(Node[] n) {\n\t\t\n\t}", "public abstract void setParent(Node n);", "void setViewPoint(Tuple3f point);", "public void setNodes (\n\tSnake2DNode[] node\n);", "public void replace(int paramInt1, int pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset every drivetrain sensor
public synchronized void resetAllSensors() { //don't be an idiot , you know what this does gyro.reset(); leftE.reset(); rightE.reset(); }
[ "public void reset_neuron() {\n V = Vreset;\n timestamp = 0.0f;\n }", "public void reset_drive_encoders ()\n {\n //\n // Reset the motor encoders on the drive wheels.\n //\n reset_left_drive_encoder ();\n reset_right_drive_encoder ();\n }", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public List<Department> findByPage(int begin,int pageSize) { DetachedCriteria criteria=DetachedCriteria.forClass(Department.class); List<Department> lists=this.getHibernateTemplate().findByCriteria(criteria, begin, pageSize); if(lists!=null&&lists.size()>0){ return lists; } return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Comparator for sorting the elements in a hashmap by distance as value
public static ArrayList<Integer> sortHashMapByValue( final HashMap<Integer, Float> map) { ArrayList<Integer> keys = new ArrayList<Integer>(); keys.addAll(map.keySet()); ArrayList<Integer> sortedKeys = new ArrayList<Integer>(); Collections.sort(keys, new Comparator<Integer>() { @Override public int com...
[ "private LinkedHashMap<Location, Float> sortByComparator(LinkedHashMap<Location, Float> hmap) {\n\t\tList<Map.Entry<Location, Float>> list = new LinkedList<Map.Entry<Location, Float>>(hmap.entrySet());\r\n\t\t \r\n\t\t// Sort list with comparator, to compare the Map values\r\n\t\tCollections.sort(list, new Comparat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the given Option/String/Number/Boolean to the CheckList.
public void add(Object option) { if (option instanceof Option) { getOptionList().add((Option) option); } else if (option instanceof String) { getOptionList().add(new Option(option.toString())); } else if (option instanceof Number) { getOptionList().a...
[ "protected void addOption(Option option) {\n options.add(option);\n }", "@Override\n\tpublic void addOption() {\n\t\t\n\t}", "public void addOption(String option) {\n \n if(optionCounter == 0) {\n \n options.clear();\n \n }\n \n options...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subclasses must override this method to return "this"
protected abstract T self();
[ "public Letra getThis() {\n return this;\n }", "private Activity getThis() {\n\t\treturn this;\n\t}", "@Override\n\tprotected Builder self() {\n\t\treturn this;\n\t}", "public final BUILDER getThis() {\n return this;\n }", "@Override\n public Item currentItem() {\n return this;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "notesViewPr" element
public org.openxmlformats.schemas.presentationml.x2006.main.CTNotesViewProperties getNotesViewPr() { synchronized (monitor()) { check_orphaned(); org.openxmlformats.schemas.presentationml.x2006.main.CTNotesViewProperties target = null; target = (org.openxmlformats...
[ "public java.lang.String getNotes()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NOTES$12, 0);\n if (target == null)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check whether traffic camera image displayed
public boolean validateTrafficCameraImage() { return driver.findElement(By.xpath("//*[@id='pageCameraList']/div[@role='main']/div[@class='geo-content']/img")) .isDisplayed(); }
[ "public boolean hasCamera() {\n return camera_ != null;\n }", "public boolean takePicture() {\n initCamera();\n if (!camera.freshImage()) {\n if (RobotMap.DEBUG) {System.out.println(\"::: Camera: no picture\");}\n return false;\n }\n if (RobotMap.DEBUG) {Syste...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
AD Factory 15.5 Release: Import By CSN to Physical Inventory END
public byte[] getImportFile() { return importFile; }
[ "private void addInvInvData() {\n String lQuery = \"SELECT part_no_db_id, part_no_id FROM eqp_part_no WHERE PART_NO_OEM = '\"\n + iPartNoOem1 + \"' AND MANUFACT_CD = '10001' AND inv_class_cd = 'ACFT'\";\n\n PurchaseOrderTest lDataSetup = new PurchaseOrderTest();\n simpleIDs lPartNoIds = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ 1495181 ] Dotless i and tilde not handled in preview
@Test public void testLayout() throws IOException { String layoutText = layout( "<font face=\"arial\">\\begin{abstract}<BR><BR><b>Abstract: </b> \\format[HTMLChars]{\\abstract}\\end{abstract}</font>", t1BibtexString()); assertEquals( "<font face=\"ari...
[ "public final void mTilde() throws RecognitionException {\n try {\n int _type = Tilde;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // sql2003Lexer.g:810:2: ( '~' )\n // sql2003Lexer.g:810:5: '~'\n {\n match('~'); \n\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional fixed32 my_ip = 1;
public Builder setMyIp(int value) { bitField0_ |= 0x00000001; myIp_ = value; onChanged(); return this; }
[ "private int getIP() {\n return IP;\n }", "public void setIp(String tmp) {\n this.ip = tmp;\n }", "public String myIpAddressEx();", "int setMasterIP(String ipaddr);", "public void setIpAddress(String tmp) {\n this.ipAddress = tmp;\n }", "private void setPreciseIp(int value) {\n bi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Traverses the xpath and returns the resulting object. Primitive types are wrapped into objects.
public Object getValue(String xpath) { return getValue(xpath, compileExpression(xpath)); }
[ "private Object getByXPath(String p_xPathString, QName p_xPathReturnType) {\n return getByXPath(p_xPathString, null, p_xPathReturnType);\n }", "public WebElement findElementByXPath(String xpath);", "public abstract SpinXPathQuery xPath(String expression);", "public void testProcessSimpleXpath() thro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of edgeExists method, of class VizLincDB.
@Test public void testEdgeExists() { assertTrue(vizlincDB.edgeExists(document1, mention1Alice, L_DOCUMENT_TO_MENTION)); assertTrue(vizlincDB.edgeExists(mention1Alice, document1, L_DOCUMENT_TO_MENTION)); assertFalse(vizlincDB.edgeExists(document1, mention2Bob, L_DOCUMENT_TO_MENTION)); }
[ "boolean containsEdge(int vId, int wId);", "boolean hasEdgeList();", "private void checkEdgeInvariant() {\n for (Vertex v : vertices) {\n // reference: https://www.runoob.com/java/java-hashmap-foreach.html\n v.getTargets().forEach((key, value) -> {\n assert vertices()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when you duck the exception handling, you can use tryfinally to ensure the streams are closed
public void fn() throws Exception { InputStream in = null; try { in = new FileInputStream("filename.txt"); // do stuff with in ... } finally { in.close(); } }
[ "public void doTryFinallyTwice(OutputStream os) throws IOException {\r\n\t\tInputStream is = null;\r\n\t\ttry {\r\n\t\t\tos.write(is.read());\r\n\t\t} finally {\r\n\t\t\tis.close(); // Safe\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tos.write(is.read());\r\n\t\t} finally {\r\n\t\t\tis.close(); // Unsafe\r\n\t\t}\r\n\t}", "pri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setting up the joystick view.
private void setupJoystickView() { userX = 0; userY = 0; sizeX = 0; centerX = 0; centerY = 0; backgroundRadius = 0; handleRadius = 0; paint1 = new Paint(Paint.ANTI_ALIAS_FLAG); // Not actually seen, no // color needed. handle = new Paint(Paint.ANTI_ALIAS_FLAG); // Antialiasing makes the...
[ "public void setupJoystick(){\n joystick.setOnJoystickMoveListener(new OnJoystickMoveListener() {\n @Override\n public void onValueChanged(int angle, int power, int direction) {\n // angleTextView.setText(\"Angle: \" + String.valueOf(angle) + \"°\");\n\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
converts a string of JSON data into a Twitter object
private Twitter jsonToTwitter(String result) { Twitter twits = null; if (result != null && result.length() > 0) { try { Gson gson = new Gson(); twits = gson.fromJson(result, Twitter.class); } catch (IllegalStateException ex) { // ju...
[ "private Twitter jsonToTwitter(String result) {\r\n\t\t\tTwitter twits = null;\r\n\t\t\tif (result != null && result.length() > 0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tGson gson = new Gson();\r\n\t\t\t\t\ttwits = gson.fromJson(result, Twitter.class);\r\n\t\t\t\t} catch (IllegalStateException ex) {\r\n\t\t\t\t\t// just e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int getCount() { return verticalList.size(); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the specified value to Float data type.
static private Float toFloat(Object value){ // XXX if(value instanceof String){ String string = (String)value; return Float.valueOf(string); } else if(value instanceof Float){ return (Float)value; } else if(value instanceof Integer){ Number number = (Number)value; return Float.valueOf(n...
[ "public static float toFloat(Object value)\n\t{\n\t\treturn value == null ? 0 : Float.parseFloat(value.toString());\n\t}", "public float floatValue() {\n return (float)value;\n }", "public Float(double value) {\n\t\tthis.value = (float) value;\n\t}", "public float floatValue() {\n\t\treturn ((Float) val...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Multiplication 2 3 1 1
private static String R0(String[] fourBytes) { for (int i = 0; i < fourBytes.length; i++) { String hex = fourBytes[i]; int int1 = Character.digit(hex.charAt(0),16); int int2 = Character.digit(hex.charAt(1),16); switch (i) { case 0: tmpGF = (GF2[int1]).split(DELIMS); tmpRes[i] = tmpGF[int...
[ "public void multiply()\n\t{\n\t\t_product = _num1.multiply(_num2);\n\t}", "String multiplication(int operand1, int operand2);", "int multiply(int n1,int n2);", "private static void multiplesOfNumber() {\n\t\tint x = 30;\n\t\t//2*2*3*3\n\t\t\n\t}", "void mul()\r\n {\r\n if(first==0)\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Factory to create a new instance of this class from a JSON string.
public static FtMccMessage fromJson(final String json) throws JsonSyntaxException { Gson gson = new Gson(); return gson.fromJson(json, FtMccMessage.class); }
[ "public static <T> T fromJson(String jsonString, Class<T> clazz){\n\t\treturn gson.fromJson(jsonString, clazz);\n\t}", "public static Object fromJSON(String json, Class clazz) {\n return fromJSON(new StringReader(json), clazz);\n }", "public static <T> T fromJson(final String jsonString, final Class<T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Caches the car in the entity cache if it is enabled.
public void cacheResult(com.rental.car.model.Car car);
[ "@Override\n public void cacheResult (Book book) {\n entityCache.putResult(BookModelImpl.ENTITY_CACHE_ENABLED,\n BookImpl.class, book.getPrimaryKey(), book);\n\n book.resetOriginalValues();\n }", "@Override\n\tpublic void cacheResult(SitbStoreInfo sitbStoreInfo) {\n\t\tentityCache.putResult(SitbSto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Return the corresponding coin at the index.
public CengCoin coinAtIndex(int index) { if(index < this.cengCoins.size()) { return this.cengCoins.get(index); } else { return null; } }
[ "public CengCoin coinAtIndex(int index)\n\t{\n if(index < this.coinCount()){\n return coinList.get(index);\n }\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"CengBucket out of index\");\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t}", "cosmos.base.v1beta1.Coin getAmount(i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refresh this instance with values from the database record
protected void refresh(DB db) throws SQLException { select(db, form_id, link); }
[ "public void refreshFromDb()\n {\n assert null != _tinfo : \"No table\";\n assert null != getPkVals() : \"No PK values\";\n\n Object[] pkVals = getPkVals();\n boolean foundNotNullValue = false;\n for (Object val : pkVals)\n {\n if (val != null)\n {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Print the LCS for X[0..m1], Y[0..n1]
static void print(char[] X, char[] Y, int[][] LCS, int row, int col) { char[] lps = new char[LCS[row][col]]; int index = lps.length; int strXPtr = row; while (index > 0) { lps[index - 1] = X[strXPtr - 1]; index--; strXPtr--; } // Print the lps System.out.print("LPS of " + String.valueOf(X) + ...
[ "public static void main(String[] args) {\n\t\tint a[][] = new int[STRX.length()+1][STRX.length()+1];\n\t\ta = LCS_length(STRX,STRY);//计算a数组\n\t\t\n\t\tcomString = Print(a,STRX,a.length-1,a[0].length-1);\n\t\tSystem.out.println(\"common:\"+comString);\n\t\t\n\t}", "static int lcs(char[] X, char[] Y, int m, int n)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the graph's edges.
public List<GraphEdge> getEdges() { return edges; }
[ "public Iterable<Edge<E>> edges() {\n return edges;\n }", "public Set<GraphEdge<V, E>> getEdges();", "public Iterable<Edge> edges() {\n return edges;\n }", "public List<Node> getEdges() {\r\n\t\treturn edges;\r\n\t}", "public ArrayList<Edge> getEdges() {\n return this.edges;\n }", "@NonN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
displayArea: computes the area of a given Shape.
public static double computeArea (Shape s) { return s.area(); }
[ "@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"Area of rectangle: \" + area);\r\n\t}", "public double getArea() {\n\t System.out.println(\"Shape unknown! Cannot compute area!\");\n\t return 0; // Need a return to compile the program\n }", "@Override\n\tpublic void display() {\n\t\t// ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This helper method configures the wobble goal grabber to either be opened or closed.
public void configureWobbleGrabber(boolean isClosed){ // If true is passed as the parameter, the wobble grabber will close. if(isClosed){ wobbleGrabber.setPosition(.5); } // Otherwise, the wobble grabber will remain open. else{ wobbleGrabber.setPosition(0)...
[ "private RailgunBot() {\n try {\n System.out.println(\"Entering Discord Bot build state!\");\n discordBot = configureBot().build();\n } catch (LoginException e) {\n System.exit(1);\n }\n }", "public void bindIlluminanceGoal(FollowMeConfiguration followMeCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String action = request.getParameter("action");
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HouTaiDingDanService houTaiDingDanService = new HouTaiDingDanService(); String json = houTaiDingDanService.kongZhiTai(request, response); // if (action != null && !action.trim(...
[ "@Override\n public String getStrutsAction(HttpServletRequest request) {\n\treturn null;\n }", "protected static String extractAction(Request req) {\n String action = req.getParameter(Constants.ACTION_PARAM);\n if (action != null) {\n /* TC: still support the deprecated syntax */...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the requestedSize. The new size requested for this environment. Only returned when the environment status is `resizing`. Note: Querying and indexing can still be performed during an environment upsize.
public String getRequestedSize() { return requestedSize; }
[ "public int getRequestSize() {\n return requestSize;\n }", "public long getSize() {\n if(scratch == null) {\n throw new IllegalStateException(\"Scratch space has alredy been deallocated\");\n }\n \n SizeTByReference size = new SizeTByReference();\n Hyperscan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the tags for a resource, given its Amazon Resource Names (ARN). This operation supports ARNs for all resource types in Nimble Studio that support tags, including studio, studio component, launch profile, streaming image, and streaming session. All resources that can be tagged will contain an ARN property, so you d...
java.util.concurrent.Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest listTagsForResourceRequest, com.amazonaws.handlers.AsyncHandler<ListTagsForResourceRequest, ListTagsForResourceResult> asyncHandler);
[ "List<Tag> getTags() throws RestClientException;", "NeutronNetQosPolicyRuleTag getTags();", "List<ITag> getTags();", "List<String> getAssociatedTags(String tag);", "public Tag[] getTags();", "List<Tag> getAllTags();", "public ReactorResult<Concept> getAllTag_as() {\r\n\t\treturn Base.getAll_as(this.mode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the Root Context
@Override public UimaContextAdmin getRootContext() { return mRootContext; }
[ "public Context getContext() {\r\n\t\treturn Database.instance().getContextForRoot(getRootFolder());\r\n\t}", "@Override\n\tpublic String getContextRoot() {\n\t\treturn null;\n\t}", "public static Context getContext() {return context;}", "public synchronized Context getContext(){\n\t\treturn context;\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1.3 URLify: Write a method to replace all spaces in a string with '%20'. You may assume that the string has sufficient space at the end to hold the additional characters, and that you are given the "true" length of the string. (Node: If implementing in Java, please use a character array so that you can perform the oper...
public static String URLify(String input, int length) { char[] array = input.toCharArray(); int l = input.length(); l--; for(int i=length-1; i>=0; i--) { if(array[i] != ' ') { array[l--] = array[i]; } else { array[l--] = '0'; ...
[ "private static String urlifyInPlace(String str) {\n int len = str.length(), numOfSpaces = 0;\n for (int i = 0; i < len; i++) {\n if (str.charAt(i) == ' ') numOfSpaces++;\n }\n char[] charArray = new char[(len - numOfSpaces) + (3 * numOfSpaces)];\n int i = 0;\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()){ case R.id.action_addproduct: Intent addproductIntent = new Intent(SetLocActivity.this, CreateProductActivity.class); addproductIntent.putExtra("userid", userid); startActivity(addproductIntent); break; ...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method registers a POA. It has actually two functions: Register a POA that has not yet been registered. It is the added to the server table. Reactivating a POA that is not active, but has already an entry in the server table The reason for using only one method for those two tasks is that it is much more difficult...
@Override public void register_poa(String name, String server, String host, int port) throws IllegalPOAName, DuplicatePOAName, UnknownServerName { ImRServerInfo _server = null; ImRPOAInfo _poa = null; boolean remap ...
[ "public void doRegistration() throws ServerException, SQLException;", "public void registrarPaciente() {\n RequestContext requestContext = RequestContext.getCurrentInstance();\n selected.setTipoIdentificacion(tipoIdentificacion);\n asignarFechaApertura();\n ejbFacade.create(selected);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) throws Exception { process(); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The async counterpart of Ldv_Service.
public interface LdVServiceAsync { void LdvServer(String sLogin, String sPassword, AsyncCallback<String[]> callback); }
[ "public interface LDMServiceAsync {\n\n void handleXMLArchivingOperation(String input, String xqueryName, String user,\n AsyncCallback<Boolean> callback);\n}", "public interface PLIServiceAsync {\n\n\tvoid getData(String pipenr, AsyncCallback<PLIData> callback);\n\n\tvoid updateDB(String pipenr, String binn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move an amazon and shoot an arrow.
public boolean move(int row_s, int col_s, int row_f, int col_f, int arow, int acol, byte colour) { return moveAmazon(row_s, col_s, row_f, col_f, colour) && placeArrow(row_f, col_f, arow, acol); }
[ "public void move() {\r\n\t\tupdate(trajectory[0] * ARROW_SPEED, trajectory[1] * ARROW_SPEED);// calls update() in Kinematic class\r\n\t\t// Determines whether an arrow is still active\r\n\t\tif (position[1] < 0)\r\n\t\t\tsetVisible(false);// returns whether Arrow is still active\r\n\t}", "private void movePile()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize the contents of the frame.
private void initialize() { frmListNome = new JFrame(); frmListNome.setTitle("LIST"); frmListNome.setBounds(100, 100, 450, 300); frmListNome.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frmListNome.getContentPane().setLayout(null); JButton btnSalvar = new JButton("Salvar"); btnSalvar.addActi...
[ "public void initializeFrame();", "private void initialize() {\n\t\tsetFrame();\n\t\tsetheader();\n\t\tsetList();\n\t}", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public frame() {\n initComponents();\n read_init_config();\n }", "private void initialize() {\n\t\tinitData...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resets stats to zero when option is touched in stats fragment
public static void resetStats() { MainActivity.setting.resetInt("monstersDestroyed"); MainActivity.setting.resetInt("totalCoins"); MainActivity.setting.resetInt("totalCardsPlayed"); MainActivity.setting.resetInt("monstersPlayed"); MainActivity.setting.resetInt("manaPlayed"); ...
[ "public\n\tvoid\n\tresetStats()\n\t{\n\t\tthis.level = this.lines = this.score = 0;\n\t\tthis.isGameOver = this.isPaused = this.isStarted = false;\n\t}", "public void resetStats() {\n\t\tnetUsage = new NetUsageList();\n\t\tappStateMap = new AppStateMap();\n\t\tpowerStats = new PowerStats();\n\t\tnetsArray = new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an input stream using which one will be able to read a file from an external storage device.
public InputStream readFile( String fileName ) throws IOException;
[ "InputStream create();", "private InputStream createInputStream() throws TTransportException {\n InputStream is;\n try {\n if (inputStream_ != null) {\n ((TruncableBufferedInputStream) inputStream_).trunc();\n is = inputStream_;\n } else {\n is = new TruncableBufferedInputStre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add drawing to array of drawings
public void AddDrawing(Drawing drawing) { drawings.add(drawing); }
[ "public void addDrawing(Drawable drawing)\n {\n this.drawingList.add(drawing);\n }", "void updateDraws(List<PoolDraw> draws, Part partForNewDraws);", "public void draw() {\n for (DrawProcedure procedure : drawProcedureList) {\n procedure.draw();\n }\n }", "@Override\n publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
'array' arrayDefinition=[ArrayTypeDef] '[' exprList+=Expr (',' exprList+=Expr) ']'
public Group getGroup() { return cGroup; }
[ "public TArrays() {\n\t\tsuper(\"T_ARRAYS\", org.jooq.test.oracle.generatedclasses.test.Test.TEST);\n\t}", "@Override\n\tpublic String getType() {\n\t\treturn \"ARRAY\";\n\t}", "private JSDocTypeExpression parseArrayType() throws ParseError {\n SourceLocation loc = loc();\n List<JSDocTypeExpression> e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gives a deep copy of the board. Every object is copied.
public Block deepCopy() { Block b = new Block(); for (int i = 0; i <= 8; i++) { b.setTile(this.getTile(i).deepCopy(), i); } return b; }
[ "public Board deepCopy() {\r\n return board.deepCopy();\r\n }", "public Board deepCopyBoard(Board board) {\n return new Board(board);\n }", "@Override\n public Board copy() {\n return new Board(this);\n }", "public abstract Board copy();", "BoardInterface clone();", "public Board create...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deleting a specific Media amongst all the Media of the user
@Path("/{id}/media/{idMed}") @RolesAllowed("USER") @DELETE public Response deleteMediaOfUser(@PathParam("id") int id, @PathParam("idMed") int idMed) throws SQLException { List<Media> med = new UserDao().getAllMedia(id); for(Media m : med){ if(m.getMedia_id()==idMed) new MediaDao().delete(idMe...
[ "public void deleteUserMedia(int id)\r\n {\r\n \tMedia media;\r\n \tSet<Integer> mediaKeys = content.keySet();\r\n \tfor(int key : mediaKeys)\r\n {\r\n \tmedia = content.get(key);\r\n \tif(media.getUploaderId() == id)\r\n \t{\r\n \t\tcontent.remove(key);\r\n \t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
...here i'm waiting 5 seconds before hiding the custom dialog ...you can do whenever you want or whenever your work is done
@Override public void run() { progressDialog.dismiss(); }
[ "private void closeDialog() {\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n\n kProgressHUD.dismiss();\n\n }\n }, 5000);\n\n }", "public void hideLoaddingDelayed() {\n if (dialog == null) return;\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
distancia = velocidade diferenca de tempo de chegada
public Location run(double tdoa12, double tdoa23, double tdoa13) { double vTdoa12 = tdoa12 * Utils.speedOfSoundCmBySeconds(); double vTdoa23 = tdoa23 * Utils.speedOfSoundCmBySeconds(); double vTdoa13 = tdoa13 * Utils.speedOfSoundCmBySeconds(); Point2D mid1 = Utils.averagePoint(model.getReceptor1(), model.getRe...
[ "public void distancia(Estado a){\n double valor;\n double parte1=Math.pow(this.x-a.x,2);\n double parte2= Math.pow(this.y-a.y,2);\n parte1+=parte2;\n valor=Math.sqrt(parte1);\n this.calidad+=valor;\n }", "public void cooper12Min() {\n\n s0 = dist - 504.8;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy the content from this ByteBuff to a byte[] based on the given offset and length.
public abstract byte[] toBytes(int offset, int length);
[ "public static byte[] getbyte(byte[] array, int offset, int length) {\n byte[] result = new byte[length];\n System.arraycopy(array, offset, result, 0, length);\n return result;\n }", "byte[] readBytes(int offset, int length) {\n ByteBuffer buffer = readBlock(offset, length);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }