query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Changes state of the engine acceleration (on/off).
void setAcceleration(boolean isOn);
[ "public void accelerate() {\n setLayerToHW(this);\n }", "@Override\n protected void accelerate() {\n System.out.println(\"Bike Specific Acceleration\");\n }", "public void startEngine() {\n currentSpeed = 0.1;\n }", "public void acceleratorPedal(boolean accelerating) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test handleCollisions() for NBullets class
boolean testHandleCollisions(Tester t) { return t.checkExpect(new NBullets(10).handleCollisions(), new NBullets(10)) && t.checkExpect(new NBullets(this.mt, this.los3, 3, 2, 40).handleCollisions(), new NBullets(this.mt, this.los3, 3, 2, 40)) && t.checkExpect(new NBullets(this.lob3, this.m...
[ "public abstract void processCollisions();", "private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}", "@Test\n public void noCollisionsTest() {\n Assert.assertFalse(handler.collisions(set, cursor));\n }", "public abstract void processCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a BSON DateTime element to the writer.
void writeDateTime(String name, long value);
[ "void writeTimestamp(BsonTimestamp value);", "void writeTimestamp(String name, BsonTimestamp value);", "void writeDateTime(long value);", "public void writeParameterToDateTime(String parameterName);", "@Test\n public void testBasicWriteElements() {\n System.out.println(\"writeElements\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the given CRC with the value of this primitive type.
public void updateCRC(CRC16 _crc);
[ "public int updateCRC(){\r\n\t\tint crc_sum=new CRC().DDCRC(userdata32);\r\n\r\n\t\t// replace existing CRC in given array\r\n\t\tif(userdata32.length<21)return crc_sum; // dont step beyond - shouldnt happen\r\n\t\tuserdata32[19]=(char)(crc_sum & 0xff); // lsb first\r\n\t\tint msb=crc_sum ;\r\n\t\tmsb>>=8;\r\n\t\tu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the QName of the given attribute node.
String getAttributeQName(Object attr);
[ "public String getAttributeQName() {\n return attributeQName;\n }", "public Attribute getAttributeByName(QName name);", "public java.lang.String getAttributeName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This looks at what happens with concurrent commits. However, the failure condition it looks for (subdir under subdir) is the kind of failure you see on a renamebased commit. What it will not detect is the fact that both tasks will each commit to the destination directory. That is: whichever commits last wins. There's n...
@Test public void testConcurrentCommitTaskWithSubDir() throws Exception { Job job = newJob(); FileOutputFormat.setOutputPath(job, outputDir); final Configuration conf = job.getConfiguration(); final JobContext jContext = new JobContextImpl(conf, taskAttempt0.getJobID()); ManifestCommitter...
[ "@Test\n public void testCommitLifecycle() throws Exception {\n describe(\"Full test of the expected lifecycle:\\n\" +\n \" start job, task, write, commit task, commit job.\\n\" +\n \"Verify:\\n\" +\n \"* no files are visible after task commit\\n\" +\n \"* the expected file is visibl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a feedback email body with some basic system info.
@SuppressWarnings("StringBufferReplaceableByString") private static String generateFeedbackBody(Context c) { StringBuilder sb = new StringBuilder("\n\n\n" + "(only write above this line)\n\n" + "-----------\n" + ...
[ "public String createEmailBody() {\n\t\tlogDebug(\"enter creating email body function\");\n\t\tString emailBody = getJobName() + \" Job Report\\n\\n\";\n\n\t\tif (getFeedFiles() == null || getFeedFiles().size() == 0) {\n\t\t\temailBody += \"There were NO files to process this time around\\n\\n\";\n\t\t} else {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new GuiWDLSaveProgress.
public GuiWDLSaveProgress(String title, int taskCount) { this.title = title; this.majorTaskCount = taskCount; this.majorTaskNumber = 0; }
[ "private JSlider createProgressSlider() {\n\t\tJSlider progressSlider = new JSlider(JSlider.HORIZONTAL,\n PROGRESS_MIN, PROGRESS_MAX, PROGRESS_INIT);\n\t\tprogressSlider.addChangeListener(new ChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tsendCommand(\"p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prototype: grasperCount(); Description: Return number of tentacles, arms or legs. Precondition(s): Instance object must be created Postcondition(s): number of arms legs and tentacles added returned int. Visibility: Public
public int grasperCount(){ return numLegs+numArms; }
[ "int getGCount();", "int getHerwinCount();", "int getGoalCount();", "int getWeikeCountCount();", "int getWeikeCount();", "int getGangCountCount();", "public Integer countGoals();", "int getStatsCount();", "public int getNumLegs(){\n return numLegs;\n }", "int getNumber_of_lakes();", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig NONNULL_PTR this_ptr);
public static native int ChannelHandshakeConfig_get_minimum_depth(long this_ptr);
[ "public static native void ChannelHandshakeConfig_set_minimum_depth(long this_ptr, int val);", "public static native int AcceptChannel_get_minimum_depth(long this_ptr);", "public static native int ChannelHandshakeLimits_get_max_minimum_depth(long this_ptr);", "public static native void AcceptChannel_set_minim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/////////////////////// TestCase 6 API call= GET Description= Search for repositories mentioning "cucumber" in the repository's README file and sorted by most thumbs down reactions. Validation= Status code validation //////////////////////
@Test public void getRepoWithWordInReadMe() throws ClientProtocolException, IOException{ apiUrl =prop.getProperty("searchReadmeURL"); url = serviceUrl + apiUrl; restClient = new RestClient(); closableHttpResponse = restClient.get(url); int statusCode = closableHttpResponse.getStatusLine().getStatusCode(...
[ "@Test\n\tpublic void getRepoGithub() throws ClientProtocolException, IOException{\n\t\tapiUrl =prop.getProperty(\"searchGithubURL\");\t\t\n\t\turl = serviceUrl + apiUrl;\n\t\trestClient = new RestClient();\n\t\tclosableHttpResponse = restClient.get(url);\n\t\t\n\t\tint statusCode = closableHttpResponse.getStatusLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Asigna los antecedentes de la persona
public void setAntecedentes(List<Antecedentes> antecedentes) { this.antecedentes = antecedentes; }
[ "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the a new map with the given keyvalue pair only if the current value equals oldValue. If this internal already contains the given keyvalue pair or the given key is missing or has a value not equal to oldValue, this internal is returned, no modifications are made, and no new instances are created.
@SuppressWarnings("unchecked") default ImmutableMap<K, V> setIfMatch(final K key, final V matchValue, final V newValue) { if (newValue == null) { throw new NullPointerException(); } if (matchValue == null || matchValue.equals(newValue)) { return this; } return update(key,...
[ "@Override\n public V put(K key, V value) {\n // TODO: Complete this method\n // hint: use chooseBucket to determine which bucket to place the pair in\n // hint: use rehash() to appropriately grow the hashmap if needed\n V oldValue = null;\n if (containsKey(key)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a BlueprintEvent object associated with a failure cause.
public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle, Throwable cause) { this(type, bundle, extenderBundle, null, cause); }
[ "ThrowingEvent createThrowingEvent();", "public T caseFailureEvent(FailureEvent object) {\n\t\treturn null;\n\t}", "IntermediateThrowEvent createIntermediateThrowEvent();", "CatchingEvent createCatchingEvent();", "public BlueprintEvent(BlueprintEvent event, boolean replay) {\n\t\tthis.type = event.type;\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//GENEND:initComponents This function does the scans, contacts the servers and gets all the data. One problem I ran into is that some servers can take a while to respond due to network speed or server speed. To fix this I get a list and I precache a lot of the data, then the user can scan for new printers if they want.
private void Scan_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Scan_ButtonActionPerformed // TODO add your handling code here: long start = System.currentTimeMillis(); Server_stats = new ArrayList<PrintServer>(); String[] Enviroments = Core_Code.scan_envirome...
[ "private void loadPrinters() {\n\t\ttsa.getPrinterList(new AsyncCallback<List<String>>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tWindow.alert(\"There was a problem finding printers.\\nYou will not be able to print labels.\");\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new REXHandle that should be connected to an existing native instance specified by the given pointer.
REXHandle(long pointer) { super(pointer); }
[ "Handle newHandle();", "private native void initialiseHandle(ArcomESS handle);", "public VkHandle(long nativeHandle) { \n this.nativeHandle = nativeHandle;\n }", "private REXHandle() {\r\n\t}", "public Pointer createPointer() throws NativeException {\n\t\tpointer = new Pointer(MemoryBloc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleMatchType" $ANTLR start "ruleGroupStageType" InternalEsportDsl.g:2395:1: ruleGroupStageType returns [Enumerator current=null] : ( (enumLiteral_0= 'league' ) | (enumLiteral_1= 'worldsPlayIn' ) | (enumLiteral_2= 'worldsGroup' ) | (enumLiteral_3= 'riftRivalsGroup' ) | (enumLiteral_4= 'msiPlayIn' ) | (enumL...
public final Enumerator ruleGroupStageType() throws RecognitionException { Enumerator current = null; Token enumLiteral_0=null; Token enumLiteral_1=null; Token enumLiteral_2=null; Token enumLiteral_3=null; Token enumLiteral_4=null; Token enumLiteral_5=nul...
[ "public final EObject ruleGroupStage() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_2=null;\r\n Token otherlv_7=null;\r\n Token otherlv_9=null;\r\n Token otherlv_11=null;\r\n Enumerator lv_type_3_0 = null;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo que elimina un registro en la tabla de Producto
public void eliminar(Producto producto) throws BusinessErrorHelper;
[ "public void eliminar(Producto producto) throws IWDaoException;", "public void eliminarDatos() {\n Operacion operacion = new Operacion();\n String sql = \"delete from producto where id_producto = '\" + this.id_producto + \"'\";\n operacion.ejecutar(sql);\n\n }", "private void btnEliminar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Remove the head node of the list Note: Used by remove method and next method of hash table Iterator
public HashNode<K,V> removeFirst(){ // ADD CODE BELOW HERE HashNode<K,V> curOne = this.head; size--; if(size == 1) { head = null; }else { head = head.next; } return curOne; // ADD CODE ABOVE HERE }
[ "public void removeFirst() {\n\t\thead = head.getNext();\n\t}", "public void removeHead() {\n\t\t\n\t}", "public void removeFromHead()\n {\n if (!isEmpty()) {\n Node<T> el = head;\n if (size == 1) {\n head = null;\n size = 0;\n return;\n }\n\n Node<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column sw_area_code_info.level_type
public String getLevelType() { return levelType; }
[ "java.lang.String getLevelType();", "com.github.taojoe.proto.Transform.UserLevelType getLevelType();", "public com.github.taojoe.proto.Transform.UserLevelType getLevelType() {\n com.github.taojoe.proto.Transform.UserLevelType result = com.github.taojoe.proto.Transform.UserLevelType.valueOf(levelType_);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is called to append all the column values to in clause.
private void updateInclause(StringBuffer strBuff) { strBuff.append("( "); for (int j = 0; j < colValueArray.length; j++) { if(colValueArray[j] instanceof String) { strBuff.append("'"+colValueArray[j]+"'"); } else { strBuff.append(colValueArray[j]); } if((j+1) < co...
[ "@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Apply fading animation when drop an icon to hideseat. date:2014/9/13 author:zhanggong.zg BugID:5244146
public void applyFadingEffectInHideseat() { final Drawable drawable = getIconDrawable(); if (drawable == null) return; /* YUNOS BEGIN */ //## modules(Home Shell) //## date: 2015/12/25 ## author: wangye.wy //## BugID: 7721715: set alpha of whole layer Paint paint =...
[ "void hideHotseat(boolean animated) {\n if (!LauncherApplication.isScreenLarge()) {\n if (animated) {\n if (mHotseat.getAlpha() != 0f) {\n int duration = 0;\n if (mSearchDropTargetBar != null) {\n duration = mSearchDropTar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'k8sTokenReviewerJwt'
@Test public void k8sTokenReviewerJwtTest() { // TODO: test k8sTokenReviewerJwt }
[ "@Test\n public void tokenTest(){\n User user = new User();\n user.setId(1);\n user.setImg(\"/sjgh/aga\");\n String token = JwtUtils.geneJsonWebToken(user);\n Object o = JwtUtils.checkJWT(token);\n System.out.println(token);\n System.out.println(o);\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of tai khoan doi ungs where taiKhoanDoiUngChaId = &63; and hoatDong = &63;.
@Override public int countByTaiKhoanDoiUngChaId_HoatDong( long taiKhoanDoiUngChaId, Boolean hoatDong) { FinderPath finderPath = _finderPathCountByTaiKhoanDoiUngChaId_HoatDong; Object[] finderArgs = new Object[] {taiKhoanDoiUngChaId, hoatDong}; Long count = (Long)finderCache.getResult(finderPath, finderArgs,...
[ "@Override\n\tpublic int countByLoaiTaiKhoan_HoatDong(\n\t\tint loaiTaiKhoan, Boolean hoatDong) {\n\n\t\tFinderPath finderPath = _finderPathCountByLoaiTaiKhoan_HoatDong;\n\n\t\tObject[] finderArgs = new Object[] {loaiTaiKhoan, hoatDong};\n\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for objects of class ClientInformation
public ClientInformation(){ clientList = new ArrayList<>(); }
[ "public ClientInformationTest()\n {\n }", "public ClientInfo() {\n\t\tthis.ip=\"0.0.0.0\";\n\t\tthis.port=-1;\n\n\t\tlogger.log(\n\t\t\tModuleID.NETWORKING,\n\t\t\tLogLevel.INFO,\n\t\t\t\"created dummy ClientInfo object\"\n\t\t);\n\t}", "public ClientDetailsEntity() {\n\t\t\n\t}", "public TblclientsInfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property la_service.
public java.lang.String getLa_service() { return la_service; }
[ "public void setLa_service(java.lang.String la_service) {\r\n this.la_service = la_service;\r\n }", "LocalService getService() {\n\t return LocalService.this;\n\t }", "public Service getService(){\r\n return this.service;\r\n }", "LocService getService() {\n return Loc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
receiving ack from users, recend decision each 3 seconds if no ack received
public void handleAck() { long start = System.currentTimeMillis(); long end = start; int userCnt = users.size(); System.out.println("handling ack in Server"); while(CommitDecision.size() != 0){ if(end - start >= 3000) { for(String user: CommitDecision.keySet()) { System.out.println("resend ack to...
[ "private void AwaitingAck() { // if send fails the First time\n\t\ttry {\n\t\t\tThread.sleep(timeoutWindow); // wait for our timeout value\n\t\t} catch (InterruptedException ex) {\n\t\t\tThread.currentThread().interrupt();\n\t\t}\n\t\tif (ackQueue[packet.getSequenceNum()] == true) { // if we got an ack for our pack...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Property Gets all property values for the hadithChapterNo property.
Collection<? extends Object> getHadithChapterNo();
[ "public int getChapterNumber() {\n return chapterNumber;\n }", "public String getChapter()\n\t{\n\t\treturn probChapter;\n\t}", "public String getChapter1() {\n return chapter1;\n }", "public Integer getChapterId() {\n return chapterId;\n }", "public void setChapterNumber(int v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the default root element local name for the given content type
public static String getDefaultRootElementLocalName(final MediaType mediaType) { return getRootElementLocalNameMap().get(mediaType.toBaseTypeString()); //return the root element corresponding to the given content type base type, if we have one }
[ "public String getXMLBaseNodeName();", "com.sun.java.xml.ns.j2Ee.XsdQNameType getRootTypeQname();", "public String getRootElementLocalName() {\n return rootElementLocalName;\n }", "public String getRootElementName() {\n return rootElementName;\n }", "public QName getRootE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
init object with other PosCheckTaxScRef
public PosCheckTaxScRef (PosCheckTaxScRef oPosCheckTaxScRef) { init(); this.ctsrId = oPosCheckTaxScRef.ctsrId; this.by = oPosCheckTaxScRef.by; this.oletId = oPosCheckTaxScRef.oletId; this.bperId = oPosCheckTaxScRef.bperId; this.chksId = oPosCheckTaxScRef.chksId; this.citmId = oPosCheckTaxScRef.citmId; ...
[ "public Tax() {\n\t}", "void setTax(x0101.oecdStandardAuditFileTaxPT1.TaxDocument.Tax tax);", "public TCpyTaxationOffencesExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public TaxType(){\n\t\tthis.isExempted=false;\n\t\tthis.isImported=false;\n\t}", "public EasytaxTaxations() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks a set of tables to ensure they are all empty
public static boolean areTablesEmpty(SqlDb db, List<String> tables) throws SQLException { Calendar before = Calendar.getInstance(); if(Config.getRunStatistics()){ for (String t : tables) { ResultSet res = db.evaluateQuery("SELECT 1 FROM " + t + " " + db.getSqlTranslator().getFirstRow()); if (!res....
[ "public static boolean emptyTempTables() {\n ArrayList temp_tables = new ArrayList();\n // Since the mrblock depends on mrfile it actually\n // could be skipped but this way the program will also\n // check if the tables exist and give an error back if any doesn't.\n temp_tables.a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the password from the callbacks (that the callback handler has already handed the password to) that is, the password from the login attempt. Must only be used for authentication mode, not for identity assertion mode.
private String getPasswordHave(String userName, Callback[] callbacks) throws LoginException { PasswordCallback passwordCallback = (PasswordCallback)callbacks[1]; char[] password = passwordCallback.getPassword(); passwordCallback.clearPassword(); if (password == null || password.length < 1) { ...
[ "public String getPassword() {\r\n\t\treturn authenticator.getPassword();\r\n\t}", "public String getDecodedPassword() {\r\n return this.password;\r\n }", "String getPassword();", "com.google.protobuf.ByteString getPassword();", "public String getPassword()\n {\n String info=userInfo;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Based on user's selections for LPF, set the following: filter length, stop band attenuation, cutoff frequencies and the coefficients' groups to use
public void set_LP_FilterCoefficients() { switch (Integer.parseInt(min_stopband_atten.substring(0, 2))) { case 60: filterTaps = 63; switch (cutoff) { case "5Hz-45Hz": h = Constants.LP60_h1; filterSpec...
[ "private void set_BP_FilterCoefficients() {\n switch (Integer.parseInt(min_stopband_atten.substring(0, 2))) {\n case 60:\n filterTaps = 63;\n switch (cutoff) {\n case \"0Hz-30Hz,70Hz-100Hz\":\n filterTaps = 84;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata and description as arguments.
public TransferReversal update(TransferReversalUpdateParams params, RequestOptions options) throws StripeException { String path = String.format( "/v1/transfers/%s/reversals/%s", ApiResource.urlEncodeId(this.getTransfer()), ApiResource.urlEncodeId(this.getId())); ApiResourc...
[ "@Override\n public TransferReversal update(Map<String, Object> params, RequestOptions options)\n throws StripeException {\n String path =\n String.format(\n \"/v1/transfers/%s/reversals/%s\",\n ApiResource.urlEncodeId(this.getTransfer()), ApiResource.urlEncodeId(this.getId()))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the names of all databases in this catalog.
List<String> listDatabases() throws CatalogException;
[ "public String[] getDatabaseNames() {\n return context.databaseList();\n }", "public Collection<String> getDatabaseNames() {\n\t\treturn databases.keySet();\n\t}", "public static String[] getAllDatabasesNames()\n {\n return SDMHelpers.extractAllHashMapEntryNames(DATABASES);\n }", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Scan j(s)script file for dependencies and return those found, in no particular order.
public Collection<Dependency> getDependencies(File jsScriptFile, String... excludes) throws FileNotFoundException { this.excludes = Arrays.asList(excludes); scanner = new Scanner(); scanner.bind(Assignment.class, new AssignmentHandler()); scanner.bind(VariableDeclaration.class, new VariableDeclarati...
[ "private void scanJobDependencies() {\t\t\n\t\tfor(String jobName:this.jobRegistry.getJobNames()) {\t\t\t\n\t\t\tString jobDirectory = this.getJobStoreURI(jobName).getPath()+SimpleJobConfigurationService.LIBRARY_FOLDER;\n\t\t\tFile folder = new File(jobDirectory);\n\t\t\tFile[] listOfFiles = folder.listFiles(); \n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test getProjectPhases(long[]) for a normal case. All the expected projects are not empty.
public void testGetProjectPhasesLongArray_Normal() throws Exception { Project[] projects = persistence.getProjectPhases(new long[] {2, 1}); // validate the sequence. assertEquals("1st project should have id=2", 2, projects[0].getId()); assertEquals("2nd project should have id=1", 1, pro...
[ "public void testGetProjectPhasesLongArray_Special() throws Exception {\n Project[] projects = persistence.getProjectPhases(new long[] {1234545, 3, 923435});\n\n // validate the results.\n assertNull(\"Should return null project.\", projects[0]);\n assertNull(\"Should return null project...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the index of the highest value less than or equal to 'v' in the sorted array 'd' We use binary search and return 1 if the lowest value is still too high
public static int indexOf(double v, Double[] d) { int low = -1; int high = d.length; while (high - low > 1) { int mid = (int) ((high + low) / 2.0); // Explicit casts needed for Javascript ("2.0" makes inspections ok) if (d[mid] <= v) low = mid; ...
[ "private static int findIndexOfLargest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.NEGATIVE_INFINITY;\n\t\tfloat temp;\n\t\tfor (int d=0; d<Constants.ACCEL_DIM; ++d) {\n\t\t\ttemp = vector[d];\n\t\t\tif (temp<0.0f)\n\t\t\t\ttemp = -temp;\n\t\t\t\n\t\t\tif (temp>value) {\n\t\t\t\tvalue = temp;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enable or disable the blur effect on the action bar. Disabled by default.
@Override protected boolean isActionBarBlurred() { return true; }
[ "@Override\n protected boolean isActionBarBlurred() {\n return true;\n }", "protected boolean isActionBarBlurred() {\n return BlurDialogEngine.DEFAULT_ACTION_BAR_BLUR;\n }", "public void blur(){\n\n\n }", "public void setBlur(float blur);", "void blur();", "public boolean isBlurE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleComplexType" $ANTLR start "rule__Dto__Alternatives" InternalDtoDsl.g:377:1: rule__Dto__Alternatives : ( ( ruleDtoEntity ) | ( ruleDtoFor ) );
public final void rule__Dto__Alternatives() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDtoDsl.g:381:1: ( ( ruleDtoEntity ) | ( ruleDtoFor ) ) int alt2=2; int LA2_0 = input.LA(1); if ( (LA2_0==22) ...
[ "public final void ruleDto() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDtoDsl.g:91:2: ( ( ( rule__Dto__Alternatives ) ) )\r\n // InternalDtoDsl.g:92:2: ( ( rule__Dto__Alternatives ) )\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Actions taken on this order. repeated .opencannabis.commerce.StatusCheckin action_log = 9 [(.gen_bq_schema.ignore) = true];
io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin getActionLog(int index);
[ "io.opencannabis.schema.commerce.CommercialOrder.StatusCheckinOrBuilder getActionLogOrBuilder(\n int index);", "public io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin.Builder addActionLogBuilder() {\n return getActionLogFieldBuilder().addBuilder(\n io.opencannabis.schema.com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update schema in TAP metadata tables
public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;
[ "@Test\r\n\tpublic void testTableSchemaUpdate() throws Exception {\n\t\tTableEntity table = new TableEntity();\r\n\t\ttable.setName(UUID.randomUUID().toString());\r\n\t\tString tableId = entityManager.createEntity(adminUserInfo, table, null);\r\n\t\ttable = entityManager.getEntity(adminUserInfo, tableId, TableEntit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes this control based on the settings in the given vm install and type.
public void initializeFrom(IVMInstall vm, IVMInstallType type) { fVmInstall = vm; fVmInstallType = type; if (vm != null) { setHomeDirectory(vm.getInstallLocation()); fLibraryContentProvider.setLibraries(RubyRuntime.getLibraryLocations(getVMInstall())); } update(); }
[ "protected void initializeFromSelection() {\n \t\tif (getControl() != null) {\n \t\t\tString typeId = null;\n \t\t\tString name = null;\t\t\n \t\t\tif (fSelection != null) {\n \t\t\t\tIPath path = fSelection.getPath();\n \t\t\t\tif (path.segmentCount() > 1) {\n \t\t\t\t\ttypeId = path.segment(1);\n \t\t\t\t\tname =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve a spot on the board using its coordinates
public Spot getSpot(int x, int y) { if (! areValidCoordinates(x, y)) { return null; } else { return board[x][y]; } }
[ "private Piece getPiece(int[] coordinates) {\n int col = coordinates[0];\n int row = coordinates[1];\n return _board.get(col, row);\n }", "Square getCurrentPosition();", "public char getSpot(int x,int y){\r\n if(x<0||x>=3||y<0||y>=3){return 7;}\r\n return board[x][y];\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the text on the braille display to match the currently selected menu item.
private void brailleDisplayWithCurrentItem() { MenuItem current = mMenuItems.get(mCurrentIndex); DisplayManager.Content content = new DisplayManager.Content(current.getName()); content.setPanStrategy(DisplayManager.Content.PAN_RESET); mDisplayManager.setContent(content); ...
[ "private void updateText(){\n\t\tupdateText(colorsSelector.getSelectedColorRGB(), colorsSelector.getSelectedColorHSB(), null);\n\t}", "public void setTextOfMenuComponets() {\r\n\t\t\r\n\t\t// Sets the upper case menu item text\r\n\t\t_upperCaseMenuItem.setText(AcideLanguageManager\r\n\t\t\t\t.getInstance().getLab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'pictureLarge'
@Test public void pictureLargeTest() { // TODO: test pictureLarge }
[ "@Test\n public void largePicTest() {\n // TODO: test largePic\n }", "public boolean isLarge();", "boolean hasIconUrlLarge();", "ImageSize getPictureSize();", "@DISPID(162)\n @PropGet\n int getPictureUnit();", "public String largeImage() {\n return this.largeImage;\n }", "privat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process given game event message.
void process(GameEventMessage message) throws MessageHandlingException;
[ "private void processMessage(String message) {\n }", "private void handleMessage(EcologyMessage msg) {\n // Check the message type and route them accordingly.\n switch ((Integer) msg.fetchArgument()) {\n // A message destined for a room\n case ROOM_MESSAGE_ID:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update node with the uniqueID(when a node is update, it's nodeID should be updated too)
public static int updateNodeWithID(Connection con, Node node) throws SQLException{ PreparedStatement pstmt = con.prepareStatement(NODE_UPDATE_WITHID); pstmt.setString(1, node.getNodeID()); pstmt.setInt(2, node.getXcoord()); pstmt.setInt(3, node.getYcoord()); pstmt.setInt(4, node....
[ "@Transactional\n public abstract void updateNode(OnmsNode node);", "void nodeUpdated(Node n) throws RepositoryException;", "public abstract void updateNode();", "void updateNode(DNode n);", "boolean changeNode (String id, JSONObject metadata, String graph);", "public void updateNode(int nodeId, String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use ManagerMessage.newBuilder() to construct.
private ManagerMessage() { initFields(); }
[ "public @NonNull Builder<C> manager(final @Nullable CommandManager<C> commandManager) {\n return new Builder<>(\n commandManager,\n this.commandMeta,\n this.senderType,\n this.commandComponents,\n this.commandE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SupportedMiddleware__Group__0" $ANTLR start "rule__SupportedMiddleware__Group__0__Impl" InternalComponentDefinition.g:2904:1: rule__SupportedMiddleware__Group__0__Impl : ( 'SupportedMiddleware' ) ;
public final void rule__SupportedMiddleware__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalComponentDefinition.g:2908:1: ( ( 'SupportedMiddleware' ) ) // InternalComponentDefinition.g:2909:1: ( 'SupportedMiddleware' ...
[ "public final void rule__SupportedMiddleware__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:2896:1: ( rule__SupportedMiddleware__Group__0__Impl rule__SupportedMiddleware__Group__1 )\n // In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the billToAddress1 value for this Account.
public java.lang.Object getBillToAddress1() { return billToAddress1; }
[ "public String getAddress1() {\n if (mAddress1 == null) {\n mAddress1 = getAddressProperty(ADDRESS_1_ADDRESS_PROP);\n }\n return mAddress1;\n }", "public java.lang.Object getAddress1() {\n return address1;\n }", "public java.lang.String getAddress1() {\r\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for WETRN.IMG_IMPRT_DATA_MAPG.LAST_UPDT_USER_ID. Contains the MAPS USER ID of the user (person or process) that last updated the row.
public String getLastUpdtUserId() { return (String) getValue(6); }
[ "public Integer getLastUpdUserId() {\n return (Integer) get(6);\n }", "public java.lang.String getLastUpdUserId() {\n return lastUpdUserId;\n }", "public Long getLastChgUserId()\n {\n return lastChgUserId;\n }", "public String getLastUpdateUserId() {\n\t\treturn lastUpdateUser...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method: findPolicyHolderById Description: It is used to view PolicyHolders by id from PolicyHolder table
@Override public Optional<PolicyHolder> findPolicyHolderById(int id) throws PolicyHolderNotFoundException { if(!holderdao.existsById(id)) throw new PolicyHolderNotFoundException("PolicyHolder not found"); return holderdao.findById(id); }
[ "@GetMapping(\"/policy-holders/{id}\")\n @Timed\n public ResponseEntity<PolicyHolderDTO> getPolicyHolder(@PathVariable Long id) {\n log.debug(\"REST request to get PolicyHolder : {}\", id);\n PolicyHolderDTO policyHolderDTO = policyHolderService.findOne(id);\n return ResponseUtil.wrapOrNo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the edges between v and w.
@Override public void removeBi(int v, int w) throws IllegalArgumentException{ if((0<=v && v < edges.length) || (0<=w && w < edges.length)){ if(edges[v].get(w) != null) removeEdge(v, w); if (edges[w].get(v) != null) removeEdge(w, v); }else{ throw new IllegalArgumentException("v or w is out...
[ "public void removeEdge(int v, int w)\n {\n if(adj[v][w])\n {\n e--;\n }\n adj[v][w] = false;\n adj[w][v] = false;\n }", "void removeEdge(V v1, V v2);", "public void removeEdge(V from, V to);", "public void removeEdge(int sourceVert, int destVert, int weight...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an owner based on its owner id
@Transactional(readOnly=true) public Owner getOwnerByOwnerId(int ownerId){ logger.info("Getting owner in the OwnerService..."); Owner owner = null; if(ownerId > 0){ owner = ownerDaoImpl.getOwnerByOwnerId(ownerId); } return owner; }
[ "public Owner find(int ownerId) {\n \tfor(Owner o : ownersList) if(o.getId() == ownerId) return o;\n return null;\n }", "Integer getOwnerId();", "protected Owner doFindOwner(int id) throws DataAccessException {\n return (Owner) ((OwnerQuery) ownerQuery).findObject(id);\n }", "UUID getOw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////AVERAGE METHOD////////////////////// This subroutine takes a scanner object containing integers and returns the average
public static double average(Scanner s){ int count = 0; int sum = 0; while(s.hasNextInt()){ sum += s.nextInt(); count++; } return sum/(double)count; //type cast count to double to avoid integer division }
[ "public double scanDataAndCalculateAverage() {\r\n\t\ttry {\r\n\t\t\tFile f = new File(name);\r\n\t\t\tScanner in = new Scanner(f);\r\n\t\t\tif (!in.hasNext()) {\r\n\t\t\t\tthrow new IllegalArgumentException(name + \" is empty\");\r\n\t\t\t}\r\n\t\t\tif (!in.hasNextInt()) {\r\n\t\t\t\tthrow new IllegalArgumentExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the libpostproc license. Original signature : char postproc_license() native declaration : libpostproc\postprocess.h:14
String postproc_license();
[ "@Mangling({\"_Z15swscale_licensev\", \"?swscale_license@@YAQBDXZ\"}) \n\tString swscale_license();", "@Mangling({\"_Z14avutil_licensev\", \"?avutil_license@@YAQBDXZ\"}) \n\tString avutil_license();", "String getLicense_java_lang_String_();", "public String getLicense();", "String getLicensePlate();", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methods Find the maximum Integer value within nameToIntegerMap. Never let maxMap = 0, it causes LibSVM to error out.
public static Integer getMaxMapValue(HashMap<String, Integer> nameToIntegerMap) { if (nameToIntegerMap.isEmpty()) { return 1; } else { return Collections.max(nameToIntegerMap.values()); } }
[ "private int maxNumber() {\n int max = 0;\n for (String word : map.keySet()) {\n int size = map.get(word).size();\n if (size > max)\n max = size;\n }\n\n return max;\n }", "private static void findLargestFibb(Map<Integer, Integer> fibbMap) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the retrieval of all entities that match the given filter in the persistence. If nothing is found, return an empty list. Return only the entities that are not marked as deleted.
public List<T> search(Filter filter) throws DAOException { Helper.checkNull(filter, "filter"); EqualToFilter equalToFilter = new EqualToFilter("deleted", new Boolean( false)); AndFilter resultedFilter = new AndFilter(filter, equalToFilter); return searchByFilterUtility.se...
[ "public List<Entity> query(Filter filter) {\n\t\treturn entityDB.query(filter);\n\t}", "@SuppressWarnings(\"unchecked\")\n public List<T> retrieveAll() throws DAOException {\n String queryString = \"select e from \"\n + entityBeanType.getCanonicalName() + \" as e\"\n + \" w...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To press the enter button
public void clickEnter(){ Actions actions = new Actions(driver); Action sendEsc = actions.sendKeys(Keys.ENTER).build(); sendEsc.perform(); }
[ "public void clickEnterButton(){\r\n\t\tActions act=new Actions(driver);\r\n\t\tact.sendKeys(Keys.ENTER).build().perform();\r\n\t}", "protected void enterPressed()\n\t{\n\t\t// Call the enter method if the enter key was pressed\n\t\tif (showCaret)\n\t\t\tonSubmit(text.getText().substring(0, text.getText().length(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Time Period Type'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseTimePeriodType(TimePeriodType object) { return null; }
[ "TimePeriodType createTimePeriodType();", "private void determineTypePeriod() {\n\t\tif (hasOption(TYPE_COMPLETE)) {\n\t\t\tthis.type = TYPE_COMPLETE;\n\t\t} else {\n\t\t\tthis.type = TYPE_ALL;\n\t\t}\n\t\t\n\t\tif (hasOption(PERIOD_TODAY)) {\n\t\t\tthis.period = PERIOD_TODAY;\n\t\t} else if (hasOption(PERIOD_TOM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int32 oneof_2404 = 2404;
public int getOneof2404() { if (hugeOneofCase_ == 2404) { return (java.lang.Integer) hugeOneof_; } return 0; }
[ "int getTestFixed32();", "int getTestSfixed32();", "int getInt32Value();", "int getOneof2460();", "public int getTestFixed32() {\n return testFixed32_;\n }", "@Test\n public void testToInt() {\n Ip4Address ipAddress;\n\n ipAddress = Ip4Address.valueOf(\"1.2.3.4\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check that the calculation returns the correct data type for it's data element
private void checkResultantDataType(Calculation calculation) { if (calculation != null) { String dataType = getDet().getDataElement(getDataElement().getCui()).getDatatype(); //if the calculation is for a date field, the calculation must return a date if (FormUtils.CALCULATION_DATATYPE_DATE.equals(...
[ "private void validateDataType() {\n if (getDataElement().getCalculation() != null) {\n String dataType = getDet().getDataElement(getDataElement().getCui()).getDatatype();\n if (!FormUtils.VALID_CALCULATION_DATATYPES.contains(dataType)) {\n notifyValidatorErrorListener(ERROR_KEY1); \n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the retentionPolicy property: the retention policy for the events in the log.
public RetentionPolicy retentionPolicy() { return this.retentionPolicy; }
[ "public RetentionPolicy getRetentionPolicy() {\n Object retentionPolicy = get(LOG_RETENTION_POLICY);\n if (retentionPolicy == null) {\n return DEFAULT_LOG_RETENTION_POLICY;\n } else if (retentionPolicy instanceof RetentionPolicy) {\n return (RetentionPolicy) retentionPolicy;\n } else if (reten...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the Task Index
public int getTaskIndex() { return mTaskIndex; }
[ "public int getLocalTaskIndex() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (LOCAL_TASK_INDEX_);\n return ((Integer)retnValue).intValue ();\n }", "public int indexOfCurrentTask()\n {\n\treturn _tasks.indexOf(_currentTask);\n }", "public abstract Task getTask(int inde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine active attributes for this frame.
protected void determineActiveAttributes() { // Reset symbol attributes to default before applying overrides. this.activeSymbolAttributes.copy(defaultSymbolAttributes); if (this.isHighlighted()) { TacticalGraphicAttributes highlightAttributes = this.getHighlightAttribute...
[ "protected void determineActiveAttributes()\n {\n if (this.isHighlighted())\n {\n if (this.getHighlightAttributes() != null)\n this.activeAttributes.copy(this.getHighlightAttributes());\n else\n {\n // If no highlight attributes have be...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the child challenge with the primary key or returns null if it could not be found.
@Override public ChildChallenge fetchByPrimaryKey(Serializable primaryKey) throws SystemException { ChildChallenge childChallenge = (ChildChallenge)EntityCacheUtil.getResult(ChildChallengeModelImpl.ENTITY_CACHE_ENABLED, ChildChallengeImpl.class, primaryKey); if (childChallenge == _nullChildChallenge) { r...
[ "@Override\n\tpublic ChildChallenge fetchByPrimaryKey(long childChallengeId)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey((Serializable)childChallengeId);\n\t}", "ChallengeTo findChallengeById(int id);", "public FPTreeNode getChild() {\n\t\tif (children.size() != 1) {\n\t\t\treturn null;\n\t\t} e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
'dependsOnMethods' was added to invoke 'onTestSkipped' method form CustomTestListenerAdapter.java
@Test(dependsOnMethods = "testFailure") public void testIgnored() { System.out.println("TestTestListenerAdapter.testIgnored()"); }
[ "public void onTestSkipped() {}", "@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\n\t\t\n\t}", "void onTestSuiteRemoved() {\n // not interested in\n }", "public void notifyNoMoreTests();", "@Test\n @Ignore\n public void ignored()\n {\n fail( \"This method was no...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new string output stream.
public StringOutputStream() { super(); stringBuilder = new StringBuilder(); }
[ "public static StringDescriptionWriter stringWriter() {\n return new StringDescriptionWriter();\n }", "public static XMLStringWriter create() {\r\n return new XMLStringWriter(new StringWriter());\r\n }", "public ByteStringOutputStream() {\n this(DEFAULT_CAPACITY);\n }", "public FastStr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing if the web service can create a cookie that holds the id of the user and then retrieve that cookie This can be used to find other users in the same city
@Test public void testUserLogin() { User user0 = new User("lecturer234", "Best", "Lecturer", "Wellington"); Response response0 = _client.target(WEB_SERVICE_URI).request().post(Entity.xml(user0)); String location = response0.getLocation().toString(); response0.close(); User user1 = new User("lecturer002", "No...
[ "@Test\n public void testGetCookie() {\n LOG.entering(CLASS, \"testGetCookie\");\n try{\n Cookie cookie = new Cookie(\"cookieName\", \"cookieValue\", \"/\", \"swgas.com\", false, false, LocalDateTime.now().plusDays(5));\n setUrl(URL);\n POST(getUri(\"addCookie\", se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all project types Returns all [project types]( whether or not the instance has a valid license for each type. This operation can be accessed anonymously. [Permissions](permissions) required: None. 200 Returned if the request is successful. 401 Returned if the authentication credentials are incorrect.
public Flux<ProjectType> comAtlassianJiraRestV2ProjectTypeProjectTypeResourceGetAllProjectTypesGet() throws RestClientException { Object postBody = null; // create path and map variables final Map<String, Object> pathParams = new HashMap<String, Object>(); final MultiValueMap<String, St...
[ "public Flux<ProjectType> comAtlassianJiraRestV2ProjectTypeProjectTypeResourceGetAllAccessibleProjectTypesGet() throws RestClientException {\n Object postBody = null;\n // create path and map variables\n final Map<String, Object> pathParams = new HashMap<String, Object>();\n\n final Mult...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the list of all watchpoints contained in drawframe
public ArrayList<Watchpoint> get_watchpoint_manager() { return drawframe.get_watchpoint_manager(); }
[ "List<Frame> getFrames();", "private Coordinates drawFromWatchList() {\n return watchlist.pop();\n }", "List<Robot> getRobotsToDraw();", "java.util.List<com.google.cloud.videointelligence.v1p2beta1.ObjectTrackingFrame> getFramesList();", "public List<Drawing> getChangedDrawings() {\n// Set<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column PDSCI.EDU_STUDY_HISTORY.CREATE_USER_FLOW
public void setCreateUserFlow(String createUserFlow) { this.createUserFlow = createUserFlow; }
[ "public void setCreateUserFlow(String createUserFlow) {\r\n this.createUserFlow = createUserFlow;\r\n }", "public void setCreateUser(Integer createUser) {\n this.createUser = createUser;\n }", "public void setCreateUserId(Integer createUserId) {\r\n this.createUserId = createUserId;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column IRP_FCR_REPORTS.APP_NAME
public String getAPP_NAME() { return APP_NAME; }
[ "public final String getAppName( )\n\t{\n\t\treturn this.data.getString( \"applicationName\" );\n\t}", "java.lang.String getApplicationName();", "public static final String getApplicationName(){\n\t\treturn applicationName == null ? \"\" : applicationName;\n\t}", "public String getApplicationName() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create set = to null, will cause NullPointerException
@Test(expected = NullPointerException.class) public void testCreateSetFromNull() { testingSet = new IntegerSet(null); }
[ "private void createNullSet()\n\t{\n\t\tm_values = null;\n\t}", "void setNilSet();", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testAllNull() {\n\t\t\ttestingSet = new IntegerSet();\r\n\t\t\ttestingSet.insertAll(null);\r\n\t\t\t// check if set is null \r\n \t\t\tassertNull(testingSet);\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Selects only those units which are VISIBLE ON MAP (not behind fog of war).
public Selection visibleOnMap() { return cloneByRemovingIf( (unit -> !unit.isVisibleUnitOnMap()), "visibleOnMap" ); }
[ "private void calculateVision(UnitOwner player) {\n\t\tfor (Unit unit : player.getUnits()) {\n\t\t\tList<MapLocation> sightRange = getTilesInRange(unit.getPosition(), unit.getSightRadius());\n\t\t\tfor (MapLocation tile : sightRange) {\n\t\t\t\tif (!player.getVisibleTiles().contains(tile)) {\n\t\t\t\t\tplayer.addVi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified Lambda function code and configuration. This operation requires permission for the lambda:DeleteFunction action.
public void deleteFunction(DeleteFunctionRequest deleteFunctionRequest) { ExecutionContext executionContext = createExecutionContext(deleteFunctionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); ...
[ "void deleteFunctionLibrary(String functionLibraryName, String tenantDomain)\n throws FunctionLibraryManagementException;", "@Test\n public void deleteCodeTest() throws ApiException {\n Long codeId = null;\n DeleteCodesResponse response = api.deleteCode(codeId);\n\n // TODO: tes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column school_psychicjob.rwmc
public void setRwmc(String rwmc) { this.rwmc = rwmc; }
[ "public void setWmc( int pWmc )\r\n {\r\n ( (IntegerMetricBO) getMetrics().get( WMC ) ).setValue( new Integer( pWmc ) );\r\n }", "public String getRwmc() {\n return rwmc;\n }", "public void setMc(String mc) {\n this.mc = mc;\n }", "public void setSbzrmc(String sbzrmc) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs the command object to add the described simple decision to the choice at the given index with the outcome at the given index.
public AddSimpleDecision(String description, String choiceIdx, String outcomeIdx) throws IllegalArgumentException { if (Utils.isPositiveStringNumber(choiceIdx) && Utils.isPositiveStringNumber(outcomeIdx)) { this.description = description; this.choiceIdx = Integer.parseInt(choiceIdx) - 1; this.outc...
[ "private ModifyCommand changeByIndex() {\r\n\t\tchar taskType;\r\n\t\tint index;\r\n\t\tString newTask;\r\n\t\tModifyCommand command;\r\n\t\ttaskType=_userInput.charAt(1);\r\n\t\tint spaceIndex = _userInput.indexOf(SPACE_STRING);\r\n\t\tindex=Integer.parseInt(_userInput.substring(2, spaceIndex));\r\n\t\tint toIndex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Test close() when having sufficient privilege, and an output stream that always throws exceptions.
public void testClose_SufficientPrivilege_Exception() { ByteArrayOutputStream aos = new MockExceptionOutputStream(); StreamHandler h = new StreamHandler(aos, new MockFormatter()); h.publish(new LogRecord(Level.SEVERE, "testClose_SufficientPrivilege_Exception msg")); h.flu...
[ "public void testClose_SufficientPrivilege_NormalClose() {\n ByteArrayOutputStream aos = new MockOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n h.publish(new LogRecord(Level.SEVERE,\n \"testClose_SufficientPrivilege_NormalClose msg\"));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct an ExtraRowsException with the specified data.
protected NumberOfRowsException(final String adjective, final int required, final int actual) { super("Too " + adjective + " rows must be: " + required + ", was: " + actual); requiredValue = required; actu...
[ "public \n RowSizeMismatchException()\n {}", "public TableRow createBadRow(String data) {\n TableRow output = new TableRow();\n output.set(\"json\", data);\n return output;\n }", "@Test (expected = BadArgumentException.class)\n public void testInsertRowException() throws Exception {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Roles'.
Roles createRoles();
[ "public RolesDao() {\n\t\tsuper(Roles.ROLES, ua.org.pius.studtrain.db.tables.pojos.Roles.class);\n\t}", "public com.exacttarget.wsdl.partnerapi.Account.Roles addNewRoles()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.Account.Roles ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compare any number of ConnectN boards.
public static boolean compareBoards(final ConnectN... boards) { if (boards == null || boards.length == 0) { return false; } for (int i = 0; i < boards.length - 1; i++) { if (!(compareBoards(boards[i], boards[i + 1]))) { return false; } ...
[ "boolean compareBoard();", "public static boolean compareBoards(final ConnectN firstBoard, final ConnectN secondBoard) {\n if (firstBoard == null || secondBoard == null) {\n return false;\n }\n if (firstBoard.getWidth() != secondBoard.getWidth()) {\n return false;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deduces image format from the buffered image type or color and sample models.
public static NativeImageFormat createNativeImageFormat(BufferedImage bi) { NativeImageFormat fmt = new NativeImageFormat(); switch (bi.getType()) { case BufferedImage.TYPE_INT_RGB: { fmt.cmmFormat = INT_RGB_LCMS_FMT; break; } ...
[ "public Graphics.ImageFormat getFormat();", "public ImageFormatData getIm_format() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new ImageFormatData(__io__address + 0, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new ImageFormatData(__io__address + 0, __io__block, __io_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles a request to put a collection into a DDS repository.
protected ActionForward doPutCollection(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, ActionMapping mapping) throws Exception { prtln("doPutCollection()"); String errorMsg = ""; // validate presence of required argume...
[ "public FileCollection saveCollection(String collectionName, boolean isIdentifiable, String diseaseAbbreviation, String centerType, String centerDomain, String platformName);", "RepoCollectionList createCollection(RepoCollectionInput repoCollectionInput);", "public void putCollection(String collectionKey, Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get default selection of products as per user requirements
@Ignore protected Map<String, Product> getDefaultProducts() { Product aProduct = ProductFactory.createProduct("A nice product", 60, 10); Product bProduct = ProductFactory.createProduct("A berry nice product", 100, 4); Product cProduct = ProductFactory.createProduct("A cherry berry nice p...
[ "public static String getProduct()\n\t{\n\t\tString selection = (String) JOptionPane.showInputDialog(null,\n\t\t\t\t\"Select product:\", STORE, JOptionPane.QUESTION_MESSAGE,\n\t\t\t\tnull, prodLines, prodLines[0]);\n\t\treturn selection;\n\t}", "private static int getProductChoice() {\n\t\t// TODO ask what produc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column wx_rule_keyword.rule_id
public Long getRuleId() { return ruleId; }
[ "int getRuleId();", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _rule.getPrimaryKey();\n\t}", "public String ruleId() {\n return this.ruleId;\n }", "public Integer getRuleId() {\n return ruleId;\n }", "public int getRuleId() {\n return ruleId_;\n }", "public int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Property name : Measured room temperature EPC : 0xE2 Contents of property : Measured room temperature Value range (decimal notation) : 0x81.0x7D (127.125.C) Data type : signed char Data size : 1 byte Unit : .C Access rule : Announce undefined Set undefined Get optional
public Getter reqGetMeasuredRoomTemperature() { reqGetProperty(EPC_MEASURED_ROOM_TEMPERATURE); return this; }
[ "protected byte[] getMeasuredRoomTemperature() {return null;}", "@Override\r\n public int getTemperature(){\r\n return 10;\r\n }", "public String getTemperatureM1();", "public void setRoomTemperature(int room_temp){\r\n\t\t\r\n\t\t// room temp must be in 1/10�C \r\n\t\t//energieAPI.setData1(room_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the entire map of statistics.
public static Map<Channel, ChannelStatistics> getAllStatistics() { return statisticsMap; }
[ "public Map<String,String> getStatistics();", "Statistics getStatistics();", "public Map<String, StatsInfo> getStatsInfoMap() {\n\t\treturn statsInfoMap;\n\t}", "public Statistics getStatistics();", "public Collection<IStat> getStats() {\n return this.stats.values();\n }", "Map<String, Metric>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ create a method that takes 2 numbers as input and return the greater number
int greaterNumber(int num1, int num2) { if(num1>num2) { return num1; }else { return num2; } }
[ "public int maximum(int num1,int num2);", "static int maxOf(int a,int b){\n return a>b?a:b;\n }", "int maxOf(int a, int b) {\n return (a > b) ? a : b;\n }", "int max(int a, int b) { return (a > b) ? a : b;}", "public boolean greaterThan(int x , int y){\n return true;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This function creates the fish object used to collision detection.
private void createFish() { fishCell = new Rectangle(fishX, fishY, cellWidth, cellHeight); }
[ "Fish moveAFish(){\r\n return new Fish(new Posn(this.center.x + speed, this.center.y),this.radius, this.col, this.speed, this.alive);\r\n }", "private void setupMainFishBounderies(World world, Stage stage){\n\n //build a boundary\n //build the bubbles body\n // First we create a body defi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate Masterslave state model definition Replaced by MasterSlaveSMDbuild()
@Deprecated public static ZNRecord generateConfigForMasterSlave() { ZNRecord record = new ZNRecord("MasterSlave"); record.setSimpleField(StateModelDefinitionProperty.INITIAL_STATE.toString(), "OFFLINE"); List<String> statePriorityList = new ArrayList<String>(); statePriorityList.add("MASTER"); sta...
[ "public static StateModelDefinition build() {\n StateModelDefinition.Builder builder =new StateModelDefinition.Builder(name);\n // init state\n builder.initialState(States.OFFLINE.name());\n\n // add states\n builder.addState(States.MASTER.name(), 0);\n builder.addState(States.SLAVE.name(), 1);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ inserting a notification
public static int insert(Notification n) { int status=0; try { Connection connection=MyDBconnectionUtil.getDBconnection(); PreparedStatement ps=connection.prepareStatement( "insert into notifications (type,specialMsg) values(?,?)"); ps.setInt(1, n.getType()); ps.setString(2, n.getSpecialMsg())...
[ "public void createNotification(Notification notification);", "Notification addNotification(Notification notification);", "@Override\n public void createNotification(Notification notification) {\n Player p = Bukkit.getPlayer(notification.getPlayer()); //TODO uuid\n if (p != null && p.isOnline()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts Comparable c into its correct location in this list.
public void insert(Comparable c) { if (c.compareTo(head) <= 0) { tail = new SortedComparableList(head, tail); head = c; } else if (tail == null) { tail = new SortedComparableList(c, null); } else tail.insert(c); }
[ "public void add(Comparable c){\n\tfor(int i=0; i<data.size(); i++){ //for each meaningful element\n\t if(data.get(i).compareTo(c) >= 0){ //if c is less than the element being compared\n\t\tdata.add(i, c); //add c before the element that is is being compared to\n\t\treturn; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__CommRepositoryImport__Group__0__Impl" $ANTLR start "rule__CommRepositoryImport__Group__1" InternalCommunicationObject.g:1156:1: rule__CommRepositoryImport__Group__1 : rule__CommRepositoryImport__Group__1__Impl rule__CommRepositoryImport__Group__2 ;
public final void rule__CommRepositoryImport__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCommunicationObject.g:1160:1: ( rule__CommRepositoryImport__Group__1__Impl rule__CommRepositoryImport__Group__2 ) // InternalCommu...
[ "public final void rule__CommRepositoryImport__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCommunicationObject.g:1133:1: ( rule__CommRepositoryImport__Group__0__Impl rule__CommRepositoryImport__Group__1 )\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that calculates the travel time (estimation)
public int calcTravelTime(Request request) { NdPoint currentLocation = space.getLocation(this); NdPoint s1location = request.getOrigin(); NdPoint s2location = request.getDestination(); // Calc time between current position and first source double distance1 = this.space.getDistance(currentLocation, s1lo...
[ "private void calculateTravelTime() {\n for(MyEdge edge : edges) {\n this.traveltime += edge.getTravelTime();\n }\n }", "public void caltotaltraveltime()\n {\n \t\n \t switch(this.mLegs.size())\n \t {\n \t case 0:\n \t {\n \t\t this.mTravelTime=0;\n \t\t break;\n \t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds answers by criteria.
List<Answer> findByCriteria(Map<String, String> criteria) throws DaoException;
[ "public int[] find(String[] criteria);", "<T> List<T> findResultsByCriteria(Criteria<T> criteria);", "public SubmissionSearchResult search(SubmissionSearchCriteria criteria);", "public abstract List<T> find(SearchCriteria searchCriteria);", "public Collection<E> find(ICriterion<E, K, L> criterion);", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column hf_warehouse.hf_name
public String getHfName() { return hfName; }
[ "public String getWarehouseName() {\n return warehouseName;\n }", "public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }", "public String getWarehouseName() {\n\t\treturn warehouseName;\n\t}", "public String getColumn_name(){\r\n\t\treturn this.column...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new course for the User if and only if the git url is a valid one and is accessible by Id and password
@RequestMapping(value = "/api/user/{userId}/course", method = RequestMethod.POST) public ResponseEntity<Course> newCourse(@PathVariable String userId, @RequestBody Course courseDetails) { try { return new ResponseEntity<>(courseService.addCourse(courseDetails, userId), HttpStatus.ACCEPTED); ...
[ "public String createCourse() {\n\n int createdCourseID = 0;\n this.transaction = Connection.create();\n transaction.start();\n try {\n // Create course.\n createdCourseID = CourseDAO.createCourse(this.transaction,\n this.course, this.courseImage)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property displayColumns.
public void setDisplayColumns(String displayColumns) { String oldDisplayColumns = getDisplayColumns(); query.setDisplayColumns(displayColumns); // reformat display here propertyChangeSupport.firePropertyChange("displayColumns", oldDisplayColumns, displayColumns); }
[ "public int getDisplayColumns();", "public List<ColumnDescriptor> getDisplayColumns() {\n\t\tList<ColumnDescriptor> result = new ArrayList<>();\n\n\t\tfor (ColumnDescriptor column : this.columns) {\n\t\t\tif (column.isDisplay()) {\n\t\t\t\tresult.add(column);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }